SceneItem <TSource, TScene>
Hierarchy
- SceneItem
Index
Constructors
constructor
Properties
enabled
publicid
locked
publicref
publicscene
publicsource
transform
Methods
fetchProperties
Fetches the item’s transform, enabled, and locked properties and assigns them to the item.
Returns Promise<void>
remove
Returns Promise<void>
setEnabled
Parameters
enabled: boolean
Returns Promise<void>
setLocked
Parameters
locked: boolean
Returns Promise<void>
setTransform
Parameters
transform: Partial<SceneItemTransform>
Returns Promise<void>
updateSizeFromSource
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
Represents an item of a source in OBS. Creation of a SceneItem assumes that the item already exists in OBS. It’s the responsibility of the caller (probably a Source) to ensure that the item has been created. SceneItems are for accessing already existing items.