Browser Game

Terrain Generator

Seeded fBm noise → smooth triangulated terrain mesh. Chunk-based, DCL-ready.

3dterrainbrowserjavascriptcanvasprocedural
IN DEVELOPMENT
TERRAIN GENERATOR

Proof of concept for the DN Framework 3D terrain generation module.

What it demonstrates

  • TerrainGen3D.buildChunkMesh(cx, cz, config) — builds one terrain chunk as a smooth triangulated THREE.Mesh
  • ChunkManager3D — runtime streaming (load/unload chunks as camera moves)
  • Seeded fBm noise with string or integer seeds — same seed = same world on any device
  • Edge alignment: adjacent chunks sample the same noise at shared boundaries — no seams
  • Height-based biome vertex colors (water → sand → grass → rock → snow)
  • GLB export of any chunk for DCL import

Chunk system

Each chunk is an independent THREE.Mesh covering a square area of the world. Default: 64m × 64m per chunk (4×4 DCL parcels). For a 64×64 parcel world (1024×1024m): 16×16 = 256 chunks total.

Controls

  • Drag — orbit the camera
  • Scroll — zoom in / out
  • Seed input + Generate — type a new seed and rebuild the terrain
  • Wireframe OFF/ON — toggle wireframe to see mesh subdivision
  • Export Center Chunk GLB — export chunk (0,0) as a .glb for Blender or DCL

DCL pipeline

Export chunk GLB → import to Blender (optional Decimate) → place in DCL scene as custom 3D asset. For a full DCL world: generate all chunks with TerrainGen3D.buildWorldSection(), export each, load in DCL by player proximity.