Skip to main content

au-widget-mockup-3d-viewer/au-widget-mockup-3d-viewer

Classes​

AuWidgetMockup3DViewer​

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": "64057c8e12287dfc3d0ecebc"
}
]
}
}
]
}

Extends​

Constructors​

Constructor​
new AuWidgetMockup3DViewer(): AuWidgetMockup3DViewer;
Returns​

AuWidgetMockup3DViewer

Overrides​

Au3dViewerBase.constructor

Properties​

image​
image: string;

A base64 URL that links to the rendered model image in the initial position.

Inherited from​

Au3dViewerBase.image

params​
params: any;

Compiled widget configuration.

Inherited from​

Au3dViewerBase.params

paused​
paused: boolean = false;

If true, animation is paused.

Inherited from​

Au3dViewerBase.paused

speed​
speed: number = 1;

The current animation speed.

Inherited from​

Au3dViewerBase.speed

Accessors​

backOfficeUrl​
Get Signature​
get backOfficeUrl(): string;
Returns​

string

designAtomsApiUrl​
Get Signature​
get designAtomsApiUrl(): string;
Returns​

string

ownerId​
Get Signature​
get ownerId(): string;
Returns​

string

tenantId​
Get Signature​
get tenantId(): number;
Returns​

number

token​
Get Signature​
get token(): string;
Returns​

string

Methods​

checkInitDependenciesWidgets()​
checkInitDependenciesWidgets(): string[];

Returns an array of widget names, due to which the current widget cannot receive parameters.

Returns​

string[]

Inherited from​

Au3dViewerBase.checkInitDependenciesWidgets

closeBox()​
closeBox(): void;

Closes the dynamic model.

Returns​

void

Inherited from​

Au3dViewerBase.closeBox

GetAnimationDuration()​
GetAnimationDuration(): number;

Gets the longest animation time in the model.

Returns​

number

Inherited from​

Au3dViewerBase.GetAnimationDuration

openBox()​
openBox(): void;

Opens the dynamic model.

Returns​

void

Inherited from​

Au3dViewerBase.openBox

PauseAnimation()​
PauseAnimation(): void;

Pauses animation.

Returns​

void

Inherited from​

Au3dViewerBase.PauseAnimation

PlayAnimation()​
PlayAnimation(): void;

Plays animation.

Returns​

void

Inherited from​

Au3dViewerBase.PlayAnimation

resetPreloaderState()​
resetPreloaderState(): void;
Returns​

void

Inherited from​

Au3dViewerBase.resetPreloaderState

SetAnimationAt()​
SetAnimationAt(value): void;

Navigates to animation time.

Parameters​
ParameterTypeDescription
valuenumberThe animation time.
Returns​

void

Inherited from​

Au3dViewerBase.SetAnimationAt

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​
ParameterType
valuenumber
Returns​

void

Inherited from​

Au3dViewerBase.SetAnimationSpeed

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​
ParameterTypeDefault valueDescription
isPreloadbooleanundefinedIf true, enables the preloader.
messagestring | string[]...A text message that appears next to the preloader.
timeoutnumber5-
Returns​

void

Inherited from​

Au3dViewerBase.showPreloader

showToast()​
showToast(data?, duration?): void;

Shows a toast.

return editor.loadUserInfo(data)
.catch(err => {
this.widget.showToast("Error: Invalid data");
console.log(err);
});
Parameters​
ParameterTypeDescription
data?stringA string message to display in the toast.
duration?numberDefines how long to show the toast for.
Returns​

void

Inherited from​

Au3dViewerBase.showToast

References​

widget​

Renames and re-exports AuWidgetMockup3DViewer

Was this page helpful?