Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Type aliases

Static ArgumentMap

ArgumentMap<T>: {}

Type parameters

  • T: object

Type declaration

Static EventArgs

EventArgs<T, K>: Parameters<EventListener<T, K>>

Type parameters

Static EventListener

EventListener<T, K>: T extends string | symbol ? (...args: any[]) => void : (...args: ArgumentMap<Exclude<T, string | symbol>>[Extract<K, keyof T>]) => void

Type parameters

Static EventNames

EventNames<T>: T extends string | symbol ? T : keyof T

Type parameters

Static ValidEventTypes

ValidEventTypes: string | symbol | object

object should be in either of the following forms:

interface EventTypes {
  'event-with-parameters': any[]
  'event-with-example-handler': (...args: any[]) => void
}

Constructors

constructor

Properties

Private _frustumPlanes

_frustumPlanes: vec4[] = null

Private _height

_height: number = 0

Private _projectionInverseMatrix

_projectionInverseMatrix: mat4 = null

Private _projectionMatrix

_projectionMatrix: mat4 = null

Private _translation

_translation: vec3 = null

Private _viewInverseMatrix

_viewInverseMatrix: mat4 = null

Private _viewMatrix

_viewMatrix: mat4 = null

Private _viewProjectionInverseMatrix

_viewProjectionInverseMatrix: mat4 = null

Private _viewProjectionMatrix

_viewProjectionMatrix: mat4 = null

Private _width

_width: number = 0

Static EventEmitter

EventEmitter: EventEmitterStatic

Static prefixed

prefixed: string | boolean

Methods

addListener

  • addListener<T>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any): this
  • Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any

    Returns this

destroy

  • destroy(): void

emit

  • emit<T>(event: T, ...args: EventEmitter.EventArgs<string | symbol, T>): boolean
  • Calls each of the listeners registered for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • Rest ...args: EventEmitter.EventArgs<string | symbol, T>

    Returns boolean

eventNames

  • eventNames(): Array<EventEmitter.EventNames<string | symbol>>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<EventEmitter.EventNames<string | symbol>>

getAspect

  • getAspect(): number

getDistanceToPoint

  • getDistanceToPoint(pt: vec3): number

getHeight

  • getHeight(): number

getProjectionInverseMatrix

  • getProjectionInverseMatrix(): mat4

getProjectionMatrix

  • getProjectionMatrix(): mat4

getTranslation

  • getTranslation(): vec3

getViewInverseMatrix

  • getViewInverseMatrix(): mat4

getViewMatrix

  • getViewMatrix(): mat4

getViewProjectionInverseMatrix

  • getViewProjectionInverseMatrix(): mat4

getViewProjectionMatrix

  • getViewProjectionMatrix(): mat4

getWidth

  • getWidth(): number

intersectsAABB

  • intersectsAABB(aabb: AABB): boolean
  • Indicates if the camera's frustum intersects with the provided AABB

    Parameters

    • aabb: AABB

      The AABB to check intersection with

    Returns boolean

listenerCount

  • listenerCount(event: EventEmitter.EventNames<string | symbol>): number
  • Return the number of listeners listening to a given event.

    Parameters

    • event: EventEmitter.EventNames<string | symbol>

    Returns number

listeners

  • listeners<T>(event: T): Array<EventEmitter.EventListener<string | symbol, T>>
  • Return the listeners registered for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T

    Returns Array<EventEmitter.EventListener<string | symbol, T>>

off

  • off<T>(event: T, fn?: EventEmitter.EventListener<string | symbol, T>, context?: any, once?: boolean): this
  • Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • Optional fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any
    • Optional once: boolean

    Returns this

on

  • on<T>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any): this
  • Add a listener for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any

    Returns this

once

  • once<T>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any): this
  • Add a one-time listener for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any

    Returns this

removeAllListeners

  • removeAllListeners(event?: EventEmitter.EventNames<string | symbol>): this
  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: EventEmitter.EventNames<string | symbol>

    Returns this

removeListener

  • removeListener<T>(event: T, fn?: EventEmitter.EventListener<string | symbol, T>, context?: any, once?: boolean): this
  • Remove the listeners of a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • Optional fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any
    • Optional once: boolean

    Returns this

resize

  • resize(width: number, height: number): void
  • Resize the camera

    Parameters

    • width: number

      The destination width after resize

    • height: number

      The destination height after resize

    Returns void

screenToWorldPoint

  • screenToWorldPoint(pt: vec3): vec3
  • Converts the provided point from screen space into world space

    Parameters

    • pt: vec3

      A point in screen space

    Returns vec3

setHeight

  • setHeight(value: number): void

setWidth

  • setWidth(value: number): void

Abstract update

  • update(): void

updateFrustum

  • updateFrustum(): void

updateTransforms

  • updateTransforms(mCameraView: mat4, mCameraProjection: mat4): void
  • Updates the internal transforms and matrices

    Parameters

    • mCameraView: mat4

      The view matrix of the camera model

    • mCameraProjection: mat4

      The projection matrix of the camera model

    Returns void

worldToScreenPoint

  • worldToScreenPoint(pt: vec3): vec2
  • Converts the provided point from world space into screen space

    Parameters

    • pt: vec3

      A point in world space

    Returns vec2

Generated using TypeDoc