World Building

Voxel Level

What this shows

Batch a small island, path, pond, and watchtower by voxel material.

This example needs a Canvas2D-capable browser.

Loading scene…

Loading scene…

Key API excerpt

import * as EASEL from "@xsyetopz/easel";

const grass = new EASEL.InstancedMesh(sharedCube, grassMaterial, grassBlocks.length);
grassBlocks.forEach((position, index) => {
  grass.setMatrixAt(index, new EASEL.Matrix4().makeTranslation(...position));
});

world.add(grass);