Function CreateGroundFromHeightMapVertexData
-
CreateGroundFromHeightMapVertexData(
options: {
alphaFilter: number;
buffer: Uint8Array;
bufferHeight: number;
bufferWidth: number;
colorFilter: Color3;
height: number;
heightBuffer?: Float32Array<ArrayBufferLike>;
maxHeight: number;
minHeight: number;
subdivisions: number;
width: number;
},
): VertexDataParameters
- options: {
alphaFilter: number;
buffer: Uint8Array;
bufferHeight: number;
bufferWidth: number;
colorFilter: Color3;
height: number;
heightBuffer?: Float32Array<ArrayBufferLike>;
maxHeight: number;
minHeight: number;
subdivisions: number;
width: number;
}an object used to set the following parameters for the Ground, required and provided by CreateGroundFromHeightMap
widththe width (x direction) of the groundheightthe height (z direction) of the groundsubdivisionsthe number of subdivisions per sideminHeightthe minimum altitude on the ground, optional, default 0maxHeightthe maximum altitude on the ground, optional default 1colorFilterthe filter to apply to the image pixel colors to compute the height, optional Color3, default (0.3, 0.59, 0.11)bufferthe array holding the image color databufferWidththe width of imagebufferHeightthe height of imagealphaFilterRemove any data where the alpha channel is below this value, defaults 0 (all data visible)heightBuffera array of floats where the height data can be saved, if its length is greater than zero.
Returns VertexData
the VertexData of the Ground designed from a heightmap
- options: {
Creates the VertexData of the Ground designed from a heightmap