Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Private _camera

_camera: Camera = ...

The current camera that is being used to render the scene.

callbacks

callbacks: TickerCallbacks = ...

TICKER CALLBACKS

isMounted

isMounted: boolean = false

Optional pointer

pointer: PointerEvents

The pointer events system.

Static exposedProperties

exposedProperties: string[] = ...

A list of properties that can also be set through attributes on the element's tag. Attribute names are expected to be kebab-cased versions of the original property names (eg. "renderTick" can be set through the attribute "render-tick".)

Accessors

backgroundColor

  • set backgroundColor(v: string): void
  • Background color of the scene.

    Parameters

    • v: string

    Returns void

camera

  • get camera(): Camera
  • set camera(camera: Camera): void
  • Returns Camera

  • Parameters

    • camera: Camera

    Returns void

frameTick

  • Returns undefined | string | TickerFunction

  • Parameters

    Returns void

game

  • Returns the instance of ThreeGame that this element is nested under.

    Returns ThreeGame

htmlTagName

  • get htmlTagName(): string
  • Returns this element's tag name, formatted as an actual HTML tag (eg. "").

    Returns string

lateTick

  • Returns undefined | string | TickerFunction

  • Parameters

    Returns void

object

  • get object(): undefined | T
  • set object(v: undefined | T): void
  • The THREE.* object managed by this element.

    Returns undefined | T

  • The THREE.* object managed by this element.

    Parameters

    • v: undefined | T

    Returns void

renderTick

  • Returns undefined | string | TickerFunction

  • Parameters

    Returns void

scene

  • Returns the instance of ThreeScene that this element is nested under.

    Returns ThreeScene

tick

  • Returns undefined | string | TickerFunction

  • Parameters

    Returns void

Methods

Protected addObjectToParent

  • addObjectToParent(): void

applyAllAttributes

  • applyAllAttributes(): void
  • Helper method that will make sure all attributes set on the element are passed through attributeChangedCallback. We mostly need this because of how we're not using observedAttributes.

    Returns void

attributeChangedCallback

  • attributeChangedCallback(key: string, oldValue: any, newValue: any): boolean

connectedCallback

  • connectedCallback(): void

Protected constructWrappedObject

  • constructWrappedObject(): undefined | Scene

Protected debug

  • debug(...output: any): void
  • Parameters

    • Rest ...output: any

    Returns void

disconnectedCallback

  • disconnectedCallback(): void

Protected error

  • error(...output: any): void
  • Parameters

    • Rest ...output: any

    Returns void

find

  • find<T>(fn: (node: HTMLElement) => any): undefined | T
  • Takes a function, then walks up the node tree and returns the first node where the function returns true.

    Type parameters

    • T: HTMLElement

    Parameters

    • fn: (node: HTMLElement) => any
        • (node: HTMLElement): any
        • Parameters

          • node: HTMLElement

          Returns any

    Returns undefined | T

findElementWithInstanceOf

  • findElementWithInstanceOf<T>(constructor: IConstructor<any>): undefined | T
  • Type parameters

    • T = HTMLElement

    Parameters

    • constructor: IConstructor<any>

    Returns undefined | T

Protected handleAttach

  • handleAttach(): void

handleWindowResize

  • handleWindowResize(): void
  • Returns void

mountedCallback

  • mountedCallback(): void

removedCallback

  • removedCallback(): void

render

  • render(): void
  • Returns void

requestFrame

  • requestFrame(): void

setAttribute

  • setAttribute(name: string, value: string): void
  • We're overloading setAttribute so it also invokes attributeChangedCallback. We do this because we can't realistically make use of observedAttributes (since we don't know at the time element classes are defined what properties their wrapped objects are exposing.)

    Parameters

    • name: string
    • value: string

    Returns void

Generated using TypeDoc