Skip to main content

Interface: CreateTerrainMeshOptions

Defined in: rendering/terrain/create-terrain-mesh.ts:43

Extends

Properties

angle

angle: number

Defined in: rendering/terrain/create-terrain-mesh.ts:69

The world-space rotation of the mesh, in radians. Must match the corresponding RigidBody's angle.


border

border: TerrainMeshLayerOptions

Defined in: rendering/terrain/create-terrain-mesh.ts:72

The texture tiled across the terrain's surface, from the surface down to borderWidth.


borderBlend?

optional borderBlend?: number

Defined in: rendering/terrain/create-terrain-mesh.ts:40

How wide (in world units) the blend between the border and fill layers is, centered on borderWidth.

Inherited from

CreateTerrainMeshDefaultedOptions.borderBlend


borderWidth

borderWidth: number

Defined in: rendering/terrain/create-terrain-mesh.ts:81

How deep (in world units) the border layer extends below the surface before blending into the fill layer.


curvePoints

curvePoints: readonly TerrainCurvePoint[]

Defined in: rendering/terrain/create-terrain-mesh.ts:50

The dense curve points to build the mesh from - see buildTerrainCurve. Pass the same points used to build the corresponding TerrainShape (by mapping each TerrainCurvePoint.position into the Vector2[] TerrainShape expects), so what's drawn always matches what's touched.


depth

depth: number

Defined in: rendering/terrain/create-terrain-mesh.ts:57

How far (in world units) the mesh extends below its lowest curve point. Must match the depth passed to the corresponding TerrainShape for the mesh to align with the collision volume.


fill

fill: TerrainMeshLayerOptions

Defined in: rendering/terrain/create-terrain-mesh.ts:75

The texture tiled across the terrain's interior, below borderWidth.


position

position: Vector2

Defined in: rendering/terrain/create-terrain-mesh.ts:63

The world-space position of the mesh. Must match the corresponding RigidBody's position.