Class: OrbitControllerExtension
Class: OrbitControllerExtension
Orbit controller extension for camera. Provides basic rotation and movement actions.
Hierarchy
↳
OrbitControllerExtension
Constructors
constructor
• new OrbitControllerExtension(viewerName
, options
): OrbitControllerExtension
Parameters
Name | Type | Description |
---|---|---|
viewerName | string | Owner viewer name for extension. |
options | OrbitExtensionOptions | extension options. |
Returns
Overrides
ControllerExtensionBase.constructor
Properties
controllerDesc
• Readonly
controllerDesc: string
Controller description or name.
Inherited from
ControllerExtensionBase.controllerDesc
controllerIcon
• Readonly
controllerIcon: string
Controller icon name. Icon name will be used by viewer Toolbar UI component for displaying mode buttons.
Inherited from
ControllerExtensionBase.controllerIcon
getName
• getName: () => string
Get unique extension name.
Type declaration
▸ (): string
Get unique extension name.
Returns
string
Inherited from
ControllerExtensionBase.getName
helpDesc
• Readonly
helpDesc: string
Optional description for placing on HelpToolbar.
Inherited from
ControllerExtensionBase.helpDesc
helpIcon
• Readonly
helpIcon: string
Optional icon for placing on HelpToolbar.
Inherited from
ControllerExtensionBase.helpIcon
hideToolbar
• hideToolbar: boolean
Is extension need to hide toolbar or not.
Inherited from
ControllerExtensionBase.hideToolbar
isUpdated
• isUpdated: boolean
Is controller updated or not.
Inherited from
ControllerExtensionBase.isUpdated
state
• state: any
Any extension data which can be stored in browser local storage and restored after (any extension settings, buttons state and so one). State will be saved in local storage with 'tangl-ext-extensionName' key.
Inherited from
type
• Readonly
type: string
Extension type (ext, mode, control)
Inherited from
viewerName
• Readonly
viewerName: string
Owner viewer name.
Inherited from
ControllerExtensionBase.viewerName
Methods
getAzimuthalAngle
▸ getAzimuthalAngle(): number
Gets azimuth camera angle (Theta).
Returns
number
getPolarAngle
▸ getPolarAngle(): number
Gets polar camera angle (Phi).
Returns
number
getRenderManager
▸ getRenderManager(): RenderManager
Get current RenderManager instance.
Returns
Inherited from
ControllerExtensionBase.getRenderManager
getZoomRelationToSceneBounds
▸ getZoomRelationToSceneBounds(): number
Gets current zoom factor relative minZoom, maxZoom and scene bounds.
Returns
number
restoreState
▸ restoreState(): void
Restore extension state from the local storage.
Returns
void
Inherited from
ControllerExtensionBase.restoreState
saveState
▸ saveState(): void
Save extension state in the local storage.
Returns
void
Inherited from
ControllerExtensionBase.saveState
setDollyLimitsFromSceneBounds
▸ setDollyLimitsFromSceneBounds(minSceneSizeCoef?
, maxSceneSizeCoef?
): void
Sets dolly limits relative scene bounds. Coefficient == 1 equals scene boundary sphere diameter.
Parameters
Name | Type | Description |
---|---|---|
minSceneSizeCoef? | number | Minimum dolly coefficient. |
maxSceneSizeCoef? | number | Maximum dolly coefficient. |
Returns
void
setMouseButtonsActions
▸ setMouseButtonsActions(left
, right
, middle
, middleAlt
): void
Sets mouse button bindings for controller actions.
Parameters
Name | Type | Description |
---|---|---|
left | MOUSE | Left button binding. |
right | MOUSE | Right button binding. |
middle | MOUSE | Middle button binding. |
middleAlt | MOUSE | Middle + Alt button binding. |
Returns
void
setRestoreStateHandler
▸ setRestoreStateHandler(handler
): this
Sets external hook handler for restoring extension state in the local storage.
Parameters
Name | Type | Description |
---|---|---|
handler | Function | handler hook function. |
Returns
this
Inherited from
ControllerExtensionBase.setRestoreStateHandler
setSaveStateHandler
▸ setSaveStateHandler(handler
): this
Sets external hook handler for storing extension state in the local storage.
Parameters
Name | Type | Description |
---|---|---|
handler | Function | handler hook function. |
Returns
this
Inherited from
ControllerExtensionBase.setSaveStateHandler
setTouchActions
▸ setTouchActions(one?
, two?
): void
Sets touch button bindings for controller actions.
Parameters
Name | Type | Description |
---|---|---|
one? | TOUCH | Single finger tap binding. |
two? | TOUCH | Two fingers tap binding. |
Returns
void
Hooks
commandChanged
▸ commandChanged(newCommand
): void
Hook when current extension command is changed or finished. Called by ExtensionManager.setCurrentCommandExtension().
Parameters
Name | Type |
---|---|
newCommand | ExtensionBase |
Returns
void
Inherited from
ControllerExtensionBase.commandChanged
dedicatedToolbarRender
▸ dedicatedToolbarRender(container
): void
Render function for rendering dedicated toolbar content.
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Parent DOM container. |
Returns
void
Inherited from
ControllerExtensionBase.dedicatedToolbarRender
sharedToolbarRender
▸ sharedToolbarRender(container
): void
Render function for rendering shared toolbar content.
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Parent DOM container. |
Returns
void
Inherited from
ControllerExtensionBase.sharedToolbarRender
uiRender
▸ uiRender(container
): void
Render function for rendering additional UI above viewer canvas.
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Parent DOM container. |
Returns
void