Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Source

Source describes how and where THREE AR should accept imagery to track markers for. Images, Video and the Webcam can be used as sources.

param

parameters for determining if it should come from a webcam or a video

Hierarchy

  • Source

Index

Constructors

constructor

Properties

Private currentTorchStatus

currentTorchStatus: boolean

domElement

domElement: HTMLImageElement | HTMLVideoElement | undefined

Private parameters

parameters: SourceParameters

Accessors

camera

  • get camera(): null | Camera

renderer

  • get renderer(): null | WebGLRenderer

Methods

Private _initSourceImage

  • _initSourceImage(onReady: () => any, onError: (message: string) => any): HTMLImageElement
  • Parameters

    • onReady: () => any
        • (): any
        • Returns any

    • onError: (message: string) => any
        • (message: string): any
        • Parameters

          • message: string

          Returns any

    Returns HTMLImageElement

Private _initSourceVideo

  • _initSourceVideo(onReady: () => any, onError: (message: string) => any): HTMLVideoElement
  • Parameters

    • onReady: () => any
        • (): any
        • Returns any

    • onError: (message: string) => any
        • (message: string): any
        • Parameters

          • message: string

          Returns any

    Returns HTMLVideoElement

Private _initSourceWebcam

  • _initSourceWebcam(onReady: () => any, onError: (message: string) => any): undefined | HTMLVideoElement
  • Parameters

    • onReady: () => any
        • (): any
        • Returns any

    • onError: (message: string) => any
        • (message: string): any
        • Parameters

          • message: string

          Returns any

    Returns undefined | HTMLVideoElement

copyElementSizeTo

  • copyElementSizeTo(otherElement: any): void
  • Copy the dimensions of the domElement of the source to another given domElement

    Parameters

    • otherElement: any

      the target element to copy the size to, from the Source dom element

    Returns void

dispose

  • dispose(): void

hasMobileTorch

  • hasMobileTorch(domElement: HTMLVideoElement): boolean
  • Determine if the device supports torch capability

    Parameters

    • domElement: HTMLVideoElement

    Returns boolean

initialize

  • initialize(): Promise<unknown>

onResizeElement

  • onResizeElement(): void

Private positionSourceDomElement

  • positionSourceDomElement(): void

setParameters

  • setParameters(parameters: any): void

toggleMobileTorch

  • toggleMobileTorch(domElement: HTMLVideoElement): void

Generated using TypeDoc