OptionalmapExisting map to render. Omit to create a blank one from width/height.
OptionalwidthBlank-map dimensions when map is omitted. Default 100×100.
OptionalheightOptionalfeatureFeature layers for the blank map. Default 0.
OptionalorientationPOINTY_TOP (default) or FLAT_TOP.
OptionalhexHex radius in world units. Default 1.
OptionalterrainCustom terrain set. Default DEFAULT_TERRAIN_DESCRIPTORS.
OptionalterrainAsset registry for image-textured terrain.
OptionalterrainExtra options for the terrain shader material (light dir/colors, texScale).
OptionalliquidLiquid types to render. Default DEFAULT_LIQUID_DESCRIPTORS.
OptionalliquidPer-liquid material sets. Default: resolved from each liquid descriptor.
OptionalscatterOptionalscatterSeed for deterministic scatter placement. Default 1234.
OptionalfogOptionalflowWiden river channels with accumulated flow. Default true.
OptionalchunkCells per chunk side. Default 32.
OptionalloadChunk streaming radius. Default 5.
OptionalgeometryOptionalwaterOptionalchunkBuild streamed-in chunk geometry on a Web Worker instead of the main
thread, eliminating streaming hitches on big maps. true uses the
library's bundled worker (createDefaultChunkWorker); pass a factory to
supply your own. Default false (synchronous builds).
OptionalcameraOptionalbackgroundScene background color, or null to leave the scene transparent. Default 0x1a1a2e.
OptionallightsAdd the default ambient + directional lights. Default true.
OptionalshadowsSun shadows: true for the tuned defaults, or a SunShadowOptions object.
Enables the renderer's shadow maps and replaces the default directional
light with a SunShadowRig whose ortho frustum re-fits the camera view each
frame (chunk streaming keeps working — the frustum follows the camera, not
the loaded set). With lights: false the shadow maps are still enabled so
a hand-wired rig works, but no rig is created. Default false.
OptionaldayAnimated day/night cycle: true for defaults (120 s days), or a
DayNightOptions object. Drives the sun/shadow rig direction, warm
dawn/dusk light tinting, a cool moonlight mode, the scene background,
and liquid darkening (lava's emissive glow survives the night). Also
creatable later via HexWorld.setTimeOfDay. Default off.
OptionalskyGradient sky dome + matching distance haze: true for the tuned defaults,
or a SkyDomeOptions object. The dome takes its colors from the day/night
cycle and greys over under rain/snow, while terrain, roads, and every
liquid layer dissolve into its horizon color, so the map edge fades into
atmosphere instead of ending against the background. groundTint defaults
to the average color of the terrain palette (re-derived on terrain swaps).
Scatter materials get the same haze via attachAtmosphere; hand your
own unit/prop materials to it as well. Also creatable later via
HexWorld.setSky. Default off.
OptionalgodCrepuscular rays fanning out from the sun past ridgelines and trees:
true for the tuned defaults, or a GodRaysOptions object. Drawn as
one extra low-resolution pass after the frame, so the renderer's
antialiasing is untouched, and skipped entirely whenever the sun is down,
behind the camera, or buried under cloud. Best paired with sky (the dome
supplies the disc the shafts start at and the overcast that puts them
out). Also creatable later via HexWorld.setGodRays. Default off.
OptionalskirtClose the map's open edges with a wall of cut earth: true for the tuned
defaults, or a MapSkirtMeshOptions object. The terrain is a
surface rather than a solid, so any camera low enough to see the horizon
also sees under it — the skirt gives the map a bottom and four sides,
banded with soil strata like a block cut out of the ground.
Its top follows the terrain's own contour (including where that contour is
a sea bed), and it takes the world's geometryOptions automatically so the
seam stays tight. Also creatable later via HexWorld.setSkirt.
Default off.
OptionalseasonsSeasons, snow accumulation, and freezing water: true for the tuned
defaults, or a HexWorldSeasonOptions object. Builds a
ClimateData for the map (or takes one you already generated),
advances a SeasonCycle alongside the day clock, and drives snow on
the terrain and scatter plus ice on every liquid whose descriptor sets a
freezePoint. Precipitation follows too — snow falls where snow lies, rain
everywhere else. Also creatable later via HexWorld.setSeasons.
Default off.
OptionalwindThe shared world wind: true for the tuned defaults, or a
WindOptions object. One vector, gusting on its own clock, that
drifts the cloud deck, slants the rain, marches the ripples across open
water, and bends every plant whose material carries
attachWindSway — which is the call that decides which scatter
answers it, since a boulder should not. Also switchable later via
HexWorld.setWind. Default off.
OptionalautoStart the render loop immediately. Default true.
OptionalclickHow far the pointer may travel between press and release and still count as
a cellClick, in CSS pixels. This is what keeps a right-drag pan from
firing a click when the button comes up. Default 5.
Element the renderer canvas is appended to; sized to fit it.