Type Alias ViewerDetails
type ViewerDetails = {
camera: WebXRSpatialLayerType;
isIdle: boolean;
model: WebXRSpatialLayerType<Model>;
scene: WebXRSpatialLayerType;
markSceneMutated(): void;
pick(screenX: number, screenY: number): Promise<Nullable<PickingInfo>>;
suspendRendering(): IDisposable;
}
camera: WebXRSpatialLayerType;
isIdle: boolean;
model: WebXRSpatialLayerType<Model>;
scene: WebXRSpatialLayerType;
markSceneMutated(): void;
pick(screenX: number, screenY: number): Promise<Nullable<PickingInfo>>;
suspendRendering(): IDisposable;
}
Properties
camera
Readonlyis Idle
isIdle: boolean
True if the viewer's render loop is currently suspended (not actively rendering).
model
Provides access to the currently loaded model.
scene
Provides access to the Scene managed by the Viewer.
Methods
mark Scene Mutated
-
Marks the scene as mutated, which will trigger a render on the next frame (unless rendering is suspended).
Returns void
pick
-
Picks the object at the given screen coordinates.
Parameters
- screenX: number
The x coordinate in screen space.
- screenY: number
The y coordinate in screen space.
Returns Promise<Nullable<PickingInfo>>
A PickingInfo if an object was picked, otherwise null.
- screenX: number
suspend Rendering
-
Suspends the render loop.
Returns IDisposable
A token that should be disposed when the request for suspending rendering is no longer needed.
Provides access to the Camera managed by the Viewer.