Skip to main content

BrowserSourceItem <Input>

Hierarchy

Index

Constructors

constructor

  • new BrowserSourceItem<Input>(source: Input, scene: Scene<{}, {}>, id: number, ref: string): BrowserSourceItem<Input>

Properties

enabled

enabled: boolean = true

publicid

id: number

locked

locked: boolean = false

publicref

ref: string

publicscene

scene: Scene<{}, {}>

publicsource

source: Input

transform

transform: SceneItemTransform = ...

Methods

fetchProperties

  • fetchProperties(): Promise<void>
  • Fetches the item’s transform, enabled, and locked properties and assigns them to the item.


    Returns Promise<void>

remove

  • remove(): Promise<void>
  • Returns Promise<void>

setEnabled

  • setEnabled(enabled: boolean): Promise<void>
  • Parameters

    • enabled: boolean

    Returns Promise<void>

setLocked

  • setLocked(locked: boolean): Promise<void>
  • Parameters

    • locked: boolean

    Returns Promise<void>

setTransform

  • Parameters

    Returns Promise<void>

updateSizeFromSource

  • updateSizeFromSource(sourceWidth?: number, sourceHeight?: number): void
  • Some sources have custom settings for width and height. Thus, sourceWidth and sourceHeight for their scene items can change. This method reassigns these values and calculates properties.width and properties.height as a product of the source dimensions and item scale.


    Parameters

    • optionalsourceWidth: number
    • optionalsourceHeight: number

    Returns void