Constructor
new HeightmapGeometry(webglContext, heightmapImageData, optionsopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
webglContext |
WebGL2RenderingContext | WebGL2 rendering context. | ||
heightmapImageData |
ImageData | HeightmapSource | Heightmap image data (grayscale) or a wrapped source. | ||
options |
HeightmapGeometryOptions |
<optional> |
{} | Geometry options. |
- Source:
Classes
Members
isWireframe
Returns the wireframe hint value from construction options.
- Source:
(static) Sampling
Heightmap sampling modes.
- Source:
Methods
(protected, static) createGeometryData(heightmapImageData, options) → {HeightmapGeometryData}
Creates full geometry data for a heightmap terrain.
Parameters:
| Name | Type | Description |
|---|---|---|
heightmapImageData |
ImageData | Heightmap source image data. |
options |
Required.<HeightmapGeometryOptions> | Normalized options. |
- Source:
Returns:
- Geometry buffers.
(async, static) loadFromUrl(webglContext, url, optionsopt) → {Promise.<HeightmapGeometry>}
Loads heightmap image data from a URL and returns a new `HeightmapGeometry`.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
webglContext |
WebGL2RenderingContext | WebGL2 rendering context. | ||
url |
string | Image URL (relative or absolute). | ||
options |
HeightmapGeometryOptions |
<optional> |
{} | Geometry options. |
- Source:
Returns:
- Promise, that resolves with created geometry.
- Type
- Promise.<HeightmapGeometry>