Skip to content

Terrain

Updated

Procedural terrain from one displaced grid, paintable with textures.

Type
comp-terrain
Script class
TerrainComponent
Per entity
One
Version
1.2.0

Read about it in Terrain: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
heightScale -10 ≤ x ≤ 10
seed
size 0.001 ≤ x ≤ 10000

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(TerrainComponent);
if (component) log(component.props);
}