@aura3d/cli 3.0.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/admission/artDirection.d.ts +28 -0
- package/dist/admission/artDirection.d.ts.map +1 -0
- package/dist/admission/artDirection.js +47 -0
- package/dist/admission/artDirection.js.map +1 -0
- package/dist/admission/audio.d.ts +19 -0
- package/dist/admission/audio.d.ts.map +1 -0
- package/dist/admission/audio.js +31 -0
- package/dist/admission/audio.js.map +1 -0
- package/dist/admission/builder-patterns.d.ts +25 -0
- package/dist/admission/builder-patterns.d.ts.map +1 -0
- package/dist/admission/builder-patterns.js +40 -0
- package/dist/admission/builder-patterns.js.map +1 -0
- package/dist/admission/gates.d.ts +136 -0
- package/dist/admission/gates.d.ts.map +1 -0
- package/dist/admission/gates.js +335 -0
- package/dist/admission/gates.js.map +1 -0
- package/dist/admission/glb.d.ts +64 -0
- package/dist/admission/glb.d.ts.map +1 -0
- package/dist/admission/glb.js +128 -0
- package/dist/admission/glb.js.map +1 -0
- package/dist/admission/index.d.ts +8 -0
- package/dist/admission/index.d.ts.map +1 -0
- package/dist/admission/index.js +8 -0
- package/dist/admission/index.js.map +1 -0
- package/dist/admission/profiles.d.ts +52 -0
- package/dist/admission/profiles.d.ts.map +1 -0
- package/dist/admission/profiles.js +91 -0
- package/dist/admission/profiles.js.map +1 -0
- package/dist/admission/qrFlags.d.ts +12 -0
- package/dist/admission/qrFlags.d.ts.map +1 -0
- package/dist/admission/qrFlags.js +48 -0
- package/dist/admission/qrFlags.js.map +1 -0
- package/dist/admission/routeGates.d.ts +36 -0
- package/dist/admission/routeGates.d.ts.map +1 -0
- package/dist/admission/routeGates.js +144 -0
- package/dist/admission/routeGates.js.map +1 -0
- package/dist/admission/texel.d.ts +50 -0
- package/dist/admission/texel.d.ts.map +1 -0
- package/dist/admission/texel.js +177 -0
- package/dist/admission/texel.js.map +1 -0
- package/dist/admission/textureStats.d.ts +45 -0
- package/dist/admission/textureStats.d.ts.map +1 -0
- package/dist/admission/textureStats.js +201 -0
- package/dist/admission/textureStats.js.map +1 -0
- package/dist/animation-asset-validator.d.ts +44 -0
- package/dist/animation-asset-validator.d.ts.map +1 -1
- package/dist/animation-asset-validator.js +80 -1
- package/dist/animation-asset-validator.js.map +1 -1
- package/dist/asset-core-types.d.ts +99 -4
- package/dist/asset-core-types.d.ts.map +1 -1
- package/dist/asset-inspection-types.d.ts +8 -0
- package/dist/asset-inspection-types.d.ts.map +1 -1
- package/dist/asset-manifest.d.ts +1 -0
- package/dist/asset-manifest.d.ts.map +1 -1
- package/dist/asset-manifest.js +13 -4
- package/dist/asset-manifest.js.map +1 -1
- package/dist/asset-route-typegen.d.ts +37 -0
- package/dist/asset-route-typegen.d.ts.map +1 -0
- package/dist/asset-route-typegen.js +179 -0
- package/dist/asset-route-typegen.js.map +1 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +9 -4
- package/dist/cli-help.js.map +1 -1
- package/dist/cli-options.d.ts +7 -0
- package/dist/cli-options.d.ts.map +1 -1
- package/dist/cli-options.js +33 -2
- package/dist/cli-options.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +126 -11
- package/dist/cli.js.map +1 -1
- package/dist/codemods/engine-entry-imports.d.ts +22 -0
- package/dist/codemods/engine-entry-imports.d.ts.map +1 -0
- package/dist/codemods/engine-entry-imports.js +159 -0
- package/dist/codemods/engine-entry-imports.js.map +1 -0
- package/dist/codemods/lean-imports.d.ts +40 -0
- package/dist/codemods/lean-imports.d.ts.map +1 -0
- package/dist/codemods/lean-imports.js +175 -0
- package/dist/codemods/lean-imports.js.map +1 -0
- package/dist/codemods/renderer-imports.d.ts +36 -0
- package/dist/codemods/renderer-imports.d.ts.map +1 -0
- package/dist/codemods/renderer-imports.js +364 -0
- package/dist/codemods/renderer-imports.js.map +1 -0
- package/dist/codemods/renderer-mode.d.ts +38 -0
- package/dist/codemods/renderer-mode.d.ts.map +1 -0
- package/dist/codemods/renderer-mode.js +130 -0
- package/dist/codemods/renderer-mode.js.map +1 -0
- package/dist/commands/prd01/index.d.ts +8 -0
- package/dist/commands/prd01/index.d.ts.map +1 -0
- package/dist/commands/prd01/index.js +39 -0
- package/dist/commands/prd01/index.js.map +1 -0
- package/dist/commands/prd02/environmentsBake.d.ts +6 -0
- package/dist/commands/prd02/environmentsBake.d.ts.map +1 -0
- package/dist/commands/prd02/environmentsBake.js +174 -0
- package/dist/commands/prd02/environmentsBake.js.map +1 -0
- package/dist/commands/prd02/index.d.ts +2 -0
- package/dist/commands/prd02/index.d.ts.map +1 -0
- package/dist/commands/prd02/index.js +26 -0
- package/dist/commands/prd02/index.js.map +1 -0
- package/dist/commands/prd02/migrateLighting.d.ts +17 -0
- package/dist/commands/prd02/migrateLighting.d.ts.map +1 -0
- package/dist/commands/prd02/migrateLighting.js +86 -0
- package/dist/commands/prd02/migrateLighting.js.map +1 -0
- package/dist/commands/prd02/migrateLightingSweep.d.ts +20 -0
- package/dist/commands/prd02/migrateLightingSweep.d.ts.map +1 -0
- package/dist/commands/prd02/migrateLightingSweep.js +105 -0
- package/dist/commands/prd02/migrateLightingSweep.js.map +1 -0
- package/dist/commands/prd03/index.d.ts +7 -0
- package/dist/commands/prd03/index.d.ts.map +1 -0
- package/dist/commands/prd03/index.js +9 -0
- package/dist/commands/prd03/index.js.map +1 -0
- package/dist/commands/prd04/index.d.ts +10 -0
- package/dist/commands/prd04/index.d.ts.map +1 -0
- package/dist/commands/prd04/index.js +10 -0
- package/dist/commands/prd04/index.js.map +1 -0
- package/dist/commands/prd04/modelTintReport.d.ts +16 -0
- package/dist/commands/prd04/modelTintReport.d.ts.map +1 -0
- package/dist/commands/prd04/modelTintReport.js +114 -0
- package/dist/commands/prd04/modelTintReport.js.map +1 -0
- package/dist/commands/prd04/pinEmissiveDefaults.d.ts +3 -0
- package/dist/commands/prd04/pinEmissiveDefaults.d.ts.map +1 -0
- package/dist/commands/prd04/pinEmissiveDefaults.js +36 -0
- package/dist/commands/prd04/pinEmissiveDefaults.js.map +1 -0
- package/dist/commands/prd05/admit.d.ts +54 -0
- package/dist/commands/prd05/admit.d.ts.map +1 -0
- package/dist/commands/prd05/admit.js +153 -0
- package/dist/commands/prd05/admit.js.map +1 -0
- package/dist/commands/prd05/codemods/assetsRouteModules.d.ts +3 -0
- package/dist/commands/prd05/codemods/assetsRouteModules.d.ts.map +1 -0
- package/dist/commands/prd05/codemods/assetsRouteModules.js +92 -0
- package/dist/commands/prd05/codemods/assetsRouteModules.js.map +1 -0
- package/dist/commands/prd05/index.d.ts +9 -0
- package/dist/commands/prd05/index.d.ts.map +1 -0
- package/dist/commands/prd05/index.js +171 -0
- package/dist/commands/prd05/index.js.map +1 -0
- package/dist/commands/prd05/library.d.ts +23 -0
- package/dist/commands/prd05/library.d.ts.map +1 -0
- package/dist/commands/prd05/library.js +245 -0
- package/dist/commands/prd05/library.js.map +1 -0
- package/dist/commands/prd05/lookdev.d.ts +14 -0
- package/dist/commands/prd05/lookdev.d.ts.map +1 -0
- package/dist/commands/prd05/lookdev.js +68 -0
- package/dist/commands/prd05/lookdev.js.map +1 -0
- package/dist/commands/prd05/optimize.d.ts +16 -0
- package/dist/commands/prd05/optimize.d.ts.map +1 -0
- package/dist/commands/prd05/optimize.js +55 -0
- package/dist/commands/prd05/optimize.js.map +1 -0
- package/dist/commands/prd05/prune.d.ts +26 -0
- package/dist/commands/prd05/prune.d.ts.map +1 -0
- package/dist/commands/prd05/prune.js +104 -0
- package/dist/commands/prd05/prune.js.map +1 -0
- package/dist/commands/prd05/review.d.ts +24 -0
- package/dist/commands/prd05/review.d.ts.map +1 -0
- package/dist/commands/prd05/review.js +40 -0
- package/dist/commands/prd05/review.js.map +1 -0
- package/dist/commands/prd06/index.d.ts +6 -0
- package/dist/commands/prd06/index.d.ts.map +1 -0
- package/dist/commands/prd06/index.js +86 -0
- package/dist/commands/prd06/index.js.map +1 -0
- package/dist/commands/prd06/inspectAnimationClips.d.ts +86 -0
- package/dist/commands/prd06/inspectAnimationClips.d.ts.map +1 -0
- package/dist/commands/prd06/inspectAnimationClips.js +168 -0
- package/dist/commands/prd06/inspectAnimationClips.js.map +1 -0
- package/dist/commands/prd06/validateHero.d.ts +18 -0
- package/dist/commands/prd06/validateHero.d.ts.map +1 -0
- package/dist/commands/prd06/validateHero.js +91 -0
- package/dist/commands/prd06/validateHero.js.map +1 -0
- package/dist/commands/prd07/codemods.d.ts +28 -0
- package/dist/commands/prd07/codemods.d.ts.map +1 -0
- package/dist/commands/prd07/codemods.js +155 -0
- package/dist/commands/prd07/codemods.js.map +1 -0
- package/dist/commands/prd07/index.d.ts +2 -0
- package/dist/commands/prd07/index.d.ts.map +1 -0
- package/dist/commands/prd07/index.js +151 -0
- package/dist/commands/prd07/index.js.map +1 -0
- package/dist/commands/prd08/feelLint.d.ts +13 -0
- package/dist/commands/prd08/feelLint.d.ts.map +1 -0
- package/dist/commands/prd08/feelLint.js +32 -0
- package/dist/commands/prd08/feelLint.js.map +1 -0
- package/dist/commands/prd08/index.d.ts +2 -0
- package/dist/commands/prd08/index.d.ts.map +1 -0
- package/dist/commands/prd08/index.js +16 -0
- package/dist/commands/prd08/index.js.map +1 -0
- package/dist/commands/prd08/motionReport.d.ts +94 -0
- package/dist/commands/prd08/motionReport.d.ts.map +1 -0
- package/dist/commands/prd08/motionReport.js +197 -0
- package/dist/commands/prd08/motionReport.js.map +1 -0
- package/dist/commands/prd09/codemods/audio-wrapper.d.ts +9 -0
- package/dist/commands/prd09/codemods/audio-wrapper.d.ts.map +1 -0
- package/dist/commands/prd09/codemods/audio-wrapper.js +30 -0
- package/dist/commands/prd09/codemods/audio-wrapper.js.map +1 -0
- package/dist/commands/prd09/codemods/capture-branches.d.ts +10 -0
- package/dist/commands/prd09/codemods/capture-branches.d.ts.map +1 -0
- package/dist/commands/prd09/codemods/capture-branches.js +54 -0
- package/dist/commands/prd09/codemods/capture-branches.js.map +1 -0
- package/dist/commands/prd09/codemods/evidence-globals.d.ts +8 -0
- package/dist/commands/prd09/codemods/evidence-globals.d.ts.map +1 -0
- package/dist/commands/prd09/codemods/evidence-globals.js +19 -0
- package/dist/commands/prd09/codemods/evidence-globals.js.map +1 -0
- package/dist/commands/prd09/codemods/perf-script.d.ts +8 -0
- package/dist/commands/prd09/codemods/perf-script.d.ts.map +1 -0
- package/dist/commands/prd09/codemods/perf-script.js +24 -0
- package/dist/commands/prd09/codemods/perf-script.js.map +1 -0
- package/dist/commands/prd09/index.d.ts +8 -0
- package/dist/commands/prd09/index.d.ts.map +1 -0
- package/dist/commands/prd09/index.js +19 -0
- package/dist/commands/prd09/index.js.map +1 -0
- package/dist/commands/prd09/perf-report.d.ts +56 -0
- package/dist/commands/prd09/perf-report.d.ts.map +1 -0
- package/dist/commands/prd09/perf-report.js +118 -0
- package/dist/commands/prd09/perf-report.js.map +1 -0
- package/dist/commands/prd09/sfx-admit.d.ts +18 -0
- package/dist/commands/prd09/sfx-admit.d.ts.map +1 -0
- package/dist/commands/prd09/sfx-admit.js +120 -0
- package/dist/commands/prd09/sfx-admit.js.map +1 -0
- package/dist/commands/prd10/index.d.ts +2 -0
- package/dist/commands/prd10/index.d.ts.map +1 -0
- package/dist/commands/prd10/index.js +109 -0
- package/dist/commands/prd10/index.js.map +1 -0
- package/dist/commands/prd11/batchOptout.d.ts +35 -0
- package/dist/commands/prd11/batchOptout.d.ts.map +1 -0
- package/dist/commands/prd11/batchOptout.js +155 -0
- package/dist/commands/prd11/batchOptout.js.map +1 -0
- package/dist/commands/prd11/index.d.ts +2 -0
- package/dist/commands/prd11/index.d.ts.map +1 -0
- package/dist/commands/prd11/index.js +13 -0
- package/dist/commands/prd11/index.js.map +1 -0
- package/dist/commands/prd11/perfGate.d.ts +15 -0
- package/dist/commands/prd11/perfGate.d.ts.map +1 -0
- package/dist/commands/prd11/perfGate.js +98 -0
- package/dist/commands/prd11/perfGate.js.map +1 -0
- package/dist/commands/prd13/index.d.ts +15 -0
- package/dist/commands/prd13/index.d.ts.map +1 -0
- package/dist/commands/prd13/index.js +26 -0
- package/dist/commands/prd13/index.js.map +1 -0
- package/dist/commands/prd13/run.d.ts +10 -0
- package/dist/commands/prd13/run.d.ts.map +1 -0
- package/dist/commands/prd13/run.js +29 -0
- package/dist/commands/prd13/run.js.map +1 -0
- package/dist/commands/prd14/index.d.ts +6 -0
- package/dist/commands/prd14/index.d.ts.map +1 -0
- package/dist/commands/prd14/index.js +6 -0
- package/dist/commands/prd14/index.js.map +1 -0
- package/dist/commands/prd15/index.d.ts +8 -0
- package/dist/commands/prd15/index.d.ts.map +1 -0
- package/dist/commands/prd15/index.js +152 -0
- package/dist/commands/prd15/index.js.map +1 -0
- package/dist/commands/registry.d.ts +19 -0
- package/dist/commands/registry.d.ts.map +1 -0
- package/dist/commands/registry.js +19 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/contracts/assetManifest.d.ts +80 -0
- package/dist/contracts/assetManifest.d.ts.map +1 -0
- package/dist/contracts/assetManifest.js +9 -0
- package/dist/contracts/assetManifest.js.map +1 -0
- package/dist/contracts/commands.d.ts +53 -0
- package/dist/contracts/commands.d.ts.map +1 -0
- package/dist/contracts/commands.js +37 -0
- package/dist/contracts/commands.js.map +1 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +271 -71
- package/dist/index.js.map +1 -1
- package/dist/library-manifest.d.ts +86 -0
- package/dist/library-manifest.d.ts.map +1 -0
- package/dist/library-manifest.js +95 -0
- package/dist/library-manifest.js.map +1 -0
- package/dist/look/capture.d.ts +51 -0
- package/dist/look/capture.d.ts.map +1 -0
- package/dist/look/capture.js +229 -0
- package/dist/look/capture.js.map +1 -0
- package/dist/look/judge.d.ts +24 -0
- package/dist/look/judge.d.ts.map +1 -0
- package/dist/look/judge.js +151 -0
- package/dist/look/judge.js.map +1 -0
- package/dist/look/lint-static.d.ts +45 -0
- package/dist/look/lint-static.d.ts.map +1 -0
- package/dist/look/lint-static.js +241 -0
- package/dist/look/lint-static.js.map +1 -0
- package/dist/look/rubric.d.ts +70 -0
- package/dist/look/rubric.d.ts.map +1 -0
- package/dist/look/rubric.js +169 -0
- package/dist/look/rubric.js.map +1 -0
- package/dist/meshy/import.d.ts +7 -1
- package/dist/meshy/import.d.ts.map +1 -1
- package/dist/meshy/import.js +80 -6
- package/dist/meshy/import.js.map +1 -1
- package/dist/migrate-three/CompatibilityWarnings.d.ts +6 -0
- package/dist/migrate-three/CompatibilityWarnings.d.ts.map +1 -0
- package/dist/migrate-three/CompatibilityWarnings.js +24 -0
- package/dist/migrate-three/CompatibilityWarnings.js.map +1 -0
- package/dist/migrate-three/ImportMap.d.ts +19 -0
- package/dist/migrate-three/ImportMap.d.ts.map +1 -0
- package/dist/migrate-three/ImportMap.js +35 -0
- package/dist/migrate-three/ImportMap.js.map +1 -0
- package/dist/migrate-three/R3fMigration.d.ts +32 -0
- package/dist/migrate-three/R3fMigration.d.ts.map +1 -0
- package/dist/migrate-three/R3fMigration.js +70 -0
- package/dist/migrate-three/R3fMigration.js.map +1 -0
- package/dist/migrate-three/ThreeToA3DAdapter.d.ts +8 -0
- package/dist/migrate-three/ThreeToA3DAdapter.d.ts.map +1 -0
- package/dist/migrate-three/ThreeToA3DAdapter.js +20 -0
- package/dist/migrate-three/ThreeToA3DAdapter.js.map +1 -0
- package/dist/migrate-three/emit.d.ts +21 -0
- package/dist/migrate-three/emit.d.ts.map +1 -0
- package/dist/migrate-three/emit.js +117 -0
- package/dist/migrate-three/emit.js.map +1 -0
- package/dist/migrate-three/mappings.d.ts +21 -0
- package/dist/migrate-three/mappings.d.ts.map +1 -0
- package/dist/migrate-three/mappings.js +42 -0
- package/dist/migrate-three/mappings.js.map +1 -0
- package/dist/migrate-three/parse.d.ts +20 -0
- package/dist/migrate-three/parse.d.ts.map +1 -0
- package/dist/migrate-three/parse.js +56 -0
- package/dist/migrate-three/parse.js.map +1 -0
- package/dist/migrate-three/report.d.ts +18 -0
- package/dist/migrate-three/report.d.ts.map +1 -0
- package/dist/migrate-three/report.js +16 -0
- package/dist/migrate-three/report.js.map +1 -0
- package/dist/pull-bridge/adapters.d.ts +1 -1
- package/dist/pull-bridge/adapters.d.ts.map +1 -1
- package/dist/pull-bridge/adapters.js +17 -4
- package/dist/pull-bridge/adapters.js.map +1 -1
- package/dist/pull-bridge/provenance.d.ts.map +1 -1
- package/dist/pull-bridge/provenance.js +3 -2
- package/dist/pull-bridge/provenance.js.map +1 -1
- package/dist/pull-bridge/pullable.d.ts.map +1 -1
- package/dist/pull-bridge/pullable.js +14 -3
- package/dist/pull-bridge/pullable.js.map +1 -1
- package/dist/pull-bridge/scoring.d.ts +36 -8
- package/dist/pull-bridge/scoring.d.ts.map +1 -1
- package/dist/pull-bridge/scoring.js +143 -47
- package/dist/pull-bridge/scoring.js.map +1 -1
- package/dist/pull-bridge/search.d.ts +2 -0
- package/dist/pull-bridge/search.d.ts.map +1 -1
- package/dist/pull-bridge/search.js +17 -10
- package/dist/pull-bridge/search.js.map +1 -1
- package/dist/pull-bridge.d.ts +2 -2
- package/dist/pull-bridge.d.ts.map +1 -1
- package/dist/pull-bridge.js +24 -8
- package/dist/pull-bridge.js.map +1 -1
- package/package.json +6 -3
- 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
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aura3d-performance
|
|
3
|
+
description: Measures and reduces Aura3D frame cost, draw calls, and bundle size with diagnostics, scene-kit budgets, instancing, distance LOD, frustum culling, and KTX2 textures, without turning counters into visual claims. Use when a route is slow, draw calls or bundle size exceed budget, or the task mentions `diagnostics: { overlay: true }`, `sceneKitPerformanceBudget`, `instances.*`, `distanceLod`, `text3D`, KTX2 texture compression, BUNDLE_SIZES, `doctor`, or `check-deploy`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Aura3D performance
|
|
7
|
+
|
|
8
|
+
Measure first, change one thing, measure again. Diagnostics counters are
|
|
9
|
+
evidence for performance claims only; they never prove a scene looks right.
|
|
10
|
+
Shared rules (claim labels, forbidden patterns, typed assets, benchmark mode)
|
|
11
|
+
are in [boundaries](../aura3d-core/references/boundaries.md).
|
|
12
|
+
|
|
13
|
+
## Look target
|
|
14
|
+
|
|
15
|
+
Measure with the final look active: the look sets the DPR cap, the post grade
|
|
16
|
+
(bloom, AO, vignette) and shadow map size — most of the frame cost you are
|
|
17
|
+
optimizing. `looks.appOptions(<id>)` already applies `quality: "auto"`; a
|
|
18
|
+
manual quality override invalidates every measurement that follows.
|
|
19
|
+
|
|
20
|
+
## Establish the contract
|
|
21
|
+
|
|
22
|
+
1. Run `npx @aura3d/cli@latest --help` and `npx @aura3d/cli@latest doctor`.
|
|
23
|
+
Fix doctor failures before profiling; warnings are listed separately.
|
|
24
|
+
2. Read `src/aura-assets.ts` and `aura.assets.json`. Note each asset's
|
|
25
|
+
`sizeBytes`, texture list, and bounds; heavy GLBs and uncompressed textures
|
|
26
|
+
are usually the first cost.
|
|
27
|
+
3. Check which entry the app imports. New product and game apps should use
|
|
28
|
+
`@aura3d/lean`, `@aura3d/lean/product`, or `@aura3d/lean/game`. The
|
|
29
|
+
`@aura3d/engine` root is a compatibility entry and is far over the new-app
|
|
30
|
+
gzip budget.
|
|
31
|
+
4. Decide the mode. Benchmark mode: `npm install && npm run build`, then stop.
|
|
32
|
+
No profiling, dev server, or browser capture from the agent.
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
1. Turn diagnostics on while measuring and off for release screenshots:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
createAuraApp("#app", { scene, diagnostics: { overlay: true, performancePanel: true } });
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The app's diagnostics report `backend`, `fps`, `drawCalls`, `renderSize`,
|
|
43
|
+
asset load states, `warnings`, and `errors`. Record them with the viewport,
|
|
44
|
+
device, and route so the finding reproduces.
|
|
45
|
+
2. Compare against the budget for the kit you started from:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { sceneKitPerformanceBudget, sceneKits } from "@aura3d/engine";
|
|
49
|
+
|
|
50
|
+
console.log(sceneKitPerformanceBudget("miniGolf"));
|
|
51
|
+
console.log(sceneKits.miniGolf().diagnostics);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Budgets carry `maxDrawCalls`, `estimatedDrawCalls`, `maxGzipBytes`, and
|
|
55
|
+
`targetP50Fps`. FPS targets require calibration on the measuring machine.
|
|
56
|
+
3. Many repeated objects: replace per-node primitives with one `instances.box`
|
|
57
|
+
(or `instances.sphere`, `instances.plane`, `instances.cylinder`,
|
|
58
|
+
`instances.capsule`, `instances.torus`) node with a transform list. Advanced
|
|
59
|
+
PBR extensions can fall back to expanded draws, so confirm native instanced
|
|
60
|
+
submissions in diagnostics before claiming one draw.
|
|
61
|
+
4. Distant detail: use `distanceLod` with increasing `maxDistance` levels and a
|
|
62
|
+
`hysteresis` band so the camera cannot flap between levels.
|
|
63
|
+
5. Large scenes: rely on CPU frustum culling plus the static-bounds BVH. Give
|
|
64
|
+
custom geometry explicit bounds via `geometry.custom`. There is no GPU
|
|
65
|
+
occlusion culling; do not claim it.
|
|
66
|
+
6. Text: `text3D` is extruded mesh text (A-Z, 0-9, space, dash, period);
|
|
67
|
+
`labels.billboard` is DOM UI. Pick by need, not to save draws.
|
|
68
|
+
7. Particles: check `particles.diagnostics` for total particles and
|
|
69
|
+
estimated update cost before raising counts.
|
|
70
|
+
8. Textures: prefer KTX2/Basis-compressed textures supplied through typed
|
|
71
|
+
assets. Compression support is bounded to the tested decoder paths; verify
|
|
72
|
+
in the browser before claiming a memory or load-time win.
|
|
73
|
+
9. Bundle: keep new imports on the lean entry and avoid pulling devtools or
|
|
74
|
+
cinematic helpers into the critical path. In the Aura3D monorepo,
|
|
75
|
+
`pnpm check:bundle-size` regenerates BUNDLE_SIZES; never raise a budget to
|
|
76
|
+
manufacture a pass.
|
|
77
|
+
10. Ship check: `npm run build`, then
|
|
78
|
+
`npx @aura3d/cli@latest check-deploy --dist dist`. Browser frame-time and
|
|
79
|
+
screenshot runs (`npm run test`, Playwright) go to CI or a remote runner.
|
|
80
|
+
|
|
81
|
+
## Stop and report
|
|
82
|
+
|
|
83
|
+
- `doctor` or `check-deploy` fails: stop and fix that first; label `blocked`.
|
|
84
|
+
- A win is measured on one machine only: call it directional, name the
|
|
85
|
+
machine and workload, and do not generalize it to a frame-time guarantee.
|
|
86
|
+
- A performance change alters the rendered scene: rerun screenshot review
|
|
87
|
+
through `aura3d-evidence-review` before shipping.
|
|
88
|
+
- GPU timing is unavailable or noisy on the device: say so; do not fill in.
|
|
89
|
+
|
|
90
|
+
## References
|
|
91
|
+
|
|
92
|
+
- [Shared boundaries](../aura3d-core/references/boundaries.md)
|
|
93
|
+
- [Profiling and diagnostics](https://github.com/auraoneai/aura3d/blob/main/docs/debug/profiling-and-diagnostics.md)
|
|
94
|
+
- [Bundle sizes](https://github.com/auraoneai/aura3d/blob/main/BUNDLE_SIZES.md)
|
|
95
|
+
- [Texture compression](https://github.com/auraoneai/aura3d/blob/main/docs/rendering/texture-compression.md)
|
|
96
|
+
- [Geometry, instancing, LOD, text](https://github.com/auraoneai/aura3d/blob/main/docs/rendering/geometry-instancing-lod-text.md)
|
|
97
|
+
- [Deployment](https://aura3d.auraone.ai/docs/deployment.html)
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aura3d-retexture
|
|
3
|
+
description: Restyles a finished, admitted mesh while proving the geometry is untouched: before and after `assets inspect` bounds plus a position-accessor hash diff, one material family per map set, and a matched before and after screenshot filmstrip. Use when retexturing, recoloring, reskinning, or restyling an existing GLB or typed `assets.<key>` model, including after `meshy retexture`, a DCC texture pass, or a `model(asset, { material })` tint.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Aura3D retexture (geometry untouched)
|
|
7
|
+
|
|
8
|
+
A retexture changes how a mesh looks, never its shape. The proof is numeric
|
|
9
|
+
(identical bounds and position data) plus visual (a matched before and after
|
|
10
|
+
filmstrip). Orbit or turnaround views are not produced: the engine renders any
|
|
11
|
+
angle of the real mesh through `camera.*`, and painted angles would be
|
|
12
|
+
unverifiable. Shared rules (claim labels, typed assets, paid generation,
|
|
13
|
+
benchmark mode) are in
|
|
14
|
+
[../aura3d-core/references/boundaries.md](../aura3d-core/references/boundaries.md).
|
|
15
|
+
|
|
16
|
+
## Look target
|
|
17
|
+
|
|
18
|
+
Judge a retexture under the look it will ship in — the same map set reads warm
|
|
19
|
+
under `golden-hour` and cold under `night-city`. Fix the route's look preset
|
|
20
|
+
first, then iterate on maps; a recolor tuned against flat lighting drifts
|
|
21
|
+
again under the real grade.
|
|
22
|
+
|
|
23
|
+
## Establish the contract
|
|
24
|
+
|
|
25
|
+
1. Run `npx @aura3d/cli@latest --help` and read the `assets inspect` and
|
|
26
|
+
`assets add` lines.
|
|
27
|
+
2. Read `aura.assets.json` and `src/aura-assets.ts`. The source mesh must be
|
|
28
|
+
an admitted typed asset with a license. Keep its original file; never
|
|
29
|
+
overwrite it in place.
|
|
30
|
+
3. Choose the path:
|
|
31
|
+
- Offline: a new GLB with new maps (a `meshy retexture` result through the
|
|
32
|
+
`meshy-cli` skill, or a DCC texture pass). This is the only way to change
|
|
33
|
+
texture maps.
|
|
34
|
+
- Runtime tint: `model(assets.x, { material: material.pbr({ color, roughness, metallic }) })`.
|
|
35
|
+
On typed GLBs this applies a flat tint that replaces surface textures on
|
|
36
|
+
the whole model. It cannot target one part or add maps.
|
|
37
|
+
4. Benchmark mode: `npm install && npm run build`, then stop.
|
|
38
|
+
|
|
39
|
+
## Procedure
|
|
40
|
+
|
|
41
|
+
1. Record the before state:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx @aura3d/cli@latest assets inspect ./assets/source.glb --license > artifacts/retexture/before.inspect.json
|
|
45
|
+
node .agents/skills/aura3d-retexture/references/geometry-hash.mjs ./assets/source.glb > artifacts/retexture/before.geometry.json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
(Adjust the script path to wherever your agent client installed this
|
|
49
|
+
skill.) Keep `bounds`, `boundsMetadata`, `materials`, and `nodeNames` from
|
|
50
|
+
the inspection, and `geometryHash` plus per-primitive hashes from the
|
|
51
|
+
script. `assets inspect` reports bounds but no vertex hash, and the
|
|
52
|
+
manifest `hash` covers the whole file (textures included), so it always
|
|
53
|
+
changes on a retexture and proves nothing about geometry.
|
|
54
|
+
2. Plan one material family per map set. List each glTF material by name
|
|
55
|
+
(from `materials`), assign it one target family (for example painted
|
|
56
|
+
metal, worn leather, matte plastic), and give each family exactly one map
|
|
57
|
+
set (base color, normal, roughness and metalness, occlusion). Never share
|
|
58
|
+
one map set across two families, and never split one family across two
|
|
59
|
+
map sets.
|
|
60
|
+
3. Produce the after file as a new GLB in `artifacts/retexture/`. Only
|
|
61
|
+
materials, images, and textures may change. The node tree, mesh
|
|
62
|
+
primitives, UVs, skin, and morph targets stay as they are.
|
|
63
|
+
4. Prove the geometry is untouched:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
node .agents/skills/aura3d-retexture/references/geometry-hash.mjs ./assets/source.glb artifacts/retexture/after.glb
|
|
67
|
+
npx @aura3d/cli@latest assets inspect artifacts/retexture/after.glb --license > artifacts/retexture/after.inspect.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The script exits 0 only when `geometryUntouched` is true (the same
|
|
71
|
+
POSITION and index bytes for every primitive). The inspections must show
|
|
72
|
+
identical `boundsMetadata.min`, `boundsMetadata.max`, and `nodeNames`, and
|
|
73
|
+
the same material names unless you renamed them on purpose. Draco
|
|
74
|
+
geometry must be decoded before hashing. For a runtime tint the file is
|
|
75
|
+
unchanged, so record that and skip the hash.
|
|
76
|
+
5. Admit the after file as its own asset with provenance, leaving the
|
|
77
|
+
original entry in place:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npx @aura3d/cli@latest assets add artifacts/retexture/after.glb --name sourceRestyled --license CC-BY-4.0 --author "<author>" --quality candidate --role product
|
|
81
|
+
npx @aura3d/cli@latest assets typegen
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Carry the source license forward; a derived file inherits its terms.
|
|
85
|
+
6. Capture the filmstrip (normal mode, via `npm run test` on CI or a remote
|
|
86
|
+
worker): the same camera, lights, environment, exposure, and viewport for
|
|
87
|
+
before and after, 3 to 5 fixed views, for example
|
|
88
|
+
`camera.frameAsset(assets.source)` plus fixed `camera.perspective(...)`
|
|
89
|
+
positions. Only the asset key may differ between the paired frames. Place
|
|
90
|
+
each before frame beside its after frame.
|
|
91
|
+
7. Report: the family-to-map-set table, both geometry reports, the bounds
|
|
92
|
+
comparison, the filmstrip, and the new asset key. Hand the label to
|
|
93
|
+
`aura3d-evidence-review`; a retextured asset stays `candidate` until
|
|
94
|
+
reviewed.
|
|
95
|
+
|
|
96
|
+
## Stop and report
|
|
97
|
+
|
|
98
|
+
- `geometryUntouched` is false, or bounds or node names differ: stop. The
|
|
99
|
+
file is a remesh or rebuild, not a retexture. Report the changed
|
|
100
|
+
primitives, and do not admit it as a restyle of the source.
|
|
101
|
+
- The request needs per-part maps, but only the runtime tint path is
|
|
102
|
+
available: report the gap; the tint recolors the whole model.
|
|
103
|
+
- The source has no license or provenance, or its terms forbid derivatives:
|
|
104
|
+
do not retexture it.
|
|
105
|
+
- A mismatched camera, lighting, or viewport between before and after frames
|
|
106
|
+
makes the filmstrip invalid: recapture it; do not describe the difference.
|
|
107
|
+
- Someone asks for orbit or turnaround renders painted from a 2D concept:
|
|
108
|
+
decline, and render real angles of the real mesh instead.
|
|
109
|
+
|
|
110
|
+
## References
|
|
111
|
+
|
|
112
|
+
- [Geometry hash script](references/geometry-hash.mjs)
|
|
113
|
+
- [Asset workflow and `assets inspect`](https://github.com/auraoneai/aura3d/blob/main/docs/agents/asset-workflow.md)
|
|
114
|
+
- [Rendering proof rule](https://github.com/auraoneai/aura3d/blob/main/docs/agents/rendering-proof-required.md)
|
|
115
|
+
- Meshy retexture runs, approval, and `--max-credits`: load `meshy-cli`.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Geometry-untouched proof for a retexture: hashes every mesh primitive's
|
|
3
|
+
// POSITION (and index) accessor bytes in a .glb, ignoring materials, images,
|
|
4
|
+
// and textures. Two GLBs whose "geometryHash" matches have byte-identical
|
|
5
|
+
// vertex positions and topology. Dependency-free; reads GLB 2.0 (BIN chunk,
|
|
6
|
+
// data: URIs, or relative buffer files). Draco-compressed meshes are rejected.
|
|
7
|
+
//
|
|
8
|
+
// Usage: node geometry-hash.mjs before.glb [after.glb]
|
|
9
|
+
import { createHash } from "node:crypto";
|
|
10
|
+
import { readFileSync } from "node:fs";
|
|
11
|
+
import { dirname, resolve } from "node:path";
|
|
12
|
+
|
|
13
|
+
function readGlb(path) {
|
|
14
|
+
const buf = readFileSync(path);
|
|
15
|
+
if (buf.readUInt32LE(0) !== 0x46546c67) throw new Error(`${path}: not a GLB (bad magic)`);
|
|
16
|
+
let offset = 12;
|
|
17
|
+
let json;
|
|
18
|
+
let bin;
|
|
19
|
+
while (offset < buf.length) {
|
|
20
|
+
const length = buf.readUInt32LE(offset);
|
|
21
|
+
const type = buf.readUInt32LE(offset + 4);
|
|
22
|
+
const chunk = buf.subarray(offset + 8, offset + 8 + length);
|
|
23
|
+
if (type === 0x4e4f534a) json = JSON.parse(chunk.toString("utf8"));
|
|
24
|
+
else if (type === 0x004e4942) bin = chunk;
|
|
25
|
+
offset += 8 + length;
|
|
26
|
+
}
|
|
27
|
+
if (!json) throw new Error(`${path}: missing JSON chunk`);
|
|
28
|
+
// buffer 0 is the BIN chunk unless it declares a uri; data: and relative uris are also read.
|
|
29
|
+
const buffers = (json.buffers ?? []).map((buffer, index) => {
|
|
30
|
+
if (!buffer.uri) return index === 0 ? bin : undefined;
|
|
31
|
+
if (buffer.uri.startsWith("data:")) return Buffer.from(buffer.uri.split(",")[1] ?? "", "base64");
|
|
32
|
+
if (/^[a-z]+:/i.test(buffer.uri)) throw new Error(`${path}: remote buffer uri not supported`);
|
|
33
|
+
return readFileSync(resolve(dirname(path), decodeURIComponent(buffer.uri)));
|
|
34
|
+
});
|
|
35
|
+
return { json, buffers };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const COMPONENT_BYTES = { 5120: 1, 5121: 1, 5122: 2, 5123: 2, 5125: 4, 5126: 4 };
|
|
39
|
+
const TYPE_COUNT = { SCALAR: 1, VEC2: 2, VEC3: 3, VEC4: 4, MAT4: 16 };
|
|
40
|
+
|
|
41
|
+
function accessorBytes({ json, buffers }, index) {
|
|
42
|
+
const accessor = json.accessors[index];
|
|
43
|
+
if (accessor.bufferView === undefined) return Buffer.alloc(0);
|
|
44
|
+
const view = json.bufferViews[accessor.bufferView];
|
|
45
|
+
const bin = buffers[view.buffer ?? 0];
|
|
46
|
+
if (!bin) throw new Error(`buffer ${view.buffer ?? 0} is not readable`);
|
|
47
|
+
const elementSize = COMPONENT_BYTES[accessor.componentType] * TYPE_COUNT[accessor.type];
|
|
48
|
+
const stride = view.byteStride ?? elementSize;
|
|
49
|
+
const start = (view.byteOffset ?? 0) + (accessor.byteOffset ?? 0);
|
|
50
|
+
const out = Buffer.alloc(elementSize * accessor.count);
|
|
51
|
+
for (let i = 0; i < accessor.count; i += 1) bin.copy(out, i * elementSize, start + i * stride, start + i * stride + elementSize);
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function geometryReport(path) {
|
|
56
|
+
const glb = readGlb(path);
|
|
57
|
+
const whole = createHash("sha256");
|
|
58
|
+
const primitives = [];
|
|
59
|
+
(glb.json.meshes ?? []).forEach((mesh, meshIndex) => {
|
|
60
|
+
(mesh.primitives ?? []).forEach((primitive, primitiveIndex) => {
|
|
61
|
+
if (primitive.extensions?.KHR_draco_mesh_compression) throw new Error("Draco-compressed geometry: decode before hashing");
|
|
62
|
+
const position = primitive.attributes?.POSITION;
|
|
63
|
+
if (position === undefined) return;
|
|
64
|
+
const positions = accessorBytes(glb, position);
|
|
65
|
+
const indices = primitive.indices === undefined ? Buffer.alloc(0) : accessorBytes(glb, primitive.indices);
|
|
66
|
+
const hash = createHash("sha256").update(positions).update(indices).digest("hex");
|
|
67
|
+
whole.update(hash);
|
|
68
|
+
const accessor = glb.json.accessors[position];
|
|
69
|
+
primitives.push({ mesh: mesh.name ?? `mesh${meshIndex}`, primitive: primitiveIndex, vertices: accessor.count, min: accessor.min, max: accessor.max, hash: `sha256-${hash}` });
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
return { file: path, primitiveCount: primitives.length, geometryHash: `sha256-${whole.digest("hex")}`, primitives };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const [before, after] = process.argv.slice(2);
|
|
76
|
+
if (!before) {
|
|
77
|
+
console.error("usage: node geometry-hash.mjs before.glb [after.glb]");
|
|
78
|
+
process.exit(2);
|
|
79
|
+
}
|
|
80
|
+
const a = geometryReport(before);
|
|
81
|
+
if (!after) {
|
|
82
|
+
console.log(JSON.stringify(a, null, 2));
|
|
83
|
+
} else {
|
|
84
|
+
const b = geometryReport(after);
|
|
85
|
+
const geometryUntouched = a.geometryHash === b.geometryHash;
|
|
86
|
+
const changed = a.primitives.filter((p, i) => p.hash !== b.primitives[i]?.hash).map((p) => `${p.mesh}#${p.primitive}`);
|
|
87
|
+
console.log(JSON.stringify({ geometryUntouched, before: a.geometryHash, after: b.geometryHash, primitiveCount: [a.primitiveCount, b.primitiveCount], changed }, null, 2));
|
|
88
|
+
process.exitCode = geometryUntouched ? 0 : 1;
|
|
89
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aura3d-scene-authoring
|
|
3
|
+
description: Turns a scene prompt into editable `@aura3d/engine` source by picking a scene kit or prompt plan, compiling it, and repairing weak screenshots from the compiled report. Use when writing a scene or route from a prompt, choosing among `sceneKits.*`, `prefabs.*`, or `primitives.*`, or using `definePromptPlan`, `compilePromptPlan`, `promptPlanToScene`, or `collectAuraSceneEvidence`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Aura3D scene authoring
|
|
7
|
+
|
|
8
|
+
You turn prompt intent into maintainable TypeScript that calls public Aura3D
|
|
9
|
+
APIs. There is no hidden scene generator. Every scene gets a look — the preset
|
|
10
|
+
that supplies environment light, key shadow, fog, background and grade. Shared
|
|
11
|
+
rules (claim labels, forbidden patterns, typed assets, benchmark mode) are in
|
|
12
|
+
[boundaries](../aura3d-core/references/boundaries.md).
|
|
13
|
+
|
|
14
|
+
## Look target
|
|
15
|
+
|
|
16
|
+
Read the genre recipe row in `../aura3d-art-direction/references/look-recipes.md`,
|
|
17
|
+
pick the look id, and carry it through the plan and the code. A scene without a
|
|
18
|
+
look renders flat on a void.
|
|
19
|
+
|
|
20
|
+
## Establish the contract
|
|
21
|
+
|
|
22
|
+
1. Run `npx @aura3d/cli@latest --help` and use only the commands it prints.
|
|
23
|
+
2. Read `src/aura-assets.ts` and `aura.assets.json`. Every subject model comes
|
|
24
|
+
from a generated key. If the prompt names a real object and no key exists,
|
|
25
|
+
load `aura3d-assets` first.
|
|
26
|
+
3. Read the installed `@aura3d/engine` type declarations before naming an
|
|
27
|
+
export. The prompt-plan enums are narrow: `sceneType` is `product-viewer`,
|
|
28
|
+
`cinematic-scene`, `mini-game`, or `material-studio`.
|
|
29
|
+
4. Decide the mode. Benchmark mode: if `aura3d look capture` is available,
|
|
30
|
+
run the look-dev loop; otherwise copy the smallest matching recipe, run
|
|
31
|
+
`npm install && npm run build`, return the runner-owned run command, stop,
|
|
32
|
+
and label the result `prototype`.
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
1. Restate the prompt as scene intent: subject, scene family, camera, lighting,
|
|
37
|
+
effects, interaction, and what a screenshot must visibly show.
|
|
38
|
+
2. Pick the starting point in this order: a template, then a scene kit, then
|
|
39
|
+
`prefabs.*`, and `primitives.*` only for set dressing, guides, or explicitly
|
|
40
|
+
abstract visuals.
|
|
41
|
+
|
|
42
|
+
| Prompt family | Start from | Screenshot must show |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| Physics playground | `sceneKits.physicsPlayground` | falling cubes, settled pile, ramp, contact cues, reset |
|
|
45
|
+
| Particle fountain | `sceneKits.particleFountain` | dense upward flow, nozzle, splash, a real emission-rate control |
|
|
46
|
+
| Solar system | `sceneKits.solarSystem` | sun glow, six attached planet labels, orbit paths, stars |
|
|
47
|
+
| Neon tunnel | `sceneKits.neonTunnel` | inside-tube view, receding rings, rails, controlled bloom |
|
|
48
|
+
| Data visualization | `sceneKits.dataViz` | bars, axes, ticks, title, legend, selected value |
|
|
49
|
+
| Mini golf | `sceneKits.miniGolf` | ball, cup, aim and power, score, obstacle, boundaries |
|
|
50
|
+
| Material lab | `sceneKits.materialLab` | material classes distinct in pixels, not labels |
|
|
51
|
+
| City block | `sceneKits.cityBlock` | buildings, lit windows, streets, a real day/night state |
|
|
52
|
+
| Humanoid walk | `sceneKits.humanoidWalk` | one connected humanoid, planted feet, path |
|
|
53
|
+
| Product viewer | `sceneKits.productViewer` | typed model on plinth, contact shadow, softboxes |
|
|
54
|
+
|
|
55
|
+
3. Kit path: mount the kit once and keep its diagnostics.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { createAuraApp, sceneKits } from "@aura3d/engine";
|
|
59
|
+
import { assets } from "./aura-assets";
|
|
60
|
+
|
|
61
|
+
const kit = sceneKits.productViewer(assets.product);
|
|
62
|
+
createAuraApp("#app", kit.toAppOptions());
|
|
63
|
+
console.log(kit.diagnostics, kit.evidence);
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
4. Plan path, when the prompt is product intent rather than a kit family:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { compilePromptPlan, createAuraApp, definePromptPlan, promptPlanToScene } from "@aura3d/engine";
|
|
70
|
+
import { assets } from "./aura-assets";
|
|
71
|
+
|
|
72
|
+
const plan = definePromptPlan({
|
|
73
|
+
sceneType: "product-viewer",
|
|
74
|
+
subject: { asset: assets.product },
|
|
75
|
+
camera: { preset: "product-orbit" },
|
|
76
|
+
lighting: { preset: "studio-softbox" },
|
|
77
|
+
interaction: "orbit",
|
|
78
|
+
acceptanceCriteria: ["product is centered and recognizable"]
|
|
79
|
+
} as const);
|
|
80
|
+
|
|
81
|
+
const compiled = compilePromptPlan(plan);
|
|
82
|
+
createAuraApp("#app", { scene: promptPlanToScene(plan), diagnostics: { overlay: true } });
|
|
83
|
+
console.log(compiled.report.visualSystems, compiled.report.repairHints);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
5. Read the compiled report before editing: `visualSystems` lists what the
|
|
87
|
+
compiled scene actually contains; `rejected` lists what the engine could
|
|
88
|
+
not do (each with a code such as `unsupported-effect`); `repairHints`
|
|
89
|
+
carries the `lookLint` findings; `negativeCriteria` lists what must not
|
|
90
|
+
ship. Repair from `repairHints` plus `aura3d look lint` output.
|
|
91
|
+
6. Controls go through `ui.*` helpers and must change rendered pixels; CSS and
|
|
92
|
+
DOM are UI only and never stand in for particles, bloom, trails, labels, or
|
|
93
|
+
renderer output.
|
|
94
|
+
7. Mount one app per route. Never dispose and recreate the app inside a frame
|
|
95
|
+
loop to animate values.
|
|
96
|
+
8. Normal mode only: collect `collectAuraSceneEvidence(scene)` or the kit
|
|
97
|
+
evidence, run `npm run build`, and hand screenshots and route health to
|
|
98
|
+
`aura3d-evidence-review`. The template `npm run test` gate runs Playwright;
|
|
99
|
+
run it in CI or on a remote runner, not on the local machine.
|
|
100
|
+
9. Weak screenshot: apply the repair hints (tighter framing, foreground and
|
|
101
|
+
background structure, key/fill/rim contrast, visible state) or switch back
|
|
102
|
+
to the matching kit before changing any label or claim.
|
|
103
|
+
|
|
104
|
+
## Look-dev loop
|
|
105
|
+
|
|
106
|
+
`aura3d look capture` → judge against `quality-bar.md` → `aura3d look lint` →
|
|
107
|
+
one change per round (lint first, then the weakest category). Full loop spec:
|
|
108
|
+
`aura3d-art-direction`.
|
|
109
|
+
|
|
110
|
+
## Stop and report
|
|
111
|
+
|
|
112
|
+
- The subject is a named real object with no typed asset key: stop, load
|
|
113
|
+
`aura3d-assets`, and label the scene `blocked` until the key exists.
|
|
114
|
+
- The only way to satisfy the prompt is a primitive stand-in for the primary
|
|
115
|
+
subject: stop and label it `prototype`.
|
|
116
|
+
- An effect, PBR, skinning, WebGPU, or postprocess claim has no pixel evidence
|
|
117
|
+
from a route importing only `@aura3d/engine`: drop the claim or label it
|
|
118
|
+
`prototype`.
|
|
119
|
+
- `npm run build` fails on an export you guessed: remove it and re-read the
|
|
120
|
+
type declarations. Do not add casts to force it through.
|
|
121
|
+
- Benchmark mode: stop after the build and report the runner-owned command.
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
|
|
125
|
+
- [Shared boundaries](../aura3d-core/references/boundaries.md)
|
|
126
|
+
- [Build playbook](https://github.com/auraoneai/aura3d/blob/main/docs/agents/build-playbook.md)
|
|
127
|
+
- [Prompt to 3D workflow](https://github.com/auraoneai/aura3d/blob/main/docs/agents/prompt-to-3d-workflow.md)
|
|
128
|
+
- [Benchmark recipes](https://github.com/auraoneai/aura3d/blob/main/docs/agents/benchmark-recipes.md)
|
|
129
|
+
- [Agent guide llms.txt](https://github.com/auraoneai/aura3d/blob/main/llms.txt)
|
|
130
|
+
- [Prompt recipes](https://aura3d.auraone.ai/docs/prompt-recipes.html)
|
|
131
|
+
- [Look recipes](../aura3d-art-direction/references/look-recipes.md)
|
|
132
|
+
- [Look by scene family](references/look-by-family.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Look by scene family
|
|
2
|
+
|
|
3
|
+
One look per scene family, matched to `aura3d-art-direction/references/look-recipes.md`
|
|
4
|
+
genres. Values are starting points; the look-dev loop refines them.
|
|
5
|
+
|
|
6
|
+
| Scene family | Look preset | Key light | Palette accent | Atmosphere | Post grade |
|
|
7
|
+
| --- | --- | --- | --- | --- | --- |
|
|
8
|
+
| Physics playground | `interior-industrial` | high window key, 60° elevation | safety orange on concrete | light haze for depth | `product-studio` |
|
|
9
|
+
| Particle fountain | `neon-night` | rim/back light through the spray | cyan-magenta emissive trail | thin fog catching bloom | `neon-night` |
|
|
10
|
+
| Solar system | `space` | single hard key from the sun | warm gold rim on planets | none — void is the look | `space` |
|
|
11
|
+
| Neon tunnel | `neon-arcade` | receding emissive rings | alternating ring hues | fog inside the tube | `neon-night` |
|
|
12
|
+
| Data visualization | `interior-neutral` | soft key over axis plane | single accent per series | none | `product-studio` |
|
|
13
|
+
| Mini golf | `outdoor-day` | warm afternoon key, 40° | turf greens + flag red | light fog on horizon | `daylight-outdoor` |
|
|
14
|
+
| Material lab | `product-studio` | triple softbox | neutral grey stage | none | `product-studio` |
|
|
15
|
+
| City block | `neon-night` | streetlight pools | sodium amber + sign neon | ground fog at street level | `neon-night` |
|
|
16
|
+
| Humanoid walk | `character-showcase` | 3/4 front key + rim | cloth accent color | light ground fog | `product-studio` |
|
|
17
|
+
| Product viewer | `product-studio` | hero softbox | brand accent on plinth | none | `product-studio` |
|
|
18
|
+
| Cinematic scene | `golden-hour` | low warm sun, 15° | teal shadow vs amber key | atmosphere haze layer | `cinematic-film` |
|
|
19
|
+
| Underwater | `underwater` | caustic shafts from surface | deep teal + biolume accent | volume haze, God rays | `underwater` |
|
|
20
|
+
|
|
21
|
+
## Reading the row
|
|
22
|
+
|
|
23
|
+
- Look preset supplies IBL, background, fog base and grade; the row's key and
|
|
24
|
+
palette entries are the scene-specific tweak you apply on top.
|
|
25
|
+
- Fog density belongs to the look until the capture shows depth banding — then
|
|
26
|
+
raise it in the look, not with ad-hoc `world.fog` nodes.
|
|
27
|
+
- Palette accent is one saturated color the eye can find fast; the rest of the
|
|
28
|
+
frame stays in the look's own grade.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aura3d-threejs-migration
|
|
3
|
+
description: Ports three.js code to Aura3D by picking the matching migration template, rewriting to `@aura3d/engine` public APIs, and recording every approximation in the migration notes without drop-in claims. Use when porting three.js or R3F code, reading `THREE.*` imports, running the `aura3d migrate three` codemod (`migrateThreeToA3D`), or scaffolding a migration template (formerly `three-compat-*`).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Aura3D three.js migration
|
|
7
|
+
|
|
8
|
+
Aura3D is not a three.js drop-in. The target of a migration is a route written
|
|
9
|
+
against `@aura3d/engine` public APIs. There is no installed compat shim
|
|
10
|
+
package — `@aura3d/three-compat` was deleted in 4.0.0 — so the migration
|
|
11
|
+
codemod plus an honest written record of what could not be reproduced is the
|
|
12
|
+
on-ramp. Shared rules (claim labels, forbidden patterns, typed assets) are in
|
|
13
|
+
[../aura3d-core/references/boundaries.md](../aura3d-core/references/boundaries.md).
|
|
14
|
+
|
|
15
|
+
## Look target
|
|
16
|
+
|
|
17
|
+
The migration replaces a hand-tuned renderer stack with a look preset: the
|
|
18
|
+
target genre's recipe row maps `toneMapping`, `scene.environment`, exposure and
|
|
19
|
+
fog into `looks.preset(<id>)` + `looks.appOptions(<id>)`. Keep the original
|
|
20
|
+
lighting intent visible in the migration notes rather than porting raw
|
|
21
|
+
toneMapping constants.
|
|
22
|
+
|
|
23
|
+
## Establish the contract
|
|
24
|
+
|
|
25
|
+
1. Run `npx @aura3d/cli@latest --help`, and check the installed
|
|
26
|
+
`@aura3d/engine` version. Name only exports you can see in its types.
|
|
27
|
+
2. Inventory the source: list every `three`, `three/examples/jsm/*`, and
|
|
28
|
+
`three/addons/*` import, plus any `WebGLRenderer`, render loop, loader, and
|
|
29
|
+
`EffectComposer` use. That list is the migration scope.
|
|
30
|
+
3. Read `src/aura-assets.ts`. Every GLB the old code loaded by URL must become
|
|
31
|
+
a typed asset (load `aura3d-assets`).
|
|
32
|
+
4. Benchmark mode: `npm install && npm run build`, then stop.
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
1. Pick the closest template and scaffold it with
|
|
37
|
+
`npx create-aura3d@latest <dir> --template <name>`:
|
|
38
|
+
|
|
39
|
+
| Source code looks like | Template |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| Hand-rolled starter: renderer, ground, lit primitives | `custom-scene` |
|
|
42
|
+
| Product on a studio stage | `premium-product-viewer` |
|
|
43
|
+
| Room or interior built from boxes | `architecture-interior` |
|
|
44
|
+
| Single asset on an inspection stage | `asset-inspector` |
|
|
45
|
+
| Character on a pedestal | `character-viewer` |
|
|
46
|
+
| Material swatch row | `material-authoring` |
|
|
47
|
+
| Bloom or emissive post pass | `postprocess-scene` |
|
|
48
|
+
| Many repeated meshes | `large-scene` |
|
|
49
|
+
|
|
50
|
+
The former `three-compat-*` names scaffold the same templates through a
|
|
51
|
+
deprecation alias (removed next minor). All eight templates import only
|
|
52
|
+
`@aura3d/engine`. Keep it that way.
|
|
53
|
+
2. Map each construct to the engine API. `createAuraApp` owns the renderer,
|
|
54
|
+
scene graph, camera, and frame loop, so delete them rather than port them.
|
|
55
|
+
|
|
56
|
+
| three.js | Aura3D |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `WebGLRenderer` plus a render loop | `createAuraApp("#app", { scene })` |
|
|
59
|
+
| `new Scene()` | `scene()` |
|
|
60
|
+
| `PerspectiveCamera` | `camera.perspective(...)` or `camera.orbit(...)` |
|
|
61
|
+
| `OrbitControls` | `interactions.orbit(...)` |
|
|
62
|
+
| Lights | `lights.*` |
|
|
63
|
+
| `MeshStandardMaterial` and friends | `material.*` |
|
|
64
|
+
| Mesh plus a glTF loader | `model(assets.x)` |
|
|
65
|
+
| Box, sphere, plane geometry (set dressing) | `primitives.*` |
|
|
66
|
+
| `EffectComposer` bloom | `effects.bloom(...)` |
|
|
67
|
+
|
|
68
|
+
3. When the port must stay three-shaped for a while, run the CLI codemod
|
|
69
|
+
and keep its output as a report, not as proof:
|
|
70
|
+
`aura3d migrate three "src/**/*.ts" --report` walks each file and prints
|
|
71
|
+
the per-construct verdicts; `--write` applies the rewrite in place. The
|
|
72
|
+
underlying adapter `migrateThreeToA3D(source)` returns `code`,
|
|
73
|
+
`rewrittenImports`, and `warnings`. Imports in `THREE_COMPAT_UNSUPPORTED_THREE_IMPORTS`
|
|
74
|
+
(`EffectComposer`, `RenderPass`, `UnrealBloomPass`, and others) are left
|
|
75
|
+
unchanged with a `postprocessing-unsupported` warning. Treat that as a
|
|
76
|
+
manual rewrite to `effects.*`, never as a pass.
|
|
77
|
+
4. Triage coverage from the codemod's warning list, not a matrix: the
|
|
78
|
+
import map `THREE_COMPAT_THREE_IMPORT_MAP` names every specifier the
|
|
79
|
+
codemod rewrites; anything three-shaped it leaves alone shows up in
|
|
80
|
+
`warnings` as `postprocessing-unsupported` or an unmapped import. Each
|
|
81
|
+
warning is the work item — a manual rewrite to `effects.*` or
|
|
82
|
+
`material.*`, never a pass.
|
|
83
|
+
5. There is no approximation ledger or compatibility matrix anymore — the
|
|
84
|
+
`@aura3d/three-compat` package was deleted in 4.0.0. For every construct
|
|
85
|
+
the codemod could not rewrite, record the approximation yourself in the
|
|
86
|
+
migration notes: what the three.js API did, what the Aura3D replacement
|
|
87
|
+
does, and the honest delta. For example, `MeshPhongMaterial`'s
|
|
88
|
+
Blinn-Phong specular maps to a native `material.*` preset with GGX —
|
|
89
|
+
write that delta down, do not imply equivalence.
|
|
90
|
+
6. Keep `three` out of the engine route. The shipped route must pass
|
|
91
|
+
`aura3d check-deploy --dist dist --source`; a `three` import anywhere in
|
|
92
|
+
the shipped tree fails the deploy check.
|
|
93
|
+
7. Write the migration notes: each supported API by name with the test that
|
|
94
|
+
covers it, each codemod warning and how it was resolved, and each dropped
|
|
95
|
+
or manually rewritten construct.
|
|
96
|
+
8. Build and verify: `npm run build`, then `npm run test` (the template's
|
|
97
|
+
route-health and screenshot specs; run on CI or a remote worker), then
|
|
98
|
+
`aura3d assets validate --source`. Hand claim wording to
|
|
99
|
+
`aura3d-evidence-review`.
|
|
100
|
+
|
|
101
|
+
## Stop and report
|
|
102
|
+
|
|
103
|
+
- The source depends on something with no engine equivalent (custom
|
|
104
|
+
`ShaderMaterial` passes, render targets, `EffectComposer` chains, or an
|
|
105
|
+
import the codemod leaves unmapped): stop and list each construct with the
|
|
106
|
+
codemod warning that flagged it. Do not fake it with CSS, a DOM overlay,
|
|
107
|
+
or a CPU pixel pass.
|
|
108
|
+
- A kept construct renders only approximately: it is not parity. Label that
|
|
109
|
+
part `prototype` or rewrite it natively.
|
|
110
|
+
- A codemod warning you cannot resolve: report it; do not silently keep the
|
|
111
|
+
three.js shape.
|
|
112
|
+
- The old code loaded a GLB by URL and no typed asset replaces it: stop and
|
|
113
|
+
hand off to `aura3d-assets`. Never keep the URL or use `unsafeModelUrl`.
|
|
114
|
+
- Never write "drop-in", "full parity", or "100% three.js compatible". Name
|
|
115
|
+
the specific supported API and the test that proves it.
|
|
116
|
+
|
|
117
|
+
## References
|
|
118
|
+
|
|
119
|
+
- [Migration guide and boundaries](https://github.com/auraoneai/aura3d/blob/main/docs/project/migration.md)
|
|
120
|
+
- [Migration codemod adapter](https://github.com/auraoneai/aura3d/blob/main/packages/aura3d-cli/src/migrate-three/ThreeToA3DAdapter.ts)
|
|
121
|
+
- [Codemod import map](https://github.com/auraoneai/aura3d/blob/main/packages/aura3d-cli/src/migrate-three/ImportMap.ts)
|
|
122
|
+
- [Codemod warnings](https://github.com/auraoneai/aura3d/blob/main/packages/aura3d-cli/src/migrate-three/CompatibilityWarnings.ts)
|
|
123
|
+
- [Codemod CLI command (`aura3d migrate three`)](https://github.com/auraoneai/aura3d/blob/main/packages/aura3d-cli/src/commands/prd15/index.ts)
|
|
124
|
+
- [Custom migration template](https://github.com/auraoneai/aura3d/blob/main/packages/create-aura3d/templates/custom-scene/src/main.ts)
|
|
125
|
+
- [three.js lighting stack → Aura3D look](references/look-mapping.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# three.js lighting stack → Aura3D look
|
|
2
|
+
|
|
3
|
+
The single largest visual change in a migration: a hand-assembled renderer,
|
|
4
|
+
lighting and post stack collapses into one look preset. Map by intent, not by
|
|
5
|
+
constant.
|
|
6
|
+
|
|
7
|
+
| three.js source pattern | Replaced by | Watch for |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `scene.environment` + PMREM + env map | the look's IBL | do not re-add a second environment — lint `look/no-ibl`/`double-aa` guards |
|
|
10
|
+
| `AmbientLight` (any intensity) | drop — the look fills ambient | re-adding it flattens the grade (`look/ambient-kills-ibl`) |
|
|
11
|
+
| `DirectionalLight` key + `castShadow` | the look's key (elevation/azimuth baked per genre) | a second DirectionalLight doubles the shadow read |
|
|
12
|
+
| `toneMapping`, `toneMappingExposure` | the look's `output.preset` | exposure moves inside the preset, not the renderer |
|
|
13
|
+
| `scene.fog = new Fog(...)` | the look's fog/atmosphere | recipe rows give per-genre density |
|
|
14
|
+
| `scene.background = color` | the look's backdrop | a solid color is `look/solid-void` unless declared |
|
|
15
|
+
| `EffectComposer` bloom/vignette | the look's post stack | do not stack `antiAlias`/post twice (`look/double-aa`) |
|
|
16
|
+
| `setPixelRatio` | `looks.appOptions(<id>)` DPR cap | `look/low-dpr` catches manual low ratios |
|
|
17
|
+
| `HemisphereLight` | the look fill (or `lights.hemisphere` when you must override) | hemisphere + IBL flattens (`look/ambient-flattens`) |
|
|
18
|
+
|
|
19
|
+
## Procedure tie-in
|
|
20
|
+
|
|
21
|
+
1. Delete the lighting/renderer block entirely, apply `looks.preset(<genre>)` +
|
|
22
|
+
`looks.appOptions(<genre>)`.
|
|
23
|
+
2. Recapture: the migrated scene's palette, shadow density and background come
|
|
24
|
+
from the look; the ledger records *intent deltas* (e.g. "original had a
|
|
25
|
+
cooler fill"), not constant deltas.
|
|
26
|
+
3. `aura3d look lint` catches the leftovers the ledger cannot: orphaned
|
|
27
|
+
fog nodes, double AA, ambient that kills the IBL.
|