TrackSurfaceOptions
Defined in: packages/engine/src/render/trackSurface.ts:48
What buildTrackSurface builds from.
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
lift? |
(across, along, point) => number |
undefined |
Metres to raise the surface at a point, straight up: snow, drifts, a hillside. It is handed the point’s track coordinates and the world point before the raise, which it must not change. |
paint? |
(across, along) => ArrayLike<number> |
undefined |
The vertex colour at a point, as linear red, green and blue from 0 to 1. Left out, the surface has no vertex colours. |
section |
TrackSectionPoint[] |
undefined |
The cross-section, left to right. |
spacing? |
number |
0.5 |
Metres between the cross-sections laid along the track. |
terrain? |
TrackTerrain |
undefined |
Land round the surface out to the horizon: sunk under it, leaving its outline at the outline’s height, then climbing into mountains. It draws as the last zone, "terrain", with smooth normals, uvs of world x and z over tile, and white vertex colours when painted. Left out, the surface ends at its rims. |
tile? |
number |
1 |
Metres of surface one repeat of a texture covers: the uvs are metres across and along over this. |
track |
Track |
undefined |
The track the section runs along. |
zones? |
string[] |
[], one group |
The zones, in the order of the geometry’s material groups. A strip goes to the zone its track points weigh more than half, and to the first zone when none does. |