Перейти к основному содержанию

Class: FlyControllerExtension

Около 2 мин

Class: FlyControllerExtension

Fly controller extension for camera. Provides walk/fly movement and rotation actions.

Hierarchy

Constructors

constructor

new FlyControllerExtension(viewerName, options): FlyControllerExtension

Parameters

NameTypeDescription
viewerNamestringOwner viewer name for extension.
optionsFlyExtensionOptionsextension options.

Returns

FlyControllerExtension

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

ControllerExtensionBase.state


type

Readonly type: string

Extension type (ext, mode, control)

Inherited from

ControllerExtensionBase.type


viewerName

Readonly viewerName: string

Owner viewer name.

Inherited from

ControllerExtensionBase.viewerName

Methods

getRenderManager

getRenderManager(): RenderManager

Get current RenderManager instance.

Returns

RenderManager

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

NameTypeDescription
leftMOUSELeft button binding.
rightMOUSERight button binding.
middleMOUSEMiddle button binding.

Returns

void


setRestoreStateHandler

setRestoreStateHandler(handler): void

Sets external hook handler for restoring extension state in the local storage.

Parameters

NameTypeDescription
handlerFunctionhandler hook function.

Returns

void

Inherited from

ControllerExtensionBase.setRestoreStateHandler


setSaveStateHandler

setSaveStateHandler(handler): void

Sets external hook handler for storing extension state in the local storage.

Parameters

NameTypeDescription
handlerFunctionhandler hook function.

Returns

void

Inherited from

ControllerExtensionBase.setSaveStateHandler

Hooks

commandChanged

commandChanged(newCommand): void

Hook when current extension command is changed or finished. Called by ExtensionManager.setCurrentCommandExtension().

Parameters

NameType
newCommandExtensionBase

Returns

void

Inherited from

ControllerExtensionBase.commandChanged


dedicatedToolbarRender

dedicatedToolbarRender(container): void

Render function for rendering dedicated toolbar content.

Parameters

NameTypeDescription
containerHTMLElementParent DOM container.

Returns

void

Inherited from

ControllerExtensionBase.dedicatedToolbarRender


sharedToolbarRender

sharedToolbarRender(container): void

Render function for rendering shared toolbar content.

Parameters

NameTypeDescription
containerHTMLElementParent DOM container.

Returns

void

Inherited from

ControllerExtensionBase.sharedToolbarRender


uiRender

uiRender(container): void

Render function for rendering additional UI above viewer canvas.

Parameters

NameTypeDescription
containerHTMLElementParent DOM container.

Returns

void

Inherited from

ControllerExtensionBase.uiRender