API referenceEngine
snapshot
Import from bear/engine/snapshot.
Interfaces
ModelSnapshot
Defined in: bear/engine/snapshot.ts:47
Type Parameters
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
constraints | readonly | readonly SnapshotValue[] | - |
diagnostics | readonly | readonly SnapshotValue[] | - |
meshes | readonly | Readonly<Record<string, SnapshotMesh>> | - |
nodes | readonly | Readonly<Record<string, SnapshotNode>> | - |
relations | readonly | readonly SnapshotValue[] | - |
revision | readonly | SnapshotData<Revision> | Caller-defined pinned inputs and runtime, copied and frozen at capture. |
version | readonly | 1 | - |
SnapshotMesh
Defined in: bear/engine/snapshot.ts:41
A local mesh, independent of placement and Manifold's runtime original IDs.
Properties
| Property | Modifier | Type |
|---|---|---|
numProp | readonly | number |
triangles | readonly | readonly number[] |
vertices | readonly | readonly number[] |
SnapshotNode
Defined in: bear/engine/snapshot.ts:32
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
facts | readonly | NodeFacts | - |
fingerprints | readonly | Readonly<Record<ModelFacet, string>> | - |
fqn | readonly | string | - |
source | readonly | SnapshotValue | Navigation provenance, excluded from semantic comparison. |
Type Aliases
ModelFacet
type ModelFacet = typeof facets[number];Defined in: bear/engine/snapshot.ts:27
NodeFacts
type NodeFacts = Readonly<Record<ModelFacet, SnapshotValue>> & object;Defined in: bear/engine/snapshot.ts:28
Type Declaration
| Name | Type |
|---|---|
shape | string | null |
Variables
facets
const facets: readonly ["structure", "placement", "shape", "appearance", "data", "references"];Defined in: bear/engine/snapshot.ts:19
Functions
snapshotModel()
function snapshotModel<Revision>(model, revision): Promise<ModelSnapshot<Revision>>;Defined in: bear/engine/snapshot.ts:61
Collect synchronously before hashing, so no live model is read after an await.
Type Parameters
Parameters
| Parameter | Type |
|---|---|
model | ModelView |
revision | Revision |
Returns
Promise<ModelSnapshot<Revision>>