Warning : This library is not updated anymore ! The reason for this is that voxel world management (generation and polygonization) requires workers and thread pools to achieve good performances. Since I don't want to put a dedicated thread pool into the library, I have decided that it was less painful (including for the final developers - you) to write the voxel management system in the application (rather than in a library).
You can find the current up-to-date implementation of the js.voxel functionalities in the Voxplode repository. It uses the SWAT framework to efficiently manage workers.
You can use the up-to-date Voxel.js in the build
folder (here).
Warning : This is a web-only package : it is not meant to be used in a Node environment.
$> git clone git@github.com:arcanis/js.voxel
$> cd js.voxel
$> npm install
$> npm run-script build
Returns a new engine instance.
--
Set a single voxel value.
--
Prepare a model to be used by the engine.
Returns a value called an handle, which identify the model in the engine.
You can find an example for loading models here.
Apply a model on the engine. The parameters depends on the model type.
Allows the engine to release resources used by the model.
--
Process every stored operations. If you never call this method, there won't be any operation applied on the engine.
Cancel every uncommited operations.
You can see examples in the examples
directory (here).
Implementation by Maël Nison.