@aura3d/cli 4.1.2 → 4.1.3
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/data/root-export-dispositions.json +39 -0
- package/dist/commands/evidence/index.d.ts +3 -0
- package/dist/commands/evidence/index.d.ts.map +1 -0
- package/dist/commands/evidence/index.js +12 -0
- package/dist/commands/evidence/index.js.map +1 -0
- package/dist/commands/evidence/judge.d.ts +18 -0
- package/dist/commands/evidence/judge.d.ts.map +1 -0
- package/dist/commands/evidence/judge.js +194 -0
- package/dist/commands/evidence/judge.js.map +1 -0
- package/dist/commands/evidence/judgeLib.d.ts +84 -0
- package/dist/commands/evidence/judgeLib.d.ts.map +1 -0
- package/dist/commands/evidence/judgeLib.js +178 -0
- package/dist/commands/evidence/judgeLib.js.map +1 -0
- package/dist/commands/registry.d.ts +1 -0
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/registry.js +1 -0
- package/dist/commands/registry.js.map +1 -1
- package/dist/look/capture.d.ts +15 -7
- package/dist/look/capture.d.ts.map +1 -1
- package/dist/look/capture.js +85 -13
- package/dist/look/capture.js.map +1 -1
- package/package.json +5 -5
- package/skills/aura3d-art-direction/SKILL.md +5 -1
- package/skills/aura3d-assets/SKILL.md +9 -15
- package/skills/aura3d-assets/references/preview-under-look.md +16 -0
- package/skills/aura3d-browser-game/SKILL.md +18 -22
- package/skills/aura3d-browser-game/references/genre-gates.md +11 -0
- package/skills/aura3d-browser-game/references/genre-looks.md +48 -0
- package/skills/aura3d-character-animation/SKILL.md +8 -2
- package/skills/aura3d-core/SKILL.md +17 -15
- package/skills/aura3d-evidence-review/SKILL.md +11 -2
- package/skills/aura3d-materials-environments/SKILL.md +25 -19
- package/skills/aura3d-performance/SKILL.md +19 -11
- package/skills/aura3d-retexture/SKILL.md +4 -3
- package/skills/aura3d-scene-authoring/SKILL.md +15 -15
- package/skills/aura3d-threejs-migration/SKILL.md +10 -2
- package/skills/llms.txt +104 -216
- package/skills/meshy-cli/SKILL.md +33 -32
- package/skills/meshy-cli/references/asset-tooling.md +23 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aura3d-materials-environments
|
|
3
|
-
description: Chooses and verifies surface looks and lighting environments: built-in `material.*`, `environments.*`, `sky.dayNight`, `weather`, and `water` first, then licensed local textures or HDRIs admitted with `assets add --type texture`, with seam, PBR-channel, and visual-QA checks. Use when a route needs a material, texture set, PBR maps, HDRI or IBL, skybox, night or daytime sky, rain, snow, water, KTX2 textures
|
|
3
|
+
description: Chooses and verifies surface looks and lighting environments: built-in `material.*`, `environments.*`, `sky.dayNight`, `weather`, and `water` first, then licensed local textures or HDRIs admitted with `assets add --type texture`, with seam, PBR-channel, and visual-QA checks. Use when a route needs a material, texture set, PBR maps, HDRI or IBL, skybox, night or daytime sky, rain, snow, water, or KTX2 textures.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Aura3D materials and environments
|
|
@@ -25,10 +25,14 @@ descend into manual environments when the look cannot express the mood.
|
|
|
25
25
|
`--type texture|environment` option.
|
|
26
26
|
2. Read `src/aura-assets.ts` and `aura.assets.json`. Map slots take typed
|
|
27
27
|
`assets.<key>` refs only, never a URL string.
|
|
28
|
-
3. Check the installed `@aura3d/engine
|
|
29
|
-
`@aura3d/environments`
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
3. Check the installed `@aura3d/engine` version. `@aura3d/materials` and
|
|
29
|
+
`@aura3d/environments` were retired in 4.0.0: everything here ships from
|
|
30
|
+
`@aura3d/engine` (`material`, `environments`, `sky`, `weather`, `water`,
|
|
31
|
+
`looks`). The Node-side material and HDRI validators (names such as
|
|
32
|
+
`validateGameReadyMaterialPreset`, `inspectProductionHDR`) live in
|
|
33
|
+
`packages/engine/src/devtools/` and are not exported from the root or the
|
|
34
|
+
`@aura3d/engine/devtools` subpath, so do not import them from a project;
|
|
35
|
+
use the capture checks below.
|
|
32
36
|
4. Benchmark mode: `npm install && npm run build`, then stop.
|
|
33
37
|
|
|
34
38
|
## Procedure
|
|
@@ -54,11 +58,12 @@ Step 1, presets (always try first):
|
|
|
54
58
|
`weather.wetGround(...)`; `water.surface({ preset: "calm" | "moderate" |
|
|
55
59
|
"rough" | "storm" })`. Add their `nodes` with `scene().addMany(...)` and use
|
|
56
60
|
the returned `background`.
|
|
57
|
-
4.
|
|
58
|
-
|
|
59
|
-
`
|
|
60
|
-
preset
|
|
61
|
-
|
|
61
|
+
4. Choosing values: start from `material.presets()` and the named builders
|
|
62
|
+
above (car paint is `material.clearcoatPaint`, thin glass is
|
|
63
|
+
`material.glass`, brushed metal is `material.brushedMetal`); the in-repo
|
|
64
|
+
preset library (`GAME_READY_MATERIAL_PRESETS` in
|
|
65
|
+
`packages/engine/src/devtools/materials/MaterialValidation.ts`) is a source
|
|
66
|
+
reference for values, not an import.
|
|
62
67
|
|
|
63
68
|
Step 2, a licensed local file (Poly Haven or another CC0 / CC-BY source you
|
|
64
69
|
downloaded yourself):
|
|
@@ -89,11 +94,10 @@ route `prototype` until the checks below pass.
|
|
|
89
94
|
|
|
90
95
|
Checks (all steps):
|
|
91
96
|
|
|
92
|
-
8. HDRI file:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
warnings.
|
|
97
|
+
8. HDRI file: it must be a Radiance `.hdr` with a 2:1 aspect ratio (check with
|
|
98
|
+
`file` or an image viewer before `assets add`); `assets add` records the
|
|
99
|
+
hash, and `assets validate` fails on a missing or changed file. Watch the
|
|
100
|
+
console for memory and PMREM warnings on the first load.
|
|
97
101
|
9. Equirect seam: capture the sky at a yaw that puts the left and right edge
|
|
98
102
|
in frame and confirm no visible seam. `environments.hdri` renders a
|
|
99
103
|
procedural studio fallback first and swaps in the HDRI after load, so
|
|
@@ -108,8 +112,10 @@ Checks (all steps):
|
|
|
108
112
|
renderer coverage exists only for selected tested cases. Keep a
|
|
109
113
|
PNG/JPG fallback, and make no compression or memory claim without a
|
|
110
114
|
route-level capture.
|
|
111
|
-
13. Screenshots (normal mode only) run through `npm run test` on
|
|
112
|
-
|
|
115
|
+
13. Screenshots (normal mode only) run through `npm run test` on a remote
|
|
116
|
+
runner, never local Playwright or GitHub Actions (`RUN_ID=mat-1
|
|
117
|
+
SPECS="tests/browser/<route>.spec.ts" tools/remote-acr/run.sh` in the
|
|
118
|
+
Aura3D repository). Hand the claim label to `aura3d-evidence-review`.
|
|
113
119
|
|
|
114
120
|
14. Custom shaders (`material.custom`): write linear light, use
|
|
115
121
|
`#include <colorspace_decode>` with `toneMapping: "none"` for authored hex
|
|
@@ -119,8 +125,8 @@ Checks (all steps):
|
|
|
119
125
|
|
|
120
126
|
## Look-dev loop
|
|
121
127
|
|
|
122
|
-
|
|
123
|
-
lint`. Judge only frames where the HDRI actually loaded (`iblPixelBacked`
|
|
128
|
+
Capture (remote runner, see `aura3d-art-direction`) → judge against the
|
|
129
|
+
quality-bar rubric → `aura3d look lint`. Judge only frames where the HDRI actually loaded (`iblPixelBacked`
|
|
124
130
|
true); a seam visible in one capture re-checks at a different yaw. One change
|
|
125
131
|
per round.
|
|
126
132
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
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 }`, `
|
|
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 }`, `scene kit budgets`, `instances.*`, `distanceLod`, `text3D`, KTX2 texture compression, BUNDLE_SIZES, `doctor`, or `check-deploy`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Aura3D performance
|
|
@@ -24,10 +24,15 @@ manual quality override invalidates every measurement that follows.
|
|
|
24
24
|
2. Read `src/aura-assets.ts` and `aura.assets.json`. Note each asset's
|
|
25
25
|
`sizeBytes`, texture list, and bounds; heavy GLBs and uncompressed textures
|
|
26
26
|
are usually the first cost.
|
|
27
|
-
3. Check which entry the app imports.
|
|
28
|
-
|
|
29
|
-
`@aura3d/engine`
|
|
30
|
-
|
|
27
|
+
3. Check which entry the app imports. `@aura3d/lean` was retired in 4.0.0
|
|
28
|
+
(the package is a deprecated shim), so import from `@aura3d/engine` and its
|
|
29
|
+
subpaths (`@aura3d/engine/game`, `@aura3d/engine/devtools`). Size is a known
|
|
30
|
+
weak spot: a one-cube app built from 4.1.2 measured 3,841 KB raw JS (1,089 KB
|
|
31
|
+
gzip) over about 25 requests, against 496 KB / 125 KB for the equivalent
|
|
32
|
+
three.js app (`evidence/vs-threejs/RESULTS.md`, section 4), and
|
|
33
|
+
`BUNDLE_SIZES.md` records the engine critical path failing its budget.
|
|
34
|
+
Import only what the route uses and keep devtools and cinematic helpers out
|
|
35
|
+
of the critical path.
|
|
31
36
|
4. Decide the mode. Benchmark mode: `npm install && npm run build`, then stop.
|
|
32
37
|
No profiling, dev server, or browser capture from the agent.
|
|
33
38
|
|
|
@@ -42,17 +47,18 @@ manual quality override invalidates every measurement that follows.
|
|
|
42
47
|
The app's diagnostics report `backend`, `fps`, `drawCalls`, `renderSize`,
|
|
43
48
|
asset load states, `warnings`, and `errors`. Record them with the viewport,
|
|
44
49
|
device, and route so the finding reproduces.
|
|
45
|
-
2. Compare against the budget for the kit you started from
|
|
50
|
+
2. Compare against the budget for the kit you started from. Each scene kit
|
|
51
|
+
reports its own budget in its `diagnostics`:
|
|
46
52
|
|
|
47
53
|
```ts
|
|
48
|
-
import {
|
|
54
|
+
import { sceneKits } from "@aura3d/engine";
|
|
49
55
|
|
|
50
|
-
console.log(sceneKitPerformanceBudget("miniGolf"));
|
|
51
56
|
console.log(sceneKits.miniGolf().diagnostics);
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
Budgets carry `maxDrawCalls`, `estimatedDrawCalls`, `maxGzipBytes`, and
|
|
55
60
|
`targetP50Fps`. FPS targets require calibration on the measuring machine.
|
|
61
|
+
(There is no root `sceneKitPerformanceBudget` export; do not import one.)
|
|
56
62
|
3. Many repeated objects: replace per-node primitives with one `instances.box`
|
|
57
63
|
(or `instances.sphere`, `instances.plane`, `instances.cylinder`,
|
|
58
64
|
`instances.capsule`, `instances.torus`) node with a transform list. Advanced
|
|
@@ -83,13 +89,15 @@ manual quality override invalidates every measurement that follows.
|
|
|
83
89
|
8. Textures: prefer KTX2/Basis-compressed textures supplied through typed
|
|
84
90
|
assets. Compression support is bounded to the tested decoder paths; verify
|
|
85
91
|
in the browser before claiming a memory or load-time win.
|
|
86
|
-
9. Bundle:
|
|
87
|
-
|
|
92
|
+
9. Bundle: avoid pulling devtools or cinematic helpers into the critical path
|
|
93
|
+
and measure with a production `vite build`. In the Aura3D monorepo,
|
|
88
94
|
`pnpm check:bundle-size` regenerates BUNDLE_SIZES; never raise a budget to
|
|
89
95
|
manufacture a pass.
|
|
90
96
|
10. Ship check: `npm run build`, then
|
|
91
97
|
`npx @aura3d/cli@latest check-deploy --dist dist`. Browser frame-time and
|
|
92
|
-
screenshot runs (`npm run test`, Playwright) go to
|
|
98
|
+
screenshot runs (`npm run test`, Playwright) go to a remote runner, never
|
|
99
|
+
local Playwright or GitHub Actions (`tools/remote-acr/run.sh` in the Aura3D
|
|
100
|
+
repository).
|
|
93
101
|
|
|
94
102
|
## Stop and report
|
|
95
103
|
|
|
@@ -82,8 +82,8 @@ again under the real grade.
|
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Carry the source license forward; a derived file inherits its terms.
|
|
85
|
-
6. Capture the filmstrip (normal mode,
|
|
86
|
-
|
|
85
|
+
6. Capture the filmstrip (normal mode, on a remote runner: `tools/remote-acr/run.sh`
|
|
86
|
+
in the monorepo, never local Playwright): the same camera, lights, environment, exposure, and viewport for
|
|
87
87
|
before and after, 3 to 5 fixed views, for example
|
|
88
88
|
`camera.frameAsset(assets.source)` plus fixed `camera.perspective(...)`
|
|
89
89
|
positions. Only the asset key may differ between the paired frames. Place
|
|
@@ -112,4 +112,5 @@ again under the real grade.
|
|
|
112
112
|
- [Geometry hash script](references/geometry-hash.mjs)
|
|
113
113
|
- [Asset workflow and `assets inspect`](https://github.com/auraoneai/aura3d/blob/main/docs/agents/asset-workflow.md)
|
|
114
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`.
|
|
115
|
+
- Meshy retexture runs (10 credits, reserve in `aura3d meshy ledger`), approval, and `--max-credits`: load `meshy-cli`.
|
|
116
|
+
- [Asset workflow](https://github.com/auraoneai/aura3d/blob/main/docs/agents/asset-workflow.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aura3d-scene-authoring
|
|
3
|
-
description: Turns a scene prompt into editable `@aura3d/engine` source by picking a scene kit or prompt plan,
|
|
3
|
+
description: Turns a scene prompt into editable `@aura3d/engine` source by picking a scene kit or prompt plan, mounting it, and repairing weak screenshots with the look-dev loop. Use when writing a scene or route from a prompt, choosing among `sceneKits.*`, `prefabs.*`, or `primitives.*`, or using `definePromptPlan` or `promptPlanToScene`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Aura3D scene authoring
|
|
@@ -66,7 +66,7 @@ look renders flat on a void.
|
|
|
66
66
|
4. Plan path, when the prompt is product intent rather than a kit family:
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
|
-
import {
|
|
69
|
+
import { createAuraApp, definePromptPlan, promptPlanToScene } from "@aura3d/engine";
|
|
70
70
|
import { assets } from "./aura-assets";
|
|
71
71
|
|
|
72
72
|
const plan = definePromptPlan({
|
|
@@ -78,28 +78,26 @@ look renders flat on a void.
|
|
|
78
78
|
acceptanceCriteria: ["product is centered and recognizable"]
|
|
79
79
|
} as const);
|
|
80
80
|
|
|
81
|
-
const compiled = compilePromptPlan(plan);
|
|
82
81
|
createAuraApp("#app", { scene: promptPlanToScene(plan), diagnostics: { overlay: true } });
|
|
83
|
-
console.log(compiled.report.visualSystems, compiled.report.repairHints);
|
|
84
82
|
```
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
`compilePromptPlan` is deprecated with no replacement (removed in 5.0.0): do
|
|
85
|
+
not use it in new code.
|
|
86
|
+
5. Judge the first frame, not the build. Repair from `kit.diagnostics`, the
|
|
87
|
+
console warnings and `aura3d look lint` output; each warning names its cause.
|
|
88
|
+
`prefabs.*` return node arrays, so mount them with `scene().addMany(...)`.
|
|
91
89
|
6. Controls go through `ui.*` helpers and must change rendered pixels; CSS and
|
|
92
90
|
DOM are UI only and never stand in for particles, bloom, trails, labels, or
|
|
93
91
|
renderer output.
|
|
94
92
|
7. Mount one app per route. Never dispose and recreate the app inside a frame
|
|
95
93
|
loop to animate values.
|
|
96
|
-
8. Normal mode only: collect `collectAuraSceneEvidence(scene)`
|
|
97
|
-
evidence, run `npm run build`, and hand screenshots and route health to
|
|
94
|
+
8. Normal mode only: collect `collectAuraSceneEvidence(scene)` (import it from
|
|
95
|
+
`@aura3d/engine/devtools`; the root export is deprecated) or the kit evidence, run `npm run build`, and hand screenshots and route health to
|
|
98
96
|
`aura3d-evidence-review`. The template `npm run test` gate runs Playwright;
|
|
99
97
|
run it in CI or on a remote runner, not on the local machine.
|
|
100
|
-
9. Weak screenshot:
|
|
101
|
-
background structure, key/fill/rim contrast, visible state) or switch
|
|
102
|
-
to the matching kit before changing any label or claim.
|
|
98
|
+
9. Weak screenshot: fix the single biggest issue (tighter framing, foreground
|
|
99
|
+
and background structure, key/fill/rim contrast, visible state) or switch
|
|
100
|
+
back to the matching kit before changing any label or claim.
|
|
103
101
|
|
|
104
102
|
## Look-dev loop
|
|
105
103
|
|
|
@@ -123,7 +121,9 @@ one change per round (lint first, then the weakest category). Full loop spec:
|
|
|
123
121
|
## References
|
|
124
122
|
|
|
125
123
|
- [Shared boundaries](../aura3d-core/references/boundaries.md)
|
|
126
|
-
- [
|
|
124
|
+
- [Recipes](https://github.com/auraoneai/aura3d/blob/main/docs/agents/recipes.md) (complete compiled scenes for the common tasks: copy one, then adapt; read this before opening any `dist/` file)
|
|
125
|
+
- [Agent quickstart](https://github.com/auraoneai/aura3d/blob/main/docs/agents/agent-quickstart.md) (zero to a rendering scene, mistakes agents make)
|
|
126
|
+
- [Build playbook](https://github.com/auraoneai/aura3d/blob/main/docs/agents/build-playbook.md) (games and assets)
|
|
127
127
|
- [Prompt to 3D workflow](https://github.com/auraoneai/aura3d/blob/main/docs/agents/prompt-to-3d-workflow.md)
|
|
128
128
|
- [Benchmark recipes](https://github.com/auraoneai/aura3d/blob/main/docs/agents/benchmark-recipes.md)
|
|
129
129
|
- [Agent guide llms.txt](https://github.com/auraoneai/aura3d/blob/main/llms.txt)
|
|
@@ -67,8 +67,14 @@ toneMapping constants.
|
|
|
67
67
|
|
|
68
68
|
3. When the port must stay three-shaped for a while, run the CLI codemod
|
|
69
69
|
and keep its output as a report, not as proof:
|
|
70
|
-
`aura3d migrate three "src/**/*.ts"
|
|
71
|
-
the per-construct verdicts
|
|
70
|
+
`aura3d migrate three "src/**/*.ts"` walks each file and prints
|
|
71
|
+
the per-construct verdicts (`--report` is accepted and is the default);
|
|
72
|
+
`--write` saves the annotated rewrite in place. The rewrite does not
|
|
73
|
+
compile as is: on the benchmark PBR viewer it emitted
|
|
74
|
+
`const scene = scene()` and left `renderer.*` and `THREE.*` references, so
|
|
75
|
+
finish the port by hand. The verified 40-API mapping, measured codemod
|
|
76
|
+
output and a before and after are in
|
|
77
|
+
[docs/migration/from-threejs.md](https://github.com/auraoneai/aura3d/blob/main/docs/migration/from-threejs.md). The
|
|
72
78
|
underlying adapter `migrateThreeToA3D(source)` returns `code`,
|
|
73
79
|
`rewrittenImports`, and `warnings`. Imports in `THREE_COMPAT_UNSUPPORTED_THREE_IMPORTS`
|
|
74
80
|
(`EffectComposer`, `RenderPass`, `UnrealBloomPass`, and others) are left
|
|
@@ -116,6 +122,8 @@ toneMapping constants.
|
|
|
116
122
|
|
|
117
123
|
## References
|
|
118
124
|
|
|
125
|
+
- [Verified mapping, codemod limits, measured before and after](https://github.com/auraoneai/aura3d/blob/main/docs/migration/from-threejs.md)
|
|
126
|
+
- [Honest comparison with three.js](https://github.com/auraoneai/aura3d/blob/main/docs/aura3d-vs-threejs.md)
|
|
119
127
|
- [Migration guide and boundaries](https://github.com/auraoneai/aura3d/blob/main/docs/project/migration.md)
|
|
120
128
|
- [Migration codemod adapter](https://github.com/auraoneai/aura3d/blob/main/packages/aura3d-cli/src/migrate-three/ThreeToA3DAdapter.ts)
|
|
121
129
|
- [Codemod import map](https://github.com/auraoneai/aura3d/blob/main/packages/aura3d-cli/src/migrate-three/ImportMap.ts)
|