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.
Files changed (87) hide show
  1. package/dist/cli.js +0 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +4 -2
  5. package/dist/index.js.map +1 -1
  6. package/package.json +8 -4
  7. package/templates/cartoon-channel/README.md +38 -0
  8. package/templates/cartoon-channel/aura.assets.json +1364 -0
  9. package/templates/cartoon-channel/package.json +3 -2
  10. package/templates/cartoon-channel/public/aura-assets/luma.047f5e5f.glb +0 -0
  11. package/templates/cartoon-channel/public/aura-assets/luma.thumb.svg +1 -0
  12. package/templates/cartoon-channel/public/aura-assets/miko.047f5e5f.glb +0 -0
  13. package/templates/cartoon-channel/public/aura-assets/miko.thumb.svg +1 -0
  14. package/templates/cartoon-channel/public/aura-assets/moon-garden-feature-frame.png +0 -0
  15. package/templates/cartoon-channel/src/aura-assets.ts +5 -11
  16. package/templates/cartoon-channel/src/concept-episode-2-5d.css +159 -0
  17. package/templates/cartoon-channel/src/concept-episode-2-5d.ts +155 -0
  18. package/templates/cartoon-channel/src/image-puppet-episode.css +290 -0
  19. package/templates/cartoon-channel/src/image-puppet-episode.ts +139 -0
  20. package/templates/cartoon-channel/src/main.ts +89 -71
  21. package/templates/cartoon-channel/src/puppet-episode-2d.css +526 -0
  22. package/templates/cartoon-channel/src/puppet-episode-2d.ts +189 -0
  23. package/templates/cartoon-channel/src/render-plan.ts +1 -1
  24. package/templates/cartoon-channel/src/sample-episode-visual.css +457 -0
  25. package/templates/cartoon-channel/src/sample-episode-visual.ts +185 -0
  26. package/templates/cartoon-channel/test-results/.last-run.json +4 -0
  27. package/templates/cartoon-channel/tests/concept-2-5d-animation.spec.ts +18 -0
  28. package/templates/cartoon-channel/tests/concept-2-5d.spec.ts +30 -0
  29. package/templates/cartoon-channel/tests/image-puppet-animation.spec.ts +18 -0
  30. package/templates/cartoon-channel/tests/image-puppet.spec.ts +29 -0
  31. package/templates/cartoon-channel/tests/puppet-2d-animation.spec.ts +18 -0
  32. package/templates/cartoon-channel/tests/puppet-2d.spec.ts +26 -0
  33. package/templates/cartoon-channel/tests/reports/prompt-animation/cartoon-sample-episode.png +0 -0
  34. package/templates/cartoon-channel/tests/sample-episode-visual.spec.ts +45 -0
  35. package/templates/cartoon-channel/tests/storyboard-playback.spec.ts +1 -1
  36. package/templates/cartoon-studio/README.md +82 -0
  37. package/templates/cartoon-studio/aura.assets.json +157 -0
  38. package/templates/cartoon-studio/index.html +13 -0
  39. package/templates/cartoon-studio/package.json +32 -0
  40. package/templates/cartoon-studio/playwright.config.ts +13 -0
  41. package/templates/cartoon-studio/public/aura-assets/luma.047f5e5f.glb +0 -0
  42. package/templates/cartoon-studio/public/aura-assets/luma.humanoid-fixture.glb +0 -0
  43. package/templates/cartoon-studio/public/aura-assets/luma.thumb.svg +1 -0
  44. package/templates/cartoon-studio/public/aura-assets/miko.047f5e5f.glb +0 -0
  45. package/templates/cartoon-studio/public/aura-assets/miko.thumb.svg +1 -0
  46. package/templates/cartoon-studio/public/aura-assets/moonGarden.gltf +183 -0
  47. package/templates/cartoon-studio/scripts/episode.ts +276 -0
  48. package/templates/cartoon-studio/src/aura-assets.ts +61 -0
  49. package/templates/cartoon-studio/src/characters.ts +65 -0
  50. package/templates/cartoon-studio/src/contract.ts +1 -0
  51. package/templates/cartoon-studio/src/episode-renderer.ts +605 -0
  52. package/templates/cartoon-studio/src/episode.ts +306 -0
  53. package/templates/cartoon-studio/src/main.ts +333 -0
  54. package/templates/cartoon-studio/src/render-plan.ts +567 -0
  55. package/templates/cartoon-studio/src/review.ts +99 -0
  56. package/templates/cartoon-studio/src/sets.ts +14 -0
  57. package/templates/cartoon-studio/src/studio.ts +101 -0
  58. package/templates/cartoon-studio/test-results/.last-run.json +4 -0
  59. package/templates/cartoon-studio/tests/episode-render.spec.ts +44 -0
  60. package/templates/cartoon-studio/tests/motion-quality.spec.ts +45 -0
  61. package/templates/cartoon-studio/tests/route-health.spec.ts +7 -0
  62. package/templates/cartoon-studio/tests/storyboard-playback.spec.ts +99 -0
  63. package/templates/cartoon-studio/tests/visual-review.spec.ts +21 -0
  64. package/templates/cartoon-studio/tsconfig.json +12 -0
  65. package/templates/cinematic-scene/package.json +1 -1
  66. package/templates/episode-builder/README.md +46 -0
  67. package/templates/episode-builder/index.html +13 -0
  68. package/templates/episode-builder/package.json +21 -0
  69. package/templates/episode-builder/playwright.config.ts +13 -0
  70. package/templates/episode-builder/src/aura-assets.ts +14 -0
  71. package/templates/episode-builder/src/builder.ts +78 -0
  72. package/templates/episode-builder/src/characters.ts +28 -0
  73. package/templates/episode-builder/src/contract.ts +1 -0
  74. package/templates/episode-builder/src/episode.ts +300 -0
  75. package/templates/episode-builder/src/main.ts +265 -0
  76. package/templates/episode-builder/src/render-plan.ts +405 -0
  77. package/templates/episode-builder/src/sets.ts +14 -0
  78. package/templates/episode-builder/tests/route-health.spec.ts +7 -0
  79. package/templates/episode-builder/tests/storyboard-playback.spec.ts +98 -0
  80. package/templates/episode-builder/tsconfig.json +12 -0
  81. package/templates/fighting-game/package.json +1 -1
  82. package/templates/fighting-game/src/game/stage.ts +18 -4
  83. package/templates/fighting-game/src/main.ts +3 -2
  84. package/templates/mini-game/package.json +1 -1
  85. package/templates/product-viewer/package.json +1 -1
  86. package/templates/product-viewer/tests/screenshot.spec.ts +8 -16
  87. 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", cabinetPixels: 0, grillePixels: 0, metalPixels: 0, softboxPixels: 0, warmReflectionPixels: 0, centerObjectPixels: 0, uniqueBuckets: 0 };
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 softboxPixels = 0;
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 > 175 && g > 180 && b > 185 && Math.abs(r - g) < 45 && Math.abs(g - b) < 48) softboxPixels += 1;
41
- if (r > 95 && g > 62 && b < 78 && r > g * 1.12) warmReflectionPixels += 1;
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 { cabinetPixels, grillePixels, metalPixels, softboxPixels, warmReflectionPixels, centerObjectPixels, uniqueBuckets: buckets.size };
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.softboxPixels).toBeGreaterThan(180);
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
  });
@@ -11,7 +11,7 @@
11
11
  "test": "playwright test tests/route-health.spec.ts tests/storyboard-playback.spec.ts --workers=1"
12
12
  },
13
13
  "dependencies": {
14
- "@aura3d/engine": "1.0.9"
14
+ "@aura3d/engine": "1.0.10"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@playwright/test": "^1.52.0",