ReadonlyboundaryBoundary of the canvas in absolute browser window coordinates.
Format is [xmin, ymin, xwidth, ywidth].
ReadonlycameraManages the Camera for this View.
ReadonlycolorizedMap of currently colorized ViewObjects in this View.
Each ViewObject is mapped here by ViewObject.id.
True once this Component has been destroyed.
Don't use this Component if this is true.
ProtecteddirtyReadonlyedgesConfigures the appearance of edges belonging to ViewObject in this View.
ReadonlyhighlightedMap of currently highlighted ViewObjects in this View.
A ViewObject is highlighted when ViewObject.highlighted is true.
Each ViewObject is mapped here by ViewObject.id.
ReadonlyhighlightConfigures the highlighted appearance of ViewObjects in this View.
The HTML canvas.
Unique ID of this Component.
ReadonlylayersMap of the all ViewLayers in this View.
Each ViewLayer is mapped here by ViewLayer.id.
ReadonlylightsMap of light sources in this View.
ReadonlylightsList of light sources in this View.
ReadonlylinesConfigures the appearance of lines belonging to ViewObjects in this View.
ReadonlyobjectsMap of the all ViewObjects in this View.
Each ViewObject is mapped here by ViewObject.id.
The View automatically ensures that there is a ViewObject here for each RendererObject in the Viewer
ReadonlyopacityMap of ViewObjects in this View whose opacity has been updated.
Each ViewObject is mapped here by ViewObject.id.
ReadonlypointsConfigures the appearance of point primitives belonging to ViewObjects in this View .
ReadonlyresolutionConfigures resolution scaling for this View.
ReadonlysaoConfigures Scalable Ambient Obscurance (SAO) for this View.
ReadonlysectionMap of SectionPlanes in this View.
Each SectionPlane is mapped here by SectionPlane.id.
ReadonlysectionList of SectionPlanes in this View.
ReadonlyselectedConfigures the appearance of ViewObjects in this View.
ReadonlyselectedMap of currently selected ViewObjects in this View.
A ViewObject is selected when ViewObject.selected is true.
Each ViewObject is mapped here by ViewObject.id.
ReadonlytexturingConfigures when textures are rendered for this View.
ReadonlytransparentIndicates if this View is transparent.
ReadonlyviewerThe Viewer to which this View belongs.
ID of this View, unique within the Viewer.
InternalviewThe index of this View in Viewer.viewList.
ReadonlyvisibleMap of the currently visible ViewObjects in this View.
A ViewObject is visible when ViewObject.visible is true.
Each ViewObject is mapped here by ViewObject.id.
ReadonlyxrayedMap of currently x-rayed ViewObjects in this View.
A ViewObject is x-rayed when ViewObject.xrayed is true.
Each ViewObject is mapped here by ViewObject.id.
ReadonlyxrayConfigures the X-rayed appearance of ViewObjects in this View.
Gets wether this View will automatically create ViewLayers on-demand as ViewerObjects are created.
Sets wether this View will automatically create ViewLayers on-demand as ViewerObjects are created.
When true (default), the View will automatically create ViewLayers as needed for each new
RendererObject.layerId encountered, including a "default" ViewLayer for ViewerObjects that have no
layerId. This "default" ViewLayer ensures that a ViewObject is created in the View for every SceneObject that is created.
If you set this false, however, then the View will only create ViewObjects for
SceneObjects that have a scene!SceneObject.layerId that matches the ID of a
ViewLayer that you have explicitly created previously with View.createLayer.
Setting this parameter false enables Views to contain only the ViewObjects that they actually need to show, i.e. to represent only ViewerObjects that they need to view. This enables a View to avoid wastefully creating and maintaining ViewObjects for ViewerObjects that it never needs to show.
Default value is `true``.
The new value for atuoLayers
Gets the canvas clear color.
Default value is [1, 1, 1].
Sets the canvas clear color.
Default value is [1, 1, 1].
Gets whether the canvas clear color will be derived from AmbientLight or View#backgroundColor
when View#transparent is true.
When View#transparent is true and this is true, then the canvas clear color will
be taken from the ambient light color.
When View#transparent is true and this is false, then the canvas clear color will
be taken from View#backgroundColor.
Default value is true.
Sets if the canvas background color is derived from an AmbientLight.
This only has effect when the canvas is not transparent. When not enabled, the background color will be the canvas element's HTML/CSS background color.
Default value is true.
Gets the IDs of the colorized ViewObjects in this View.
Gets the gamma factor.
Gets the IDs of the highlighted ViewObjects in this View.
Gets the number of colorized ViewObjects in this View.
Gets the number of highlighted ViewObjects in this View.
Gets the number of ViewObjects in this View.
Gets the number of ViewObjects in this View that have updated opacities.
Gets the number of selected ViewObjects in this View.
Gets the number of visible ViewObjects in this View.
Gets the number of X-rayed ViewObjects in this View.
Gets the IDs of the ViewObjects in this View.
Gets the IDs of the ViewObjects in this View that have updated opacities.
Gets which rendering mode this View is in.
Default value is QualityRender.
Sets which rendering mode this View is in.
Default value is QualityRender.
Setting a View's rendering mode will activate whatever effects (eg. SAO, edges, canas scaling) are configured to be active in that mode, while deactivating all other effects.
Gets the IDs of the selected ViewObjects in this View.
Gets the IDs of the visible ViewObjects in this View.
Gets the IDs of the X-rayed ViewObjects in this View.
Enter snapshot mode.
Switches rendering to a hidden snapshot canvas.
Exit snapshot mode using !Viewer.endSnapshot | Viewer.endSnapshot.
ProtectedcleanForces this component to action any deferred state updates.
ProtectedcleanGives this component an opportunity to action any defered state updates.
Destroys the DirLights, PointLights and AmbientLights in this View.
Destroys the SectionPlanes in this View.
Creates a ViewLayer in this View.
The ViewLayer is then registered in View.layers.
Since the ViewLayer is created explicitly by this method, the ViewLayer will persist until ViewLayer.destroy is called, or the View itself is destroyed. If a ViewLayer with the given ID already exists, then the method returns that existing ViewLayer. The method will also ensure that the existing ViewLayer likewise persists.
The new ViewLayer
Creates a SectionPlane in this View.
Destroys this View.
Causes Viewer to fire a "viewDestroyed" event.
ProtectederrorProtectedLogs an error for this component to the JavaScript console.
The console message will have this format: [ERROR] [<component type> =<component id>: <message>
The error message to log
Captures a snapshot image of this View.
OptionalsnapshotResult: SnapshotResultProtectedlogProtectedLogs a message for this component.
The message will have this format: [LOG] [<component type> <component id>: <message>
The message to log
Attempts to pick a ViewObject in this View.
Picking parameters.
OptionalpickResult: PickResultPicking results, when caller wants to manage them externally.
ProtectedsetFlags this component as having a defered state updates it needs to perform.
Sets the clippability of the given ViewObjects in this View.
Array of ViewObject.id values.
Whether or not to set clippable.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Updates the collidability of the given ViewObjects in this View.
Updates ViewObject.collidable on the Objects with the given IDs.
Array of ViewObject.id values.
Whether or not to cull.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Colorizes the given ViewObjects in this View.
One or more ViewObject.id values.
RGB colorize factors in range [0..1,0..1,0..1].
True if any ViewObjects changed opacity, else false if all updates were redundant and not applied.
Updates the culled status of the given ViewObjects in this View.
Updates ViewObject.culled on the Objects with the given IDs.
Array of ViewObject.id values.
Whether or not to cull.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Highlights or un-highlights the given ViewObjects in this View.
One or more ViewObject.id values.
Whether or not to highlight.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Sets the opacity of the given ViewObjects in this View.
One or more ViewObject.id values.
Opacity factor in range [0..1].
True if any ViewObjects changed opacity, else false if all updates were redundant and not applied.
Sets the pickability of the given ViewObjects in this View.
Array of ViewObject.id values.
Whether or not to set pickable.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Selects or deselects the given ViewObjects in this View.
One or more ViewObject.id values.
Whether or not to select.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Updates the visibility of the given ViewObjects in this View.
Array of ViewObject.id values.
Whether or not to cull.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Applies or removes X-ray rendering for the given ViewObjects in this View.
One or more ViewObject.id values.
Whether or not to xray.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
Gets this View as JSON.
ProtectedwarnProtectedLogs a warning for this component to the JavaScript console.
The console message will have this format: [WARN] [<component type> =<component id>: <message>
The warning message to log
Iterates with a callback over the given ViewObjects in this View.
One or more ViewObject.id values.
Callback to execute on each ViewObject.
True if any ViewObjects were updated, else false if all updates were redundant and not applied.
ReadonlyonEmits an event each time the canvas boundary changes.
Emits an event when the Component has been destroyed.
ReadonlyonEmits an event each time a ViewLayer is created in this View.
Layers are created explicitly with View.createLayer, or implicitly with SceneModel.createObject and SceneObjectParams.layerId.
ReadonlyonEmits an event each time a ViewLayer in this View is destroyed.
ViewLayers are destroyed explicitly with ViewLayer.destroy, or implicitly when they become empty and View.autoLayers is false.
ReadonlyonEmits an event each time a ViewObject is created in this View.
ReadonlyonEmits an event each time a ViewObject is destroyed in this View.
ReadonlyonEmits an event each time the visibility of a ViewObject changes in this View.
ViewObjects are shown and hidden with View.setObjectsVisible, ViewLayer.setObjectsVisible or ViewObject.visible.
ReadonlyonEmits an event each time the X-ray state of a ViewObject changes in this View.
ViewObjects are X-rayed with View.setObjectsXRayed, ViewLayer.setObjectsXRayed or ViewObject.xrayed.
ReadonlyonEmits an event each time a SectionPlane is created in this View.
ReadonlyonEmits an event each time a SectionPlane in this View is destroyed.
ReadonlyonEmits an event each time a snapshot is completed with View.getSnapshot.
ReadonlyonEmits an event each time a snapshot is initiated with View.getSnapshot.
An independent view within a Viewer, with its own canvas, Camera and object visual states.
See @xeokit/sdk/viewer for usage.