WebGL2 voxel foundation

Chunk.js starts with a WebGL2 voxel renderer built for NiceChunk.

This lab is isolated from the current game. It initializes WebGL2 directly, uploads an integer-packed voxel mesh, and keeps the renderer boundary ready for NiceChunk terrain.

Open playable demo
Direct WebGL2 No Three.js dependency in this page.

Engine boundary

The folder separates WebGL2 backend detection, render loop, integer voxel data, greedy meshing, and packed vertex upload.

Next migration target

The next step is TextureArray/atlas terrain materials, chunk streaming, and dirty chunk updates without touching gameplay logic first.

Performance rule

This prototype keeps runtime work small: one integer-packed static mesh, one shader program, one draw call, and no external texture assets.

Engine log