create-aura3d 3.0.0 → 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 +4 -3
- 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 +13 -0
- 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 +5 -4
- package/templates/animation-studio/public/aura-assets/luma.thumb.svg +1 -1
- package/templates/animation-studio/public/aura-assets/miko.thumb.svg +1 -1
- package/templates/{falling-blocks-starter/public/aura-assets/showcaseBlockfallCabinet.thumb.svg → animation-studio/public/aura-assets/moonGarden.thumb.svg} +1 -1
- 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/asset-contract.ts +19 -0
- package/templates/animation-studio/src/aura-assets.ts +651 -54
- 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 +6 -4
- 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 +6 -5
- package/templates/character-controller/playwright.config.ts +1 -0
- 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 +49 -4
- 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 +6 -4
- 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 +4 -3
- package/templates/cinematic-scene/src/main.ts +46 -11
- 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 +6 -4
- 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 +4 -3
- 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/route-health.spec.ts +11 -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 +4 -3
- 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 +317 -96
- 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 +5 -3
- 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 +25 -33
- package/templates/fighting-game/tests/look-floor.ts +270 -0
- package/templates/fighting-game/tests/route-health.spec.ts +23 -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 +6 -4
- 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 +4 -2
- 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 +4 -2
- 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 +4 -3
- 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 +12 -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 +4 -3
- package/templates/racing-starter/src/main.ts +169 -123
- 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/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,32 +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
|
|
136
|
+
const racingGame = createGame({
|
|
137
|
+
id: "racing-starter",
|
|
138
|
+
target: "#app",
|
|
109
139
|
diagnostics: { overlay: true, performancePanel: true },
|
|
110
|
-
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
|
+
}
|
|
111
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.");
|
|
112
179
|
|
|
113
180
|
const car = app.nodes.require("race-car");
|
|
114
181
|
const checkpointMarker = app.nodes.require("checkpoint-marker");
|
|
@@ -117,8 +184,22 @@ const hudRoot = createHud();
|
|
|
117
184
|
let objective = "Clear six gates across a 3-lap typed-asset route.";
|
|
118
185
|
const raceEventLabels: string[] = [];
|
|
119
186
|
|
|
120
|
-
|
|
121
|
-
|
|
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 }) => {
|
|
122
203
|
if (input.pressed("reset")) {
|
|
123
204
|
racing.reset(0);
|
|
124
205
|
routeEvents.push({ type: "reset", label: "reset" });
|
|
@@ -148,15 +229,20 @@ app.onFrame(({ dt }: { readonly dt: number }) => {
|
|
|
148
229
|
if (event.type === "lap") objective = `Lap ${state.lap}/${state.lapsToWin}. Keep the line.`;
|
|
149
230
|
if (event.type === "finish") objective = "Finished. Press R to run it again.";
|
|
150
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
|
+
}
|
|
151
236
|
}
|
|
237
|
+
if (input.pressed("boost")) void racingGame.sound?.cue("boost");
|
|
152
238
|
|
|
153
239
|
car
|
|
154
|
-
.setPosition(state.position.x,
|
|
155
|
-
.setRotation(0, -state.heading + Math.PI / 2, 0)
|
|
156
|
-
.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);
|
|
157
242
|
checkpointMarker.setVisible(state.checkpoint === 0);
|
|
158
243
|
finishMarker.setScale(state.status === "finished" ? [1.15, 0.08, 0.14] : [0.86, 0.08, 0.12]);
|
|
159
244
|
|
|
245
|
+
feel.update(dt * 1000);
|
|
160
246
|
renderHud(state);
|
|
161
247
|
publishEvidence(state);
|
|
162
248
|
});
|
|
@@ -164,70 +250,32 @@ app.onFrame(({ dt }: { readonly dt: number }) => {
|
|
|
164
250
|
publishEvidence(racing.snapshot());
|
|
165
251
|
renderHud(racing.snapshot());
|
|
166
252
|
|
|
253
|
+
|
|
167
254
|
function buildScene() {
|
|
168
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.
|
|
169
258
|
model(assets.trackModel, { name: "typed kart circuit asset" })
|
|
170
|
-
.position(
|
|
171
|
-
.scale(
|
|
259
|
+
.position(ROUTE_BOUNDS.centerX, TRACK_Y, ROUTE_BOUNDS.centerZ)
|
|
260
|
+
.scale(1),
|
|
172
261
|
model(assets.carModel, { name: "typed playable sports car", castShadow: true })
|
|
173
|
-
.position(0,
|
|
174
|
-
.scale(
|
|
262
|
+
.position(0, CAR_RIDE_Y, 0)
|
|
263
|
+
.scale(1)
|
|
175
264
|
.runtime(game.runtimeNode("race-car", { tags: ["player", "vehicle", "typed-asset", "runtime"] })),
|
|
176
|
-
...routeRibbonNodes(),
|
|
177
|
-
...paintAndGlassGantryNodes(),
|
|
178
265
|
primitives.box({ name: "checkpoint marker", material: material.neon({ color: "#7ff0c5", emissive: "#7ff0c5", emissiveIntensity: 0.7 }) })
|
|
179
|
-
.position(0.06,
|
|
180
|
-
.scale([0.
|
|
266
|
+
.position(0.06 * ROUTE_SCALE, CAR_RIDE_Y, 0.2 * ROUTE_SCALE)
|
|
267
|
+
.scale([0.7, 1.2, 4.2])
|
|
181
268
|
.runtime(game.runtimeNode("checkpoint-marker", { tags: ["checkpoint", "runtime"] })),
|
|
182
269
|
primitives.box({ name: "finish stripe", material: material.neon({ color: "#f9f1d0", emissive: "#f9f1d0", emissiveIntensity: 0.75 }) })
|
|
183
|
-
.position(0.1, 0.
|
|
184
|
-
.scale([
|
|
270
|
+
.position(0.1 * ROUTE_SCALE, CAR_RIDE_Y - 0.1, 0.05 * ROUTE_SCALE)
|
|
271
|
+
.scale([3.8, 0.36, 0.5])
|
|
185
272
|
.runtime(game.runtimeNode("finish-marker", { tags: ["finish", "runtime"] }))
|
|
186
273
|
];
|
|
187
274
|
|
|
188
275
|
return scene()
|
|
189
|
-
.
|
|
276
|
+
.add(looks.preset(LOOK_ID))
|
|
190
277
|
.addMany(nodes)
|
|
191
|
-
.
|
|
192
|
-
.add(lights.directional({ name: "race key", position: [4, 7, 5], intensity: 1.1, color: "#ffffff" }))
|
|
193
|
-
.camera(camera.perspective({ position: [2.7, 7.8, 8.6], target: [2.7, 0, 1.55], fov: 43 }));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function routeRibbonNodes(): AuraNodeInput[] {
|
|
197
|
-
const asphalt = material.pbr({ color: "#5a6570", roughness: 0.78, metallic: 0.03 });
|
|
198
|
-
return routeRibbonSegments.map(([name, position, scale]) =>
|
|
199
|
-
primitives.box({ name, material: asphalt }).position(position[0], position[1], position[2]).scale(scale)
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// PART C2 game-ready adoption: a static paint-and-glass gantry south of the
|
|
204
|
-
// start straight wearing the @aura3d/materials "carPaint" preset (clearcoat
|
|
205
|
-
// shell + flake normal) on the showcase shell and the "glassThin" preset
|
|
206
|
-
// (thin-walled transmission) on the canopy panel.
|
|
207
|
-
function paintAndGlassGantryNodes(): AuraNodeInput[] {
|
|
208
|
-
const carPaintShell = material.clearcoatPaint({
|
|
209
|
-
color: "#c1121f",
|
|
210
|
-
roughness: 0.32,
|
|
211
|
-
metallic: 0.65,
|
|
212
|
-
clearcoat: 1,
|
|
213
|
-
clearcoatRoughness: 0.06,
|
|
214
|
-
normalScale: 0.35,
|
|
215
|
-
envMapIntensity: 1.4
|
|
216
|
-
});
|
|
217
|
-
const glassThinCanopy = material.glass({
|
|
218
|
-
color: "#bfe6f2",
|
|
219
|
-
opacity: 0.35,
|
|
220
|
-
transmission: 0.9,
|
|
221
|
-
thickness: 0.02,
|
|
222
|
-
roughness: 0.05
|
|
223
|
-
});
|
|
224
|
-
const post = material.pbr({ color: "#1c2530", roughness: 0.6, metallic: 0.4 });
|
|
225
|
-
return [
|
|
226
|
-
primitives.box({ name: "carPaint showcase shell", material: carPaintShell }).position(2.7, 0.3, -1.7).scale([1.5, 0.55, 0.75]),
|
|
227
|
-
primitives.box({ name: "glassThin canopy", material: glassThinCanopy }).position(2.7, 1.5, -1.7).scale([1.7, 0.06, 0.95]),
|
|
228
|
-
primitives.box({ name: "gantry post west", material: post }).position(1.95, 0.75, -1.7).scale([0.08, 1.5, 0.08]),
|
|
229
|
-
primitives.box({ name: "gantry post east", material: post }).position(3.45, 0.75, -1.7).scale([0.08, 1.5, 0.08])
|
|
230
|
-
];
|
|
278
|
+
.camera(camera.perspective({ position: [0, CAR_RIDE_Y + CHASE.up, -CHASE.back], target: [0, CAR_RIDE_Y, 0], fov: CHASE.fov }));
|
|
231
279
|
}
|
|
232
280
|
|
|
233
281
|
function createHud(): HTMLElement {
|
|
@@ -241,8 +289,8 @@ function createHud(): HTMLElement {
|
|
|
241
289
|
"min-width:290px",
|
|
242
290
|
"font:600 13px/1.35 Inter, system-ui, sans-serif",
|
|
243
291
|
"color:#f5fbff",
|
|
244
|
-
"background:rgba(
|
|
245
|
-
"border:1px solid rgba(
|
|
292
|
+
"background:rgba(20,12,4,0.66)",
|
|
293
|
+
"border:1px solid rgba(235,190,125,0.34)",
|
|
246
294
|
"border-radius:8px",
|
|
247
295
|
"padding:12px",
|
|
248
296
|
"pointer-events:none"
|
|
@@ -255,7 +303,7 @@ function renderHud(state: ReturnType<typeof racing.snapshot>): void {
|
|
|
255
303
|
hudRoot.innerHTML = [
|
|
256
304
|
`<strong>Aura3D Racing Starter</strong>`,
|
|
257
305
|
`<div>Lap ${state.lap}/${state.lapsToWin} | Checkpoint ${state.checkpoint}/${state.checkpointCount}</div>`,
|
|
258
|
-
`<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>`,
|
|
259
307
|
`<div>${objective}</div>`,
|
|
260
308
|
`<div>Throttle W/Up. Steer A/D. Drift Space. Reset R.</div>`
|
|
261
309
|
].join("");
|
|
@@ -265,7 +313,7 @@ function publishEvidence(state: ReturnType<typeof racing.snapshot>): void {
|
|
|
265
313
|
const evidence = app.evidence({
|
|
266
314
|
input,
|
|
267
315
|
events: routeEvents,
|
|
268
|
-
hud,
|
|
316
|
+
hud: hudBindings,
|
|
269
317
|
appState: {
|
|
270
318
|
objective,
|
|
271
319
|
lapTime: state.lapTime,
|
|
@@ -289,23 +337,21 @@ function publishEvidence(state: ReturnType<typeof racing.snapshot>): void {
|
|
|
289
337
|
heading: state.heading,
|
|
290
338
|
position: state.position,
|
|
291
339
|
events: raceEventLabels,
|
|
292
|
-
|
|
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
|
+
},
|
|
293
355
|
evidence
|
|
294
356
|
};
|
|
295
357
|
}
|
|
296
|
-
|
|
297
|
-
function createLapProof(): RacingStarterEvidence["lapProof"] {
|
|
298
|
-
return {
|
|
299
|
-
status: "contract-ready",
|
|
300
|
-
events: [
|
|
301
|
-
...route.checkpoints.map((_checkpoint, index) => `checkpoint:checkpoint-${index + 1}`),
|
|
302
|
-
"lap:multi-lap-contract",
|
|
303
|
-
"reset:available"
|
|
304
|
-
],
|
|
305
|
-
bestTime: raceContract.minLapSeconds * raceContract.lapsToWin,
|
|
306
|
-
checkpointCount: raceContract.checkpointCount,
|
|
307
|
-
lapsToWin: raceContract.lapsToWin,
|
|
308
|
-
minLapSeconds: raceContract.minLapSeconds,
|
|
309
|
-
routeAlignedToVisibleTrack: raceContract.routeAlignedToVisibleTrack
|
|
310
|
-
};
|
|
311
|
-
}
|
|
@@ -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
|
+
}
|