Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VideoBaseTexture

Hierarchy

Index

Constructors

constructor

  • new VideoBaseTexture(source: HTMLVideoElement, scaleMode?: number): VideoBaseTexture

Properties

Protected _destroyed

_destroyed: boolean

Protected _enabled

_enabled: number

Protected _glTextures

_glTextures: any

Protected Optional _id

_id: number

Protected _isAutoUpdating

_isAutoUpdating: boolean

Protected _virtualBoundId

_virtualBoundId: number

autoPlay

autoPlay: boolean

autoUpdate

autoUpdate: boolean

hasLoaded

hasLoaded: boolean

height

height: number

imageType

imageType: string | null

imageUrl

imageUrl: string | null

isLoading

isLoading: boolean

Protected isPowerOfTwo

isPowerOfTwo: boolean

mipmap

mipmap: boolean

origSource

origSource: HTMLImageElement | null

premultipliedAlpha

premultipliedAlpha: boolean

realHeight

realHeight: number

realWidth

realWidth: number

resolution

resolution: number

scaleMode

scaleMode: number

source

source: HTMLVideoElement

sourceScale

sourceScale: number

textureCacheIds

textureCacheIds: string[]

Protected touched

touched: number

Protected Optional uuid

uuid: number

width

width: number

Optional wrap

wrap: boolean

wrapMode

wrapMode: number

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static prefixed

prefixed: string | boolean

Methods

Protected _isSourcePlaying

  • _isSourcePlaying(): boolean
  • Returns boolean

Protected _isSourceReady

  • _isSourceReady(): boolean
  • Returns boolean

Protected _loadSvgSource

  • _loadSvgSource(): void

Protected _loadSvgSourceUsingDataUri

  • _loadSvgSourceUsingDataUri(dataUri: string): void

Protected _loadSvgSourceUsingString

  • _loadSvgSourceUsingString(svgString: string): void

Protected _loadSvgSourceUsingXhr

  • _loadSvgSourceUsingXhr(): void

Protected _onCanPlay

  • _onCanPlay(): void
  • Returns void

Protected _onPlayStart

  • _onPlayStart(): void
  • Returns void

Protected _onPlayStop

  • _onPlayStop(): void
  • Returns void

Protected _sourceLoaded

  • _sourceLoaded(): void

Protected _updateDimensions

  • _updateDimensions(): void

Protected _updateImageType

  • _updateImageType(): void

addListener

  • addListener(event: "update" | "loaded" | "error" | "dispose", fn: function, context?: any): this

destroy

  • destroy(): void
  • Returns void

dispose

  • dispose(): void
  • Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Rest ...args: any[]

      Arguments that are passed to registered listeners

    Returns boolean

    true if the event had listeners, else false.

eventNames

  • eventNames(): Array<string | symbol>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<string | symbol>

listeners

  • listeners(event: string | symbol): Function[]
  • listeners(event: string | symbol, exists: boolean): boolean
  • Return the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    Returns Function[]

  • Check if there listeners for a given event. If exists argument is not true lists listeners.

    Parameters

    • event: string | symbol

      The event name.

    • exists: boolean

      Only check if there are listeners.

    Returns boolean

Protected loadSource

  • loadSource(source: HTMLVideoElement): void
  • Parameters

    • source: HTMLVideoElement

    Returns void

off

  • off(event: "update" | "loaded" | "error" | "dispose", fn?: function, context?: any): this
  • Parameters

    • event: "update" | "loaded" | "error" | "dispose"
    • Optional fn: function
    • Optional context: any

    Returns this

on

  • on(event: "update" | "loaded" | "error" | "dispose", fn: function, context?: any): this
  • Parameters

    • event: "update" | "loaded" | "error" | "dispose"
    • fn: function
    • Optional context: any

    Returns this

once

  • once(event: "update" | "loaded" | "error" | "dispose", fn: function, context?: any): this
  • Parameters

    • event: "update" | "loaded" | "error" | "dispose"
    • fn: function
    • Optional context: any

    Returns this

removeAllListeners

  • removeAllListeners(event: "update" | "loaded" | "error" | "dispose"): this

removeListener

  • removeListener(event: "update" | "loaded" | "error" | "dispose", fn?: function, context?: any): this

setMaxListeners

  • setMaxListeners(): this
  • This function doesn't apply anymore.

    deprecated

    Returns this

update

  • update(): void
  • Returns void

updateSourceImage

  • updateSourceImage(newSrc: string): void
  • Parameters

    • newSrc: string

    Returns void

Static addToCache

  • addToCache(baseTexture: BaseTexture, id: string): void

Static from

  • from(source: string | HTMLImageElement | HTMLCanvasElement, scaleMode?: number, sourceScale?: number): BaseTexture
  • Parameters

    • source: string | HTMLImageElement | HTMLCanvasElement
    • Optional scaleMode: number
    • Optional sourceScale: number

    Returns BaseTexture

Static fromCanvas

  • fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): BaseTexture
  • Parameters

    • canvas: HTMLCanvasElement
    • Optional scaleMode: number
    • Optional origin: string

    Returns BaseTexture

Static fromImage

  • fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: number, sourceScale?: number): BaseTexture
  • Parameters

    • imageUrl: string
    • Optional crossorigin: boolean
    • Optional scaleMode: number
    • Optional sourceScale: number

    Returns BaseTexture

Static fromUrl

  • Parameters

    • videoSrc: string | any | string[] | any[]

    Returns VideoBaseTexture

Static fromUrls

  • Parameters

    • videoSrc: string | any | string[] | any[]

    Returns VideoBaseTexture

Static fromVideo

  • Parameters

    • video: HTMLVideoElement
    • Optional scaleMode: number

    Returns VideoBaseTexture

Static removeFromCache

Generated using TypeDoc