create-aura3d 1.0.9 → 1.1.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/dist/cli.js +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -4
- package/templates/cartoon-channel/README.md +38 -0
- package/templates/cartoon-channel/aura.assets.json +1364 -0
- package/templates/cartoon-channel/package.json +3 -2
- package/templates/cartoon-channel/public/aura-assets/luma.047f5e5f.glb +0 -0
- package/templates/cartoon-channel/public/aura-assets/luma.thumb.svg +1 -0
- package/templates/cartoon-channel/public/aura-assets/miko.047f5e5f.glb +0 -0
- package/templates/cartoon-channel/public/aura-assets/miko.thumb.svg +1 -0
- package/templates/cartoon-channel/public/aura-assets/moon-garden-feature-frame.png +0 -0
- package/templates/cartoon-channel/src/aura-assets.ts +5 -11
- package/templates/cartoon-channel/src/concept-episode-2-5d.css +159 -0
- package/templates/cartoon-channel/src/concept-episode-2-5d.ts +155 -0
- package/templates/cartoon-channel/src/image-puppet-episode.css +290 -0
- package/templates/cartoon-channel/src/image-puppet-episode.ts +139 -0
- package/templates/cartoon-channel/src/main.ts +89 -71
- package/templates/cartoon-channel/src/puppet-episode-2d.css +526 -0
- package/templates/cartoon-channel/src/puppet-episode-2d.ts +189 -0
- package/templates/cartoon-channel/src/render-plan.ts +1 -1
- package/templates/cartoon-channel/src/sample-episode-visual.css +457 -0
- package/templates/cartoon-channel/src/sample-episode-visual.ts +185 -0
- package/templates/cartoon-channel/test-results/.last-run.json +4 -0
- package/templates/cartoon-channel/tests/concept-2-5d-animation.spec.ts +18 -0
- package/templates/cartoon-channel/tests/concept-2-5d.spec.ts +30 -0
- package/templates/cartoon-channel/tests/image-puppet-animation.spec.ts +18 -0
- package/templates/cartoon-channel/tests/image-puppet.spec.ts +29 -0
- package/templates/cartoon-channel/tests/puppet-2d-animation.spec.ts +18 -0
- package/templates/cartoon-channel/tests/puppet-2d.spec.ts +26 -0
- package/templates/cartoon-channel/tests/reports/prompt-animation/cartoon-sample-episode.png +0 -0
- package/templates/cartoon-channel/tests/sample-episode-visual.spec.ts +45 -0
- package/templates/cartoon-channel/tests/storyboard-playback.spec.ts +1 -1
- package/templates/cartoon-studio/README.md +82 -0
- package/templates/cartoon-studio/aura.assets.json +157 -0
- package/templates/cartoon-studio/index.html +13 -0
- package/templates/cartoon-studio/package.json +32 -0
- package/templates/cartoon-studio/playwright.config.ts +13 -0
- package/templates/cartoon-studio/public/aura-assets/luma.047f5e5f.glb +0 -0
- package/templates/cartoon-studio/public/aura-assets/luma.humanoid-fixture.glb +0 -0
- package/templates/cartoon-studio/public/aura-assets/luma.thumb.svg +1 -0
- package/templates/cartoon-studio/public/aura-assets/miko.047f5e5f.glb +0 -0
- package/templates/cartoon-studio/public/aura-assets/miko.thumb.svg +1 -0
- package/templates/cartoon-studio/public/aura-assets/moonGarden.gltf +183 -0
- package/templates/cartoon-studio/scripts/episode.ts +276 -0
- package/templates/cartoon-studio/src/aura-assets.ts +61 -0
- package/templates/cartoon-studio/src/characters.ts +65 -0
- package/templates/cartoon-studio/src/contract.ts +1 -0
- package/templates/cartoon-studio/src/episode-renderer.ts +605 -0
- package/templates/cartoon-studio/src/episode.ts +306 -0
- package/templates/cartoon-studio/src/main.ts +333 -0
- package/templates/cartoon-studio/src/render-plan.ts +567 -0
- package/templates/cartoon-studio/src/review.ts +99 -0
- package/templates/cartoon-studio/src/sets.ts +14 -0
- package/templates/cartoon-studio/src/studio.ts +101 -0
- package/templates/cartoon-studio/test-results/.last-run.json +4 -0
- package/templates/cartoon-studio/tests/episode-render.spec.ts +44 -0
- package/templates/cartoon-studio/tests/motion-quality.spec.ts +45 -0
- package/templates/cartoon-studio/tests/route-health.spec.ts +7 -0
- package/templates/cartoon-studio/tests/storyboard-playback.spec.ts +99 -0
- package/templates/cartoon-studio/tests/visual-review.spec.ts +21 -0
- package/templates/cartoon-studio/tsconfig.json +12 -0
- package/templates/cinematic-scene/package.json +1 -1
- package/templates/episode-builder/README.md +46 -0
- package/templates/episode-builder/index.html +13 -0
- package/templates/episode-builder/package.json +21 -0
- package/templates/episode-builder/playwright.config.ts +13 -0
- package/templates/episode-builder/src/aura-assets.ts +14 -0
- package/templates/episode-builder/src/builder.ts +78 -0
- package/templates/episode-builder/src/characters.ts +28 -0
- package/templates/episode-builder/src/contract.ts +1 -0
- package/templates/episode-builder/src/episode.ts +300 -0
- package/templates/episode-builder/src/main.ts +265 -0
- package/templates/episode-builder/src/render-plan.ts +405 -0
- package/templates/episode-builder/src/sets.ts +14 -0
- package/templates/episode-builder/tests/route-health.spec.ts +7 -0
- package/templates/episode-builder/tests/storyboard-playback.spec.ts +98 -0
- package/templates/episode-builder/tsconfig.json +12 -0
- package/templates/fighting-game/package.json +1 -1
- package/templates/fighting-game/src/game/stage.ts +18 -4
- package/templates/fighting-game/src/main.ts +3 -2
- package/templates/mini-game/package.json +1 -1
- package/templates/product-viewer/package.json +1 -1
- package/templates/product-viewer/tests/screenshot.spec.ts +8 -16
- package/templates/prompt-cartoon-channel/package.json +1 -1
|
@@ -12,16 +12,14 @@ test("Aura3D product viewer screenshot shows a prompt-aligned studio product", a
|
|
|
12
12
|
const profile = await canvas.evaluate((element) => {
|
|
13
13
|
const target = element as HTMLCanvasElement;
|
|
14
14
|
const gl = target.getContext("webgl2", { preserveDrawingBuffer: true });
|
|
15
|
-
if (!gl) return { error: "missing-webgl2",
|
|
15
|
+
if (!gl) return { error: "missing-webgl2", metalPixels: 0, warmAccentPixels: 0, centerObjectPixels: 0, saturatedStudioPixels: 0, uniqueBuckets: 0 };
|
|
16
16
|
const pixels = new Uint8Array(target.width * target.height * 4);
|
|
17
17
|
gl.readPixels(0, 0, target.width, target.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
|
|
18
18
|
const buckets = new Set<string>();
|
|
19
|
-
let cabinetPixels = 0;
|
|
20
|
-
let grillePixels = 0;
|
|
21
19
|
let metalPixels = 0;
|
|
22
|
-
let
|
|
23
|
-
let warmReflectionPixels = 0;
|
|
20
|
+
let warmAccentPixels = 0;
|
|
24
21
|
let centerObjectPixels = 0;
|
|
22
|
+
let saturatedStudioPixels = 0;
|
|
25
23
|
for (let y = 0; y < target.height; y += 4) {
|
|
26
24
|
for (let x = 0; x < target.width; x += 4) {
|
|
27
25
|
if (x > target.width * 0.76 && y > target.height * 0.74) continue;
|
|
@@ -32,29 +30,23 @@ test("Aura3D product viewer screenshot shows a prompt-aligned studio product", a
|
|
|
32
30
|
const luminance = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
33
31
|
if (luminance > 32) buckets.add(`${r >> 5}-${g >> 5}-${b >> 5}`);
|
|
34
32
|
const inProductWindow = x > target.width * 0.34 && x < target.width * 0.68 && y > target.height * 0.24 && y < target.height * 0.78;
|
|
35
|
-
const warmCabinetEdge = r > 105 && g > 72 && b > 48 && r > g * 1.08 && g > b * 1.08;
|
|
36
|
-
const darkCabinetBody = luminance > 10 && luminance < 62 && r >= b * 0.78 && g >= b * 0.64;
|
|
37
|
-
if (inProductWindow && (warmCabinetEdge || darkCabinetBody)) cabinetPixels += 1;
|
|
38
|
-
if (inProductWindow && r < 48 && g < 58 && b < 70 && luminance > 18) grillePixels += 1;
|
|
39
33
|
if (inProductWindow && r > 145 && g > 145 && b > 138 && Math.abs(r - g) < 32 && Math.abs(g - b) < 40) metalPixels += 1;
|
|
40
|
-
if (r >
|
|
41
|
-
if (r
|
|
34
|
+
if (r > 95 && g > 62 && b < 78 && r > g * 1.12) warmAccentPixels += 1;
|
|
35
|
+
if (Math.max(r, g, b) - Math.min(r, g, b) > 45 && luminance > 42) saturatedStudioPixels += 1;
|
|
42
36
|
if (inProductWindow && luminance > 32) centerObjectPixels += 1;
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
|
-
return {
|
|
39
|
+
return { metalPixels, warmAccentPixels, centerObjectPixels, saturatedStudioPixels, uniqueBuckets: buckets.size };
|
|
46
40
|
});
|
|
47
41
|
const screenshot = await page.screenshot({ fullPage: false });
|
|
48
42
|
mkdirSync(resolve("tests/reports"), { recursive: true });
|
|
49
43
|
writeFileSync(resolve("tests/reports/screenshot.png"), screenshot);
|
|
50
44
|
writeFileSync(resolve("tests/reports/screenshot.json"), `${JSON.stringify({ bytes: screenshot.byteLength, profile }, null, 2)}\n`);
|
|
51
45
|
expect(profile.error).toBeUndefined();
|
|
52
|
-
expect(profile.cabinetPixels).toBeGreaterThan(900);
|
|
53
|
-
expect(profile.grillePixels).toBeGreaterThan(60);
|
|
54
46
|
expect(profile.metalPixels).toBeGreaterThan(5);
|
|
55
|
-
expect(profile.
|
|
56
|
-
expect(profile.warmReflectionPixels).toBeGreaterThan(20);
|
|
47
|
+
expect(profile.warmAccentPixels).toBeGreaterThan(20);
|
|
57
48
|
expect(profile.centerObjectPixels).toBeGreaterThan(650);
|
|
49
|
+
expect(profile.saturatedStudioPixels).toBeGreaterThan(900);
|
|
58
50
|
expect(profile.uniqueBuckets).toBeGreaterThan(18);
|
|
59
51
|
expect(screenshot.byteLength).toBeGreaterThan(1000);
|
|
60
52
|
});
|