An experimental voxel game engine.
For content examples see the hello-world app or testbed app.
Main engine object.
Emits: tick, beforeRender, afterRender
var noaEngine = require('noa-engine')
var noa = noaEngine(opts)
-
playerEntity - Entity id for the player entity
-
cameraTarget - entity to track camera target position
-
setPaused(paused) - Pausing the engine will also stop render/tick events, etc.
-
getBlock(x,y,z)
-
setBlock(x,y,z)
-
addBlock(id,x,y,z)
-
getTargetBlock()
-
getTargetBlockAdjacent()
-
getPlayerPosition()
-
getPlayerMesh()
-
getPlayerEyePosition()
-
getCameraVector()
Module for managing the world, and its chunks
-
getBlockID(x,y,z)
-
getBlockSolidity(x,y,z)
-
getBlockOpacity(x,y,z)
-
getBlockTransparency(x,y,z)
-
getBlockFluidity(x,y,z)
-
getBlockProperties(x,y,z)
-
setBlockID(x,y,z)
-
setChunkData(id, array) - client should call this after creating a chunk's worth of data (as an ndarray)