ProceduralChunks
此内容尚不支持你的语言。
Defined in: sdk/src/residency/chunks.ts:114
The procedural chunks of every layer. Read ProceduralChunks.status for where they stand.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProceduralChunks():
ProceduralChunks
Returns
Section titled “Returns”ProceduralChunks
Properties
Section titled “Properties”suspended
Section titled “suspended”suspended:
boolean=false
Defined in: sdk/src/residency/chunks.ts:119
True while something else is showing this world (the editor’s play realm has its own): no place is wanted, so every chunk is let go.
Accessors
Section titled “Accessors”pending
Section titled “pending”Get Signature
Section titled “Get Signature”get pending():
number
Defined in: sdk/src/residency/chunks.ts:163
How many chunks every layer still wants made.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: sdk/src/residency/chunks.ts:189
Lets go of every chunk of every layer.
Returns
Section titled “Returns”void
has(
id):boolean
Defined in: sdk/src/residency/chunks.ts:136
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
invalidate()
Section titled “invalidate()”invalidate(
id,x0,z0,x1,z1):void
Defined in: sdk/src/residency/chunks.ts:173
Makes the published chunks of layer id that touch the world square [x0, x1] by [z0, z1] again, each keeping its old version
until the new one replaces it: what changed there (a zone, a felled tree) changed only them.
Parameters
Section titled “Parameters”string
number
number
number
number
Returns
Section titled “Returns”void
remove()
Section titled “remove()”remove(
id):void
Defined in: sdk/src/residency/chunks.ts:129
Takes a layer away, releasing every chunk it published and stopping what is being made.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
set<
T>(id,def):void
Defined in: sdk/src/residency/chunks.ts:122
Adds a layer under id, or takes the new definition of one already there (its chunks stay and follow the new generation).
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string
ChunkLayer<T>
Returns
Section titled “Returns”void
stateAt()
Section titled “stateAt()”stateAt(
id,x,z):ChunkState|null
Defined in: sdk/src/residency/chunks.ts:141
Where the chunk of layer id at world (x, z) (x, y on an ‘xy’ layer) stands, or null when it is not wanted, not made, or there is no such layer.
Parameters
Section titled “Parameters”string
number
number
Returns
Section titled “Returns”ChunkState | null
status()
Section titled “status()”status(
id):ChunkLayerStatus|null
Defined in: sdk/src/residency/chunks.ts:150
Layer id’s chunks counted, or null when there is no such layer.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”ChunkLayerStatus | null
step()
Section titled “step()”step(
hasTime):boolean
Defined in: sdk/src/residency/chunks.ts:197
One frame: releases what no source is near, then makes what is wanted, nearest first across every layer: the chunks a source
stands in at once, and the rest while hasTime says so (an async layer’s, all of them).
Parameters
Section titled “Parameters”hasTime
Section titled “hasTime”() => boolean
Returns
Section titled “Returns”boolean