Terrain Texture
Updated
One texture the terrain can be painted with.
- Type
comp-terrain-texture- Script class
TerrainTextureComponent- Per entity
- Several
- Version
- 1.0.0
Read about it in Terrain: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Paint a terrain with its texturesA ball rolls in circles over a meadow terrain and paints a trail of the terrain's own Terrain Textures under it, switching between the two images each lap: the textures of the runtime Sky & Terrain demo.
Watch the trail of images appear behind the ball, a different image each lap. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(TerrainTextureComponent); if (component) log(component.props);}