Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseRenderTexture

Hierarchy

Index

Constructors

constructor

  • new BaseRenderTexture(width?: number, height?: number, scaleMode?: number, resolution?: number): BaseRenderTexture
  • Parameters

    • Optional width: number
    • Optional height: number
    • Optional scaleMode: number
    • Optional resolution: number

    Returns BaseRenderTexture

Properties

Protected _canvasRenderTarget

_canvasRenderTarget: object

Type declaration

  • [n: number]: WebGLTexture

Protected _destroyed

_destroyed: boolean

Protected _enabled

_enabled: number

Protected _glRenderTargets

_glRenderTargets: object

Type declaration

  • [n: number]: WebGLTexture

Protected _glTextures

_glTextures: any

Protected Optional _id

_id: number

Protected _virtualBoundId

_virtualBoundId: number

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: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | null

sourceScale

sourceScale: number

textureCacheIds

textureCacheIds: string[]

Protected touched

touched: number

Protected Optional uuid

uuid: number

valid

valid: boolean

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 _loadSvgSource

  • _loadSvgSource(): void

Protected _loadSvgSourceUsingDataUri

  • _loadSvgSourceUsingDataUri(dataUri: string): void

Protected _loadSvgSourceUsingString

  • _loadSvgSourceUsingString(svgString: string): void

Protected _loadSvgSourceUsingXhr

  • _loadSvgSourceUsingXhr(): void

Protected _sourceLoaded

  • _sourceLoaded(): void

Protected _updateDimensions

  • _updateDimensions(): void

Protected _updateImageType

  • _updateImageType(): void

addListener

  • addListener(event: "update", 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: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void
  • Parameters

    • source: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement

    Returns void

off

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

    Returns this

on

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

    Returns this

once

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

    Returns this

removeAllListeners

  • removeAllListeners(event: "update"): this

removeListener

  • removeListener(event: "update", fn?: function, context?: any): this

resize

  • resize(width: number, height: number): void
  • Parameters

    • width: number
    • height: number

    Returns void

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 removeFromCache

Generated using TypeDoc