@fleox/agent3d 0.0.0-stage → 0.2.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 (455) hide show
  1. package/LICENSE +143 -0
  2. package/README.md +172 -2
  3. package/changelog.json +56 -0
  4. package/dist/agent/agent3d.mjs +11242 -0
  5. package/dist/agent/chunks/assets-BUUM9TUB.mjs +2448 -0
  6. package/dist/agent/chunks/browser-t_JL_B82.mjs +226 -0
  7. package/dist/agent/chunks/cdp-CaKRRzMX.mjs +177 -0
  8. package/dist/agent/chunks/check-CBO3Ekx1.mjs +971 -0
  9. package/dist/agent/chunks/export-BCI8vKw8.mjs +1130 -0
  10. package/dist/agent/chunks/gif-DQznzHTL.mjs +319 -0
  11. package/dist/agent/chunks/gltf-f_f0-OiV.mjs +207 -0
  12. package/dist/agent/chunks/imageCodec-BpDU9Lsq.mjs +101 -0
  13. package/dist/agent/chunks/jsonPath-DUCe1JpS.mjs +155 -0
  14. package/dist/agent/chunks/meshoptimizer-C-tN9jn5.mjs +1165 -0
  15. package/dist/agent/chunks/mp4-aOALfp3s.mjs +130 -0
  16. package/dist/agent/chunks/objects-DBAws7uf.mjs +53 -0
  17. package/dist/agent/chunks/optimizeSizing-CkZ3fZRp.mjs +540 -0
  18. package/dist/agent/chunks/package-Ck7_Nszg.mjs +75 -0
  19. package/dist/agent/chunks/png-DXfSGJZt.mjs +91 -0
  20. package/dist/agent/chunks/render-Cbuhz5uW.mjs +1511 -0
  21. package/dist/agent/chunks/rolldown-runtime-ebOQtxsr.mjs +18 -0
  22. package/dist/agent/chunks/scene-BgajNvBf.mjs +444 -0
  23. package/dist/agent/chunks/server-CACCerkZ.mjs +237 -0
  24. package/dist/agent/chunks/suggest-Cpcgv1RP.mjs +46 -0
  25. package/dist/agent/chunks/tools-DT2tetIK.mjs +1412 -0
  26. package/dist/agent/chunks/tree-BrNYGui2.mjs +75 -0
  27. package/dist/agent/chunks/webpAnim-qaq9YgKl.mjs +132 -0
  28. package/dist/runtime/agent3d-runtime.js +373 -0
  29. package/dist/runtime/agent3d-runtime.single.js +7360 -0
  30. package/dist/runtime/chunks/BufferGeometryUtils-Re3wQkXp.js +1 -0
  31. package/dist/runtime/chunks/EXRLoader-Bzm84si5.js +1 -0
  32. package/dist/runtime/chunks/FontLoader-BocwqK8V.js +2 -0
  33. package/dist/runtime/chunks/GLTFLoader-DHp1wv6J.js +1 -0
  34. package/dist/runtime/chunks/GroundedSkybox-esvlRCO0.js +1 -0
  35. package/dist/runtime/chunks/HDRLoader-DHrHp8fs.js +5 -0
  36. package/dist/runtime/chunks/OrbitControls-sjN2MF0e.js +1 -0
  37. package/dist/runtime/chunks/RectAreaLightUniformsLib-_mZ62yWn.js +1 -0
  38. package/dist/runtime/chunks/RoomEnvironment-CL4UR6ZW.js +1 -0
  39. package/dist/runtime/chunks/RoundedBoxGeometry-x-ot8ZSh.js +1 -0
  40. package/dist/runtime/chunks/SVGLoader-hRF0EwD-.js +1 -0
  41. package/dist/runtime/chunks/SkeletonUtils-DHlReJx3.js +1 -0
  42. package/dist/runtime/chunks/Sky-BrLN9Fk5.js +243 -0
  43. package/dist/runtime/chunks/audio-DbVNbf-r.js +1 -0
  44. package/dist/runtime/chunks/catalog-DL6sgPay.js +1 -0
  45. package/dist/runtime/chunks/easing-CXSz2e6P.js +1 -0
  46. package/dist/runtime/chunks/extrude-m04mghOS.js +1 -0
  47. package/dist/runtime/chunks/game-BoG2S6g4.js +20 -0
  48. package/dist/runtime/chunks/generators-OHhFCc2E.js +331 -0
  49. package/dist/runtime/chunks/materials-C2uffFEd.js +107 -0
  50. package/dist/runtime/chunks/meshGradient.glsl-BMatplLA.js +88 -0
  51. package/dist/runtime/chunks/meshopt_decoder.module-DXTYc6wn.js +1 -0
  52. package/dist/runtime/chunks/model-D-4xZz21.js +1 -0
  53. package/dist/runtime/chunks/params-DdApDOBw.js +1 -0
  54. package/dist/runtime/chunks/physicsHost-DPaVdM0R.js +1 -0
  55. package/dist/runtime/chunks/postfx-BpBXjLX3.js +1527 -0
  56. package/dist/runtime/chunks/postfx-i_J5Vf-l.js +1 -0
  57. package/dist/runtime/chunks/random-eeej60NW.js +1 -0
  58. package/dist/runtime/chunks/shaders-CmeJRio1.js +443 -0
  59. package/dist/runtime/chunks/svg-B3nZaQFD.js +1 -0
  60. package/dist/runtime/chunks/text-CmkU-b0C.js +2 -0
  61. package/dist/runtime/chunks/three.module-W4hp4qHb.js +4225 -0
  62. package/dist/runtime/chunks/toon-B5Jhf37V.js +6 -0
  63. package/dist/runtime/chunks/util-THUewKBk.js +1 -0
  64. package/dist/studio/assets/BufferGeometryUtils-wW9vV1l2.js +1 -0
  65. package/dist/studio/assets/EXRLoader-f8U8jnlr.js +1 -0
  66. package/dist/studio/assets/FontLoader-9sHudKzD.js +2 -0
  67. package/dist/studio/assets/GLTFLoader-C3C_3K62.js +1 -0
  68. package/dist/studio/assets/GroundedSkybox-BTqmv4fv.js +1 -0
  69. package/dist/studio/assets/HDRLoader-CkQyrTWY.js +5 -0
  70. package/dist/studio/assets/OrbitControls-fcOgB96a.js +1 -0
  71. package/dist/studio/assets/RectAreaLightUniformsLib-CZHWO9xf.js +1 -0
  72. package/dist/studio/assets/RoomEnvironment-BsISzuCp.js +1 -0
  73. package/dist/studio/assets/SVGLoader-BIkQDT66.js +1 -0
  74. package/dist/studio/assets/SkeletonUtils-CG5akqME.js +1 -0
  75. package/dist/studio/assets/Sky-C282PFL1.js +243 -0
  76. package/dist/studio/assets/audio-JD1kyX0A.js +1 -0
  77. package/dist/studio/assets/camera-BhKdE9ej.js +2 -0
  78. package/dist/studio/assets/editor-BgY_RoRd.js +1 -0
  79. package/dist/studio/assets/extrude-CnayHczh.js +1 -0
  80. package/dist/studio/assets/game-Dv5s4eMN.js +19 -0
  81. package/dist/studio/assets/generators-DVX3bAxe.js +331 -0
  82. package/dist/studio/assets/index-BQT0otii.css +1 -0
  83. package/dist/studio/assets/index-Dh-2Y34U.js +479 -0
  84. package/dist/studio/assets/meshopt_decoder.module-DXTYc6wn.js +1 -0
  85. package/dist/studio/assets/meshoptimizer-BCSwHBL3.js +1 -0
  86. package/dist/studio/assets/model-XZSP52pV.js +2 -0
  87. package/dist/studio/assets/physicsHost-C84FddIe.js +1 -0
  88. package/dist/studio/assets/postfx-BWWXb8i8.js +1527 -0
  89. package/dist/studio/assets/runtime-k_MFerbJ.js +572 -0
  90. package/dist/studio/assets/shaders-BEznGIct.js +443 -0
  91. package/dist/studio/assets/svg-DT8kx37i.js +2 -0
  92. package/dist/studio/assets/text-5DsJJHcj.js +3 -0
  93. package/dist/studio/assets/three.module-ByMn_ZTv.js +4225 -0
  94. package/dist/studio/index.html +16 -0
  95. package/library/LICENSES.md +77 -0
  96. package/library/fonts/LICENSES.md +42 -0
  97. package/library/fonts/anton.typeface.json +1 -0
  98. package/library/fonts/bebas-neue.typeface.json +1 -0
  99. package/library/fonts/display.typeface.json +1 -0
  100. package/library/fonts/inter-black.typeface.json +1 -0
  101. package/library/fonts/lobster.typeface.json +1 -0
  102. package/library/fonts/mono.typeface.json +1 -0
  103. package/library/fonts/montserrat-extrabold.typeface.json +1 -0
  104. package/library/fonts/pacifico.typeface.json +1 -0
  105. package/library/fonts/sans-bold.typeface.json +1 -0
  106. package/library/fonts/sans.typeface.json +1 -0
  107. package/library/fonts/serif-bold.typeface.json +1 -0
  108. package/library/fonts/serif.typeface.json +1 -0
  109. package/library/fonts/space-grotesk-bold.typeface.json +1 -0
  110. package/library/hdri/beach.hdr +0 -0
  111. package/library/hdri/beach.jpg +0 -0
  112. package/library/hdri/city.hdr +0 -0
  113. package/library/hdri/city.jpg +0 -0
  114. package/library/hdri/forest.hdr +0 -0
  115. package/library/hdri/forest.jpg +0 -0
  116. package/library/hdri/night-city.hdr +0 -0
  117. package/library/hdri/night-city.jpg +0 -0
  118. package/library/hdri/night.hdr +0 -0
  119. package/library/hdri/night.jpg +0 -0
  120. package/library/hdri/sky.hdr +0 -0
  121. package/library/hdri/sky.jpg +0 -0
  122. package/library/hdri/softbox.hdr +0 -0
  123. package/library/hdri/softbox.jpg +0 -0
  124. package/library/hdri/studio.hdr +0 -0
  125. package/library/hdri/studio.jpg +0 -0
  126. package/library/hdri/sunset.hdr +0 -0
  127. package/library/hdri/sunset.jpg +0 -0
  128. package/library/hdri/warehouse.hdr +0 -0
  129. package/library/hdri/warehouse.jpg +0 -0
  130. package/library/index.json +5510 -0
  131. package/library/models/animals/fish.glb +0 -0
  132. package/library/models/animals/fox.glb +0 -0
  133. package/library/models/buildings/castle.glb +0 -0
  134. package/library/models/buildings/house.glb +0 -0
  135. package/library/models/buildings/market.glb +0 -0
  136. package/library/models/buildings/tavern.glb +0 -0
  137. package/library/models/buildings/tower.glb +0 -0
  138. package/library/models/buildings/windmill.glb +0 -0
  139. package/library/models/characters/barbarian.glb +0 -0
  140. package/library/models/characters/knight.glb +0 -0
  141. package/library/models/characters/mage.glb +0 -0
  142. package/library/models/characters/mini-soldier.glb +0 -0
  143. package/library/models/characters/platformer-hero.glb +0 -0
  144. package/library/models/characters/robot.glb +0 -0
  145. package/library/models/characters/rogue.glb +0 -0
  146. package/library/models/characters/skeleton.glb +0 -0
  147. package/library/models/city/building-a.glb +0 -0
  148. package/library/models/city/building-b.glb +0 -0
  149. package/library/models/city/building-tall.glb +0 -0
  150. package/library/models/city/fire-hydrant.glb +0 -0
  151. package/library/models/city/road-corner.glb +0 -0
  152. package/library/models/city/road-crossing.glb +0 -0
  153. package/library/models/city/road-junction.glb +0 -0
  154. package/library/models/city/road-straight.glb +0 -0
  155. package/library/models/city/streetlight.glb +0 -0
  156. package/library/models/city/suburban-house.glb +0 -0
  157. package/library/models/city/traffic-light.glb +0 -0
  158. package/library/models/city/water-tower.glb +0 -0
  159. package/library/models/food/apple.glb +0 -0
  160. package/library/models/food/avocado.glb +0 -0
  161. package/library/models/food/baguette.glb +0 -0
  162. package/library/models/food/bread-loaf.glb +0 -0
  163. package/library/models/food/burger.glb +0 -0
  164. package/library/models/food/carrot.glb +0 -0
  165. package/library/models/food/cheese.glb +0 -0
  166. package/library/models/food/cookie.glb +0 -0
  167. package/library/models/food/croissant.glb +0 -0
  168. package/library/models/food/cupcake.glb +0 -0
  169. package/library/models/food/dinner-plate.glb +0 -0
  170. package/library/models/food/donut.glb +0 -0
  171. package/library/models/food/ketchup.glb +0 -0
  172. package/library/models/food/mug.glb +0 -0
  173. package/library/models/food/pain-au-chocolat.glb +0 -0
  174. package/library/models/food/stew.glb +0 -0
  175. package/library/models/food/tomato.glb +0 -0
  176. package/library/models/food/veggie-burger.glb +0 -0
  177. package/library/models/nature/bush.glb +0 -0
  178. package/library/models/nature/cactus.glb +0 -0
  179. package/library/models/nature/cloud.glb +0 -0
  180. package/library/models/nature/fir-tree.glb +0 -0
  181. package/library/models/nature/forest-patch.glb +0 -0
  182. package/library/models/nature/grass-small.glb +0 -0
  183. package/library/models/nature/grass.glb +0 -0
  184. package/library/models/nature/hex-grass.glb +0 -0
  185. package/library/models/nature/hex-water.glb +0 -0
  186. package/library/models/nature/hills.glb +0 -0
  187. package/library/models/nature/mountain.glb +0 -0
  188. package/library/models/nature/pine-autumn.glb +0 -0
  189. package/library/models/nature/pine-tree.glb +0 -0
  190. package/library/models/nature/pumpkin.glb +0 -0
  191. package/library/models/nature/rock-flat.glb +0 -0
  192. package/library/models/nature/rock.glb +0 -0
  193. package/library/models/nature/tree-dead.glb +0 -0
  194. package/library/models/nature/tree-slim.glb +0 -0
  195. package/library/models/nature/trees-cluster.glb +0 -0
  196. package/library/models/nature/waterlily.glb +0 -0
  197. package/library/models/platformer/blaster.glb +0 -0
  198. package/library/models/platformer/block-coin.glb +0 -0
  199. package/library/models/platformer/brick.glb +0 -0
  200. package/library/models/platformer/coin.glb +0 -0
  201. package/library/models/platformer/enemy-flying.glb +0 -0
  202. package/library/models/platformer/flag.glb +0 -0
  203. package/library/models/platformer/platform-falling.glb +0 -0
  204. package/library/models/platformer/platform-grass-round.glb +0 -0
  205. package/library/models/platformer/platform-large.glb +0 -0
  206. package/library/models/platformer/platform-medium.glb +0 -0
  207. package/library/models/platformer/platform.glb +0 -0
  208. package/library/models/platformer/target.glb +0 -0
  209. package/library/models/platformer/track-corner.glb +0 -0
  210. package/library/models/platformer/track-straight.glb +0 -0
  211. package/library/models/platformer/wall-low.glb +0 -0
  212. package/library/models/products/boombox.glb +0 -0
  213. package/library/models/products/iridescent-lamp.glb +0 -0
  214. package/library/models/products/lantern.glb +0 -0
  215. package/library/models/products/lounge-chair.glb +0 -0
  216. package/library/models/products/sneaker.glb +0 -0
  217. package/library/models/products/velvet-sofa.glb +0 -0
  218. package/library/models/products/water-bottle.glb +0 -0
  219. package/library/models/props/alarm-clock.glb +0 -0
  220. package/library/models/props/armchair.glb +0 -0
  221. package/library/models/props/barrel.glb +0 -0
  222. package/library/models/props/bench.glb +0 -0
  223. package/library/models/props/brass-vase.glb +0 -0
  224. package/library/models/props/chest.glb +0 -0
  225. package/library/models/props/coffee-table.glb +0 -0
  226. package/library/models/props/coin-stack.glb +0 -0
  227. package/library/models/props/coin.glb +0 -0
  228. package/library/models/props/couch.glb +0 -0
  229. package/library/models/props/crate.glb +0 -0
  230. package/library/models/props/flag.glb +0 -0
  231. package/library/models/props/gravestone.glb +0 -0
  232. package/library/models/props/key.glb +0 -0
  233. package/library/models/props/lamp.glb +0 -0
  234. package/library/models/props/lantern.glb +0 -0
  235. package/library/models/props/marble-bust.glb +0 -0
  236. package/library/models/props/modern-armchair.glb +0 -0
  237. package/library/models/props/potted-succulent.glb +0 -0
  238. package/library/models/props/rubber-duck.glb +0 -0
  239. package/library/models/props/shield.glb +0 -0
  240. package/library/models/props/sword-shield.glb +0 -0
  241. package/library/models/props/sword.glb +0 -0
  242. package/library/models/props/table.glb +0 -0
  243. package/library/models/props/tent.glb +0 -0
  244. package/library/models/props/torch.glb +0 -0
  245. package/library/models/props/trophy.glb +0 -0
  246. package/library/models/space/base-module.glb +0 -0
  247. package/library/models/space/lander.glb +0 -0
  248. package/library/models/space/landing-pad.glb +0 -0
  249. package/library/models/space/rocks.glb +0 -0
  250. package/library/models/space/solar-panel.glb +0 -0
  251. package/library/models/space/space-truck.glb +0 -0
  252. package/library/models/space/wind-turbine.glb +0 -0
  253. package/library/models/vehicles/car.glb +0 -0
  254. package/library/models/vehicles/hatchback.glb +0 -0
  255. package/library/models/vehicles/motorcycle.glb +0 -0
  256. package/library/models/vehicles/police-car.glb +0 -0
  257. package/library/models/vehicles/taxi.glb +0 -0
  258. package/library/models/vehicles/truck.glb +0 -0
  259. package/library/sources.json +2856 -0
  260. package/library/textures/brick-color.jpg +0 -0
  261. package/library/textures/brick-normal.jpg +0 -0
  262. package/library/textures/brick-roughness.jpg +0 -0
  263. package/library/textures/concrete-color.jpg +0 -0
  264. package/library/textures/concrete-normal.jpg +0 -0
  265. package/library/textures/concrete-roughness.jpg +0 -0
  266. package/library/textures/fabric-color.jpg +0 -0
  267. package/library/textures/fabric-normal.jpg +0 -0
  268. package/library/textures/fabric-roughness.jpg +0 -0
  269. package/library/textures/grass-ground-color.jpg +0 -0
  270. package/library/textures/grass-ground-normal.jpg +0 -0
  271. package/library/textures/grass-ground-roughness.jpg +0 -0
  272. package/library/textures/rusty-metal-color.jpg +0 -0
  273. package/library/textures/rusty-metal-normal.jpg +0 -0
  274. package/library/textures/rusty-metal-roughness.jpg +0 -0
  275. package/library/textures/wood-planks-color.jpg +0 -0
  276. package/library/textures/wood-planks-normal.jpg +0 -0
  277. package/library/textures/wood-planks-roughness.jpg +0 -0
  278. package/package.json +67 -4
  279. package/plugin/.claude-plugin/plugin.json +19 -0
  280. package/plugin/skills/agent3d-assets/SKILL.md +140 -0
  281. package/plugin/skills/agent3d-assets/references/sources.md +33 -0
  282. package/plugin/skills/agent3d-create/SKILL.md +141 -0
  283. package/plugin/skills/agent3d-create/references/art-direction.md +144 -0
  284. package/plugin/skills/agent3d-create/references/recipes.md +1357 -0
  285. package/plugin/skills/agent3d-edit/SKILL.md +121 -0
  286. package/plugin/skills/agent3d-edit/references/patch-ops.md +278 -0
  287. package/plugin/skills/agent3d-game/SKILL.md +111 -0
  288. package/plugin/skills/agent3d-game/references/game-patterns.md +262 -0
  289. package/plugin/skills/agent3d-game/references/script-api.md +211 -0
  290. package/plugin/skills/agent3d-publish/SKILL.md +161 -0
  291. package/plugin/skills/agent3d-publish/references/integrations.md +221 -0
  292. package/templates/banner-aurora-night/README.md +15 -0
  293. package/templates/banner-aurora-night/agent3d.json +8 -0
  294. package/templates/banner-aurora-night/preview.png +0 -0
  295. package/templates/banner-aurora-night/scene.json +327 -0
  296. package/templates/banner-aurora-night/template.json +24 -0
  297. package/templates/banner-data-bars/README.md +15 -0
  298. package/templates/banner-data-bars/agent3d.json +8 -0
  299. package/templates/banner-data-bars/preview.png +0 -0
  300. package/templates/banner-data-bars/scene.json +222 -0
  301. package/templates/banner-data-bars/template.json +25 -0
  302. package/templates/banner-floating-shapes/README.md +15 -0
  303. package/templates/banner-floating-shapes/agent3d.json +8 -0
  304. package/templates/banner-floating-shapes/preview.png +0 -0
  305. package/templates/banner-floating-shapes/scene.json +703 -0
  306. package/templates/banner-floating-shapes/template.json +24 -0
  307. package/templates/banner-gradient-blob/README.md +16 -0
  308. package/templates/banner-gradient-blob/agent3d.json +8 -0
  309. package/templates/banner-gradient-blob/preview.png +0 -0
  310. package/templates/banner-gradient-blob/scene.json +330 -0
  311. package/templates/banner-gradient-blob/template.json +21 -0
  312. package/templates/banner-liquid-chrome/README.md +16 -0
  313. package/templates/banner-liquid-chrome/agent3d.json +8 -0
  314. package/templates/banner-liquid-chrome/preview.png +0 -0
  315. package/templates/banner-liquid-chrome/scene.json +290 -0
  316. package/templates/banner-liquid-chrome/template.json +24 -0
  317. package/templates/banner-logo-extrude/README.md +24 -0
  318. package/templates/banner-logo-extrude/agent3d.json +8 -0
  319. package/templates/banner-logo-extrude/assets/logo.svg +6 -0
  320. package/templates/banner-logo-extrude/assets/manifest.json +13 -0
  321. package/templates/banner-logo-extrude/preview.png +0 -0
  322. package/templates/banner-logo-extrude/scene.json +332 -0
  323. package/templates/banner-logo-extrude/template.json +22 -0
  324. package/templates/banner-neon-title/README.md +18 -0
  325. package/templates/banner-neon-title/agent3d.json +8 -0
  326. package/templates/banner-neon-title/preview.png +0 -0
  327. package/templates/banner-neon-title/scene.json +494 -0
  328. package/templates/banner-neon-title/template.json +25 -0
  329. package/templates/banner-wave-grid/README.md +18 -0
  330. package/templates/banner-wave-grid/agent3d.json +8 -0
  331. package/templates/banner-wave-grid/preview.png +0 -0
  332. package/templates/banner-wave-grid/scene.json +217 -0
  333. package/templates/banner-wave-grid/template.json +23 -0
  334. package/templates/card-hover-3d/README.md +16 -0
  335. package/templates/card-hover-3d/agent3d.json +8 -0
  336. package/templates/card-hover-3d/preview.png +0 -0
  337. package/templates/card-hover-3d/scene.json +359 -0
  338. package/templates/card-hover-3d/template.json +21 -0
  339. package/templates/card-product-tilt/README.md +14 -0
  340. package/templates/card-product-tilt/agent3d.json +8 -0
  341. package/templates/card-product-tilt/preview.png +0 -0
  342. package/templates/card-product-tilt/scene.json +296 -0
  343. package/templates/card-product-tilt/template.json +23 -0
  344. package/templates/character-mascot-hero/README.md +19 -0
  345. package/templates/character-mascot-hero/agent3d.json +8 -0
  346. package/templates/character-mascot-hero/preview.png +0 -0
  347. package/templates/character-mascot-hero/scene.json +512 -0
  348. package/templates/character-mascot-hero/template.json +8 -0
  349. package/templates/character-showcase/README.md +27 -0
  350. package/templates/character-showcase/agent3d.json +8 -0
  351. package/templates/character-showcase/preview.png +0 -0
  352. package/templates/character-showcase/scene.json +440 -0
  353. package/templates/character-showcase/template.json +24 -0
  354. package/templates/diorama-city/README.md +21 -0
  355. package/templates/diorama-city/agent3d.json +8 -0
  356. package/templates/diorama-city/preview.png +0 -0
  357. package/templates/diorama-city/scene.json +432 -0
  358. package/templates/diorama-city/template.json +21 -0
  359. package/templates/game-basket/README.md +25 -0
  360. package/templates/game-basket/agent3d.json +8 -0
  361. package/templates/game-basket/preview.png +0 -0
  362. package/templates/game-basket/scene.json +640 -0
  363. package/templates/game-basket/scripts/basket.js +176 -0
  364. package/templates/game-basket/template.json +8 -0
  365. package/templates/game-coin-collector/README.md +28 -0
  366. package/templates/game-coin-collector/agent3d.json +8 -0
  367. package/templates/game-coin-collector/preview.png +0 -0
  368. package/templates/game-coin-collector/scene.json +900 -0
  369. package/templates/game-coin-collector/scripts/collector.js +210 -0
  370. package/templates/game-coin-collector/template.json +19 -0
  371. package/templates/game-maze/README.md +24 -0
  372. package/templates/game-maze/agent3d.json +8 -0
  373. package/templates/game-maze/preview.png +0 -0
  374. package/templates/game-maze/scene.json +315 -0
  375. package/templates/game-maze/scripts/maze.js +168 -0
  376. package/templates/game-maze/template.json +18 -0
  377. package/templates/game-physics-playground/README.md +30 -0
  378. package/templates/game-physics-playground/agent3d.json +8 -0
  379. package/templates/game-physics-playground/preview.png +0 -0
  380. package/templates/game-physics-playground/scene.json +1712 -0
  381. package/templates/game-physics-playground/scripts/playground.js +151 -0
  382. package/templates/game-physics-playground/template.json +19 -0
  383. package/templates/game-platformer/README.md +26 -0
  384. package/templates/game-platformer/agent3d.json +8 -0
  385. package/templates/game-platformer/preview.png +0 -0
  386. package/templates/game-platformer/scene.json +1063 -0
  387. package/templates/game-platformer/scripts/platformer.js +222 -0
  388. package/templates/game-platformer/template.json +8 -0
  389. package/templates/game-runner/README.md +30 -0
  390. package/templates/game-runner/agent3d.json +8 -0
  391. package/templates/game-runner/preview.png +0 -0
  392. package/templates/game-runner/scene.json +1317 -0
  393. package/templates/game-runner/scripts/runner.js +263 -0
  394. package/templates/game-runner/template.json +18 -0
  395. package/templates/game-tap-targets/README.md +21 -0
  396. package/templates/game-tap-targets/agent3d.json +8 -0
  397. package/templates/game-tap-targets/preview.png +0 -0
  398. package/templates/game-tap-targets/scene.json +924 -0
  399. package/templates/game-tap-targets/scripts/targets.js +159 -0
  400. package/templates/game-tap-targets/template.json +19 -0
  401. package/templates/hero-floating-island/README.md +18 -0
  402. package/templates/hero-floating-island/agent3d.json +8 -0
  403. package/templates/hero-floating-island/preview.png +0 -0
  404. package/templates/hero-floating-island/scene.json +658 -0
  405. package/templates/hero-floating-island/template.json +8 -0
  406. package/templates/hero-perfume-luxury/README.md +18 -0
  407. package/templates/hero-perfume-luxury/agent3d.json +8 -0
  408. package/templates/hero-perfume-luxury/preview.png +0 -0
  409. package/templates/hero-perfume-luxury/scene.json +529 -0
  410. package/templates/hero-perfume-luxury/template.json +27 -0
  411. package/templates/hero-product-turntable/README.md +16 -0
  412. package/templates/hero-product-turntable/agent3d.json +8 -0
  413. package/templates/hero-product-turntable/preview.png +0 -0
  414. package/templates/hero-product-turntable/scene.json +225 -0
  415. package/templates/hero-product-turntable/template.json +21 -0
  416. package/templates/hero-saas-globe/README.md +16 -0
  417. package/templates/hero-saas-globe/agent3d.json +8 -0
  418. package/templates/hero-saas-globe/preview.png +0 -0
  419. package/templates/hero-saas-globe/scene.json +318 -0
  420. package/templates/hero-saas-globe/template.json +24 -0
  421. package/templates/hero-scroll-story/README.md +26 -0
  422. package/templates/hero-scroll-story/agent3d.json +8 -0
  423. package/templates/hero-scroll-story/preview.png +0 -0
  424. package/templates/hero-scroll-story/scene.json +642 -0
  425. package/templates/hero-scroll-story/template.json +22 -0
  426. package/templates/hero-sneaker-showcase/README.md +19 -0
  427. package/templates/hero-sneaker-showcase/agent3d.json +8 -0
  428. package/templates/hero-sneaker-showcase/preview.png +0 -0
  429. package/templates/hero-sneaker-showcase/scene.json +523 -0
  430. package/templates/hero-sneaker-showcase/template.json +23 -0
  431. package/templates/hero-space-planet/README.md +17 -0
  432. package/templates/hero-space-planet/agent3d.json +8 -0
  433. package/templates/hero-space-planet/preview.png +0 -0
  434. package/templates/hero-space-planet/scene.json +330 -0
  435. package/templates/hero-space-planet/template.json +21 -0
  436. package/templates/landscape-island/README.md +21 -0
  437. package/templates/landscape-island/agent3d.json +8 -0
  438. package/templates/landscape-island/preview.png +0 -0
  439. package/templates/landscape-island/scene.json +716 -0
  440. package/templates/landscape-island/template.json +24 -0
  441. package/templates/landscape-night-galaxy/README.md +25 -0
  442. package/templates/landscape-night-galaxy/agent3d.json +8 -0
  443. package/templates/landscape-night-galaxy/preview.png +0 -0
  444. package/templates/landscape-night-galaxy/scene.json +403 -0
  445. package/templates/landscape-night-galaxy/template.json +8 -0
  446. package/templates/landscape-valley-sunset/README.md +20 -0
  447. package/templates/landscape-valley-sunset/agent3d.json +8 -0
  448. package/templates/landscape-valley-sunset/preview.png +0 -0
  449. package/templates/landscape-valley-sunset/scene.json +265 -0
  450. package/templates/landscape-valley-sunset/template.json +22 -0
  451. package/templates/scene-cozy-room/README.md +21 -0
  452. package/templates/scene-cozy-room/agent3d.json +8 -0
  453. package/templates/scene-cozy-room/preview.png +0 -0
  454. package/templates/scene-cozy-room/scene.json +728 -0
  455. package/templates/scene-cozy-room/template.json +8 -0
Binary file
package/package.json CHANGED
@@ -1,6 +1,69 @@
1
1
  {
2
2
  "name": "@fleox/agent3d",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "description": "The 3D studio your AI agent can run: describe a scene as JSON (banners, characters, landscapes, mini games), preview and screenshot it headless, and export a self-contained embed for any website. No server, no account.",
6
+ "license": "SEE LICENSE IN LICENSE",
7
+ "engines": {
8
+ "node": ">=20"
9
+ },
10
+ "bin": {
11
+ "agent3d": "dist/agent/agent3d.mjs"
12
+ },
13
+ "files": [
14
+ "dist/agent",
15
+ "dist/runtime",
16
+ "dist/studio",
17
+ "library",
18
+ "templates",
19
+ "plugin",
20
+ "changelog.json",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "scripts": {
25
+ "dev": "vite",
26
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.agent.json",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest",
29
+ "build:runtime": "vite build --config vite.runtime.config.ts && vite build --config vite.runtime.config.ts --mode single",
30
+ "build:studio": "vite build",
31
+ "build:agent": "vite build --config vite.agent.config.ts",
32
+ "build": "npm run build:runtime && npm run build:studio && npm run build:agent && node scripts/write-version.mjs",
33
+ "check:skills": "node scripts/check-skills.mjs",
34
+ "hermes:build": "node scripts/build-hermes.mjs",
35
+ "check:hermes": "node scripts/build-hermes.mjs --check && python3 -m unittest discover -s hermes/tests",
36
+ "docs:cli": "node scripts/build-cli-docs.mjs",
37
+ "check:docs": "node scripts/build-cli-docs.mjs --check",
38
+ "version": "node scripts/sync-version.mjs && npm run build && node scripts/build-hermes.mjs && node scripts/build-cli-docs.mjs && git add -A plugin hermes .claude-plugin README.md docs integrations/agentcms/README.md",
39
+ "prepublishOnly": "npm run typecheck && npm test && npm run build && npm run check:skills"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^26.6.6",
43
+ "@types/react": "^19.3.0",
44
+ "@types/react-dom": "^19.3.0",
45
+ "@types/three": "^0.187.0",
46
+ "@vitejs/plugin-react": "^6.3.0",
47
+ "autoprefixer": "^10.7.0",
48
+ "cannon-es": "^0.20.0",
49
+ "clsx": "^2.1.1",
50
+ "happy-dom": "^21.0.4",
51
+ "lucide-react": "^1.77.0",
52
+ "meshoptimizer": "~1.1.1",
53
+ "postcss": "^8.5.33",
54
+ "react": "^19.3.1",
55
+ "react-dom": "^19.3.1",
56
+ "tailwindcss": "^3.4.19",
57
+ "three": "^0.187.0",
58
+ "typescript": "^7.0.2",
59
+ "vite": "^8.3.8",
60
+ "vitest": "^5.1.1"
61
+ },
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "git+https://github.com/fleox/agent3d.git"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
68
+ }
69
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "agent3d",
3
+ "version": "0.2.0",
4
+ "description": "Skills to create, edit, preview (headless screenshots the agent looks at) and publish 3D elements for web pages with Agent3D: animated banners, heroes, characters, landscapes, product showcases and mini games, exported as a self-contained Web Component for any site.",
5
+ "author": {
6
+ "name": "fleox"
7
+ },
8
+ "homepage": "https://github.com/fleox/agent3d",
9
+ "repository": "https://github.com/fleox/agent3d",
10
+ "license": "PolyForm-Noncommercial-1.0.0",
11
+ "keywords": [
12
+ "3d",
13
+ "threejs",
14
+ "webgl",
15
+ "banner",
16
+ "web-component",
17
+ "mcp"
18
+ ]
19
+ }
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: agent3d-assets
3
+ description: Find and add 3D assets to an Agent3D project - the built-in CC0 library shipped offline (models, PBR textures, HDRIs, fonts), procedural generators that cost zero bytes, free account-less CC0 sources (Poly Haven, ambientCG, Khronos samples searched and downloaded once into the project; Kenney and Quaternius packs imported from a zip the user downloads), the user's own files, licences and attribution, size budgets, and making textures and models lighter (assets optimize: per-usage sizes, WebP, meshopt, simplify). Use when a scene needs a model, a texture, an HDRI, a logo, a sound or music, or when the user asks where assets come from or how they are licensed.
4
+ license: PolyForm-Noncommercial-1.0.0
5
+ compatibility: Requires Node.js 22+ and Google Chrome (or Chromium/Edge) for renders.
6
+ metadata:
7
+ version: "0.2.0"
8
+ repository: "https://github.com/fleox/agent3d"
9
+ allowed-tools: Bash Read Write
10
+ ---
11
+
12
+ # Assets for Agent3D scenes
13
+
14
+ **Language:** talk to the user in their language; keep commands, ids and files in English.
15
+
16
+ Every command is `npx -y @fleox/agent3d@0.2.0 <command> --json` with `--project <dir>`. Read `error.hint` when `ok` is false.
17
+
18
+ ## Pick the cheapest thing that looks right
19
+
20
+ 1. **Procedural first** (zero download, deterministic, recolourable): primitives (`catalog geometries`), generators (`catalog generators`: terrain, trees, rocks, grass, flowers, water, clouds, city, character, planet, starfield, blob, waveGrid, maze, road, floatingIsland, globe, crystals, galaxy, bars3d, abstractShapes), particles (`catalog particlePresets`), shaders (`catalog shaders`), procedural textures for any material slot (`catalog textures`: marble, wood, terrazzo, carbon, noise, voronoi, flakes, brushed, grid, checker, stripes, dots: `"map": { "procedural": "wood" }`), procedural environment lighting (`"lighting": "studio"`, `soft`, `sunset`, `night`) and physical skies, synth sounds (`catalog sounds`: coin, jump, hit, explosion, click, powerup, laser, win, lose, whoosh, ambient-pad, chiptune-loop).
21
+ 2. **The built-in library** (ships with Agent3D, works offline, nothing to download, copied into the export automatically): about 130 models (rigged characters with animation clips: knight, mage, rogue, barbarian, skeleton, robot, mini soldier, platformer hero; animals, nature, buildings, city, food and bakery, vehicles, space; photoreal products and props: sneaker, velvet sofa, iridescent lamp, lounge chair, water bottle, boombox, marble bust, brass vase, alarm clock, potted succulent, rubber duck, modern armchair, coffee table…), 6 PBR texture sets (brick, concrete, fabric, grass ground, rusty metal, wood planks), 10 HDRIs (softbox, studio, warehouse, forest, city, beach, sky, sunset, night, night-city; each `.hdr` + `.jpg`), 13 fonts (`catalog fonts`).
22
+ 3. **Free CC0 sources online**, downloaded **once** into `assets/` with their licence: Poly Haven (models, textures, HDRIs), ambientCG (textures, HDRIs), Khronos glTF samples (models; CC0 or CC-BY), Kenney and Quaternius (game packs; manual zip).
23
+ 4. **The user's own files** (logo SVG, product GLB, brand audio): `assets add <file> --license …`.
24
+
25
+ ## The built-in library
26
+
27
+ ```bash
28
+ npx -y @fleox/agent3d@0.2.0 assets library --query tree --json
29
+ npx -y @fleox/agent3d@0.2.0 assets library --kind hdri --json
30
+ npx -y @fleox/agent3d@0.2.0 assets library --query character --kind model --json
31
+ ```
32
+
33
+ The answer lists the matches in `data.assets[]` (with `data.total` and `data.more`; `assets search` below names its list `data.hits[]` instead). Each entry has `ref` (use it as is in the scene), `description` (with the bounding box), `tags`, `license`, `kb`, and for models `triangles`, `size` (bounding box w × h × d in model units, Y-up) and `animations` (the clip names of animated models). Listings show 50 results per page: narrow with `--query` and `--kind`; when `more` is true, page with `--offset 50` (or `--limit 100`, `--all`).
34
+
35
+ ```bash
36
+ npx -y @fleox/agent3d@0.2.0 assets library --kind model --offset 50 --json
37
+ npx -y @fleox/agent3d@0.2.0 assets library --kind model --all --json
38
+ ```
39
+
40
+ ```json
41
+ { "op": "addObject", "object": { "id": "tree", "kind": "model", "src": "library:models/nature/pine-tree.glb", "fit": 2, "position": [-6, -1, 0] } }
42
+ ```
43
+
44
+ - Always set `fit` (the largest dimension in units): library models come in very different native sizes (the boombox is 2 cm, the lantern 26 units). `center: true` (default) puts the bottom centre at the object's position.
45
+ - Animated models: `"animation": { "clip": "Wave", "loop": true, "speed": 1 }` (clip name or index). The hit's `animations` lists the exact clip names (knight / mage / skeleton: `Idle`, `Walking_A`, `Running_A`, `Cheer`, `Jump_Full_Short`, `Death_A`…; robot: `Idle`, `Walking`, `Running`, `Dance`, `Jump`, `Wave`…); `--query walk` also matches clip names.
46
+ - Textures: `"material": { "map": "library:textures/brick-color.jpg", "normalMap": "library:textures/brick-normal.jpg", "roughnessMap": "library:textures/brick-roughness.jpg", "repeat": [3, 3] }`.
47
+ - HDRIs: `"environment": { "lighting": { "hdri": "library:hdri/softbox.hdr", "intensity": 1 } }` for reflections (softbox for products, warehouse / city / forest / beach for photoreal outdoors and interiors, studio / sky / sunset / night for lighter files); `"background": { "hdri": "library:hdri/forest.jpg", "blur": 0.2 }` to show it, with `"rotation": 120` to turn it and `"groundProjection": { "height": 2, "radius": 60 }` to stand objects on the photo's ground. Weight: `studio`, `sky`, `sunset`, `night` `.hdr` are ~360-410 KB; `softbox`, `warehouse`, `forest`, `city`, `beach`, `night-city` `.hdr` are 1.5-1.9 MB (fine for a hero or product scene, too heavy for a banner or card: use a procedural `lighting` preset there). The `.jpg` previews are 50-250 KB.
48
+ - Photoreal library models (products, props) carry 1k PBR textures and weigh 170 KB to 1.8 MB each: check `kb` and `triangles` in the listing, and prefer them for heroes and product scenes.
49
+ - Recolour a model: `"material": { "color": "#ff8fab" }` on the model object overrides every mesh (or `"preset": "clay"` for a uniform stylised look).
50
+
51
+ ## Searching free sources (network)
52
+
53
+ ```bash
54
+ npx -y @fleox/agent3d@0.2.0 assets search "wood planks" --kind texture --project my-scene --json
55
+ npx -y @fleox/agent3d@0.2.0 assets search sunset --kind hdri --source polyhaven --project my-scene --json
56
+ npx -y @fleox/agent3d@0.2.0 assets search fox --source khronos --project my-scene --json
57
+ ```
58
+
59
+ The answer lists the matches in `data.hits[]`; each hit has `source`, `id`, `title`, `kind`, `license`, `author`, `attribution` (when the licence needs one), `previewUrl` (show it to the user or open it), `pageUrl`, `downloads` (resolutions / formats). Per-source failures come in `data.errors` without failing the search. Search terms match titles and tags: try synonyms ("planks", "wood floor") when a search is poor.
60
+
61
+ Download one hit into the project (licence recorded in `assets/manifest.json`):
62
+
63
+ ```bash
64
+ npx -y @fleox/agent3d@0.2.0 assets add --hit @hit.json --resolution 1k --project my-scene --json
65
+ ```
66
+
67
+ `@hit.json` is a file holding one hit object from the search (or pass the JSON inline). Models come back with `data.asset.bounds`: `size` (w × h × d in model units, node transforms applied), `center`, `min` / `max` and `upAxis` (`"y"`, or `"z?"` when the model is much deeper than tall — it may lie on its back; check it with `render --isolate <objectId>`, which renders that object alone from the front (+Z) on a neutral background). Local `.glb` / `.gltf` files added with `assets add <file>` return the same `bounds`. Textures from ambientCG / Poly Haven download the whole set (colour, normal, roughness, AO) and return `data.asset.suggestion.material`, a ready material to `set` on an object. Poly Haven models download as `.gltf` + `.bin` + textures in a folder: use the returned `path` as the model `src`. Keep `--resolution 1k` for the web (2k only for a hero close-up). Sources start at 1k: `--resolution 512` (or `256`) downloads 1k and downscales every texture to that size with headless Chrome (`data.asset.optimized`); `--max-size <px>` does the same for any resolution.
68
+
69
+ ```bash
70
+ npx -y @fleox/agent3d@0.2.0 assets add --hit @hit.json --resolution 512 --project my-banner --json
71
+ ```
72
+
73
+ ## Kenney and Quaternius packs (manual zip)
74
+
75
+ Their hits are `manual: true`: there is no direct download (the hit's `note` says so). Ask the user to download the pack zip from `pageUrl` (free, no account), then import it with `assets add <file.zip>` (the zip importer extracts only `.glb` / `.gltf` + textures; `--filter` keeps the models whose path contains the word, repeat it for several words; `--name` sets the folder under `assets/models/`):
76
+
77
+ ```bash
78
+ npx -y @fleox/agent3d@0.2.0 assets add ~/Downloads/kenney_platformer-kit.zip --source kenney --license CC0-1.0 --filter coin --filter flag --name platformer --project my-game --json
79
+ ```
80
+
81
+ The answer lists the imported model paths (`models`) to use as `src`, plus `totalKb`. Importing a whole pack can add megabytes: always filter to what the scene uses. (MCP clients: the `assets_add` tool takes `{ "file", "source", "license", "filter": [...] }`.)
82
+
83
+ ## The user's own files
84
+
85
+ ```bash
86
+ npx -y @fleox/agent3d@0.2.0 assets add ./logo.svg --license proprietary --project my-banner --json
87
+ npx -y @fleox/agent3d@0.2.0 assets add ./bottle.glb --license proprietary --author "Acme" --project my-banner --json
88
+ npx -y @fleox/agent3d@0.2.0 assets add ./jingle.mp3 --kind audio --license CC-BY-4.0 --author "Jane Doe" --source-url https://example.com/jingle --project my-game --json
89
+ ```
90
+
91
+ `--license` is required (an SPDX id such as `CC0-1.0`, `CC-BY-4.0`, or `proprietary` for the user's own work). Files go to `assets/models/`, `assets/textures/`, `assets/hdri/`, `assets/audio/`, `assets/fonts/`, `assets/svg/` or `assets/other/` by kind, unless `--path` says otherwise. SVG logos become 3D with an `svg` object; product models with a `model` object and `fit`; audio with `audio.sounds` / `audio.music` (`{ "src": "assets/audio/jingle.mp3" }`).
92
+
93
+ SVG logos and icons:
94
+
95
+ ```json
96
+ { "op": "addObject", "object": { "id": "logo", "kind": "svg", "src": "assets/svg/logo.svg", "size": 2.4, "fit": "height", "depth": 0.25, "bevel": 0.03, "position": [-9, 0, 0] } }
97
+ ```
98
+
99
+ Each path keeps its SVG colour (`keepColors`: default `true` without a `material`, `false` with one; `true` + a material = that finish with the SVG colours). Strokes (`stroke-width`, joins, caps) become solid outlines, so line-icon sets work (`currentColor` takes the material colour; `"strokes": false` ignores strokes). `size` is the width (`fit: "height"` or `"max"` sizes the other or the larger side), `layerGap` separates stacked paths. `<text>` is not supported: ask for the logo with text converted to outlines. Check it with `render --isolate logo`.
100
+
101
+ ## Listing and removing
102
+
103
+ ```bash
104
+ npx -y @fleox/agent3d@0.2.0 assets list --project my-scene --json
105
+ npx -y @fleox/agent3d@0.2.0 assets remove assets/textures/old.jpg --project my-scene --json
106
+ npx -y @fleox/agent3d@0.2.0 assets remove assets/textures/old.jpg --yes --project my-scene --json
107
+ ```
108
+
109
+ `assets list` shows each file's size on disk, licence, whether it exists and which objects use it (`usedBy`); it is read-only: entries whose recorded size differs from the file on disk are listed in `stale` (`assets optimize` / `assets add` rewrite the manifest). `remove` prints a plan (with `usedBy`) unless `--yes`: fix the references first.
110
+
111
+ ## Optimising textures and models
112
+
113
+ When `check` reports `budget` or `optimizable`, or before exporting a scene with project textures / `.glb` models, run `assets optimize`. Without `--yes` it prints the plan (no Chrome needed): for every file the size it will get and **why** (target kind, the object's size on screen, the camera distance, the texture role). Show the plan to the user, then apply:
114
+
115
+ ```bash
116
+ npx -y @fleox/agent3d@0.2.0 assets optimize --all --project my-hero --json
117
+ npx -y @fleox/agent3d@0.2.0 assets optimize --all --dry-run --project my-hero --json
118
+ npx -y @fleox/agent3d@0.2.0 assets optimize --all --yes --project my-hero --json
119
+ npx -y @fleox/agent3d@0.2.0 assets optimize assets/models/robot.glb --simplify 0.5 --yes --project my-game --json
120
+ npx -y @fleox/agent3d@0.2.0 assets optimize assets/textures/wood_planks --max-size 512 --format jpeg --yes --project my-banner --json
121
+ ```
122
+
123
+ - **Smart size (default).** Each texture gets the smallest tier (256 / 512 / 1024 / 2048; up to 4096 for an equirect background) that still gives about one texel per screen pixel where the scene shows it: canvas size from the target (a hero ≈ 2880×1620 device px), object size (`fit`, geometry, scale) and closest camera distance (orbit zoom, scroll paths and timeline camera keys count), divided by `repeat`. Normal maps get ~0.75× and roughness ~0.5× of the colour size; a model's atlas ~1.5× its on-screen size. Heroes never go below 512 for colour maps; games and cards are capped at 1024. Textures not placed in `scene.json` (scripts, unused) get 1024. `--max-size <px>` forces one size for everything. Never upscales.
124
+ - **WebP (default `--format auto`).** Standalone `.jpg` / `.png` files become `.webp`: the file is renamed and every `scene.json` reference rewritten (`renamed` in the result) — unless a script, a `.gltf` or scene data names the file, then the format is kept (`note`). Images inside `.glb` models become WebP with `EXT_texture_webp`. `--format jpeg|png|keep` for other needs; `--quality` (default 80; normal maps at least 90).
125
+ - **Geometry.** `.glb` models are welded (duplicate vertices merged), reordered for the GPU vertex cache and compressed with meshopt (`EXT_meshopt_compression`, 16-bit positions / UVs, 10-bit normals — invisible), which typically cuts the geometry by 60–80 %; the runtime loads the decoder (~27 KB) only for models that use it. It is WebAssembly: a site with a strict Content-Security-Policy needs `'wasm-unsafe-eval'` in `script-src` for scenes with compressed models (tell the user; skill `agent3d-publish` covers CSP). `--simplify 0.5` keeps about half of the triangles within `--simplify-error` (default 0.01 = 1 % of the mesh size; the result says when it stopped early); `--compress none` skips meshopt. Draco-compressed models cannot be decoded (the runtime refuses them too): re-export them without Draco.
126
+ - A file only changes when it gets clearly smaller (re-encoding without resizing needs a 10 % gain); `assets/manifest.json` follows. Each file reports `maxSize`, `sizeReason`, its images (`role`, `from` / `to` as `WxH type KB`) and `geometry` (triangles / vertices before and after, filters). `--dry-run` encodes everything and returns the real savings without writing.
127
+ - After applying, run `check` and `render` and look at the image: textures and models must look the same. If a surface looks soft, re-run that file with `--max-size 2048`.
128
+ - Library assets (`library:`) are never modified, and `.hdr` / `.exr` files are not optimised at all: when a library HDRI pushes a scene over its KB budget, `assets optimize` has nothing to do (`files: []`); switch to a lighter HDRI or a procedural `lighting` preset. `export --optimize` exports optimised copies of every asset (library ones included; textures keep their format there) without touching the project.
129
+ - Textures need headless Chrome (like `render`); geometry does not. MCP: `assets_optimize` takes `{ "paths": [...] | "all": true, "maxSize", "quality", "format", "compress", "simplify", "simplifyError", "dryRun" }` — call it with `dryRun: true` first.
130
+
131
+ ## Licences and attribution
132
+
133
+ - CC0 needs no credit; everything Agent3D searches is CC0, except some Khronos samples (CC-BY-4.0). In the library, the fonts are OFL-1.1 and four models need a credit: `models/products/sneaker.glb` (Shopify, CC-BY-4.0), `models/products/iridescent-lamp.glb` and `models/products/velvet-sofa.glb` (Eric Chadwick, Wayfair, CC-BY-4.0) and `models/animals/fox.glb` (CC-BY parts). Using them is fine: the listing shows `license` and `author`, `check` reports the credit and the export writes it.
134
+ - `check` lists every asset whose licence needs attribution (`licences`, and `attribution` infos); `export` writes them to `<name>/CREDITS.txt` and returns `credits`. Tell the user to keep the credits (a line near the embed or on a credits page).
135
+ - Never download from sites that need an account, scrape a page, or add a file whose licence you don't know. If the user supplies a file, ask who made it and under which licence.
136
+ - Exports never hotlink: every file is copied into the export.
137
+
138
+ ## Budgets
139
+
140
+ The `check` KB budget per target counts assets + scripts + scene (runtime excluded): banner 600 KB, card 400, square / inline 600, hero 1500, fullscreen / game 4000 (`target.budgetKb` overrides it). Typical sizes: a library model 6 KB to 1.8 MB (median ~30 KB; photoreal products 170 KB to 1.8 MB), a library texture set ~150–270 KB, a library HDRI 0.36–1.9 MB (`.hdr`) or 50–250 KB (`.jpg`), a library font 80–230 KB (copied only when used), a downloaded 1k texture set 2–4 MB (the colour JPG alone ~1.3 MB), a Poly Haven 1k HDRI ~1.5 MB. A banner with a downloaded 1k texture set is already over budget: prefer library textures, `repeat` a small texture, or a material colour. Details and the per-source notes: [references/sources.md](references/sources.md).
@@ -0,0 +1,33 @@
1
+ # Asset sources
2
+
3
+ Agent3D only uses free sources that need **no account** and allow redistribution, and it downloads each file **once into the project** (`assets/` + `assets/manifest.json`). At run time nothing is fetched from those sites: exports carry their own copies.
4
+
5
+ | Source | `--source` | Kinds | Licence | How |
6
+ |---|---|---|---|---|
7
+ | Built-in library | (none: `assets library`) | models, textures, HDRIs, fonts | CC0, except fonts (OFL-1.1), three Khronos product samples (sneaker, iridescent lamp, velvet sofa: CC-BY-4.0) and the fox (CC-BY parts) | `library:<id>` in the scene, copied into exports (fonts only when used) |
8
+ | Poly Haven (polyhaven.com) | `polyhaven` | model, texture, hdri | CC0 | `assets search` → `assets add --hit` (models: `.gltf` + `.bin` + textures) |
9
+ | ambientCG (ambientcg.com) | `ambientcg` | texture, hdri | CC0 | `assets search` → `assets add --hit` (zip extracted: colour, normal GL, roughness, AO) |
10
+ | Khronos glTF-Sample-Assets | `khronos` | model | CC0 or CC-BY-4.0 (attribution recorded) | `assets search` → `assets add --hit` (`.glb`) |
11
+ | Kenney (kenney.nl) | `kenney` | model packs | CC0 | curated index; the user downloads the zip, then `assets add <file.zip> --source kenney --license CC0-1.0 --filter <word>` |
12
+ | Quaternius (quaternius.com) | `quaternius` | model packs (characters, animals, nature) | CC0 | same as Kenney, with `--source quaternius` |
13
+
14
+ ## The manifest
15
+
16
+ `assets/manifest.json` holds one entry per file: `path`, `kind` (model, texture, hdri, audio, font, svg, other), `bytes`, `source` (local, polyhaven, ambientcg, khronos, kenney, quaternius or a URL), `sourceUrl`, `license`, `author`, `attribution` (the text to show when the licence asks for it), `addedAt`. Never edit it by hand: `assets add` and `assets remove` keep it right, `check` reads it, `export` turns it into `CREDITS.txt`.
17
+
18
+ ## Choosing resolutions
19
+
20
+ - Textures: 1k for anything that is not full-screen. A 1k colour map is ~1.3 MB as JPG; normal and roughness maps add as much again. Tile with `repeat` rather than going up in resolution.
21
+ - HDRIs for lighting only (not shown): a 512 × 256 `.hdr` is enough (library `studio`, `sky`, `sunset`, `night`, ~360-410 KB); the library's 1024 × 512 `.hdr` files (`softbox`, `warehouse`, `forest`, `city`, `beach`, `night-city`, 1.5-1.9 MB) give crisper reflections for products and heroes. Shown as a background: a `.jpg` equirect (library: 1024 × 512 or 2048 × 1024), with `blur` to hide its resolution. `assets optimize` does not shrink `.hdr` / `.exr` files: pick the resolution at download time (`--resolution 1k`).
22
+ - Procedural alternatives cost zero bytes: `lighting` presets (`studio`, `soft`, `sunset`, `night`), physical skies, procedural textures (`catalog textures`).
23
+ - Models: prefer low-poly (Kenney, Quaternius, the library) for banners and games. Photogrammetry models from Poly Haven are heavy (tens of thousands of triangles plus 1k–4k textures): use them only in heroes or product scenes, check the budget with `check --render`, and run `assets optimize` (smart texture sizes, WebP, meshopt geometry, optional `--simplify`) before exporting.
24
+
25
+ ## Attribution text
26
+
27
+ When `license` is CC-BY-4.0 (Khronos samples, the library's sneaker, iridescent lamp, velvet sofa and fox) or OFL-1.1 (library fonts), keep the credit that `check` and `export` give (for example: `"Fox" — Model by PixelMannen (CC0-1.0); Rigging & Animation by tomkranis (CC-BY-4.0)… Source: Khronos glTF-Sample-Assets.`). Put it on the page near the element or on a credits page, with a link to the licence. CC0 assets need nothing, but crediting Poly Haven, ambientCG, Kenney or Quaternius is appreciated.
28
+
29
+ ## What not to do
30
+
31
+ - Don't use assets from marketplaces or sites that need a login (Sketchfab, TurboSquid, CGTrader…) through Agent3D: their licences vary per file and downloads need accounts. If the user owns such a file, they add it themselves with `assets add <file> --license <their licence>`.
32
+ - Don't hotlink: a URL in `src` would make the export depend on another site. Download into the project instead.
33
+ - Don't import whole packs: filter to the models the scene uses (`--filter coin --filter flag`).
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: agent3d-create
3
+ description: Build a 3D element for a web page from a brief with Agent3D - an animated banner, a hero, a mascot or character, a low-poly landscape, a product showcase, a logo in 3D, a mini game - by writing a JSON scene, rendering it headless and LOOKING at the screenshots until it looks professional, then exporting a self-contained embed (Web Component + static files, or one HTML file). Use when the user asks for something 3D, animated or interactive for their website ("an animated banner for my bakery", "a low-poly island hero", "a 3D version of my logo", "a mini game where...").
4
+ license: PolyForm-Noncommercial-1.0.0
5
+ compatibility: Requires Node.js 22+ and Google Chrome (or Chromium/Edge) for renders.
6
+ metadata:
7
+ version: "0.2.0"
8
+ repository: "https://github.com/fleox/agent3d"
9
+ allowed-tools: Bash Read Write
10
+ ---
11
+
12
+ # Create a 3D web element
13
+
14
+ Agent3D turns a JSON **scene** (`scene.json` in a project folder) into a 3D element for a web page. You write the scene, render it headless with the user's own Chrome, **look at the images**, fix, and export an embed that works on any static site: no server, no account, no CDN.
15
+
16
+ **Language:** talk to the user in their language; keep commands, ids and files in English.
17
+
18
+ Every command is `npx -y @fleox/agent3d@0.2.0 <command> --json` and prints one object: `{"ok": true, "data": …}` or `{"ok": false, "error": {"code", "message", "hint"}}`. Read `error.hint` when `ok` is false: it says what to do. `npx -y @fleox/agent3d@0.2.0 help scene --json` lists any command's actions and options. Pass `--project <dir>` to every project command (default: the current directory).
19
+
20
+ First run on a machine: `npx -y @fleox/agent3d@0.2.0 doctor --json` checks Node, Chrome and does a test render: `{ ok: true, data: { checks } }` when everything required passes, else `{ ok: false, error: { code: "doctor-failed", hint } }` (exit 1) with one hint per failed check and every check in `error.details.checks`. Without Chrome, renders and posters fail with a hint (install Chrome, or set `AGENT3D_CHROME`); `export --no-poster` still works.
21
+
22
+ ## The loop
23
+
24
+ 1. **Clarify the brief** (ask at most 3 short questions, propose defaults for the rest):
25
+ - **Where it goes and its shape**: a full-width banner (4:1), a hero (16:9 or 21:9), a card (1:1 or 4:5), a square, fullscreen, inline, a game (16:9). This sets `target.kind` and `target.aspect`.
26
+ - **Brand**: colours (hex), the text to show (exact spelling), the mood (playful, premium, techy, natural), a logo (SVG file?).
27
+ - **Text in 3D or in HTML?** If the page puts its own headline and buttons over or next to the element, keep the 3D side free (see composition below) and don't duplicate the text in 3D.
28
+ - **Motion**: calm ambient loop (default for banners), interactive (follow the pointer, hover, orbit), scroll-driven, or a game.
29
+ 2. **Start** from a template or from the starter for the target:
30
+ ```bash
31
+ npx -y @fleox/agent3d@0.2.0 templates list --json
32
+ npx -y @fleox/agent3d@0.2.0 new bakery-banner --target banner --title "Golden Crust Bakery" --json
33
+ npx -y @fleox/agent3d@0.2.0 new bakery-banner --template banner-neon-title --title "Golden Crust Bakery" --json
34
+ ```
35
+ Without `--template`, `new` writes an attractive valid starter for the target (banner: gradient background, studio lights, a floating 3D title, a few props, dust particles, a slow loop; game: + `scripts/game.js`). `--aspect 21:9` overrides the aspect.
36
+ 3. **Learn what exists** before writing anything. Never guess ids or parameter names:
37
+ ```bash
38
+ npx -y @fleox/agent3d@0.2.0 catalog --json
39
+ npx -y @fleox/agent3d@0.2.0 catalog generators terrain --json
40
+ npx -y @fleox/agent3d@0.2.0 catalog behaviours --json
41
+ npx -y @fleox/agent3d@0.2.0 catalog postfx look --json
42
+ npx -y @fleox/agent3d@0.2.0 scene summary --project bakery-banner --json
43
+ ```
44
+ Sections: geometries, materialPresets, shaders, textures (procedural, zero bytes), lightRigs, behaviours, generators, particlePresets, postfx (with the `look` presets and each effect's GPU cost), fonts, sounds. Built-in models, textures and HDRIs: `assets library --query <word>` (skill `agent3d-assets`). The field-by-field scene format is in the `agent3d-edit` skill (`references/patch-ops.md`).
45
+ 4. **Build with patches** (small, reviewable, ids stay stable). Write the ops to a file and apply them:
46
+ ```bash
47
+ npx -y @fleox/agent3d@0.2.0 scene patch --project bakery-banner --file ops.json --json
48
+ ```
49
+ ```json
50
+ [
51
+ { "op": "set", "path": "environment.background", "value": { "gradient": ["#2a1306", "#5c2c0c", "#a8561b"], "angle": 10 } },
52
+ { "op": "set", "path": "environment.rig", "value": "golden-hour" },
53
+ { "op": "set", "path": "objects#title.material", "value": { "preset": "satin", "color": "#fff4e0" } },
54
+ { "op": "updateObject", "id": "title", "set": { "text": "Golden Crust", "font": "serif-bold", "size": 1.1, "behaviours": [{ "type": "float", "amplitude": 0.08, "speed": 0.4 }], "reveal": { "effect": "rise", "stagger": 0.05, "duration": 0.7 } } },
55
+ { "op": "addObject", "object": { "id": "donut", "kind": "mesh", "geometry": { "type": "torus", "radius": 0.7, "tube": 0.32 }, "material": { "preset": "ceramic", "color": "#d9944a" }, "position": [-9.5, -0.6, -1] } },
56
+ { "op": "set", "path": "postfx", "value": [{ "type": "look", "preset": "cinematic", "intensity": 0.7 }] }
57
+ ]
58
+ ```
59
+ (On the banner starter this swaps the title's `appear` for a per-letter `reveal`, adds a golden-hour light rig on top of the starter's lights and replaces its bloom with a graded film look.)
60
+ A patch is atomic and validated: on errors nothing is written and `issues` lists each problem with its JSON path and a "did you mean" hint. Removals (`removeObject`, `remove`) and ops that replace a whole collection (`set` / `merge` on `postfx`, `lights`, `objects`, `timeline.tracks`, `ui.elements`, `interactions`, `behaviours`…) print a plan with `needsConfirmation: true` (`plan.replaces` lists each collection and its item count): re-run with `--yes` once that is what you want — the example above replaces the starter's `postfx`, so it needs `--yes`. Full ops reference and gotchas: references in `agent3d-edit` (`patch-ops.md`). For a brand new scene, write the whole file and use `scene apply --file scene.json` (always a plan first, then `--yes`).
61
+ - **Gotcha:** `updateObject` and `merge` deep-merge. Switching `material.preset` with `updateObject` keeps the old `color` / `roughness` overrides (gold stays white). To change a look, **replace** the material: `{ "op": "set", "path": "objects#title.material", "value": { "preset": "gold" } }`.
62
+ 5. **Render and LOOK** (this is the step that makes it good):
63
+ ```bash
64
+ npx -y @fleox/agent3d@0.2.0 render --project bakery-banner --sheet --count 4 --json
65
+ ```
66
+ Then open `data.sheet` (a PNG contact sheet with time labels; paths are relative to the project folder `data.dir`) with the Read tool and judge it like an art director:
67
+ - **Framing at the aspect ratio**: nothing important cut at the edges; the subject reads at a glance; wide banners keep content in the central ~80% of the width.
68
+ - **Composition**: a clear focal point, balanced weight, room left for HTML text if the page needs it.
69
+ - **Text**: spelled right, readable (contrast with the background), not overlapped by props.
70
+ - **Colours**: match the brand; not washed out or blown out by bloom; the background separates from the subject.
71
+ - **Motion**: frames differ (something moves), but nothing jumps; the first frame is not empty (an `appear` behaviour hides objects at t = 0, so set `target.posterTime` after it).
72
+ - Also read `data.issues`, `data.consoleErrors` and `data.inspect.objects` (each top-level object's `inView`: full / partial / none, and `screenCoverage`).
73
+ - `--frames 0,2,4` picks exact times; `--scale 2` gives retina-sharp frames; `--quality high` supersamples 2x for a final look at fine edges and text.
74
+ - Interactive and scroll scenes: `--input '[{"t": 1.9, "pointer": [0, -0.3]}]'` hovers (or `"click": [x, y]`, coordinates -1..1, y up) before the following frames; `--scroll 0.5` shows (one frame) a scroll-driven scene half-way down the page (with `timeline.trigger: "scroll"`, plain `--count 8` already walks through the scroll states).
75
+ - Phones: the embed keeps `target.aspect` at any width, so render the real phone size: `--size 390x98` for a 4:1 banner, `--size 390x219` for 16:9. A taller `--size` (390x700) only previews pages whose CSS (or `target.height`) gives the element a height: the camera then widens its view to keep the horizontal framing. Portrait designs use a portrait `target.aspect` (art direction → Framing per target).
76
+ - To show the user the motion: `--gif renders/preview.gif --duration 4` (or `--video <file>.mp4`, `--webp <file>.webp`); the path is relative to the project folder.
77
+ - `--isolate <objectId>` renders one object alone (no behaviours, scripts or UI), at the origin, auto-framed from the front three-quarter view (+Z front) on a neutral grey background, and returns `data.isolated.size`: the fastest way to check that a downloaded model faces +Z, stands upright and has a sensible size.
78
+ ```bash
79
+ npx -y @fleox/agent3d@0.2.0 render --project bakery-banner --isolate croissant-left --json
80
+ ```
81
+ - Transparent scenes (`target.transparent`): frames keep their alpha and the contact sheet gets a checkerboard behind them; `--bg "#ffffff"` (any CSS colour) previews the scene over the host page's colour, frames included; `--bg none` turns it off.
82
+ 6. **Fix and repeat** until it looks finished. Two or three iterations are normal; say what you changed and why.
83
+ 7. **Check** until there are no errors and no warnings:
84
+ ```bash
85
+ npx -y @fleox/agent3d@0.2.0 check --project bakery-banner --render --json
86
+ ```
87
+ It validates the scene, missing assets and scripts, the script sandbox, the triangle and KB budgets for the target, framing (with `--render`) and web settings (aria label, reduced motion, lazy start, pixel ratio cap), and lists licences that need attribution (`infos` with code `attribution`: keep those credits; the export writes `CREDITS.txt`).
88
+ - `data.budget.gpu` is the post-processing cost: `effects` (each with its `gpu` tier and passes), `passes`, `level` (`none`, `light`, `moderate`, `heavy`) and `dropped.low` (effects the `low` quality tier switches off on weak devices). A `postfx-cost` issue means too many fullscreen passes (a warning on games and fullscreen targets, an info elsewhere) or `ao` / `dof` on a game: keep the effects that change the image the most. Grading, vignette, film, chromatic and sharpen merge into one nearly free pass.
89
+ - Over the KB budget: `assets optimize` (skill `agent3d-assets`) shrinks project textures and models. Library assets are never shrunk there: the photographic `.hdr` files weigh 0.35 to 1.9 MB, so on banners and cards prefer a procedural `lighting` preset (`studio`, `soft`, `sunset`, `night`: zero bytes) plus a light rig.
90
+ 8. **Export** and hand over:
91
+ ```bash
92
+ npx -y @fleox/agent3d@0.2.0 export --project bakery-banner --json
93
+ ```
94
+ `data.snippet` is what goes in the page; `data.out` holds `agent3d-runtime/` (shared by every scene of the site), `<name>/` (scene, assets, poster, `CREDITS.txt`), `index.html` (a demo page), `snippet.html`, `head.html`, `EMBED.md` and `frameworks/` (React / Vue / Svelte wrappers). A second export into the same folder needs `--yes`. Give the user: the snippet, the folder to upload, the total size, the credits, and offer `serve` for a live look (`npx -y @fleox/agent3d@0.2.0 serve --project bakery-banner --open`). Other formats (zip, single HTML file, poster image, MP4 / WebM video, GIF) and site integration: skill `agent3d-publish`.
95
+
96
+ ## Other front doors: MCP and the Studio
97
+
98
+ Everything above also works without the shell:
99
+
100
+ - **MCP server** — `agent3d mcp` serves one project folder over stdio: the same tools as `tools list` (scene_patch, check, export…) plus `render_preview`, whose contact sheet comes back as an image the client can look at. Claude Code: `claude mcp add agent3d -- npx -y @fleox/agent3d@0.2.0 mcp --project /path/to/my-banner` (add `--scope project` to write `.mcp.json` for the repository). Claude Desktop / Cursor: in `claude_desktop_config.json` / `.cursor/mcp.json`:
101
+ ```json
102
+ { "mcpServers": { "agent3d": { "command": "npx", "args": ["-y", "@fleox/agent3d@0.2.0", "mcp", "--project", "/Users/me/agent3d/my-banner"] } } }
103
+ ```
104
+ `--read-only` exposes only the tools that don't write. Desktop apps may not see the shell's `PATH`: use the absolute path of `npx` as `command` if the server doesn't start.
105
+ - **Studio** — `npx -y @fleox/agent3d@0.2.0 studio --project bakery-banner` opens a visual editor on the same folder (viewport with move / rotate / scale gizmos, outliner, inspector, timeline, catalog and library, templates, check, render and export dialogs; English or French). It prints its local URL and runs until stopped. Edits go through the same validated tools, and changes you make from the CLI appear live in it, so the user can watch and tweak your work. The viewport starts in edit mode (scripts don't run, the timeline is paused and scrubbed); interact mode (`I`) runs the scene as the website does: scripts, hover / click / scroll triggers.
106
+
107
+ ## Art direction that looks professional
108
+
109
+ Short version below; the "Premium defaults" section of [references/art-direction.md](references/art-direction.md) gives the starting values per kind (plus palettes and numbers), and [references/recipes.md](references/recipes.md) holds complete validated scenes per kind (banner, hero, landscape, character, product, game).
110
+
111
+ **Premium starting points** (one line each in the scene, zero bytes; parameters via `catalog <section> <id>`):
112
+
113
+ - **Light with a rig** instead of hand-placed lights: `"environment": { "rig": "softbox" }` (products), `"studio-3point"`, `"product-top"`, `"rim"`, `"dramatic"`, `"golden-hour"`, `"noon"`, `"overcast"`, `"neon"`, `"moonlight"` (`catalog lightRigs`). Rigs assume a subject about 1 to 3 units around the origin (`{ "preset": "softbox", "scale": 3 }` for bigger scenes); their lights add to `lights`, so drop or dim the starter's lights when you add one.
114
+ - **Reflections**: `environment.lighting` `studio` / `soft` / `sunset` / `night` (procedural), or a library HDRI (`{ "hdri": "library:hdri/softbox.hdr" }` for products, about 1.5 MB: heroes and product scenes only).
115
+ - **Outdoors**: a physical sky `{ "sky": { "preset": "golden-hour" } }` (sunrise, morning, noon, afternoon, golden-hour, sunset, dusk) brings its own sun light and lighting; add height fog `{ "density": 0.025, "height": 1, "falloff": 0.25 }` for depth.
116
+ - **Abstract backgrounds**: `{ "meshGradient": ["#ff9a8b", "#ff6a88", "#7b5cff", "#2ad4ff"], "speed": 0.15 }` (soft drifting colour blobs) or a 2 to 3 tone `gradient` / `radial` with `"grain": 0.03`.
117
+ - **Grounding**: `"contactShadows": { "opacity": 0.6, "blur": 2.5 }` puts soft shadows under products and characters without a shadow-casting light.
118
+ - **Materials**: photoreal presets (carPaint, ceramic, marble, satin, leather, brushedAluminium, gem, jelly…: `catalog materialPresets`) and procedural texture slots `"map": { "procedural": "wood" }` (`catalog textures`) beat flat colours.
119
+ - **Finish**: one `look` post effect sets bloom, grading, vignette and antialiasing in a single line: `{ "type": "look", "preset": "product" }` (also cinematic, dreamy, neon, retro, clean; `intensity` 0..1). Add an effect next to it to override one param (`{ "type": "vignette", "darkness": 0.3 }`). Leave `target.quality` at `auto`: it adapts to the visitor's device.
120
+ - **Typography**: 13 fonts (`catalog fonts`: inter-black, montserrat-extrabold, bebas-neue, anton for punch; serif-bold / serif for premium; pacifico, lobster for script; display for playful). `outline` gives the sticker look, `maxWidth` wraps, and `reveal` (`{ "effect": "rise", "stagger": 0.05 }`) animates letter by letter. Set `target.posterTime` after the reveal ends.
121
+ - **Motion and interaction**: per-key easing (`[1, 12, "outBack"]`, `"spring(170, 12)"`), staggered multi-target tracks (`tag:<tag>`, `children:<id>`), camera `shots` (pushIn, orbit, crane, path…), hover / click `interactions` that play timeline segments or open a URL, and `timeline.trigger: "scroll"` for scroll stories. Recipes for each: `agent3d-edit` (`references/patch-ops.md`).
122
+
123
+ Fundamentals:
124
+
125
+ - **One idea per element.** A title and two or three props beats ten objects. Repetition of one shape at different depths looks designed; random variety looks noisy.
126
+ - **Composition**: put the subject on a third (x ≈ ±2.5 in a 16:9 hero at fov 35 / distance 9) when the page puts HTML text on the other side. Banners: centre the title, props at the far left and right (|x| ≥ 7.5 at fov 30 / z 12 in a 4:1 banner, whose visible width is about 26 units), nothing in the top and bottom 10%.
127
+ - **Palette**: background in 2–3 close tones of the brand (dark → mid), subject in a lighter or more saturated tone, one accent. Check contrast in the render: a gold title on a gold background disappears.
128
+ - **Camera**: perspective fov 30–40 for banners and products (less distortion), 45–55 for landscapes and games. Wide banner: fov 30, z 12. Hero 16:9: fov 35, z 9. Card 1:1: fov 32, z 5.5–7.
129
+ - **Motion for web pages**: slow and loopable. Float amplitude 0.05–0.2 at 0.2–0.4 cycles/s, rotations 10–20 deg/s, timeline loops of 6–10 s that end where they start (`[[0,-5],[4,5],[8,-5]]`). Parallax strength 0.3–0.5. Keep `target.reducedMotion` at `static` (the default) for banners, and make `posterTime` a frame where everything is visible (after every `appear` / `reveal` delay + duration; reduced-motion visitors see them finished anyway, but the exported poster does not).
130
+ - **Post effects** with restraint: no film grain, chromatic aberration, glitch or ascii on brand work unless asked; `ao` and `dof` are expensive (never on games: `check` warns).
131
+ - **Budgets** (the `check` budget is per target): triangles are counted per frame with every pass (shadow maps, AO pre-pass): banners and cards stay under ~150 k and a few hundred KB of assets; heroes ~400 k; games ~300 k (`references/art-direction.md` → Performance budgets). Prefer generators, primitives, procedural textures and the built-in library over large models; textures at 1k, then `assets optimize`.
132
+
133
+ ## Rules
134
+
135
+ - Never invent catalog ids, parameter names or library ids: read `catalog` and `assets library` first. Validation errors come with "did you mean" hints: follow them.
136
+ - Keep ids stable and meaningful (`title`, `donut`, `key`): timelines, behaviours and scripts refer to them.
137
+ - Units ≈ metres, Y up, angles in degrees, colours as CSS strings, time in seconds.
138
+ - Always render and look before saying it is done. If you cannot view images, read `data.inspect` and `check --render` issues and say that you could not check the look.
139
+ - Destructive steps (removing objects, `scene apply`, overwriting an export) print a plan first. When you are acting for the user on their own project, show what will change and get their agreement before `--yes`.
140
+ - Scripts (games, interactive logic) only get the sandboxed `api`: skill `agent3d-game`.
141
+ - Assets from outside the library: skill `agent3d-assets` (CC0 sources, licences recorded in the project).