project
Project lifecycle, versioned objects, and transactions.
7 functions / 5 types
Modules
Index
| Function | Description |
|---|---|
| enterVersionedMode | Enter versioned mode with empty versioned state. Fails if already in versioned mode. |
| exitVersionedMode | Exit versioned mode and return to a scene the engine manages directly. Fails if not already in versioned mode. |
| redo | Redo the most recently undone change. Fails when not in versioned mode. |
| reenterVersionedMode | Clear the versioned state and all existing objects. Fails if not already in versioned mode. |
| setTimestamp | Execute the setTimestamp statement. |
| undo | Undo the most recent change. Also discards any changes still in progress that have not yet taken effect. Fails when not in versioned mode. |
| waitForSceneSync | Wait until the scene has caught up with everything committed so far. |
| Type | Description |
|---|---|
| LocalPath | A path on the machine running the engine, carried as UTF-8 text. |
| LocalProjectList | Every local project found in a directory, as returned by GetLocalProjectList. |
| LocalProjectMeta | What a .spatial file records about the project it holds. |
| RemoteProjectList | Every remote project visible to the signed-in user, as returned by GetRemoteProjectList. |
| RemoteProjectMeta | What the server records about one project it hosts. |
enterVersionedMode
enterVersionedMode(transactionId?: string): Promise<void>Enter versioned mode with empty versioned state. Fails if already in versioned mode.
Awaiting this task waits until the scene is quiescent.
Returns Promise<void>.
transactionId optional : string
exitVersionedMode
exitVersionedMode(transactionId?: string): Promise<void>Exit versioned mode and return to a scene the engine manages directly. Fails if not already in versioned mode.
Awaiting this task waits until the scene is quiescent (queued despawns applied, autosync idle). Drop the handle to fire and forget.
Returns Promise<void>.
transactionId optional : string
redo
redo(transactionId?: string): Promise<void>Redo the most recently undone change. Fails when not in versioned mode.
Returns Promise<void>.
transactionId optional : string
reenterVersionedMode
reenterVersionedMode(transactionId?: string): Promise<void>Clear the versioned state and all existing objects. Fails if not already in versioned mode.
Awaiting this task waits until the scene is quiescent.
Returns Promise<void>.
transactionId optional : string
setTimestamp
setTimestamp(args: { timestampNanos: bigint }, transactionId?: string): Promise<void>Execute the setTimestamp statement.
Returns Promise<void>.
timestampNanos : bigint
Timestamp to show in the active project, as Unix nanoseconds.
transactionId optional : string
undo
undo(transactionId?: string): Promise<void>Undo the most recent change. Also discards any changes still in progress that have not yet taken effect. Fails when not in versioned mode.
Returns Promise<void>.
transactionId optional : string
waitForSceneSync
waitForSceneSync(transactionId?: string): Promise<void>Wait until the scene has caught up with everything committed so far.
After an Operation commits, the scene finishes updating asynchronously. Submit this Task before reading scene state an Operation should have produced. Other in-flight scene work (from concurrent Operations, undo/redo, or project loading) delays the return.
Returns Promise<void>.
transactionId optional : string
LocalPath
A path on the machine running the engine, carried as UTF-8 text.
A host path that is not valid UTF-8 loses the offending bytes on the way out, and does not come back as the path it started as.
path : string
LocalProjectList
Every local project found in a directory, as returned by
GetLocalProjectList.
projects optional : Array<ProjectLocalProjectMeta>
The projects, in directory-traversal order.
LocalProjectMeta
What a .spatial file records about the project it holds.
author : string
Who the project is attributed to.
createdDate optional : DatetimeTimestamp
When the project was first created.
dir optional : ProjectLocalPath
Directory holding the project’s .spatial file.
modifiedDate optional : DatetimeTimestamp
When the project was last written.
name : string
Human-facing project name.
pointCount optional : bigint
Total points across the project’s models, when known.
uuid : string
The project’s identifier as a hyphenated UUID string.
RemoteProjectList
Every remote project visible to the signed-in user, as returned by
GetRemoteProjectList.
projects optional : Array<ProjectRemoteProjectMeta>
The projects, in the order the server listed them.
RemoteProjectMeta
What the server records about one project it hosts.
author optional : string
Who the project is attributed to, when the server reports it.
createdAt optional : DatetimeTimestamp
When the project was created.
dtUuid : string
The project’s digital-twin identifier as a hyphenated UUID string.
pointCount optional : bigint
Total points across the project’s models, when known.
projectName : string
Human-facing project name.
public : boolean
Whether the project is publicly visible.
totalAabb optional : MathAabb
Bounding box covering every model in the project, when known.
updatedAt optional : DatetimeTimestamp
When the project was last updated.