Class: RenderManager
Class: RenderManager
Perform SceneManager`s scene rendering via Three.js WebGL wrapper.
Hierarchy
↳
RenderManager
Constructors
constructor
• new RenderManager(name
, sceneManager
, metaManager?
, skyDataUrls?
): RenderManager
Parameters
Name | Type | Description |
---|---|---|
name | string | Name of the renderer. Must be unique. |
sceneManager | SceneManager | SceneManager for renderer. |
metaManager? | MetaManager | Optional MetaManager. Used for possible additional operations with metadata. |
skyDataUrls? | ISkyDataUrls | Optional skyDataUrls. Used for sky rendering. |
Returns
Overrides
Properties
ac
• ac: AbortController
Abort controller. Use to control external event listeners by render manager.
Inherited from
camera
• camera: PerspectiveCamera
| OrthographicCamera
Main renderer camera
Inherited from
cameraTarget
• cameraTarget: Vector3
Target point for viewer camera. Need for various transformation actions like orbit.
Inherited from
RenderManagerBase.cameraTarget
cubeControl
• cubeControl: CubeControl
CubeControl instance.
Inherited from
defaultPixelRatio
• defaultPixelRatio: number
Default device pixel ratio.
Inherited from
RenderManagerBase.defaultPixelRatio
extMan
• Readonly
extMan: ExtensionsManager
ExtensionsManager instance for renderer.
Inherited from
helpersScene
• helpersScene: Scene
Scene for additional 3D graphic. Always draw above main scene without Z sorting. Can be used by extensions.
Inherited from
RenderManagerBase.helpersScene
hoveredElNum
• hoveredElNum: number
Hovered element number.
Inherited from
RenderManagerBase.hoveredElNum
inactiveColor
• inactiveColor: ColorRepresentation
Color for inactive elements.
Inherited from
RenderManagerBase.inactiveColor
inactiveContrast
• inactiveContrast: number
Inactive layer contrast coefficient (more is high contrast). Must be greater than zero.
Inherited from
RenderManagerBase.inactiveContrast
inactiveDarkness
• inactiveDarkness: number
Inactive layer darkness coefficient (more is high darkness).
Inherited from
RenderManagerBase.inactiveDarkness
inactiveFrontOpacity
• inactiveFrontOpacity: number
Inactive layer front opacity coefficient (more is high opacity`).
Inherited from
RenderManagerBase.inactiveFrontOpacity
interactivePixelRatio
• interactivePixelRatio: number
Pixel ratio for interactive render mode (with navigation).
Inherited from
RenderManagerBase.interactivePixelRatio
isInteractive
• isInteractive: boolean
Is interactive mode (with simple graphic) in progress.
Inherited from
RenderManagerBase.isInteractive
isMultiselectClick
• isMultiselectClick: boolean
If enabled then each click action on the element adds it to selection set.
Inherited from
RenderManagerBase.isMultiselectClick
isMultiselectTouch
• isMultiselectTouch: boolean
If enabled then each touch action on the element adds it to selection set.
Inherited from
RenderManagerBase.isMultiselectTouch
isNavigation
• isNavigation: boolean
Is navigation in progress.
Inherited from
RenderManagerBase.isNavigation
isTouchDevice
• isTouchDevice: boolean
Is view devise is touch device.
keymapTools
• keymapTools: KeymapTools
Tools for generate and restore viewpoint state.
Inherited from
labelTools
• labelTools: LabelTools
Tools for creating and displaying labels in 3d space.
Inherited from
metaManager
• metaManager: MetaManager
MetaManager instance.
Inherited from
mouse
• mouse: Vector2
Mouse coordinates with center origin and boundary range from -1 to 1.
Inherited from
mousePointer
• mousePointer: Vector2
Mouse coordinates with screen origin and screen boundary.
Inherited from
RenderManagerBase.mousePointer
name
• Readonly
name: string
Unique name of the manager.
Inherited from
picker
• picker: Picker
Points on faces and vertices visual picker.
Inherited from
renderer
• renderer: WebGLRenderer
WebGLRenderer instance.
Inherited from
sceneManager
• sceneManager: SceneManager
SceneManager instance for renderer.
Inherited from
RenderManagerBase.sceneManager
selectionColor
• selectionColor: ColorRepresentation
Color for selection layer.
Inherited from
RenderManagerBase.selectionColor
selectionOpacity
• selectionOpacity: number
Opacity for selection layer.
Inherited from
RenderManagerBase.selectionOpacity
state
• state: RenderManagerState
State with settings for RenderManager.
Overrides
stateMat
• Protected
stateMat: ShaderMaterial
Shader for highlighting hovered and selected elements.
Inherited from
staticPixelRatio
• staticPixelRatio: number
Pixel ratio for static render mode (without navigation).
Inherited from
RenderManagerBase.staticPixelRatio
subScene
• subScene: Scene
Scene for additional 3D graphic. Can be used by extensions.
Inherited from
viewerElement
• viewerElement: HTMLElement
DOM Element with attached viewer.
Inherited from
RenderManagerBase.viewerElement
viewpointTools
• viewpointTools: ViewpointTools
Tools for generate and restore viewpoint state.
Inherited from
RenderManagerBase.viewpointTools
Methods
addAutoEventListener
▸ addAutoEventListener(eventType
, eventListener
): void
Add event listener with automatic dispose.
Parameters
Name | Type | Description |
---|---|---|
eventType | RenderEvents | event type. |
eventListener | EventListenerOrEventListenerObject | event listener. |
Returns
void
Inherited from
RenderManagerBase.addAutoEventListener
destroy
▸ destroy(): void
Destroy renderer and dispose all depending assets
Returns
void
Overrides
RenderManagerBase.destroy
getBackgroundColor
▸ getBackgroundColor(): ColorRepresentation
Get background color on renderer area.
Returns
ColorRepresentation
Inherited from
RenderManagerBase.getBackgroundColor
getCameraZoomBySceneBounds
▸ getCameraZoomBySceneBounds(boundsCoef?
): number
Get zoom value for scene bounds with given bounds Coefficient.
Parameters
Name | Type | Description |
---|---|---|
boundsCoef? | number | scale coefficient for scene bounds. |
Returns
number
Inherited from
RenderManagerBase.getCameraZoomBySceneBounds
getContinuesUpdate
▸ getContinuesUpdate(): boolean
Get the continuous update mode.
Returns
boolean
Inherited from
RenderManagerBase.getContinuesUpdate
init
▸ init(domElementId
, cubeControlDomElementId?
, createToolbar?
): void
Init renderer for chosen DOM element id.
Parameters
Name | Type | Description |
---|---|---|
domElementId | string | DOM element id for renderer attaching. |
cubeControlDomElementId? | string | DOM element id for navigation cube control renderer attaching. |
createToolbar? | boolean | create toolbar UI or not. |
Returns
void
Overrides
onResize
▸ onResize(): void
Force rebuild render targets on canvas resize or antialiasing changing.
Returns
void
Overrides
RenderManagerBase.onResize
requestUpdate
▸ requestUpdate(forceUpdateRender?
): void
Make request for new animation iteration or/and render new frame.
Parameters
Name | Type | Description |
---|---|---|
forceUpdateRender? | boolean | is we need to render new frame. |
Returns
void
Overrides
RenderManagerBase.requestUpdate
setBackgroundColor
▸ setBackgroundColor(color
): void
Set background color on renderer area.
Parameters
Name | Type |
---|---|
color | ColorRepresentation |
Returns
void
Inherited from
RenderManagerBase.setBackgroundColor
setCameraFov
▸ setCameraFov(fov
): void
Sets camera field of view.
Parameters
Name | Type | Description |
---|---|---|
fov | number | field of view. |
Returns
void
Inherited from
RenderManagerBase.setCameraFov
setCameraMode
▸ setCameraMode(perspective
): boolean
Sets camera mode (perspective or orthogonal).
Parameters
Name | Type | Description |
---|---|---|
perspective | boolean | perspective mode enabled or not. |
Returns
boolean
Actual camera mode after applying.
Inherited from
RenderManagerBase.setCameraMode
setContinuesUpdate
▸ setContinuesUpdate(continuesUpdate
): void
Set the continuous update mode. Used for any animation that requires continuous frame refresh, such as flying.
Parameters
Name | Type | Description |
---|---|---|
continuesUpdate | boolean | continues update mode flag. |
Returns
void
Inherited from
RenderManagerBase.setContinuesUpdate
setManualNavigation
▸ setManualNavigation(manualNavigation
): void
Set navigation hooks state (if manual navigation is on then call of "updated" navigation hook will be ignored).
Parameters
Name | Type |
---|---|
manualNavigation | boolean |
Returns
void
Inherited from
RenderManagerBase.setManualNavigation
setSelectionLock
▸ setSelectionLock(selectionLocked
): void
Set selection and hover lock mode.
Parameters
Name | Type | Description |
---|---|---|
selectionLocked | boolean | selection lock flag. |
Returns
void
Inherited from
RenderManagerBase.setSelectionLock
updateClippingPlanes
▸ updateClippingPlanes(planes
): void
Update clipping planes for renderer shaders (state shader).
Parameters
Name | Type | Description |
---|---|---|
planes | Plane [] | New clipping planes. |
Returns
void
updateHover
▸ updateHover(elNum?
): void
Updates hover state visual on render canvas.
Parameters
Name | Type | Description |
---|---|---|
elNum? | number | Element number for setting hover state. |
Returns
void
Inherited from
zoomCameraToBox
▸ zoomCameraToBox(box
, fitRatio?
): void
Zoom camera to given boundary box.
Parameters
Name | Type | Description |
---|---|---|
box | Box3 | boundary box. |
fitRatio? | number | scale coefficient for zoom. |
Returns
void
Inherited from
RenderManagerBase.zoomCameraToBox
zoomCameraToElements
▸ zoomCameraToElements(elNums
, fitRatio?
): void
Zoom camera to boundaries by given element numbers.
Parameters
Name | Type | Description |
---|---|---|
elNums | number [] | element numbers. |
fitRatio? | number | scale coefficient for zoom. |
Returns
void
Inherited from
RenderManagerBase.zoomCameraToElements
zoomCameraToSelection
▸ zoomCameraToSelection(fitRatio?
): void
Zoom camera to scene boundaries if no elements selected or zoom to selected elements boundaries.
Parameters
Name | Type | Description |
---|---|---|
fitRatio? | number | scale coefficient for zoom. |
Returns
void
Inherited from
RenderManagerBase.zoomCameraToSelection
Hooks
navigationChanged
▸ navigationChanged(): void
Hook for changing controller navigation. Called by current controller extensions "updated" hook. Also dispatch "navchange" viewer event
Returns
void
Inherited from
RenderManagerBase.navigationChanged
navigationEnded
▸ navigationEnded(): void
Hook for ending controller navigation. Called by current controller extension. Also dispatch "navstart" viewer event
Returns
void
Inherited from
RenderManagerBase.navigationEnded
navigationStarted
▸ navigationStarted(): void
Hook for starting controller navigation. Called by current controller extension. Also dispatch "navstart" viewer event.
Returns
void