Loading...
Loading...
Replace primitive 3D shapes with real GLB models — animated characters, world props, buildings, and scenery for Three.js games
npx skill4agent add opusgamelabs/game-creator add-3d-assets$ARGUMENTSpackage.json/add-assetssrc/core/Constants.jssrc/gameplay/*.jssrc/entities/*.jsBoxGeometrySphereGeometrysrc/level/LevelBuilder.js3d-character-library/| Entity | Character | Reason |
|---|---|---|
| Player | Soldier | Military/action theme |
| Enemy | RobotExpressive | Sci-fi theme, 13 animations |
3d-character-library/manifest.json| Entity | Search Query | Source | Notes |
|---|---|---|---|
| Tree | "low poly tree" | Sketchfab | Environment |
| House | "medieval house" | Poly Haven | Background |
| Barrel | "barrel" | Poly Haven | Obstacle |
| Coin | "gold coin" | Sketchfab | Collectible |
# Find the plugin root (where 3d-character-library/ lives)
cp <plugin-root>/3d-character-library/models/Soldier.glb public/assets/models/# Use --list-only first to review results
node <plugin-root>/scripts/find-3d-asset.mjs --query "barrel" --source polyhaven --list-only
# Download the best match
node <plugin-root>/scripts/find-3d-asset.mjs --query "barrel" --source polyhaven \
--output public/assets/models/ --slug barrel
# Poly Haven = no auth, CC0 (best for props)
# Sketchfab = search free, download needs SKETCHFAB_TOKENsrc/level/AssetLoader.jsSkeletonUtils.clone()three/addons/utils/SkeletonUtils.js.clone()CHARACTERpathscalefacingOffsetclipMapASSET_PATHSMODEL_CONFIGPlayer.jsTHREE.GrouploadAnimatedModel()AnimationMixerfadeToAction()applyAxisAngle(_up, cameraAzimuth)atan2(v.x, v.z) + CHARACTER.facingOffsetmodel.quaternion.rotateTowards(targetQuat, turnSpeed * delta)Game.jsOrbitControlsorbitControls.targetcamera.positionorbitControls.getAzimuthalAngle()loadModel().catch()THREE.GridHelperpreloadAll()npm run devMODEL_CONFIGnpm run buildATTRIBUTION.md.meta.jsonYour 3D game now has animated characters and real models! The player walks, runs, and idles with smooth animation crossfading. World objects are loaded from GLB files.Files created:
— model loader with SkeletonUtilssrc/level/AssetLoader.js — character and world GLB modelspublic/assets/models/- OrbitControls third-person camera
Controls: WASD to move, Shift to run, mouse drag to orbit camera, scroll to zoom. Run the game to see everything in action. Adjustin Constants.js to fine-tune scale and orientation.MODEL_CONFIG