Options
All
  • Public
  • Public/Protected
  • All
Menu

Class A3DSceneController<NodeModelType, SceneModelType>

Type parameters

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected _camera

_camera: ACamera

Protected _cameraNode

_cameraNode: ACameraNodeModel

Protected _clock

_clock: AClock

Protected _currentInteractionModeName

_currentInteractionModeName: string

Right now, controllers are restricted to having one or zero active modes at a time. The name of the current mode, which can be active or inactive, is stored here.

Protected _eventCallbackDicts

_eventCallbackDicts: {} = {}

Type declaration

Protected _interactions

_interactions: AInteractionModeMap

Interaction mode map. Has a .modes property that maps mode names to AInteractionModes.

Protected _model

_model: SceneModelType

Protected _modelDisposedListener

_modelDisposedListener: ACallbackSwitch

Protected _sceneCamera

_sceneCamera: ACamera

Protected _subscriptions

_subscriptions: {} = {}

Type declaration

_threeInteraction

_threeInteraction: any

Private _usesThreeInteractive

_usesThreeInteractive: undefined | boolean

whether or not modified three.interactive-based interactions are enabled (e.g., for click and drag interactions)

aspectRatio

aspectRatio: number

classMap

classMap: AMVCMap

container

container: HTMLElement

nodeControllers

nodeControllers: {} = {}

Type declaration

Protected selectionController

selectionController: ASelectionController<NodeModelType, ASelectionModel<NodeModelType>>

state

state: {} = {}

Type declaration

  • [name: string]: any

supControllers

supControllers: {} = {}

Type declaration

uid

uid: string

view

view: A3DSceneView<NodeModelType, SceneModelType>

Static AObjectStateKeys

AObjectStateKeys: string[] = []

Static AObjectVersion

AObjectVersion: number = 1

Accessors

ClassConstructor

  • get ClassConstructor(): typeof AObject

appState

backgroundThreeJSObject

  • get backgroundThreeJSObject(): Mesh<BufferGeometry, Material | Material[]>

camera

cameraNode

guiModelOptions

  • get guiModelOptions(): {}

guiModelOptionsList

  • get guiModelOptionsList(): string[]

interactionMode

model

  • get model(): SceneModelType

sceneCamera

sceneController

  • get sceneController(): this

serializationLabel

  • get serializationLabel(): any

stateSnapshop

  • get stateSnapshop(): {}

threeCamera

  • get threeCamera(): Camera

usesThreeInteractive

  • get usesThreeInteractive(): undefined | boolean

Methods

CreateView

InstantiateNewCamera

_getEventCallbackDict

_getListeners

  • _getListeners(): {}

_initMock

  • _initMock(model: SceneModelType): void

activateInteractions

  • activateInteractions(): void

activateSubscription

  • activateSubscription(name: string): void

addCameraPoseListener

addCameraProjectionListener

addClassSpec

addClassSpecs

addControlType

  • addControlType(controlClass: ClassInterface<APlayerControlsBase>, name?: string): void

addEventListener

  • addEventListener(eventName: string, callback: (...args: any[]) => void, handle?: string): AEventCallbackSwitch

addEventListeners

  • addEventListeners(eventName: string, callbacks: ((...args: any[]) => void)[], handle?: string): AEventCallbackSwitch

addInteraction

addKeyboardEventConsoleListener

  • addKeyboardEventConsoleListener(): void

addKeyboardInteraction

addOneTimeEventListener

  • addOneTimeEventListener(eventName: string, callback: (...args: any[]) => void, handle?: string): AEventCallbackSwitch

addStateKeyListener

  • addStateKeyListener(state_key: string, callback: (self: AObject) => void, handle?: string, synchronous?: boolean): AStateCallbackSwitch
  • Sets a callback function to be called whenever the state specified in state_key changes. The return value callbackSwitch is a callback switch. You can activate the listener with callbackSwitch.activate() and deactive with callbackSwitch.deactivate(). Example Usage:

    var callbackswitch = model.addStateKeyListener('name',()=>{
    n_name_changes = n_name_changes+1;
    })

    Parameters

    • state_key: string

      the name of the state to listen to

    • callback: (self: AObject) => void

      the callback to be executed when state changes

    • Optional handle: string

      the handle / unique identifier for

    • synchronous: boolean = true

      whether callbacks should happen synchronously or allow for batching

    Returns AStateCallbackSwitch

addStateListener

  • addStateListener(callback: (self: AObject) => void, handle?: string, synchronous?: boolean): AStateCallbackSwitch

addTimedAction

  • addTimedAction(callback: (actionProgress: number) => any, duration: number, actionOverCallback?: CallbackType, tween?: BezierTween, handle?: string): void
  • If you provide a handle, then the action will not call so long as an existing subscription by that handle exists. This means that you won't duplicate the action before one has finished previously.

    Parameters

    • callback: (actionProgress: number) => any
        • (actionProgress: number): any
        • Parameters

          • actionProgress: number

          Returns any

    • duration: number
    • Optional actionOverCallback: CallbackType
    • Optional tween: BezierTween
    • Optional handle: string

    Returns void

clearInteractionMode

  • clearInteractionMode(name: string): void

clearSubscriptions

  • clearSubscriptions(): void

deactivateSubscription

  • deactivateSubscription(name: string): void

defineInteractionMode

dispose

  • dispose(): void

getContextDOMElement

  • getContextDOMElement(): HTMLCanvasElement

getControlPanelSpecs

  • getControlPanelSpecs(): any

getDOMElement

  • getDOMElement(): HTMLCanvasElement

getInteractionMode

getModelClassSpec

getNodeControllerForModel

getSelectedModelController

getSelectionController

init

  • init(sceneModel: SceneModelType, sceneView?: ASceneView<NodeModelType, SceneModelType>): void

initCameraControls

  • initCameraControls(): void

initClassSpec

  • initClassSpec(): void

initDefaultScene

  • initDefaultScene(): void

initInteractions

  • initInteractions(): void

initSceneCamera

  • initSceneCamera(): void

initSelectionController

  • initSelectionController(): void

initView

  • initView(): void

isInteractionModeDefined

  • isInteractionModeDefined(name: string): boolean

normalizedToViewCoordinates

  • normalizedToViewCoordinates(v: Vec2): Vec2

onKeyDown

onNodeAdded

  • onNodeAdded(newModel: NodeModelType): void

onWindowResize

  • onWindowResize(): void

registerController

registerSupController

removeEventListener

  • removeEventListener(eventName: string, handle: string): void

removeListener

  • removeListener(handle: string): void

render

  • render(): void

selectModel

setCamera

setCurrentInteractionMode

  • setCurrentInteractionMode(name?: string | HasNameInGUI): void

setModel

  • setModel(sceneModel: SceneModelType): void

signalCameraPoseUpdate

  • signalCameraPoseUpdate(): void

signalCameraProjectionUpdate

  • signalCameraProjectionUpdate(): void

signalEvent

  • signalEvent(eventName: string, ...args: any[]): void

subscribe

toJSON

  • toJSON(): {}

unsubscribe

  • unsubscribe(name: string, errorIfAbsent?: boolean): void

viewToNormalizedCoordinates

  • viewToNormalizedCoordinates(v: Vec2): Vec2

Static CreateWithState

  • CreateWithState(state: {}): AObject

Static SerializationLabel

  • SerializationLabel(): any

Static fromJSON

Generated using TypeDoc