voxolith

EncodeSource

A model to encode, as it travels to the worker: ModelSource without the sparse brick map, whose bricks come ahead of it in chunk messages (a map of hundreds of thousands of small arrays is slow to structured-clone; packed chunks transfer).

Defined in: engine/src/worker/scene.ts:45

Properties

PropertyTypeDescriptionDefined in
data?Uint8Array<ArrayBufferLike>Dense role values (ModelSource.data).engine/src/worker/scene.ts:49
joints?readonly object[]ModelSource.joints.engine/src/worker/scene.ts:55
partBoxes?Int32Array<ArrayBufferLike>ModelSource.partBoxes.engine/src/worker/scene.ts:57
parts?Uint8Array<ArrayBufferLike>ModelSource.parts.engine/src/worker/scene.ts:53
sizeobjectExtent in voxels.engine/src/worker/scene.ts:47
size.xnumber-engine/src/worker/scene.ts:47
size.ynumber-engine/src/worker/scene.ts:47
size.znumber-engine/src/worker/scene.ts:47
sparse?booleanThe model is sparse: its bricks arrived in chunk messages with the same id.engine/src/worker/scene.ts:51

On this page