project.object
Create and edit versioned project objects and their components.
7 functions / 42 types
Modules
| Module |
|---|
project.object.blockModel |
project.object.mesh |
project.object.name |
project.object.pointCloud |
project.object.polyline |
project.object.shape |
project.object.transform |
project.object.visibility |
Index
| Function | Description |
|---|---|
| despawn | Despawn a project object and all its descendants. |
| fromScene | Finds the project node associated with a scene node. |
| getChildren | Get the children of a given ProjectNodeSchema |
| getParent | Get the parent of a given scene object if it exists |
| setParent | Set the parent of a given ProjectNodeSchema |
| spawn | Spawn a new blank project object |
| toScene | Finds the current scene node associated with a project node. |
| Type | Description |
|---|---|
| ProjectArrow | A 3D Arrow. |
| ProjectAttributeBasedAppearance | Colours a model by one of its attributes, through a named colour ramp. |
| ProjectAttributeRange | Numeric range an attribute-driven color ramp is stretched across. |
| ProjectBlockModel | A point cloud representation. |
| ProjectBlockModelAppearance | How a point cloud is drawn. |
| ProjectBlockModelAttributeRamp | Point cloud colored by a named attribute through a color ramp. |
| ProjectBlockModelColor | Point cloud drawn in one flat color. |
| ProjectBlockModelGradient | Point cloud colored by a ramp along a world-space axis. |
| ProjectBlockModelMatCap | Point cloud shaded with a named matcap texture. |
| ProjectCapsule | A 3D Capsule. |
| ProjectCube | A 3D Cube. |
| ProjectGeometry | |
| ProjectGradientExtentsKind | Whether a gradient spans the object or the whole scene. |
| ProjectLineDash | |
| ProjectLineJoin | |
| ProjectLineRound | |
| ProjectLineStyle | |
| ProjectMesh | A point cloud representation. |
| ProjectMeshAppearance | How a point cloud is drawn. |
| ProjectMeshAttributeRamp | Point cloud colored by a named attribute through a color ramp. |
| ProjectMeshColor | Point cloud drawn in one flat color. |
| ProjectMeshGradient | Point cloud colored by a ramp along a world-space axis. |
| ProjectMeshMatCap | Point cloud shaded with a named matcap texture. |
| ProjectName | A name for a ProjectNode. |
| ProjectNoFilter | Filter that draws every element. |
| ProjectNode | The ID of a ProjectNode. |
| ProjectPointCloud | A point cloud representation. |
| ProjectPointCloudAppearance | How a point cloud is drawn. |
| ProjectPointCloudAttributeRamp | Point cloud colored by a named attribute through a color ramp. |
| ProjectPointCloudColor | Point cloud drawn in one flat color. |
| ProjectPointCloudGradient | Point cloud colored by a ramp along a world-space axis. |
| ProjectPointCloudMatCap | Point cloud shaded with a named matcap texture. |
| ProjectPolyline | |
| ProjectPolylineAppearance | |
| ProjectShape | |
| ProjectShapeAppearance | How a shape is drawn. |
| ProjectSphere | A 3D Sphere. |
| ProjectTransform | Where an object sits, how it is turned, and its scale. All parts are double precision. |
| ProjectValueRangeFilter | Filter keeping elements whose attribute falls inside [min, max]. |
| ProjectVisibility | Whether an object is drawn. |
| ProjectVisibilityKind | Whether an object is drawn, hidden, or follows its parent. |
| ProjectVolumetricFilter | Which elements of a model are drawn. |
despawn
despawn(args: { node: ProjectObjectProjectNode }, transactionId?: string): Promise<void>Despawn a project object and all its descendants.
Returns Promise<void>.
node : ProjectObjectProjectNode
transactionId optional : string
fromScene
fromScene(args: { node: SceneNode }, transactionId?: string): Promise<ProjectObjectProjectNode | undefined>Finds the project node associated with a scene node.
Returns Promise<ProjectObjectProjectNode | undefined>.
node : SceneNode
transactionId optional : string
getChildren
getChildren(args: { node: ProjectObjectProjectNode }, transactionId?: string): Promise<Array<ProjectObjectProjectNode>>Get the children of a given ProjectNodeSchema
Returns Promise<Array<ProjectObjectProjectNode>>.
node : ProjectObjectProjectNode
transactionId optional : string
getParent
getParent(args: { node: ProjectObjectProjectNode }, transactionId?: string): Promise<ProjectObjectProjectNode | undefined>Get the parent of a given scene object if it exists
Returns Promise<ProjectObjectProjectNode | undefined>.
node : ProjectObjectProjectNode
transactionId optional : string
setParent
setParent(args: { node: ProjectObjectProjectNode; parent?: ProjectObjectProjectNode }, transactionId?: string): Promise<void>Set the parent of a given ProjectNodeSchema
Returns Promise<void>.
node : ProjectObjectProjectNode
parent optional : ProjectObjectProjectNode
transactionId optional : string
spawn
spawn(transactionId?: string): Promise<ProjectObjectProjectNode>Spawn a new blank project object
Returns: The ID of a ProjectNode.
Returns Promise<ProjectObjectProjectNode>.
transactionId optional : string
toScene
toScene(args: { node: ProjectObjectProjectNode }, transactionId?: string): Promise<SceneNode | undefined>Finds the current scene node associated with a project node.
Returns Promise<SceneNode | undefined>.
node : ProjectObjectProjectNode
transactionId optional : string
ProjectArrow
A 3D Arrow.
length : number
Length of the arrow
ProjectAttributeBasedAppearance
Colours a model by one of its attributes, through a named colour ramp.
attribute : string
Name of the attribute driving the color.
ramp optional : string
Name of the color ramp. When absent, the viewer’s default is used.
range optional : ProjectObjectProjectAttributeRange
Range the ramp is stretched across. When absent, the attribute’s own range is used.
ProjectAttributeRange
Numeric range an attribute-driven color ramp is stretched across.
max : number
Value mapped to the end of the ramp.
min : number
Value mapped to the start of the ramp.
ProjectBlockModel
A point cloud representation.
appearance optional : ProjectObjectProjectBlockModelAppearance
How the point cloud is drawn.
data : RemoteHandle
Handle of the stored model, as a hyphenated UUID.
ProjectBlockModelAppearance
type ProjectObjectProjectBlockModelAppearance = { kind: "matCap"; value: ProjectObjectProjectBlockModelMatCap } | { kind: "color"; value: ProjectObjectProjectBlockModelColor } | { kind: "attributeRamp"; value: ProjectObjectProjectBlockModelAttributeRamp } | { kind: "gradient"; value: ProjectObjectProjectBlockModelGradient }How a point cloud is drawn.
ProjectBlockModelAttributeRamp
Point cloud colored by a named attribute through a color ramp.
appearance optional : ProjectObjectProjectAttributeBasedAppearance
Which attribute drives the color and over what range.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
outline : boolean
Whether block edges are outlined.
ProjectBlockModelColor
Point cloud drawn in one flat color.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
outline : boolean
Whether block edges are outlined.
rgb : ColorColorRgb
The flat color. Transparency is opacity, not an alpha channel here.
ProjectBlockModelGradient
Point cloud colored by a ramp along a world-space axis.
axis : MathVec3
Direction the ramp runs along.
extents : ProjectObjectProjectGradientExtentsKind
Which bounds the ramp is stretched across.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
outline : boolean
Whether block edges are outlined.
ramp : string
Name of the color ramp.
ProjectBlockModelMatCap
Point cloud shaded with a named matcap texture.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
name : string
Name of the matcap texture.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
outline : boolean
Whether block edges are outlined.
ProjectCapsule
A 3D Capsule.
length : number
The length of the capsule, minus the caps.
radius : number
The radius of the Semi-Sphere.
ProjectCube
A 3D Cube.
halfExtents : number
The half-extents of the Cube.
ProjectGeometry
type ProjectObjectProjectGeometry = { kind: "sphere"; value: ProjectObjectProjectSphere } | { kind: "cube"; value: ProjectObjectProjectCube } | { kind: "arrow"; value: ProjectObjectProjectArrow } | { kind: "capsule"; value: ProjectObjectProjectCapsule }ProjectGradientExtentsKind
Enum
Whether a gradient spans the object or the whole scene.
Global = 1
Stretch the ramp across the whole scene’s extents.
Local = 0
Stretch the ramp across the node’s own extents.
ProjectLineDash
gapScale : number
Gap length in multiples of the line width.
lineScale : number
Dash length in multiples of the line width.
ProjectLineJoin
type ProjectObjectProjectLineJoin = { kind: "none" } | { kind: "miter" } | { kind: "bevel" } | { kind: "round"; value: ProjectObjectProjectLineRound }ProjectLineRound
resolution : number
ProjectLineStyle
type ProjectObjectProjectLineStyle = { kind: "solid" } | { kind: "dotted" } | { kind: "dashed"; value: ProjectObjectProjectLineDash }ProjectMesh
A point cloud representation.
appearance optional : ProjectObjectProjectMeshAppearance
How the point cloud is drawn.
data : RemoteHandle
Handle of the stored model, as a hyphenated UUID.
ProjectMeshAppearance
type ProjectObjectProjectMeshAppearance = { kind: "matCap"; value: ProjectObjectProjectMeshMatCap } | { kind: "color"; value: ProjectObjectProjectMeshColor } | { kind: "attributeRamp"; value: ProjectObjectProjectMeshAttributeRamp } | { kind: "gradient"; value: ProjectObjectProjectMeshGradient }How a point cloud is drawn.
ProjectMeshAttributeRamp
Point cloud colored by a named attribute through a color ramp.
appearance optional : ProjectObjectProjectAttributeBasedAppearance
Which attribute drives the color and over what range.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
ProjectMeshColor
Point cloud drawn in one flat color.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
rgb : ColorColorRgb
The flat color. Transparency is opacity, not an alpha channel here.
ProjectMeshGradient
Point cloud colored by a ramp along a world-space axis.
axis : MathVec3
Direction the ramp runs along.
extents : ProjectObjectProjectGradientExtentsKind
Which bounds the ramp is stretched across.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
ramp : string
Name of the color ramp.
ProjectMeshMatCap
Point cloud shaded with a named matcap texture.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
name : string
Name of the matcap texture.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
ProjectName
A name for a ProjectNode.
name : string
The human-readable node name.
ProjectNoFilter
Filter that draws every element.
ProjectNode
The ID of a ProjectNode.
uuid : string
The identifier as a hyphenated UUID string.
ProjectPointCloud
A point cloud representation.
appearance optional : ProjectObjectProjectPointCloudAppearance
How the point cloud is drawn.
data : RemoteHandle
Handle of the stored model, as a hyphenated UUID.
ProjectPointCloudAppearance
type ProjectObjectProjectPointCloudAppearance = { kind: "matCap"; value: ProjectObjectProjectPointCloudMatCap } | { kind: "color"; value: ProjectObjectProjectPointCloudColor } | { kind: "attributeRamp"; value: ProjectObjectProjectPointCloudAttributeRamp } | { kind: "gradient"; value: ProjectObjectProjectPointCloudGradient }How a point cloud is drawn.
ProjectPointCloudAttributeRamp
Point cloud colored by a named attribute through a color ramp.
appearance optional : ProjectObjectProjectAttributeBasedAppearance
Which attribute drives the color and over what range.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
pointSize : number
Diameter of a drawn point in world units.
ProjectPointCloudColor
Point cloud drawn in one flat color.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
pointSize : number
Diameter of a drawn point in world units.
rgb : ColorColorRgb
The flat color. Transparency is opacity, not an alpha channel here.
ProjectPointCloudGradient
Point cloud colored by a ramp along a world-space axis.
axis : MathVec3
Direction the ramp runs along.
extents : ProjectObjectProjectGradientExtentsKind
Which bounds the ramp is stretched across.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
pointSize : number
Diameter of a drawn point in world units.
ramp : string
Name of the color ramp.
ProjectPointCloudMatCap
Point cloud shaded with a named matcap texture.
filter optional : ProjectObjectProjectVolumetricFilter
Which points are drawn.
name : string
Name of the matcap texture.
opacity optional : number
Alpha applied to the whole cloud, 1.0 being fully opaque. When absent, it reads as fully
opaque.
pointSize : number
Diameter of a drawn point in world units.
ProjectPolyline
appearance optional : ProjectObjectProjectPolylineAppearance
vertices optional : Array<MathVec3>
ProjectPolylineAppearance
color optional : ColorColorRgba
depthBias optional : number
Depth offset between -1 and 1. Negative values move lines toward the camera.
fillColor optional : ColorColorRgba
Fill color for a closed planar polyline. Absent means no fill.
lineJoin optional : ProjectObjectProjectLineJoin
linePerspective optional : boolean
Whether stroke width decreases with distance. The default is false.
lineStyle optional : ProjectObjectProjectLineStyle
lineWidth optional : number
Stroke width in pixels when perspective is disabled. It must be positive; the default is 4.
ProjectShape
appearance : ProjectObjectProjectShapeAppearance
The appearance of the shape
geometry : ProjectObjectProjectGeometry
The shape geometry
ProjectShapeAppearance
How a shape is drawn.
color optional : ColorColorRgba
The color of the shape.
depthBias optional : number
Depth offset between -1 and 1. Negative values move lines toward the camera.
lineJoin optional : ProjectObjectProjectLineJoin
linePerspective optional : boolean
Whether wireframe width decreases with distance. The default is false.
lineStyle optional : ProjectObjectProjectLineStyle
lineWidth optional : number
Wireframe width in pixels when perspective is disabled. It must be positive; the default is 2.
wireframe : boolean
Whether the engine draws the shape as a solid mesh or as a wireframe.
ProjectSphere
A 3D Sphere.
radius : number
The radius of the Sphere.
ProjectTransform
Where an object sits, how it is turned, and its scale. All parts are double precision.
rotation : MathQuat
Rotation as an [x, y, z, w] quaternion. All four zero reads as the identity rotation.
scale : MathVec3
World-space scale.
translation : MathVec3
Position in the parent nodes object space, or world-space if a root node.
ProjectValueRangeFilter
Filter keeping elements whose attribute falls inside [min, max].
attribute : string
Name of the attribute being tested.
max : number
Inclusive upper bound.
min : number
Inclusive lower bound.
ProjectVisibility
Whether an object is drawn.
kind : ProjectObjectProjectVisibilityKind
The VisibilityKind as an i32 kind.
ProjectVisibilityKind
Enum
Whether an object is drawn, hidden, or follows its parent.
Hidden = 2
Force the node hidden.
Inherited = 0
Inherit visibility from the parent node.
Visible = 1
Force the node visible.
ProjectVolumetricFilter
type ProjectObjectProjectVolumetricFilter = { kind: "none"; value: ProjectObjectProjectNoFilter } | { kind: "valueRange"; value: ProjectObjectProjectValueRangeFilter }Which elements of a model are drawn.