@fleox/agent3d 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +143 -0
- package/README.md +172 -2
- package/changelog.json +56 -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-CaKRRzMX.mjs +177 -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-BpDU9Lsq.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-Ck7_Nszg.mjs +75 -0
- package/dist/agent/chunks/png-DXfSGJZt.mjs +91 -0
- package/dist/agent/chunks/render-Cbuhz5uW.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-Re3wQkXp.js +1 -0
- package/dist/runtime/chunks/EXRLoader-Bzm84si5.js +1 -0
- package/dist/runtime/chunks/FontLoader-BocwqK8V.js +2 -0
- package/dist/runtime/chunks/GLTFLoader-DHp1wv6J.js +1 -0
- package/dist/runtime/chunks/GroundedSkybox-esvlRCO0.js +1 -0
- package/dist/runtime/chunks/HDRLoader-DHrHp8fs.js +5 -0
- package/dist/runtime/chunks/OrbitControls-sjN2MF0e.js +1 -0
- package/dist/runtime/chunks/RectAreaLightUniformsLib-_mZ62yWn.js +1 -0
- package/dist/runtime/chunks/RoomEnvironment-CL4UR6ZW.js +1 -0
- package/dist/runtime/chunks/RoundedBoxGeometry-x-ot8ZSh.js +1 -0
- package/dist/runtime/chunks/SVGLoader-hRF0EwD-.js +1 -0
- package/dist/runtime/chunks/SkeletonUtils-DHlReJx3.js +1 -0
- package/dist/runtime/chunks/Sky-BrLN9Fk5.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-m04mghOS.js +1 -0
- package/dist/runtime/chunks/game-BoG2S6g4.js +20 -0
- package/dist/runtime/chunks/generators-OHhFCc2E.js +331 -0
- package/dist/runtime/chunks/materials-C2uffFEd.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-D-4xZz21.js +1 -0
- package/dist/runtime/chunks/params-DdApDOBw.js +1 -0
- package/dist/runtime/chunks/physicsHost-DPaVdM0R.js +1 -0
- package/dist/runtime/chunks/postfx-BpBXjLX3.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-CmeJRio1.js +443 -0
- package/dist/runtime/chunks/svg-B3nZaQFD.js +1 -0
- package/dist/runtime/chunks/text-CmkU-b0C.js +2 -0
- package/dist/runtime/chunks/three.module-W4hp4qHb.js +4225 -0
- package/dist/runtime/chunks/toon-B5Jhf37V.js +6 -0
- package/dist/runtime/chunks/util-THUewKBk.js +1 -0
- package/dist/studio/assets/BufferGeometryUtils-wW9vV1l2.js +1 -0
- package/dist/studio/assets/EXRLoader-f8U8jnlr.js +1 -0
- package/dist/studio/assets/FontLoader-9sHudKzD.js +2 -0
- package/dist/studio/assets/GLTFLoader-C3C_3K62.js +1 -0
- package/dist/studio/assets/GroundedSkybox-BTqmv4fv.js +1 -0
- package/dist/studio/assets/HDRLoader-CkQyrTWY.js +5 -0
- package/dist/studio/assets/OrbitControls-fcOgB96a.js +1 -0
- package/dist/studio/assets/RectAreaLightUniformsLib-CZHWO9xf.js +1 -0
- package/dist/studio/assets/RoomEnvironment-BsISzuCp.js +1 -0
- package/dist/studio/assets/SVGLoader-BIkQDT66.js +1 -0
- package/dist/studio/assets/SkeletonUtils-CG5akqME.js +1 -0
- package/dist/studio/assets/Sky-C282PFL1.js +243 -0
- package/dist/studio/assets/audio-JD1kyX0A.js +1 -0
- package/dist/studio/assets/camera-BhKdE9ej.js +2 -0
- package/dist/studio/assets/editor-BgY_RoRd.js +1 -0
- package/dist/studio/assets/extrude-CnayHczh.js +1 -0
- package/dist/studio/assets/game-Dv5s4eMN.js +19 -0
- package/dist/studio/assets/generators-DVX3bAxe.js +331 -0
- package/dist/studio/assets/index-BQT0otii.css +1 -0
- package/dist/studio/assets/index-Dh-2Y34U.js +479 -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-XZSP52pV.js +2 -0
- package/dist/studio/assets/physicsHost-C84FddIe.js +1 -0
- package/dist/studio/assets/postfx-BWWXb8i8.js +1527 -0
- package/dist/studio/assets/runtime-k_MFerbJ.js +572 -0
- package/dist/studio/assets/shaders-BEznGIct.js +443 -0
- package/dist/studio/assets/svg-DT8kx37i.js +2 -0
- package/dist/studio/assets/text-5DsJJHcj.js +3 -0
- package/dist/studio/assets/three.module-ByMn_ZTv.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,176 @@
|
|
|
1
|
+
// Hoop Shot — a 45-second basketball shooting game on real rigid-body physics.
|
|
2
|
+
// The ball is a dynamic sphere (ccd), the rim a static trimesh torus, the
|
|
3
|
+
// backboard and the floor static boxes; a hidden trigger under the rim counts
|
|
4
|
+
// baskets (only when the ball falls through it). After each shot the ball comes
|
|
5
|
+
// back at a new spot on the court.
|
|
6
|
+
// Controls: swipe / drag up from anywhere (the swipe length is the power, its
|
|
7
|
+
// sideways drift the aim) — or hold Space to charge the power bar and release
|
|
8
|
+
// (← → nudge the aim). Consecutive baskets build a x2 / x3 streak.
|
|
9
|
+
// Attract mode: an autopilot shoots with a small random error.
|
|
10
|
+
|
|
11
|
+
export default function (api) {
|
|
12
|
+
const cfg = Object.assign({ time: 45, flight: 0.95, respawn: 2.4 }, api.data.basket || {});
|
|
13
|
+
const ball = api.get("ball");
|
|
14
|
+
const aim = api.get("aim");
|
|
15
|
+
const confetti = api.get("confetti");
|
|
16
|
+
const hoop = [0, 3.05, -0.13];
|
|
17
|
+
const g = 9.81;
|
|
18
|
+
|
|
19
|
+
let phase = "attract"; // attract | play | over
|
|
20
|
+
let score = 0;
|
|
21
|
+
let streak = 0;
|
|
22
|
+
let timeLeft = cfg.time;
|
|
23
|
+
let spot = [0, 1.3, 5.5];
|
|
24
|
+
let holding = true; // ball waiting in hand
|
|
25
|
+
let shotAt = 0;
|
|
26
|
+
let scoredThisShot = false;
|
|
27
|
+
let charge = 0;
|
|
28
|
+
let charging = false;
|
|
29
|
+
let aimX = 0;
|
|
30
|
+
let dragFrom = null;
|
|
31
|
+
let endAt = 0;
|
|
32
|
+
let confettiUntil = 0;
|
|
33
|
+
let nextAuto = 1.2;
|
|
34
|
+
let best = Number(api.storage.get("best") ?? 0);
|
|
35
|
+
|
|
36
|
+
function publish() {
|
|
37
|
+
api.state.phase = phase;
|
|
38
|
+
api.state.score = score;
|
|
39
|
+
api.state.best = best;
|
|
40
|
+
api.state.mult = Math.min(3, 1 + Math.floor(streak / 2));
|
|
41
|
+
api.state.time = Math.max(0, Math.ceil(timeLeft));
|
|
42
|
+
api.state.power = charge;
|
|
43
|
+
api.state.charging = charging && phase === "play";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function newSpot() {
|
|
47
|
+
const x = api.randomRange(-1.8, 1.8);
|
|
48
|
+
const z = api.randomRange(3.8, 5.4);
|
|
49
|
+
spot = [x, 1.3, z];
|
|
50
|
+
if (aim) aim.position.set(x, 0.01, z);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function hold() {
|
|
54
|
+
holding = true;
|
|
55
|
+
ball.position.set(spot[0], spot[1] + Math.sin(api.time() * 3) * 0.05, spot[2]);
|
|
56
|
+
api.physics.setVelocity(ball, [0, 0, 0]);
|
|
57
|
+
api.physics.setAngularVelocity(ball, [0, 0, 0]);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// power 0..1 (0.5 = the ideal arc), side = lateral error in m/s
|
|
61
|
+
function shoot(power, side) {
|
|
62
|
+
const T = cfg.flight;
|
|
63
|
+
const k = 0.78 + power * 0.44;
|
|
64
|
+
const v = [
|
|
65
|
+
((hoop[0] - spot[0]) / T) * k + side,
|
|
66
|
+
((hoop[1] + 0.05 - spot[1]) / T + 0.5 * g * T) * k,
|
|
67
|
+
((hoop[2] + 0.06 - spot[2]) / T) * k,
|
|
68
|
+
];
|
|
69
|
+
holding = false;
|
|
70
|
+
scoredThisShot = false;
|
|
71
|
+
shotAt = api.time();
|
|
72
|
+
api.physics.setVelocity(ball, v);
|
|
73
|
+
api.physics.setAngularVelocity(ball, [-420, 0, 0]); // backspin
|
|
74
|
+
if (phase === "play") api.audio.play("throw");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function reset(next) {
|
|
78
|
+
phase = next;
|
|
79
|
+
score = 0;
|
|
80
|
+
streak = 0;
|
|
81
|
+
timeLeft = cfg.time;
|
|
82
|
+
charge = 0;
|
|
83
|
+
charging = false;
|
|
84
|
+
nextAuto = api.time() + 1.2;
|
|
85
|
+
newSpot();
|
|
86
|
+
hold();
|
|
87
|
+
publish();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function basket() {
|
|
91
|
+
scoredThisShot = true;
|
|
92
|
+
streak += 1;
|
|
93
|
+
const mult = Math.min(3, 1 + Math.floor((streak - 1) / 2));
|
|
94
|
+
if (phase === "play") {
|
|
95
|
+
score += 2 * mult;
|
|
96
|
+
api.audio.play("swish");
|
|
97
|
+
api.ui.toast(mult > 1 ? `+${2 * mult} x${mult}!` : "+2", 0.8);
|
|
98
|
+
} else score += 2;
|
|
99
|
+
confettiUntil = api.time() + 1.6;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function input() {
|
|
103
|
+
const i = api.input;
|
|
104
|
+
let started = false;
|
|
105
|
+
const p = i.pointer;
|
|
106
|
+
if (p.justPressed) { dragFrom = { x: p.x, y: p.y }; started = true; }
|
|
107
|
+
let shot = null;
|
|
108
|
+
if (dragFrom && !p.down) {
|
|
109
|
+
const dx = p.x - dragFrom.x, dy = p.y - dragFrom.y;
|
|
110
|
+
dragFrom = null;
|
|
111
|
+
if (dy > 0.12) shot = { power: Math.max(0, Math.min(1, (dy - 0.12) / 0.9)), side: dx * 2.2 };
|
|
112
|
+
}
|
|
113
|
+
const sw = i.swipe();
|
|
114
|
+
if (!shot && sw === "up") shot = { power: 0.5, side: 0 };
|
|
115
|
+
if (i.isDown("ArrowLeft")) aimX = Math.max(-1, aimX - 0.03);
|
|
116
|
+
if (i.isDown("ArrowRight")) aimX = Math.min(1, aimX + 0.03);
|
|
117
|
+
if (i.pressed("Space")) { charging = true; charge = 0; started = true; }
|
|
118
|
+
if (charging) {
|
|
119
|
+
charge = Math.min(1, charge + 1 / 60 / 1.1);
|
|
120
|
+
if (!i.isDown("Space")) { shot = { power: charge, side: aimX * 1.2 }; charging = false; }
|
|
121
|
+
}
|
|
122
|
+
return { shot, started: started || !!shot || i.pressed("Enter") };
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
start() {
|
|
127
|
+
reset(api.data.startPhase || "attract");
|
|
128
|
+
api.physics.onCollision((a, b, info) => {
|
|
129
|
+
const other = a.id === "ball" ? b : b.id === "ball" ? a : null;
|
|
130
|
+
if (other && info.impulse > 0.6 && phase === "play") api.audio.play("bounce");
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
onEvent(name) {
|
|
134
|
+
if (name === "retry" || name === "start") { reset("play"); api.audio.play("click"); }
|
|
135
|
+
},
|
|
136
|
+
update(dt) {
|
|
137
|
+
if (!ball) return;
|
|
138
|
+
const inp = input();
|
|
139
|
+
if (phase === "attract" && inp.started) { reset("play"); }
|
|
140
|
+
if (phase === "over") {
|
|
141
|
+
if (inp.started && api.time() - endAt > 1) reset("play");
|
|
142
|
+
else if (api.time() - endAt > 7) reset("attract");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (holding) {
|
|
146
|
+
hold();
|
|
147
|
+
if (phase === "play" && inp.shot) shoot(inp.shot.power, inp.shot.side);
|
|
148
|
+
if (phase === "attract" && api.time() > nextAuto) {
|
|
149
|
+
shoot(0.5 + api.randomRange(-0.04, 0.04), api.randomRange(-0.12, 0.12));
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
if (!scoredThisShot && ball.velocity.y < 0 && api.physics.overlaps(ball, "scoreZone")) basket();
|
|
153
|
+
if (api.time() - shotAt > cfg.respawn || ball.position.y < -2) {
|
|
154
|
+
if (!scoredThisShot) streak = 0;
|
|
155
|
+
newSpot();
|
|
156
|
+
hold();
|
|
157
|
+
nextAuto = api.time() + 0.9;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (confetti) confetti.visible = api.time() < confettiUntil;
|
|
161
|
+
if (aim) aim.visible = holding;
|
|
162
|
+
|
|
163
|
+
if (phase === "play") {
|
|
164
|
+
timeLeft -= dt;
|
|
165
|
+
if (timeLeft <= 0) {
|
|
166
|
+
phase = "over";
|
|
167
|
+
endAt = api.time();
|
|
168
|
+
charging = false;
|
|
169
|
+
if (score > best) { best = score; api.storage.set("best", best); api.ui.toast("New best!", 2); }
|
|
170
|
+
api.audio.play("buzzer");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
publish();
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "game-basket",
|
|
3
|
+
"title": "Hoop shot",
|
|
4
|
+
"description": "Playable 45-second basketball shooting game (16:9) on real rigid-body physics: swipe or drag up to shoot (length = power, drift = aim) or hold Space to charge and release, the ball bounces off a trimesh rim and the backboard, swishes count only when falling through the net, a new spot after every shot, x2 / x3 streaks, best score saved, impact sounds, confetti, spotlit night arena, self-playing attract mode.",
|
|
5
|
+
"kind": "game",
|
|
6
|
+
"tags": ["game", "basketball", "sports", "physics", "rigid-body", "throw", "swipe", "drag", "touch", "keyboard", "score", "timer", "arcade", "casual"],
|
|
7
|
+
"aspect": "16:9"
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Coin collector arena
|
|
2
|
+
|
|
3
|
+
A playable 16:9 3D platformer ("Coin Rush"): the Kenney platformer hero (`library:models/characters/platformer-hero.glb`, clips idle / walk / jump) runs and jumps across a floating grass island (a grass cylinder over a dirt band and a rocky cone, flowers on top) and three grass-and-dirt platforms, high above a sea of clouds under a blue gradient sky, to grab 12 coins before the 45 s timer ends. Light physics (dynamic hero, static platforms, trigger coins, gravity), a follow camera, fall → respawn, best time saved with `api.storage`, win / time's-up screens with **Play again**, synth sounds and a self-playing **attract mode** (the hero collects coins on its own until a key or tap).
|
|
4
|
+
|
|
5
|
+
## Controls
|
|
6
|
+
|
|
7
|
+
| | Keyboard | Touch / mouse |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Move | arrows / WASD | hold a finger: the hero walks toward it (relative to the screen centre) |
|
|
10
|
+
| Jump | Space | quick tap, or swipe up |
|
|
11
|
+
| Start / retry | any key | tap, or the **Play again** button |
|
|
12
|
+
|
|
13
|
+
## How it works (`scripts/collector.js`)
|
|
14
|
+
|
|
15
|
+
- The hero's horizontal velocity is set from input each step; jumping sets `velocity.y` when it touches a body tagged `ground` (`api.physics.contacts`).
|
|
16
|
+
- Coins (tag `coin`, trigger bodies) are collected with `api.physics.overlaps`.
|
|
17
|
+
- `api.state`: `phase` (`attract` | `play` | `won` | `over`), `coins`, `total`, `time`, `timeBar` (0..1, the HUD bar), `best`.
|
|
18
|
+
|
|
19
|
+
## What to tweak
|
|
20
|
+
|
|
21
|
+
| Change | Where |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Time limit, run speed, jump strength | `data.collector`: `time`, `speed`, `jump` (gravity: `physics.gravity`) |
|
|
24
|
+
| Level layout | platforms `arena`, `stepA`, `stepB`, `tower` (keep tag `ground` + a static `body`; their colliders have an explicit `size` / `offset` because the dirt children would otherwise enlarge the measured box); coins in `objects#coins` (add / move children, keep tag `coin`) |
|
|
25
|
+
| Hero | `objects#hero.src` — another animated library character; the script plays clips `idle`, `walk`, `jump` (rename them in `play(...)` calls for other models, e.g. robot: `Idle`, `Walking`, `Jump`) |
|
|
26
|
+
| Texts / colours | `ui.elements`, `ui.accent`, `environment.background` |
|
|
27
|
+
|
|
28
|
+
The round island's floor body is a 13.6 × 13.6 square (`objects#arena.body.size`); the script keeps the hero inside a circle of radius `data.collector.radius` (5.9) so the whole visible island is walkable and its edge is a soft wall.
|
|
Binary file
|