au-widget-3d-viewer/Au3dViewerBase
Classes
abstract Au3dViewerBase
The base class for widgets.
Extends
Extended by
Constructors
Constructor
new Au3dViewerBase(): Au3dViewerBase;
Returns
Inherited from
Properties
image
image: string;
A base64 URL that links to the rendered model image in the initial position.
params
params: any;
Compiled widget configuration.
Inherited from
paused
paused: boolean = false;
If true, animation is paused.
speed
speed: number = 1;
The current animation speed.
Methods
checkInitDependenciesWidgets()
checkInitDependenciesWidgets(): string[];
Returns an array of widget names, due to which the current widget cannot receive parameters.
Returns
string[]
Inherited from
AuBaseWidget.checkInitDependenciesWidgets
closeBox()
closeBox(): void;
Closes the dynamic model.
Returns
void
GetAnimationDuration()
GetAnimationDuration(): number;
Gets the longest animation time in the model.
Returns
number
openBox()
openBox(): void;
Opens the dynamic model.
Returns
void
PauseAnimation()
PauseAnimation(): void;
Pauses animation.
Returns
void
PlayAnimation()
PlayAnimation(): void;
Plays animation.
Returns
void
resetPreloaderState()
resetPreloaderState(): void;
Returns
void
Inherited from
AuBaseWidget.resetPreloaderState
SetAnimationAt()
SetAnimationAt(value): void;
Navigates to animation time.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | number | The animation time. |
Returns
void
SetAnimationSpeed()
SetAnimationSpeed(value): void;
Sets the animation speed.
1 - the default speed.
<0 - reverse animation.
-1 - the default speed for reverse animation.
0 - pause.
>1 - increments speed.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
void
showPreloader()
showPreloader(
isPreload,
message?,
timeout?): void;
Shows a preloader.
"onClick": [
"{{#function main.showPreloader(true, 'Creating print files...')}}",
"{{#function $['editor'].getHiResImages(800,800)}}",
"{{#function main.showPreloader(false)}}"
]
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
isPreload | boolean | undefined | If true, enables the preloader. |
message | string | string[] | ... | A text message that appears next to the preloader. |
timeout | number | 5 | - |
Returns
void
Inherited from
showToast()
showToast(data?, duration?): void;
Shows a toast.
return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
Parameters
| Parameter | Type | Description |
|---|---|---|
data? | string | A string message to display in the toast. |
duration? | number | Defines how long to show the toast for. |
Returns
void