Options
All
  • Public
  • Public/Protected
  • All
Menu

time passed is tiem-refStart Pausing

Hierarchy

Index

Constructors

constructor

Properties

Protected _eventCallbackDicts

_eventCallbackDicts: {} = {}

Type declaration

Protected _lastClockTimeUpdated

_lastClockTimeUpdated: number = 0

Protected _lastPauseStateChange

_lastPauseStateChange: number = 0

Protected _lastUpdate

_lastUpdate: number = 0

Protected _offset

_offset: number = 0

Protected _paused

_paused: boolean = false

Protected _periodInMilliseconds

_periodInMilliseconds: number = ...

Protected _refStart

_refStart: number = 0

Protected _subscriptions

_subscriptions: {} = {}

Type declaration

state

state: {} = {}

Type declaration

  • [name: string]: any

time

time: number

uid

uid: string

Static AObjectStateKeys

AObjectStateKeys: string[] = []

Static AObjectVersion

AObjectVersion: number = 1

Accessors

ClassConstructor

  • get ClassConstructor(): typeof AObject

lastTimeUpdated

  • get lastTimeUpdated(): number

paused

  • get paused(): boolean
  • set paused(value: boolean): void

rate

  • get rate(): number
  • set rate(v: number): void

serializationLabel

  • get serializationLabel(): any

stateSnapshop

  • get stateSnapshop(): {}

Methods

CreateTimedAction

  • CreateTimedAction(callback: (actionProgress: number) => any, duration: number, actionOverCallback: CallbackType, tween?: BezierTween): AStateCallbackSwitch
  • IMPORTANT! If you want to remove the listener at the end of the action you need to do so in the actionOverCallback!

    Parameters

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

          • actionProgress: number

          Returns any

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

    Returns AStateCallbackSwitch

_getEventCallbackDict

_getListeners

  • _getListeners(): {}

_getNow

  • _getNow(): number

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

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

addTimeListener

  • addTimeListener(callback: (t: number) => any, handle?: string): AStateCallbackSwitch
  • Parameters

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

          • t: number

          Returns any

    • Optional handle: string

    Returns AStateCallbackSwitch

clearSubscriptions

  • clearSubscriptions(): void

deactivateSubscription

  • deactivateSubscription(name: string): void

dispose

  • dispose(): void

initClockSubscription

  • initClockSubscription(): void

pause

  • pause(): void

play

  • play(): void

removeEventListener

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

removeListener

  • removeListener(handle: string): void

reset

  • reset(t0?: number): void

signalEvent

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

subscribe

toJSON

  • toJSON(): {}

unsubscribe

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

update

  • update(t: number): void

Static CreateWithState

  • CreateWithState(state: {}): AObject

Static SerializationLabel

  • SerializationLabel(): any

Static fromJSON

Generated using TypeDoc