@threedog/terrain-noise
v2.2.2
Published
Optional terrain generator for threedog: noise hills, island, canyon or flat shapes, rivers and a biome rule table (world shape only, no colors)
Readme
@threedog/terrain-noise
Optional terrain generator for threedog: noise hills, island, canyon or flat shapes, rivers and a biome rule table. It decides the shape of the world only; ground colors belong to the game's style (keyed by the biome names). Without it the engine's ground is flat.
npm install @threedog/terrain-noise@1This describes 1.0: npm install @threedog/terrain-noise@1 (games made in the repository already have it).
import { openWorld } from 'threedog';
import { terrainPreset } from '@threedog/terrain-noise';
engine.use(openWorld({ seed: 7, camera: 'follow', terrain: terrainPreset({ shape: 'island' }) }));Also exported: riverAt(x, z, n), BIOMES (the default rule table) and terrainStrings. Types are in index.d.ts. The height and ground-type functions run in terrain workers, so a game's own replacements must be pure (read only their parameters and Math).
Docs ship with the engine: node_modules/threedog/docs/AI.md and docs/recipes/. Peer dependency: threedog. MIT license.
