create-aura3d 3.0.1 → 4.0.0
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 +1 -1
- package/dist/agent-skills.d.ts +38 -0
- package/dist/agent-skills.d.ts.map +1 -0
- package/dist/agent-skills.js +103 -0
- package/dist/agent-skills.js.map +1 -0
- package/dist/cli.js +32 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -10
- package/dist/index.js.map +1 -1
- package/dist/showcase-spec-artifacts.d.ts +1 -1
- package/dist/showcase-spec-game-geometry-extractor.js +8 -11
- package/dist/showcase-spec-game-geometry-extractor.js.map +1 -1
- package/dist/template-hdri.d.ts +12 -0
- package/dist/template-hdri.d.ts.map +1 -0
- package/dist/template-hdri.js +49 -0
- package/dist/template-hdri.js.map +1 -0
- package/hdri/ATTRIBUTION.md +8 -0
- package/hdri/autumn_field_puresky_1k.hdr +0 -0
- package/hdri/kloppenheim_06_puresky_1k.hdr +0 -0
- package/hdri/night-2k.hdr +0 -0
- package/hdri/studio_small_08_1k.hdr +0 -0
- package/package.json +14 -10
- package/skills/agent-files/AGENTS.md +3 -0
- package/skills/aura3d-animation-studio/SKILL.md +153 -0
- package/skills/aura3d-animation-studio/references/shot-looks.md +26 -0
- package/skills/aura3d-art-direction/SKILL.md +84 -0
- package/skills/aura3d-art-direction/references/failure-gallery.md +64 -0
- package/skills/aura3d-art-direction/references/framing-and-shots.md +45 -0
- package/skills/aura3d-art-direction/references/look-recipes.md +32 -0
- package/skills/aura3d-art-direction/references/quality-bar.md +103 -0
- package/skills/aura3d-art-direction/references/reference-frames.md +82 -0
- package/skills/aura3d-assets/SKILL.md +132 -0
- package/skills/aura3d-assets/references/preview-under-look.md +26 -0
- package/skills/aura3d-browser-game/SKILL.md +127 -0
- package/skills/aura3d-browser-game/references/genre-looks.md +52 -0
- package/skills/aura3d-character-animation/SKILL.md +129 -0
- package/skills/aura3d-character-animation/references/stage-and-lighting.md +31 -0
- package/skills/aura3d-core/SKILL.md +121 -0
- package/skills/aura3d-core/references/boundaries.md +91 -0
- package/skills/aura3d-evidence-review/SKILL.md +106 -0
- package/skills/aura3d-game-art/SKILL.md +118 -0
- package/skills/aura3d-game-art/references/sheet-check.mjs +58 -0
- package/skills/aura3d-game-art/references/sprite-palettes.md +25 -0
- package/skills/aura3d-materials-environments/SKILL.md +139 -0
- package/skills/aura3d-performance/SKILL.md +97 -0
- package/skills/aura3d-retexture/SKILL.md +115 -0
- package/skills/aura3d-retexture/references/geometry-hash.mjs +89 -0
- package/skills/aura3d-scene-authoring/SKILL.md +132 -0
- package/skills/aura3d-scene-authoring/references/look-by-family.md +28 -0
- package/skills/aura3d-threejs-migration/SKILL.md +125 -0
- package/skills/aura3d-threejs-migration/references/look-mapping.md +27 -0
- package/skills/llms.txt +117 -0
- package/skills/manifest.json +163 -0
- package/skills/meshy-cli/SKILL.md +133 -0
- package/templates/animation-channel/.claude/CLAUDE.md +3 -0
- package/templates/animation-channel/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/animation-channel/AGENTS.md +3 -0
- package/templates/animation-channel/package.json +3 -2
- package/templates/animation-channel/src/main.ts +5 -6
- package/templates/animation-channel/src/render-plan.ts +5 -3
- package/templates/animation-channel/tests/look-floor.ts +270 -0
- package/templates/animation-channel/tests/route-health.spec.ts +1 -1
- package/templates/animation-channel/tests/screenshot.spec.ts +10 -5
- package/templates/animation-channel/vite.config.ts +7 -0
- package/templates/animation-studio/.claude/CLAUDE.md +3 -0
- package/templates/animation-studio/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/animation-studio/AGENTS.md +2 -70
- package/templates/animation-studio/package.json +4 -3
- package/templates/animation-studio/scripts/build-clip-library.ts +6 -5
- package/templates/animation-studio/scripts/resolve-asset.ts +7 -4
- package/templates/animation-studio/src/scene-player.ts +6 -6
- package/templates/animation-studio/src/set-templates.ts +13 -9
- package/templates/animation-studio/tests/look-floor.ts +270 -0
- package/templates/animation-studio/tests/route-health.spec.ts +2 -2
- package/templates/animation-studio/tests/screenshot.spec.ts +18 -10
- package/templates/animation-studio/vite.config.ts +2 -0
- package/templates/architecture-interior/.claude/CLAUDE.md +3 -0
- package/templates/architecture-interior/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/architecture-interior/AGENTS.md +3 -0
- package/templates/architecture-interior/README.md +16 -0
- package/templates/architecture-interior/aura.assets.json +24 -0
- package/templates/architecture-interior/package.json +24 -0
- package/templates/architecture-interior/public/aura-assets/kenneyModularDungeonRoomSmall.a7e74a5f.glb +0 -0
- package/templates/architecture-interior/src/aura-assets.ts +16 -0
- package/templates/architecture-interior/src/main.ts +23 -0
- package/templates/architecture-interior/tests/look-floor.ts +270 -0
- package/templates/{three-compat-architecture-interior → architecture-interior}/tests/route-health.spec.ts +3 -3
- package/templates/architecture-interior/tests/screenshot.spec.ts +21 -0
- package/templates/architecture-interior/vite.config.ts +7 -0
- package/templates/arena-shooter/.claude/CLAUDE.md +3 -0
- package/templates/arena-shooter/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/arena-shooter/AGENTS.md +3 -0
- package/templates/arena-shooter/README.md +45 -0
- package/templates/arena-shooter/aura.assets.json +62 -0
- package/templates/arena-shooter/index.html +32 -0
- package/templates/arena-shooter/package.json +23 -0
- package/templates/arena-shooter/playwright.config.ts +15 -0
- package/templates/arena-shooter/public/aura-assets/craft_miner.de323205.glb +0 -0
- package/templates/arena-shooter/public/aura-assets/craft_racer.bce8cb3d.glb +0 -0
- package/templates/arena-shooter/public/aura-assets/meteor_detailed.f30379ab.glb +0 -0
- package/templates/arena-shooter/src/aura-assets.ts +56 -0
- package/templates/arena-shooter/src/main.ts +616 -0
- package/templates/arena-shooter/tests/look-floor.ts +270 -0
- package/templates/arena-shooter/tests/playable.spec.ts +56 -0
- package/templates/arena-shooter/tests/route-health.spec.ts +87 -0
- package/templates/arena-shooter/tests/screenshot.spec.ts +22 -0
- package/templates/arena-shooter/tsconfig.json +15 -0
- package/templates/arena-shooter/vite.config.ts +7 -0
- package/templates/asset-inspector/.claude/CLAUDE.md +3 -0
- package/templates/asset-inspector/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/asset-inspector/AGENTS.md +3 -0
- package/templates/asset-inspector/README.md +13 -0
- package/templates/asset-inspector/aura.assets.json +24 -0
- package/templates/{three-compat-custom-threejs-migration → asset-inspector}/package.json +5 -3
- package/templates/asset-inspector/public/aura-assets/kenneyCarKitSedanSports.2889c428.glb +0 -0
- package/templates/asset-inspector/src/aura-assets.ts +16 -0
- package/templates/asset-inspector/src/main.ts +23 -0
- package/templates/asset-inspector/tests/look-floor.ts +270 -0
- package/templates/{three-compat-character-viewer → asset-inspector}/tests/route-health.spec.ts +3 -3
- package/templates/asset-inspector/tests/screenshot.spec.ts +21 -0
- package/templates/asset-inspector/vite.config.ts +7 -0
- package/templates/character-controller/.claude/CLAUDE.md +3 -0
- package/templates/character-controller/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/character-controller/AGENTS.md +3 -0
- package/templates/character-controller/README.md +7 -1
- package/templates/character-controller/aura.assets.json +29 -22
- package/templates/character-controller/index.html +4 -5
- package/templates/character-controller/package.json +5 -4
- package/templates/character-controller/public/aura-assets/auraclash-player-rig.glb +0 -0
- package/templates/character-controller/src/aura-assets.ts +25 -7
- package/templates/character-controller/src/main.ts +190 -47
- package/templates/character-controller/tests/certified-rig.spec.ts +2 -2
- package/templates/character-controller/tests/look-floor.ts +270 -0
- package/templates/character-controller/tests/route-health.spec.ts +31 -6
- package/templates/character-controller/tests/screenshot.spec.ts +17 -5
- package/templates/character-controller/vite.config.ts +7 -0
- package/templates/character-viewer/.claude/CLAUDE.md +3 -0
- package/templates/character-viewer/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/character-viewer/AGENTS.md +3 -0
- package/templates/character-viewer/README.md +13 -0
- package/templates/character-viewer/aura.assets.json +24 -0
- package/templates/{three-compat-asset-inspector → character-viewer}/package.json +5 -3
- package/templates/character-viewer/public/aura-assets/kenneyMiniForestCharacterArcher.0fd0f92e.glb +0 -0
- package/templates/character-viewer/src/aura-assets.ts +16 -0
- package/templates/character-viewer/src/main.ts +21 -0
- package/templates/character-viewer/tests/look-floor.ts +270 -0
- package/templates/{three-compat-custom-threejs-migration → character-viewer}/tests/route-health.spec.ts +3 -3
- package/templates/character-viewer/tests/screenshot.spec.ts +21 -0
- package/templates/character-viewer/vite.config.ts +7 -0
- package/templates/cinematic-scene/.claude/CLAUDE.md +3 -0
- package/templates/cinematic-scene/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/cinematic-scene/AGENTS.md +3 -0
- package/templates/cinematic-scene/README.md +11 -2
- package/templates/cinematic-scene/package.json +3 -2
- package/templates/cinematic-scene/src/main.ts +30 -7
- package/templates/cinematic-scene/tests/look-floor.ts +270 -0
- package/templates/cinematic-scene/tests/route-health.spec.ts +31 -3
- package/templates/cinematic-scene/tests/screenshot.spec.ts +34 -45
- package/templates/cinematic-scene/vite.config.ts +7 -0
- package/templates/custom-scene/.claude/CLAUDE.md +3 -0
- package/templates/custom-scene/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/custom-scene/AGENTS.md +3 -0
- package/templates/custom-scene/README.md +13 -0
- package/templates/custom-scene/aura.assets.json +24 -0
- package/templates/{three-compat-character-viewer → custom-scene}/package.json +5 -3
- package/templates/custom-scene/public/aura-assets/kenneyPirateKitShipMedium.279ea019.glb +0 -0
- package/templates/custom-scene/src/aura-assets.ts +16 -0
- package/templates/custom-scene/src/main.ts +23 -0
- package/templates/custom-scene/tests/look-floor.ts +270 -0
- package/templates/{three-compat-asset-inspector → custom-scene}/tests/route-health.spec.ts +3 -3
- package/templates/custom-scene/tests/screenshot.spec.ts +21 -0
- package/templates/custom-scene/vite.config.ts +7 -0
- package/templates/episode-builder/.claude/CLAUDE.md +3 -0
- package/templates/episode-builder/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/episode-builder/AGENTS.md +3 -0
- package/templates/episode-builder/package.json +3 -2
- package/templates/episode-builder/src/main.ts +5 -3
- package/templates/episode-builder/src/render-plan.ts +5 -3
- package/templates/episode-builder/tests/look-floor.ts +270 -0
- package/templates/episode-builder/tests/screenshot.spec.ts +10 -4
- package/templates/episode-builder/vite.config.ts +7 -0
- package/templates/falling-blocks-starter/.claude/CLAUDE.md +3 -0
- package/templates/falling-blocks-starter/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/falling-blocks-starter/AGENTS.md +3 -0
- package/templates/falling-blocks-starter/README.md +10 -1
- package/templates/falling-blocks-starter/aura.assets.json +40 -23
- package/templates/falling-blocks-starter/package.json +3 -2
- package/templates/falling-blocks-starter/public/aura-assets/quaternius-cube-crate.glb +0 -0
- package/templates/falling-blocks-starter/public/aura-assets/quaternius-wall-modular.glb +0 -0
- package/templates/falling-blocks-starter/src/aura-assets.ts +33 -10
- package/templates/falling-blocks-starter/src/main.ts +316 -117
- package/templates/falling-blocks-starter/tests/look-floor.ts +270 -0
- package/templates/falling-blocks-starter/tests/playable.spec.ts +51 -18
- package/templates/falling-blocks-starter/tests/route-health.spec.ts +17 -7
- package/templates/falling-blocks-starter/tests/screenshot.spec.ts +21 -0
- package/templates/falling-blocks-starter/vite.config.ts +7 -0
- package/templates/fighting-game/.claude/CLAUDE.md +3 -0
- package/templates/fighting-game/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/fighting-game/AGENTS.md +3 -0
- package/templates/fighting-game/README.md +2 -0
- package/templates/fighting-game/aura.assets.json +56 -46
- package/templates/fighting-game/package.json +4 -2
- package/templates/fighting-game/public/aura-assets/auraclash-player-rig.glb +0 -0
- package/templates/fighting-game/public/aura-assets/auraclash-rival-rig.glb +0 -0
- package/templates/fighting-game/src/aura-assets.ts +54 -20
- package/templates/fighting-game/src/game/fighters.ts +57 -12
- package/templates/fighting-game/src/main.ts +135 -53
- package/templates/fighting-game/tests/certified-rig.spec.ts +1 -1
- package/templates/fighting-game/tests/gameplay-smoke.spec.ts +2 -8
- package/templates/fighting-game/tests/look-floor.ts +270 -0
- package/templates/fighting-game/tests/route-health.spec.ts +12 -4
- package/templates/fighting-game/tests/screenshot.spec.ts +10 -4
- package/templates/fighting-game/vite.config.ts +7 -0
- package/templates/large-scene/.claude/CLAUDE.md +3 -0
- package/templates/large-scene/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/large-scene/AGENTS.md +3 -0
- package/templates/large-scene/README.md +13 -0
- package/templates/large-scene/aura.assets.json +40 -0
- package/templates/{three-compat-architecture-interior → large-scene}/package.json +5 -3
- package/templates/large-scene/public/aura-assets/kenneyMiniForestRocksHigh.226728a0.glb +0 -0
- package/templates/large-scene/public/aura-assets/kenneyMiniForestTree.0075d505.glb +0 -0
- package/templates/large-scene/src/aura-assets.ts +28 -0
- package/templates/large-scene/src/main.ts +43 -0
- package/templates/large-scene/tests/look-floor.ts +270 -0
- package/templates/large-scene/tests/route-health.spec.ts +16 -0
- package/templates/large-scene/tests/screenshot.spec.ts +21 -0
- package/templates/large-scene/vite.config.ts +7 -0
- package/templates/material-authoring/.claude/CLAUDE.md +3 -0
- package/templates/material-authoring/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/material-authoring/AGENTS.md +3 -0
- package/templates/material-authoring/README.md +15 -0
- package/templates/material-authoring/aura.assets.json +24 -0
- package/templates/material-authoring/package.json +24 -0
- package/templates/material-authoring/public/aura-assets/kenneyCarKitSedanSports.2889c428.glb +0 -0
- package/templates/material-authoring/src/aura-assets.ts +16 -0
- package/templates/material-authoring/src/main.ts +78 -0
- package/templates/material-authoring/tests/look-floor.ts +270 -0
- package/templates/material-authoring/tests/route-health.spec.ts +16 -0
- package/templates/material-authoring/tests/screenshot.spec.ts +21 -0
- package/templates/material-authoring/vite.config.ts +7 -0
- package/templates/mini-game/.claude/CLAUDE.md +3 -0
- package/templates/mini-game/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/mini-game/AGENTS.md +3 -0
- package/templates/mini-game/README.md +9 -6
- package/templates/mini-game/aura.assets.json +177 -36
- package/templates/mini-game/package.json +3 -1
- package/templates/mini-game/public/aura-assets/kaykit-barbarian.glb +0 -0
- package/templates/mini-game/public/aura-assets/kenneyPlatformerKitKey.2e930961.glb +0 -0
- package/templates/mini-game/public/aura-assets/kenneyPlatformerKitStar.a102a1b9.glb +0 -0
- package/templates/mini-game/public/aura-assets/quaternius-crate.glb +0 -0
- package/templates/mini-game/public/aura-assets/quaternius-cube-crate.glb +0 -0
- package/templates/mini-game/src/aura-assets.ts +140 -32
- package/templates/mini-game/src/main.ts +204 -71
- package/templates/mini-game/tests/certified-rig.spec.ts +2 -2
- package/templates/mini-game/tests/look-floor.ts +270 -0
- package/templates/mini-game/tests/playable.spec.ts +23 -2
- package/templates/mini-game/tests/route-health.spec.ts +2 -2
- package/templates/mini-game/tests/screenshot.spec.ts +44 -53
- package/templates/mini-game/vite.config.ts +7 -0
- package/templates/postprocess-scene/.claude/CLAUDE.md +3 -0
- package/templates/postprocess-scene/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/postprocess-scene/AGENTS.md +3 -0
- package/templates/postprocess-scene/README.md +17 -0
- package/templates/postprocess-scene/aura.assets.json +38 -0
- package/templates/postprocess-scene/package.json +24 -0
- package/templates/postprocess-scene/public/aura-assets/showcaseLuma.ef389217.glb +0 -0
- package/templates/postprocess-scene/public/aura-assets/showcaseMiko.fcdc2b75.glb +0 -0
- package/templates/postprocess-scene/src/aura-assets.ts +28 -0
- package/templates/postprocess-scene/src/main.ts +29 -0
- package/templates/postprocess-scene/tests/look-floor.ts +270 -0
- package/templates/postprocess-scene/tests/route-health.spec.ts +16 -0
- package/templates/postprocess-scene/tests/screenshot.spec.ts +21 -0
- package/templates/postprocess-scene/vite.config.ts +7 -0
- package/templates/premium-product-viewer/.claude/CLAUDE.md +3 -0
- package/templates/premium-product-viewer/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/premium-product-viewer/AGENTS.md +3 -0
- package/templates/premium-product-viewer/README.md +18 -0
- package/templates/premium-product-viewer/aura.assets.json +24 -0
- package/templates/premium-product-viewer/package.json +24 -0
- package/templates/premium-product-viewer/public/aura-assets/khronosToyCar.01a60862.glb +0 -0
- package/templates/premium-product-viewer/src/aura-assets.ts +16 -0
- package/templates/premium-product-viewer/src/main.ts +33 -0
- package/templates/premium-product-viewer/tests/look-floor.ts +270 -0
- package/templates/premium-product-viewer/tests/route-health.spec.ts +16 -0
- package/templates/premium-product-viewer/tests/screenshot.spec.ts +21 -0
- package/templates/premium-product-viewer/vite.config.ts +7 -0
- package/templates/product-viewer/.claude/CLAUDE.md +3 -0
- package/templates/product-viewer/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/product-viewer/AGENTS.md +3 -0
- package/templates/product-viewer/README.md +10 -8
- package/templates/product-viewer/package.json +3 -1
- package/templates/product-viewer/src/aura-assets.ts +1 -1
- package/templates/product-viewer/src/main.ts +78 -19
- package/templates/product-viewer/tests/look-floor.ts +270 -0
- package/templates/product-viewer/tests/route-health.spec.ts +19 -1
- package/templates/product-viewer/tests/screenshot.spec.ts +35 -41
- package/templates/product-viewer/vite.config.ts +7 -0
- package/templates/prompt-animation-channel/.claude/CLAUDE.md +3 -0
- package/templates/prompt-animation-channel/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/prompt-animation-channel/AGENTS.md +3 -0
- package/templates/prompt-animation-channel/package.json +3 -2
- package/templates/prompt-animation-channel/src/main.ts +5 -3
- package/templates/prompt-animation-channel/src/render-plan.ts +5 -3
- package/templates/prompt-animation-channel/tests/look-floor.ts +270 -0
- package/templates/prompt-animation-channel/tests/route-health.spec.ts +1 -1
- package/templates/prompt-animation-channel/tests/screenshot.spec.ts +10 -4
- package/templates/prompt-animation-channel/tests/storyboard-playback.spec.ts +1 -1
- package/templates/prompt-animation-channel/vite.config.ts +7 -0
- package/templates/racing-starter/.claude/CLAUDE.md +3 -0
- package/templates/racing-starter/.github/workflows/aura3d-lookdev.yml +67 -0
- package/templates/racing-starter/AGENTS.md +3 -0
- package/templates/racing-starter/README.md +8 -6
- package/templates/racing-starter/package.json +3 -2
- package/templates/racing-starter/src/main.ts +168 -146
- package/templates/racing-starter/tests/geometry-certification.json +34 -0
- package/templates/racing-starter/tests/look-floor.ts +270 -0
- package/templates/racing-starter/tests/playable.spec.ts +63 -80
- package/templates/racing-starter/tests/route-health.spec.ts +14 -12
- package/templates/racing-starter/tests/screenshot.spec.ts +21 -0
- package/templates/racing-starter/vite.config.ts +7 -0
- package/templates/character-controller/public/aura-assets/showcaseWalkAnimatedGirl.93872fc2.glb +0 -0
- package/templates/character-controller/public/aura-assets/showcaseWalkAnimatedGirl.thumb.svg +0 -1
- package/templates/falling-blocks-starter/public/aura-assets/showcaseBlockfallCabinet.679d52fe.glb +0 -0
- package/templates/falling-blocks-starter/public/aura-assets/showcaseBlockfallCabinet.thumb.svg +0 -1
- package/templates/fighting-game/public/aura-assets/showcaseRunnerRobot.252b3a16.glb +0 -0
- package/templates/fighting-game/public/aura-assets/showcaseRunnerRobot.thumb.svg +0 -1
- package/templates/fighting-game/public/aura-assets/showcaseWalkAnimatedGirl.93872fc2.glb +0 -0
- package/templates/fighting-game/public/aura-assets/showcaseWalkAnimatedGirl.thumb.svg +0 -1
- package/templates/mini-game/public/aura-assets/showcaseKenneyOobiPlatformerHero.3f821141.glb +0 -0
- package/templates/mini-game/public/aura-assets/showcaseKenneyOobiPlatformerHero.thumb.svg +0 -1
- package/templates/three-compat-architecture-interior/aura.assets.json +0 -7
- package/templates/three-compat-architecture-interior/src/aura-assets.ts +0 -3
- package/templates/three-compat-architecture-interior/src/main.ts +0 -27
- package/templates/three-compat-architecture-interior/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-asset-inspector/aura.assets.json +0 -7
- package/templates/three-compat-asset-inspector/src/aura-assets.ts +0 -3
- package/templates/three-compat-asset-inspector/src/main.ts +0 -17
- package/templates/three-compat-asset-inspector/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-character-viewer/aura.assets.json +0 -7
- package/templates/three-compat-character-viewer/src/aura-assets.ts +0 -3
- package/templates/three-compat-character-viewer/src/main.ts +0 -17
- package/templates/three-compat-character-viewer/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-custom-threejs-migration/aura.assets.json +0 -7
- package/templates/three-compat-custom-threejs-migration/src/aura-assets.ts +0 -3
- package/templates/three-compat-custom-threejs-migration/src/main.ts +0 -16
- package/templates/three-compat-custom-threejs-migration/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-large-scene/aura.assets.json +0 -7
- package/templates/three-compat-large-scene/package.json +0 -22
- package/templates/three-compat-large-scene/src/aura-assets.ts +0 -3
- package/templates/three-compat-large-scene/src/main.ts +0 -31
- package/templates/three-compat-large-scene/tests/route-health.spec.ts +0 -16
- package/templates/three-compat-large-scene/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-material-authoring/aura.assets.json +0 -7
- package/templates/three-compat-material-authoring/package.json +0 -22
- package/templates/three-compat-material-authoring/src/aura-assets.ts +0 -3
- package/templates/three-compat-material-authoring/src/main.ts +0 -33
- package/templates/three-compat-material-authoring/tests/route-health.spec.ts +0 -16
- package/templates/three-compat-material-authoring/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-postprocess-scene/aura.assets.json +0 -7
- package/templates/three-compat-postprocess-scene/package.json +0 -22
- package/templates/three-compat-postprocess-scene/src/aura-assets.ts +0 -3
- package/templates/three-compat-postprocess-scene/src/main.ts +0 -17
- package/templates/three-compat-postprocess-scene/tests/route-health.spec.ts +0 -16
- package/templates/three-compat-postprocess-scene/tests/screenshot.spec.ts +0 -15
- package/templates/three-compat-premium-product-viewer/aura.assets.json +0 -7
- package/templates/three-compat-premium-product-viewer/package.json +0 -22
- package/templates/three-compat-premium-product-viewer/src/aura-assets.ts +0 -3
- package/templates/three-compat-premium-product-viewer/src/main.ts +0 -18
- package/templates/three-compat-premium-product-viewer/tests/route-health.spec.ts +0 -16
- package/templates/three-compat-premium-product-viewer/tests/screenshot.spec.ts +0 -15
- /package/templates/{three-compat-architecture-interior → architecture-interior}/index.html +0 -0
- /package/templates/{three-compat-architecture-interior → architecture-interior}/playwright.config.ts +0 -0
- /package/templates/{three-compat-architecture-interior → architecture-interior}/tsconfig.json +0 -0
- /package/templates/{three-compat-asset-inspector → asset-inspector}/index.html +0 -0
- /package/templates/{three-compat-asset-inspector → asset-inspector}/playwright.config.ts +0 -0
- /package/templates/{three-compat-asset-inspector → asset-inspector}/tsconfig.json +0 -0
- /package/templates/{three-compat-character-viewer → character-viewer}/index.html +0 -0
- /package/templates/{three-compat-character-viewer → character-viewer}/playwright.config.ts +0 -0
- /package/templates/{three-compat-character-viewer → character-viewer}/tsconfig.json +0 -0
- /package/templates/{three-compat-custom-threejs-migration → custom-scene}/index.html +0 -0
- /package/templates/{three-compat-custom-threejs-migration → custom-scene}/playwright.config.ts +0 -0
- /package/templates/{three-compat-custom-threejs-migration → custom-scene}/tsconfig.json +0 -0
- /package/templates/{three-compat-large-scene → large-scene}/index.html +0 -0
- /package/templates/{three-compat-large-scene → large-scene}/playwright.config.ts +0 -0
- /package/templates/{three-compat-large-scene → large-scene}/tsconfig.json +0 -0
- /package/templates/{three-compat-material-authoring → material-authoring}/index.html +0 -0
- /package/templates/{three-compat-material-authoring → material-authoring}/playwright.config.ts +0 -0
- /package/templates/{three-compat-material-authoring → material-authoring}/tsconfig.json +0 -0
- /package/templates/{three-compat-postprocess-scene → postprocess-scene}/index.html +0 -0
- /package/templates/{three-compat-postprocess-scene → postprocess-scene}/playwright.config.ts +0 -0
- /package/templates/{three-compat-postprocess-scene → postprocess-scene}/tsconfig.json +0 -0
- /package/templates/{three-compat-premium-product-viewer → premium-product-viewer}/index.html +0 -0
- /package/templates/{three-compat-premium-product-viewer → premium-product-viewer}/playwright.config.ts +0 -0
- /package/templates/{three-compat-premium-product-viewer → premium-product-viewer}/tsconfig.json +0 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
camera,
|
|
3
|
-
createAuraApp,
|
|
4
3
|
game,
|
|
5
|
-
|
|
4
|
+
gameFeel,
|
|
5
|
+
looks,
|
|
6
6
|
material,
|
|
7
7
|
model,
|
|
8
8
|
primitives,
|
|
9
9
|
scene,
|
|
10
10
|
type AuraNodeInput
|
|
11
11
|
} from "@aura3d/engine";
|
|
12
|
+
// PRD-09: mounted via the shared runtime — createGame owns mount/lifecycle,
|
|
13
|
+
// the §7.7 HUD theme, the §6.11 steer-pedals touch preset, game-sfx-core
|
|
14
|
+
// cues, and the juice event map (no route-local flash/hit-stop code).
|
|
15
|
+
import { createGame, sfxUrl } from "@aura3d/engine/game";
|
|
12
16
|
import { assets } from "./aura-assets";
|
|
13
17
|
|
|
14
18
|
declare global {
|
|
@@ -28,48 +32,65 @@ interface RacingStarterEvidence {
|
|
|
28
32
|
readonly heading: number;
|
|
29
33
|
readonly position: { readonly x: number; readonly y: number };
|
|
30
34
|
readonly events: readonly string[];
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
35
|
+
readonly look: { readonly id: string; readonly category: string };
|
|
36
|
+
readonly geometry: {
|
|
37
|
+
readonly tool: string;
|
|
38
|
+
readonly report: string;
|
|
39
|
+
readonly carMetres: readonly number[];
|
|
40
|
+
readonly trackMetres: readonly number[];
|
|
41
|
+
readonly carScale: number;
|
|
42
|
+
readonly routeScale: number;
|
|
43
|
+
};
|
|
44
|
+
readonly camera: {
|
|
45
|
+
readonly rig: string;
|
|
46
|
+
readonly presented: boolean;
|
|
39
47
|
};
|
|
40
48
|
readonly evidence: unknown;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
minLapSeconds: 30,
|
|
47
|
-
routeAlignedToVisibleTrack: true
|
|
48
|
-
} as const;
|
|
49
|
-
|
|
50
|
-
const routeRibbonSegments = [
|
|
51
|
-
["route south straight", [2.8, 0.03, 0], [5.8, 0.08, 0.58]],
|
|
52
|
-
["route east straight", [5.6, 0.03, 1.7], [0.58, 0.08, 3.6]],
|
|
53
|
-
["route north straight", [2.8, 0.03, 3.4], [5.8, 0.08, 0.58]],
|
|
54
|
-
["route west straight", [0, 0.03, 1.7], [0.58, 0.08, 3.6]]
|
|
55
|
-
] as const;
|
|
51
|
+
// The look sets sky + sun + fog + grade; the scene adds only the foreground.
|
|
52
|
+
// Genre row (aura3d-browser-game): racing-starter → golden-hour, chase fov 60.
|
|
53
|
+
const LOOK_ID = "golden-hour" as const;
|
|
56
54
|
|
|
55
|
+
// Both showcase GLBs are authored at real scale: the car measures
|
|
56
|
+
// 3.455 × 3.428 × 2.206 m and the kart circuit 24.651 × 24.647 × 2.073 m, so
|
|
57
|
+
// the models mount at scale 1 (the former 0.18 shrink is removed). The logical
|
|
58
|
+
// route is scaled by the same factor the track grew (24.651 / 6.65 ≈ 3.7 → 3.5)
|
|
59
|
+
// so the driven line still traces inside the visible circuit footprint.
|
|
60
|
+
const ROUTE_SCALE = 3.5;
|
|
57
61
|
const route = {
|
|
58
62
|
id: "starter-kart-loop",
|
|
59
|
-
width: 2.2,
|
|
63
|
+
width: 2.2 * ROUTE_SCALE,
|
|
60
64
|
points: [
|
|
61
|
-
{ x: -0.4, y: -0.25 },
|
|
62
|
-
{ x: 2.4, y: -0.9 },
|
|
63
|
-
{ x: 5.4, y: 0.15 },
|
|
64
|
-
{ x: 5.9, y: 2.7 },
|
|
65
|
-
{ x: 3.2, y: 3.9 },
|
|
66
|
-
{ x: 0.3, y: 3.15 },
|
|
67
|
-
{ x: -0.75, y: 1.15 }
|
|
65
|
+
{ x: -0.4 * ROUTE_SCALE, y: -0.25 * ROUTE_SCALE },
|
|
66
|
+
{ x: 2.4 * ROUTE_SCALE, y: -0.9 * ROUTE_SCALE },
|
|
67
|
+
{ x: 5.4 * ROUTE_SCALE, y: 0.15 * ROUTE_SCALE },
|
|
68
|
+
{ x: 5.9 * ROUTE_SCALE, y: 2.7 * ROUTE_SCALE },
|
|
69
|
+
{ x: 3.2 * ROUTE_SCALE, y: 3.9 * ROUTE_SCALE },
|
|
70
|
+
{ x: 0.3 * ROUTE_SCALE, y: 3.15 * ROUTE_SCALE },
|
|
71
|
+
{ x: -0.75 * ROUTE_SCALE, y: 1.15 * ROUTE_SCALE }
|
|
68
72
|
],
|
|
69
73
|
checkpoints: [0.14, 0.27, 0.4, 0.53, 0.66, 0.79]
|
|
70
74
|
};
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
// The circuit GLB is origin-centred (±12.3 m on x/z). Placing it under the
|
|
77
|
+
// scaled route's bounding-box centre keeps the visible ribbon over the route.
|
|
78
|
+
const ROUTE_BOUNDS = {
|
|
79
|
+
centerX: ((-0.75 + 5.9) / 2) * ROUTE_SCALE,
|
|
80
|
+
centerZ: ((-0.9 + 3.9) / 2) * ROUTE_SCALE
|
|
81
|
+
} as const;
|
|
82
|
+
|
|
83
|
+
// GLB z-extent normalizes to world height: track top surface sits at y=0 when
|
|
84
|
+
// the model is dropped by its 1.0 m max. The car's raw min-y is -1.206 m, so
|
|
85
|
+
// the ride height lifts it until the wheels rest on that surface.
|
|
86
|
+
const TRACK_Y = -1.0;
|
|
87
|
+
const CAR_RIDE_Y = 1.206;
|
|
88
|
+
|
|
89
|
+
// Chase framing: 8 m back and 3.4 m up at fov 60 — authored in the scene spec
|
|
90
|
+
// below as the flag-off fallback; the mounted rig owns it under PRD 08.
|
|
91
|
+
const CHASE = { back: 8, up: 3.4, ahead: 4, fov: 60 } as const;
|
|
92
|
+
|
|
93
|
+
const inputOptions = {
|
|
73
94
|
actions: {
|
|
74
95
|
throttle: ["KeyW", "ArrowUp"],
|
|
75
96
|
brake: ["KeyS", "ArrowDown"],
|
|
@@ -83,34 +104,78 @@ const input = game.input({
|
|
|
83
104
|
steer: { negative: "left", positive: "right" }
|
|
84
105
|
},
|
|
85
106
|
bufferMs: 80
|
|
86
|
-
}
|
|
107
|
+
} as const;
|
|
87
108
|
|
|
88
109
|
const racing = game.racing({
|
|
89
110
|
route,
|
|
90
111
|
startProgress: 0.04,
|
|
91
112
|
checkpointRadius: 0.08,
|
|
92
|
-
lapsToWin:
|
|
93
|
-
maxSpeed:
|
|
94
|
-
acceleration:
|
|
113
|
+
lapsToWin: 3,
|
|
114
|
+
maxSpeed: 40,
|
|
115
|
+
acceleration: 60,
|
|
95
116
|
drag: 1.4,
|
|
96
|
-
steerRate: 2.85
|
|
117
|
+
steerRate: 2.85,
|
|
118
|
+
// F-08-1: bicycle vehicle model + V-5 chassis presentation publish the
|
|
119
|
+
// vLong/lateralG telemetry the chase rig's perSpeed FOV and bank read.
|
|
120
|
+
model: "bicycle",
|
|
121
|
+
chassis: true,
|
|
122
|
+
// F-08-5: kit edges (boost/drift/collision/lap) emit on the app feel bus.
|
|
123
|
+
feelBus: { emit: (name, o) => app?.feel?.emit(name, { strength: o?.strength }) }
|
|
97
124
|
});
|
|
98
125
|
|
|
99
126
|
const routeEvents = game.eventLog({ label: "racing starter events", maxEvents: 16 });
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
game
|
|
104
|
-
game
|
|
105
|
-
|
|
106
|
-
|
|
127
|
+
// HUD bindings as descriptor literals (the deprecated game.hud.* helpers are
|
|
128
|
+
// replaced by the createGame `hud` option + evidence channel sections).
|
|
129
|
+
const hudBindings = [
|
|
130
|
+
{ kind: "aura-game-hud-binding", owner: "app", binding: "objective", id: "hud:objective", label: "objective", source: "app-state", valuePath: "appState.objective", format: "text", a11yLabel: "current objective" },
|
|
131
|
+
{ kind: "aura-game-hud-binding", owner: "app", binding: "timer", id: "hud:round:timer", label: "Round timer", source: "app-state", valuePath: "appState.lapTime", format: "clock", a11yLabel: "lap timer" },
|
|
132
|
+
{ kind: "aura-game-hud-binding", owner: "app", binding: "checkpoint", id: "hud:checkpoint", label: "checkpoint", source: "app-state", valuePath: "appState.checkpoint", format: "text", a11yLabel: "current checkpoint" },
|
|
133
|
+
{ kind: "aura-game-hud-binding", owner: "app", binding: "event-log", id: "hud:event-log", label: "event log", source: "app-state", valuePath: "appState.events", format: "text", a11yLabel: "game event log", debugOnly: true }
|
|
134
|
+
] as const;
|
|
107
135
|
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
136
|
+
const racingGame = createGame({
|
|
137
|
+
id: "racing-starter",
|
|
138
|
+
target: "#app",
|
|
111
139
|
diagnostics: { overlay: true, performancePanel: true },
|
|
112
|
-
scene: buildScene
|
|
140
|
+
scene: buildScene,
|
|
141
|
+
input: inputOptions,
|
|
142
|
+
hud: { theme: "motorsport", widgets: [] },
|
|
143
|
+
touch: {
|
|
144
|
+
preset: "steer-pedals",
|
|
145
|
+
bindings: {
|
|
146
|
+
"steer-left": "left",
|
|
147
|
+
"steer-right": "right",
|
|
148
|
+
throttle: "throttle",
|
|
149
|
+
brake: "brake",
|
|
150
|
+
boost: "boost",
|
|
151
|
+
reset: "reset"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
sound: {
|
|
155
|
+
cues: {
|
|
156
|
+
checkpoint: { id: "checkpoint", asset: { url: sfxUrl("stinger.checkpoint.00") }, volume: 0.7 },
|
|
157
|
+
lap: { id: "lap", asset: { url: sfxUrl("ui.confirm.00") }, volume: 0.7 },
|
|
158
|
+
finish: { id: "finish", asset: { url: sfxUrl("stinger.win.00") }, volume: 0.8 },
|
|
159
|
+
"off-track": { id: "off-track", asset: { url: sfxUrl("impact.rubber-ball.light.00") }, volume: 0.5 },
|
|
160
|
+
boost: { id: "boost", asset: { url: sfxUrl("vehicle.boost") }, volume: 0.6 }
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
juice: {
|
|
164
|
+
checkpoint: { punch: { fovDeg: 1.4, ms: 160 }, flash: { color: "#7ff0c5", peak: 0.14, ms: 180 } },
|
|
165
|
+
lap: { shake: 0.2, punch: { fovDeg: 2, ms: 240 } },
|
|
166
|
+
finish: { hitStop: 0.05, punch: { fovDeg: 2.6, ms: 320 }, rumble: { strong: 0.6, ms: 300 } },
|
|
167
|
+
"off-track": { shake: 0.35, rumble: { weak: 0.5, ms: 160 } }
|
|
168
|
+
},
|
|
169
|
+
qualityRebuild: { flags: ["game"] },
|
|
170
|
+
evidence: {
|
|
171
|
+
schema: 1,
|
|
172
|
+
sections: { racingStarter: () => window.__AURA3D_RACING_STARTER__ ?? { status: "unbound" } }
|
|
173
|
+
}
|
|
113
174
|
});
|
|
175
|
+
const app = racingGame.app;
|
|
176
|
+
racingGame.start();
|
|
177
|
+
const input = racingGame.input;
|
|
178
|
+
if (!input) throw new Error("create-aura3d racing-starter failed to create runtime-owned input.");
|
|
114
179
|
|
|
115
180
|
const car = app.nodes.require("race-car");
|
|
116
181
|
const checkpointMarker = app.nodes.require("checkpoint-marker");
|
|
@@ -119,8 +184,22 @@ const hudRoot = createHud();
|
|
|
119
184
|
let objective = "Clear six gates across a 3-lap typed-asset route.";
|
|
120
185
|
const raceEventLabels: string[] = [];
|
|
121
186
|
|
|
122
|
-
|
|
123
|
-
|
|
187
|
+
// F-08-1: the chase rig owns the presented camera — speed-scaled FOV,
|
|
188
|
+
// velocity look-ahead and lateral bank come from the rig spec (flag-off
|
|
189
|
+
// mounts the no-op stub controller; the scene camera spec is the fallback).
|
|
190
|
+
// F-08-5: feel bus + GameFeel attach through app.time.
|
|
191
|
+
app.camera?.use(
|
|
192
|
+
camera.rigs.chase({
|
|
193
|
+
target: "race-car",
|
|
194
|
+
fov: { base: 60, perSpeed: 0.4 },
|
|
195
|
+
lookAhead: { seconds: 0.35, max: 4 },
|
|
196
|
+
bank: { gain: 0.5, maxDeg: 6 }
|
|
197
|
+
})
|
|
198
|
+
);
|
|
199
|
+
const feel = gameFeel.create({ app, time: app.time });
|
|
200
|
+
app.feel?.preset("racing");
|
|
201
|
+
|
|
202
|
+
app.onFrame(({ dt }) => {
|
|
124
203
|
if (input.pressed("reset")) {
|
|
125
204
|
racing.reset(0);
|
|
126
205
|
routeEvents.push({ type: "reset", label: "reset" });
|
|
@@ -150,15 +229,20 @@ app.onFrame(({ dt }: { readonly dt: number }) => {
|
|
|
150
229
|
if (event.type === "lap") objective = `Lap ${state.lap}/${state.lapsToWin}. Keep the line.`;
|
|
151
230
|
if (event.type === "finish") objective = "Finished. Press R to run it again.";
|
|
152
231
|
if (event.type === "off-track") objective = "Back onto the racing line.";
|
|
232
|
+
if (event.type === "checkpoint" || event.type === "lap" || event.type === "finish" || event.type === "off-track") {
|
|
233
|
+
racingGame.juice.fire(event.type);
|
|
234
|
+
void racingGame.sound?.cue(event.type);
|
|
235
|
+
}
|
|
153
236
|
}
|
|
237
|
+
if (input.pressed("boost")) void racingGame.sound?.cue("boost");
|
|
154
238
|
|
|
155
239
|
car
|
|
156
|
-
.setPosition(state.position.x,
|
|
157
|
-
.setRotation(0, -state.heading + Math.PI / 2, 0)
|
|
158
|
-
.setScale(state.drift > 0.15 ? [0.2, 0.2, 0.22] : [0.18, 0.18, 0.18]);
|
|
240
|
+
.setPosition(state.position.x, CAR_RIDE_Y, state.position.y)
|
|
241
|
+
.setRotation(0, -state.heading + Math.PI / 2, 0);
|
|
159
242
|
checkpointMarker.setVisible(state.checkpoint === 0);
|
|
160
243
|
finishMarker.setScale(state.status === "finished" ? [1.15, 0.08, 0.14] : [0.86, 0.08, 0.12]);
|
|
161
244
|
|
|
245
|
+
feel.update(dt * 1000);
|
|
162
246
|
renderHud(state);
|
|
163
247
|
publishEvidence(state);
|
|
164
248
|
});
|
|
@@ -166,92 +250,32 @@ app.onFrame(({ dt }: { readonly dt: number }) => {
|
|
|
166
250
|
publishEvidence(racing.snapshot());
|
|
167
251
|
renderHud(racing.snapshot());
|
|
168
252
|
|
|
169
|
-
// Keep browser evidence deterministic on software GPUs without replacing real
|
|
170
|
-
// keyboard input. The input controller receives each DOM event first; this
|
|
171
|
-
// handler then advances the same app.onFrame gameplay callback and presents one
|
|
172
|
-
// completed frame. Generated apps outside WebDriver retain continuous playback.
|
|
173
|
-
if (evidenceMode) {
|
|
174
|
-
await app.ready();
|
|
175
|
-
// Present the initial production frame asynchronously. SwiftShader can take
|
|
176
|
-
// seconds to drain a typed GLB scene; a synchronous submission here blocks
|
|
177
|
-
// Playwright's state readback and turns an input contract into a timeout.
|
|
178
|
-
await app.stepAsync(0);
|
|
179
|
-
const advanceFromKeyboard = (event: KeyboardEvent) => {
|
|
180
|
-
const frames = event.type === "keydown" ? 18 : 1;
|
|
181
|
-
// Advance the real input/game callbacks immediately. The playable contract
|
|
182
|
-
// reads simulation-owned evidence, so it does not need another GPU frame
|
|
183
|
-
// for every key transition; visual lifecycle coverage retains the initial
|
|
184
|
-
// completed production frame above.
|
|
185
|
-
for (let frame = 0; frame < frames; frame += 1) app.advance(1 / 60);
|
|
186
|
-
};
|
|
187
|
-
window.addEventListener("keydown", advanceFromKeyboard);
|
|
188
|
-
window.addEventListener("keyup", advanceFromKeyboard);
|
|
189
|
-
}
|
|
190
253
|
|
|
191
254
|
function buildScene() {
|
|
192
255
|
const nodes: AuraNodeInput[] = [
|
|
256
|
+
// Real-scale assets: kart circuit 24.651 m, sports car 3.455 m (aura-assets
|
|
257
|
+
// bounds). No 0.18 shrink — see CAR_RIDE_Y / ROUTE_SCALE comments above.
|
|
193
258
|
model(assets.trackModel, { name: "typed kart circuit asset" })
|
|
194
|
-
.position(
|
|
195
|
-
.scale(
|
|
259
|
+
.position(ROUTE_BOUNDS.centerX, TRACK_Y, ROUTE_BOUNDS.centerZ)
|
|
260
|
+
.scale(1),
|
|
196
261
|
model(assets.carModel, { name: "typed playable sports car", castShadow: true })
|
|
197
|
-
.position(0,
|
|
198
|
-
.scale(
|
|
262
|
+
.position(0, CAR_RIDE_Y, 0)
|
|
263
|
+
.scale(1)
|
|
199
264
|
.runtime(game.runtimeNode("race-car", { tags: ["player", "vehicle", "typed-asset", "runtime"] })),
|
|
200
|
-
...routeRibbonNodes(),
|
|
201
|
-
...paintAndGlassGantryNodes(),
|
|
202
265
|
primitives.box({ name: "checkpoint marker", material: material.neon({ color: "#7ff0c5", emissive: "#7ff0c5", emissiveIntensity: 0.7 }) })
|
|
203
|
-
.position(0.06,
|
|
204
|
-
.scale([0.
|
|
266
|
+
.position(0.06 * ROUTE_SCALE, CAR_RIDE_Y, 0.2 * ROUTE_SCALE)
|
|
267
|
+
.scale([0.7, 1.2, 4.2])
|
|
205
268
|
.runtime(game.runtimeNode("checkpoint-marker", { tags: ["checkpoint", "runtime"] })),
|
|
206
269
|
primitives.box({ name: "finish stripe", material: material.neon({ color: "#f9f1d0", emissive: "#f9f1d0", emissiveIntensity: 0.75 }) })
|
|
207
|
-
.position(0.1, 0.
|
|
208
|
-
.scale([
|
|
270
|
+
.position(0.1 * ROUTE_SCALE, CAR_RIDE_Y - 0.1, 0.05 * ROUTE_SCALE)
|
|
271
|
+
.scale([3.8, 0.36, 0.5])
|
|
209
272
|
.runtime(game.runtimeNode("finish-marker", { tags: ["finish", "runtime"] }))
|
|
210
273
|
];
|
|
211
274
|
|
|
212
275
|
return scene()
|
|
213
|
-
.
|
|
276
|
+
.add(looks.preset(LOOK_ID))
|
|
214
277
|
.addMany(nodes)
|
|
215
|
-
.
|
|
216
|
-
.add(lights.directional({ name: "race key", position: [4, 7, 5], intensity: 1.1, color: "#ffffff" }))
|
|
217
|
-
.camera(camera.perspective({ position: [2.7, 7.8, 8.6], target: [2.7, 0, 1.55], fov: 43 }));
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function routeRibbonNodes(): AuraNodeInput[] {
|
|
221
|
-
const asphalt = material.pbr({ color: "#5a6570", roughness: 0.78, metallic: 0.03 });
|
|
222
|
-
return routeRibbonSegments.map(([name, position, scale]) =>
|
|
223
|
-
primitives.box({ name, material: asphalt }).position(position[0], position[1], position[2]).scale(scale)
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// PART C2 game-ready adoption: a static paint-and-glass gantry south of the
|
|
228
|
-
// start straight wearing the @aura3d/materials "carPaint" preset (clearcoat
|
|
229
|
-
// shell + flake normal) on the showcase shell and the "glassThin" preset
|
|
230
|
-
// (thin-walled transmission) on the canopy panel.
|
|
231
|
-
function paintAndGlassGantryNodes(): AuraNodeInput[] {
|
|
232
|
-
const carPaintShell = material.clearcoatPaint({
|
|
233
|
-
color: "#c1121f",
|
|
234
|
-
roughness: 0.32,
|
|
235
|
-
metallic: 0.65,
|
|
236
|
-
clearcoat: 1,
|
|
237
|
-
clearcoatRoughness: 0.06,
|
|
238
|
-
normalScale: 0.35,
|
|
239
|
-
envMapIntensity: 1.4
|
|
240
|
-
});
|
|
241
|
-
const glassThinCanopy = material.glass({
|
|
242
|
-
color: "#bfe6f2",
|
|
243
|
-
opacity: 0.35,
|
|
244
|
-
transmission: 0.9,
|
|
245
|
-
thickness: 0.02,
|
|
246
|
-
roughness: 0.05
|
|
247
|
-
});
|
|
248
|
-
const post = material.pbr({ color: "#1c2530", roughness: 0.6, metallic: 0.4 });
|
|
249
|
-
return [
|
|
250
|
-
primitives.box({ name: "carPaint showcase shell", material: carPaintShell }).position(2.7, 0.3, -1.7).scale([1.5, 0.55, 0.75]),
|
|
251
|
-
primitives.box({ name: "glassThin canopy", material: glassThinCanopy }).position(2.7, 1.5, -1.7).scale([1.7, 0.06, 0.95]),
|
|
252
|
-
primitives.box({ name: "gantry post west", material: post }).position(1.95, 0.75, -1.7).scale([0.08, 1.5, 0.08]),
|
|
253
|
-
primitives.box({ name: "gantry post east", material: post }).position(3.45, 0.75, -1.7).scale([0.08, 1.5, 0.08])
|
|
254
|
-
];
|
|
278
|
+
.camera(camera.perspective({ position: [0, CAR_RIDE_Y + CHASE.up, -CHASE.back], target: [0, CAR_RIDE_Y, 0], fov: CHASE.fov }));
|
|
255
279
|
}
|
|
256
280
|
|
|
257
281
|
function createHud(): HTMLElement {
|
|
@@ -265,8 +289,8 @@ function createHud(): HTMLElement {
|
|
|
265
289
|
"min-width:290px",
|
|
266
290
|
"font:600 13px/1.35 Inter, system-ui, sans-serif",
|
|
267
291
|
"color:#f5fbff",
|
|
268
|
-
"background:rgba(
|
|
269
|
-
"border:1px solid rgba(
|
|
292
|
+
"background:rgba(20,12,4,0.66)",
|
|
293
|
+
"border:1px solid rgba(235,190,125,0.34)",
|
|
270
294
|
"border-radius:8px",
|
|
271
295
|
"padding:12px",
|
|
272
296
|
"pointer-events:none"
|
|
@@ -279,7 +303,7 @@ function renderHud(state: ReturnType<typeof racing.snapshot>): void {
|
|
|
279
303
|
hudRoot.innerHTML = [
|
|
280
304
|
`<strong>Aura3D Racing Starter</strong>`,
|
|
281
305
|
`<div>Lap ${state.lap}/${state.lapsToWin} | Checkpoint ${state.checkpoint}/${state.checkpointCount}</div>`,
|
|
282
|
-
`<div>Speed ${Math.round(Math.abs(state.speed) *
|
|
306
|
+
`<div>Speed ${Math.round(Math.abs(state.speed) * 4.2)} km/h | Time ${state.lapTime.toFixed(2)}s</div>`,
|
|
283
307
|
`<div>${objective}</div>`,
|
|
284
308
|
`<div>Throttle W/Up. Steer A/D. Drift Space. Reset R.</div>`
|
|
285
309
|
].join("");
|
|
@@ -289,7 +313,7 @@ function publishEvidence(state: ReturnType<typeof racing.snapshot>): void {
|
|
|
289
313
|
const evidence = app.evidence({
|
|
290
314
|
input,
|
|
291
315
|
events: routeEvents,
|
|
292
|
-
hud,
|
|
316
|
+
hud: hudBindings,
|
|
293
317
|
appState: {
|
|
294
318
|
objective,
|
|
295
319
|
lapTime: state.lapTime,
|
|
@@ -313,23 +337,21 @@ function publishEvidence(state: ReturnType<typeof racing.snapshot>): void {
|
|
|
313
337
|
heading: state.heading,
|
|
314
338
|
position: state.position,
|
|
315
339
|
events: raceEventLabels,
|
|
316
|
-
|
|
340
|
+
look: { id: LOOK_ID, category: looks.describe(LOOK_ID).category },
|
|
341
|
+
geometry: {
|
|
342
|
+
// Geometry truth comes from the real certify-game-geometry screen output
|
|
343
|
+
// committed under tests/geometry-certification.json — not from constants.
|
|
344
|
+
tool: "aura3d assets certify-game-geometry --category racing",
|
|
345
|
+
report: "tests/geometry-certification.json",
|
|
346
|
+
carMetres: assets.carModel.bounds ?? [],
|
|
347
|
+
trackMetres: assets.trackModel.bounds ?? [],
|
|
348
|
+
carScale: 1,
|
|
349
|
+
routeScale: ROUTE_SCALE
|
|
350
|
+
},
|
|
351
|
+
camera: {
|
|
352
|
+
rig: app.camera?.rig.id ?? "chase",
|
|
353
|
+
presented: app.camera !== undefined
|
|
354
|
+
},
|
|
317
355
|
evidence
|
|
318
356
|
};
|
|
319
357
|
}
|
|
320
|
-
|
|
321
|
-
function createLapProof(): RacingStarterEvidence["lapProof"] {
|
|
322
|
-
return {
|
|
323
|
-
status: "contract-ready",
|
|
324
|
-
events: [
|
|
325
|
-
...route.checkpoints.map((_checkpoint, index) => `checkpoint:checkpoint-${index + 1}`),
|
|
326
|
-
"lap:multi-lap-contract",
|
|
327
|
-
"reset:available"
|
|
328
|
-
],
|
|
329
|
-
bestTime: raceContract.minLapSeconds * raceContract.lapsToWin,
|
|
330
|
-
checkpointCount: raceContract.checkpointCount,
|
|
331
|
-
lapsToWin: raceContract.lapsToWin,
|
|
332
|
-
minLapSeconds: raceContract.minLapSeconds,
|
|
333
|
-
routeAlignedToVisibleTrack: raceContract.routeAlignedToVisibleTrack
|
|
334
|
-
};
|
|
335
|
-
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "aura3d.game-geometry-certification/1",
|
|
3
|
+
"generatedBy": "aura3d assets certify-game-geometry --category racing --assets carModel,trackModel",
|
|
4
|
+
"result": {
|
|
5
|
+
"ok": false,
|
|
6
|
+
"mode": "screen",
|
|
7
|
+
"wroteManifest": false,
|
|
8
|
+
"manifestPath": "/home/ubuntu/repos/aura3d/packages/create-aura3d/templates/racing-starter/aura.assets.json",
|
|
9
|
+
"rows": [
|
|
10
|
+
{
|
|
11
|
+
"assetId": "carModel",
|
|
12
|
+
"category": "racing",
|
|
13
|
+
"pass": false,
|
|
14
|
+
"reasons": [
|
|
15
|
+
"No mesh primitive in carModel has a road/track/asphalt/kerb material or node name."
|
|
16
|
+
],
|
|
17
|
+
"blockers": [
|
|
18
|
+
"asset-extraction:racing-road-mesh-not-found:carModel"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"assetId": "trackModel",
|
|
23
|
+
"category": "racing",
|
|
24
|
+
"pass": false,
|
|
25
|
+
"reasons": [
|
|
26
|
+
"No mesh primitive in trackModel has a road/track/asphalt/kerb material or node name."
|
|
27
|
+
],
|
|
28
|
+
"blockers": [
|
|
29
|
+
"asset-extraction:racing-road-mesh-not-found:trackModel"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|