Selva Compute API Reference - v1.1.2
    Preparing search index...

    Class Controls<TEventMap>Abstract

    Abstract base class for controls.

    Type Parameters

    • TEventMap extends {}

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    domElement: HTMLElement | SVGElement | null

    The HTML element used for event listeners. If not provided via the constructor, .connect must be called after domElement has been set.

    enabled: boolean

    When set to false, the controls will not respond to user input. Default is true.

    object: Object3D

    The 3D object that is managed by the controls.

    Methods

    • Connects the controls to the DOM. This method has so called "side effects" since it adds the module's event listeners to the DOM.

      Parameters

      Returns void

    • Disconnects the controls from the DOM.

      Returns void

    • Fire an event type.

      Type Parameters

      • T extends string

      Parameters

      Returns void

    • Call this method if you no longer want use to the controls. It frees all internal resources and removes all event listeners.

      Returns void

    • Controls should implement this method if they have to update their internal state per simulation step.

      Parameters

      • delta: number

      Returns void