Options
All
  • Public
  • Public/Protected
  • All
Menu

Class A3DSceneView<NodeModelType, SceneModelType>

Type parameters

Hierarchy

  • ASceneView<NodeModelType, SceneModelType>
    • A3DSceneView

Index

Constructors

constructor

  • new A3DSceneView<NodeModelType, SceneModelType>(): A3DSceneView<NodeModelType, SceneModelType>

Properties

Protected _cameraThreeObject

_cameraThreeObject: Camera

Protected _eventCallbackDicts

_eventCallbackDicts: {} = {}

Type declaration

Protected _recordNextFrame

_recordNextFrame: boolean = false

Protected _recordNextFrameCallback

_recordNextFrameCallback: (imageBlob: null | Blob) => void

Type declaration

    • (imageBlob: null | Blob): void
    • Parameters

      • imageBlob: null | Blob

      Returns void

Protected _subscriptions

_subscriptions: {} = {}

Type declaration

backgroundElement

backgroundElement: ABackgroundSelectionElement

Protected backgroundOrder

backgroundOrder: BackgroundOrder = ...

controller

controller: ASceneController<NodeModelType, SceneModelType>

controls

controls: any

Protected elements

elements: {} = {}

Type declaration

renderer

renderer: WebGLRenderer

state

state: {} = {}

Type declaration

  • [name: string]: any

threejs

threejs: Scene

The three.js object for this view. Should be a subclass of THREE.Object3D

uid

uid: string

Static AObjectStateKeys

AObjectStateKeys: string[] = []

Static AObjectVersion

AObjectVersion: number = 1

Static BackgroundOrder

BackgroundOrder: typeof BackgroundOrder = ...

Accessors

ClassConstructor

  • get ClassConstructor(): typeof AObject

backgroundThreeJSObject

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

camera

model

serializationLabel

  • get serializationLabel(): any

stateSnapshop

  • get stateSnapshop(): {}

Private threeCamera

  • get threeCamera(): Camera

Methods

CreateView

_getEventCallbackDict

_getListeners

  • _getListeners(): {}

Protected _initBackgroundElement

  • _initBackgroundElement(): void

_initLighting

  • _initLighting(): void

_removeElement

_saveSingleFrameCallback

  • _saveSingleFrameCallback(imageBlob: null | Blob): void

Protected _updateBackgroundElement

  • _updateBackgroundElement(): void

activateSubscription

  • activateSubscription(name: string): void

addChildView

addElement

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

bindMethods

  • bindMethods(): void

clearSubscriptions

  • clearSubscriptions(): void

deactivateSubscription

  • deactivateSubscription(name: string): void

dispose

  • dispose(): void

getDOMElement

  • getDOMElement(): HTMLCanvasElement

getElementList

init

  • init(): void

initGraphics

  • initGraphics(): void

initOrbitControls

  • initOrbitControls(): void

initRenderer

  • initRenderer(parameters?: {}): void

initTrackballControls

  • initTrackballControls(): void

mapOverElements

  • mapOverElements(fn: (element: ARenderObject) => void | any[]): (void | any[])[]

moveElementToBack

onCameraPoseUpdate

  • onCameraPoseUpdate(): void

onCameraProjectionUpdate

  • onCameraProjectionUpdate(): void

onWindowResize

  • onWindowResize(width: number, height: number): void

recordNextFrame

  • recordNextFrame(callback?: (imageBlob: null | Blob) => void): void

removeChildView

removeEventListener

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

removeListener

  • removeListener(handle: string): void

render

  • render(): void

setBackgroundColor

  • setBackgroundColor(color: Color): void

setBackgroundOrder

  • setBackgroundOrder(order: BackgroundOrder): void
  • Should be one of the BackgroundOrder enums ("Back" or "Front"); background order determines whether the background is in front or behind other scenevis content. This is important for determining whether clicks that overlap scenevis objects should be directed at the scenevis object as a target or the background.

    IMPORTANT! The convention is that background order should be "Back" by default. This means that unless an interaction mode switches the background order to "Front", it should be "Back". This also means that when an interaction mode that uses "Front" mode gets deactivated, it should switch things back to "Back".

    Parameters

    • order: BackgroundOrder

    Returns void

setSkyBoxToSpace

  • setSkyBoxToSpace(): void

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