Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HTMLElement
    • ThreeGame

Index

Constructors

constructor

  • Returns ThreeGame

Properties

Protected _observed

_observed: boolean = false

Protected _renderer

_renderer: Renderer = ...

Protected _ticking

_ticking: boolean = false

Are we currently ticking?

deltaTime

deltaTime: number = 0

The time delta since the last frame, in fractions of a second.

emitter

emitter: EventEmitter = ...

Private frameRequested

frameRequested: boolean = true

Has a frame been requested to be rendered in the next tick?

Protected observer

observer: MutationObserver = ...

ThreeGame optionally allows the user to request it to use a MutationObserver that will notify elements when their attributes have changed through any other method than something invoking setAttribute. This typically only happens when the user modifies an attribute in the devtools of their browser.

Users wishing to be able to do this can just set the boolean attribute observed:

<three-game observed>

Accessors

autorender

  • get autorender(): boolean
  • set autorender(v: boolean): void
  • Returns boolean

  • Parameters

    • v: boolean

    Returns void

observed

  • get observed(): boolean
  • set observed(v: boolean): void
  • Returns boolean

  • Parameters

    • v: boolean

    Returns void

renderer

  • get renderer(): Renderer
  • set renderer(v: Renderer): void
  • Returns Renderer

  • Parameters

    • v: Renderer

    Returns void

Static observedAttributes

  • get observedAttributes(): string[]
  • Returns string[]

Methods

attributeChangedCallback

  • attributeChangedCallback(key: string, _: null | string, value: string): void
  • Parameters

    • key: string
    • _: null | string
    • value: string

    Returns void

Protected cleanupRenderer

  • cleanupRenderer(): void
  • Returns void

connectedCallback

  • connectedCallback(): void
  • Returns void

disconnectedCallback

  • disconnectedCallback(): void
  • Returns void

Private handleWindowResize

  • handleWindowResize(): void
  • Returns void

Protected makeDefaultRenderer

  • makeDefaultRenderer(): WebGLRenderer
  • Returns WebGLRenderer

requestFrame

  • requestFrame(): void
  • Returns void

Protected setupRenderer

  • setupRenderer(): void
  • Returns void

startTicking

  • startTicking(): void
  • Returns void

stopTicking

  • stopTicking(): void
  • Returns void

Generated using TypeDoc