An experimental voxel engine.
Under active development, best way to try it is to clone and hack on it:
(clone this repo)
cd noa
npm install
npm start # runs /docs/hello-world
npm test # runs /docs/test
Live versions of the test content:
To build a new world app, use noa
as a dependency:
npm install --save noa-engine
var engine = require('noa-engine')
var noa = engine({
inverseY: true,
// see source or /docs/ examples for more options and usage
})
This library attempts to be something you can build a voxel game on top of. It's not a fully-featured game engine; it just tries to manage the painful parts of using voxels (e.g. chunking, meshing), and certain things that are tightly coupled to voxel implementation (e.g. physics), and otherwise stay out of your way.
Contributions are welcome! But please open an issue before building any nontrivial new features. I want to keep this library lean if I can, so if your idea could be done as a separate module then that's probably what I'll suggest.
The source is pretty fully commented. There is a partial API reference at the end of this file, but I haven't been able to find a good way of generating JSDocs that I can live with, so for now it's best to consult the source.
- 0.22.0
- Large/complicated scenes should mesh and render much faster
- Chunk terrain/object meshing now merges results. Block object meshes must be static!
- Removed redundant
player
component - usenoa.playerEntity
property - Added
showFPS
option - Many internal changes that hopefully don't break compatibility
- 0.21.0
- Support unloading/reloading new world data.
Sample implementation in thedocs/test
app (hit "O" to swap world data)
- Support unloading/reloading new world data.
- 0.20.0
- Near chunks get loaded and distant ones get unloaded faster and more sensibly
- Greatly speeds up chunk init, meshing, and disposal (and fixes some new Chrome deopts)
- 0.19.0
- Revise per-block callbacks:
onLoad
when a block is created as part of a newly-loaded chunkonUnload
- when the block goes away because its chunk was unloadedonSet
- when a block gets set to that particular idonUnset
- when a block that had that id gets set to something elseonCustomMeshCreate
- when that block's custom mesh is instantiated (either due to load or set)
- Revise per-block callbacks:
- 0.18.0
- Simplifies block targeting. Instead of several accessor methods, now there's a persistent
noa.targetedBlock
with details on whatever block is currently targeted. noa
now emitstargetBlockChanged
- Built-in block highlighting can now be overridden or turned off with option
skipDefaultHighlighting
- Simplifies block targeting. Instead of several accessor methods, now there's a persistent
- 0.17.0
- Adds per-block callbacks:
onCreate
,onDestroy
,onCustomMeshCreate
- Adds per-block callbacks:
- 0.16.0
- Simplifies block registration - now takes an options argument, and the same API is used for custom mesh blocks
- Removes the idea of registration for meshes
(docs currently broken by some weird npm+markdox issue..)