createGroundSurface
createGroundSurface(
values?,terrain?):Readonly<{cell:number;depth:number;isGroundAt: (groundPosition) =>boolean;isUnderWaterAt: (position) =>boolean;kind:Heightfield;map:HeightfieldMap;readHeightAt: (position) =>number;readNormalAt: (position,target) =>Vector3;sea:number;seed:number;segments:number;size:number;terrain:Pick<{base:Readonly<{hills:Readonly<{amplitude:number;detail:number;wavelength:number; }>;paths:Readonly<Record<string,Readonly<{fade: …;halfWidth: …;points: …;surface?: …; }>>>;regions:Readonly<Record<string,Readonly<{center: …;fade: …;hills: …;material?: …;radius: …;scatter: …; }>>>;rim:number;seed:number; }>;blend?:string[];cell:number;erased?:Partial<Record<ScatterFamily, [number,number][]>>;height?:string[];materials?:string[];overlay?:string[];paint?:string[];scatter?:Partial<Record<ScatterFamily,string[]>>;size:number; },"height"|"size"|"materials"|"overlay"|"blend"|"scatter"|"cell"|"paint"|"erased"> |undefined;version:number;width:number; getbaseHeights():Float64Array<ArrayBuffer>; getoffsets():Float64Array;findWaterAt:GroundWater|null;getPathDistanceAt:number;getPathSurfaceAt: {surface:NonNullable<"dirt"|"sand"|"stone"|undefined>;weight:number; } |undefined;getRegionWeightsAt:number[];getShoreDistanceAt:number;readPointAt:Vector3;readSlopeAt:number; }>
The map’s ground: its base baked from the hills, the regions, the
paths and the rim, then its terrain’s offsets added over it: the map’s
own terrain block, or terrain where given, as the editor’s newest
write is. Terrain written for another grid is refused.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
values |
HeightfieldMap |
terrainMap |
terrain? |
Pick<{ base: Readonly<{ hills: Readonly<{ amplitude: number; detail: number; wavelength: number; }>; paths: Readonly<Record<string, Readonly<{ fade: number; halfWidth: number; points: readonly readonly […, …][]; surface?: "dirt" | "sand" | "stone"; }>>>; regions: Readonly<Record<string, Readonly<{ center: readonly [number, number]; fade: number; hills: Readonly<{ amplitude: …; detail: …; wavelength: …; }>; material?: string; radius: number; scatter: Readonly<{ bushRound: …; clearing: …; grassTuft: …; rockBoulder: …; rockFlat: …; seedOffset: …; treeRound: …; treeTall: …; }>; }>>>; rim: number; seed: number; }>; blend?: string[]; cell: number; erased?: Partial<Record<ScatterFamily, [number, number][]>>; height?: string[]; materials?: string[]; overlay?: string[]; paint?: string[]; scatter?: Partial<Record<ScatterFamily, string[]>>; size: number; }, "height" | "size" | "materials" | "overlay" | "blend" | "scatter" | "cell" | "paint" | "erased"> |
undefined |
Returns
Section titled “Returns”Readonly<{ cell: number; depth: number; isGroundAt: (groundPosition) => boolean; isUnderWaterAt: (position) => boolean; kind: Heightfield; map: HeightfieldMap; readHeightAt: (position) => number; readNormalAt: (position, target) => Vector3; sea: number; seed: number; segments: number; size: number; terrain: Pick<{ base: Readonly<{ hills: Readonly<{ amplitude: number; detail: number; wavelength: number; }>; paths: Readonly<Record<string, Readonly<{ fade: …; halfWidth: …; points: …; surface?: …; }>>>; regions: Readonly<Record<string, Readonly<{ center: …; fade: …; hills: …; material?: …; radius: …; scatter: …; }>>>; rim: number; seed: number; }>; blend?: string[]; cell: number; erased?: Partial<Record<ScatterFamily, [number, number][]>>; height?: string[]; materials?: string[]; overlay?: string[]; paint?: string[]; scatter?: Partial<Record<ScatterFamily, string[]>>; size: number; }, "height" | "size" | "materials" | "overlay" | "blend" | "scatter" | "cell" | "paint" | "erased"> | undefined; version: number; width: number; get baseHeights(): Float64Array<ArrayBuffer>; get offsets(): Float64Array; findWaterAt: GroundWater | null; getPathDistanceAt: number; getPathSurfaceAt: { surface: NonNullable<"dirt" | "sand" | "stone" | undefined>; weight: number; } | undefined; getRegionWeightsAt: number[]; getShoreDistanceAt: number; readPointAt: Vector3; readSlopeAt: number; }>