Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextureStreamComponent

Objective: Prepare for video stream texture Type of stream textures will be custum or any other canvas2D draw and video texture from webRTC or local video camera or file.

Hierarchy

  • TextureStreamComponent

Implements

Index

Constructors

constructor

  • new TextureStreamComponent(name: string, imgRes: string | string[], streamTex?: any): TextureStreamComponent

Properties

assets

assets: Resources = new Resources()

Protected horizontalFlip

horizontalFlip: boolean = false

Protected horizontalTiles

horizontalTiles: number = 1

keepAspectRatio

keepAspectRatio: boolean = false

streamTexture

streamTexture: any = null

Protected verticalFlip

verticalFlip: boolean = false

Protected verticalTiles

verticalTiles: number = 1

Methods

drawComponent

  • drawComponent(c: CanvasRenderingContext2D, part: any): void

Protected flipImage

  • flipImage(image: any, ctx: any, sx: any, sy: any, sw: any, sh: any, flipH: any, flipV: any): void

setHorizontalFlip

  • setHorizontalFlip(newStatus: boolean): void

setHorizontalTiles

  • setHorizontalTiles(newHorinzontalTiles: number): this

setStreamTexture

  • setStreamTexture(streamTexture: HTMLVideoElement): void

setVerticalFlip

  • setVerticalFlip(newStatus: boolean): void

setVerticalTiles

  • setVerticalTiles(newVerticalTiles: number): this

Generated using TypeDoc