Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Base2DAppAppState

Hierarchy

Index

Constructors

constructor

Properties

Protected _clockID

_clockID: number

_currentMaterialName

_currentMaterialName: string

_currentNewModelTypeName

_currentNewModelTypeName: string

Protected _eventCallbackDicts

_eventCallbackDicts: {} = {}

Type declaration

_guiKey

_guiKey: string

_isCreatingShape

_isCreatingShape: boolean

_lastFrameInterval

_lastFrameInterval: number = 0

Protected _paused

_paused: boolean

Protected _subscriptions

_subscriptions: {} = {}

Type declaration

_time

_time: number

appClock

appClock: AClock

creatingNew

creatingNew: boolean

sceneControllers

sceneControllers: {} = {}

Get set selectedModel

Type declaration

sceneModel

selectedColor

selectedColor: Color

selectionModel

state

state: {} = {}

Type declaration

  • [name: string]: any

uid

uid: string

Static AObjectStateKeys

AObjectStateKeys: string[] = []

Static AObjectVersion

AObjectVersion: number = 1

Static SceneControllerIDs

SceneControllerIDs: typeof SceneControllerIDs = ...

Accessors

ClassConstructor

  • get ClassConstructor(): typeof AObject

currentMaterialModel

currentMaterialName

  • get currentMaterialName(): string
  • set currentMaterialName(value: string): void

currentNewModelType

  • get currentNewModelType(): any

currentNewModelTypeName

  • get currentNewModelTypeName(): string
  • set currentNewModelTypeName(value: string): void

materials

modelSelection

  • get modelSelection(): NodeModelType[]

selectedModels

  • get selectedModels(): NodeModelType[]

selectionSubscriptionIsActive

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

serializationLabel

  • get serializationLabel(): any

stateSnapshop

  • get stateSnapshop(): {}

timeSinceLastFrame

  • get timeSinceLastFrame(): number

Methods

AppComponent

CreateMaterial

CreateTestSquare

NewNode

NewSceneModel

  • NewSceneModel(): Base2DAppSceneModel

_addGroundPlane

  • _addGroundPlane(): void

_addStartingPointLight

  • _addStartingPointLight(): void

_getEventCallbackDict

_getListeners

  • _getListeners(): {}

Protected _getSpecSceneController

activateSubscription

  • activateSubscription(name: string): void

addClockListener

  • addClockListener(callback: (t: number) => any): AStateCallbackSwitch

addDefaultNode

  • addDefaultNode(color?: Color, position?: Vec2, ...args: any[]): Promise<void>

addEventListener

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

addEventListeners

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

addModelAndLights

  • addModelAndLights(): Promise<void>

addOneTimeEventListener

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

addSVG

  • addSVG(name: string, svgText: string): void

addSceneController

addSceneControllerClass

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

addTestSquare

  • addTestSquare(sideLength?: number, position?: Vec2, color?: Color): void

clearSubscriptions

  • clearSubscriptions(): void

deactivateSubscription

  • deactivateSubscription(name: string): void

dispose

  • dispose(): void

freezeSelection

  • freezeSelection(): void

getControlPanelStandardSpec

  • getControlPanelStandardSpec(): {}

getModelControlSpecs

  • getModelControlSpecs(): {}

handleSceneGraphSelection

  • handleSceneGraphSelection(m: any): void

imageUploaded

  • imageUploaded(name: string, texture: Texture): void

init

  • init(): void

initSceneModel

  • initSceneModel(): Promise<void>

initSelection

  • initSelection(): void

loadModelFromURL

  • loadModelFromURL(path: string, callback: (obj: Object3D) => void): void

modelUploaded

onAnimationFrameCallback

  • onAnimationFrameCallback(): void

onSelectionChanged

pauseClock

  • pauseClock(): void

removeEventListener

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

removeListener

  • removeListener(handle: string): void

selectModel

setInteractionMode

  • setInteractionMode(modeName?: string): void

setIsCreatingShape

  • setIsCreatingShape(v: boolean): void

setNodeMaterial

signalEvent

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

subscribe

toJSON

  • toJSON(): {}

toggleClockPause

  • toggleClockPause(): void

triggerGUIUpdate

  • triggerGUIUpdate(): void

unfreezeSelection

  • unfreezeSelection(): void

unpauseClock

  • unpauseClock(): void

unsubscribe

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

Static CreateWithState

  • CreateWithState(state: {}): AObject

Static GetAppState

Static SerializationLabel

  • SerializationLabel(): any

Static SetAppState

Static fromJSON

Generated using TypeDoc