Readonly
boundaryBoundary of the canvas in absolute browser window coordinates.
Format is [xmin, ymin, xwidth, ywidth]
.
Readonly
cameraManages the Camera for this View.
Readonly
colorizedMap 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
.
Protected
dirtyReadonly
edgesConfigures the appearance of edges belonging to ViewObject in this View.
Readonly
highlightedMap of currently highlighted ViewObjects in this View.
A ViewObject is highlighted when ViewObject.highlighted is true.
Each ViewObject is mapped here by ViewObject.id.
Readonly
highlightConfigures the highlighted appearance of ViewObjects in this View.
The HTML canvas.
Unique ID of this Component.
Readonly
layersMap of the all ViewLayers in this View.
Each ViewLayer is mapped here by ViewLayer.id.
Readonly
lightsMap of light sources in this View.
Readonly
lightsList of light sources in this View.
Readonly
linesConfigures the appearance of lines belonging to ViewObjects in this View.
Readonly
metricsManages measurement units, origin and scale for this View.
Readonly
objectsMap 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
Readonly
opacityMap of ViewObjects in this View whose opacity has been updated.
Each ViewObject is mapped here by ViewObject.id.
Readonly
pointsConfigures the appearance of point primitives belonging to ViewObjects in this View .
Readonly
resolutionConfigures resolution scaling for this View.
Readonly
saoConfigures Scalable Ambient Obscurance (SAO) for this View.
Readonly
sectionMap of SectionPlanes in this View.
Each SectionPlane is mapped here by SectionPlane.id.
Readonly
sectionList of SectionPlanes in this View.
Readonly
selectedConfigures the appearance of ViewObjects in this View.
Readonly
selectedMap of currently selected ViewObjects in this View.
A ViewObject is selected when ViewObject.selected is true.
Each ViewObject is mapped here by ViewObject.id.
Readonly
texturingConfigures when textures are rendered for this View.
Readonly
transparentIndicates if this View is transparent.
Readonly
viewerThe Viewer to which this View belongs.
ID of this View, unique within the Viewer.
Readonly
visibleMap 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.
Readonly
xrayedMap 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.
Readonly
xrayConfigures 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.
Protected
cleanProtected
cleanDestroys 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.
Protected
errorSets the state of this View.
Captures a snapshot image of this View.
Optional
snapshotResult: SnapshotResultProtected
logAttempts to pick a ViewObject in this View.
Picking parameters.
Optional
pickResult: PickResultPicking results, when caller wants to manage them externally.
Protected
setSets 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.
Protected
warnIterates 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.
Readonly
onEmits an event each time the canvas boundary changes.
Emits an event when the Component has been destroyed.
Readonly
onEmits 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.
Readonly
onEmits 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.
Readonly
onEmits an event each time a ViewObject is created in this View.
Readonly
onEmits an event each time a ViewObject is destroyed in this View.
Readonly
onEmits 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.
Readonly
onEmits 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.
Readonly
onEmits an event each time a SectionPlane is created in this View.
Readonly
onEmits an event each time a SectionPlane in this View is destroyed.
Readonly
onEmits an event each time a snapshot is completed with View.getSnapshot.
Readonly
onEmits 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.