@fleox/agent3d 0.0.0-stage → 0.2.1
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/LICENSE +143 -0
- package/README.md +396 -2
- package/changelog.json +68 -0
- package/dist/agent/agent3d.mjs +11242 -0
- package/dist/agent/chunks/assets-BUUM9TUB.mjs +2448 -0
- package/dist/agent/chunks/browser-t_JL_B82.mjs +226 -0
- package/dist/agent/chunks/cdp-Bdtm4fBN.mjs +178 -0
- package/dist/agent/chunks/check-CBO3Ekx1.mjs +971 -0
- package/dist/agent/chunks/export-BCI8vKw8.mjs +1130 -0
- package/dist/agent/chunks/gif-DQznzHTL.mjs +319 -0
- package/dist/agent/chunks/gltf-f_f0-OiV.mjs +207 -0
- package/dist/agent/chunks/imageCodec-Dz9PFxi9.mjs +101 -0
- package/dist/agent/chunks/jsonPath-DUCe1JpS.mjs +155 -0
- package/dist/agent/chunks/meshoptimizer-C-tN9jn5.mjs +1165 -0
- package/dist/agent/chunks/mp4-aOALfp3s.mjs +130 -0
- package/dist/agent/chunks/objects-DBAws7uf.mjs +53 -0
- package/dist/agent/chunks/optimizeSizing-CkZ3fZRp.mjs +540 -0
- package/dist/agent/chunks/package-BOIyp_2B.mjs +75 -0
- package/dist/agent/chunks/png-DXfSGJZt.mjs +91 -0
- package/dist/agent/chunks/render-CN4mgGLQ.mjs +1511 -0
- package/dist/agent/chunks/rolldown-runtime-ebOQtxsr.mjs +18 -0
- package/dist/agent/chunks/scene-BgajNvBf.mjs +444 -0
- package/dist/agent/chunks/server-CACCerkZ.mjs +237 -0
- package/dist/agent/chunks/suggest-Cpcgv1RP.mjs +46 -0
- package/dist/agent/chunks/tools-DT2tetIK.mjs +1412 -0
- package/dist/agent/chunks/tree-BrNYGui2.mjs +75 -0
- package/dist/agent/chunks/webpAnim-qaq9YgKl.mjs +132 -0
- package/dist/runtime/agent3d-runtime.js +373 -0
- package/dist/runtime/agent3d-runtime.single.js +7360 -0
- package/dist/runtime/chunks/BufferGeometryUtils-XmME4f7Z.js +1 -0
- package/dist/runtime/chunks/EXRLoader-CBdIpBMT.js +1 -0
- package/dist/runtime/chunks/FontLoader-dVu9WH2X.js +2 -0
- package/dist/runtime/chunks/GLTFLoader-Z9Inv-Xm.js +1 -0
- package/dist/runtime/chunks/GroundedSkybox-g1ASZWNu.js +1 -0
- package/dist/runtime/chunks/HDRLoader-DBOMWa7O.js +5 -0
- package/dist/runtime/chunks/OrbitControls-BIpWXK4x.js +1 -0
- package/dist/runtime/chunks/RectAreaLightUniformsLib-4ZzgX9vp.js +1 -0
- package/dist/runtime/chunks/RoomEnvironment-CXgfLJdO.js +1 -0
- package/dist/runtime/chunks/RoundedBoxGeometry-BViRogcJ.js +1 -0
- package/dist/runtime/chunks/SVGLoader-CV0U1EIF.js +1 -0
- package/dist/runtime/chunks/SkeletonUtils-DHlReJx3.js +1 -0
- package/dist/runtime/chunks/Sky-DGJXlPb_.js +243 -0
- package/dist/runtime/chunks/audio-DbVNbf-r.js +1 -0
- package/dist/runtime/chunks/catalog-DL6sgPay.js +1 -0
- package/dist/runtime/chunks/easing-CXSz2e6P.js +1 -0
- package/dist/runtime/chunks/extrude-D6WnITQq.js +1 -0
- package/dist/runtime/chunks/game-BoEiyZrL.js +20 -0
- package/dist/runtime/chunks/generators-D5JUo0jp.js +331 -0
- package/dist/runtime/chunks/materials-Dn-bYrZd.js +107 -0
- package/dist/runtime/chunks/meshGradient.glsl-BMatplLA.js +88 -0
- package/dist/runtime/chunks/meshopt_decoder.module-DXTYc6wn.js +1 -0
- package/dist/runtime/chunks/model-BCVF3QzB.js +1 -0
- package/dist/runtime/chunks/params-C2uoUDJ0.js +1 -0
- package/dist/runtime/chunks/physicsHost-ChPgysMQ.js +1 -0
- package/dist/runtime/chunks/postfx-UgKCbmZs.js +1527 -0
- package/dist/runtime/chunks/postfx-i_J5Vf-l.js +1 -0
- package/dist/runtime/chunks/random-eeej60NW.js +1 -0
- package/dist/runtime/chunks/shaders-Dw6zHdu_.js +443 -0
- package/dist/runtime/chunks/svg-CmlFY_8O.js +1 -0
- package/dist/runtime/chunks/text-D1EQpdSU.js +2 -0
- package/dist/runtime/chunks/three.module-DnaBiDAJ.js +4225 -0
- package/dist/runtime/chunks/toon-BsvVk_nK.js +6 -0
- package/dist/runtime/chunks/util-CyaW1fcW.js +1 -0
- package/dist/studio/assets/BufferGeometryUtils-CAlXAboW.js +1 -0
- package/dist/studio/assets/EXRLoader-BKkzlNd8.js +1 -0
- package/dist/studio/assets/FontLoader-Bzjx8mXt.js +2 -0
- package/dist/studio/assets/GLTFLoader-1Zd9N406.js +1 -0
- package/dist/studio/assets/GroundedSkybox-BEMqNCBD.js +1 -0
- package/dist/studio/assets/HDRLoader-DxB0kxPH.js +5 -0
- package/dist/studio/assets/OrbitControls-MlE9XiCg.js +1 -0
- package/dist/studio/assets/RectAreaLightUniformsLib-ClHrtYY6.js +1 -0
- package/dist/studio/assets/RoomEnvironment-MJ-jIEC8.js +1 -0
- package/dist/studio/assets/SVGLoader-CIYl0nEy.js +1 -0
- package/dist/studio/assets/SkeletonUtils-CG5akqME.js +1 -0
- package/dist/studio/assets/Sky-DNMfpp92.js +243 -0
- package/dist/studio/assets/audio-JD1kyX0A.js +1 -0
- package/dist/studio/assets/camera-7sEn13L-.js +2 -0
- package/dist/studio/assets/editor-CnbvVkhU.js +53 -0
- package/dist/studio/assets/extrude-9bG8hr2C.js +1 -0
- package/dist/studio/assets/game-B04KGAK0.js +19 -0
- package/dist/studio/assets/generators-LSni1Yfc.js +331 -0
- package/dist/studio/assets/index-3LL5NEIH.js +479 -0
- package/dist/studio/assets/index-BQT0otii.css +1 -0
- package/dist/studio/assets/meshopt_decoder.module-DXTYc6wn.js +1 -0
- package/dist/studio/assets/meshoptimizer-BCSwHBL3.js +1 -0
- package/dist/studio/assets/model-CNddhwmA.js +2 -0
- package/dist/studio/assets/physicsHost-hMU_SDiX.js +1 -0
- package/dist/studio/assets/postfx-BcCZS0Bq.js +1527 -0
- package/dist/studio/assets/runtime-DY_KqD1x.js +572 -0
- package/dist/studio/assets/shaders-BhMCstyv.js +443 -0
- package/dist/studio/assets/svg-CNKK-h7H.js +2 -0
- package/dist/studio/assets/text-BSPI7dk1.js +3 -0
- package/dist/studio/assets/three.module-CnI50X0U.js +4225 -0
- package/dist/studio/index.html +16 -0
- package/library/LICENSES.md +77 -0
- package/library/fonts/LICENSES.md +42 -0
- package/library/fonts/anton.typeface.json +1 -0
- package/library/fonts/bebas-neue.typeface.json +1 -0
- package/library/fonts/display.typeface.json +1 -0
- package/library/fonts/inter-black.typeface.json +1 -0
- package/library/fonts/lobster.typeface.json +1 -0
- package/library/fonts/mono.typeface.json +1 -0
- package/library/fonts/montserrat-extrabold.typeface.json +1 -0
- package/library/fonts/pacifico.typeface.json +1 -0
- package/library/fonts/sans-bold.typeface.json +1 -0
- package/library/fonts/sans.typeface.json +1 -0
- package/library/fonts/serif-bold.typeface.json +1 -0
- package/library/fonts/serif.typeface.json +1 -0
- package/library/fonts/space-grotesk-bold.typeface.json +1 -0
- package/library/hdri/beach.hdr +0 -0
- package/library/hdri/beach.jpg +0 -0
- package/library/hdri/city.hdr +0 -0
- package/library/hdri/city.jpg +0 -0
- package/library/hdri/forest.hdr +0 -0
- package/library/hdri/forest.jpg +0 -0
- package/library/hdri/night-city.hdr +0 -0
- package/library/hdri/night-city.jpg +0 -0
- package/library/hdri/night.hdr +0 -0
- package/library/hdri/night.jpg +0 -0
- package/library/hdri/sky.hdr +0 -0
- package/library/hdri/sky.jpg +0 -0
- package/library/hdri/softbox.hdr +0 -0
- package/library/hdri/softbox.jpg +0 -0
- package/library/hdri/studio.hdr +0 -0
- package/library/hdri/studio.jpg +0 -0
- package/library/hdri/sunset.hdr +0 -0
- package/library/hdri/sunset.jpg +0 -0
- package/library/hdri/warehouse.hdr +0 -0
- package/library/hdri/warehouse.jpg +0 -0
- package/library/index.json +5510 -0
- package/library/models/animals/fish.glb +0 -0
- package/library/models/animals/fox.glb +0 -0
- package/library/models/buildings/castle.glb +0 -0
- package/library/models/buildings/house.glb +0 -0
- package/library/models/buildings/market.glb +0 -0
- package/library/models/buildings/tavern.glb +0 -0
- package/library/models/buildings/tower.glb +0 -0
- package/library/models/buildings/windmill.glb +0 -0
- package/library/models/characters/barbarian.glb +0 -0
- package/library/models/characters/knight.glb +0 -0
- package/library/models/characters/mage.glb +0 -0
- package/library/models/characters/mini-soldier.glb +0 -0
- package/library/models/characters/platformer-hero.glb +0 -0
- package/library/models/characters/robot.glb +0 -0
- package/library/models/characters/rogue.glb +0 -0
- package/library/models/characters/skeleton.glb +0 -0
- package/library/models/city/building-a.glb +0 -0
- package/library/models/city/building-b.glb +0 -0
- package/library/models/city/building-tall.glb +0 -0
- package/library/models/city/fire-hydrant.glb +0 -0
- package/library/models/city/road-corner.glb +0 -0
- package/library/models/city/road-crossing.glb +0 -0
- package/library/models/city/road-junction.glb +0 -0
- package/library/models/city/road-straight.glb +0 -0
- package/library/models/city/streetlight.glb +0 -0
- package/library/models/city/suburban-house.glb +0 -0
- package/library/models/city/traffic-light.glb +0 -0
- package/library/models/city/water-tower.glb +0 -0
- package/library/models/food/apple.glb +0 -0
- package/library/models/food/avocado.glb +0 -0
- package/library/models/food/baguette.glb +0 -0
- package/library/models/food/bread-loaf.glb +0 -0
- package/library/models/food/burger.glb +0 -0
- package/library/models/food/carrot.glb +0 -0
- package/library/models/food/cheese.glb +0 -0
- package/library/models/food/cookie.glb +0 -0
- package/library/models/food/croissant.glb +0 -0
- package/library/models/food/cupcake.glb +0 -0
- package/library/models/food/dinner-plate.glb +0 -0
- package/library/models/food/donut.glb +0 -0
- package/library/models/food/ketchup.glb +0 -0
- package/library/models/food/mug.glb +0 -0
- package/library/models/food/pain-au-chocolat.glb +0 -0
- package/library/models/food/stew.glb +0 -0
- package/library/models/food/tomato.glb +0 -0
- package/library/models/food/veggie-burger.glb +0 -0
- package/library/models/nature/bush.glb +0 -0
- package/library/models/nature/cactus.glb +0 -0
- package/library/models/nature/cloud.glb +0 -0
- package/library/models/nature/fir-tree.glb +0 -0
- package/library/models/nature/forest-patch.glb +0 -0
- package/library/models/nature/grass-small.glb +0 -0
- package/library/models/nature/grass.glb +0 -0
- package/library/models/nature/hex-grass.glb +0 -0
- package/library/models/nature/hex-water.glb +0 -0
- package/library/models/nature/hills.glb +0 -0
- package/library/models/nature/mountain.glb +0 -0
- package/library/models/nature/pine-autumn.glb +0 -0
- package/library/models/nature/pine-tree.glb +0 -0
- package/library/models/nature/pumpkin.glb +0 -0
- package/library/models/nature/rock-flat.glb +0 -0
- package/library/models/nature/rock.glb +0 -0
- package/library/models/nature/tree-dead.glb +0 -0
- package/library/models/nature/tree-slim.glb +0 -0
- package/library/models/nature/trees-cluster.glb +0 -0
- package/library/models/nature/waterlily.glb +0 -0
- package/library/models/platformer/blaster.glb +0 -0
- package/library/models/platformer/block-coin.glb +0 -0
- package/library/models/platformer/brick.glb +0 -0
- package/library/models/platformer/coin.glb +0 -0
- package/library/models/platformer/enemy-flying.glb +0 -0
- package/library/models/platformer/flag.glb +0 -0
- package/library/models/platformer/platform-falling.glb +0 -0
- package/library/models/platformer/platform-grass-round.glb +0 -0
- package/library/models/platformer/platform-large.glb +0 -0
- package/library/models/platformer/platform-medium.glb +0 -0
- package/library/models/platformer/platform.glb +0 -0
- package/library/models/platformer/target.glb +0 -0
- package/library/models/platformer/track-corner.glb +0 -0
- package/library/models/platformer/track-straight.glb +0 -0
- package/library/models/platformer/wall-low.glb +0 -0
- package/library/models/products/boombox.glb +0 -0
- package/library/models/products/iridescent-lamp.glb +0 -0
- package/library/models/products/lantern.glb +0 -0
- package/library/models/products/lounge-chair.glb +0 -0
- package/library/models/products/sneaker.glb +0 -0
- package/library/models/products/velvet-sofa.glb +0 -0
- package/library/models/products/water-bottle.glb +0 -0
- package/library/models/props/alarm-clock.glb +0 -0
- package/library/models/props/armchair.glb +0 -0
- package/library/models/props/barrel.glb +0 -0
- package/library/models/props/bench.glb +0 -0
- package/library/models/props/brass-vase.glb +0 -0
- package/library/models/props/chest.glb +0 -0
- package/library/models/props/coffee-table.glb +0 -0
- package/library/models/props/coin-stack.glb +0 -0
- package/library/models/props/coin.glb +0 -0
- package/library/models/props/couch.glb +0 -0
- package/library/models/props/crate.glb +0 -0
- package/library/models/props/flag.glb +0 -0
- package/library/models/props/gravestone.glb +0 -0
- package/library/models/props/key.glb +0 -0
- package/library/models/props/lamp.glb +0 -0
- package/library/models/props/lantern.glb +0 -0
- package/library/models/props/marble-bust.glb +0 -0
- package/library/models/props/modern-armchair.glb +0 -0
- package/library/models/props/potted-succulent.glb +0 -0
- package/library/models/props/rubber-duck.glb +0 -0
- package/library/models/props/shield.glb +0 -0
- package/library/models/props/sword-shield.glb +0 -0
- package/library/models/props/sword.glb +0 -0
- package/library/models/props/table.glb +0 -0
- package/library/models/props/tent.glb +0 -0
- package/library/models/props/torch.glb +0 -0
- package/library/models/props/trophy.glb +0 -0
- package/library/models/space/base-module.glb +0 -0
- package/library/models/space/lander.glb +0 -0
- package/library/models/space/landing-pad.glb +0 -0
- package/library/models/space/rocks.glb +0 -0
- package/library/models/space/solar-panel.glb +0 -0
- package/library/models/space/space-truck.glb +0 -0
- package/library/models/space/wind-turbine.glb +0 -0
- package/library/models/vehicles/car.glb +0 -0
- package/library/models/vehicles/hatchback.glb +0 -0
- package/library/models/vehicles/motorcycle.glb +0 -0
- package/library/models/vehicles/police-car.glb +0 -0
- package/library/models/vehicles/taxi.glb +0 -0
- package/library/models/vehicles/truck.glb +0 -0
- package/library/sources.json +2856 -0
- package/library/textures/brick-color.jpg +0 -0
- package/library/textures/brick-normal.jpg +0 -0
- package/library/textures/brick-roughness.jpg +0 -0
- package/library/textures/concrete-color.jpg +0 -0
- package/library/textures/concrete-normal.jpg +0 -0
- package/library/textures/concrete-roughness.jpg +0 -0
- package/library/textures/fabric-color.jpg +0 -0
- package/library/textures/fabric-normal.jpg +0 -0
- package/library/textures/fabric-roughness.jpg +0 -0
- package/library/textures/grass-ground-color.jpg +0 -0
- package/library/textures/grass-ground-normal.jpg +0 -0
- package/library/textures/grass-ground-roughness.jpg +0 -0
- package/library/textures/rusty-metal-color.jpg +0 -0
- package/library/textures/rusty-metal-normal.jpg +0 -0
- package/library/textures/rusty-metal-roughness.jpg +0 -0
- package/library/textures/wood-planks-color.jpg +0 -0
- package/library/textures/wood-planks-normal.jpg +0 -0
- package/library/textures/wood-planks-roughness.jpg +0 -0
- package/package.json +67 -4
- package/plugin/.claude-plugin/plugin.json +19 -0
- package/plugin/skills/agent3d-assets/SKILL.md +140 -0
- package/plugin/skills/agent3d-assets/references/sources.md +33 -0
- package/plugin/skills/agent3d-create/SKILL.md +141 -0
- package/plugin/skills/agent3d-create/references/art-direction.md +144 -0
- package/plugin/skills/agent3d-create/references/recipes.md +1357 -0
- package/plugin/skills/agent3d-edit/SKILL.md +121 -0
- package/plugin/skills/agent3d-edit/references/patch-ops.md +278 -0
- package/plugin/skills/agent3d-game/SKILL.md +111 -0
- package/plugin/skills/agent3d-game/references/game-patterns.md +262 -0
- package/plugin/skills/agent3d-game/references/script-api.md +211 -0
- package/plugin/skills/agent3d-publish/SKILL.md +161 -0
- package/plugin/skills/agent3d-publish/references/integrations.md +221 -0
- package/templates/banner-aurora-night/README.md +15 -0
- package/templates/banner-aurora-night/agent3d.json +8 -0
- package/templates/banner-aurora-night/preview.png +0 -0
- package/templates/banner-aurora-night/scene.json +327 -0
- package/templates/banner-aurora-night/template.json +24 -0
- package/templates/banner-data-bars/README.md +15 -0
- package/templates/banner-data-bars/agent3d.json +8 -0
- package/templates/banner-data-bars/preview.png +0 -0
- package/templates/banner-data-bars/scene.json +222 -0
- package/templates/banner-data-bars/template.json +25 -0
- package/templates/banner-floating-shapes/README.md +15 -0
- package/templates/banner-floating-shapes/agent3d.json +8 -0
- package/templates/banner-floating-shapes/preview.png +0 -0
- package/templates/banner-floating-shapes/scene.json +703 -0
- package/templates/banner-floating-shapes/template.json +24 -0
- package/templates/banner-gradient-blob/README.md +16 -0
- package/templates/banner-gradient-blob/agent3d.json +8 -0
- package/templates/banner-gradient-blob/preview.png +0 -0
- package/templates/banner-gradient-blob/scene.json +330 -0
- package/templates/banner-gradient-blob/template.json +21 -0
- package/templates/banner-liquid-chrome/README.md +16 -0
- package/templates/banner-liquid-chrome/agent3d.json +8 -0
- package/templates/banner-liquid-chrome/preview.png +0 -0
- package/templates/banner-liquid-chrome/scene.json +290 -0
- package/templates/banner-liquid-chrome/template.json +24 -0
- package/templates/banner-logo-extrude/README.md +24 -0
- package/templates/banner-logo-extrude/agent3d.json +8 -0
- package/templates/banner-logo-extrude/assets/logo.svg +6 -0
- package/templates/banner-logo-extrude/assets/manifest.json +13 -0
- package/templates/banner-logo-extrude/preview.png +0 -0
- package/templates/banner-logo-extrude/scene.json +332 -0
- package/templates/banner-logo-extrude/template.json +22 -0
- package/templates/banner-neon-title/README.md +18 -0
- package/templates/banner-neon-title/agent3d.json +8 -0
- package/templates/banner-neon-title/preview.png +0 -0
- package/templates/banner-neon-title/scene.json +494 -0
- package/templates/banner-neon-title/template.json +25 -0
- package/templates/banner-wave-grid/README.md +18 -0
- package/templates/banner-wave-grid/agent3d.json +8 -0
- package/templates/banner-wave-grid/preview.png +0 -0
- package/templates/banner-wave-grid/scene.json +217 -0
- package/templates/banner-wave-grid/template.json +23 -0
- package/templates/card-hover-3d/README.md +16 -0
- package/templates/card-hover-3d/agent3d.json +8 -0
- package/templates/card-hover-3d/preview.png +0 -0
- package/templates/card-hover-3d/scene.json +359 -0
- package/templates/card-hover-3d/template.json +21 -0
- package/templates/card-product-tilt/README.md +14 -0
- package/templates/card-product-tilt/agent3d.json +8 -0
- package/templates/card-product-tilt/preview.png +0 -0
- package/templates/card-product-tilt/scene.json +296 -0
- package/templates/card-product-tilt/template.json +23 -0
- package/templates/character-mascot-hero/README.md +19 -0
- package/templates/character-mascot-hero/agent3d.json +8 -0
- package/templates/character-mascot-hero/preview.png +0 -0
- package/templates/character-mascot-hero/scene.json +512 -0
- package/templates/character-mascot-hero/template.json +8 -0
- package/templates/character-showcase/README.md +27 -0
- package/templates/character-showcase/agent3d.json +8 -0
- package/templates/character-showcase/preview.png +0 -0
- package/templates/character-showcase/scene.json +440 -0
- package/templates/character-showcase/template.json +24 -0
- package/templates/diorama-city/README.md +21 -0
- package/templates/diorama-city/agent3d.json +8 -0
- package/templates/diorama-city/preview.png +0 -0
- package/templates/diorama-city/scene.json +432 -0
- package/templates/diorama-city/template.json +21 -0
- package/templates/game-basket/README.md +25 -0
- package/templates/game-basket/agent3d.json +8 -0
- package/templates/game-basket/preview.png +0 -0
- package/templates/game-basket/scene.json +640 -0
- package/templates/game-basket/scripts/basket.js +176 -0
- package/templates/game-basket/template.json +8 -0
- package/templates/game-coin-collector/README.md +28 -0
- package/templates/game-coin-collector/agent3d.json +8 -0
- package/templates/game-coin-collector/preview.png +0 -0
- package/templates/game-coin-collector/scene.json +900 -0
- package/templates/game-coin-collector/scripts/collector.js +210 -0
- package/templates/game-coin-collector/template.json +19 -0
- package/templates/game-maze/README.md +24 -0
- package/templates/game-maze/agent3d.json +8 -0
- package/templates/game-maze/preview.png +0 -0
- package/templates/game-maze/scene.json +315 -0
- package/templates/game-maze/scripts/maze.js +168 -0
- package/templates/game-maze/template.json +18 -0
- package/templates/game-physics-playground/README.md +30 -0
- package/templates/game-physics-playground/agent3d.json +8 -0
- package/templates/game-physics-playground/preview.png +0 -0
- package/templates/game-physics-playground/scene.json +1712 -0
- package/templates/game-physics-playground/scripts/playground.js +151 -0
- package/templates/game-physics-playground/template.json +19 -0
- package/templates/game-platformer/README.md +26 -0
- package/templates/game-platformer/agent3d.json +8 -0
- package/templates/game-platformer/preview.png +0 -0
- package/templates/game-platformer/scene.json +1063 -0
- package/templates/game-platformer/scripts/platformer.js +222 -0
- package/templates/game-platformer/template.json +8 -0
- package/templates/game-runner/README.md +30 -0
- package/templates/game-runner/agent3d.json +8 -0
- package/templates/game-runner/preview.png +0 -0
- package/templates/game-runner/scene.json +1317 -0
- package/templates/game-runner/scripts/runner.js +263 -0
- package/templates/game-runner/template.json +18 -0
- package/templates/game-tap-targets/README.md +21 -0
- package/templates/game-tap-targets/agent3d.json +8 -0
- package/templates/game-tap-targets/preview.png +0 -0
- package/templates/game-tap-targets/scene.json +924 -0
- package/templates/game-tap-targets/scripts/targets.js +159 -0
- package/templates/game-tap-targets/template.json +19 -0
- package/templates/hero-floating-island/README.md +18 -0
- package/templates/hero-floating-island/agent3d.json +8 -0
- package/templates/hero-floating-island/preview.png +0 -0
- package/templates/hero-floating-island/scene.json +658 -0
- package/templates/hero-floating-island/template.json +8 -0
- package/templates/hero-perfume-luxury/README.md +18 -0
- package/templates/hero-perfume-luxury/agent3d.json +8 -0
- package/templates/hero-perfume-luxury/preview.png +0 -0
- package/templates/hero-perfume-luxury/scene.json +529 -0
- package/templates/hero-perfume-luxury/template.json +27 -0
- package/templates/hero-product-turntable/README.md +16 -0
- package/templates/hero-product-turntable/agent3d.json +8 -0
- package/templates/hero-product-turntable/preview.png +0 -0
- package/templates/hero-product-turntable/scene.json +225 -0
- package/templates/hero-product-turntable/template.json +21 -0
- package/templates/hero-saas-globe/README.md +16 -0
- package/templates/hero-saas-globe/agent3d.json +8 -0
- package/templates/hero-saas-globe/preview.png +0 -0
- package/templates/hero-saas-globe/scene.json +318 -0
- package/templates/hero-saas-globe/template.json +24 -0
- package/templates/hero-scroll-story/README.md +26 -0
- package/templates/hero-scroll-story/agent3d.json +8 -0
- package/templates/hero-scroll-story/preview.png +0 -0
- package/templates/hero-scroll-story/scene.json +642 -0
- package/templates/hero-scroll-story/template.json +22 -0
- package/templates/hero-sneaker-showcase/README.md +19 -0
- package/templates/hero-sneaker-showcase/agent3d.json +8 -0
- package/templates/hero-sneaker-showcase/preview.png +0 -0
- package/templates/hero-sneaker-showcase/scene.json +523 -0
- package/templates/hero-sneaker-showcase/template.json +23 -0
- package/templates/hero-space-planet/README.md +17 -0
- package/templates/hero-space-planet/agent3d.json +8 -0
- package/templates/hero-space-planet/preview.png +0 -0
- package/templates/hero-space-planet/scene.json +330 -0
- package/templates/hero-space-planet/template.json +21 -0
- package/templates/landscape-island/README.md +21 -0
- package/templates/landscape-island/agent3d.json +8 -0
- package/templates/landscape-island/preview.png +0 -0
- package/templates/landscape-island/scene.json +716 -0
- package/templates/landscape-island/template.json +24 -0
- package/templates/landscape-night-galaxy/README.md +25 -0
- package/templates/landscape-night-galaxy/agent3d.json +8 -0
- package/templates/landscape-night-galaxy/preview.png +0 -0
- package/templates/landscape-night-galaxy/scene.json +403 -0
- package/templates/landscape-night-galaxy/template.json +8 -0
- package/templates/landscape-valley-sunset/README.md +20 -0
- package/templates/landscape-valley-sunset/agent3d.json +8 -0
- package/templates/landscape-valley-sunset/preview.png +0 -0
- package/templates/landscape-valley-sunset/scene.json +265 -0
- package/templates/landscape-valley-sunset/template.json +22 -0
- package/templates/scene-cozy-room/README.md +21 -0
- package/templates/scene-cozy-room/agent3d.json +8 -0
- package/templates/scene-cozy-room/preview.png +0 -0
- package/templates/scene-cozy-room/scene.json +728 -0
- package/templates/scene-cozy-room/template.json +8 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Art direction for 3D web elements
|
|
2
|
+
|
|
3
|
+
Numbers that work with the Agent3D runtime (ACES tone mapping by default, physically based lights, units ≈ metres). Start from them, render, look, adjust. Exact parameters live in the catalog — never guess them:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx -y @fleox/agent3d@0.2.1 catalog lightRigs --json
|
|
7
|
+
npx -y @fleox/agent3d@0.2.1 catalog postfx look --json
|
|
8
|
+
npx -y @fleox/agent3d@0.2.1 catalog materialPresets --json
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Complete, rendered scenes for each idea below: [recipes.md](recipes.md).
|
|
12
|
+
|
|
13
|
+
## Premium defaults
|
|
14
|
+
|
|
15
|
+
Start every scene from the row of its target kind, render, then deviate on purpose. "Look" = `postfx: [{ "type": "look", "preset": … }]`; "Rig" = `environment.rig`.
|
|
16
|
+
|
|
17
|
+
| Kind | Environment | Rig | Look / postfx | Quality tier | Recipe |
|
|
18
|
+
|---|---|---|---|---|---|
|
|
19
|
+
| banner (4:1) | `meshGradient` or 2–3 tone `gradient` / `radial` background, `lighting: "studio"` at 0.6–0.9 | `studio-3point` (or two hand-placed directionals) | `clean`; no bloom on light backgrounds | `auto` | gradient |
|
|
20
|
+
| hero (16:9) | `radial` background focused where the subject is, `lighting: "studio"` 0.4–0.8 | `studio-3point`, `dramatic` (moody), `neon` (night) | `cinematic` at 0.6–0.8, or `neon` at 0.7 | `auto` | reveal, scroll, neon |
|
|
21
|
+
| product / card / square | light `radial` background in the product's tones, `lighting: "studio"` (zero bytes) or `{ "hdri": "library:hdri/softbox.hdr" }` (richer, +1.5 MB) | `softbox` (soft, any material), `product-top` (glossy, metal) | `product` | `auto` | product |
|
|
22
|
+
| landscape (21:9) | physical sky `{ "sky": { "preset": "golden-hour" \| "afternoon" \| … } }` + height fog; the sky adds the sun light | none (the sky's sun) or `golden-hour` / `noon` / `overcast` with a gradient sky | bloom + warm `grading` + vignette, or `cinematic` at 0.6–0.8 on light scenes (its AO pre-pass re-draws all the geometry) | `auto` | landscape |
|
|
23
|
+
| character | soft `radial` background, `lighting: "soft"` | `studio-3point` with a warm `color` tint | `clean` (or none) | `auto` | character |
|
|
24
|
+
| game | plain gradient / colour, `lighting: "studio"` or `"soft"` | `studio-3point` | none, or cheap only: `bloom`, `grading`, `vignette`, `fxaa` | `medium` | game |
|
|
25
|
+
|
|
26
|
+
Always: `contactShadows` under objects that stand on something (products, characters, props) — it needs no shadow-casting light; `ariaLabel`; a `posterTime` where the composition is complete.
|
|
27
|
+
|
|
28
|
+
`contactShadows.far` is how high above the plane objects still cast (scene units; default ≈ 0.9 × the height of what stands on the plane). Objects floating higher than 0.6 × `far` leave no smudge, so a title hovering over a product does not darken the floor; raise `far` for a taller, softer shadow under a tall object, lower it for a tight contact line. `y` pins the plane when particles or a low prop would otherwise pull it down.
|
|
29
|
+
|
|
30
|
+
**Mobile and games — avoid**:
|
|
31
|
+
|
|
32
|
+
- `ao` and `dof` (high GPU cost), `godrays` and `lensflare` (medium) re-render or sample the scene every frame (one `bloom` is acceptable); `taa` only supersamples stills and paused frames. `check` reports the cost in `budget.gpu` (`level` none / light / moderate / heavy, `dropped.low` = effects the `low` tier turns off) and flags it (`postfx-cost`: info above ~15 fullscreen passes, a warning for `ao` / `dof` on a game target). The `cinematic` and `product` looks include `ao` + `taa`: fine on a hero still, not in a game.
|
|
33
|
+
- Volumetric spots, several shadow-casting lights, transmission (`glass`, `diamond`, `jelly`, `soapBubble` on large surfaces) and 2k+ textures.
|
|
34
|
+
- Heavy HDRIs on small embeds: the bundled `.hdr` files weigh 0.4–1.9 MB each; `lighting: "studio" | "soft" | "sunset" | "night"` are free.
|
|
35
|
+
- Set `target.quality: "medium"` (DPR 1.5, heavy effects at half resolution) for games and busy fullscreen scenes; `auto` already drops to `medium` on phones and lowers the pixel ratio when the frame rate stays under 40 fps.
|
|
36
|
+
|
|
37
|
+
## Framing per target
|
|
38
|
+
|
|
39
|
+
The visible width at the subject's depth is `2 × distance × tan(fov / 2) × aspect`.
|
|
40
|
+
|
|
41
|
+
| Target | Aspect | Camera | Visible area at z = 0 | Layout |
|
|
42
|
+
|---|---|---|---|---|
|
|
43
|
+
| banner | 4:1 | fov 30, position [0, 0, 12] | ≈ 25.8 × 6.4 | Title centred (≤ 11 units wide), props at abs(x) 7.5–9, nothing in the top / bottom 10% |
|
|
44
|
+
| hero | 16:9 | fov 35, position [0, 0, 9–10] | ≈ 10.1 × 5.7 | Subject at x ≈ ±2.5 when HTML text sits on the other half; a centred headline ≤ 8 units wide |
|
|
45
|
+
| hero (wide) | 21:9 | fov 38–40, high and far, looking slightly down | | Landscapes, panoramas: keep ~35 % sky |
|
|
46
|
+
| card | 1:1 or 4:5 | fov 30–32, position [0, 1.5, 5.4], target [0, 1, 0] | ≈ 3.2 × 3.2 | A character or product, centred, contact shadow |
|
|
47
|
+
| square | 1:1 | fov 28–30, position [0, 1.2–1.4, 6.3] | | Product turntable (orbit + autoRotate) |
|
|
48
|
+
| game | 16:9 (desktop-first) or 9:16 / 3:4 (mobile-first) | fov 42–55 at 16:9, 65–75 in portrait, behind and above the action | | Keep the HUD corners and the bottom button row free of important action |
|
|
49
|
+
|
|
50
|
+
- The default banner title (`sans-bold`, size 1, "Golden Crust Bakery") is about 10.7 units wide: shorten the text, lower `size`, use `maxWidth` to wrap, or move props further out.
|
|
51
|
+
- `inspect.objects[].inView` = `partial` on a prop means it is cut by the frame. Particles and scattered generators (trees, rocks, grass, flowers, clouds) spanning the frame are expected to be `partial`: `check --render` never reports them as `clipped`, and it ignores objects created by scripts at run time.
|
|
52
|
+
- Camera shots (`pushIn`, `crane`, `orbit`…) and timelines move the camera: render the frames where it is closest and check nothing is cut (a `pushIn` of 2+ units on a bust cuts the head).
|
|
53
|
+
- Phones: the embed keeps `target.aspect` at any width (it is `width: 100%` with an `aspect-ratio`), so a 4:1 banner is ~98 px tall and a 16:9 game 390 × 219 on a 390 px phone. Render the real embed size to judge it: `render --size 390x98` (banner), `--size 390x219` (16:9 game). Keep text big (title size ≥ 0.9 in a banner).
|
|
54
|
+
- A taller box happens only when `target.height` is set (e.g. `"70vh"`) or the page's CSS gives the element a height / `aspect-ratio`. The camera then keeps the authored horizontal framing by widening the vertical view (up to 3×, never above ~100°): `render --size 390x700` previews that case, not the default embed.
|
|
55
|
+
- Mobile-first games and portrait cards: design for a portrait `target.aspect` (`"9:16"`, `"3:4"`) instead — a portrait frame at the same fov shows far less width, so raise the fov (65–75) or pull the camera back until every lane / target is in frame, and render at `--width 390`. Or ship a second export with the other aspect for phones.
|
|
56
|
+
|
|
57
|
+
## Lighting
|
|
58
|
+
|
|
59
|
+
Prefer a **rig** (`environment.rig`, `catalog lightRigs`): tuned lights placed for a subject 1–3 units around the origin, with `intensity`, `rotation` (moves the highlight), `scale` (bigger scenes) and `color` (tint). Add lights to `lights[]` only for accents; give them ids so paths like `lights#key.intensity` can tune them.
|
|
60
|
+
|
|
61
|
+
Hand-placed studio set (when no rig fits):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
[
|
|
65
|
+
{ "id": "fill", "type": "hemisphere", "skyColor": "#ffffff", "groundColor": "#8a8f99", "intensity": 0.9 },
|
|
66
|
+
{ "id": "key", "type": "directional", "position": [3, 6, 4], "intensity": 2.2, "castShadow": true },
|
|
67
|
+
{ "id": "rim", "type": "spot", "position": [-3, 4, -3], "target": [0, 1, 0], "intensity": 40, "angle": 35, "penumbra": 0.6 }
|
|
68
|
+
]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- **Physical sky**: `preset` sets the sun; `sun.elevation` 3–12 for golden hour, 40+ for noon. `sun.azimuth` is degrees around Y from +Z: with the usual camera on +Z looking at the origin, 0 = the sun behind the camera (front-lit scene), 90 = from the right (+X), 180 = straight ahead in the frame (back light), 270 = from the left. The frame covers about 180 ± half the horizontal fov (± 45 for a 21:9 at fov 40): keep a low sun just outside it (azimuth 50–130 or 230–310) or high above it; a low sun in view with fog or bloom washes the image out. The sky adds its own sun light — no extra directional needed. Every preset is tuned to look rich at the default `exposure` (1, a multiplier of the preset's own value): leave it, or nudge it (0.7 deeper, 1.3 brighter) instead of fighting a washed-out sky with grading.
|
|
72
|
+
- **Fog**: linear `{ color, near, far }` to fade the far floor / horizon only (start it beyond the subject); exponential `{ density }` for haze (0.02–0.05 reads; it also dims near objects); height fog `{ density, height, falloff }` for valleys and ground mist. Without `color`, fog takes the sky's horizon.
|
|
73
|
+
- **Landscapes**: one `terrain` + scatterers + water at the **same `position`** (scatterers with `onTerrain` sit on it; move the camera, not the terrain). `shape: "basin"` = a lake ringed by mountains (`waterLevel` ≈ 0.1 × `height`), `"valley"` = a flat floor along z closed by a range at the far end (a camera on +z looks down it); `edgeFalloff` sinks the borders so no cut wall shows; `snowHeight` sets an absolute snow altitude (trees stay below it). For a better lake: `waterPlane: false` on the terrain + a `water` object at `y = waterLevel` (`"reflections": true` for a mirror lake — it renders the scene twice). Birds: the `birds` generator (`drift` + `formation: "v"` for geese crossing the sky), never particles. Recipe: golden-hour landscape.
|
|
74
|
+
- **Roads** (`road` generator, runners): `color`, `lineColor`, `curbColors` (two alternate, one = solid), `vergeColor` (two stripes, or one colour + a darker stripe), `verge: false` for the road alone (neon runners on black).
|
|
75
|
+
- **Rect lights** (`type: "rect"`, `width`, `height`, `panel: true`): visible light strips and softboxes. They face their `target` (default: the origin) — set a target at their own height to keep vertical strips upright.
|
|
76
|
+
- **Volumetric spots** (`volumetric: { intensity }`): a glowing cone from the light to its target; reads best on a dark background with a little fog.
|
|
77
|
+
- **Night neon**: very dark background, `lighting: "night"` at ~0.4, saturated magenta / cyan rect strips, `neon` material, a glossy dark `ground`, the `neon` look at 0.7.
|
|
78
|
+
|
|
79
|
+
Too bright? Lower `environment.lightingIntensity` first (IBL adds up with every light), then rig `intensity`. Too flat? A rig with a rim (`studio-3point`, `rim`, `dramatic`) or `rig.rotation` for a side key.
|
|
80
|
+
|
|
81
|
+
## Palettes
|
|
82
|
+
|
|
83
|
+
- Build the background from 2–3 tones of the brand colour (gradient from dark to mid, `angle` 0 = bottom → top; or `meshGradient` with 4–5 colours) and make the subject lighter or more saturated. Radial backgrounds (`{ "radial": [centre, edge], "center": [x, y] }`) focus the eye on the subject.
|
|
84
|
+
- One accent colour for the smallest elements (sparks, a ring, particles, one word of a headline).
|
|
85
|
+
- Bakery / food: `#2a1306 #5c2c0c #a8561b` + cream `#fff4e0` + dough `#d9944a`; pastel shop `#ffe9ef #fff6ea` + plum text `#5a2a3c`.
|
|
86
|
+
- Tech / SaaS: `#0b0a24 #2a2470` + white + gold accent `#ffb02e`, or iridescent + `#ff4fd8` `#3ee8ff`.
|
|
87
|
+
- Nature: physical sky + greens `#6f8f3c #46703a`, rock `#7a6a6e`, snow `#fdf7f2`.
|
|
88
|
+
- Pastel: `#ff9a8b #ff6a88 #a18cd1 #fbc2eb #8fd3f4` + plum outline `#4a1a6e`.
|
|
89
|
+
- Gold, chrome and glass need an environment to reflect (`lighting` set) and a background that is not the same colour.
|
|
90
|
+
|
|
91
|
+
## Materials
|
|
92
|
+
|
|
93
|
+
- `preset` first, then a few overrides (`color`, `roughness`): 38 presets from `plastic` / `clay` / `chrome` to the photoreal set (`carPaint`, `ceramic`, `marble`, `terrazzo`, `wood`, `brushedAluminium`, `diamond`, `jelly`, `chromeGradient`, `soapBubble`, `mattePastel`…) — `catalog materialPresets`.
|
|
94
|
+
- Physical params (`clearcoat`, `sheen`, `iridescence`, `transmission`, `anisotropy`…) with `"type": "physical"`; textures are paths, library ids or **procedural textures** `{ "procedural": "wood" | "marble" | … }` (zero bytes, `catalog textures`); `triplanar` for generators and stretched shapes.
|
|
95
|
+
- Clay / matte / `mattePastel` read well small and stay calm (`mattePastel` lightens its colour a lot: give it saturated colours). Chrome, gold and `chromeGradient` look premium but need reflections and contrast.
|
|
96
|
+
- `toon` (preset or `"type": "toon"`) is lit like every other surface (environment fill, area lights, shadows) with the direct light quantised into bands: the lit band shows the `color` as written, so give it the brand colour itself (no need to brighten it to compensate).
|
|
97
|
+
- Glass (`glass`, `frostedGlass`, `ice`, `water`, `gem`, `diamond`, `jelly`) refracts what is behind it, on dark and light backgrounds alike (bright lights behind a pane no longer flare into a white glare): give it something to bend (props, a gradient, text behind), and set `thickness` to the object's real depth — 0.05–0.2 for panes and bubbles, about the object's size for solid pieces (more = stronger distortion). Tint with `attenuationColor` + `attenuationDistance`. Each transmissive object renders the scene again behind it: count it in the triangles per frame.
|
|
98
|
+
- White or near-white surfaces under a softbox blow out: use a tone of the background instead.
|
|
99
|
+
- Shaders animate a surface for free (`catalog shaders`: plasma, gradientFlow, aurora, liquidChrome, iridescentFoil, lavaLamp, grainGradient…); dissolve-style shaders animate `material.uniforms.progress` with a timeline track.
|
|
100
|
+
|
|
101
|
+
## Post-processing
|
|
102
|
+
|
|
103
|
+
- Start from a **look** (`cinematic`, `product`, `dreamy`, `neon`, `retro`, `clean`) with `intensity` 0.6–1; an effect listed next to it overrides the look's matching entry (`{ "type": "vignette", "darkness": 0.5 }`). Expansions: `catalog postfx look`.
|
|
104
|
+
- Bloom only glows what is brighter than its `threshold`: emissive text around 2–2.6 under the `neon` look; above ~3 the whole frame turns into fog. White text on a light background glows too — drop bloom there.
|
|
105
|
+
- `dof` with `focusOn: "<id>"`, `godrays` (from the sky sun or a light), `lensflare`, `tiltshift`, `halftone`, `ascii`, `glitch` are effects for a still hero, not for small or busy embeds.
|
|
106
|
+
|
|
107
|
+
## Typography
|
|
108
|
+
|
|
109
|
+
- Fonts: `catalog fonts` (13, all kerned). Headlines: `inter-black`, `montserrat-extrabold`, `bebas-neue` / `anton` (condensed, fits more), `serif-bold` (elegant). Small text: `sans` with `depth: 0` and a `basic` material (always readable).
|
|
110
|
+
- `outline` (`{ "width": 0.05, "color": … }`) makes light text read on light or busy backgrounds; `maxWidth` wraps long titles.
|
|
111
|
+
- `reveal` (rise / fade / scale / spin / drop, `stagger` 0.04–0.06) for entrances; letters become `<id>/<n>` targets for timeline tracks (`children:<id>` = all letters, or a comma list with `stagger`).
|
|
112
|
+
- Layout: a text block is centred vertically on its `position` (from the first line's cap height to the last line's baseline) and placed horizontally by `align`: `center` (default) centres every line on x, `left` starts the lines at x (they grow to the right), `right` ends them at x. Extra lines (`\n`, `maxWidth` wrapping, a longer `{data.*}` value) grow the block up **and** down around `position`, so a title that gains a line moves its first line up: leave room above and below, or anchor captions with `align: "left"` at a corner.
|
|
113
|
+
- Cost: `reveal` / `splitLetters` make one mesh per letter, and an `outline` adds a second mesh per letter: a 20-letter outlined reveal is ~40 draw calls before shadows. Keep outlines for unsplit titles or short words; `depth: 0` text with a `basic` material is the cheapest.
|
|
114
|
+
- `bevel` is a number (the bevel size in scene units, default `min(depth × 0.3, size × 0.035)`), not a boolean; `0` gives sharp edges.
|
|
115
|
+
|
|
116
|
+
## Motion
|
|
117
|
+
|
|
118
|
+
- Behaviours are cheap procedural motion: `float`, `rotate`, `sway`, `bob`, `breathe`, `noise`; interaction: `followPointer`, `spring`, `tilt`, `hoverScale`, `hoverLift`, `magnet`; scroll: `scrollRotate`, `scrollMove`, `parallax`; entrance: `appear` — `catalog behaviours`.
|
|
119
|
+
- Desync repeated objects with `phase` so they don't move in unison.
|
|
120
|
+
- Timelines: per-key eases (`outBack`, `cubicBezier(…)`, `spring(170, 12)`), relative values (`"+=0.3"`), multi-target selectors with `stagger`, `markers` / `segments`. Loops: same value at 0 and `duration`, `inOutSine`.
|
|
121
|
+
- Camera: `camera.shots` (`pushIn`, `orbit`, `crane`, `path`, `focus`…) for cinematic moves; `shake` (tiny amounts) for handheld life; `controls: "parallax"` for pointer depth.
|
|
122
|
+
- Scroll stories: `timeline.trigger: "scroll"` + `timeline.scroll` maps the timeline (and the shots) to the page scroll.
|
|
123
|
+
- No-code interactivity: `scene.interactions` (`hover` / `hoverEnd` / `click` → `set` tweens, `play` / `toggle` segments, `openUrl`, `emit`).
|
|
124
|
+
- Banners must not distract from the page: no flashing, no fast spins, loops ≥ 6 s, `blink` and `flicker` only on small elements or subtle. Respect reduced motion (`target.reducedMotion: "static"`, default) and pick a `posterTime` where the composition is complete (after entrances and reveals).
|
|
125
|
+
|
|
126
|
+
## Performance budgets
|
|
127
|
+
|
|
128
|
+
`check` warns above these limits (`target.budgetKb` overrides the KB one); the "aim for" column is what keeps a page fast on a mid-range phone — `check` says so above it (a warning with `--render`). Triangles and draw calls are counted **per frame, all passes included**: every shadow-casting light re-draws its casters, `ao` / `dof` add a pre-pass of the scene, contact shadows re-draw what stands on the plane, transmission (glass) and mirror water re-render the scene. A 50 k-triangle scene with one shadow light and the `cinematic` look is ~150 k per frame.
|
|
129
|
+
|
|
130
|
+
| Target | KB budget (assets + scripts + scene, runtime excluded) | Triangle limit in `check` | Aim for |
|
|
131
|
+
|---|---|---|---|
|
|
132
|
+
| banner | 600 | 500 k | ≤ 150 k triangles per frame |
|
|
133
|
+
| card | 400 | 400 k | ≤ 150 k |
|
|
134
|
+
| square / inline | 600 | 500 k | ≤ 250 k |
|
|
135
|
+
| hero | 1500 | 1 M | ≤ 400 k |
|
|
136
|
+
| fullscreen | 4000 | 2 M | ≤ 600 k |
|
|
137
|
+
| game | 4000 | 2 M | ≤ 300 k per frame, draw calls < 150 per frame (`check` warns above 150 and names the causes) |
|
|
138
|
+
|
|
139
|
+
Why these numbers: a mid-range phone GPU (Adreno 6xx / Mali-G57 class) sustains roughly 1–1.5 M lit triangles per frame at 60 fps in WebGL. An embed takes a fraction of that so the page (and any other scene on it) stays smooth: a strip banner or a card ~10 %, the one hero of a page ~⅓, a fullscreen piece ~½, a game less than a hero (it must hold 60 fps while scripts and physics use the CPU). They are per-frame totals: geometry × passes. A hero with one shadow light and the `cinematic` look draws its geometry ~3× (main + shadow map + AO pre-pass), so ~130 k triangles of geometry is the hero aim. To get under an aim without changing the look, in this order: `castShadow: false` on what casts no visible shadow (water, distant scatter, tiny props, objects far from the ground); drop the AO pre-pass where it adds little (wide landscapes seen from afar, flat UI-like banners): replace the `look` with the effects it expands to minus `ao` (`agent3d catalog postfx look` lists each preset's stack); lower generator detail that is invisible at the framing (terrain `resolution`, scatter `count` beyond the fog, `segments`); split / outlined text costs a mesh (and its triangles) per letter, twice with an outline.
|
|
140
|
+
|
|
141
|
+
- The shared runtime (`agent3d-runtime/`, loaded lazily in chunks: only what the scene uses is fetched) is not counted: it is downloaded once per site and cached.
|
|
142
|
+
- `check` estimates triangles from catalog cost formulas, measured glyph costs (a bevelled serif headline costs far more than a flat sans one) and model counts, then per frame (`budget.estimatedFrameTriangles`, `budget.passes`: each shadow-casting light, `ao` / `dof` / `godrays` / `outline` and `contactShadows` re-draw the scene or its casters); `check --render` and `render` report the real counts (`stats.triangles`, `stats.drawCalls`), which include every pass. The GPU side is `budget.gpu` (post-processing passes per frame).
|
|
143
|
+
- Cheap: primitives, `instances`, generators, particles, procedural textures, small library models, `flat` / `basic` materials. Expensive: HDRI files, photoreal library models (0.4–1.8 MB, `assets optimize` helps), high `segments`, transmission, `ao` / `dof`, many shadow casters.
|
|
144
|
+
- `target.maxDpr` (default 2) caps the pixel ratio; `target.quality` picks the tier (see Premium defaults).
|