@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,168 @@
|
|
|
1
|
+
// Marble maze — roll the ball from the start (west) to the glowing exit (east).
|
|
2
|
+
// Controls: arrows / WASD; touch / mouse: hold a finger, the ball rolls toward
|
|
3
|
+
// it (relative to the screen centre). The clock starts on the first move.
|
|
4
|
+
// No input → attract mode: the ball solves the maze by itself (BFS path).
|
|
5
|
+
|
|
6
|
+
export default function (api) {
|
|
7
|
+
const cfg = Object.assign({ accel: 16, maxSpeed: 6, damping: 2.2 }, api.data.maze || {});
|
|
8
|
+
const ball = api.get("ball");
|
|
9
|
+
const mazeObj = api.get("maze");
|
|
10
|
+
const goal = api.get("goal");
|
|
11
|
+
const info = mazeObj && mazeObj.userData.maze;
|
|
12
|
+
const N = 1, E = 2, S = 4, W = 8;
|
|
13
|
+
let phase = "attract"; // attract | play | won
|
|
14
|
+
let elapsed = 0;
|
|
15
|
+
let wonAt = 0;
|
|
16
|
+
let path = [];
|
|
17
|
+
let pathIndex = 0;
|
|
18
|
+
let best = api.storage.get("bestTime");
|
|
19
|
+
best = typeof best === "number" ? best : null;
|
|
20
|
+
const start = info ? info.start : [0, 0, 0];
|
|
21
|
+
const exit = info ? info.exit : [0, 0, 0];
|
|
22
|
+
|
|
23
|
+
// Cell index from a world position (the maze object sits at the origin).
|
|
24
|
+
function cellOf(x, z) {
|
|
25
|
+
const cs = info.cellSize;
|
|
26
|
+
const i = Math.floor((x + (info.columns * cs) / 2) / cs);
|
|
27
|
+
const j = Math.floor((z + (info.rows * cs) / 2) / cs);
|
|
28
|
+
return [Math.max(0, Math.min(info.columns - 1, i)), Math.max(0, Math.min(info.rows - 1, j))];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function solve(fromX, fromZ) {
|
|
32
|
+
const cols = info.columns, rows = info.rows;
|
|
33
|
+
const [si, sj] = cellOf(fromX, fromZ);
|
|
34
|
+
const target = cols * rows - 1;
|
|
35
|
+
const prev = new Array(cols * rows).fill(-2);
|
|
36
|
+
const queue = [sj * cols + si];
|
|
37
|
+
prev[queue[0]] = -1;
|
|
38
|
+
while (queue.length) {
|
|
39
|
+
const c = queue.shift();
|
|
40
|
+
if (c === target) break;
|
|
41
|
+
const i = c % cols, j = Math.floor(c / cols), w = info.walls[c];
|
|
42
|
+
const next = [];
|
|
43
|
+
if (!(w & N) && j > 0) next.push(c - cols);
|
|
44
|
+
if (!(w & S) && j < rows - 1) next.push(c + cols);
|
|
45
|
+
if (!(w & E) && i < cols - 1) next.push(c + 1);
|
|
46
|
+
if (!(w & W) && i > 0) next.push(c - 1);
|
|
47
|
+
for (const n of next) if (prev[n] === -2) { prev[n] = c; queue.push(n); }
|
|
48
|
+
}
|
|
49
|
+
const out = [];
|
|
50
|
+
for (let c = target; c >= 0; c = prev[c]) out.unshift(c);
|
|
51
|
+
return out.map((c) => {
|
|
52
|
+
const i = c % cols, j = Math.floor(c / cols);
|
|
53
|
+
const cs = info.cellSize;
|
|
54
|
+
return [-(cols * cs) / 2 + (i + 0.5) * cs, -(rows * cs) / 2 + (j + 0.5) * cs];
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function reset(next) {
|
|
59
|
+
phase = next;
|
|
60
|
+
elapsed = 0;
|
|
61
|
+
if (ball) {
|
|
62
|
+
ball.position.set(start[0], 0.5, start[2]);
|
|
63
|
+
ball.velocity.set(0, 0, 0);
|
|
64
|
+
}
|
|
65
|
+
path = info ? solve(start[0], start[2]) : [];
|
|
66
|
+
pathIndex = 0;
|
|
67
|
+
publish();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function publish() {
|
|
71
|
+
api.state.phase = phase;
|
|
72
|
+
api.state.time = elapsed.toFixed(1);
|
|
73
|
+
api.state.best = best === null ? "—" : best.toFixed(1) + " s";
|
|
74
|
+
api.state.demo = phase === "attract";
|
|
75
|
+
api.state.progress = path.length ? Math.round((100 * pathIndex) / Math.max(1, path.length - 1)) : 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
let heldSince = -1;
|
|
79
|
+
function input() {
|
|
80
|
+
const i = api.input;
|
|
81
|
+
let x = 0, z = 0;
|
|
82
|
+
if (i.isDown("ArrowLeft") || i.isDown("KeyA")) x -= 1;
|
|
83
|
+
if (i.isDown("ArrowRight") || i.isDown("KeyD")) x += 1;
|
|
84
|
+
if (i.isDown("ArrowUp") || i.isDown("KeyW")) z -= 1;
|
|
85
|
+
if (i.isDown("ArrowDown") || i.isDown("KeyS")) z += 1;
|
|
86
|
+
const p = i.pointer;
|
|
87
|
+
if (p.justPressed) heldSince = api.time();
|
|
88
|
+
if (!p.down) heldSince = -1;
|
|
89
|
+
if (p.down && heldSince >= 0) {
|
|
90
|
+
x += Math.max(-1, Math.min(1, p.x * 2.5));
|
|
91
|
+
z += Math.max(-1, Math.min(1, -p.y * 2.5));
|
|
92
|
+
}
|
|
93
|
+
return { x, z, any: x !== 0 || z !== 0 || i.pressed("Space") || i.pressed("Enter") };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
start() {
|
|
98
|
+
reset("attract");
|
|
99
|
+
},
|
|
100
|
+
onEvent(name) {
|
|
101
|
+
if (name === "retry") {
|
|
102
|
+
reset("play");
|
|
103
|
+
api.audio.play("click");
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
update(dt) {
|
|
107
|
+
if (!ball || !info) return;
|
|
108
|
+
if (goal) goal.rotation.set(0, api.time() * 90, 0);
|
|
109
|
+
const inp = input();
|
|
110
|
+
if (phase === "attract" && inp.any) {
|
|
111
|
+
reset("play");
|
|
112
|
+
api.audio.play("click");
|
|
113
|
+
}
|
|
114
|
+
if (phase === "won") {
|
|
115
|
+
ball.velocity.set(ball.velocity.x * 0.9, ball.velocity.y, ball.velocity.z * 0.9);
|
|
116
|
+
if (inp.any && api.time() - wonAt > 1) reset("play");
|
|
117
|
+
else if (api.time() - wonAt > 6) reset("attract");
|
|
118
|
+
publish();
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
let ax = inp.x, az = inp.z;
|
|
123
|
+
if (phase === "attract" && path.length) {
|
|
124
|
+
let wp = path[Math.min(pathIndex, path.length - 1)];
|
|
125
|
+
if (Math.hypot(wp[0] - ball.position.x, wp[1] - ball.position.z) < 0.45 && pathIndex < path.length - 1) {
|
|
126
|
+
pathIndex++;
|
|
127
|
+
wp = path[pathIndex];
|
|
128
|
+
}
|
|
129
|
+
if (pathIndex >= path.length - 1) wp = [exit[0] + info.cellSize, exit[2]];
|
|
130
|
+
ax = wp[0] - ball.position.x;
|
|
131
|
+
az = wp[1] - ball.position.z;
|
|
132
|
+
const d = Math.hypot(ax, az) || 1;
|
|
133
|
+
ax /= d;
|
|
134
|
+
az /= d;
|
|
135
|
+
}
|
|
136
|
+
const l = Math.hypot(ax, az);
|
|
137
|
+
if (l > 1) { ax /= l; az /= l; }
|
|
138
|
+
let vx = ball.velocity.x + ax * cfg.accel * dt;
|
|
139
|
+
let vz = ball.velocity.z + az * cfg.accel * dt;
|
|
140
|
+
const damp = Math.max(0, 1 - cfg.damping * dt);
|
|
141
|
+
vx *= damp;
|
|
142
|
+
vz *= damp;
|
|
143
|
+
const sp = Math.hypot(vx, vz);
|
|
144
|
+
const max = phase === "attract" ? cfg.maxSpeed * 0.8 : cfg.maxSpeed;
|
|
145
|
+
if (sp > max) { vx *= max / sp; vz *= max / sp; }
|
|
146
|
+
ball.velocity.x = vx;
|
|
147
|
+
ball.velocity.z = vz;
|
|
148
|
+
|
|
149
|
+
if (phase === "play" && (inp.any || elapsed > 0)) elapsed += dt;
|
|
150
|
+
// Out through the east opening of the exit cell → win.
|
|
151
|
+
const won = ball.position.x > exit[0] + info.cellSize * 0.45 && Math.abs(ball.position.z - exit[2]) < info.cellSize;
|
|
152
|
+
if (won) {
|
|
153
|
+
if (phase === "play") {
|
|
154
|
+
phase = "won";
|
|
155
|
+
wonAt = api.time();
|
|
156
|
+
if (best === null || elapsed < best) {
|
|
157
|
+
best = elapsed;
|
|
158
|
+
api.storage.set("bestTime", best);
|
|
159
|
+
api.ui.toast("New record!", 2);
|
|
160
|
+
}
|
|
161
|
+
api.audio.play("win");
|
|
162
|
+
} else reset("attract");
|
|
163
|
+
}
|
|
164
|
+
if (ball.position.y < -5) reset(phase);
|
|
165
|
+
publish();
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "game-maze",
|
|
3
|
+
"title": "Marble maze",
|
|
4
|
+
"description": "Playable marble maze: roll a glossy ball through a procedural maze to the glowing exit against the clock \u2014 physics walls, best time, keyboard + touch, self-solving attract mode.",
|
|
5
|
+
"kind": "game",
|
|
6
|
+
"tags": [
|
|
7
|
+
"game",
|
|
8
|
+
"maze",
|
|
9
|
+
"puzzle",
|
|
10
|
+
"ball",
|
|
11
|
+
"physics",
|
|
12
|
+
"timer",
|
|
13
|
+
"touch",
|
|
14
|
+
"keyboard",
|
|
15
|
+
"procedural"
|
|
16
|
+
],
|
|
17
|
+
"aspect": "1:1"
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Tower smash (physics)
|
|
2
|
+
|
|
3
|
+
A playable 16:9 rigid-body physics playground: a 9-level tower of 27 wooden blocks (Jenga-style, alternating layers) stands on a pedestal. Click or tap anywhere to lob a ball at the point under the pointer; the blocks are real rigid bodies (they tumble, slide, stack and fall asleep when at rest). Knock every block off the pedestal in as few throws as possible. Fewest throws saved with `api.storage`, impact sounds scaled by the contact impulse (`api.physics.onCollision` → `info.impulse`), a **Rebuild** button, and an **attract mode** in which an autopilot throws at the tower and rebuilds it, so the embed is alive.
|
|
4
|
+
|
|
5
|
+
## Controls
|
|
6
|
+
|
|
7
|
+
| | Touch / mouse | Keyboard |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Throw | tap / click the spot to hit (`api.input.pointerWorld()`) | Space (throws at the pointer) |
|
|
10
|
+
| Rebuild | the **Rebuild** button | — |
|
|
11
|
+
|
|
12
|
+
## How it works
|
|
13
|
+
|
|
14
|
+
- Blocks: `body: { "type": "dynamic", "mass": 0.6, "friction": 0.55 }` — the collider is the box of the mesh (rotated blocks get a rotated box).
|
|
15
|
+
- Balls: clones of the hidden `ballProto` (`api.clone`, synchronous so the simulation stays deterministic), launched with a ballistic velocity (`api.physics.setVelocity`) and a random spin (`api.physics.setAngularVelocity`, degrees / s). `ccd: true` adds sub-steps so fast balls never tunnel through blocks. At most `data.playground.maxBalls` balls live at once.
|
|
16
|
+
- Rebuild: every block gets its start position / rotation back and zero velocities — no scene reload.
|
|
17
|
+
- `physics.substeps: 2` and `iterations: 12` keep the tall stack stable; set `physics.debug: true` to see the colliders in renders.
|
|
18
|
+
|
|
19
|
+
## What to tweak
|
|
20
|
+
|
|
21
|
+
| Change | Where |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Tower height / shape | add or remove `block…` objects (keep the `block` tag; levels are 0.3 high, starting at y = 0.75) |
|
|
24
|
+
| Throw feel | `data.playground.throwSpeed` (higher = flatter, faster throws), `objects#ballProto.body.mass`, `objects#ballProto.geometry.radius` |
|
|
25
|
+
| Autopilot pace | `data.playground.autoEvery` (seconds between throws) |
|
|
26
|
+
| Bounciness / grip | `body.restitution` / `body.friction` on the blocks, the pedestal and the ground |
|
|
27
|
+
| Colours | `objects#block….material.color` (a stain over a procedural `wood` map, 128 px so the 27 blocks stay light on GPU memory), `objects#pedestal.material`, `environment.background` / `fog` |
|
|
28
|
+
| Texts | `ui.elements` |
|
|
29
|
+
|
|
30
|
+
`api.state`: `phase` (`attract` | `play` | `cleared`), `down` / `total` (blocks off the pedestal), `throws`, `best`, `balls`.
|
|
Binary file
|