Lightweight 3D Web Prototypes: Specs, Budgets, and Acceptance Testing

    This article explains how to move a lightweight 3D web prototype from demo to delivery. It covers writing specifications with testable acceptance criteria, setting budgets for bundle size, frame rate, and load time, defining how to measure them, adapting controls and performance for mobile browsers, running quality checks, and estimating costs and risks.

    1. What Small 3D Web Experiences Solve

    Traditional 3D games depend on full game engines, high-detail models, and large textures. Their installers are often several gigabytes. A 3D experience in the browser runs as soon as a user opens a link, with no installation, and the same code can run on desktop and mobile. When the package shrinks to a few megabytes, the first load is shorter, sharing a link costs less, and data usage is easier to control.

    As code generation tools improve, developers can describe gameplay in natural language and quickly get a runnable 3D page. Demos can look impressive quickly, but a working demo does not mean the product runs reliably, can be maintained, or is ready to launch. Moving a prototype from demo to delivery requires at least specification breakdown, budget constraints, mobile validation, and cost accounting. The sections below cover each step, with a template or checklist for each one.

    2. Requirements Specification and Acceptance

    A one-sentence description is enough to start generation, but the quality of the output depends on how complete the requirements are. Vague requirements often produce code that looks complete but lacks constraints. When problems appear, teams struggle to tell whether the cause is missing requirements, generation drift, or an implementation error.

    The table below compares vague requirements with specific ones.

    Dimension Vague requirement Specification
    Gameplay “Make a maze game” One level, enclosed scene, 3 target points, timed completion
    Controls “Support mobile” On mobile, a left-side joystick moves the character and a right-side swipe changes the view
    Performance “It should be smooth” On a mid-range device, frame rate stays at 30 or higher, and bundle size stays within the set limit
    Acceptance “If it’s playable, it’s fine” Each feature has an executable test and a pass condition
    Cost of missing detail Rework without a way to judge right or wrong, and repeated changes A failed test points to a specific item

    We recommend writing specifications in the template below. The numbers in the template are starting assumptions and should be calibrated with data from real devices.

    1. project:
    2. name: "Example: small enclosed-scene maze"
    3. version: "0.1"
    4. scope:
    5. level_count: 1
    6. level_size: "Small enclosed scene, designed to be completed in about 60 seconds"
    7. objective: "Reach the exit within the time limit"
    8. target_goal_count: 3
    9. win_condition: "The player enters the exit trigger area after collecting all target points"
    10. lose_condition: "The countdown reaches zero"
    11. controls:
    12. desktop:
    13. move: "WASD"
    14. look: "Mouse drag. The player must first click the canvas to enable pointer lock"
    15. interact: "E key"
    16. mobile:
    17. move: "Left-side virtual joystick, with a dead zone radius set to 10% of the joystick radius"
    18. look: "Single-finger swipe in the right-side area"
    19. interact: "Button in the lower-right corner"
    20. budget:
    21. target_fps: 60
    22. min_fps_mobile: 30
    23. max_bundle_kb: 2048
    24. first_paint_ms: 1500
    25. first_playable_ms: 3000
    26. measurement:
    27. device_profile: "One mid-range Android phone and one iPhone from the past two years. Record the models in the test report"
    28. network: "Simulated 4G, using the browser developer tools preset"
    29. statistic: "Sample each metric 5 times and record the median and 90th percentile"
    30. bundle_scope: "Transfer size of the sum of HTML, JS, CSS, textures, models, and audio, measured after gzip or brotli compression"
    31. visual:
    32. lighting: "Low-poly style, with lighting baked where possible"
    33. material: "Mostly solid colors, with each texture no larger than 512x512"
    34. resolution_range: "Viewport width from 360px to 1920px, with a device pixel ratio capped at 2"
    35. acceptance:
    36. - id: AC-01
    37. feature: "Complete a level on desktop"
    38. test: "Record one full playthrough, noting the time taken and the win or loss result"
    39. pass: "5 consecutive successful completions"
    40. - id: AC-02
    41. feature: "Mobile joystick is operable"
    42. test: "Run a fixed route script on a real device, covering turning and stopping"
    43. pass: "100% route completion with no accidental triggers"
    44. - id: AC-03
    45. feature: "Bundle size meets the target"
    46. test: "Measure the transfer size after the build"
    47. pass: "Does not exceed budget.max_bundle_kb"
    48. - id: AC-04
    49. feature: "First-screen time meets the target"
    50. test: "Load 5 times under simulated 4G with a cleared cache"
    51. pass: "The 90th percentile of first_paint_ms does not exceed the threshold"

    Each feature in the template maps to an acceptance ID. When writing a specification, first decide how each feature will be tested, then set the target values. Any item without a test method should be removed from the specification or rewritten.

    3. Size, Visual Quality, and Frame Rate Budgets

    These three kinds of metrics often constrain one another. Higher visual quality increases the size of textures and models, and it also raises the rendering cost of each frame. Teams should set priorities first, then allocate the budget.

    We recommend this priority order: playability and input responsiveness come first, then frame rate, then first-screen time, and finally visual detail. If input lag is noticeable, users will leave even when the visuals are polished.

    The table below gives a starting allocation. The percentages are only a basis for discussion and should be adjusted to your actual resources.

    Resource category Starting share Adjustment notes
    Scripts About 25% Third-party libraries can raise this share significantly, so reduce dependencies first
    Textures About 40% Usually the largest share. Reduce resolution or switch to compressed formats first
    Models About 20% Reduce polygon counts and merge meshes to lower the number of draw calls
    Audio About 10% Prioritize short sound effects and load background music on demand
    Reserve About 5% Kept for later changes. If it is exceeded, existing assets must be cut

    Measurement rules must be written into the report. Otherwise, numbers from different people cannot be compared.

    1. Frame rate: While the page is visible, count frames per second using requestAnimationFrame. Discard the first 3 seconds of warm-up data.
    2. First-screen time: The time from navigation start until the canvas first displays a visible frame. The loading screen does not count as playable content.
    3. First-playable time: The time from navigation start until the player can give the first valid input.
    4. Bundle size: The sum of the transfer sizes of all shipped files after gzip or brotli compression. The uncompressed disk size is for reference only.
    5. Sampling: Sample each metric at least 5 times. Report the median and the 90th percentile, and record the device model, browser version, and network simulation settings.

    The common steps for reducing size are below.

    1. Shrink textures to the size actually needed for display, and use compressed texture formats.
    2. Use the glTF format for models. Enable Draco or meshopt compression as needed, and verify the rendering result after each compression step.
    3. Merge meshes that share the same material to reduce draw calls.
    4. Remove unused assets and dependencies, and check whether the build output includes development-only code.
    5. Use a lower audio sample rate, and confirm that the sound quality is still acceptable.

    Re-measure after every change. A single measurement cannot show whether an optimization worked.

    4. Mobile Adaptation and Input

    Mobile problems usually appear in three areas: input, viewport, and performance. Mobile browser address bars expand and collapse, and screen sizes and notch areas differ from device to device, so each adaptation item needs to be checked.

    Implementation steps:

    1. Set the viewport in the page head, make the canvas size follow its container, and listen for window resize events.
    2. Cap the device pixel ratio, for example at 2. A higher pixel ratio increases fill cost and heat.
    3. Set touch-action to none on touch areas, so page scrolling and double-tap zoom do not interfere with gameplay.
    4. Add a dead zone to the joystick, so slight finger tremors do not make the character drift.
    5. Browsers usually require a user gesture before playing audio. Unlock the audio context on the first tap.
    6. Pause the render loop when the page goes to the background, resume it when the page returns to the foreground, and check whether timers are still accurate.
    7. Leave safe areas for notches and the bottom gesture bar, so buttons are not covered.

    Mobile checklist:

    • After switching between portrait and landscape, the canvas aspect ratio is correct, and the control buttons are not misplaced.
    • The joystick still works at the edge of the screen and does not fail when the finger leaves its area.
    • After 5 minutes of continuous play, the device shows no frame drops caused by heat.
    • After switching to another app and returning, the game state is correct and the audio resumes normally.
    • On low-memory devices, the page does not crash from running out of memory.

    5. Quality Verification Checklist

    The goal of verification is to confirm that every specification item has supporting evidence. Test results should be saved as records, not judged by impression alone.

    Category Check Test method Pass condition
    Function Win and lose logic Run the AC-01 script Win and loss outcomes match the specification
    Input Desktop and mobile controls Run the fixed route script 100% route completion
    Performance Frame rate Measure using the method in Section 3 Desktop meets the target frame rate, and mobile is at or above min_fps_mobile
    Loading First screen and bundle size Load under simulated 4G with a cleared cache Meets the thresholds in the budget
    Stability Long-running sessions Run continuously for 10 minutes and record memory use Memory shows no sustained upward trend
    Compatibility Browsers and devices Run on the agreed device list Every device on the list can play the game
    Compliance Asset sources Check the asset record sheet Every asset has a documented source and license

    During acceptance, each record should note the tester, the date, the device model, and the browser version. Results without this information are hard to reproduce later.

    6. Full-Cycle Cost Estimate

    There is no universal fixed cost, because tool subscription prices, labor rates, and device purchasing methods vary widely. The structure below shows how to calculate the cost. The person-day figures are example assumptions and should be replaced with your team’s own estimates.

    Formula: Total cost = labor cost + tools and subscriptions + test device costs + asset costs + rework buffer.

    Phase Example person-days (assumed) Notes
    Requirements specification and acceptance 1 Write the specification template and define acceptance IDs
    Generation and iteration 3 Generate the prototype, then fix it item by item against the specification
    Size and performance optimization 2 Compress assets and re-measure, following the steps in Section 3
    Mobile adaptation 2 Complete all items in the Section 4 checklist
    Quality verification 2 Run the Section 5 checklist and compile the test records
    Subtotal 10 Sum of the person-days above
    Rework buffer 20% (2 person-days) Subtotal multiplied by the coefficient. Adjust based on team experience
    Total 12 Multiply by the daily labor rate to get the labor cost

    Enter tool and subscription fees, test device costs, and asset licensing costs at actual quoted prices. If the team does not have a mid-range Android phone and an iPhone, the cost of buying or renting them must be included. Otherwise, the performance data cannot support the acceptance conclusions.

    7. Risks and Considerations

    Performance data holds only under the conditions in which it was measured. Reports must state the device, browser version, network simulation settings, and measurement method. A different device or network can produce noticeably different results.

    AI-generated code needs human review. Focus on the source and license of third-party dependencies, unsafe input handling, and any debug code that contains sensitive information.

    Asset copyright sources must be recorded. Assets may be self-made, purchased, or released under open-source licenses, and each type has different usage restrictions. Verify each asset before launch.

    A demo cannot serve as an acceptance conclusion. A prototype meets delivery standards only after it passes the test items in the specification.

    Record the toolchain and its versions, including the generation tool, build tools, browser versions, and compression plugin versions. Version changes can alter bundle size and rendering results. Only with these records can an issue be reproduced.