create-aura3d 1.0.10 → 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/package.json +1 -1
- package/templates/cartoon-channel/README.md +38 -0
- package/templates/cartoon-channel/aura.assets.json +1364 -0
- package/templates/cartoon-channel/package.json +2 -1
- 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 +36 -0
- package/templates/cartoon-studio/aura.assets.json +157 -0
- package/templates/cartoon-studio/package.json +12 -1
- 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 +55 -8
- package/templates/cartoon-studio/src/characters.ts +38 -1
- package/templates/cartoon-studio/src/episode-renderer.ts +605 -0
- package/templates/cartoon-studio/src/episode.ts +12 -6
- package/templates/cartoon-studio/src/main.ts +109 -41
- package/templates/cartoon-studio/src/render-plan.ts +162 -0
- package/templates/cartoon-studio/src/review.ts +99 -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/storyboard-playback.spec.ts +18 -10
- package/templates/cartoon-studio/tests/visual-review.spec.ts +21 -0
- package/templates/product-viewer/tests/screenshot.spec.ts +8 -16
|
@@ -2,7 +2,7 @@ import { expect, test } from "@playwright/test";
|
|
|
2
2
|
|
|
3
3
|
test("cartoon studio storyboard caption renders", async ({ page }) => {
|
|
4
4
|
await page.goto("/");
|
|
5
|
-
await expect(page.
|
|
5
|
+
await expect(page.locator("#caption-overlay")).toContainText(/moon|sparkle|garden/i);
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
test("storyboard playback, character performance, caption timing, cuts, and nonblank cartoon frames are sourced", async ({
|
|
@@ -11,28 +11,33 @@ test("storyboard playback, character performance, caption timing, cuts, and nonb
|
|
|
11
11
|
await page.goto("/");
|
|
12
12
|
|
|
13
13
|
const routeProof = (await page.evaluate(() => {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const proof = (window as unknown as {
|
|
15
|
+
__AURA3D_CARTOON_EPISODE_PROOF__?: {
|
|
16
|
+
proofKind: string;
|
|
16
17
|
shotIds: readonly string[];
|
|
17
18
|
captionIds: readonly string[];
|
|
18
19
|
storyBible?: unknown;
|
|
19
20
|
studio?: unknown;
|
|
21
|
+
sourceOnlyAcceptedAsPublishProof: boolean;
|
|
20
22
|
playbackProbeSamples: readonly unknown[];
|
|
21
23
|
sampleAt(time: number): unknown;
|
|
22
24
|
};
|
|
23
|
-
}).
|
|
25
|
+
}).__AURA3D_CARTOON_EPISODE_PROOF__;
|
|
24
26
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
proofKind: proof?.proofKind,
|
|
28
|
+
shotIds: proof?.shotIds ?? [],
|
|
29
|
+
captionIds: proof?.captionIds ?? [],
|
|
30
|
+
storyBible: proof?.storyBible,
|
|
31
|
+
studio: proof?.studio,
|
|
32
|
+
sourceOnlyAcceptedAsPublishProof: proof?.sourceOnlyAcceptedAsPublishProof,
|
|
33
|
+
samples: [1, 21, 43].map((time) => proof?.sampleAt(time)),
|
|
34
|
+
playbackProbeSamples: proof?.playbackProbeSamples ?? [],
|
|
31
35
|
bodyShotCount: document.body.dataset.cartoonShotCount,
|
|
32
36
|
bodyCaptionCount: document.body.dataset.cartoonCaptionCount,
|
|
33
37
|
bodyPanels: document.body.dataset.cartoonStudioPanels
|
|
34
38
|
};
|
|
35
39
|
})) as {
|
|
40
|
+
proofKind?: string;
|
|
36
41
|
shotIds: string[];
|
|
37
42
|
captionIds: string[];
|
|
38
43
|
storyBible?: {
|
|
@@ -55,11 +60,14 @@ test("storyboard playback, character performance, caption timing, cuts, and nonb
|
|
|
55
60
|
nodeUpdates?: Array<{ characterId?: string; action?: string; emotion?: string }>;
|
|
56
61
|
}>;
|
|
57
62
|
playbackProbeSamples: unknown[];
|
|
63
|
+
sourceOnlyAcceptedAsPublishProof?: boolean;
|
|
58
64
|
bodyShotCount?: string;
|
|
59
65
|
bodyCaptionCount?: string;
|
|
60
66
|
bodyPanels?: string;
|
|
61
67
|
};
|
|
62
68
|
|
|
69
|
+
expect(routeProof.proofKind).toBe("aura3d-cartoon-episode-proof");
|
|
70
|
+
expect(routeProof.sourceOnlyAcceptedAsPublishProof).toBe(false);
|
|
63
71
|
expect(routeProof.shotIds).toEqual([
|
|
64
72
|
"shot-moon-garden-open",
|
|
65
73
|
"shot-glow-stone-teamwork",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { expect, test } from "@playwright/test";
|
|
2
|
+
import { createCartoonEpisodeReviewPackage } from "../src/review";
|
|
3
|
+
|
|
4
|
+
test("review package includes human approval checklist and publish boundary", () => {
|
|
5
|
+
const review = createCartoonEpisodeReviewPackage({
|
|
6
|
+
hasWebm: true,
|
|
7
|
+
hasPngSequenceFallback: false,
|
|
8
|
+
generatedAt: "2026-06-06T00:00:00.000Z"
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
expect(review).toContain("# Moon Garden 001 Review Package");
|
|
12
|
+
expect(review).toContain("Output mode: `encoded-webm`");
|
|
13
|
+
expect(review).toContain("Review status: `ready-for-human-review`");
|
|
14
|
+
expect(review).toContain("- [ ] Both characters are readable in representative frames.");
|
|
15
|
+
expect(review).toContain("- [ ] Captions do not cover important action.");
|
|
16
|
+
expect(review).toContain("- [ ] Mouth movement is visible during dialogue in the browser route.");
|
|
17
|
+
expect(review).toContain("- [ ] Character body motion is more than still-image wobble.");
|
|
18
|
+
expect(review).toContain("- [ ] No route chrome, proof panels, or debug overlays appear in encoded output.");
|
|
19
|
+
expect(review).toContain("- [ ] Reviewer name and approval date are recorded before publish-ready claims.");
|
|
20
|
+
expect(review).toContain("Human review and asset readiness are still required before public publish-ready claims.");
|
|
21
|
+
});
|
|
@@ -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
|
});
|