Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AInteraction

Hierarchy

Index

Constructors

constructor

Properties

Protected _eventListeners

_eventListeners: AInteractionEventListener[]

active

active: boolean

element

element is typically the thing being interacted with. For example, if you are adding a click interaction to a THREE.Mesh, then the element would be the THREE.Mesh.

handle

handle: string

interactionState

interactionState: {} = {}

Type declaration

  • [name: string]: any

onlyOnFirstIntersection

onlyOnFirstIntersection: boolean = true

owner

owner is whatever holds the interactions.

Accessors

eventListeners

Methods

_deactivateEventListeners

  • _deactivateEventListeners(): void

_shouldIgnoreEvent

activate

  • activate(): void

addDOMEventListener

  • addDOMEventListener(eventType: string, callback: (...args: any[]) => any, options?: boolean | AddEventListenerOptions): { addListener: () => void; eventType: string; removeListener: () => void }
  • Parameters

    • eventType: string
    • callback: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns { addListener: () => void; eventType: string; removeListener: () => void }

    • addListener: () => void
        • (): void
        • Returns void

    • eventType: string
    • removeListener: () => void
        • (): void
        • Returns void

addEventListener

  • addEventListener(eventType: string, callback: (...args: any[]) => any): { addListener: () => void; eventType: string; removeListener: () => void }
  • Parameters

    • eventType: string
    • callback: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns { addListener: () => void; eventType: string; removeListener: () => void }

    • addListener: () => void
        • (): void
        • Returns void

    • eventType: string
    • removeListener: () => void
        • (): void
        • Returns void

addSceneEventListener

  • addSceneEventListener(eventType: string, callback: (...args: any[]) => any, options?: boolean | AddEventListenerOptions): { addListener: () => void; eventType: string; removeListener: () => void }
  • Parameters

    • eventType: string
    • callback: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns { addListener: () => void; eventType: string; removeListener: () => void }

    • addListener: () => void
        • (): void
        • Returns void

    • eventType: string
    • removeListener: () => void
        • (): void
        • Returns void

bindMethods

  • bindMethods(): void

clearEventListeners

  • clearEventListeners(): void

clearInteractionState

  • clearInteractionState(): void

deactivate

  • deactivate(): void

dispose

  • dispose(): void

getInteractionState

  • getInteractionState(name: string): any

getSceneElement

  • getSceneElement(): Scene

getWindowElement

  • getWindowElement(): Window & typeof globalThis

setInteractionState

  • setInteractionState(name: string, value: any): void

Generated using TypeDoc