Terrain class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
clamp(Float32List g, TerrainOptions options)
→ void
-
Rescale the heightmap of a terrain to keep it within the maximum range.
-
create(TerrainOptions? options)
→ Object3D
-
A terrain object for use with the js library.
-
edges(Float32List g, TerrainOptions options, [bool direction = false, double? distance, Easing? easing, TerrainEdges? edges])
→ dynamic
-
Move the edges of the terrain up or down based on distance from the edge.
-
fromArray1D(Float32List vertices, List<double> src)
→ void
-
Set the height of plane vertices from a 1D array of heightmap values.
-
fromArray2D(Float32List vertices, List<List<double>> src)
→ void
-
Set the height of plane vertices from a 2D array of heightmap values.
-
fromHeightmap(Float32List g, TerrainOptions options)
→ void
-
Convert an image-based heightmap into vertex-based height data.
-
fromString(String type)
→ void Function(Float32List, TerrainOptions)?
-
-
generateBlendedMaterial(List<TerrainTextures> textures, [Material? material])
→ Material
-
Generate a material that blends together textures based on vertex height.
-
heightmapArray(void method(Float32List, TerrainOptions), TerrainOptions options)
→ Float32List
-
Generate a 1D array containing random heightmap data.
-
influence(Float32List g, TerrainOptions options, [double f(double, [double?, double?])?, double? x, double? y, double? r, double? h, int? t, Easing? e])
→ void
-
Place a geographic feature on the terrain.
-
normalize(Object3D mesh, TerrainOptions options)
→ void
-
Normalize the terrain after applying a heightmap or filter.
-
radialEdges(Float32List g, TerrainOptions options, dynamic direction, dynamic distance, Easing easing)
→ void
-
Move the edges of the terrain up or down based on distance from the center.
-
scatterHelper(void method(Float32List, TerrainOptions), TerrainOptions options, [int? skip, double? threshold])
→ Float32List Function()
-
Generate a function that returns a heightmap to pass to ScatterMeshes.
-
scatterMeshes(BufferGeometry geometry, ScatterOptions options)
→ Object3D
-
Scatter a mesh across the terrain.
-
smooth(Float32List g, TerrainOptions options, [double weight = 0])
→ void
-
Smooth the terrain by setting each point to the mean of its neighborhood.
-
smoothConservative(Float32List g, TerrainOptions options, [double? multiplier])
→ void
-
Smooth the terrain by clamping each point within its neighbors' extremes.
-
smoothMedian(Float32List g, TerrainOptions options)
→ void
-
Smooth the terrain by setting each point to the median of its neighborhood.
-
step(Float32List g, int? levels)
→ void
-
Partition a terrain into flat steps.
-
toArray1D(Float32List vertices)
→ Float32List
-
Get a 1D array of heightmap values from a 1D array of plane vertices.
-
toArray2D(Float32List vertices, TerrainOptions options)
→ List<Float32List>
-
Get a 2D array of heightmap values from a 1D array of Z-positions.
-
toHeightmap(Float32List g, TerrainOptions options)
→ Uint8List
-
Convert a terrain plane into an image-based heightmap.
-
turbulence(Float32List g, TerrainOptions options)
→ void
-
Transform to turbulent noise.