@aura3d/cli 3.0.1 → 4.0.2
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 +16 -15
- 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 +100 -4
- package/dist/asset-core-types.d.ts.map +1 -1
- package/dist/asset-inspection-types.d.ts +9 -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 +17 -5
- 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 +297 -73
- 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/admission.d.ts.map +1 -1
- package/dist/meshy/admission.js +32 -7
- package/dist/meshy/admission.js.map +1 -1
- package/dist/meshy/import.d.ts +7 -1
- package/dist/meshy/import.d.ts.map +1 -1
- package/dist/meshy/import.js +84 -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 +151 -0
- package/skills/aura3d-assets/references/preview-under-look.md +26 -0
- package/skills/aura3d-browser-game/SKILL.md +149 -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 +143 -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 +147 -0
- package/skills/manifest.json +163 -0
- package/skills/meshy-cli/SKILL.md +148 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* Moved verbatim from packages/three-compat/src/migration (PRD-15 T6.2); emitted import targets updated from the deleted @aura3d/three-compat package to @aura3d/engine. */
|
|
2
|
+
export const THREE_COMPAT_THREE_IMPORT_MAP = {
|
|
3
|
+
three: "@aura3d/engine",
|
|
4
|
+
"three/addons/controls/OrbitControls.js": "@aura3d/engine",
|
|
5
|
+
"three/examples/jsm/controls/OrbitControls.js": "@aura3d/engine",
|
|
6
|
+
"three/addons/loaders/GLTFLoader.js": "@aura3d/engine",
|
|
7
|
+
"three/examples/jsm/loaders/GLTFLoader.js": "@aura3d/engine"
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Three.js import specifiers this package deliberately does NOT rewrite.
|
|
11
|
+
*
|
|
12
|
+
* WS-3.4 deleted the threejs-compatibility postprocess tree because its passes
|
|
13
|
+
* reported success without touching a GPU. The remaining production passes
|
|
14
|
+
* (packages/rendering/src/production-runtime/postprocess) operate on CPU
|
|
15
|
+
* Uint8Array pixel buffers, not on GPU render targets, so they are not a
|
|
16
|
+
* behavioural substitute for Three.js EffectComposer. Aliasing the subpath to
|
|
17
|
+
* them would convert working Three.js code into non-working Aura3D code and
|
|
18
|
+
* report success — the exact failure WS-3.4 removed.
|
|
19
|
+
*
|
|
20
|
+
* Per R7, a migration surface must not preserve broken semantics to claim
|
|
21
|
+
* coverage. These specifiers are reported as unsupported and left untouched so
|
|
22
|
+
* the developer sees a real compile error at the import site rather than a
|
|
23
|
+
* silent behavioural regression at runtime.
|
|
24
|
+
*/
|
|
25
|
+
export const THREE_COMPAT_UNSUPPORTED_THREE_IMPORTS = [
|
|
26
|
+
"three/addons/postprocessing/EffectComposer.js",
|
|
27
|
+
"three/examples/jsm/postprocessing/EffectComposer.js",
|
|
28
|
+
"three/addons/postprocessing/RenderPass.js",
|
|
29
|
+
"three/examples/jsm/postprocessing/RenderPass.js",
|
|
30
|
+
"three/addons/postprocessing/UnrealBloomPass.js",
|
|
31
|
+
"three/examples/jsm/postprocessing/UnrealBloomPass.js",
|
|
32
|
+
"three/addons/postprocessing/ShaderPass.js",
|
|
33
|
+
"three/examples/jsm/postprocessing/ShaderPass.js"
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=ImportMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportMap.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/ImportMap.ts"],"names":[],"mappings":"AAAA,4KAA4K;AAC5K,MAAM,CAAC,MAAM,6BAA6B,GAAqC;IAC7E,KAAK,EAAE,gBAAgB;IACvB,wCAAwC,EAAE,gBAAgB;IAC1D,8CAA8C,EAAE,gBAAgB;IAChE,oCAAoC,EAAE,gBAAgB;IACtD,0CAA0C,EAAE,gBAAgB;CAC7D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAsB;IACvE,+CAA+C;IAC/C,qDAAqD;IACrD,2CAA2C;IAC3C,iDAAiD;IACjD,gDAAgD;IAChD,sDAAsD;IACtD,2CAA2C;IAC3C,iDAAiD;CAClD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ThreeCompatCompatibilityWarning } from "./CompatibilityWarnings.js";
|
|
2
|
+
/**
|
|
3
|
+
* R3F + CSS2D/CSS3D migration notes (muse3jsparity-PRD V1.4 + N4.3).
|
|
4
|
+
*
|
|
5
|
+
* Two explicit non-parity positions, documented where importers look:
|
|
6
|
+
*
|
|
7
|
+
* 1. No "R3F parity" claim. The covered-path mapping table lives in
|
|
8
|
+
* `@aura3d/react` (`R3F_TO_AURA_MIGRATION_TABLE`: Canvas, Model, Lights,
|
|
9
|
+
* Camera, Effect plus `useAuraFrame` / `useAuraApp` / suspense / events /
|
|
10
|
+
* the three drei recipes). This lab detects R3F/drei source and points at
|
|
11
|
+
* that table instead of rewriting imports it cannot honor.
|
|
12
|
+
* 2. No `CSS2DRenderer` / `CSS3DRenderer` parity (explicit 2.1 decision).
|
|
13
|
+
* `CSS2D_CSS3D_MANUAL_MAP` gives the manual mapping per renderer.
|
|
14
|
+
*/
|
|
15
|
+
/** Where the R3F mapping table lives. A pointer, not a copy — one source of truth. */
|
|
16
|
+
export declare const R3F_MIGRATION_TABLE_POINTER: string;
|
|
17
|
+
export interface Css2DCss3DManualMapping {
|
|
18
|
+
readonly three: "CSS2DRenderer" | "CSS3DRenderer";
|
|
19
|
+
readonly aura: string;
|
|
20
|
+
readonly steps: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Manual CSS2D/3D mapping for importers (N4 task 3).
|
|
24
|
+
*
|
|
25
|
+
* CSS2D annotations map onto world-anchored labels. CSS3D has no Aura
|
|
26
|
+
* equivalent — in-plane 3D text maps onto G1 SDF text, and anything beyond
|
|
27
|
+
* that keeps its CSS3DRenderer alongside the canvas (it is DOM; it composes).
|
|
28
|
+
*/
|
|
29
|
+
export declare const CSS2D_CSS3D_MANUAL_MAP: readonly Css2DCss3DManualMapping[];
|
|
30
|
+
/** Source-level R3F/drei/CSS2D/CSS3D detection for the migration lab. */
|
|
31
|
+
export declare function createR3fMigrationWarnings(source: string): readonly ThreeCompatCompatibilityWarning[];
|
|
32
|
+
//# sourceMappingURL=R3fMigration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"R3fMigration.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/R3fMigration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E;;;;;;;;;;;;GAYG;AAEH,sFAAsF;AACtF,eAAO,MAAM,2BAA2B,QAEyB,CAAC;AAElE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,uBAAuB,EAmBpE,CAAC;AAyBF,yEAAyE;AACzE,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,+BAA+B,EAAE,CAErG"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* R3F + CSS2D/CSS3D migration notes (muse3jsparity-PRD V1.4 + N4.3).
|
|
3
|
+
*
|
|
4
|
+
* Two explicit non-parity positions, documented where importers look:
|
|
5
|
+
*
|
|
6
|
+
* 1. No "R3F parity" claim. The covered-path mapping table lives in
|
|
7
|
+
* `@aura3d/react` (`R3F_TO_AURA_MIGRATION_TABLE`: Canvas, Model, Lights,
|
|
8
|
+
* Camera, Effect plus `useAuraFrame` / `useAuraApp` / suspense / events /
|
|
9
|
+
* the three drei recipes). This lab detects R3F/drei source and points at
|
|
10
|
+
* that table instead of rewriting imports it cannot honor.
|
|
11
|
+
* 2. No `CSS2DRenderer` / `CSS3DRenderer` parity (explicit 2.1 decision).
|
|
12
|
+
* `CSS2D_CSS3D_MANUAL_MAP` gives the manual mapping per renderer.
|
|
13
|
+
*/
|
|
14
|
+
/** Where the R3F mapping table lives. A pointer, not a copy — one source of truth. */
|
|
15
|
+
export const R3F_MIGRATION_TABLE_POINTER = "@aura3d/react exports R3F_TO_AURA_MIGRATION_TABLE (AuraCanvas components plus useAuraFrame/useAuraApp/suspense/events/drei recipes). " +
|
|
16
|
+
"That table maps covered paths; it is not an R3F-parity claim.";
|
|
17
|
+
/**
|
|
18
|
+
* Manual CSS2D/3D mapping for importers (N4 task 3).
|
|
19
|
+
*
|
|
20
|
+
* CSS2D annotations map onto world-anchored labels. CSS3D has no Aura
|
|
21
|
+
* equivalent — in-plane 3D text maps onto G1 SDF text, and anything beyond
|
|
22
|
+
* that keeps its CSS3DRenderer alongside the canvas (it is DOM; it composes).
|
|
23
|
+
*/
|
|
24
|
+
export const CSS2D_CSS3D_MANUAL_MAP = [
|
|
25
|
+
{
|
|
26
|
+
three: "CSS2DRenderer",
|
|
27
|
+
aura: "labels.* world-anchored screen-space labels",
|
|
28
|
+
steps: [
|
|
29
|
+
"Replace each CSS2DObject with labels.billboard() or labels.anchor() at the same world position.",
|
|
30
|
+
"Map CSS2DObject.visible = false to offscreenPolicy: \"hide\" (default is \"clamp\").",
|
|
31
|
+
"Occlusion dimming is on by default (occlusionAware); set occlusionAware: false to keep the old always-on-top CSS behavior."
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
three: "CSS3DRenderer",
|
|
36
|
+
aura: "no equivalent — G1 SDF text for in-plane text, otherwise keep CSS3DRenderer",
|
|
37
|
+
steps: [
|
|
38
|
+
"For text rendered in a 3D plane, use G1 SDF text (packages/rendering/src/SdfText.ts) with the uppercase alphanumeric catalog.",
|
|
39
|
+
"For annotations, use labels.* world-anchored labels instead.",
|
|
40
|
+
"Anything beyond those two keeps its CSS3DRenderer element alongside the AuraCanvas; it is DOM and composes without a migration."
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
const R3F_SOURCE_MARKERS = [
|
|
45
|
+
{
|
|
46
|
+
marker: "@react-three/fiber",
|
|
47
|
+
code: "r3f-manual",
|
|
48
|
+
message: `R3F imports are not rewritten. Map them manually with ${R3F_MIGRATION_TABLE_POINTER}`
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
marker: "@react-three/drei",
|
|
52
|
+
code: "drei-manual",
|
|
53
|
+
message: `drei imports are not rewritten. The three covered patterns are cameraControlsRecipe, environmentPresetRecipe, and transformGizmoRecipe in @aura3d/react; everything else stays on drei. ${R3F_MIGRATION_TABLE_POINTER}`
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
marker: "CSS2DRenderer",
|
|
57
|
+
code: "css2d-manual",
|
|
58
|
+
message: `CSS2DRenderer has no Aura parity target by explicit 2.1 decision. ${CSS2D_CSS3D_MANUAL_MAP[0]?.steps.join(" ") ?? ""}`
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
marker: "CSS3DRenderer",
|
|
62
|
+
code: "css3d-manual",
|
|
63
|
+
message: `CSS3DRenderer has no Aura parity target by explicit 2.1 decision. ${CSS2D_CSS3D_MANUAL_MAP[1]?.steps.join(" ") ?? ""}`
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
/** Source-level R3F/drei/CSS2D/CSS3D detection for the migration lab. */
|
|
67
|
+
export function createR3fMigrationWarnings(source) {
|
|
68
|
+
return R3F_SOURCE_MARKERS.filter(({ marker }) => source.includes(marker)).map(({ code, message }) => ({ code, message }));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=R3fMigration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"R3fMigration.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/R3fMigration.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,2BAA2B,GACtC,uIAAuI;IACvI,+DAA+D,CAAC;AAQlE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACxE;QACE,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,6CAA6C;QACnD,KAAK,EAAE;YACL,iGAAiG;YACjG,sFAAsF;YACtF,4HAA4H;SAC7H;KACF;IACD;QACE,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,6EAA6E;QACnF,KAAK,EAAE;YACL,+HAA+H;YAC/H,8DAA8D;YAC9D,iIAAiI;SAClI;KACF;CACF,CAAC;AAEF,MAAM,kBAAkB,GAA4F;IAClH;QACE,MAAM,EAAE,oBAAoB;QAC5B,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,yDAAyD,2BAA2B,EAAE;KAChG;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,2LAA2L,2BAA2B,EAAE;KAClO;IACD;QACE,MAAM,EAAE,eAAe;QACvB,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,qEAAqE,sBAAsB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE;KACjI;IACD;QACE,MAAM,EAAE,eAAe;QACvB,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,qEAAqE,sBAAsB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE;KACjI;CACF,CAAC;AAEF,yEAAyE;AACzE,MAAM,UAAU,0BAA0B,CAAC,MAAc;IACvD,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC5H,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createThreeCompatCompatibilityWarnings } from "./CompatibilityWarnings.js";
|
|
2
|
+
export interface ThreeCompatMigrationResult {
|
|
3
|
+
readonly code: string;
|
|
4
|
+
readonly rewrittenImports: number;
|
|
5
|
+
readonly warnings: ReturnType<typeof createThreeCompatCompatibilityWarnings>;
|
|
6
|
+
}
|
|
7
|
+
export declare function migrateThreeToA3D(source: string): ThreeCompatMigrationResult;
|
|
8
|
+
//# sourceMappingURL=ThreeToA3DAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreeToA3DAdapter.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/ThreeToA3DAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yBAAyB,CAAC;AAEjF,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,sCAAsC,CAAC,CAAC;CAC9E;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,0BAA0B,CAe5E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { THREE_COMPAT_THREE_IMPORT_MAP } from "./ImportMap.js";
|
|
2
|
+
import { createThreeCompatCompatibilityWarnings } from "./CompatibilityWarnings.js";
|
|
3
|
+
export function migrateThreeToA3D(source) {
|
|
4
|
+
let code = source;
|
|
5
|
+
let rewrittenImports = 0;
|
|
6
|
+
for (const [from, to] of Object.entries(THREE_COMPAT_THREE_IMPORT_MAP)) {
|
|
7
|
+
const before = code;
|
|
8
|
+
code = code.replaceAll(`from "${from}"`, `from "${to}"`).replaceAll(`from '${from}'`, `from '${to}'`);
|
|
9
|
+
if (code !== before)
|
|
10
|
+
rewrittenImports += 1;
|
|
11
|
+
}
|
|
12
|
+
code = code.replaceAll("new THREE.WebGLRenderer", "createThreeCompatRenderer");
|
|
13
|
+
code = code.replaceAll("renderer.setSize", "renderer.resize");
|
|
14
|
+
return {
|
|
15
|
+
code,
|
|
16
|
+
rewrittenImports,
|
|
17
|
+
warnings: createThreeCompatCompatibilityWarnings(source)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ThreeToA3DAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreeToA3DAdapter.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/ThreeToA3DAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,sCAAsC,EAAE,MAAM,yBAAyB,CAAC;AAQjF,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,IAAI,IAAI,GAAG,MAAM,CAAC;IAClB,IAAI,gBAAgB,GAAG,CAAC,CAAC;IACzB,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,6BAA6B,CAAC,EAAE,CAAC;QACvE,MAAM,MAAM,GAAG,IAAI,CAAC;QACpB,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,IAAI,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,SAAS,IAAI,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QACtG,IAAI,IAAI,KAAK,MAAM;YAAE,gBAAgB,IAAI,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,yBAAyB,EAAE,2BAA2B,CAAC,CAAC;IAC/E,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IAC9D,OAAO;QACL,IAAI;QACJ,gBAAgB;QAChB,QAAQ,EAAE,sCAAsC,CAAC,MAAM,CAAC;KACzD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — emitter for `aura3d migrate three`.
|
|
3
|
+
*
|
|
4
|
+
* Rewrites `from "three"` imports to the engine imports the emitted calls
|
|
5
|
+
* need, replaces each mapped `new THREE.X(...)` with its factory call, and
|
|
6
|
+
* inserts `// TODO(a3d-migrate)` comments above every unmapped construct so
|
|
7
|
+
* the output fails noisily instead of silently producing wrong code.
|
|
8
|
+
*/
|
|
9
|
+
export interface MigrateRow {
|
|
10
|
+
readonly construct: string;
|
|
11
|
+
readonly line: number;
|
|
12
|
+
readonly mapping: "exact" | "approximate" | "none";
|
|
13
|
+
readonly note: string;
|
|
14
|
+
}
|
|
15
|
+
export interface MigrateResult {
|
|
16
|
+
readonly code: string;
|
|
17
|
+
readonly rows: readonly MigrateRow[];
|
|
18
|
+
readonly rewrittenConstructs: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function emitMigratedSource(source: string): MigrateResult;
|
|
21
|
+
//# sourceMappingURL=emit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/emit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,CAAC;IACrC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAID,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAyEhE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — emitter for `aura3d migrate three`.
|
|
3
|
+
*
|
|
4
|
+
* Rewrites `from "three"` imports to the engine imports the emitted calls
|
|
5
|
+
* need, replaces each mapped `new THREE.X(...)` with its factory call, and
|
|
6
|
+
* inserts `// TODO(a3d-migrate)` comments above every unmapped construct so
|
|
7
|
+
* the output fails noisily instead of silently producing wrong code.
|
|
8
|
+
*/
|
|
9
|
+
import { threeMappingFor } from "./mappings.js";
|
|
10
|
+
import { parseThreeSource } from "./parse.js";
|
|
11
|
+
const UNSAFE_BARE_NAME = /^(?:Error|Map|Set|Promise|RegExp|Date|Number|String|Boolean|Array|Object)$/;
|
|
12
|
+
export function emitMigratedSource(source) {
|
|
13
|
+
const constructs = parseThreeSource(source);
|
|
14
|
+
const rows = [];
|
|
15
|
+
const neededImports = new Set();
|
|
16
|
+
const comments = new Map();
|
|
17
|
+
const rewrites = [];
|
|
18
|
+
let rewritten = 0;
|
|
19
|
+
for (const c of constructs) {
|
|
20
|
+
if (c.construct === "import")
|
|
21
|
+
continue; // handled at the end
|
|
22
|
+
if (c.specifier === "bare" && UNSAFE_BARE_NAME.test(c.construct))
|
|
23
|
+
continue;
|
|
24
|
+
const mapping = threeMappingFor(c.construct);
|
|
25
|
+
if (c.specifier === "bare" && !mapping)
|
|
26
|
+
continue; // not a THREE name — don't report local ctors
|
|
27
|
+
const row = rowFor(c, mapping);
|
|
28
|
+
rows.push(row);
|
|
29
|
+
if (mapping && mapping.mapping !== "none") {
|
|
30
|
+
rewritten++;
|
|
31
|
+
if (mapping.engineImport)
|
|
32
|
+
neededImports.add(mapping.engineImport);
|
|
33
|
+
if (c.construct.endsWith(".load")) {
|
|
34
|
+
// loader `.load(` calls get a comment, not a rewrite (the model() call needs a typed asset key)
|
|
35
|
+
pushComment(comments, c.line, `// TODO(a3d-migrate): ${c.construct} → ${mapping.target} — ${mapping.note}`);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const replacement = emitCall(mapping, c);
|
|
39
|
+
const needle = `new THREE.${c.construct}(${c.args})`;
|
|
40
|
+
const needleBare = `new ${c.construct}(${c.args})`;
|
|
41
|
+
if (source.includes(needle)) {
|
|
42
|
+
rewrites.push({ match: needle, replacement });
|
|
43
|
+
}
|
|
44
|
+
else if (source.includes(needleBare)) {
|
|
45
|
+
rewrites.push({ match: needleBare, replacement });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
pushComment(comments, c.line, `// TODO(a3d-migrate): no mapping for ${c.construct} — ${row.note}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
let code = source;
|
|
54
|
+
for (const { match, replacement } of rewrites) {
|
|
55
|
+
code = code.replaceAll(match, replacement);
|
|
56
|
+
}
|
|
57
|
+
// rewrite three imports
|
|
58
|
+
const importNames = [...neededImports].sort();
|
|
59
|
+
if (importNames.length > 0) {
|
|
60
|
+
let importWritten = false;
|
|
61
|
+
for (const c of constructs.filter((x) => x.construct === "import")) {
|
|
62
|
+
const spec = c.specifier ?? "";
|
|
63
|
+
if (spec === "three" || spec === "three/src/three.module.js") {
|
|
64
|
+
if (!importWritten) {
|
|
65
|
+
code = code.replace(/from\s+["']three["']/, `from "@aura3d/engine"`);
|
|
66
|
+
code = code.replace(/import\s+(?:\*\s+as\s+THREE|\{[^}]*\})\s+from\s+["']@aura3d\/engine["']/, `import { ${importNames.join(", ")} } from "@aura3d/engine"`);
|
|
67
|
+
importWritten = true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// three/addons/* specifier → TODO comment; the construct rows cover the rewrite
|
|
72
|
+
pushComment(comments, c.line, `// TODO(a3d-migrate): import specifier "${spec}" has no public Aura3D equivalent — resolve manually`);
|
|
73
|
+
rows.push({ construct: `import "${spec}"`, line: c.line, mapping: "none", note: "three/addons specifier is not rewritten; resolve the named export against @aura3d/engine manually." });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// splice comments (bottom-up so line numbers stay valid)
|
|
78
|
+
const codeLines = code.split("\n");
|
|
79
|
+
for (const [line, texts] of [...comments.entries()].sort((a, b) => b[0] - a[0])) {
|
|
80
|
+
const at = Math.min(line, codeLines.length);
|
|
81
|
+
codeLines.splice(Math.max(0, at - 1), 0, ...texts);
|
|
82
|
+
}
|
|
83
|
+
code = codeLines.join("\n");
|
|
84
|
+
rows.sort((a, b) => a.line - b.line);
|
|
85
|
+
return { code, rows, rewrittenConstructs: rewritten };
|
|
86
|
+
}
|
|
87
|
+
function rowFor(c, mapping) {
|
|
88
|
+
if (!mapping) {
|
|
89
|
+
return { construct: c.construct, line: c.line, mapping: "none", note: "no Aura3D equivalent in the T6.1 table; resolve manually." };
|
|
90
|
+
}
|
|
91
|
+
return { construct: c.construct, line: c.line, mapping: mapping.mapping, note: `${mapping.target} — ${mapping.note}` };
|
|
92
|
+
}
|
|
93
|
+
function emitCall(mapping, c) {
|
|
94
|
+
const args = c.args;
|
|
95
|
+
const todo = ` /* TODO(a3d-migrate): ${c.construct} — ${args ? `map args (${args}); ` : ""}${mapping.note} */`;
|
|
96
|
+
switch (mapping.construct) {
|
|
97
|
+
case "Euler": {
|
|
98
|
+
// Euler emits a tuple literal, valid as an expression.
|
|
99
|
+
const xyz = /,\s*['"]?XYZ['"]?\s*$/.test(args)
|
|
100
|
+
? args.replace(/,\s*['"]?XYZ['"]?\s*$/, "").trim()
|
|
101
|
+
: args;
|
|
102
|
+
return `[${xyz}]${args && xyz !== args ? "" : todo}`;
|
|
103
|
+
}
|
|
104
|
+
case "Vector3":
|
|
105
|
+
return `[${args}]${todo}`;
|
|
106
|
+
case "Color":
|
|
107
|
+
return `(${args}) /* a3d: ${mapping.target} */`;
|
|
108
|
+
default:
|
|
109
|
+
return `${mapping.target}()${todo}`;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function pushComment(map, line, text) {
|
|
113
|
+
const list = map.get(line) ?? [];
|
|
114
|
+
list.push(text);
|
|
115
|
+
map.set(line, list);
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=emit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/emit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAuB,MAAM,YAAY,CAAC;AAenE,MAAM,gBAAgB,GAAG,4EAA4E,CAAC;AAEtG,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAiB,EAAE,CAAC;IAC9B,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IACxC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC7C,MAAM,QAAQ,GAA+D,EAAE,CAAC;IAChF,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,SAAS,KAAK,QAAQ;YAAE,SAAS,CAAC,qBAAqB;QAC7D,IAAI,CAAC,CAAC,SAAS,KAA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E,CAAC;IACxC,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,GAA0B,EAAE,IAAY,EAAE,IAAY;IACzE,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — the Three.js → @aura3d/engine mapping table.
|
|
3
|
+
*
|
|
4
|
+
* Each entry covers one construct the migrator rewrites. "exact" means the
|
|
5
|
+
* target factory is a drop-in; "approximate" means semantics survive but
|
|
6
|
+
* options or framing differ; "none" rows are reported with a TODO comment
|
|
7
|
+
* and no rewrite.
|
|
8
|
+
*/
|
|
9
|
+
export interface ThreeMapping {
|
|
10
|
+
/** Construct key as produced by parse (e.g. "BoxGeometry", "GLTFLoader.load"). */
|
|
11
|
+
readonly construct: string;
|
|
12
|
+
/** Aura3D factory the construct maps to ("" for none). */
|
|
13
|
+
readonly target: string;
|
|
14
|
+
/** Engine namespace member the emitted code imports (for the rewritten import line). */
|
|
15
|
+
readonly engineImport?: string;
|
|
16
|
+
readonly mapping: "exact" | "approximate" | "none";
|
|
17
|
+
readonly note: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const THREE_TO_A3D_MAPPINGS: readonly ThreeMapping[];
|
|
20
|
+
export declare function threeMappingFor(construct: string): ThreeMapping | undefined;
|
|
21
|
+
//# sourceMappingURL=mappings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/mappings.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,YAAY;IAC3B,kFAAkF;IAClF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,YAAY,EA4BxD,CAAC;AAIF,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — the Three.js → @aura3d/engine mapping table.
|
|
3
|
+
*
|
|
4
|
+
* Each entry covers one construct the migrator rewrites. "exact" means the
|
|
5
|
+
* target factory is a drop-in; "approximate" means semantics survive but
|
|
6
|
+
* options or framing differ; "none" rows are reported with a TODO comment
|
|
7
|
+
* and no rewrite.
|
|
8
|
+
*/
|
|
9
|
+
export const THREE_TO_A3D_MAPPINGS = [
|
|
10
|
+
{ construct: "Scene", target: "scene", engineImport: "scene", mapping: "approximate", note: "THREE.Scene graph root maps to scene({ nodes }); node add/remove calls migrate to nodes[] entries." },
|
|
11
|
+
{ construct: "PerspectiveCamera", target: "camera.perspective", engineImport: "camera", mapping: "approximate", note: "fov maps 1:1; position/target move into camera spec options instead of set/lookAt calls." },
|
|
12
|
+
{ construct: "Mesh", target: "primitives", engineImport: "primitives", note: "Mesh is not a standalone object: emit the matching primitives.* or model() node and carry material over.", mapping: "approximate" },
|
|
13
|
+
{ construct: "BoxGeometry", target: "primitives.box", engineImport: "primitives", mapping: "approximate", note: "width/height/depth args map to a primitives.box size option; generated call keeps args in a TODO comment." },
|
|
14
|
+
{ construct: "SphereGeometry", target: "primitives.sphere", engineImport: "primitives", mapping: "approximate", note: "radius/segments args map to primitives.sphere options; generated call keeps args in a TODO comment." },
|
|
15
|
+
{ construct: "CylinderGeometry", target: "primitives.cylinder", engineImport: "primitives", mapping: "approximate", note: "radius/height args map to primitives.cylinder options; generated call keeps args in a TODO comment." },
|
|
16
|
+
{ construct: "PlaneGeometry", target: "primitives.plane", engineImport: "primitives", mapping: "approximate", note: "width/height args map to primitives.plane options; generated call keeps args in a TODO comment." },
|
|
17
|
+
{ construct: "TorusGeometry", target: "primitives.torus", engineImport: "primitives", mapping: "approximate", note: "radius/tube args map to primitives.torus options; generated call keeps args in a TODO comment." },
|
|
18
|
+
{ construct: "MeshStandardMaterial", target: "material.pbr", engineImport: "material", mapping: "approximate", note: "color/metalness/roughness map to material.pbr options; envMapIntensity semantics differ." },
|
|
19
|
+
{ construct: "MeshPhysicalMaterial", target: "material.physical", engineImport: "material", mapping: "approximate", note: "clearcoat, transmission and sheen survive as material.physical options (engine material-physical layer bounds them)." },
|
|
20
|
+
{ construct: "DirectionalLight", target: "lights.directional", engineImport: "lights", mapping: "approximate", note: "color/intensity map; position becomes a spec option and shadow becomes a boolean flag." },
|
|
21
|
+
{ construct: "PointLight", target: "lights.point", engineImport: "lights", mapping: "approximate", note: "color/intensity/distance map to lights.point options." },
|
|
22
|
+
{ construct: "SpotLight", target: "lights.spot", engineImport: "lights", mapping: "approximate", note: "angle/penumbra/decay/distance map to lights.spot options." },
|
|
23
|
+
{ construct: "AmbientLight", target: "lights.ambient", engineImport: "lights", mapping: "approximate", note: "color/intensity map to lights.ambient options." },
|
|
24
|
+
{ construct: "HemisphereLight", target: "lights.ambient", engineImport: "lights", mapping: "approximate", note: "sky/ground two-tone shading approximates to ambient until the lights.hemisphere contract lands; keep the pair of tints in the TODO comment." },
|
|
25
|
+
{ construct: "GLTFLoader", target: "", mapping: "none", note: "loader objects disappear — the load call becomes model(assets.<typedKey>); see the .load row." },
|
|
26
|
+
{ construct: "GLTFLoader.load", target: "model", engineImport: "model", mapping: "approximate", note: "loader.load(url) becomes model(assets.<typedKey>) — register the GLB via `aura3d assets add` and reference the generated asset key." },
|
|
27
|
+
{ construct: "RGBELoader", target: "", mapping: "none", note: "loader objects disappear — RGBELoader+PMREMGenerator collapses into environments.hdri; see the .load row." },
|
|
28
|
+
{ construct: "RGBELoader.load", target: "environments.hdri", engineImport: "environments", mapping: "approximate", note: "RGBELoader + PMREMGenerator collapses into environments.hdri({ texture: assets.<hdrKey> }); register the .hdr via `aura3d assets add`." },
|
|
29
|
+
{ construct: "OrbitControls", target: "camera.orbit", engineImport: "camera", mapping: "approximate", note: "OrbitControls target/damping maps to camera.orbit({ target, distance, fov }); per-frame input comes from the runtime, not listeners." },
|
|
30
|
+
{ construct: "InstancedMesh", target: "instances.box", engineImport: "instances", mapping: "approximate", note: "InstancedMesh maps to instances.<shape>({ transforms: [...] }); pick the instances factory matching the underlying geometry." },
|
|
31
|
+
{ construct: "Euler", target: "rotation", mapping: "approximate", note: "Euler('XYZ') order maps to rotation: [x, y, z] on the node builder; non-XYZ orders need quaternion composition — flagged in TODO." },
|
|
32
|
+
{ construct: "WebGLRenderer", target: "createAuraApp", engineImport: "createAuraApp", mapping: "approximate", note: "WebGLRenderer + render loop maps to createAuraApp({ scene }) lifecycle; setSize/animation loops fold into the app spec." },
|
|
33
|
+
{ construct: "Vector3", target: "[x, y, z]", mapping: "approximate", note: "Vector3 maps to AuraVec3 tuples; mutate via node builder position()/scale() instead of .set()." },
|
|
34
|
+
{ construct: "Color", target: "#rrggbb", mapping: "approximate", note: "THREE.Color maps to hex strings or [r,g,b] arrays in material/light options." },
|
|
35
|
+
{ construct: "TextureLoader.load", target: "assets", engineImport: "assets", mapping: "approximate", note: "TextureLoader.load(url) maps to a typed aura-assets texture ref (assets.<key>) plus material options." },
|
|
36
|
+
{ construct: "Clock", target: "useAuraFrame", mapping: "approximate", note: "THREE.Clock/getDelta folds into the frame callback's dt argument." },
|
|
37
|
+
];
|
|
38
|
+
const byConstruct = new Map(THREE_TO_A3D_MAPPINGS.map((m) => [m.construct, m]));
|
|
39
|
+
export function threeMappingFor(construct) {
|
|
40
|
+
return byConstruct.get(construct);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=mappings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/mappings.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,MAAM,CAAC,MAAM,qBAAqB,GAA4B;IAC5D,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,oGAAoG,EAAE;IAClM,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,oBAAoB,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,0FAA0F,EAAE;IAClN,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,0GAA0G,EAAE,OAAO,EAAE,aAAa,EAAE;IACjN,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,2GAA2G,EAAE;IAC7N,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,qGAAqG,EAAE;IAC7N,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,qGAAqG,EAAE;IACjO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,iGAAi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aAAa,EAAE,IAAI,EAAE,uGAAuG,EAAE;IACpN,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,mEAAmE,EAAE;CAClJ,CAAC;AAEF,MAAM,WAAW,GAAG,IAAI,GAAG,CAAuB,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtG,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — source scanner for `aura3d migrate three`.
|
|
3
|
+
*
|
|
4
|
+
* Line-oriented extraction of Three.js constructs: `new THREE.X(...)`,
|
|
5
|
+
* `new X(...)` for imported names, `IDENT.load(url)` for loaders, and
|
|
6
|
+
* `from "three"`-family import specifiers. Produces the construct list the
|
|
7
|
+
* emitter and report walk.
|
|
8
|
+
*/
|
|
9
|
+
export interface ThreeConstruct {
|
|
10
|
+
/** Three.js symbol or operation name, e.g. "Scene", "GLTFLoader.load". */
|
|
11
|
+
readonly construct: string;
|
|
12
|
+
/** 1-based source line where the construct occurs. */
|
|
13
|
+
readonly line: number;
|
|
14
|
+
/** Constructor-call argument source, trimmed ("" for non-ctor matches). */
|
|
15
|
+
readonly args: string;
|
|
16
|
+
/** Import specifier when the construct is an import ("three", "three/addons/…"). */
|
|
17
|
+
readonly specifier?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function parseThreeSource(source: string): ThreeConstruct[];
|
|
20
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAWD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAsCjE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — source scanner for `aura3d migrate three`.
|
|
3
|
+
*
|
|
4
|
+
* Line-oriented extraction of Three.js constructs: `new THREE.X(...)`,
|
|
5
|
+
* `new X(...)` for imported names, `IDENT.load(url)` for loaders, and
|
|
6
|
+
* `from "three"`-family import specifiers. Produces the construct list the
|
|
7
|
+
* emitter and report walk.
|
|
8
|
+
*/
|
|
9
|
+
const NEW_THREE = /\bnew\s+THREE\.([A-Za-z0-9_]+)\s*\(([^)]*)\)/g;
|
|
10
|
+
const NEW_BARE = /\bnew\s+([A-Za-z0-9_]+)\s*\(([^)]*)\)/g;
|
|
11
|
+
const EULER_ORDER = /\bnew\s+(?:THREE\.)?Euler\s*\(([^)]*)\)/g;
|
|
12
|
+
const LOADER_LOAD = /\b([A-Za-z0-9_]+)\.load\s*\(/g;
|
|
13
|
+
const LOADER_DECL = /\b(?:const|let|var)\s+([A-Za-z0-9_]+)\s*=\s*new\s+THREE\.([A-Za-z0-9_]+)/g;
|
|
14
|
+
const THREE_IMPORT = /\bfrom\s+["'](three(?:\/[^"']*)?)["']/g;
|
|
15
|
+
const LOADER_NAMES = new Set(["GLTFLoader", "RGBELoader", "TextureLoader", "CubeTextureLoader", "EXRLoader"]);
|
|
16
|
+
export function parseThreeSource(source) {
|
|
17
|
+
const constructs = [];
|
|
18
|
+
const lines = source.split("\n");
|
|
19
|
+
const seenLoaderTypes = new Set();
|
|
20
|
+
for (const m of source.matchAll(NEW_THREE))
|
|
21
|
+
seenLoaderTypes.add(m[1] ?? "");
|
|
22
|
+
// variable → loader type so `loader.load(...)` resolves to `GLTFLoader.load`
|
|
23
|
+
const varTypes = new Map();
|
|
24
|
+
for (const m of source.matchAll(LOADER_DECL))
|
|
25
|
+
varTypes.set(m[1] ?? "", m[2] ?? "");
|
|
26
|
+
lines.forEach((text, index) => {
|
|
27
|
+
const line = index + 1;
|
|
28
|
+
for (const m of text.matchAll(THREE_IMPORT)) {
|
|
29
|
+
constructs.push({ construct: "import", line, args: "", specifier: m[1] });
|
|
30
|
+
}
|
|
31
|
+
for (const m of text.matchAll(NEW_THREE)) {
|
|
32
|
+
constructs.push({ construct: m[1] ?? "", line, args: (m[2] ?? "").trim() });
|
|
33
|
+
}
|
|
34
|
+
for (const m of text.matchAll(EULER_ORDER)) {
|
|
35
|
+
// dedup with NEW_THREE: Euler already captured above if THREE.-prefixed
|
|
36
|
+
if (!text.slice(0, m.index).endsWith("THREE.")) {
|
|
37
|
+
constructs.push({ construct: "Euler", line, args: (m[1] ?? "").trim() });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
for (const m of text.matchAll(LOADER_LOAD)) {
|
|
41
|
+
const name = m[1] ?? "";
|
|
42
|
+
const resolved = varTypes.get(name) ?? (LOADER_NAMES.has(name) ? name : undefined);
|
|
43
|
+
if (resolved)
|
|
44
|
+
constructs.push({ construct: `${resolved}.load`, line, args: "" });
|
|
45
|
+
}
|
|
46
|
+
// bare `new X(...)` for names a bare-THREE import could declare
|
|
47
|
+
for (const m of text.matchAll(NEW_BARE)) {
|
|
48
|
+
const name = m[1] ?? "";
|
|
49
|
+
if (seenLoaderTypes.has(name))
|
|
50
|
+
continue;
|
|
51
|
+
constructs.push({ construct: name, line, args: (m[2] ?? "").trim(), specifier: "bare" });
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return constructs;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=parse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,MAAM,SAAS,GAAG,+CAA+C,CAAC;AAClE,MAAM,QAAQ,GAAG,wCAAwC,CAAC;AAC1D,MAAM,WAAW,GAAG,0CAA0C,CAAC;AAC/D,MAAM,WAAW,GAAG,+BAA+B,CAAC;AACpD,MAAM,WAAW,GAAG,2EAA2E,CAAC;AAChG,MAAM,YAAY,GAAG,wCAAwC,CAAC;AAE9D,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAC,CAAC;AAE9G,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,MAAM,UAAU,GAAqB,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IAC1C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5E,6EAA6E;IAC7E,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC;QAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAEnF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,E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C,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YACnF,IAAI,QAAQ;gBAAE,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,QAAQ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,gEAAgE;QAChE,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YACxC,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — report renderer for `aura3d migrate three`.
|
|
3
|
+
*
|
|
4
|
+
* Emits the per-construct row table ({construct, line, mapping, note}) as
|
|
5
|
+
* JSON plus a one-line summary count per mapping class.
|
|
6
|
+
*/
|
|
7
|
+
import type { MigrateRow } from "./emit.js";
|
|
8
|
+
export interface MigrateReport {
|
|
9
|
+
readonly rows: readonly MigrateRow[];
|
|
10
|
+
readonly counts: {
|
|
11
|
+
readonly exact: number;
|
|
12
|
+
readonly approximate: number;
|
|
13
|
+
readonly none: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function buildMigrateReport(rows: readonly MigrateRow[]): MigrateReport;
|
|
17
|
+
export declare function formatMigrateReport(report: MigrateReport): string;
|
|
18
|
+
//# sourceMappingURL=report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/report.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAClG;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,GAAG,aAAa,CAI7E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAEjE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD-15 T6.1 — report renderer for `aura3d migrate three`.
|
|
3
|
+
*
|
|
4
|
+
* Emits the per-construct row table ({construct, line, mapping, note}) as
|
|
5
|
+
* JSON plus a one-line summary count per mapping class.
|
|
6
|
+
*/
|
|
7
|
+
export function buildMigrateReport(rows) {
|
|
8
|
+
const counts = { exact: 0, approximate: 0, none: 0 };
|
|
9
|
+
for (const row of rows)
|
|
10
|
+
counts[row.mapping]++;
|
|
11
|
+
return { rows, counts };
|
|
12
|
+
}
|
|
13
|
+
export function formatMigrateReport(report) {
|
|
14
|
+
return JSON.stringify(report, null, 2);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/migrate-three/report.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,UAAU,kBAAkB,CAAC,IAA2B;IAC5D,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrD,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAqB;IACvD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SourceAdapter } from "@aura3d/asset-index";
|
|
2
|
-
export declare function buildSearchAdapters(env?: NodeJS.ProcessEnv): SourceAdapter[];
|
|
2
|
+
export declare function buildSearchAdapters(env?: NodeJS.ProcessEnv, projectDir?: string): SourceAdapter[];
|
|
3
3
|
export declare function buildDeepLinkAdapter(): SourceAdapter | undefined;
|
|
4
4
|
//# sourceMappingURL=adapters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/pull-bridge/adapters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../../../packages/aura3d-cli/src/pull-bridge/adapters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAiBzD,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,UAAU,GAAE,MAAsB,GACjC,aAAa,EAAE,CAoCjB;AAED,wBAAgB,oBAAoB,IAAI,aAAa,GAAG,SAAS,CAGhE"}
|