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,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
camera,
|
|
3
|
-
createAuraApp,
|
|
4
3
|
game,
|
|
4
|
+
gameFeel,
|
|
5
|
+
looks,
|
|
5
6
|
material,
|
|
6
7
|
model,
|
|
7
|
-
primitives,
|
|
8
8
|
scene,
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
|
|
9
|
+
type AuraNodeBuilder,
|
|
10
|
+
type AuraSceneNode,
|
|
11
|
+
type GamePlatformerEvent,
|
|
12
|
+
type GamePlatformerSnapshot
|
|
13
|
+
} from "@aura3d/engine";
|
|
14
|
+
// PRD-09: mounted via the shared runtime — createGame owns mount/lifecycle,
|
|
15
|
+
// the §7.7 tabletop HUD theme, the §6.11 dpad-2btn touch preset, game-sfx-core
|
|
16
|
+
// cues, and the juice event map.
|
|
17
|
+
import { createGame, sfxUrl } from "@aura3d/engine/game";
|
|
12
18
|
import { assets } from "./aura-assets";
|
|
13
19
|
|
|
14
20
|
declare global {
|
|
@@ -25,13 +31,23 @@ interface MiniGameEvidence {
|
|
|
25
31
|
readonly hero: { readonly assetId: string; readonly url: string };
|
|
26
32
|
readonly player: { readonly x: number; readonly y: number; readonly grounded: boolean };
|
|
27
33
|
readonly events: readonly string[];
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
readonly look: { readonly id: string; readonly category: string };
|
|
35
|
+
readonly animation: {
|
|
36
|
+
readonly clip: string;
|
|
37
|
+
readonly clips: readonly string[];
|
|
38
|
+
readonly tracksApplied: number;
|
|
39
|
+
};
|
|
40
|
+
readonly camera: {
|
|
41
|
+
readonly rig: string;
|
|
42
|
+
readonly presented: boolean;
|
|
43
|
+
};
|
|
44
|
+
readonly evidence: { readonly entry: string; readonly typedAssets: number };
|
|
33
45
|
}
|
|
34
46
|
|
|
47
|
+
// The look sets palette + sky + sun + fog + grade; the scene adds only the
|
|
48
|
+
// foreground. Genre row (aura3d-browser-game): mini-game → outdoor-day.
|
|
49
|
+
const LOOK_ID = "outdoor-day" as const;
|
|
50
|
+
|
|
35
51
|
const level = {
|
|
36
52
|
start: { x: 0, y: 0.35 },
|
|
37
53
|
finish: { x: 12.4, y: 0.35 },
|
|
@@ -56,46 +72,101 @@ const level = {
|
|
|
56
72
|
dashSpeed: 9.5
|
|
57
73
|
};
|
|
58
74
|
|
|
59
|
-
|
|
75
|
+
// Side-follow framing: the camera sits 10.4 m off the play plane and tracks
|
|
76
|
+
// the hero on x only (side-scroller). The C-22 rig is the live camera
|
|
77
|
+
// surface; the mounted rig owns the presented pose.
|
|
78
|
+
const CAMERA_OFFSET = { y: 3.45, z: 10.4, targetY: 0.47 } as const;
|
|
79
|
+
|
|
80
|
+
const inputOptions = {
|
|
60
81
|
actions: {
|
|
61
82
|
left: ["KeyA", "ArrowLeft"],
|
|
62
83
|
right: ["KeyD", "ArrowRight"],
|
|
63
84
|
jump: ["Space", "KeyW", "ArrowUp"],
|
|
64
85
|
dash: ["ShiftLeft", "ShiftRight"],
|
|
65
86
|
down: ["KeyS", "ArrowDown"],
|
|
66
|
-
reset: ["KeyR"]
|
|
67
|
-
debug: ["KeyT"]
|
|
87
|
+
reset: ["KeyR"]
|
|
68
88
|
},
|
|
69
89
|
axes: { moveX: { negative: "left", positive: "right" } },
|
|
70
90
|
bufferMs: 140
|
|
71
|
-
}
|
|
91
|
+
} as const;
|
|
72
92
|
const platformer = game.platformer(level);
|
|
73
|
-
// J3 scaffold surface: camera rig frames the opening shot, game feel adds
|
|
74
|
-
// trauma/shake on impacts, the debug toggle gates overlays, and the lean perf
|
|
75
|
-
// governor degrades resolution/particle scale when frames run long.
|
|
76
|
-
const cameraRig = game.cameraRig({ kind: "side-view-follow", offset: [0, 2.98, 10.4] });
|
|
77
|
-
const gameFeel = game.gameFeel();
|
|
78
|
-
const debugDraw = game.debugDraw();
|
|
79
|
-
const governor = game.performanceGovernor("conservative");
|
|
80
93
|
const routeEvents: string[] = [];
|
|
81
|
-
|
|
94
|
+
|
|
95
|
+
const miniGame = createGame({
|
|
96
|
+
id: "mini-game",
|
|
97
|
+
target: "#app",
|
|
98
|
+
autoStart: true,
|
|
99
|
+
scene: buildScene,
|
|
100
|
+
input: inputOptions,
|
|
101
|
+
hud: { theme: "tabletop", widgets: [] },
|
|
102
|
+
touch: {
|
|
103
|
+
preset: "dpad-2btn",
|
|
104
|
+
bindings: { left: "left", right: "right", dash: "dash", jump: "jump", attack: "down" }
|
|
105
|
+
},
|
|
106
|
+
sound: {
|
|
107
|
+
cues: {
|
|
108
|
+
collect: { id: "collect", asset: { url: sfxUrl("pickup.coin.00") }, volume: 0.7 },
|
|
109
|
+
checkpoint: { id: "checkpoint", asset: { url: sfxUrl("stinger.checkpoint.00") }, volume: 0.7 },
|
|
110
|
+
complete: { id: "complete", asset: { url: sfxUrl("stinger.win.00") }, volume: 0.8 },
|
|
111
|
+
hazard: { id: "hazard", asset: { url: sfxUrl("impact.rubber-ball.heavy.00") }, volume: 0.7 },
|
|
112
|
+
land: { id: "land", asset: { url: sfxUrl("impact.rubber-ball.light.00") }, volume: 0.35 },
|
|
113
|
+
jump: { id: "jump", asset: { url: sfxUrl("ui.toggle.00") }, volume: 0.4 }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
juice: {
|
|
117
|
+
collect: { punch: { fovDeg: 1.2, ms: 140 }, flash: { color: "#f7d76b", peak: 0.12, ms: 160 } },
|
|
118
|
+
checkpoint: { punch: { fovDeg: 1.6, ms: 200 }, flash: { color: "#9df59e", peak: 0.16, ms: 220 } },
|
|
119
|
+
complete: { hitStop: 0.06, punch: { fovDeg: 2.4, ms: 360 }, rumble: { strong: 0.7, ms: 320 } },
|
|
120
|
+
hazard: { shake: 0.45, hitStop: 0.04, flash: { color: "#f06b7a", peak: 0.28, ms: 240 }, rumble: { strong: 0.5, ms: 200 } },
|
|
121
|
+
land: { shake: 0.12 },
|
|
122
|
+
jump: {}
|
|
123
|
+
},
|
|
124
|
+
qualityRebuild: { flags: ["game"] },
|
|
125
|
+
evidence: {
|
|
126
|
+
schema: 1,
|
|
127
|
+
sections: { miniGame: () => window.__AURA3D_MINI_GAME__ ?? { status: "unbound" } }
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const app = miniGame.app;
|
|
131
|
+
miniGame.start();
|
|
132
|
+
const input = miniGame.input;
|
|
133
|
+
if (!input) throw new Error("create-aura3d mini-game failed to create runtime-owned input.");
|
|
134
|
+
|
|
82
135
|
const player = app.nodes.require("mini-player");
|
|
83
136
|
const lift = app.nodes.require("platform-lift");
|
|
84
137
|
const coins = level.collectibles.map((coin) => [coin.id, app.nodes.require(`coin-${coin.id}`)] as const);
|
|
85
138
|
const checkpoint = app.nodes.require("checkpoint-mid");
|
|
86
139
|
const goal = app.nodes.require("goal");
|
|
87
140
|
const hudRoot = createHud();
|
|
88
|
-
let objective = "Collect
|
|
141
|
+
let objective = "Collect stars, avoid the hazard, reach the gate";
|
|
142
|
+
// Locomotion states map onto the KayKit barbarian's clip names (the
|
|
143
|
+
// catalog hero's literal clip ids are replaced by the library rig's).
|
|
144
|
+
const LOCOMOTION_CLIPS = {
|
|
145
|
+
idle: "Idle",
|
|
146
|
+
walk: "Walking_A",
|
|
147
|
+
sprint: "Running_A",
|
|
148
|
+
jump: "Jump_Start",
|
|
149
|
+
fall: "Jump_Idle"
|
|
150
|
+
} as const;
|
|
151
|
+
type LocomotionState = keyof typeof LOCOMOTION_CLIPS;
|
|
152
|
+
let activeClip: LocomotionState = "idle";
|
|
153
|
+
player.play(LOCOMOTION_CLIPS.idle);
|
|
154
|
+
|
|
155
|
+
// Mount the C-22 camera surface (stub controller flag-off, real under PRD 08).
|
|
156
|
+
// F-08-1: the follow2d rig owns the presented camera (flag-off mounts the
|
|
157
|
+
// no-op stub controller, so the scene's camera.follow spec stays the
|
|
158
|
+
// fallback). F-08-5: feel bus + GameFeel attach through app.time.
|
|
159
|
+
app.camera?.use(
|
|
160
|
+
camera.rigs.follow2d({ target: "mini-player", framing: { subjectHeightFraction: 0.28 } })
|
|
161
|
+
);
|
|
162
|
+
const feel = gameFeel.create({ app, time: app.time });
|
|
163
|
+
app.feel?.preset("platformer");
|
|
89
164
|
|
|
90
|
-
app.onFrame((dt) => {
|
|
91
|
-
input.update(dt);
|
|
92
|
-
governor.step(Math.max(0, dt) * 1000);
|
|
93
|
-
gameFeel.update(Math.max(0, dt));
|
|
94
|
-
if (input.pressed("debug")) debugDraw.toggle();
|
|
165
|
+
app.onFrame(({ dt }) => {
|
|
95
166
|
if (input.pressed("reset")) {
|
|
96
167
|
platformer.reset();
|
|
97
168
|
routeEvents.push("reset:Route reset");
|
|
98
|
-
objective = "Collect
|
|
169
|
+
objective = "Collect stars, avoid the hazard, reach the gate";
|
|
99
170
|
}
|
|
100
171
|
const moveX = input.axis("moveX");
|
|
101
172
|
const jumpPressed = input.buffered("jump");
|
|
@@ -114,34 +185,36 @@ app.onFrame((dt) => {
|
|
|
114
185
|
});
|
|
115
186
|
for (const event of state.events) {
|
|
116
187
|
updateObjective(event);
|
|
117
|
-
if (event.type === "collect"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
gameFeel.hitStop();
|
|
188
|
+
if (event.type === "collect" || event.type === "checkpoint" || event.type === "complete" || event.type === "hazard" || event.type === "land") {
|
|
189
|
+
miniGame.juice.fire(event.type);
|
|
190
|
+
void miniGame.sound?.cue(event.type);
|
|
121
191
|
}
|
|
122
|
-
if (event.type === "
|
|
192
|
+
if (event.type === "jump") void miniGame.sound?.cue("jump");
|
|
123
193
|
}
|
|
124
194
|
remaining -= substep;
|
|
125
195
|
firstSubstep = false;
|
|
126
196
|
} while (remaining > 0.000_001);
|
|
127
197
|
|
|
128
|
-
// The
|
|
129
|
-
// rides at the physics point instead of
|
|
198
|
+
// The KayKit barbarian hero is feet-origin (GLB min y = 0), so the visual
|
|
199
|
+
// rides at the physics point instead of a +0.5 lift.
|
|
130
200
|
player.setPosition(state.player.x + 0.38, state.player.y + 0.01, 0);
|
|
201
|
+
player.setRotation(0, state.player.facing === 1 ? Math.PI / 2 : -Math.PI / 2, 0);
|
|
202
|
+
playLocomotionClip(state);
|
|
131
203
|
lift.setPosition(level.movingPlatforms[0].x + level.movingPlatforms[0].width / 2, movingLiftY(state.time), 0);
|
|
132
204
|
for (const [id, node] of coins) node.setVisible(!state.collected.includes(id));
|
|
133
205
|
checkpoint.setVisible(!state.activatedCheckpoints.includes("mid"));
|
|
134
|
-
goal.setScale(state.status === "completed" ? [
|
|
206
|
+
goal.setScale(state.status === "completed" ? [1.35, 1.35, 1.35] : 1);
|
|
207
|
+
feel.update(dt * 1000);
|
|
135
208
|
renderHud(state);
|
|
136
209
|
publishEvidence(state);
|
|
137
210
|
});
|
|
138
211
|
|
|
139
212
|
publishEvidence(platformer.snapshot());
|
|
140
213
|
renderHud(platformer.snapshot());
|
|
141
|
-
void
|
|
214
|
+
void miniGame.ready().then(() => {
|
|
142
215
|
const diagnostics = app.diagnostics();
|
|
143
216
|
document.body.dataset.aura3dReady = "true";
|
|
144
|
-
document.body.dataset.aura3dRuntimeBackend = diagnostics.
|
|
217
|
+
document.body.dataset.aura3dRuntimeBackend = diagnostics.backend;
|
|
145
218
|
document.body.dataset.aura3dDrawCalls = String(diagnostics.drawCalls);
|
|
146
219
|
(window as unknown as { __AURA3D_ROUTE_READY__?: unknown }).__AURA3D_ROUTE_READY__ = { ready: true, diagnostics };
|
|
147
220
|
}).catch((error: unknown) => {
|
|
@@ -149,33 +222,85 @@ void app.ready().then(() => {
|
|
|
149
222
|
});
|
|
150
223
|
|
|
151
224
|
function buildScene() {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
225
|
+
// Platform geometry comes from the library crate (PRD 05 template-starters
|
|
226
|
+
// swap, #481 mapping); the 0.824 m cube scales to each collision rect.
|
|
227
|
+
const block = assets.quaterniusCrate;
|
|
228
|
+
const BLOCK_SIZE = assets.quaterniusCrate.bounds;
|
|
229
|
+
const blockScale = (width: number, height: number, depth: number) =>
|
|
230
|
+
[width / BLOCK_SIZE[0], height / BLOCK_SIZE[1], depth / BLOCK_SIZE[2]] as const;
|
|
231
|
+
const nodes: AuraNodeBuilder<AuraSceneNode>[] = [
|
|
232
|
+
...level.platforms.map((platform) =>
|
|
233
|
+
model(block, { name: `${platform.id} platform` })
|
|
234
|
+
.position(platform.x + platform.width / 2, platform.y, -0.05)
|
|
235
|
+
.scale(blockScale(platform.width, platform.height, 1.24))),
|
|
236
|
+
...level.movingPlatforms.map((platform) =>
|
|
237
|
+
model(assets.quaterniusCubeCrate, { name: `${platform.id} moving platform` })
|
|
238
|
+
.position(platform.x + platform.width / 2, movingLiftY(0) - platform.height / 2, 0)
|
|
239
|
+
.scale([platform.width / assets.quaterniusCubeCrate.bounds[0], platform.height / assets.quaterniusCubeCrate.bounds[1], 0.7])
|
|
240
|
+
.runtime(game.runtimeNode("platform-lift", { tags: ["platform", "moving"] }))),
|
|
241
|
+
// Stars are models, not primitives: emissive 3–5 reads as coin sparkle
|
|
242
|
+
// under the daylight-outdoor grade.
|
|
243
|
+
...level.collectibles.map((coin) =>
|
|
244
|
+
model(assets.kenneyPlatformerKitStar, {
|
|
245
|
+
name: `${coin.id} collectible`,
|
|
246
|
+
material: material.emissive({ color: "#ffd54d", emissive: "#ffd54d", emissiveIntensity: 4, roughness: 0.3 })
|
|
247
|
+
})
|
|
248
|
+
.position(coin.x, coin.y, 0.02)
|
|
249
|
+
.scale(1.15)
|
|
250
|
+
.runtime(game.runtimeNode(`coin-${coin.id}`, { tags: ["collectible"] }))),
|
|
251
|
+
model(assets.quaterniusCubeCrate, {
|
|
252
|
+
name: "spikes hazard",
|
|
253
|
+
material: material.emissive({ color: "#e5484d", emissive: "#e5484d", emissiveIntensity: 0.9, roughness: 0.4 })
|
|
254
|
+
})
|
|
255
|
+
.position(level.hazards[0].x + level.hazards[0].width / 2, level.hazards[0].y, 0.05)
|
|
256
|
+
.scale([level.hazards[0].width / assets.quaterniusCubeCrate.bounds[0], level.hazards[0].height / assets.quaterniusCubeCrate.bounds[1], 0.5]),
|
|
257
|
+
model(assets.kenneyPlatformerKitKey, { name: "checkpoint key" })
|
|
258
|
+
.position(level.checkpoints[0].x, level.checkpoints[0].y + 0.2, 0.08)
|
|
259
|
+
.scale(2)
|
|
260
|
+
.runtime(game.runtimeNode("checkpoint-mid", { tags: ["checkpoint"] })),
|
|
261
|
+
model(assets.kenneyPlatformerKitStar, {
|
|
262
|
+
name: "finish gate",
|
|
263
|
+
material: material.emissive({ color: "#ffd54d", emissive: "#ffd54d", emissiveIntensity: 3, roughness: 0.3 })
|
|
264
|
+
})
|
|
265
|
+
.position(level.finish.x, level.finish.y + 0.5, 0.08)
|
|
266
|
+
.scale(3.4)
|
|
267
|
+
.runtime(game.runtimeNode("goal", { tags: ["finish"] }))
|
|
167
268
|
];
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
269
|
+
// The scene-level follow spec frames the hero today; the C-22 rig (mounted
|
|
270
|
+
// above build) owns presented camera state once PRD 08 lands.
|
|
271
|
+
return scene()
|
|
272
|
+
.add(looks.preset(LOOK_ID))
|
|
273
|
+
.add(
|
|
274
|
+
model(assets.kaykitBarbarian, { name: "certified hero" })
|
|
275
|
+
.position(level.start.x + 0.38, level.start.y + 0.01, 0)
|
|
276
|
+
// Barbarian is 2.4 m tall vs the 0.9 m hero the level was tuned for.
|
|
277
|
+
.scale(0.91 / assets.kaykitBarbarian.bounds[1])
|
|
278
|
+
.runtime(game.runtimeNode("mini-player", { tags: ["player"] }))
|
|
279
|
+
)
|
|
174
280
|
.addMany(nodes)
|
|
175
|
-
.camera(
|
|
281
|
+
.camera(
|
|
282
|
+
camera.follow({
|
|
283
|
+
targetNode: "mini-player",
|
|
284
|
+
position: [level.start.x, level.start.y + CAMERA_OFFSET.y, CAMERA_OFFSET.z],
|
|
285
|
+
target: [level.start.x, level.start.y + CAMERA_OFFSET.targetY, 0],
|
|
286
|
+
fov: 50
|
|
287
|
+
})
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function playLocomotionClip(state: GamePlatformerSnapshot): void {
|
|
292
|
+
// C-19 stub surface: `play` switches clips immediately (`crossFadeTo` is the
|
|
293
|
+
// PRD 06 blend path on the same handle when it lands).
|
|
294
|
+
const next: LocomotionState = !state.player.grounded
|
|
295
|
+
? state.player.vy > 0 ? "jump" : "fall"
|
|
296
|
+
: Math.abs(state.player.vx) > level.dashSpeed * 0.7 ? "sprint"
|
|
297
|
+
: Math.abs(state.player.vx) > 0.4 ? "walk" : "idle";
|
|
298
|
+
if (next === activeClip) return;
|
|
299
|
+
activeClip = next;
|
|
300
|
+
player.play(LOCOMOTION_CLIPS[next]);
|
|
176
301
|
}
|
|
177
302
|
|
|
178
|
-
function updateObjective(event:
|
|
303
|
+
function updateObjective(event: GamePlatformerEvent): void {
|
|
179
304
|
routeEvents.push(event.id ? `${event.type}:${event.id}` : event.type);
|
|
180
305
|
if (routeEvents.length > 16) routeEvents.shift();
|
|
181
306
|
if (event.type === "checkpoint") objective = "Checkpoint reached. Finish the route.";
|
|
@@ -191,16 +316,17 @@ function movingLiftY(time: number): number {
|
|
|
191
316
|
function createHud(): HTMLElement {
|
|
192
317
|
const root = document.createElement("aside");
|
|
193
318
|
root.id = "mini-game-hud";
|
|
194
|
-
root.style.cssText = "position:absolute;left:16px;top:16px;z-index:5;min-width:260px;font:600 13px/1.35 Inter,system-ui,sans-serif;color:#f5fbff;background:rgba(
|
|
319
|
+
root.style.cssText = "position:absolute;left:16px;top:16px;z-index:5;min-width:260px;font:600 13px/1.35 Inter,system-ui,sans-serif;color:#f5fbff;background:rgba(6,18,26,.66);border:1px solid rgba(160,210,240,.34);border-radius:8px;padding:12px;pointer-events:none";
|
|
195
320
|
document.body.append(root);
|
|
196
321
|
return root;
|
|
197
322
|
}
|
|
198
323
|
|
|
199
|
-
function renderHud(state:
|
|
324
|
+
function renderHud(state: GamePlatformerSnapshot): void {
|
|
200
325
|
hudRoot.innerHTML = `<strong>Aura3D Mini Game</strong><div>Score ${state.score} | Lives ${state.lives} | Deaths ${state.deaths}</div><div>Checkpoint ${state.checkpointId}</div><div>${objective}</div><div>Move A/D or arrows. Jump Space. Dash Shift. Reset R.</div>`;
|
|
201
326
|
}
|
|
202
327
|
|
|
203
|
-
function publishEvidence(state:
|
|
328
|
+
function publishEvidence(state: GamePlatformerSnapshot): void {
|
|
329
|
+
const animation = player.importedAssetEvidence();
|
|
204
330
|
window.__AURA3D_MINI_GAME__ = {
|
|
205
331
|
status: state.status,
|
|
206
332
|
frame: state.frame,
|
|
@@ -208,13 +334,20 @@ function publishEvidence(state: ReturnType<typeof platformer.snapshot>): void {
|
|
|
208
334
|
deaths: state.deaths,
|
|
209
335
|
checkpointId: state.checkpointId,
|
|
210
336
|
collected: state.collected,
|
|
211
|
-
hero: { assetId: assets.
|
|
337
|
+
hero: { assetId: assets.kaykitBarbarian.id, url: assets.kaykitBarbarian.url },
|
|
212
338
|
player: { x: state.player.x, y: state.player.y, grounded: state.player.grounded },
|
|
213
339
|
events: [...routeEvents],
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
340
|
+
look: { id: LOOK_ID, category: looks.describe(LOOK_ID).category },
|
|
341
|
+
animation: {
|
|
342
|
+
clip: activeClip,
|
|
343
|
+
clips: animation?.clips ?? [],
|
|
344
|
+
// Report-only while the C-19 handle is a stub (T3.1 test reads it).
|
|
345
|
+
tracksApplied: animation?.lastMaterialTracksApplied ?? 0
|
|
346
|
+
},
|
|
347
|
+
camera: {
|
|
348
|
+
rig: app.camera?.rig.id ?? "scene-follow",
|
|
349
|
+
presented: app.camera !== undefined
|
|
350
|
+
},
|
|
351
|
+
evidence: { entry: "@aura3d/engine/game createGame", typedAssets: Object.keys(assets).length }
|
|
219
352
|
};
|
|
220
353
|
}
|
|
@@ -3,7 +3,7 @@ import { dirname, join } from "node:path";
|
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { expect, test } from "@playwright/test";
|
|
5
5
|
|
|
6
|
-
test.setTimeout(
|
|
6
|
+
test.setTimeout(240_000);
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* E1 certified-rig mount proof for the mini-game template.
|
|
@@ -31,7 +31,7 @@ const CERTIFIED_HERO = certifiedHeroFromTypedAssets();
|
|
|
31
31
|
|
|
32
32
|
test("mini-game hero mounts the certified vehicle-driver rig", async ({ page }) => {
|
|
33
33
|
await page.goto("/");
|
|
34
|
-
await expect.poll(() => page.locator("body").getAttribute("data-aura3d-ready"), { timeout:
|
|
34
|
+
await expect.poll(() => page.locator("body").getAttribute("data-aura3d-ready"), { timeout: 150_000 }).toBe("true");
|
|
35
35
|
const hero = await page.evaluate(
|
|
36
36
|
() => (window as unknown as { readonly __AURA3D_MINI_GAME__?: { readonly hero?: { readonly assetId?: string; readonly url?: string } } }).__AURA3D_MINI_GAME__?.hero
|
|
37
37
|
);
|