@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,210 @@
|
|
|
1
|
+
// Coin collector — run and jump around a floating arena, grab every coin
|
|
2
|
+
// before the timer runs out. Physics: the hero is a dynamic body, platforms
|
|
3
|
+
// are static, coins are triggers. The island is round: the hero is kept
|
|
4
|
+
// inside data.collector.radius (the square floor body is larger).
|
|
5
|
+
// Controls: arrows / WASD move, Space jumps; touch: hold a finger on the
|
|
6
|
+
// side you want to go (relative to the screen centre), tap quickly to jump.
|
|
7
|
+
// No input for a while → attract mode (the hero collects coins by itself).
|
|
8
|
+
|
|
9
|
+
export default function (api) {
|
|
10
|
+
const cfg = Object.assign({ time: 45, speed: 5, jump: 7.2, fallY: -8, radius: 5.9 }, api.data.collector || {});
|
|
11
|
+
const hero = api.get("hero");
|
|
12
|
+
const coins = api.findByTag("coin");
|
|
13
|
+
const spawn = hero ? [hero.position.x, hero.position.y, hero.position.z] : [0, 1, 0];
|
|
14
|
+
let phase = "attract"; // attract | play | won | over
|
|
15
|
+
let timeLeft = cfg.time;
|
|
16
|
+
let got = new Set();
|
|
17
|
+
let anim = "";
|
|
18
|
+
let endAt = 0;
|
|
19
|
+
let heldSince = -1;
|
|
20
|
+
let jumpCooldown = 0;
|
|
21
|
+
let aiJumping = false;
|
|
22
|
+
let lastGot = 0;
|
|
23
|
+
let lastProgress = 0;
|
|
24
|
+
let best = api.storage.get("bestTime");
|
|
25
|
+
best = typeof best === "number" ? best : null;
|
|
26
|
+
|
|
27
|
+
function play(clip) {
|
|
28
|
+
if (anim !== clip && hero) {
|
|
29
|
+
anim = clip;
|
|
30
|
+
hero.playAnimation(clip, { loop: clip !== "jump", crossfade: 0.15 });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function reset(next) {
|
|
35
|
+
phase = next;
|
|
36
|
+
timeLeft = cfg.time;
|
|
37
|
+
got = new Set();
|
|
38
|
+
for (const c of coins) c.visible = true;
|
|
39
|
+
aiJumping = false;
|
|
40
|
+
lastGot = 0;
|
|
41
|
+
lastProgress = api.time();
|
|
42
|
+
respawn();
|
|
43
|
+
publish();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function respawn() {
|
|
47
|
+
if (!hero) return;
|
|
48
|
+
hero.position.set(spawn[0], spawn[1], spawn[2]);
|
|
49
|
+
hero.velocity.set(0, 0, 0);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function publish() {
|
|
53
|
+
api.state.phase = phase;
|
|
54
|
+
api.state.coins = got.size;
|
|
55
|
+
api.state.total = coins.length;
|
|
56
|
+
api.state.time = Math.max(0, Math.ceil(timeLeft));
|
|
57
|
+
api.state.timeBar = Math.max(0, timeLeft / cfg.time);
|
|
58
|
+
api.state.best = best === null ? "—" : best.toFixed(1) + " s";
|
|
59
|
+
api.state.demo = phase === "attract";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function grounded() {
|
|
63
|
+
if (!hero) return false;
|
|
64
|
+
if (Math.abs(hero.velocity.y) > 0.6) return false;
|
|
65
|
+
return api.physics.contacts(hero).some((o) => o.tags.includes("ground"));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function nearestCoin() {
|
|
69
|
+
let bestC = null, bestD = Infinity;
|
|
70
|
+
for (const c of coins) {
|
|
71
|
+
if (got.has(c.id)) continue;
|
|
72
|
+
const d = Math.hypot(c.position.x - hero.position.x, c.position.z - hero.position.z) + Math.max(0, c.position.y - hero.position.y) * 2;
|
|
73
|
+
if (d < bestD) { bestD = d; bestC = c; }
|
|
74
|
+
}
|
|
75
|
+
return bestC;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function input() {
|
|
79
|
+
const i = api.input;
|
|
80
|
+
let x = 0, z = 0, jump = false, any = false;
|
|
81
|
+
if (i.isDown("ArrowLeft") || i.isDown("KeyA")) x -= 1;
|
|
82
|
+
if (i.isDown("ArrowRight") || i.isDown("KeyD")) x += 1;
|
|
83
|
+
if (i.isDown("ArrowUp") || i.isDown("KeyW")) z -= 1;
|
|
84
|
+
if (i.isDown("ArrowDown") || i.isDown("KeyS")) z += 1;
|
|
85
|
+
if (i.pressed("Space")) jump = true;
|
|
86
|
+
// touch / mouse: hold = move toward the finger, quick tap = jump
|
|
87
|
+
const p = i.pointer;
|
|
88
|
+
if (p.justPressed) heldSince = api.time();
|
|
89
|
+
if (p.down && heldSince >= 0 && api.time() - heldSince > 0.18) {
|
|
90
|
+
x += Math.max(-1, Math.min(1, p.x * 2));
|
|
91
|
+
z += Math.max(-1, Math.min(1, -p.y * 2));
|
|
92
|
+
}
|
|
93
|
+
if (!p.down && heldSince >= 0) {
|
|
94
|
+
if (api.time() - heldSince <= 0.18) jump = true;
|
|
95
|
+
heldSince = -1;
|
|
96
|
+
}
|
|
97
|
+
if (i.swipe() === "up") jump = true;
|
|
98
|
+
any = x !== 0 || z !== 0 || jump || i.pressed("Enter");
|
|
99
|
+
return { x, z, jump, any };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function finish(won) {
|
|
103
|
+
phase = won ? "won" : "over";
|
|
104
|
+
endAt = api.time();
|
|
105
|
+
if (won) {
|
|
106
|
+
const t = cfg.time - timeLeft;
|
|
107
|
+
if (best === null || t < best) {
|
|
108
|
+
best = t;
|
|
109
|
+
api.storage.set("bestTime", best);
|
|
110
|
+
api.ui.toast("New record!", 2);
|
|
111
|
+
}
|
|
112
|
+
api.audio.play("win");
|
|
113
|
+
} else api.audio.play("lose");
|
|
114
|
+
if (hero) hero.velocity.set(0, hero.velocity.y, 0);
|
|
115
|
+
play("idle");
|
|
116
|
+
publish();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
start() {
|
|
121
|
+
reset("attract");
|
|
122
|
+
play("idle");
|
|
123
|
+
},
|
|
124
|
+
onEvent(name) {
|
|
125
|
+
if (name === "retry") {
|
|
126
|
+
reset("play");
|
|
127
|
+
api.audio.play("click");
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
update(dt) {
|
|
131
|
+
if (!hero) return;
|
|
132
|
+
const inp = input();
|
|
133
|
+
if (phase === "attract" && inp.any) {
|
|
134
|
+
reset("play");
|
|
135
|
+
api.audio.play("click");
|
|
136
|
+
}
|
|
137
|
+
if (phase === "won" || phase === "over") {
|
|
138
|
+
if (inp.any && api.time() - endAt > 0.8) reset("play");
|
|
139
|
+
else if (api.time() - endAt > 7) reset("attract");
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let mx = inp.x, mz = inp.z, wantJump = inp.jump;
|
|
144
|
+
if (phase === "attract") {
|
|
145
|
+
const c = nearestCoin();
|
|
146
|
+
if (c) {
|
|
147
|
+
let tx = c.position.x, tz = c.position.z;
|
|
148
|
+
const high = c.position.y - hero.position.y > 1;
|
|
149
|
+
if (high) {
|
|
150
|
+
// stage on the arena side of the platform, then jump onto it
|
|
151
|
+
const r = Math.hypot(tx, tz) || 1;
|
|
152
|
+
const sx = tx - (tx / r) * 2.4, sz = tz - (tz / r) * 2.4;
|
|
153
|
+
if (Math.hypot(sx - hero.position.x, sz - hero.position.z) > 0.6 && !aiJumping) { tx = sx; tz = sz; }
|
|
154
|
+
else { wantJump = true; aiJumping = true; }
|
|
155
|
+
} else aiJumping = false;
|
|
156
|
+
const dx = tx - hero.position.x, dz = tz - hero.position.z;
|
|
157
|
+
const d = Math.hypot(dx, dz) || 1;
|
|
158
|
+
mx = d > 0.15 ? dx / d : 0;
|
|
159
|
+
mz = d > 0.15 ? dz / d : 0;
|
|
160
|
+
}
|
|
161
|
+
if (got.size !== lastGot) { lastGot = got.size; lastProgress = api.time(); }
|
|
162
|
+
if (api.time() - lastProgress > 8) reset("attract");
|
|
163
|
+
}
|
|
164
|
+
const len = Math.hypot(mx, mz);
|
|
165
|
+
if (len > 1) { mx /= len; mz /= len; }
|
|
166
|
+
hero.velocity.x = mx * cfg.speed;
|
|
167
|
+
hero.velocity.z = mz * cfg.speed;
|
|
168
|
+
jumpCooldown -= dt;
|
|
169
|
+
const onGround = grounded();
|
|
170
|
+
if (aiJumping && onGround && jumpCooldown < 0) aiJumping = false;
|
|
171
|
+
if (wantJump && onGround && jumpCooldown <= 0) {
|
|
172
|
+
hero.velocity.y = cfg.jump;
|
|
173
|
+
jumpCooldown = 0.3;
|
|
174
|
+
if (phase === "play") api.audio.play("jump");
|
|
175
|
+
}
|
|
176
|
+
// Round island: keep the hero inside a circle (the floor body is square).
|
|
177
|
+
const r = Math.hypot(hero.position.x, hero.position.z);
|
|
178
|
+
if (r > cfg.radius) {
|
|
179
|
+
const nx = hero.position.x / r, nz = hero.position.z / r;
|
|
180
|
+
hero.position.set(nx * cfg.radius, hero.position.y, nz * cfg.radius);
|
|
181
|
+
const out = hero.velocity.x * nx + hero.velocity.z * nz;
|
|
182
|
+
if (out > 0) hero.velocity.set(hero.velocity.x - out * nx, hero.velocity.y, hero.velocity.z - out * nz);
|
|
183
|
+
}
|
|
184
|
+
if (len > 0.1) hero.rotation.set(0, (Math.atan2(mx, mz) * 180) / Math.PI, 0);
|
|
185
|
+
play(!onGround ? "jump" : len > 0.1 ? "walk" : "idle");
|
|
186
|
+
|
|
187
|
+
for (const c of coins) {
|
|
188
|
+
if (got.has(c.id)) continue;
|
|
189
|
+
c.rotation.set(0, api.time() * 140, 0);
|
|
190
|
+
if (api.physics.overlaps(hero, c)) {
|
|
191
|
+
got.add(c.id);
|
|
192
|
+
c.visible = false;
|
|
193
|
+
if (phase === "play") api.audio.play("coin");
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (hero.position.y < cfg.fallY) {
|
|
197
|
+
respawn();
|
|
198
|
+
if (phase === "play") api.ui.toast("Oops! Back to start", 1.2);
|
|
199
|
+
}
|
|
200
|
+
if (phase === "play") {
|
|
201
|
+
timeLeft -= dt;
|
|
202
|
+
if (got.size === coins.length) finish(true);
|
|
203
|
+
else if (timeLeft <= 0) finish(false);
|
|
204
|
+
} else if (got.size === coins.length) {
|
|
205
|
+
reset("attract");
|
|
206
|
+
}
|
|
207
|
+
publish();
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "game-coin-collector",
|
|
3
|
+
"title": "Coin collector arena",
|
|
4
|
+
"description": "Playable 3D platformer arena (16:9): run and jump across a floating grass island and stepped platforms above a sea of clouds to collect 12 coins before the 45 s timer ends \u2014 physics, follow camera, best time, keyboard + touch, self-playing attract mode.",
|
|
5
|
+
"kind": "game",
|
|
6
|
+
"tags": [
|
|
7
|
+
"game",
|
|
8
|
+
"platformer",
|
|
9
|
+
"coins",
|
|
10
|
+
"physics",
|
|
11
|
+
"timer",
|
|
12
|
+
"arcade",
|
|
13
|
+
"touch",
|
|
14
|
+
"keyboard",
|
|
15
|
+
"floating-island",
|
|
16
|
+
"clouds"
|
|
17
|
+
],
|
|
18
|
+
"aspect": "16:9"
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Marble maze
|
|
2
|
+
|
|
3
|
+
A playable 1:1 marble maze (great on mobile): a procedural `maze` generator (9 × 9, always solvable, walls registered as static physics bodies) and a glossy dynamic ball you roll from the entrance (top-left) to the glowing green exit (bottom-right) against the clock. Best time saved with `api.storage`, win screen + **Play again**, and an **attract mode** in which the ball solves the maze by itself (breadth-first search over `maze.userData.maze.walls`).
|
|
4
|
+
|
|
5
|
+
## Controls
|
|
6
|
+
|
|
7
|
+
| | Keyboard | Touch / mouse |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Roll | arrows / WASD | hold a finger: the ball rolls toward it (relative to the screen centre) |
|
|
10
|
+
| Start / retry | any arrow, Space, Enter | touch, or the **Play again** button |
|
|
11
|
+
|
|
12
|
+
The clock starts with the first move.
|
|
13
|
+
|
|
14
|
+
## What to tweak
|
|
15
|
+
|
|
16
|
+
| Change | Where |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Another maze | `seed` (scene) — every seed is a new perfect maze |
|
|
19
|
+
| Size / difficulty | `objects#maze.params.columns` / `.rows` (then move `objects#goal` / `goalGlow` to x = columns·cellSize/2 + 0.9, z = rows·cellSize/2 − cellSize/2, enlarge `objects#floor`, raise the camera) |
|
|
20
|
+
| Ball handling | `data.maze`: `accel`, `maxSpeed`, `damping` |
|
|
21
|
+
| Colours | neon night look by default: `objects#maze.params.wallColor` / `.floorColor`, the glowing ball (`objects#ball.material.emissive`), the exit light `lights#glowExit`, `environment.background`; daylight: light floor, `environment.lighting: "studio"`, bloom strength 0.3 |
|
|
22
|
+
| Texts | `ui.elements` |
|
|
23
|
+
|
|
24
|
+
`api.state`: `phase` (`attract` | `play` | `won`), `time`, `best`, `progress` (attract-mode % along the solution path).
|
|
Binary file
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"id": "game-maze",
|
|
4
|
+
"title": "Marble maze",
|
|
5
|
+
"ariaLabel": "Marble maze mini game: roll the ball to the glowing exit with the arrow keys or by holding a finger",
|
|
6
|
+
"seed": 17,
|
|
7
|
+
"target": {
|
|
8
|
+
"kind": "game",
|
|
9
|
+
"aspect": "1:1",
|
|
10
|
+
"budgetKb": 200,
|
|
11
|
+
"reducedMotion": "ignore",
|
|
12
|
+
"maxDpr": 2
|
|
13
|
+
},
|
|
14
|
+
"camera": {
|
|
15
|
+
"type": "perspective",
|
|
16
|
+
"fov": 42,
|
|
17
|
+
"position": [
|
|
18
|
+
0,
|
|
19
|
+
31,
|
|
20
|
+
12.5
|
|
21
|
+
],
|
|
22
|
+
"target": [
|
|
23
|
+
0,
|
|
24
|
+
0,
|
|
25
|
+
1.5
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"environment": {
|
|
29
|
+
"background": {
|
|
30
|
+
"radial": [
|
|
31
|
+
"#221d4f",
|
|
32
|
+
"#07061a"
|
|
33
|
+
],
|
|
34
|
+
"center": [
|
|
35
|
+
0.5,
|
|
36
|
+
0.45
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"lighting": "night",
|
|
40
|
+
"lightingIntensity": 0.5,
|
|
41
|
+
"shadows": {
|
|
42
|
+
"type": "vsm",
|
|
43
|
+
"softness": 4
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"lights": [
|
|
47
|
+
{
|
|
48
|
+
"id": "fill",
|
|
49
|
+
"type": "hemisphere",
|
|
50
|
+
"skyColor": "#b8b0ff",
|
|
51
|
+
"groundColor": "#1a1540",
|
|
52
|
+
"intensity": 0.55
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "sun",
|
|
56
|
+
"type": "directional",
|
|
57
|
+
"position": [
|
|
58
|
+
-7,
|
|
59
|
+
16,
|
|
60
|
+
9
|
|
61
|
+
],
|
|
62
|
+
"color": "#e8e2ff",
|
|
63
|
+
"intensity": 1.5,
|
|
64
|
+
"castShadow": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "glowExit",
|
|
68
|
+
"type": "point",
|
|
69
|
+
"position": [
|
|
70
|
+
9.6,
|
|
71
|
+
1.5,
|
|
72
|
+
8
|
|
73
|
+
],
|
|
74
|
+
"color": "#4ade80",
|
|
75
|
+
"intensity": 25,
|
|
76
|
+
"distance": 8
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"objects": [
|
|
80
|
+
{
|
|
81
|
+
"id": "maze",
|
|
82
|
+
"kind": "generator",
|
|
83
|
+
"generator": "maze",
|
|
84
|
+
"params": {
|
|
85
|
+
"columns": 9,
|
|
86
|
+
"rows": 9,
|
|
87
|
+
"cellSize": 2,
|
|
88
|
+
"wallHeight": 1,
|
|
89
|
+
"wallColor": "#8f7dff",
|
|
90
|
+
"floorColor": "#2a2460",
|
|
91
|
+
"bodies": true
|
|
92
|
+
},
|
|
93
|
+
"receiveShadow": true,
|
|
94
|
+
"castShadow": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "floor",
|
|
98
|
+
"kind": "mesh",
|
|
99
|
+
"geometry": {
|
|
100
|
+
"type": "box",
|
|
101
|
+
"width": 20,
|
|
102
|
+
"height": 0.4,
|
|
103
|
+
"depth": 20
|
|
104
|
+
},
|
|
105
|
+
"position": [
|
|
106
|
+
0,
|
|
107
|
+
-0.2,
|
|
108
|
+
0
|
|
109
|
+
],
|
|
110
|
+
"material": {
|
|
111
|
+
"preset": "matte",
|
|
112
|
+
"color": "#e6dcff"
|
|
113
|
+
},
|
|
114
|
+
"body": {
|
|
115
|
+
"type": "static"
|
|
116
|
+
},
|
|
117
|
+
"visible": false
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "ball",
|
|
121
|
+
"kind": "mesh",
|
|
122
|
+
"geometry": {
|
|
123
|
+
"type": "sphere",
|
|
124
|
+
"radius": 0.45,
|
|
125
|
+
"segments": 40,
|
|
126
|
+
"heightSegments": 28
|
|
127
|
+
},
|
|
128
|
+
"position": [
|
|
129
|
+
-8,
|
|
130
|
+
0.5,
|
|
131
|
+
-8
|
|
132
|
+
],
|
|
133
|
+
"material": {
|
|
134
|
+
"type": "physical",
|
|
135
|
+
"color": "#ff4f8b",
|
|
136
|
+
"emissive": "#ff2f74",
|
|
137
|
+
"emissiveIntensity": 1.4,
|
|
138
|
+
"roughness": 0.1,
|
|
139
|
+
"clearcoat": 1
|
|
140
|
+
},
|
|
141
|
+
"body": {
|
|
142
|
+
"type": "dynamic",
|
|
143
|
+
"shape": "sphere",
|
|
144
|
+
"radius": 0.45,
|
|
145
|
+
"restitution": 0.2,
|
|
146
|
+
"friction": 0.1
|
|
147
|
+
},
|
|
148
|
+
"castShadow": true,
|
|
149
|
+
"tags": [
|
|
150
|
+
"player"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "goal",
|
|
155
|
+
"kind": "mesh",
|
|
156
|
+
"geometry": {
|
|
157
|
+
"type": "torus",
|
|
158
|
+
"radius": 0.6,
|
|
159
|
+
"tube": 0.12,
|
|
160
|
+
"radialSegments": 12,
|
|
161
|
+
"tubularSegments": 48
|
|
162
|
+
},
|
|
163
|
+
"position": [
|
|
164
|
+
9.9,
|
|
165
|
+
0.8,
|
|
166
|
+
8.0
|
|
167
|
+
],
|
|
168
|
+
"rotation": [
|
|
169
|
+
0,
|
|
170
|
+
0,
|
|
171
|
+
0
|
|
172
|
+
],
|
|
173
|
+
"material": {
|
|
174
|
+
"preset": "neon",
|
|
175
|
+
"color": "#4ade80",
|
|
176
|
+
"emissive": "#4ade80",
|
|
177
|
+
"emissiveIntensity": 3
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "goalGlow",
|
|
182
|
+
"kind": "particles",
|
|
183
|
+
"preset": "fireflies",
|
|
184
|
+
"count": 30,
|
|
185
|
+
"area": [
|
|
186
|
+
1.5,
|
|
187
|
+
1.5,
|
|
188
|
+
1.5
|
|
189
|
+
],
|
|
190
|
+
"position": [
|
|
191
|
+
9.9,
|
|
192
|
+
0.8,
|
|
193
|
+
8.0
|
|
194
|
+
],
|
|
195
|
+
"color": "#86efac",
|
|
196
|
+
"size": 0.1
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "dust",
|
|
200
|
+
"kind": "particles",
|
|
201
|
+
"preset": "dust",
|
|
202
|
+
"count": 120,
|
|
203
|
+
"area": [
|
|
204
|
+
22,
|
|
205
|
+
4,
|
|
206
|
+
22
|
|
207
|
+
],
|
|
208
|
+
"position": [
|
|
209
|
+
0,
|
|
210
|
+
2,
|
|
211
|
+
0
|
|
212
|
+
],
|
|
213
|
+
"color": [
|
|
214
|
+
"#b9a8ff",
|
|
215
|
+
"#ffb3d1"
|
|
216
|
+
],
|
|
217
|
+
"size": 0.05,
|
|
218
|
+
"opacity": 0.6
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"physics": {
|
|
222
|
+
"gravity": [
|
|
223
|
+
0,
|
|
224
|
+
-20,
|
|
225
|
+
0
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"scripts": [
|
|
229
|
+
"scripts/maze.js"
|
|
230
|
+
],
|
|
231
|
+
"data": {
|
|
232
|
+
"maze": {
|
|
233
|
+
"accel": 16,
|
|
234
|
+
"maxSpeed": 6,
|
|
235
|
+
"damping": 2.2
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"ui": {
|
|
239
|
+
"color": "#f5f3ff",
|
|
240
|
+
"accent": "#ff5d8f",
|
|
241
|
+
"elements": [
|
|
242
|
+
{
|
|
243
|
+
"id": "timeHud",
|
|
244
|
+
"type": "text",
|
|
245
|
+
"text": "\u23f1 {time} s",
|
|
246
|
+
"anchor": "top-left",
|
|
247
|
+
"style": "pill"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "bestHud",
|
|
251
|
+
"type": "text",
|
|
252
|
+
"text": "Best {best}",
|
|
253
|
+
"anchor": "top-right",
|
|
254
|
+
"style": "pill"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "title",
|
|
258
|
+
"type": "text",
|
|
259
|
+
"text": "Marble Maze",
|
|
260
|
+
"anchor": "top",
|
|
261
|
+
"style": "title",
|
|
262
|
+
"visible": "phase == 'attract'"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "hint",
|
|
266
|
+
"type": "text",
|
|
267
|
+
"text": "Arrows / WASD \u2014 or hold a finger to roll",
|
|
268
|
+
"anchor": "bottom",
|
|
269
|
+
"style": "subtitle",
|
|
270
|
+
"visible": "phase == 'attract'"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"id": "won",
|
|
274
|
+
"type": "text",
|
|
275
|
+
"text": "Out in {time} s!",
|
|
276
|
+
"anchor": "center",
|
|
277
|
+
"style": "title",
|
|
278
|
+
"visible": "phase == 'won'"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "retry",
|
|
282
|
+
"type": "button",
|
|
283
|
+
"text": "Play again",
|
|
284
|
+
"anchor": "bottom",
|
|
285
|
+
"action": "retry",
|
|
286
|
+
"visible": "phase == 'won'"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"audio": {
|
|
291
|
+
"sounds": {
|
|
292
|
+
"win": {
|
|
293
|
+
"preset": "win"
|
|
294
|
+
},
|
|
295
|
+
"click": {
|
|
296
|
+
"preset": "click"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"postfx": [
|
|
301
|
+
{
|
|
302
|
+
"type": "bloom",
|
|
303
|
+
"strength": 0.9,
|
|
304
|
+
"radius": 0.5,
|
|
305
|
+
"threshold": 0.9
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"type": "vignette",
|
|
309
|
+
"darkness": 0.8
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"type": "fxaa"
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
}
|