create-threenative 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -2
- package/agent-docs/references/assertion-reference.md +173 -6
- package/agent-docs/references/capability-reference.md +1303 -99
- package/agent-docs/references/capture-the-frame.md +7 -0
- package/agent-docs/references/creating-creatures.md +215 -0
- package/agent-docs/references/ctx-cookbook.md +69 -0
- package/agent-docs/references/debug-surface.md +8 -3
- package/agent-docs/references/dream-loop.md +150 -0
- package/agent-docs/references/finding-assets.md +70 -2
- package/agent-docs/references/sculpt-from-a-reference.md +3 -2
- package/agent-docs/references/trace-a-slow-frame.md +99 -0
- package/agent-docs/references/visual-baseline.md +41 -0
- package/agent-files/.agents/skills/file-engine-bug/SKILL.md +59 -0
- package/agent-files/.agents/skills/prd-creator/SKILL.md +40 -0
- package/agent-files/.agents/skills/threenative-assets/SKILL.md +45 -0
- package/agent-files/.agents/skills/threenative-builder/SKILL.md +1 -1
- package/agent-files/.agents/skills/threenative-capabilities/SKILL.md +27 -0
- package/agent-files/.agents/skills/threenative-context/SKILL.md +57 -0
- package/agent-files/.agents/skills/threenative-performance/SKILL.md +42 -0
- package/agent-files/.agents/skills/threenative-playtest/SKILL.md +44 -0
- package/agent-files/.agents/skills/threenative-ui/SKILL.md +20 -0
- package/agent-files/.agents/skills/threenative-verifier/SKILL.md +1 -1
- package/agent-files/.agents/skills/threenative-visuals/SKILL.md +41 -0
- package/agent-files/.claude/skills/file-engine-bug/SKILL.md +59 -0
- package/agent-files/.claude/skills/prd-creator/SKILL.md +40 -0
- package/agent-files/.claude/skills/threenative-assets/SKILL.md +45 -0
- package/agent-files/.claude/skills/threenative-capabilities/SKILL.md +27 -0
- package/agent-files/.claude/skills/threenative-context/SKILL.md +57 -0
- package/agent-files/.claude/skills/threenative-performance/SKILL.md +42 -0
- package/agent-files/.claude/skills/threenative-playtest/SKILL.md +44 -0
- package/agent-files/.claude/skills/threenative-ui/SKILL.md +20 -0
- package/agent-files/.claude/skills/threenative-visuals/SKILL.md +41 -0
- package/agent-files/scripts/reference.mjs +705 -0
- package/agent-files/scripts/visual-loop.mjs +382 -0
- package/capabilities.json +1881 -131
- package/dist/index.d.ts +39 -6
- package/dist/index.js +297 -32
- package/dist/threenative.js +822 -105
- package/package.json +30 -5
- package/template-assets/loading.ts +12 -2
- package/template-assets/patches/three@0.185.1.patch +249 -14
- package/template-assets/worldEnvironment.ts +758 -0
- package/templates/action-rpg/.codex/config.toml +4 -0
- package/templates/action-rpg/.cursor/mcp.json +32 -0
- package/templates/action-rpg/.gemini/settings.json +32 -0
- package/templates/action-rpg/.mcp.json +15 -3
- package/templates/action-rpg/.vscode/mcp.json +36 -0
- package/templates/action-rpg/.zed/settings.json +36 -0
- package/templates/action-rpg/AGENTS.md +69 -378
- package/templates/action-rpg/CLAUDE.md +69 -378
- package/templates/action-rpg/opencode.json +41 -0
- package/templates/action-rpg/package.json +7 -7
- package/templates/action-rpg/playtests/combat.playtest.json +9 -0
- package/templates/action-rpg/playtests/performance.playtest.json +24 -7
- package/templates/action-rpg/playtests/survives.playtest.json +27 -0
- package/templates/action-rpg/playtests/touch-controls.playtest.json +42 -0
- package/templates/action-rpg/src/conventions.ts +35 -0
- package/templates/action-rpg/src/entities/Enemy.ts +2 -3
- package/templates/action-rpg/src/entities/Player.ts +20 -3
- package/templates/action-rpg/src/render/camera.ts +7 -2
- package/templates/action-rpg/src/render/lighting.ts +5 -3
- package/templates/action-rpg/src/render/loading.ts +12 -2
- package/templates/action-rpg/src/render/materials.ts +11 -0
- package/templates/action-rpg/src/render/palette.ts +10 -3
- package/templates/action-rpg/src/render/postprocessing.ts +21 -58
- package/templates/action-rpg/src/render/quality.ts +170 -0
- package/templates/action-rpg/src/render/shapes.ts +185 -26
- package/templates/action-rpg/src/render/touch-controls.ts +185 -0
- package/templates/action-rpg/src/render/vfx.ts +257 -0
- package/templates/action-rpg/src/render/worldEnvironment.ts +208 -33
- package/templates/action-rpg/src/scenes/Play.ts +43 -6
- package/templates/action-rpg/src/style.css +20 -0
- package/templates/action-rpg/threenative.config.ts +7 -0
- package/templates/defense/.codex/config.toml +4 -0
- package/templates/defense/.cursor/mcp.json +32 -0
- package/templates/defense/.gemini/settings.json +32 -0
- package/templates/defense/.mcp.json +15 -3
- package/templates/defense/.vscode/mcp.json +36 -0
- package/templates/defense/.zed/settings.json +36 -0
- package/templates/defense/AGENTS.md +62 -385
- package/templates/defense/CLAUDE.md +62 -385
- package/templates/defense/opencode.json +41 -0
- package/templates/defense/package.json +7 -7
- package/templates/defense/playtests/performance.playtest.json +24 -7
- package/templates/defense/playtests/pointer-placement.playtest.json +87 -20
- package/templates/defense/playtests/scan.playtest.json +1 -1
- package/templates/defense/playtests/survive.playtest.json +14 -0
- package/templates/defense/src/attackers/Attacker.ts +4 -4
- package/templates/defense/src/board/Route.ts +22 -8
- package/templates/defense/src/conventions.ts +18 -0
- package/templates/defense/src/entities/Player.ts +11 -3
- package/templates/defense/src/game.ts +2 -3
- package/templates/defense/src/physics.ts +9 -39
- package/templates/defense/src/placement/Buildable.ts +4 -4
- package/templates/defense/src/render/camera.ts +9 -3
- package/templates/defense/src/render/loading.ts +12 -2
- package/templates/defense/src/render/materials.ts +9 -0
- package/templates/defense/src/render/palette.ts +12 -5
- package/templates/defense/src/render/postprocessing.ts +21 -58
- package/templates/defense/src/render/quality.ts +170 -0
- package/templates/defense/src/render/shapes.ts +142 -23
- package/templates/defense/src/render/sky.ts +2 -2
- package/templates/defense/src/render/worldEnvironment.ts +208 -33
- package/templates/defense/src/scenes/Boot.ts +2 -2
- package/templates/defense/src/scenes/Defense.ts +13 -6
- package/templates/defense/src/style.css +20 -0
- package/templates/defense/src/towers/Tower.ts +11 -12
- package/templates/defense/src/towers/targeting.ts +1 -1
- package/templates/defense/src/ui/App.tsx +2 -2
- package/templates/defense/threenative.config.ts +7 -0
- package/templates/minimal/.codex/config.toml +4 -0
- package/templates/minimal/.cursor/mcp.json +32 -0
- package/templates/minimal/.gemini/settings.json +32 -0
- package/templates/minimal/.mcp.json +15 -3
- package/templates/minimal/.vscode/mcp.json +36 -0
- package/templates/minimal/.zed/settings.json +36 -0
- package/templates/minimal/AGENTS.md +76 -485
- package/templates/minimal/CLAUDE.md +76 -485
- package/templates/minimal/opencode.json +41 -0
- package/templates/minimal/package.json +6 -6
- package/templates/minimal/playtests/play.playtest.json +2 -1
- package/templates/minimal/playtests/survives.playtest.json +48 -4
- package/templates/minimal/playtests/touch-controls.playtest.json +42 -0
- package/templates/minimal/src/conventions.ts +18 -0
- package/templates/minimal/src/entities/Player.ts +39 -6
- package/templates/minimal/src/main.ts +14 -4
- package/templates/minimal/src/render/materials.ts +7 -0
- package/templates/minimal/src/render/palette.ts +3 -3
- package/templates/minimal/src/render/postprocessing.ts +17 -56
- package/templates/minimal/src/render/quality.ts +162 -0
- package/templates/minimal/src/render/sky.ts +23 -9
- package/templates/minimal/src/render/touch-controls.ts +165 -0
- package/templates/minimal/src/render/worldEnvironment.ts +208 -33
- package/templates/minimal/src/scenes/Play.ts +47 -11
- package/templates/minimal/src/style.css +20 -0
- package/templates/minimal/threenative.config.ts +7 -0
- package/templates/platformer/.codex/config.toml +4 -0
- package/templates/platformer/.cursor/mcp.json +32 -0
- package/templates/platformer/.gemini/settings.json +32 -0
- package/templates/platformer/.mcp.json +15 -3
- package/templates/platformer/.vscode/mcp.json +36 -0
- package/templates/platformer/.zed/settings.json +36 -0
- package/templates/platformer/AGENTS.md +70 -430
- package/templates/platformer/CLAUDE.md +70 -430
- package/templates/platformer/opencode.json +41 -0
- package/templates/platformer/package.json +7 -7
- package/templates/platformer/playtests/oneway.playtest.json +29 -2
- package/templates/platformer/playtests/performance.playtest.json +2 -1
- package/templates/platformer/playtests/survives.playtest.json +31 -0
- package/templates/platformer/playtests/terminal-loop-fail.playtest.json +3 -0
- package/templates/platformer/playtests/touch-controls-web.playtest.json +15 -4
- package/templates/platformer/src/conventions.ts +18 -0
- package/templates/platformer/src/entities/Character.ts +63 -1
- package/templates/platformer/src/game.ts +3 -1
- package/templates/platformer/src/level/Platform.ts +13 -1
- package/templates/platformer/src/render/lighting.ts +7 -4
- package/templates/platformer/src/render/loading.ts +12 -2
- package/templates/platformer/src/render/palette.ts +4 -1
- package/templates/platformer/src/render/postprocessing.ts +32 -57
- package/templates/platformer/src/render/quality.ts +170 -0
- package/templates/platformer/src/render/worldEnvironment.ts +208 -33
- package/templates/platformer/src/scenes/Level.ts +52 -12
- package/templates/platformer/src/style.css +20 -0
- package/templates/platformer/threenative.config.ts +7 -0
- package/templates/puzzle/.codex/config.toml +19 -0
- package/templates/puzzle/.cursor/mcp.json +32 -0
- package/templates/puzzle/.gemini/settings.json +32 -0
- package/templates/puzzle/.mcp.json +32 -0
- package/templates/puzzle/.vscode/mcp.json +36 -0
- package/templates/puzzle/.zed/settings.json +36 -0
- package/templates/puzzle/AGENTS.md +96 -0
- package/templates/puzzle/CLAUDE.md +98 -0
- package/templates/puzzle/README.md +43 -0
- package/templates/puzzle/index.html +12 -0
- package/templates/puzzle/kit.json +7 -0
- package/templates/puzzle/opencode.json +41 -0
- package/templates/puzzle/package.json +50 -0
- package/templates/puzzle/playtests/carry.playtest.json +71 -0
- package/templates/puzzle/playtests/performance.playtest.json +23 -0
- package/templates/puzzle/playtests/survives.playtest.json +51 -0
- package/templates/puzzle/playtests/swing.playtest.json +38 -0
- package/templates/puzzle/public/favicon.svg +5 -0
- package/templates/puzzle/src/conventions.ts +25 -0
- package/templates/puzzle/src/entities/Ball.ts +70 -0
- package/templates/puzzle/src/entities/Crate.ts +76 -0
- package/templates/puzzle/src/entities/Gripper.ts +69 -0
- package/templates/puzzle/src/entities/Pendulum.ts +89 -0
- package/templates/puzzle/src/game.ts +48 -0
- package/templates/puzzle/src/main.ts +15 -0
- package/templates/puzzle/src/physics.ts +19 -0
- package/templates/puzzle/src/render/camera.ts +37 -0
- package/templates/puzzle/src/render/lighting.ts +55 -0
- package/templates/puzzle/src/render/loading.ts +325 -0
- package/templates/puzzle/src/render/materials.ts +28 -0
- package/templates/puzzle/src/render/palette.ts +31 -0
- package/templates/puzzle/src/render/postprocessing.ts +34 -0
- package/templates/puzzle/src/render/quality.ts +170 -0
- package/templates/puzzle/src/render/shapes.ts +134 -0
- package/templates/puzzle/src/render/sky.ts +16 -0
- package/templates/puzzle/src/render/touch-controls.ts +185 -0
- package/templates/puzzle/src/render/worldEnvironment.ts +758 -0
- package/templates/puzzle/src/room.ts +83 -0
- package/templates/puzzle/src/scenes/Boot.ts +12 -0
- package/templates/puzzle/src/scenes/Puzzle.ts +158 -0
- package/templates/puzzle/src/state.ts +30 -0
- package/templates/puzzle/src/style.css +96 -0
- package/templates/puzzle/src/ui/App.tsx +22 -0
- package/templates/puzzle/src/ui/GameUi.tsx +20 -0
- package/templates/puzzle/src/ui/Hud.tsx +57 -0
- package/templates/puzzle/src/ui/Menu.tsx +7 -0
- package/templates/puzzle/src/ui/main.tsx +14 -0
- package/templates/puzzle/tailwind.config.ts +1 -0
- package/templates/puzzle/threenative.config.ts +49 -0
- package/templates/puzzle/tsconfig.json +17 -0
- package/templates/puzzle/vite.config.ts +38 -0
- package/templates/racing/.codex/config.toml +4 -0
- package/templates/racing/.cursor/mcp.json +32 -0
- package/templates/racing/.gemini/settings.json +32 -0
- package/templates/racing/.mcp.json +15 -3
- package/templates/racing/.vscode/mcp.json +36 -0
- package/templates/racing/.zed/settings.json +36 -0
- package/templates/racing/AGENTS.md +63 -379
- package/templates/racing/CLAUDE.md +63 -379
- package/templates/racing/native-playtests/survives.playtest.json +43 -0
- package/templates/racing/opencode.json +41 -0
- package/templates/racing/package.json +8 -7
- package/templates/racing/playtests/performance.playtest.json +24 -7
- package/templates/racing/playtests/survives.playtest.json +36 -4
- package/templates/racing/playtests/touch-controls.playtest.json +41 -0
- package/templates/racing/src/conventions.ts +6 -0
- package/templates/racing/src/entities/RacingCar.ts +16 -4
- package/templates/racing/src/entities/Rival.ts +5 -2
- package/templates/racing/src/render/camera.ts +7 -4
- package/templates/racing/src/render/lighting.ts +22 -13
- package/templates/racing/src/render/loading.ts +12 -2
- package/templates/racing/src/render/materials.ts +54 -4
- package/templates/racing/src/render/palette.ts +23 -6
- package/templates/racing/src/render/postprocessing.ts +21 -58
- package/templates/racing/src/render/quality.ts +170 -0
- package/templates/racing/src/render/shapes.ts +537 -26
- package/templates/racing/src/render/sky.ts +5 -2
- package/templates/racing/src/render/touch-controls.ts +185 -0
- package/templates/racing/src/render/worldEnvironment.ts +208 -33
- package/templates/racing/src/scenes/Race.ts +17 -2
- package/templates/racing/src/style.css +20 -0
- package/templates/racing/src/track/Track.ts +270 -31
- package/templates/racing/threenative.config.ts +7 -0
- package/templates/runner/.codex/config.toml +19 -0
- package/templates/runner/.cursor/mcp.json +32 -0
- package/templates/runner/.gemini/settings.json +32 -0
- package/templates/runner/.mcp.json +32 -0
- package/templates/runner/.vscode/mcp.json +36 -0
- package/templates/runner/.zed/settings.json +36 -0
- package/templates/runner/AGENTS.md +96 -0
- package/templates/runner/CLAUDE.md +98 -0
- package/templates/runner/README.md +43 -0
- package/templates/runner/index.html +12 -0
- package/templates/runner/kit.json +7 -0
- package/templates/runner/opencode.json +41 -0
- package/templates/runner/package.json +50 -0
- package/templates/runner/playtests/performance.playtest.json +23 -0
- package/templates/runner/playtests/streams.playtest.json +38 -0
- package/templates/runner/playtests/survives.playtest.json +51 -0
- package/templates/runner/public/favicon.svg +5 -0
- package/templates/runner/src/conventions.ts +24 -0
- package/templates/runner/src/entities/Runner.ts +135 -0
- package/templates/runner/src/game.ts +50 -0
- package/templates/runner/src/main.ts +15 -0
- package/templates/runner/src/physics.ts +13 -0
- package/templates/runner/src/render/camera.ts +39 -0
- package/templates/runner/src/render/dust.ts +131 -0
- package/templates/runner/src/render/lighting.ts +57 -0
- package/templates/runner/src/render/loading.ts +325 -0
- package/templates/runner/src/render/materials.ts +27 -0
- package/templates/runner/src/render/palette.ts +30 -0
- package/templates/runner/src/render/postprocessing.ts +34 -0
- package/templates/runner/src/render/quality.ts +170 -0
- package/templates/runner/src/render/shapes.ts +68 -0
- package/templates/runner/src/render/sky.ts +51 -0
- package/templates/runner/src/render/touch-controls.ts +185 -0
- package/templates/runner/src/render/worldEnvironment.ts +758 -0
- package/templates/runner/src/scenes/Boot.ts +12 -0
- package/templates/runner/src/scenes/Run.ts +142 -0
- package/templates/runner/src/state.ts +29 -0
- package/templates/runner/src/style.css +96 -0
- package/templates/runner/src/track.ts +176 -0
- package/templates/runner/src/ui/App.tsx +22 -0
- package/templates/runner/src/ui/GameUi.tsx +20 -0
- package/templates/runner/src/ui/Hud.tsx +55 -0
- package/templates/runner/src/ui/Menu.tsx +7 -0
- package/templates/runner/src/ui/main.tsx +14 -0
- package/templates/runner/tailwind.config.ts +1 -0
- package/templates/runner/threenative.config.ts +49 -0
- package/templates/runner/tsconfig.json +17 -0
- package/templates/runner/vite.config.ts +38 -0
- package/templates/sailing/.codex/config.toml +4 -0
- package/templates/sailing/.cursor/mcp.json +32 -0
- package/templates/sailing/.gemini/settings.json +32 -0
- package/templates/sailing/.mcp.json +15 -3
- package/templates/sailing/.vscode/mcp.json +36 -0
- package/templates/sailing/.zed/settings.json +36 -0
- package/templates/sailing/AGENTS.md +62 -355
- package/templates/sailing/CLAUDE.md +62 -355
- package/templates/sailing/README.md +12 -9
- package/templates/sailing/native-playtests/float.playtest.json +55 -0
- package/templates/sailing/native-playtests/survives.playtest.json +20 -3
- package/templates/sailing/opencode.json +41 -0
- package/templates/sailing/package.json +8 -8
- package/templates/sailing/playtests/float-after-the-run-ends.playtest.json +75 -0
- package/templates/sailing/playtests/float.playtest.json +59 -0
- package/templates/sailing/playtests/performance.playtest.json +21 -6
- package/templates/sailing/playtests/survives.playtest.json +8 -0
- package/templates/sailing/playtests/touch-controls.playtest.json +48 -0
- package/templates/sailing/src/conventions.ts +8 -0
- package/templates/sailing/src/entities/Ship.ts +150 -13
- package/templates/sailing/src/render/camera.ts +15 -8
- package/templates/sailing/src/render/lighting.ts +10 -5
- package/templates/sailing/src/render/loading.ts +12 -2
- package/templates/sailing/src/render/materials.ts +24 -8
- package/templates/sailing/src/render/ocean.ts +179 -0
- package/templates/sailing/src/render/palette.ts +14 -21
- package/templates/sailing/src/render/postprocessing.ts +23 -22
- package/templates/sailing/src/render/props.ts +584 -34
- package/templates/sailing/src/render/quality.ts +140 -0
- package/templates/sailing/src/render/sky.ts +8 -3
- package/templates/sailing/src/render/touch-controls.ts +142 -0
- package/templates/sailing/src/render/worldEnvironment.ts +206 -38
- package/templates/sailing/src/scenes/Sailing.ts +43 -16
- package/templates/sailing/src/style.css +20 -0
- package/templates/sailing/threenative.config.ts +7 -1
- package/templates/shooter/.codex/config.toml +4 -0
- package/templates/shooter/.cursor/mcp.json +32 -0
- package/templates/shooter/.gemini/settings.json +32 -0
- package/templates/shooter/.mcp.json +15 -3
- package/templates/shooter/.vscode/mcp.json +36 -0
- package/templates/shooter/.zed/settings.json +36 -0
- package/templates/shooter/AGENTS.md +76 -415
- package/templates/shooter/CLAUDE.md +76 -415
- package/templates/shooter/kit.json +2 -2
- package/templates/shooter/opencode.json +41 -0
- package/templates/shooter/package.json +7 -7
- package/templates/shooter/playtests/combat.playtest.json +48 -0
- package/templates/shooter/playtests/input-control.playtest.json +165 -35
- package/templates/shooter/playtests/per-item.playtest.json +3 -3
- package/templates/shooter/playtests/performance.playtest.json +24 -7
- package/templates/shooter/playtests/shooter.playtest.json +13 -7
- package/templates/shooter/playtests/survives.playtest.json +27 -0
- package/templates/shooter/playtests/touch-controls.playtest.json +42 -0
- package/templates/shooter/playtests/weapon-cycle.playtest.json +164 -0
- package/templates/shooter/src/combat/damage.ts +1 -2
- package/templates/shooter/src/conventions.ts +51 -0
- package/templates/shooter/src/entities/Player.ts +235 -18
- package/templates/shooter/src/entities/Target.ts +2 -2
- package/templates/shooter/src/game.ts +13 -4
- package/templates/shooter/src/render/camera.ts +49 -39
- package/templates/shooter/src/render/decals.ts +211 -0
- package/templates/shooter/src/render/lighting.ts +7 -3
- package/templates/shooter/src/render/loading.ts +12 -2
- package/templates/shooter/src/render/materials.ts +56 -3
- package/templates/shooter/src/render/palette.ts +6 -3
- package/templates/shooter/src/render/postprocessing.ts +21 -58
- package/templates/shooter/src/render/quality.ts +170 -0
- package/templates/shooter/src/render/scale.ts +22 -0
- package/templates/shooter/src/render/shapes.ts +343 -62
- package/templates/shooter/src/render/sky.ts +5 -1
- package/templates/shooter/src/render/touch-controls.ts +305 -0
- package/templates/shooter/src/render/ui.css +85 -0
- package/templates/shooter/src/render/ui.ts +19 -3
- package/templates/shooter/src/render/vfx.ts +215 -0
- package/templates/shooter/src/render/worldEnvironment.ts +208 -33
- package/templates/shooter/src/scenes/Play.ts +171 -56
- package/templates/shooter/src/state.ts +5 -0
- package/templates/shooter/src/style.css +20 -0
- package/templates/shooter/src/ui/Crosshair.tsx +25 -0
- package/templates/shooter/src/ui/GameUi.tsx +2 -0
- package/templates/shooter/src/ui/Hud.tsx +7 -1
- package/templates/shooter/src/weapons/Hitscan.ts +3 -4
- package/templates/shooter/src/weapons/Projectile.ts +8 -3
- package/templates/shooter/src/weapons/Viewmodel.ts +275 -0
- package/templates/shooter/threenative.config.ts +7 -0
- package/templates/starter/.codex/config.toml +4 -0
- package/templates/starter/.cursor/mcp.json +32 -0
- package/templates/starter/.gemini/settings.json +32 -0
- package/templates/starter/.mcp.json +15 -3
- package/templates/starter/.vscode/mcp.json +36 -0
- package/templates/starter/.zed/settings.json +36 -0
- package/templates/starter/AGENTS.md +70 -527
- package/templates/starter/CLAUDE.md +70 -527
- package/templates/starter/native-playtests/render-chain.playtest.json +73 -4
- package/templates/starter/opencode.json +41 -0
- package/templates/starter/package.json +7 -7
- package/templates/starter/playtests/boot-failure.playtest.json +45 -0
- package/templates/starter/playtests/look.playtest.json +110 -6
- package/templates/starter/playtests/play.playtest.json +3 -2
- package/templates/starter/playtests/survives.playtest.json +21 -0
- package/templates/starter/playtests/touch-controls.playtest.json +42 -0
- package/templates/starter/src/conventions.ts +18 -0
- package/templates/starter/src/entities/Goal.ts +18 -3
- package/templates/starter/src/entities/Player.ts +72 -9
- package/templates/starter/src/game.ts +2 -0
- package/templates/starter/src/render/adaptiveQuality.ts +195 -0
- package/templates/starter/src/render/camera.ts +1 -1
- package/templates/starter/src/render/coast.ts +199 -0
- package/templates/starter/src/render/hero.ts +88 -0
- package/templates/starter/src/render/implicitSurface.ts +199 -0
- package/templates/starter/src/render/kuwahara.ts +174 -0
- package/templates/starter/src/render/lighting.ts +4 -4
- package/templates/starter/src/render/loading.ts +12 -2
- package/templates/starter/src/render/materials.ts +25 -6
- package/templates/starter/src/render/outline.ts +141 -0
- package/templates/starter/src/render/painterly.ts +86 -0
- package/templates/starter/src/render/palette.ts +15 -6
- package/templates/starter/src/render/postprocessing.ts +87 -36
- package/templates/starter/src/render/quality.ts +185 -0
- package/templates/starter/src/render/rockRidge.ts +198 -0
- package/templates/starter/src/render/rockRidge.worker.ts +77 -0
- package/templates/starter/src/render/scenery.ts +16 -59
- package/templates/starter/src/render/textureLifetime.ts +53 -0
- package/templates/starter/src/render/touch-controls.ts +165 -0
- package/templates/starter/src/render/water.ts +38 -0
- package/templates/starter/src/render/watercolor.ts +85 -0
- package/templates/starter/src/render/worldEnvironment.ts +208 -33
- package/templates/starter/src/scenes/Play.ts +103 -16
- package/templates/starter/src/style.css +27 -7
- package/templates/starter/threenative.config.ts +7 -7
- package/agent-docs/asset-mcp-loop.md +0 -33
- package/agent-docs/ctx-surface.md +0 -69
- package/agent-docs/engine-capabilities.md +0 -4
- package/agent-docs/framework-blocks-you.md +0 -60
- package/agent-docs/look-at-it-and-budget-the-look.md +0 -27
- package/agent-docs/performance-default.md +0 -42
- package/agent-docs/pixel-budget.md +0 -20
- package/agent-docs/playtest-fail-closed.md +0 -23
- package/agent-docs/sculpt-loop.md +0 -16
- package/templates/action-rpg/src/physics.ts +0 -40
- package/templates/defense/public/icon.png +0 -0
- package/templates/minimal/public/icon.png +0 -0
- package/templates/platformer/public/icon.png +0 -0
- package/templates/racing/public/icon.png +0 -0
- package/templates/sailing/public/icon.png +0 -0
- package/templates/sailing/src/render/water-material.ts +0 -14
- package/templates/sailing/src/render/water-shaders.ts +0 -12
- package/templates/sailing/src/render/wave-nodes.ts +0 -10
- package/templates/shooter/public/icon.png +0 -0
- package/templates/shooter/src/physics.ts +0 -49
- package/templates/starter/public/icon.png +0 -0
- /package/{templates/action-rpg/public → template-assets}/icon.png +0 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ pnpm create threenative my-game
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
The default template is `starter`. Choose `minimal`, `platformer`, `action-rpg`, `defense`,
|
|
10
|
-
`racing`, or `shooter` for a different starting point:
|
|
10
|
+
`racing`, `sailing`, or `shooter` for a different starting point:
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
13
|
pnpm create threenative my-game --template minimal
|
|
@@ -16,9 +16,60 @@ pnpm create threenative my-game --template platformer
|
|
|
16
16
|
pnpm create threenative my-game --template action-rpg
|
|
17
17
|
pnpm create threenative my-game --template defense
|
|
18
18
|
pnpm create threenative my-game --template racing
|
|
19
|
+
pnpm create threenative my-game --template sailing
|
|
19
20
|
pnpm create threenative my-game --template shooter
|
|
20
21
|
```
|
|
21
22
|
|
|
23
|
+
Prerequisites are Node.js 20.19.0 or newer and pnpm 10 or newer. npm is also supported for the
|
|
24
|
+
same clean-room workflow:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npm create threenative@latest my-game -- --template starter
|
|
28
|
+
cd my-game
|
|
29
|
+
npm install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The published package declares those Node and pnpm minimums. Its asset pipeline reaches `sharp`
|
|
33
|
+
through `@gltf-transform/functions` → `ndarray-pixels` → `sharp`; `@threenative/core` also brings
|
|
34
|
+
the asset MCP's `sharp` copy. On a machine whose system has an incompatible global libvips, let
|
|
35
|
+
sharp use its supported prebuilt binary instead of changing the project or bypassing install
|
|
36
|
+
scripts:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install
|
|
40
|
+
SHARP_IGNORE_GLOBAL_LIBVIPS=1 pnpm install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This is an environment repair, not a default flag. Do not use `--ignore-scripts`: core's
|
|
44
|
+
postinstall wires the project-scoped MCP configuration. The registry verification records the
|
|
45
|
+
Node-version warning from transitive packages and runs the dependency audit separately; neither is
|
|
46
|
+
hidden by the install recipe.
|
|
47
|
+
|
|
22
48
|
Inside a generated project, `npx threenative doctor --text` reports what would break a build:
|
|
23
49
|
missing or version-mismatched `@threenative` packages, a portable entry with no default game
|
|
24
|
-
export, no web entry, no scenario, no capability search for your agent.
|
|
50
|
+
export, no web entry, no scenario, no capability search for your agent. Naming the build you
|
|
51
|
+
intend — `--target web|desktop|android|ios`, optionally with `--mode debug|release` — makes that
|
|
52
|
+
build's prerequisites decide the verdict instead of warning beside "available".
|
|
53
|
+
|
|
54
|
+
Tool discovery reports four separate facts, because three of them are routinely mistaken for the
|
|
55
|
+
fourth:
|
|
56
|
+
|
|
57
|
+
| Check | The fact it reports | What it does **not** claim |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| `capability search` | each configured MCP server starts and advertises tools | that any application its tools drive is installed |
|
|
60
|
+
| `editor activation` | which project-scoped host configs carry the servers | that an editor loaded one — that is not observable from a CLI |
|
|
61
|
+
| `model conversion` | Blender is on this machine and the server is up | that a conversion has ever run |
|
|
62
|
+
| `model conversion` detail | what the bake manifest records as converted | anything, when no manifest exists |
|
|
63
|
+
|
|
64
|
+
Every repair is one you run in your own game, and doctor performs none of them:
|
|
65
|
+
|
|
66
|
+
- **A host config is unreadable or missing servers.** Doctor names the exact file and stops. The
|
|
67
|
+
file is yours: reinstall `@threenative/core` to rewrite the configs its postinstall owns, or fix
|
|
68
|
+
the named file by hand. Doctor never edits it, so a config holding servers of your own survives.
|
|
69
|
+
- **Your host is not listed.** Windsurf, Cline, Amp and the JetBrains assistants read a
|
|
70
|
+
machine-wide config only. Installing a library into one game must never edit a file that governs
|
|
71
|
+
every other project on your machine, so those are wired by hand, once, in that host's own
|
|
72
|
+
settings.
|
|
73
|
+
- **Conversion is unavailable.** Install Blender with the command doctor prints. A project with no
|
|
74
|
+
`.fbx`, `.blend`, `.obj` or `.dae` in it needs none, and stays green without it — the hard
|
|
75
|
+
failure lives in the build, where the source is actually read.
|
|
@@ -122,14 +122,14 @@ Proves aerodynamic force telemetry and signed control-surface delivery for a fli
|
|
|
122
122
|
|
|
123
123
|
### `visual`
|
|
124
124
|
|
|
125
|
-
Proves screenshot change, populated regions, and sustained projected entity visibility. **Use when** that is the thing the scenario must prove.
|
|
125
|
+
Proves screenshot change, populated coordinate or DOM element-bound regions, dark-pixel bounds, and sustained projected entity visibility. **Use when** that is the thing the scenario must prove.
|
|
126
126
|
|
|
127
127
|
- **Supported on:** web · **Requires:** browser.screenshot
|
|
128
128
|
|
|
129
129
|
| Field | Type | Required |
|
|
130
130
|
| --- | --- | --- |
|
|
131
131
|
| `frameDiff` | { baselineImage?: project-relative PNG, minChangedPixelRatio?: number, maxChangedPixelRatio?: number } | no |
|
|
132
|
-
| `region` | { x: number, y: number, width: number, height: number, minNonblankPixelRatio?: number, minDarkPixelRatio?: number, maxLuminance?: number } | no |
|
|
132
|
+
| `region` | static bounds { x: number, y: number, width: number, height: number, minNonblankPixelRatio?: number, maxDarkPixelRatio?: number, minDarkPixelRatio?: number, maxLuminance?: number } or element bounds { element: { id?: string, selector?: string }, minNonblankPixelRatio?: number, maxDarkPixelRatio?: number, minDarkPixelRatio?: number, maxLuminance?: number } | no |
|
|
133
133
|
| `entityVisible` | { entity: string, minProjectedPixels: number, throughoutFrames?: boolean } | no |
|
|
134
134
|
|
|
135
135
|
|
|
@@ -145,6 +145,12 @@ Proves screenshot change, populated regions, and sustained projected entity visi
|
|
|
145
145
|
"entity": "board.e4",
|
|
146
146
|
"minProjectedPixels": 20,
|
|
147
147
|
"throughoutFrames": true
|
|
148
|
+
},
|
|
149
|
+
"region": {
|
|
150
|
+
"element": {
|
|
151
|
+
"id": "error"
|
|
152
|
+
},
|
|
153
|
+
"minNonblankPixelRatio": 0.002
|
|
148
154
|
}
|
|
149
155
|
}
|
|
150
156
|
]
|
|
@@ -360,7 +366,7 @@ Proves an observed entity's final runtime-owned state-machine state. **Use when*
|
|
|
360
366
|
|
|
361
367
|
Proves retained UI/HUD text or values after the scenario. **Use when** that is the thing the scenario must prove.
|
|
362
368
|
|
|
363
|
-
- **Supported on:** web · **Requires:**
|
|
369
|
+
- **Supported on:** web · **Requires:** browser.dom
|
|
364
370
|
|
|
365
371
|
| Field | Type | Required |
|
|
366
372
|
| --- | --- | --- |
|
|
@@ -372,6 +378,7 @@ Proves retained UI/HUD text or values after the scenario. **Use when** that is t
|
|
|
372
378
|
| `textIncludes` | string | no |
|
|
373
379
|
| `changed` | boolean | no |
|
|
374
380
|
| `allowTrivial` | triviality reason | no |
|
|
381
|
+
| `visible` | boolean | no |
|
|
375
382
|
|
|
376
383
|
|
|
377
384
|
```json
|
|
@@ -469,6 +476,31 @@ Proves a live render sample exists and optionally bounds frame time, an fps floo
|
|
|
469
476
|
}
|
|
470
477
|
```
|
|
471
478
|
|
|
479
|
+
### `parity`
|
|
480
|
+
|
|
481
|
+
PRD-222 Tier 2: proves the fps ratio of a parity pair — the same scene on the same device, once in the browser and once native. Lives in the second run and names the first run's saved report; refuses a pair whose halves ran on different devices, a thermally confounded half, or a missing series on either side. **Use when** that is the thing the scenario must prove.
|
|
482
|
+
|
|
483
|
+
- **Supported on:** web, desktop, bevy · **Requires:** runtime.performance
|
|
484
|
+
|
|
485
|
+
| Field | Type | Required |
|
|
486
|
+
| --- | --- | --- |
|
|
487
|
+
| `minFpsRatio` | positive number | no |
|
|
488
|
+
| `minRenderParity` | positive number | no |
|
|
489
|
+
| `referenceReport` | non-empty string | no |
|
|
490
|
+
| `referenceSide` | 'browser' or 'native' | no |
|
|
491
|
+
| `reference` | object | no |
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
```json
|
|
495
|
+
{
|
|
496
|
+
"parity": {
|
|
497
|
+
"minFpsRatio": 0.85,
|
|
498
|
+
"referenceReport": "reports/native.json",
|
|
499
|
+
"referenceSide": "native"
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
472
504
|
### `visibility`
|
|
473
505
|
|
|
474
506
|
Proves projected entity visibility in the viewport. **Use when** that is the thing the scenario must prove.
|
|
@@ -611,6 +643,8 @@ Proves animation evidence appeared in the effect log or runtime observation. **U
|
|
|
611
643
|
| `entered` | boolean | no |
|
|
612
644
|
| `advancedFrames` | number | no |
|
|
613
645
|
| `finished` | boolean | no |
|
|
646
|
+
| `maxFootSlide` | number | no |
|
|
647
|
+
| `strideSynced` | boolean | no |
|
|
614
648
|
| `allowTrivial` | triviality reason | no |
|
|
615
649
|
|
|
616
650
|
|
|
@@ -628,15 +662,132 @@ Proves animation evidence appeared in the effect log or runtime observation. **U
|
|
|
628
662
|
}
|
|
629
663
|
```
|
|
630
664
|
|
|
665
|
+
### `scene`
|
|
666
|
+
|
|
667
|
+
Bounds the room the game is played in — the lights, materials, fog and camera framing the renderer was handed. Fails closed on a bridge that does not report the scene. **Use when** that is the thing the scenario must prove.
|
|
668
|
+
|
|
669
|
+
- **Supported on:** web, desktop, bevy · **Requires:** scene.observe
|
|
670
|
+
|
|
671
|
+
| Field | Type | Required |
|
|
672
|
+
| --- | --- | --- |
|
|
673
|
+
| `cameraClearsScene` | boolean | no |
|
|
674
|
+
| `fogClearsScene` | boolean | no |
|
|
675
|
+
| `litMaterialsAreLit` | boolean | no |
|
|
676
|
+
| `minVisibleLights` | number | no |
|
|
677
|
+
| `allowTrivial` | triviality reason | no |
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
```json
|
|
681
|
+
{
|
|
682
|
+
"scene": {
|
|
683
|
+
"litMaterialsAreLit": true,
|
|
684
|
+
"minVisibleLights": 1
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### `sceneNodes`
|
|
690
|
+
|
|
691
|
+
Bounds on named nodes of the scene graph — where an object is, whether it is on screen, whether its textures loaded. **Use when** that is the thing the scenario must prove.
|
|
692
|
+
|
|
693
|
+
- **Supported on:** web, desktop, bevy · **Requires:** scene.nodes
|
|
694
|
+
|
|
695
|
+
| Field | Type | Required |
|
|
696
|
+
| --- | --- | --- |
|
|
697
|
+
| `select` | object | no |
|
|
698
|
+
| `visible` | boolean | no |
|
|
699
|
+
| `inFrustum` | boolean | no |
|
|
700
|
+
| `texturesLoaded` | boolean | no |
|
|
701
|
+
| `animated` | boolean | no |
|
|
702
|
+
| `minCount` | number | no |
|
|
703
|
+
| `maxCount` | number | no |
|
|
704
|
+
| `minTriangles` | number | no |
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
```json
|
|
708
|
+
{
|
|
709
|
+
"sceneNodes": [
|
|
710
|
+
{
|
|
711
|
+
"inFrustum": true,
|
|
712
|
+
"select": {
|
|
713
|
+
"nameContains": "crate"
|
|
714
|
+
},
|
|
715
|
+
"texturesLoaded": true,
|
|
716
|
+
"visible": true
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
}
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
### `causedBy`
|
|
723
|
+
|
|
724
|
+
Relates a tick-stamped effect to the tick-stamped cause that must precede it — the 'because' a terminal state needs. **Use when** that is the thing the scenario must prove.
|
|
725
|
+
|
|
726
|
+
- **Supported on:** web, desktop, bevy · **Requires:** runtime.transitions
|
|
727
|
+
|
|
728
|
+
| Field | Type | Required |
|
|
729
|
+
| --- | --- | --- |
|
|
730
|
+
| `cause` | object | no |
|
|
731
|
+
| `effect` | object | no |
|
|
732
|
+
| `neverBefore` | boolean | no |
|
|
733
|
+
| `withinTicks` | number | no |
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
```json
|
|
737
|
+
{
|
|
738
|
+
"causedBy": [
|
|
739
|
+
{
|
|
740
|
+
"cause": {
|
|
741
|
+
"contact": {
|
|
742
|
+
"entity": "player",
|
|
743
|
+
"kind": "trigger",
|
|
744
|
+
"with": "seal"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"effect": {
|
|
748
|
+
"becomes": "won",
|
|
749
|
+
"path": "state.status"
|
|
750
|
+
},
|
|
751
|
+
"neverBefore": true,
|
|
752
|
+
"withinTicks": 4
|
|
753
|
+
}
|
|
754
|
+
]
|
|
755
|
+
}
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
### `startup`
|
|
759
|
+
|
|
760
|
+
Bounds when the application's startup milestones happened: the world entered, first-use compilation settled, readiness reached — in milliseconds since navigation, from the runtime's own startup timeline. **Use when** that is the thing the scenario must prove.
|
|
761
|
+
|
|
762
|
+
- **Supported on:** web, desktop, bevy · **Requires:** runtime.startup
|
|
763
|
+
|
|
764
|
+
| Field | Type | Required |
|
|
765
|
+
| --- | --- | --- |
|
|
766
|
+
| `maxEnteredMs` | number | no |
|
|
767
|
+
| `maxCompileSettledMs` | number | no |
|
|
768
|
+
| `maxReadyMs` | number | no |
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
```json
|
|
772
|
+
{
|
|
773
|
+
"startup": {
|
|
774
|
+
"maxEnteredMs": 2500,
|
|
775
|
+
"maxReadyMs": 8000
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
```
|
|
779
|
+
|
|
631
780
|
### `renderChain`
|
|
632
781
|
|
|
633
|
-
Proves the render chain reports
|
|
782
|
+
Proves the render chain reports its quality tier, authored stage ids/order, graph-output changes for named stages, and, when asserted, a bounded temporal-history rejection fraction. **Use when** that is the thing the scenario must prove.
|
|
634
783
|
|
|
635
784
|
- **Supported on:** web, desktop, bevy · **Requires:** runtime.renderChain
|
|
636
785
|
|
|
637
786
|
| Field | Type | Required |
|
|
638
787
|
| --- | --- | --- |
|
|
639
788
|
| `tier` | string | no |
|
|
789
|
+
| `stages` | object | no |
|
|
790
|
+
| `contributions` | object | no |
|
|
640
791
|
| `velocity` | object | no |
|
|
641
792
|
|
|
642
793
|
|
|
@@ -644,8 +795,24 @@ Proves the render chain reports the requested quality tier and, when asserted, a
|
|
|
644
795
|
{
|
|
645
796
|
"renderChain": {
|
|
646
797
|
"tier": "high",
|
|
647
|
-
"
|
|
648
|
-
"
|
|
798
|
+
"stages": {
|
|
799
|
+
"includes": [
|
|
800
|
+
"outline",
|
|
801
|
+
"kuwahara",
|
|
802
|
+
"watercolor"
|
|
803
|
+
],
|
|
804
|
+
"order": [
|
|
805
|
+
"outline",
|
|
806
|
+
"kuwahara",
|
|
807
|
+
"watercolor"
|
|
808
|
+
]
|
|
809
|
+
},
|
|
810
|
+
"contributions": {
|
|
811
|
+
"graphOutputChanged": [
|
|
812
|
+
"outline",
|
|
813
|
+
"kuwahara",
|
|
814
|
+
"watercolor"
|
|
815
|
+
]
|
|
649
816
|
}
|
|
650
817
|
}
|
|
651
818
|
}
|