Applies the specified features of the provided scene view state to the scene.
Applies the provided scene view state to the scene.
Returns the current visible BoundingBox for the scene.
An instance of the current camera of the scene. The camera provides a number of
methods that can be used in combination with the render method to make programmatic
updates to the scene's camera.
const viewer = document.querySelector('vertex-viewer');
const scene = await viewer.scene();
const camera = scene.camera();
// Fit the camera to the visible bounding box of the scene with a 1 second animation
await camera.viewAll().render({ animation: { milliseconds: 1000 } });
Camera for more information on available camera operations.
CrossSectioner to update cross sectioning planes and get current configuration.
Returns an executor that accepts a function as a parameter that contains one or more operations to apply to items or annotations in the scene view. The operations will be applied transactionally.
const viewer = document.querySelector('vertex-viewer');
const scene = await viewer.scene();
// Deselect everything, then select a specific scene item by ID
await scene.elements(op => [
op.items.where(q => q.all()).deselect(),
op.annotations.where(q => q.all()).deselect(),
op.items.where(q => q.withItemId('item-id')).select(),
]).execute();
Returns an executor that accepts a function as a parameter that contains one or more operations to apply to the scene view. The operations will be applied transactionally.
const viewer = document.querySelector('vertex-viewer');
const scene = await viewer.scene();
// Deselect everything, then select a specific item by ID
await scene.items(op => [
op.items.where(q => q.all()).deselect(),
op.items.where(q => q.withItemId('item-id')).select(),
]).execute();
Raycaster to request items that intersect a point.
Resets the view to its default state, with the ability to reset the camera to that of the base scene.
The current viewport of the scene, in pixels.
A class that represents the
Scenethat has been loaded into the viewer. On it, you can retrieve attributes of the scene, such as the camera. It also contains methods for updating the scene and performing requests to rerender the scene.