View
-
class
View
()
Properties
Accessors
axisTriad
id
inputMonitor
navCube
Methods
addLight()
advanceIncrementalSelection()
beginConvexPolyhedronSelection()
beginRayDrillSelection()
beginScreenSelectByArea()
beginSphereSelection()
centerCameraOnNode()
clearLights()
compositePickFromPoint()
endComparison()
endIncrementalSelection()
fitBounding()
fitNodes()
fitWorld()
getAmbientLightColor()
getAmbientOcclusionEnabled()
getAmbientOcclusionRadius()
getAntiAliasingMode()
getAxisTriad()
getBackfacesVisible()
getBackgroundColor()
getBloomEnabled()
getBloomIntensityScale()
getBloomLayers()
getBloomThreshold()
getBloomThresholdRampWidth()
getBoundingCalculationIgnoresInvisible()
getCamera()
getCanvasSize()
getDrawMode()
getDrawStrategy()
getEyeDomeLightingBlurEdgeDistance()
getEyeDomeLightingBlurInterval()
getEyeDomeLightingBlurSamples()
getEyeDomeLightingEnabled()
getEyeDomeLightingOpacity()
getEyeDomeLightingShadingEdgeDistance()
getFaceVisibility()
getFullCameraMatrix()
getGoochBaseColorProminence()
getGoochBlue()
getGoochLuminanceShiftStrength()
getGoochYellow()
getGroundPlane()
getHardEdgeColor()
getHardEdgeOpacity()
getHardEdgesEnabled()
getHardEdgeThreshold()
getHardEdgeThresholdRampWidth()
getHiddenLineSettings()
getImageBasedLightingEnabled()
getImageBasedLightingIntensity()
getImageBasedLightingOrientation()
getInteractiveDrawLimitIncreaseEnabled()
getLight()
getLightingEnabled()
getLightKeys()
getLineJitterEnabled()
getLineJitterFrequency()
getLineJitterInstanceCount()
getLineJitterRadius()
getLineVisibility()
getMassageExtremeCameras()
getNavCube()
getPointShape()
getPointSize()
getProjectionMatrix()
getProjectionMode()
getSilhouetteColor()
getSilhouetteEnabled()
getSilhouetteOpacity()
getSilhouetteThreshold()
getSilhouetteThresholdRampWidth()
getSimpleReflectionAttenuation()
getSimpleReflectionBlurInterval()
getSimpleReflectionBlurSamples()
getSimpleReflectionEnabled()
getSimpleReflectionFadeAngle()
getSimpleReflectionOpacity()
getSimpleShadowBlurInterval()
getSimpleShadowBlurSamples()
getSimpleShadowColor()
getSimpleShadowEnabled()
getSimpleShadowInteractiveUpdateEnabled()
getSimpleShadowOpacity()
getSimpleShadowResolution()
getToonShadingBandCount()
getToonShadingSpecularFactor()
getViewMatrix()
getViewOrientationCamera()
injectViewOrientationChangeEvent()
isolateNodes()
pickAllFromPoint()
pickAllFromRay()
pickFromPoint()
pickFromRay()
pointToWindowPosition()
projectPoint()
raycastFromPoint()
redraw()
removeLight()
resetCamera()
setAmbientLightColor()
setAmbientOcclusionEnabled()
setAmbientOcclusionRadius()
setAntiAliasingMode()
setBackfacesVisible()
setBackgroundColor()
setBloomEnabled()
setBloomIntensityScale()
setBloomLayers()
setBloomThreshold()
setBloomThresholdRampWidth()
setBoundingCalculationIgnoresInvisible()
setCamera()
setDisplayIncompleteFrames()
setDrawMode()
setEyeDomeLightingBlurEdgeDistance()
setEyeDomeLightingBlurInterval()
setEyeDomeLightingBlurSamples()
setEyeDomeLightingEnabled()
setEyeDomeLightingOpacity()
setEyeDomeLightingShadingEdgeDistance()
setFaceVisibility()
setGoochBaseColorProminence()
setGoochBlue()
setGoochLuminanceShiftStrength()
setGoochYellow()
setGroundPlane()
setHardEdgeColor()
setHardEdgeOpacity()
setHardEdgesEnabled()
setHardEdgeThreshold()
setHardEdgeThresholdRampWidth()
setImageBasedLightingEnabled()
setImageBasedLightingEnvironment()
setImageBasedLightingIntensity()
setImageBasedLightingOrientation()
setInitialCamera()
setInteractiveDrawDelay()
setInteractiveDrawLimitIncreaseEnabled()
setLightingEnabled()
setLineJitterEnabled()
setLineJitterFrequency()
setLineJitterInstanceCount()
setLineJitterRadius()
setLineVisibility()
setMassageExtremeCameras()
setMinimumFramerate()
setPointShape()
setPointSize()
setPointVisibilityTest()
setProjectionMode()
setSilhouetteColor()
setSilhouetteEnabled()
setSilhouetteOpacity()
setSilhouetteThreshold()
setSilhouetteThresholdRampWidth()
setSimpleReflectionAttenuation()
setSimpleReflectionBlurInterval()
setSimpleReflectionBlurSamples()
setSimpleReflectionEnabled()
setSimpleReflectionFadeAngle()
setSimpleReflectionOpacity()
setSimpleShadowBlurInterval()
setSimpleShadowBlurSamples()
setSimpleShadowColor()
setSimpleShadowEnabled()
setSimpleShadowInteractiveUpdateEnabled()
setSimpleShadowOpacity()
setSimpleShadowResolution()
setStatisticsDisplayVisibility()
setToonShadingBandCount()
setToonShadingSpecularFactor()
setTransparencyMode()
setViewOrientation()
setXRayColor()
setXRayOpacity()
setXRayTransparencyMode()
startComparison()
testPointVisibility()
unprojectPoint()
unsetDefaultCamera()
unsetXRayColor()
updateCamera()
updateLight()
Properties
-
View.
domElements
Type: DomElements
-
View.
floorplanManager
Type: FloorplanManager
-
View.
operatorManager
Type: OperatorManager
-
View.
overlayManager
Type: OverlayManager
Accessors
-
axisTriad
() Return type: AxisTriad
-
id
() Return type: number
-
inputMonitor
() Return type: InputMonitor
-
navCube
() Return type: NavCube
Methods
addLight
advanceIncrementalSelection
-
View.
advanceIncrementalSelection
(handle) Arguments: - handle (
IncrementalSelectionId()
) – The handle to an active area selection context.
Returns the next batch of geometry selected by the supplied selection context.
Returns: Returns selected items. If the resulting list is null then there are no more items to select. Return type: Promise <null | [NodeSelectionItem]> - handle (
beginConvexPolyhedronSelection
-
View.
beginConvexPolyhedronSelection
(volumePlanes, heuristicOrigin, config) Arguments: - volumePlanes (
[Plane]()
) – The planes used to define volume. A point p is inside the volume if and only if (plane.determineSide(p) == true) for all supplied planes. - heuristicOrigin (
Point3()
) – A point used to compute distances against for prioritizing returned results. This is typically (but not necessarily) the center of the volume. - config (
IncrementalPickConfig()
) – The configuration object used for this selection operation.
Creates a new and active selection context for the provided selection volume. The selection volume is a convex polyhedron defined by the bounded intersection of its half-spaces.
Returns: The handle for the selection context. Return type: Promise <IncrementalSelectionId> - volumePlanes (
beginRayDrillSelection
-
View.
beginRayDrillSelection
(rayCssOrigin, rayCssBoxRadius, config) Arguments: - rayCssOrigin (
Point2()
) – The coordinate in CSS pixel space for the selection ray’s origin. - rayCssBoxRadius (
number()
) – The radius around the ray in CSS pixel space used for line and point selection proximity. - config (
IncrementalPickConfig()
) – The configuration object used for this selection operation.
Creates a new and active selection context for the provided selection ray. The ray is created at the supplied ray origin and is cast into the scene. Faces are selected if they lie along the ray. Lines and points are selected if they lie within the ray’s box radius.
Note: Somewhat confusingly ray drill selection is actually a selection by volume. The provided ray origin and radius are used to create a frustum to preform the selection. This has some consequences. For example, the ``SelectionResult``s returned by advancing a ray drill selection will not have selection positions, since they were not selected at a single point.
Returns: The handle for the selection context. Return type: Promise <IncrementalSelectionId> - rayCssOrigin (
beginScreenSelectByArea
-
View.
beginScreenSelectByArea
(areaCssMin, areaCssMax, config) Arguments: - areaCssMin (
Point2()
) – The minimum coodinate in CSS pixel space for the selection window. - areaCssMax (
Point2()
) – The maximum coodinate in CSS pixel space for the selection window. - config (
IncrementalPickConfig()
) – The configuration object used for this selection operation.
Creates a new and active selection context for the provided selection window.
Returns: The handle for the selection context. Return type: Promise <IncrementalSelectionId> - areaCssMin (
beginSphereSelection
-
View.
beginSphereSelection
(sphereCenter, sphereRadius, config) Arguments: - sphereCenter (
Point3()
) – The center of the selection sphere. - sphereRadius (
number()
) – The radius of the selection sphere. - config (
IncrementalPickConfig()
) – The configuration object used for this selection operation.
Creates a new and active selection context for the provided selection sphere.
Returns: The handle for the selection context. Return type: Promise <IncrementalSelectionId> - sphereCenter (
centerCameraOnNode
clearLights
-
View.
clearLights
() Removes all lights from the scene. When there are no lights, material colors are drawn at full intensity. This has the same visual effect as calling
setLightingEnabled(false)
.- See also:
- [[InstanceModifier.DoNotLight]]
- [[setLightingEnabled]]
Return type: void
compositePickFromPoint
-
View.
compositePickFromPoint
(point, config) Arguments: - point (
Point2()
) – Canvas position to pick from. - config (
PickConfig()
) – The configuration object used for this picking operation.
Performs a composite picking operation. This operation will return all candidate Node entities according to the PickConfig.
Returns: An object containing the result of the picking operation. Return type: Promise <CompositeSelectionItem> - point (
endComparison
-
View.
endComparison
() Disables a visual comparison of two sets of nodes enabled by [[startComparison]].
Return type: void
endIncrementalSelection
-
View.
endIncrementalSelection
(handle) Arguments: - handle (
IncrementalSelectionId()
) – The selection context to destroy.
Deactivates and destroys the provided selection context.
Return type: Promise <void> - handle (
fitBounding
-
View.
fitBounding
(bounding, duration, camera) Arguments: Fits the camera to the bounding box.
Returns: A promise that will be resolved once the transition is complete. Return type: Promise <void>
fitNodes
-
View.
fitNodes
(ids, duration) Arguments: - ids (
[number]()
) – None - duration (
number()
) – Time in milliseconds for the camera transition to the new camera view.
Fits the camera to the bounding box containing the node ids.
Returns: A promise that will be resolved once the transition is complete. Return type: Promise <void> - ids (
fitWorld
-
View.
fitWorld
(duration[, camera]) Arguments: - duration (
number()
) – the number of milliseconds to transition to the new camera. - camera (
Camera()
) – optional None
Fits the view to the model bounding box.
Returns: A promise that will be resolved once the transition is complete. Return type: Promise <void> - duration (
getAmbientLightColor
-
View.
getAmbientLightColor
() Gets the color of the ambient light applied to the scene.
See also [[setAmbientLightColor]].
Return type: Color
getAmbientOcclusionEnabled
-
View.
getAmbientOcclusionEnabled
() Returns: boolean value indicating whether ambient occlusion is enabled Return type: boolean
getAmbientOcclusionRadius
-
View.
getAmbientOcclusionRadius
() Returns: the ambient occlusion radius Return type: number
getAntiAliasingMode
-
View.
getAntiAliasingMode
() Gets the anti-aliasing mode for the scene. The Default value is AntiAliasingMode.SMAA
Returns: the current anti-aliasing mode. Return type: AntiAliasingMode
getBackfacesVisible
-
View.
getBackfacesVisible
() Gets whether backfaces are being rendered in the scene.
Returns: Boolean value indicating whether backfaces are being rendered in the scene. Return type: boolean
getBackgroundColor
-
View.
getBackgroundColor
() Returns the background colors of the canvas.
Returns: the canvas background colors. Return type: VerticalGradient
getBloomEnabled
-
View.
getBloomEnabled
() Returns whether bloom is enabled.
See [[setBloomEnabled]].
Return type: boolean
getBloomIntensityScale
-
View.
getBloomIntensityScale
() Gets the intensity of the bloom effect.
See [[setBloomIntensityScale]].
Return type: number
getBloomLayers
-
View.
getBloomLayers
() Returns an array of objects describing each layer in the bloom effect.
See [[setBloomLayers]].
Return type: [BloomLayerInfo]
getBloomThreshold
-
View.
getBloomThreshold
() Returns the minimum luminance value a pixel must have for it to contribute to bloom.
See [[setBloomThreshold]], [[getBloomThresholdRampWidth]].
Return type: number
getBloomThresholdRampWidth
-
View.
getBloomThresholdRampWidth
() Returns how much greater than the threshold set by [[setBloomThreshold]] a pixel’s luminance value must be before it contributes fully to the bloom effect.
See [[setBloomThresholdRampWidth]].
Return type: number
getBoundingCalculationIgnoresInvisible
-
View.
getBoundingCalculationIgnoresInvisible
() Returns: whether or not bounding calculations by this View object ignores invisible geometry. Return type: boolean
getCanvasSize
-
View.
getCanvasSize
() Returns the size of the viewer canvas.
Returns: the current size of the viewer canvas. Return type: Point2
getDrawStrategy
-
View.
getDrawStrategy
() Gets the draw strategy.
Returns: The current draw strategy. Return type: DrawStrategy
getEyeDomeLightingBlurEdgeDistance
-
View.
getEyeDomeLightingBlurEdgeDistance
() Returns a value that controls the maximum Z-distance between samples taken by the blur filter used in eye-dome lighting for point clouds. The value is a proportion of the screen size.
Return type: Promise <number>
getEyeDomeLightingBlurInterval
-
View.
getEyeDomeLightingBlurInterval
() Returns the distance in pixels between samples taken by the blur filter used in eye-dome lighting for point clouds.
Return type: Promise <number>
getEyeDomeLightingBlurSamples
-
View.
getEyeDomeLightingBlurSamples
() Returns the diameter of the blur filter used in eye-dome lighting for point clouds. A value of 0 means that blurring is disabled.
Return type: Promise <number>
getEyeDomeLightingEnabled
-
View.
getEyeDomeLightingEnabled
() Returns: boolean value indicating if eye-dome lighting is enabled or disabled. Return type: Promise <boolean>
getEyeDomeLightingOpacity
-
View.
getEyeDomeLightingOpacity
() Returns the opacity of the shading rendered by eye-dome lighting for point clouds. The value is in the range [0,1].
Return type: Promise <number>
getEyeDomeLightingShadingEdgeDistance
-
View.
getEyeDomeLightingShadingEdgeDistance
() Returns a value that controls the shading contrast in eye-dome lighting for point clouds. The value is a number of pixels.
Return type: Promise <number>
getFaceVisibility
-
View.
getFaceVisibility
() Gets the face visibility for the view.
Returns: whether faces are currently being drawn. Return type: boolean
getFullCameraMatrix
-
View.
getFullCameraMatrix
() This is equivalent to (projectionMatrix * viewMatrix).
Returns: The current full camera matrix. Return type: Matrix
getGoochBaseColorProminence
-
View.
getGoochBaseColorProminence
() Gets the prominence of the object’s base color in Gooch shading.
Return type: number
getGoochBlue
-
View.
getGoochBlue
() Gets the value to use as the blue tone in Gooch shading.
Return type: number
getGoochLuminanceShiftStrength
-
View.
getGoochLuminanceShiftStrength
() Gets the strength of the luminance shift in Gooch shading.
Return type: number
getGoochYellow
-
View.
getGoochYellow
() Gets the value to use as the yellow tone in Gooch shading.
Return type: number
getGroundPlane
-
View.
getGroundPlane
() Returns information about the invisible ground plane onto which simple shadows and reflections are projected.
- See also:
- [[setGroundPlane]]
Return type: GroundPlane
getHardEdgeColor
-
View.
getHardEdgeColor
() Returns the color of hard edges.
See also: - [[setHardEdgeColor]] - [[setHardEdgesEnabled]]
Return type: Color
getHardEdgeOpacity
-
View.
getHardEdgeOpacity
() Returns the opacity of hard edges.
See also: - [[setHardEdgeOpacity]] - [[setHardEdgesEnabled]]
Return type: number
getHardEdgesEnabled
-
View.
getHardEdgesEnabled
() Returns whether hard edges are enabled. Hard edges are edges between two faces whose normals diverge beyond a given angle.
Hard edges are always enabled in hidden line mode, regardless of the return value.
See [[setHardEdgesEnabled]].
Return type: boolean
getHardEdgeThreshold
-
View.
getHardEdgeThreshold
() Returns the angle threshold for hard edges. Edges will be drawn between two faces whose normals diverge beyond this angle.
See also: - [[setHardEdgeThreshold]] - [[setHardEdgeThresholdRampWidth]] - [[setHardEdgesEnabled]]
Return type: number
getHardEdgeThresholdRampWidth
-
View.
getHardEdgeThresholdRampWidth
() Returns the value set by [[setHardEdgeThresholdRampWidth]].
This value is added to the one set by [[setHardEdgeThreshold]] to create a secondary threshold. Angles greater than the secondary threshold will result in edges with full opacity, and angles between the two thresholds will result in edges with reduced opacity.
A value of
0
means that all edges are drawn at full opacity.See also: - [[setHardEdgeThresholdRampWidth]] - [[setHardEdgesEnabled]]
Return type: number
getImageBasedLightingEnabled
-
View.
getImageBasedLightingEnabled
() Returns whether image-based lighting is enabled for physically-based materials.
See also: - [[setImageBasedLightingEnabled]] - [[setImageBasedLightingIntensity]] - [[setImageBasedLightingOrientation]]
Return type: boolean
getImageBasedLightingIntensity
-
View.
getImageBasedLightingIntensity
() Returns the intensity (brightness) of image-based lighting applied to physically-based materials.
The default value is 1.
See also: - [[setImageBasedLightingIntensity]] - [[setImageBasedLightingEnabled]] - [[setImageBasedLightingOrientation]]
Return type: number
getImageBasedLightingOrientation
-
View.
getImageBasedLightingOrientation
() Returns the orientation of the image-based lighting environment applied to physically-based materials.
See also: - [[setImageBasedLightingOrientation]] - [[setImageBasedLightingEnabled]] - [[setImageBasedLightingIntensity]]
Return type: ImageBasedLightingOrientation
getInteractiveDrawLimitIncreaseEnabled
-
View.
getInteractiveDrawLimitIncreaseEnabled
() Gets whether or not the viewer will periodically attempt to increase the amount drawn during interaction.
Returns: boolean value indicating whether this feature is enabled or not Return type: Promise <boolean>
getLight
-
View.
getLight
(key) Arguments: - key (
LightKey()
) – The key of the light to get.
Get a Light given its key if it exists.
Returns: A Light given its key if it exists. Return type: Promise <undefined | Light> - key (
getLightingEnabled
-
View.
getLightingEnabled
() Returns whether lighting is enabled.
See also [[setLightingEnabled]].
Return type: boolean
getLightKeys
-
View.
getLightKeys
() Get the list of light keys in the scene.
Returns: The list of light keys in the scene. Return type: Promise <[LightKey]>
getLineJitterEnabled
-
View.
getLineJitterEnabled
() Returns whether line jitter is enabled.
Line jitter makes lines look ‘sketchy’ by drawing them multiple times with randomized offsets applied to the vertices.
See also: - [[setLineJitterEnabled]] - [[getLineJitterInstanceCount]] - [[getLineJitterRadius]] - [[getLineJitterFrequency]]
Return type: boolean
getLineJitterFrequency
-
View.
getLineJitterFrequency
() Returns the frequency of the noise used to offset line vertices when line jitter is enabled. The default value is 5.
See also: - [[getLineJitterEnabled]] - [[getLineJitterInstanceCount]] - [[getLineJitterRadius]] - [[setLineJitterFrequency]]
Return type: number
getLineJitterInstanceCount
-
View.
getLineJitterInstanceCount
() Returns the number of times lines are drawn when line jitter is enabled. The default value is 4.
See also: - [[getLineJitterEnabled]] - [[setLineJitterInstanceCount]] - [[getLineJitterRadius]] - [[getLineJitterFrequency]]
Return type: number
getLineJitterRadius
-
View.
getLineJitterRadius
() Returns the radius of the random offset applied to line vertices when line jitter is enabled. The default value is 0.005.
The value is specified as a proportion of the canvas height, where 1 means the full height of the canvas.
See also: - [[getLineJitterEnabled]] - [[getLineJitterInstanceCount]] - [[setLineJitterRadius]] - [[getLineJitterFrequency]]
Return type: number
getLineVisibility
-
View.
getLineVisibility
() Gets the line visibility for the view.
Returns: whether lines are currently being drawn. Return type: boolean
getPointShape
-
View.
getPointShape
() Gets the PointShape. See [[PointShape]]
Return type: Promise <PointShape>
getPointSize
-
View.
getPointSize
() Gets the diameter of rendered points. See [[PointSizeUnit]].
Return type: Promise <(number, PointSizeUnit)>
getProjectionMatrix
-
View.
getProjectionMatrix
() Gets the projection matrix.
Returns: The current projection matrix. Return type: Matrix
getProjectionMode
-
View.
getProjectionMode
() Gets the projection mode.
Returns: The current projection mode. Return type: Projection
getSilhouetteColor
-
View.
getSilhouetteColor
() Returns the color of silhouette edges.
See also: - [[setSilhouetteColor]] - [[setSilhouetteEnabled]]
Return type: Color
getSilhouetteEnabled
-
View.
getSilhouetteEnabled
() Returns whether silhouette edges are enabled.
Silhouette edges are always enabled in hidden line mode, regardless of the return value.
See [[setSilhouetteEnabled]].
Return type: boolean
getSilhouetteOpacity
-
View.
getSilhouetteOpacity
() Returns the opacity of silhouette edges.
See also: - [[setSilhouetteOpacity]] - [[setSilhouetteEnabled]]
Return type: number
getSilhouetteThreshold
-
View.
getSilhouetteThreshold
() Returns the distance threshold for silhouette edges. This value affects the minimum z-distance required between two pixels for an edge to be drawn. A smaller value will result in more edges being drawn on finer details.
The value is a proportion of the canvas size and not a world-space distance.
See also: - [[setSilhouetteThreshold]] - [[setSilhouetteThresholdRampWidth]] - [[setSilhouetteEnabled]]
Return type: number
getSilhouetteThresholdRampWidth
-
View.
getSilhouetteThresholdRampWidth
() Returns the value set by [[setSilhouetteThresholdRampWidth]].
This value is added to the one set by [[setSilhouetteThreshold]] to create a secondary threshold. Distances greater than the secondary threshold will result in edges with full opacity, and distances between the two thresholds will result in edges with reduced opacity.
A value of
0
means that all edges are drawn at full opacity.See also: - [[setSilhouetteThresholdRampWidth]] - [[setSilhouetteEnabled]]
Return type: number
getSimpleReflectionAttenuation
-
View.
getSimpleReflectionAttenuation
() Returns properties that control how objects drawn in simple reflections fade as they move further from the ground plane.
Attenuation begins at
nearDistance
and increases linearly such that the model is not visible in the reflection beyondfarDistance
.Attenuation is disabled if
farDistance
is less than or equal tonearDistance
.- See also:
- [[setSimpleReflectionAttenuation]]
- [[setSimpleReflectionEnabled]]
Returns: An object with the following properties: Return type: function
getSimpleReflectionBlurInterval
-
View.
getSimpleReflectionBlurInterval
() Returns the distance between samples taken by the blur filter used for simple reflections.
- See also:
- [[setSimpleReflectionBlurInterval]]
- [[setSimpleReflectionEnabled]]
Return type: (number, BlurIntervalUnit)
getSimpleReflectionBlurSamples
-
View.
getSimpleReflectionBlurSamples
() Returns the diameter of the blur filter used for simple reflections. A value less than or equal to
1
means that blurring is disabled.See also: - [[setSimpleReflectionBlurSamples]] - [[setSimpleReflectionEnabled]]
Return type: number
getSimpleReflectionEnabled
-
View.
getSimpleReflectionEnabled
() Returns whether simple reflections are enabled.
See [[setSimpleReflectionEnabled]].
Return type: boolean
getSimpleReflectionFadeAngle
-
View.
getSimpleReflectionFadeAngle
() Returns the angle, in degrees, between the view vector and the ground plane at which simple reflections begin to fade.
A value to
0
means that the fading effect is disabled.Regardless of the value, simple reflections will not be drawn if the camera is below the ground plane.
See also: - [[setSimpleReflectionFadeAngle]] - [[setSimpleReflectionEnabled]]
Return type: number
getSimpleReflectionOpacity
-
View.
getSimpleReflectionOpacity
() Returns the opacity of simple reflections.
- See also:
- [[setSimpleReflectionOpacity]]
- [[setSimpleReflectionEnabled]]
Return type: number
getSimpleShadowBlurInterval
-
View.
getSimpleShadowBlurInterval
() Returns the distance in pixels between samples taken by the blur filter used for simple shadows.
- See also:
- [[setSimpleShadowBlurInterval]]
- [[setSimpleShadowEnabled]]
Return type: number
getSimpleShadowBlurSamples
-
View.
getSimpleShadowBlurSamples
() Returns the diameter of the blur filter used for simple shadows.
- See also:
- [[setSimpleShadowBlurSamples]]
- [[setSimpleShadowEnabled]]
Return type: number
getSimpleShadowColor
-
View.
getSimpleShadowColor
() Returns the color of simple shadows.
- See also:
- [[setSimpleShadowColor]]
- [[setSimpleShadowEnabled]]
Return type: Color
getSimpleShadowEnabled
-
View.
getSimpleShadowEnabled
() Returns whether simple shadows are enabled.
See [[setSimpleShadowEnabled]].
Return type: boolean
getSimpleShadowInteractiveUpdateEnabled
-
View.
getSimpleShadowInteractiveUpdateEnabled
() Returns whether simple shadows will be updated during user interaction.
- See also:
- [[setSimpleShadowInteractiveUpdateEnabled]]
- [[setSimpleShadowEnabled]]
Return type: boolean
getSimpleShadowOpacity
-
View.
getSimpleShadowOpacity
() Returns the opacity of simple shadows.
- See also:
- [[setSimpleShadowOpacity]]
- [[setSimpleShadowEnabled]]
Return type: number
getSimpleShadowResolution
-
View.
getSimpleShadowResolution
() Returns the width and height in pixels of the texture image into which simple shadows are drawn.
- See also:
- [[getSimpleShadowResolution]]
- [[setSimpleShadowEnabled]]
Return type: number
getToonShadingBandCount
-
View.
getToonShadingBandCount
() Gets the current number of discrete shading bands that will be used when toon shading is enabled.
Return type: number
getToonShadingSpecularFactor
-
View.
getToonShadingSpecularFactor
() Gets the current toon shading specular scale factor.
Return type: number
getViewMatrix
-
View.
getViewMatrix
() Gets the view matrix.
Returns: The current view matrix. Return type: Matrix
getViewOrientationCamera
-
View.
getViewOrientationCamera
(orientation[, bounding, preserveModelUp]) Arguments: - orientation (
ViewOrientation()
) – The desired view orientation for the camera. - bounding (
Box()
) – optional Optional bounding to fit the camera about. If not supplied, the model bounding will be used. - preserveModelUp (
boolean()
) – None
Returns a camera set to a ViewOrientation
Return type: Promise <Camera> - orientation (
isolateNodes
-
View.
isolateNodes
(nodeIds, duration, fitNodes, initiallyHiddenStayHidden) Arguments: - nodeIds (
[number]()
) – An array of the node IDs to be isolated. - duration (
number()
) – Time in milliseconds for the camera transition to the new camera view. - fitNodes (
boolean()
) – If true, then the view is fitted around the isolated nodes. - initiallyHiddenStayHidden (
null | boolean()
) – Controls whether or not initially hidden geometries stay hidden. Default behavior is driven by [[setBehaviorInitiallyHidden]].
Hides all nodes except those specified. Also fits the camera to those nodes’ bounding box.
Return type: Promise <void> - nodeIds (
pickAllFromPoint
-
View.
pickAllFromPoint
(point, config) Arguments: - point (
Point2()
) – Canvas position to pick from. - config (
PickConfig()
) – The configuration object used for this picking operation.
Performs a picking operation from the given position on the canvas. All candidate entities are returned. This method does not trigger a selection event. This method will reject if the point is outside the canvas area.
Returns: An object containing the result of the picking operation. Return type: Promise <[NodeEntitySelectionItem]> - point (
pickAllFromRay
-
View.
pickAllFromRay
(ray, config) Arguments: - ray (
Ray()
) – The world-space ray to perform the selection with. - config (
PickConfig()
) – The configuration object used for this picking operation.
Performs a selection operation from the given world-space ray. All candidate entities are returned. This method does not trigger a selection event.
Returns: An object containing the result of the picking operation. Return type: Promise <[NodeEntitySelectionItem]> - ray (
pickFromPoint
-
View.
pickFromPoint
(point, config) Arguments: - point (
Point2()
) – Canvas position to pick from. - config (
PickConfig()
) – The configuration object used for this picking operation.
Performs a picking operation from the given position on the canvas. The best candidate entity is be returned. This method does not trigger a selection event. This method will reject if the point is outside the canvas area.
Returns: An object containing the result of the picking operation. Return type: Promise <SelectionItem> - point (
pickFromRay
-
View.
pickFromRay
(ray, config) Arguments: - ray (
Ray()
) – The world-space ray to perform the selection with. - config (
PickConfig()
) – The configuration object used for this picking operation.
Performs a selection operation from the given world-space ray. The best candidate entity is be returned. This method does not trigger a selection event.
Returns: An object containing the result of the picking operation. Return type: Promise <SelectionItem> - ray (
pointToWindowPosition
projectPoint
raycastFromPoint
redraw
-
View.
redraw
([callback]) Arguments: - callback (
function()
) – optional A function to be called once the draw is complete. This is provided instead of aPromise
to ensure the callback is called before the start of another redraw.
Forces the a redraw of this view.
Return type: void -
View.
callback
() Return type: void
- callback (
removeLight
-
View.
removeLight
(key) Arguments: - key (
LightKey()
) – None
removes a light from the scene. See [[Light]].
- See also:
- [[addLight]]
- [[clearLights]]
- [[updateLight]]
Return type: void - key (
resetCamera
-
View.
resetCamera
(duration) Arguments: - duration (
number()
) – the amount of time in milliseconds that the camera transition between the current and initial view should take.
Resets the camera to the initial view of the model when first loaded.
Return type: Promise <void> - duration (
setAmbientLightColor
-
View.
setAmbientLightColor
(value) Arguments: - value (
Color()
) – None
Sets the color of the ambient light applied to the scene. This is a constant source of light that affects every point in the scene in the same way regardless of position or surface normal.
See also [[getAmbientLightColor]].
Return type: void - value (
setAmbientOcclusionEnabled
-
View.
setAmbientOcclusionEnabled
(enabled) Arguments: - enabled (
boolean()
) – sets whether ambient occlusion will be enabled
Sets whether ambient occlusion is enabled
Return type: Promise <void> - enabled (
setAmbientOcclusionRadius
-
View.
setAmbientOcclusionRadius
(radius) Arguments: - radius (
number()
) – the ambient occlusion radius.
Sets the ambient occlusion radius. This value represents the maximum screen-proportional distance between two points such that one will cast a shadow on the other.
Return type: Promise <void> - radius (
setAntiAliasingMode
-
View.
setAntiAliasingMode
(antiAliasingMode) Arguments: - antiAliasingMode (
AntiAliasingMode()
) – None
Sets the anti-aliasing mode for the scene.
Return type: Promise <void> - antiAliasingMode (
setBackfacesVisible
-
View.
setBackfacesVisible
(visible) Arguments: - visible (
boolean()
) – Boolean value indicating whether backfaces should be rendered.
Sets whether backfaces should be rendered in the scene.
Returns: Promise that is resolved when this operation has completed. Return type: Promise <void> - visible (
setBackgroundColor
-
View.
setBackgroundColor
(top, bottom) Arguments: - top (
null | Color()
) – the top color for the the background gradient. - bottom (
null | Color()
) – the bottom color for the the background gradient.
Sets the viewer background color to a gradient interpolating from the top to bottom color. For a solid color, the top and bottom color should have the same values. Background Transparency is only available with client-side rendering. To re-enable a transparent background, pass null to the parameters of this function.
When draw mode is set to
DrawMode.HiddenLine
, the background color is defined inHiddenLineSettings HiddenLineSettings
. SeeHiddenLineSettings.setBackgroundColor HiddenLineSettings.setBackgroundColor
.Returns: a promise that resolves when the operation has completed. Return type: Promise <void> - top (
setBloomEnabled
-
View.
setBloomEnabled
(value) Arguments: - value (
boolean()
) – None
Sets whether bloom is enabled.
See [[getBloomEnabled]].
Return type: void - value (
setBloomIntensityScale
-
View.
setBloomIntensityScale
(value) Arguments: - value (
number()
) – None
Sets the intensity of the bloom effect. This value is multiplied by the intensities of the individual layers set by [[setBloomLayers]].
See [[getBloomIntensityScale]].
Return type: void - value (
setBloomLayers
-
View.
setBloomLayers
(layers) Arguments: - layers (
[BloomLayerInfo]()
) – None
Sets the number of layers in the bloom effect and the layers’ attributes.
The bloom effect is achieved by applying a luminance filter to the source image, then progressively downsampling, blurring, and adding the results together. The result of each downsample/blur operation is fed into the next, which is executed at half the resolution of the previous. The number of stages and the behavior of each stage are controlled by this function.
See [[BloomLayerInfo]], [[getBloomLayers]].
Return type: void - layers (
setBloomThreshold
-
View.
setBloomThreshold
(value) Arguments: - value (
number()
) – None
Sets the minimum luminance value a pixel must have for it to contribute to bloom. The value should be in the range
[0,1]
.See [[getBloomThreshold]], [[setBloomThresholdRampWidth]].
Return type: void - value (
setBloomThresholdRampWidth
-
View.
setBloomThresholdRampWidth
(value) Arguments: - value (
number()
) – None
Sets how much greater than the threshold set by [[setBloomThreshold]] a pixel’s luminance value must be before it contributes fully to the bloom effect.
If the pixel’s luminance value does not exceed the threshold by at least the amount set by this function, the pixel’s contribution will be diminished based on how close its luminance value is to the threshold.
See [[getBloomThresholdRampWidth]].
Return type: void - value (
setBoundingCalculationIgnoresInvisible
-
View.
setBoundingCalculationIgnoresInvisible
(value) Arguments: - value (
boolean()
) – None
Sets whether or not bounding calculations by this View object ignores invisible geometry.
Return type: void - value (
setCamera
-
View.
setCamera
(camera, duration) Arguments: - camera (
null | Camera()
) – the camera to set - duration (
number()
) – camera transition time in milliseconds
Sets the current camera
Return type: boolean - camera (
setDisplayIncompleteFrames
-
View.
setDisplayIncompleteFrames
(value) Arguments: - value (
boolean()
) – None
Sets whether intermediate frames of an incremental draw will be displayed. (default: true)
If false, the image will only be displayed once completely drawn, except immediately after certain operations, such as setting the camera. To disable these exceptions, call [[setInteractiveDrawDelay]] with a value of 0.
Return type: Promise <void> - value (
setDrawMode
-
View.
setDrawMode
(drawMode) Arguments: - drawMode (
DrawMode()
) – The drawing mode to set.
Sets the drawing mode for the scene.
Return type: Promise <void> - drawMode (
setEyeDomeLightingBlurEdgeDistance
-
View.
setEyeDomeLightingBlurEdgeDistance
(value) Arguments: - value (
number()
) – None
Controls the maximum Z-distance between samples taken by the blur filter used in eye-dome lighting for point clouds. The value is taken as a proportion of the screen size. Decreasing the value will result in sharper edges, and increasing the value will result in softer edges. (default: .03)
Return type: Promise <void> - value (
setEyeDomeLightingBlurInterval
-
View.
setEyeDomeLightingBlurInterval
(value) Arguments: - value (
number()
) – None
Sets the distance in pixels between samples taken by the blur filter used in eye-dome lighting for point clouds. (default: 1)
Return type: Promise <void> - value (
setEyeDomeLightingBlurSamples
-
View.
setEyeDomeLightingBlurSamples
(value) Arguments: - value (
number()
) – None
Sets the diameter of the blur filter used in eye-dome lighting for point clouds. Setting the value to 0 will disable blurring. (default: 7)
Return type: Promise <void> - value (
setEyeDomeLightingEnabled
-
View.
setEyeDomeLightingEnabled
(enabled) Arguments: - enabled (
boolean()
) – None
Enables or disables eye-dome lighting for point clouds. (default: disabled)
Return type: Promise <void> - enabled (
setEyeDomeLightingOpacity
-
View.
setEyeDomeLightingOpacity
(value) Arguments: - value (
number()
) – A number in the range [0,1].
Sets the opacity of the shading rendered by eye-dome lighting for point clouds. (default: 1)
Return type: Promise <void> - value (
setEyeDomeLightingShadingEdgeDistance
-
View.
setEyeDomeLightingShadingEdgeDistance
(value) Arguments: - value (
number()
) – None
Controls the shading contrast in eye-dome lighting for point clouds. The value is taken as a number of pixels. Increasing the value will result in overall lighter shading, and decreasing the value will result in overall darker shading. (default: 2)
Return type: Promise <void> - value (
setFaceVisibility
-
View.
setFaceVisibility
(faceVisibility) Arguments: - faceVisibility (
boolean()
) – indicates whether to draw faces.
Sets the face visibility for the view.
Return type: Promise <void> - faceVisibility (
setGoochBaseColorProminence
-
View.
setGoochBaseColorProminence
(prominence) Arguments: - prominence (
number()
) – this scalar value determines the amount of the object’s base color is applied to the final shaded color.
Sets the prominence of the object’s base color in Gooch shading.
Return type: void - prominence (
setGoochBlue
-
View.
setGoochBlue
(blue) Arguments: - blue (
number()
) – the blue tone. This value should be in the range [0,1]
Sets the value to use as the blue tone in Gooch shading.
Return type: void - blue (
setGoochLuminanceShiftStrength
-
View.
setGoochLuminanceShiftStrength
(shiftStrength) Arguments: - shiftStrength (
number()
) – this scalar values determines the amount of luminance shift that is applied to the object’s base color
Sets the strength of the luminance shift in Gooch shading.
Return type: void - shiftStrength (
setGoochYellow
-
View.
setGoochYellow
(yellow) Arguments: - yellow (
number()
) – the yellow tone. This value should be in the range [0,1]
Sets the value to use as the yellow tone in Gooch shading.
Return type: void - yellow (
setGroundPlane
-
View.
setGroundPlane
(plane) Arguments: - plane (
GroundPlane()
) – The plane to set.
Defines the invisible ground plane onto which simple shadows and reflections are projected.
- See also:
- [[getGroundPlane]]
- [[setSimpleShadowEnabled]]
- [[setSimpleReflectionEnabled]]
Return type: void - plane (
setHardEdgeColor
setHardEdgeOpacity
-
View.
setHardEdgeOpacity
(value) Arguments: - value (
number()
) – The opacity to set.
Sets the opacity of hard edges.
See also: - [[getHardEdgeOpacity]] - [[setHardEdgesEnabled]]
Return type: void - value (
setHardEdgesEnabled
-
View.
setHardEdgesEnabled
(value) Arguments: - value (
boolean()
) – Whether hard edges should be enabled.
Enables or disables hard edges. Hard edges are edges between two faces whose normals diverge beyond a given angle.
Hard edges are always enabled in hidden line mode.
See also: - [[getHardEdgesEnabled]] - [[setHardEdgeColor]] - [[setHardEdgeOpacity]] - [[setHardEdgeThreshold]] - [[setHardEdgeThresholdRampWidth]]
Return type: void - value (
setHardEdgeThreshold
-
View.
setHardEdgeThreshold
(degrees) Arguments: - degrees (
number()
) – The threshold to set.
Sets the angle threshold for hard edges. Edges will be drawn between two faces whose normals diverge beyond this angle.
See also: - [[getHardEdgeThreshold]] - [[setHardEdgeThresholdRampWidth]] - [[setHardEdgesEnabled]]
Return type: void - degrees (
setHardEdgeThresholdRampWidth
-
View.
setHardEdgeThresholdRampWidth
(degrees) Arguments: - degrees (
number()
) – None
Controls how quickly edges fade as the angle between adjacent faces decreases.
This value is added to the one set by [[setHardEdgeThreshold]] to create a secondary threshold. Angles greater than the secondary threshold will result in edges with full opacity, and angles between the two thresholds will result in edges with reduced opacity.
Setting this value to
0
will cause all edges to be drawn at full opacity.See also: - [[getHardEdgeThresholdRampWidth]] - [[setHardEdgesEnabled]]
Return type: void - degrees (
setImageBasedLightingEnabled
-
View.
setImageBasedLightingEnabled
(value) Arguments: - value (
boolean()
) – None
Sets whether image-based lighting is enabled for physically-based materials.
See also: - [[getImageBasedLightingEnabled]] - [[setImageBasedLightingIntensity]] - [[setImageBasedLightingOrientation]]
Return type: void - value (
setImageBasedLightingEnvironment
-
View.
setImageBasedLightingEnvironment
(data) Arguments: - data (
null | Uint8Array()
) – None
Sets the environment image used by image-based lighting applied to physically-based materials.
Passing
null
will cause the default environment image to be used.The image should be a cube map in KTX2 format with a space-separated list of spherical harmonics coefficients stored under the “sh” metadata key.
A compatible image can be created from an equirectangular source image (such as those found at [HDRI Haven](https://hdrihaven.com)) with the following process:
- cmgen: https://github.com/google/filament
- ktx2ktx2, ktx2sc: https://github.com/KhronosGroup/KTX-Software/
cmgen -x out --format=ktx --size=256 in.hdr ktx2ktx2 -o uncompressed.ktx2 out/out_ibl.ktx ktxsc --zcmp 20 -o out.ktx2 uncompressed.ktx2
Return type: void - data (
setImageBasedLightingIntensity
-
View.
setImageBasedLightingIntensity
(value) Arguments: - value (
number()
) – None
Sets the intensity (brightness) of image-based lighting applied to physically-based materials.
The default value is 1.
See also: - [[getImageBasedLightingIntensity]] - [[setImageBasedLightingEnabled]] - [[setImageBasedLightingOrientation]]
Return type: void - value (
setImageBasedLightingOrientation
-
View.
setImageBasedLightingOrientation
(value) Arguments: - value (
ImageBasedLightingOrientation()
) – None
Sets the orientation of the image-based lighting environment applied to physically-based materials.
See also: - [[getImageBasedLightingOrientation]] - [[setImageBasedLightingEnabled]] - [[setImageBasedLightingIntensity]]
Return type: void - value (
setInitialCamera
setInteractiveDrawDelay
-
View.
setInteractiveDrawDelay
(value) Arguments: - value (
number()
) – The delay in milliseconds
Sets how long after certain operations, such as setting the camera, to wait before starting a redraw. This delay exists in order to prevent flicker during continuous interaction. The initial value is 200ms.
Return type: Promise <void> - value (
setInteractiveDrawLimitIncreaseEnabled
-
View.
setInteractiveDrawLimitIncreaseEnabled
(enable) Arguments: - enable (
boolean()
) – None
Sets whether or not the viewer will periodically attempt to increase the amount drawn during interaction. Setting this to
false
may improve periodic framerate dips caused by such adjustments.Return type: void - enable (
setLightingEnabled
-
View.
setLightingEnabled
(enabled) Arguments: - enabled (
boolean()
) – None
Sets whether lighting is enabled. When disabled, material colors are drawn at full intensity.
See also [[InstanceModifier.DoNotLight]], [[clearLights]].
Return type: Promise <void> - enabled (
setLineJitterEnabled
-
View.
setLineJitterEnabled
(value) Arguments: - value (
boolean()
) – None
Sets whether line jitter is enabled.
Line jitter makes lines look ‘sketchy’ by drawing them multiple times with randomized offsets applied to the vertices.
See also: - [[getLineJitterEnabled]] - [[setLineJitterInstanceCount]] - [[setLineJitterRadius]] - [[setLineJitterFrequency]]
Return type: void - value (
setLineJitterFrequency
-
View.
setLineJitterFrequency
(value) Arguments: - value (
number()
) – None
Sets the frequency of the noise used to offset line vertices when line jitter is enabled. The default value is 5.
Decreasing this value causes lines to appear smoother, while increasing it causes lines to look more noisy.
See also: - [[setLineJitterEnabled]] - [[setLineJitterInstanceCount]] - [[setLineJitterRadius]] - [[getLineJitterFrequency]]
Return type: void - value (
setLineJitterInstanceCount
-
View.
setLineJitterInstanceCount
(value) Arguments: - value (
number()
) – None
Sets the number of times lines are drawn when line jitter is enabled. The default value is 4.
Increasing this number can make the lines look more ‘sketchy.’
See also: - [[setLineJitterEnabled]] - [[getLineJitterInstanceCount]] - [[setLineJitterRadius]] - [[setLineJitterFrequency]]
Return type: void - value (
setLineJitterRadius
-
View.
setLineJitterRadius
(value) Arguments: - value (
number()
) – None
Sets the radius of the random offset applied to line vertices when line jitter is enabled. The default value is 0.005.
The value is specified as a proportion of the canvas height, where 1 means the full height of the canvas.
See also: - [[setLineJitterEnabled]] - [[setLineJitterInstanceCount]] - [[getLineJitterRadius]] - [[setLineJitterFrequency]]
Return type: void - value (
setLineVisibility
-
View.
setLineVisibility
(lineVisibility) Arguments: - lineVisibility (
boolean()
) – indicates whether to draw lines.
Sets the line visibility for the view.
Return type: Promise <void> - lineVisibility (
setMassageExtremeCameras
-
View.
setMassageExtremeCameras
(value) Arguments: - value (
boolean()
) – Whether to modify cameras
Sets whether to change cad view cameras with extreme values to functionally identical cameras with better behavior. This should be disabled if it is important that cameras have their authored values Default: true
Return type: void - value (
setMinimumFramerate
-
View.
setMinimumFramerate
(minimum) Arguments: - minimum (
number()
) – The minimum framerate to be maintained by this view.
Sets a minimum frame rate that will be maintained by this views. The view will use various culling techniques in order to maintain the value passed in.
Passing
0
will cause the entire scene to be drawn for every frame.Return type: void - minimum (
setPointShape
-
View.
setPointShape
(shape) Arguments: - shape (
PointShape()
) – None
Controls the appearance of rendered points. (default: Square) See [[PointShape]].
Return type: Promise <void> - shape (
setPointSize
-
View.
setPointSize
(size, unit) Arguments: - size (
number()
) – None - unit (
PointSizeUnit()
) – None
Sets the diameter of rendered points. (default: 1, ScreenPixels) See [[PointSizeUnit]].
Return type: Promise <void> - size (
setPointVisibilityTest
-
View.
setPointVisibilityTest
(points) Arguments: - points (
[Point3]()
) – The points to test. An empty array will disable the test.
Sets a list of points whose visibility will be tested every time a frame is drawn by comparing them to the frame’s depth buffer. Points that are partially obscured by transparent objects are considered visible.
The results are passed to the [[CallbackMap.frameDrawn]] callback so that UI elements may be updated in sync with rendering.
See also [[testPointVisibility]].
Return type: void - points (
setProjectionMode
-
View.
setProjectionMode
(projectionMode) Arguments: - projectionMode (
Projection()
) – None
Sets the projection mode.
Return type: void - projectionMode (
setSilhouetteColor
setSilhouetteEnabled
-
View.
setSilhouetteEnabled
(value) Arguments: - value (
boolean()
) – Whether silhouette edges should be enabled.
Enables or disables silhouette edges.
Silhouette edges are always enabled in hidden line mode.
See also: - [[getSilhouetteEnabled]] - [[setSilhouetteColor]] - [[setSilhouetteOpacity]] - [[setSilhouetteThreshold]] - [[setSilhouetteThresholdRampWidth]]
Return type: void - value (
setSilhouetteOpacity
-
View.
setSilhouetteOpacity
(value) Arguments: - value (
number()
) – The opacity to set.
Sets the opacity of silhouette edges.
See also: - [[getSilhouetteOpacity]] - [[setSilhouetteEnabled]]
Return type: void - value (
setSilhouetteThreshold
-
View.
setSilhouetteThreshold
(value) Arguments: - value (
number()
) – The threshold to set.
Sets the distance threshold for silhouette edges. This value affects the minimum z-distance required between two pixels for an edge to be drawn. A smaller value will result in more edges being drawn on finer details.
The value is a proportion of the canvas size and not a world-space distance.
See also: - [[getSilhouetteThreshold]] - [[setSilhouetteThresholdRampWidth]] - [[setSilhouetteEnabled]]
Return type: void - value (
setSilhouetteThresholdRampWidth
-
View.
setSilhouetteThresholdRampWidth
(value) Arguments: - value (
number()
) – None
Controls how quickly edges fade as z-distance between pixels decreases.
This value is added to the one set by [[setSilhouetteThreshold]] to create a secondary threshold. Distances greater than the secondary threshold will result in edges with full opacity, and distances between the two thresholds will result in edges with reduced opacity.
Setting this value to
0
will cause all edges to be drawn at full opacity.See also: - [[getSilhouetteThresholdRampWidth]] - [[setSilhouetteEnabled]]
Return type: void - value (
setSimpleReflectionAttenuation
-
View.
setSimpleReflectionAttenuation
(nearDistance, farDistance, unit) Arguments: - nearDistance (
number()
) – The distance from the ground plane at which objects begin to fade. - farDistance (
number()
) – The distance from the ground plane at which objects are completely faded. - unit (
SimpleReflectionAttenuationUnit()
) – The unit in whichnearDistance
andfarDistance
are specified. If unspecified, [[SimpleReflectionAttenuationUnit.World]] will be used.
Controls how objects drawn in simple reflections fade as they move further from the ground plane.
Attenuation begins at
nearDistance
and increases linearly such that the model is not visible in the reflection beyondfarDistance
.Attenuation is disabled if
farDistance
is less than or equal tonearDistance
.- See also:
- [[getSimpleReflectionAttenuation]]
- [[setSimpleReflectionEnabled]]
Return type: void - nearDistance (
setSimpleReflectionBlurInterval
-
View.
setSimpleReflectionBlurInterval
(value, unit) Arguments: - value (
number()
) – The interval to set. - unit (
BlurIntervalUnit()
) – The unit in which thevalue
argument is specified.
Sets the distance between samples taken by the blur filter used for simple reflections.
- See also:
- [[getSimpleReflectionBlurInterval]]
- [[setSimpleReflectionEnabled]]
Return type: void - value (
setSimpleReflectionBlurSamples
-
View.
setSimpleReflectionBlurSamples
(value) Arguments: - value (
number()
) – None
Sets the diameter of the blur filter used for simple reflections. Setting the value less than or equal to
1
will disable blurring.See also: - [[getSimpleReflectionBlurSamples]] - [[setSimpleReflectionEnabled]]
Return type: void - value (
setSimpleReflectionEnabled
-
View.
setSimpleReflectionEnabled
(value) Arguments: - value (
boolean()
) – None
Enables or disables simple reflections projected onto an invisible ground plane.
See also: - [[getSimpleReflectionEnabled]] - [[setSimpleReflectionOpacity]] - [[setSimpleReflectionBlurSamples]] - [[setSimpleReflectionBlurInterval]] - [[setSimpleReflectionFadeAngle]]
Return type: void - value (
setSimpleReflectionFadeAngle
-
View.
setSimpleReflectionFadeAngle
(degrees) Arguments: - degrees (
number()
) – The angle in degrees.
Sets the angle, in degrees, between the view vector and the ground plane at which simple reflections begin to fade.
Settings the value to
0
will disable the fading effect.Regardless of the value, simple reflections will not be drawn if the camera is below the ground plane.
See also: - [[getSimpleReflectionFadeAngle]] - [[setSimpleReflectionEnabled]]
Return type: void - degrees (
setSimpleReflectionOpacity
-
View.
setSimpleReflectionOpacity
(value) Arguments: - value (
number()
) – None
Sets the opacity of simple reflections.
- See also:
- [[getSimpleReflectionOpacity]]
- [[setSimpleReflectionEnabled]]
Return type: void - value (
setSimpleShadowBlurInterval
-
View.
setSimpleShadowBlurInterval
(value) Arguments: - value (
number()
) – The interval to set.
Sets the distance in pixels between samples taken by the blur filter used for simple shadows.
- See also:
- [[getSimpleShadowBlurInterval]]
- [[setSimpleShadowEnabled]]
Return type: void - value (
setSimpleShadowBlurSamples
-
View.
setSimpleShadowBlurSamples
(value) Arguments: - value (
number()
) – The number of samples.
Sets the diameter of the blur filter used for simple shadows. Setting the value to
0
will disable blurring.- See also:
- [[getSimpleShadowBlurSamples]]
- [[setSimpleShadowEnabled]]
Return type: void - value (
setSimpleShadowColor
setSimpleShadowEnabled
-
View.
setSimpleShadowEnabled
(value) Arguments: - value (
boolean()
) – Whether simple shadows should be enabled.
Enables or disables a full-scene shadow projected onto an invisible ground plane.
- See also:
- [[getSimpleShadowEnabled]]
- [[setSimpleShadowColor]]
- [[setSimpleShadowOpacity]]
- [[setGroundPlane]]
- [[setSimpleShadowResolution]]
- [[setSimpleShadowInteractiveUpdateEnabled]]
Return type: void - value (
setSimpleShadowInteractiveUpdateEnabled
-
View.
setSimpleShadowInteractiveUpdateEnabled
(value) Arguments: - value (
boolean()
) – None
Enables or disables updates to simple shadows during user interaction.
- See also:
- [[getSimpleShadowInteractiveUpdateEnabled]]
- [[setSimpleShadowEnabled]]
Return type: void - value (
setSimpleShadowOpacity
-
View.
setSimpleShadowOpacity
(opacity) Arguments: - opacity (
number()
) – The opacity to set.
Sets the opacity of simple shadows.
- See also:
- [[getSimpleShadowOpacity]]
- [[setSimpleShadowEnabled]]
Return type: void - opacity (
setSimpleShadowResolution
-
View.
setSimpleShadowResolution
(pixels) Arguments: - pixels (
number()
) – The resolution to set.
Sets the width and height in pixels of the texture image into which simple shadows are drawn.
- See also:
- [[getSimpleShadowResolution]]
- [[setSimpleShadowEnabled]]
Return type: void - pixels (
setStatisticsDisplayVisibility
-
View.
setStatisticsDisplayVisibility
(visibility) Arguments: - visibility (
boolean()
) – None
Sets the display for the default statistic overlay.
Return type: Promise <void> - visibility (
setToonShadingBandCount
-
View.
setToonShadingBandCount
(bandCount) Arguments: - bandCount (
number()
) – None
Sets the number of discrete shading bands that will be used when toon shading is enabled. Each band represents a shade between dark and light which will control the final color of the pixel based on its light intensity. The default band count is 3.
Return type: void - bandCount (
setToonShadingSpecularFactor
-
View.
setToonShadingSpecularFactor
(specularFactor) Arguments: - specularFactor (
number()
) – None
Sets a scale factor which controls the size of specular highlights when toon shading is enabled. The default value is 1.0.
Return type: void - specularFactor (
setTransparencyMode
-
View.
setTransparencyMode
(mode) Arguments: - mode (
TransparencyMode()
) – None
Sets how transparent objects are blended.
Return type: void - mode (
setViewOrientation
-
View.
setViewOrientation
(orientation, duration[, bounding, preserveModelUp]) Arguments: - orientation (
ViewOrientation()
) – The desired view orientation for the camera. - duration (
number()
) – The number of milliseconds used to transition to the new camera. - bounding (
Box()
) – optional Optional bounding to fit the camera about. If not supplied, the model bounding will be used. - preserveModelUp (
boolean()
) – Indicates whether the camera up will be set according to model up or current camera.
Sets the view to a standard orientation.
Return type: Promise <void> - orientation (
setXRayColor
-
View.
setXRayColor
(element, color, group) Arguments: - element (
ElementType()
) – the type of geometry to apply the color to - color (
Color()
) – the color to apply - group (
XRayGroup()
) – the category of nodes that will be affected. If unspecified, [[XRayGroup.Selected]] will be used.
Sets the color applied to nodes in x-ray mode. By default, the color is unset.
See [[unsetXRayColor]].
Return type: Promise <void> - element (
setXRayOpacity
-
View.
setXRayOpacity
(opacity[, element]) Arguments: - opacity (
number()
) – a number between 0 and 1 - element (
ElementType()
) – optional the type of element to which the opacity will apply. If unspecified, the opacity will apply to all element types.
Sets the opacity of unselected items in x-ray mode.
Return type: Promise <void> - opacity (
setXRayTransparencyMode
-
View.
setXRayTransparencyMode
(mode) Arguments: - mode (
TransparencyMode()
) – None
Sets how transparent (unselected) objects are blended in x-ray mode.
Return type: Promise <void> - mode (
startComparison
-
View.
startComparison
(nodeIdSet1, nodeIdSet2[, config]) Arguments: - nodeIdSet1 (
[number]()
) – the nodes to compare againstnodeIdSet2
- nodeIdSet2 (
[number]()
) – the nodes to compare againstnodeIdSet1
- config (
ComparisonConfig()
) – optional settings controlling the behavior of the comparison
Enables a visual comparison of two sets of nodes. The nodes specified by
nodeIdSet1
are filled with one color, the nodes specified bynodeIdSet2
with another color, and overlapping areas are filled with a third color.See [[endComparison]].
Return type: void - nodeIdSet1 (
testPointVisibility
-
View.
testPointVisibility
(points) Arguments: - points (
[Point3]()
) – The points to test.
Tests whether the given points are visible by comparing them to the depth buffer of the most-recently-drawn frame. Points that are partially obscured by transparent objects are considered visible.
If the test is to be run every time a frame is drawn, [[setPointVisibilityTest]] should be used instead for proper synchronization.
Returns: A list of indices of the visible points. Return type: Promise <[number]> - points (
unprojectPoint
unsetDefaultCamera
-
View.
unsetDefaultCamera
() Unsets the default camera. After this is called the next camera to be set will be the new default
Return type: void
unsetXRayColor
-
View.
unsetXRayColor
(element, group) Arguments: - element (
ElementType()
) – the type of geometry affected by the change - group (
XRayGroup()
) – the category of nodes that will be affected. If unspecified, [[XRayGroup.Selected]] will be used.
Unsets the color applied to selected items in x-ray mode. Selected items will be displayed without overriding their colors.
See [[setXRayColor]].
Return type: Promise <void> - element (