model
Import, export, and inspect stored spatial data.
2 functions / 4 types
Modules
Index
| Function | Description |
|---|---|
| getInfo | Load the model a handle names and return a summary of its file and geometry. |
| load | Prepare an existing stored model for synchronous scene assignment. |
| Type | Description |
|---|---|
| LeafGeometryKind | The shape of each individual element in a stored model. |
| ModelFileKind | The file format a stored model uses. |
| ModelInfo | High-level, representation-agnostic summary of a model. |
| ModelTypeKind | What kind of thing a stored model holds. |
getInfo
getInfo(args: { model: RemoteHandle }, transactionId?: string): Promise<ModelModelInfo>Load the model a handle names and return a summary of its file and geometry.
Returns: High-level, representation-agnostic summary of a model.
Returns Promise<ModelModelInfo>.
model : RemoteHandle
Handle of the model to interrogate.
transactionId optional : string
load
load(args: { model: RemoteHandle }, transactionId?: string): Promise<RemoteHandle>Prepare an existing stored model for synchronous scene assignment.
Returns: An opaque reference to stored blob data.
Returns Promise<RemoteHandle>.
model : RemoteHandle
The stored model to prepare.
transactionId optional : string
LeafGeometryKind
Enum
The shape of each individual element in a stored model.
Aabb = 0
Axis-aligned box leaves.
Ball = 1
Ball leaves.
Point = 2
Point leaves.
ModelFileKind
Enum
The file format a stored model uses.
LinearBvh = 0
A linear-BVH file: block models, ball clouds, and point clouds.
PopTriMesh = 1
A POP-buffer triangle mesh file.
ModelInfo
High-level, representation-agnostic summary of a model.
aabb optional : MathAabb
Axis-aligned bounding box of the whole model, in model coordinates.
attributes optional : Record<string, ModelCsvHeaderConfig>
Attributes on the model, keyed by attribute name.
elementCount optional : bigint
Linear-BVH only: total number of leaf elements across all partitions.
faceCount optional : bigint
POP-mesh only: total face (triangle) count at full resolution.
fileType : ModelModelFileKind
Underlying file type, as a ModelFileKind i32 kind.
leafGeometry optional : ModelLeafGeometryKind
Linear-BVH only: leaf geometry, as a LeafGeometryKind i32 kind.
lodLevels optional : bigint
POP-mesh only: number of LOD levels stored in the first partition.
modelType : ModelModelTypeKind
Model type, as a ModelTypeKind i32 kind.
partitionCount : bigint
Number of partitions the model is split into.
vertexCount optional : bigint
POP-mesh only: total vertex count at full resolution.
ModelTypeKind
Enum
What kind of thing a stored model holds.
BallCloud = 1
A linear BVH with ball leaves.
BlockModel = 0
A linear BVH with axis-aligned box leaves.
Image = 4
An image with multiple levels of resolution.
PointCloud = 2
A linear BVH with point leaves.
PopTriMesh = 3
A triangle mesh represented as POP buffers.