voxel.css makes 3D rendering easy

1 min read Original article ↗
var scene = new voxelcss.Scene();
scene.rotate(-Math.PI / 8, Math.PI / 4, 0);
scene.attach(document.body);

var world = new voxelcss.World(scene);
var editor = new voxelcss.Editor(world);
editor.enableAutoSave();

if (editor.isSaved()) {
  editor.load();
} else {
  editor.add(new voxelcss.Voxel(0, 0, 0, 100, {
    mesh: voxelcss.Meshes.grass
  }));
}

View in JSFiddle

CSS means no ray tracing for mouse events

var voxel = new voxelcss.Voxel(0, 0, 0, 100);

voxel.addEventListener('VoxelClick', VoxelWasClicked);

voxel.addEventListener('TopClick', TopWasClicked);
voxel.addEventListener('FrontClick', FrontWasClicked);

View in JSFiddle

CSS means a mesh can support all image types

CSS means GPU acceleration and CSS3 transitions