Type Alias Model
Model: IDisposable & {
assetContainer: AssetContainer;
materialVariantsController: Nullable<MaterialVariantsController>;
selectedAnimation: number;
selectedMaterialVariant: Nullable<string>;
getHotSpotToRef(query: any, result: ViewerHotSpotResult): boolean;
getWorldBounds(animationIndex?: number): Nullable<ViewerBoundingInfo>;
makeActive(
options?: Partial<{ source: string | File | ArrayBufferView }>,
): void;
resetWorldBounds(): void;
}
assetContainer: AssetContainer;
materialVariantsController: Nullable<MaterialVariantsController>;
selectedAnimation: number;
selectedMaterialVariant: Nullable<string>;
getHotSpotToRef(query: any, result: ViewerHotSpotResult): boolean;
getWorldBounds(animationIndex?: number): Nullable<ViewerBoundingInfo>;
makeActive(
options?: Partial<{ source: string | File | ArrayBufferView }>,
): void;
resetWorldBounds(): void;
}
Type Declaration
-
ReadonlyassetContainer: AssetContainer -
ReadonlymaterialVariantsController: Nullable<MaterialVariantsController>The material variants controller for the model.
-
selectedAnimation: number
The current animation.
-
selectedMaterialVariant: Nullable<string>
The selected material variant.
-
getHotSpotToRef: function
-
Returns the world position and visibility of a hot spot.
Parameters
- query: any
- result: ViewerHotSpotResult
Returns boolean
-
-
getWorldBounds: function
-
getWorldBounds(animationIndex?: number): Nullable<ViewerBoundingInfo>
Compute and return the world bounds of the model. The minimum and maximum extents, the size and the center.
Parameters
OptionalanimationIndex: numberThe index of the animation group to use for computation. If omitted, the current selected animation is used.
Returns Nullable<ViewerBoundingInfo>
The computed bounding info for the model or null if no meshes are present in the asset container.
-
-
makeActive: function
-
makeActive(options?: Partial<{ source: string | File | ArrayBufferView }>): void
Makes the model the current active model in the viewer.
Parameters
Optionaloptions: Partial<{ source: string | File | ArrayBufferView }>Options for activating the model.
Returns void
-
-
resetWorldBounds: function
-
resetWorldBounds(): void
Resets the computed world bounds of the model. Should be called after the model undergoes transformations.
Returns void
-
The asset container representing the model.