Game FrameWork for JavaScript 3D WebGL Games
npm install make3dmake3d is a lightweight framework for building 3D WebGL games in JavaScript, built on top of Three.js.
It focuses on providing game-oriented primitives (levels, players, NPCs, physics helpers, input, rendering utilities), while leaving scene hierarchy and lifecycle management to Three.js itself.
- efficient, mobile-friendly rendering (Three.js)
- ready-to-use game abstractions (Level, Player, NPC)
- simple physics integration (powered by check2d)
- input, camera, rendering, and debug utilities included
- minimal structure, low abstraction overhead
---
š https://nenjack.github.io/make3d/demo/?fps
---
``ts
import { Level, Player, NPC } from 'make3d'
Level.create().then(async (level) => {
await Player.create(level)
Array.from({ length: 50 }, () => new NPC({ level, ...Player.DEFAULT_PROPS }))
})
`
---
make3d relies on Three.js for scene hierarchy and object lifecycle, instead of introducing a separate entity system.
- Scene graph and transforms are managed by Three.js
- Game logic is built around Level, Player, and NPC
- Utilities are exposed as composable modules, not enforced patterns
---
make3d exposes a focused set of modules, grouped by responsibility:
- BaseLevel ā base class for custom levels
- Level ā main game level ready to use
- Renderer ā Three.js renderer wrapper
- Camera ā camera helper
- BoxMesh ā basic 2.5D mesh
- Sprite ā sprite helper
- Skybox ā skybox
- Ocean ā ocean / water surface
- Billboard ā camera-facing objects
- Player ā player entity
- NPC ā non-player character
- physics ā shared physics instance (powered by check2d)
- DynamicBody ā movable physics body
- StaticBody ā static physics body
- AbstractBody ā base physics body
- mouse ā shared mouse instance
- Mouse ā mouse input handler
- state ā shared state container
- Events ā event bus
- Loader ā asset loader
- TextureUtils ā texture helpers
- getQueryParams ā get query params from current url
- Debug ā debug helpers
- DeviceDetector ā device detection
---
- API & architecture
https://nenjack.github.io/make3d/hierarchy.html
---
`bash``
yarn add make3d
---
MIT