canvas-toy
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • Default value parameters: object = {}
      • Optional bottom?: number
      • Optional far?: number
      • Optional left?: number
      • Optional near?: number
      • Optional right?: number
      • Optional top?: number

    Returns OrthoCamera

Properties

_asyncFinished

_asyncFinished: Promise = Promise.resolve(this)

_bottom

_bottom: number = -1

_centerVector

_centerVector: Vec3Array = vec3.fromValues(0, 0, -1)

_far

_far: number = 1000

_left

_left: number = -1

_localMatrix

_localMatrix: Mat4Array = mat4.create()

_localPosition

_localPosition: Vec3Array = vec3.create()

_localRotation

_localRotation: QuatArray = quat.create()

_localScaling

_localScaling: Vec3Array = vec3.fromValues(1, 1, 1)

_matrix

_matrix: Mat4Array = mat4.create()

_near

_near: number = 0.001

_parent

_parent: Object3d = null

_position

_position: Vec3Array = vec3.create()

_projectionMatrix

_projectionMatrix: Mat4Array = mat4.create()

_right

_right: number = 1

_rightVector

_rightVector: Vec3Array = vec3.fromValues(1, 0, 0)

_rotation

_rotation: QuatArray = quat.create()

_scaling

_scaling: Vec3Array = vec3.fromValues(1, 1, 1)

_top

_top: number = 1

_upVector

_upVector: Vec3Array = vec3.fromValues(0, 1, 0)

_worldToObjectMatrix

_worldToObjectMatrix: Mat4Array = mat4.create()

children

children: Object3d[] = []

depredations

depredations: string[]

scene

scene: Scene

startEvents

startEvents: Function[] = []

tag

tag: string

updateEvents

updateEvents: Function[] = []

Accessors

bottom

bottom:

centerVector

centerVector:

eyeVector

eyeVector:

far

far:

left

left:

localMatrix

localMatrix:

Get local matrix

localPosition

localPosition:

Get local position

localRotation

localRotation:

Set the rotation globally

localScaling

localScaling:

Get local scaling factor

matrix

matrix:

Get global matrix

near

near:

parent

parent:

Get transform parent of this object

position

position:

Get global position

projectionMatrix

projectionMatrix:

right

right:

rightVector

rightVector:

rotation

rotation:

scaling

scaling:

Get global scaling factor.

top

top:

upVector

upVector:

worldToObjectMatrix

worldToObjectMatrix:

Methods

adaptTargetRadio

  • adaptTargetRadio(target: object): void

asyncFinished

  • asyncFinished(): any

compuseProjectionMatrix

  • compuseProjectionMatrix(): void

deCompuseProjectionMatrix

  • deCompuseProjectionMatrix(): void

genOtherMatrixs

  • genOtherMatrixs(): void

handleUniformProperty

  • handleUniformProperty(): void

lookAt

registStart

  • registStart(updateFunction: Function): this
  • Add on start function, which will be called at start time;

    Parameters

    • updateFunction: Function

    Returns this

registUpdate

  • registUpdate(updateFunction: Function): this
  • Add on update function, which will be called at update time;

    Parameters

    • updateFunction: Function

    Returns this

rotateX

  • rotateX(angle: number): this
  • Rotates specific angle about X axis

    Parameters

    • angle: number

      angle (in radians) to rotate

    Returns this

rotateY

  • rotateY(angle: number): this
  • Rotates specific angle about Y axis

    Parameters

    • angle: number

      angle (in radians) to rotate

    Returns this

rotateZ

  • rotateZ(angle: number): this
  • Rotates specific angle about Z axis

    Parameters

    • angle: number

      angle (in radians) to rotate

    Returns this

setAsyncFinished

  • setAsyncFinished(promise: Promise): void

setLeft

  • setLeft(left: number): void

setLocalPosition

  • setLocalPosition(_localPosition: Vec3Array): this

setLocalRotation

  • setLocalRotation(_localRotation: QuatArray): this

setLocalScaling

  • setLocalScaling(_localScaling: Vec3Array): this

setParent

  • Set transform parent of this object, will also add this to parent‘s children list automatically

    Parameters

    Returns this

setPosition

setProjectionMatrix

  • setProjectionMatrix(projectionMatrix: Mat4Array): this

setRotation

setScaling

setTransformFromParent

  • setTransformFromParent(): this
  • Reset all global transforms { position, rotation, scaling, worldToObjectMatrix } by parent, but keep all local transforms the same before called.

    Returns this

setWorldToObjectMatrix

  • setWorldToObjectMatrix(worldToObjectMatrix: Mat4Array): this

start

  • start(): void

translate

update

  • update(dt: number): void
  • Update object status after next delta time

    Parameters

    • dt: number

      delta time

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc