@pumpkin-plugins/terrain API / capture / TerrainCapture
Class: TerrainCapture
Defined in: capture.ts:65
Builds bounded column data incrementally from a host-provided terrain source.
Constructors
Constructor
new TerrainCapture(
region,options?):TerrainCapture
Defined in: capture.ts:84
Initializes an empty capture that starts at the highest Y of the first column.
Parameters
region
Absolute block origin and dimensions to capture.
options?
Optional empty-material predicate and retained segment limit.
Returns
TerrainCapture
Throws
If the region or segment limit is invalid.
Methods
progress()
progress():
number
Defined in: capture.ts:177
Returns the fraction of the region covered, including any collapsed spans.
Returns
number
result()
result():
TerrainCaptureResult
Defined in: capture.ts:183
Returns the captured material table and columns after sampling has finished.
Returns
samples()
samples():
number
Defined in: capture.ts:172
Returns how many blocks all steps have sampled so far, for budgets that track work per sample.
Returns
number
step()
step(
source,budget):boolean
Defined in: capture.ts:116
Samples at most the requested number of blocks and reports when the region is complete.
Parameters
source
budget
number
Returns
boolean