Class Texture

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(baseTexture: BaseTexture, frame?: Rectangle): Texture

Parameters

Returns

Texture

Properties

public baseTexture: BaseTexture

public frame: Rectangle

public trim: Point

Methods

public addEventListener(type: string, listener: (event: PIXI.IEvent) => void): any

Parameters

  • type: string
  • listener: (event: PIXI.IEvent) => void

Returns

any

public static addTextureToCache(texture: Texture, id: string)

Parameters

public destroy(destroyBase: boolean)

Parameters

  • destroyBase: boolean

public dispatchEvent(event: IEvent): any

Parameters

Returns

any

public static fromCanvas(canvas: HTMLCanvasElement): Texture

Parameters

  • canvas: HTMLCanvasElement

Returns

Texture

public static fromFrame(frameId: string): Texture

Parameters

  • frameId: string

Returns

Texture

public static fromImage(imageUrl: string, crossorigin?: boolean): Texture

Parameters

  • imageUrl: string
  • crossorigin?: boolean optional

Returns

Texture

public removeEventListener(type: string, listener: (event: PIXI.IEvent) => void): any

Parameters

  • type: string
  • listener: (event: PIXI.IEvent) => void

Returns

any

public static removeTextureFromCache(id: any): Texture

Parameters

  • id: any

Returns

Texture

public render(displayObject: DisplayObject, position: Point, clear: boolean)

Parameters

public setFrame(frame: Rectangle)

Parameters