Class: FlyControllerExtension
Class: FlyControllerExtension
Fly controller extension for camera. Provides walk/fly movement and rotation actions.
Hierarchy
↳
FlyControllerExtension
Constructors
constructor
• new FlyControllerExtension(viewerName
, options
): FlyControllerExtension
Parameters
Name | Type | Description |
---|---|---|
viewerName | string | Owner viewer name for extension. |
options | FlyExtensionOptions | 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
maxPolarAngle
• maxPolarAngle: number
How far you can orbit vertically, upper and lower in radians(range is 0 to Math.PI radians).
minPolarAngle
• minPolarAngle: number
How near you can orbit vertically, upper and lower in radians(range is 0 to Math.PI radians).
pointerSpeed
• pointerSpeed: number
Speed of camera movement.
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
getRenderManager
▸ getRenderManager(): RenderManager
Get current RenderManager instance.
Returns
Inherited from
ControllerExtensionBase.getRenderManager
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
setMouseButtonsActions
▸ setMouseButtonsActions(left
, right
, middle
): 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. |
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
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