Constructor
new ChunkManager(optionsopt)
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | Properties
|
- Source
Classes
Methods
recordChange()
Record a persistent change to a chunk (e.g. chest opened, wall destroyed). Changes survive chunk unload and reload.
- Source
(async) updatePosition(worldX, worldY, sceneopt) → {Promise.<{loaded: Array.<string>, unloaded: Array.<string>}>}
Update center position (e.g. player location) and stream chunks.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
worldX | number | |||
worldY | number | |||
scene | object | <optional> | null | Parent scene to attach loaded chunk entities |
- Source
Returns:
- Type:
- Promise.<{loaded: Array.<string>, unloaded: Array.<string>}>