API reference / @jsprismarine/native-worldgen / NativeWorldgen / NativeSurface
Class: NativeSurface
Defined in: NativeWorldgen.ts:764
A surface pass program in native memory, made by NativeWorldgen.createSurface.
Properties
programs
readonlyprograms: readonlyNativeDensityProgram[]
Defined in: NativeWorldgen.ts:768
The density programs its veins run, held so they live as long as it does.
Methods
chunk()
chunk(
frame,columns,blocks,biomes,verdicts,out,fallbacks):number
Defined in: NativeWorldgen.ts:792
Runs the surface pass over one chunk; jwg_surface_chunk in the C header lays out each buffer.
Parameters
frame
Int32Array
columns
Float64Array
blocks
Uint8Array
biomes
Int32Array
verdicts
Uint8Array
out
Int32Array
fallbacks
Int32Array
Returns
number
How many fallback entries it wrote.
Throws
After destroy.
destroy()
destroy():
void
Defined in: NativeWorldgen.ts:806
Frees the program's native memory. Later calls throw. Its density programs stay alive.
Returns
void