Class AuWidget3DViewer
A widget that is used to render 3D previews based on DAE models.
The following example illustrates how you can use proof images obtained from the DesignEditor
to visualize a model in the 3D-Viewer
widget.
{
"widgets": [
{
"name": "previewer",
"type": "3d-viewer",
"params": {
"showAnimationButtons": false,
"showCameraButtons": true,
"items": [
{
"images": "{{ $['editor'].proofImageUrls }}",
"model": "models/trifold.dae"
}
]
}
}
]
}
Package: ui-framework
Properties
image
A base64 URL that links to the rendered model image in the initial position.
Declaration
public image: string
Property Value
Type | Description |
---|---|
string | A base64 URL that links to the rendered model image in the initial position. |
paused
If true
, animation is paused.
Declaration
public paused: boolean = false
Property Value
Type | Description |
---|---|
boolean | If |
speed
The current animation speed.
Declaration
public speed: number = 1
Property Value
Type | Description |
---|---|
number | The current animation speed. |
Methods
closeBox()
Closes the dynamic model.
Declaration
function closeBox()
GetAnimationDuration()
Gets the longest animation time in the model.
Declaration
function GetAnimationDuration()
Returns
Type | Description |
---|---|
number |
openBox()
Opens the dynamic model.
Declaration
function openBox()
PauseAnimation()
Pauses animation.
Declaration
function PauseAnimation()
PlayAnimation()
Plays animation.
Declaration
function PlayAnimation()
SetAnimationAt(number)
Navigates to animation time.
Declaration
function SetAnimationAt(value: number)
Parameters
Type | Name | Description |
---|---|---|
number | value |
The animation time. |
SetAnimationSpeed(number)
Sets the animation speed.
1
- the default speed.
<0
- reverse animation.
-1
- the default speed for reverse animation.
0
- pause.
>1
- increments speed.
Declaration
function SetAnimationSpeed(value: number)
Parameters
Type | Name | Description |
---|---|---|
number | value |