|
Name
|
Type
|
Description
|
Required/Optional
|
Default
|
|---|---|---|---|---|
|
params
|
Object
|
Object containing view properties to configure.
|
Required
|
|
|
params.dropshadow
|
Boolean
|
Enables or disables the drop shadow.
|
Optional
|
true
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
Currently, only drop shadow is supported in the params object.
|
|
Name
|
Type
|
Description
|
Required/Optional
|
|---|---|---|---|
|
trackerName
|
String
|
Tracker ID this model should be associated with.
|
Required
|
|
name
|
String
|
Studio ID of the model widget.
|
Required
|
|
url
|
String
|
URI for loading the 3D model.
|
Optional
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
If url is left empty or undefined, an empty model placeholder will be created.
|
|
Name
|
Type
|
Description
|
Required/Optional
|
|---|---|---|---|
|
params
|
Object
|
Object containing model reference and URI.
|
Required
|
|
params.modelID
|
String
|
Studio ID of the model element to update.
|
Required
|
|
params.modelURL
|
String
|
URI to load the 3D model from.
|
Required
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
The model element must be initialized beforehand using addPVS.
|
|
Name
|
Type
|
Description
|
Required/Optional
|
Default
|
|---|---|---|---|---|
|
name
|
String
|
Studio ID of the element to update.
|
Required
|
|
|
params
|
Object
|
Object containing rendering properties to apply.
|
Required
|
|
|
params.occlude
|
Boolean
|
Enables or disables the model’s occlusion of other objects.
|
Optional
|
true
|
|
params.billboard
|
Boolean
|
Enables or disables billboarding (applies only to 3D image widgets (3D Image, 3D Gauge, and 3D Label).
|
Optional
|
true
|
|
params.hidden
|
Boolean
|
Enables or disables hiding of the element (applies to all non-3D model widgets; mainly subassemblies).
|
Optional
|
true
|
|
params.opacity
|
Number
|
Sets the opacity of the element (0.0 = transparent, 1.0 = opaque).
|
Optional
|
1.0
|
|
params.decal
|
Boolean
|
Enables or disables decal / always-on-top rendering mode.
|
Optional
|
true
|
|
params.shader
|
String
|
Shader definition string consisting of the shader name and optional parameters; separated by semicolons. Example: "highlight; r f 1; g f 0; b f 0; a f 1"
|
Optional
|
""
|
|
params.phantom
|
Boolean
|
Enables or disables semi-transparency for the element (applies only to 3D Model widgets).
|
Optional
|
true
|
|
params.forceHidden
|
Boolean
|
Enables or disables forced hiding of the element (applies only to 3D Model widgets).
|
Optional
|
true
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
• You can apply multiple properties at once by combining them in the params object.
• Properties that are not specified will be set to their default values.
|
|
Name
|
Type
|
Description
|
Required/Optional
|
|---|---|---|---|
|
params
|
Object
|
Object containing the model reference and the URI to the PVI file.
|
Required
|
|
params.modelID
|
String
|
Studio ID of the model to load the PVI for.
|
Required
|
|
params.url
|
String
|
URI of the PVI file used to load animation data. If omitted, previously loaded animation data for the model will be unloaded.
|
Required
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
• If url is provided, the animation is loaded from the specified file.
• If url is omitted or is an empty string, any previously loaded PVI data will be removed from the model.
|
|
Name
|
Type
|
Description
|
Required/Optional
|
|---|---|---|---|
|
params
|
Object
|
Object containing model and step information.
|
Required
|
|
params.modelID
|
String
|
Studio ID of the model to play the animation step for.
|
Required
|
|
params.stepNumber
|
Number
|
Step number to play.
|
Required
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
The model must have a loaded PVI file with valid animation steps (see loadPVI).
|
|
Name
|
Type
|
Description
|
Required/Optional
|
|---|---|---|---|
|
params
|
Object
|
Object containing model and step information.
|
Required
|
|
params.modelID
|
String
|
Studio ID of the model to play the animation step for.
|
Required
|
|
params.stepNumber
|
Number
|
Step number to go to.
|
Required
|
|
params.position
|
String
|
Position within the step: "start" or "end".
|
Required
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
Requires the model to have loaded PVI animation data (see loadPVI).
|
|
Name
|
Type
|
Description
|
Required/Optional
|
Default
|
|---|---|---|---|---|
|
params
|
Object
|
Object containing image placement and display information.
|
Required
|
|
|
params.tracker
|
String
|
Tracker ID this image should be associated with.
|
Required
|
|
|
params.id
|
String
|
Studio ID of the widget.
|
Required
|
|
|
params.src
|
String
|
URI or Base64 string of the image to be displayed.
|
Required
|
|
|
params.width
|
Number
|
Width of the image in 3D space (in meters).
|
Optional
|
NaN
|
|
params.height
|
Number
|
Height of the image in 3D space (in meters).
|
Optional
|
NaN
|
|
params.pivot
|
Number
|
Pivot point for positioning. Pivot values are as follows:
• 1—Pivot at top-left corner
• 2—Pivot at top-center
• 3—Pivot at top-right corner
• 4—Pivot at middle-left edge
• 5—Pivot at center (default)
• 6—Pivot at middle-right edge
• 7—Pivot at bottom-left corner
• 8—Pivot at bottom-center
• 9—Pivot at bottom-right corner
|
Optional
|
5
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
• If either width or height is omitted or set to NaN, the missing value will be calculated based on the other provided dimension while preserving the original aspect ratio.
• If both width and height are omitted or set to NaN, the dimensions will be automatically determined from the image’s original size.
|
|
Name
|
Type
|
Description
|
Required/Optional
|
Default
|
|---|---|---|---|---|
|
params
|
Object
|
Object containing Wayfinder configuration settings.
|
Required
|
|
|
params.widgetId
|
String
|
Studio ID of the Wayfinder widget to configure.
|
Required
|
|
|
params.active
|
Boolean
|
Enables or disables the Wayfinder.
|
Optional
|
true
|
|
params.showReticle
|
Boolean
|
Enables or disables display of the reticle.
|
Optional
|
true
|
|
params.showRibbon
|
Boolean
|
Enables or disables display of the ribbon path leading to a Waypoint.
|
Optional
|
true
|
|
params.showWaypoints
|
Boolean
|
Enables or disables display of Waypoints.
|
Optional
|
true
|
|
params.showLabels
|
Boolean
|
Enables or disables display of Waypoint labels.
|
Optional
|
true
|
|
params.labelsOnTop
|
Boolean
|
Enables or disables rendering of labels on top of other scene elements.
|
Optional
|
true
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
Name
|
Type
|
Description
|
Required/Optional
|
Default
|
|---|---|---|---|---|
|
params
|
Object
|
Object containing Waypoint configuration.
|
Required
|
|
|
params.position
|
String
|
3D position of the Waypoint as an object with x, y, z properties. For example: {"x": 0.1995, "y": 0.0617, "z": 0.2545}
|
Required
|
|
|
params.gaze
|
String
|
3D gaze direction vector as an object with x, y, z properties. For example: {"x": 0, "y": 0, "z": -1}
|
Required
|
|
|
params.eventRadius
|
Number
|
Distance (in meters) at which events (for example, auto advance) are triggered.
|
Optional
|
0
|
|
params.wayfinderDisplayBoundary
|
Number
|
Radius (in meters) within which the Wayfinder becomes hidden.
|
Optional
|
0
|
|
params.color
|
String
|
The color of the Waypoint and ribbon. Must be one of the following predefined rgba values: orange, red, green, blue, yellow, pink, cyan, black, white. Any unsupported color will default to orange. Example: "rgba(255, 165, 0, 1)"). The following are supported values:
• Orange—rgba(255, 165, 0, 1)
• Red—rgba(255, 0, 0, 1)
• Green—rgba(0, 255, 0, 1)
• Blue—rgba(0, 0, 255, 1)
• Yellow—rgba(255, 255, 0, 1)
• Pink—rgba(255, 0, 255, 1)
• Cyan—rgba(0, 255, 255, 1)
• Black—rgba(0, 0, 0, 1)
• White—rgba(255, 255, 255, 1)
If any other color is passed, the default color orange: rgba(255, 165, 0, 1) is used automatically.
|
Optional
|
black
|
|
params.label
|
String
|
Text label to display next to the waypoint.
|
Optional
|
""
|
|
successCallback
|
Function
|
Called when the operation completes successfully.
|
Optional
|
|
|
errorCallback
|
Function
|
Called when the operation fails.
|
Optional
|
|
|
The position and gaze parameters must be 3D vector objects (for example, {"x": 0.1995, "y": 0.0617, "z": 0.2545}).
|