Skip to content

A lightweight 3d voxel map renderer in three.js (build using the lightweight "worldeditor" voxel editor in three.js

Notifications You must be signed in to change notification settings

Quoteme/worlddisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Worlddisplay.js

deprecated -> please use voxel-mesh

Intro

Please read into what "worldeditor" is, on it's own dedicated github project page. This is the standalone optimized worldeditor voxel map viewer, that can be simpily included in a new three.js project.

to include a voxelmap, simply add these lines:

<script src="js/worlddisplay.js" charset="utf-8"></script>

// (... initiate three.js scene)
// (... load a .json file that was saved from worldeditor into a variable)

// create a new chunk (aka, a new object containing a voxel map)
    test = new Chunk();
// set the file to the voxelfile we previously loaded
    test.file = exampleLevel;
// generate a mesh with all the voxels in it (optimized)
    test.render();

and after all this, you should be greeted with a simple voxelmap in three.js :)

demo image

About

A lightweight 3d voxel map renderer in three.js (build using the lightweight "worldeditor" voxel editor in three.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published