Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AParticlesController<T>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

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: T

Protected _modelDisposedListener

_modelDisposedListener: ACallbackSwitch

Protected _sceneController

Protected _subscriptions

_subscriptions: {} = {}

Type declaration

state

state: {} = {}

Type declaration

  • [name: string]: any

uid

uid: string

view

Static AObjectStateKeys

AObjectStateKeys: string[] = []

Static AObjectVersion

AObjectVersion: number = 1

Accessors

ClassConstructor

  • get ClassConstructor(): typeof AObject

appState

interactionMode

model

  • get model(): NodeModelType

sceneController

serializationLabel

  • get serializationLabel(): any

stateSnapshop

  • get stateSnapshop(): {}

Methods

_getEventCallbackDict

_getListeners

  • _getListeners(): {}

_initMock

  • _initMock(model: T): void

activateInteractions

  • activateInteractions(): void

activateSubscription

  • activateSubscription(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

enableSelectionMode

  • enableSelectionMode(): void

getContextDOMElement

  • getContextDOMElement(): HTMLCanvasElement

getInteractionMode

getParent

init

initInteractions

  • initInteractions(): void

initView

  • initView(): void

isInteractionModeDefined

  • isInteractionModeDefined(name: string): boolean

onKeyDown

removeEventListener

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

removeListener

  • removeListener(handle: string): void

setCurrentInteractionMode

  • setCurrentInteractionMode(name?: string): void

setModel

signalEvent

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

subscribe

toJSON

  • toJSON(): {}

unsubscribe

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

Static CreateWithState

  • CreateWithState(state: {}): AObject

Static SerializationLabel

  • SerializationLabel(): any

Static fromJSON

Generated using TypeDoc