Creates a map covering size × size metres around center, filled with coverage and height.
ReadonlydataRaw RGBA bytes, row-major, row 0 at minZ. Set texture.needsUpdate = true after editing directly.
ReadonlyminWorld X of the square's west edge.
ReadonlyminWorld Z of the square's north (−Z) edge.
ReadonlyresolutionTexels per side.
ReadonlysizeEdge length of the mapped square in metres.
ReadonlytextureGPU texture sampled by the grass (and by grass.mapNode()).
Frees the GPU texture.
Sets the whole map to one coverage (0..1) and height multiplier (0..2). fill(0) clears all grass.
Replaces the map's contents with an image (scaled to resolution). See GrassMap.fromImage.
Applies a soft round brush at world (x, z).
false if the brush is entirely outside the map.
Raw map as a canvas (R = coverage, G = height); round-trips through GrassMap.fromImage.
PNG data URL of the map, e.g. to save a painted layout.
StaticfromCreates a map from an image (red = coverage, green = height, mid-grey = 1x), read as a top-down view with its top edge towards −Z. Round-trips with GrassMap.toDataURL.
A world-space control texture covering a square of terrain: where grass grows and how tall. Channels: R = coverage (0 none … 1 full), G = height (0.5 = 1x … 1 = 2x). Outside its square, grass grows normally. Edits (paint/fill/load) show up immediately.
Example