Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SystemRenderer

Hierarchy

Index

Constructors

constructor

Properties

Protected _backgroundColor

_backgroundColor: number

Protected _backgroundColorRgba

_backgroundColorRgba: number[]

Protected _backgroundColorString

_backgroundColorString: string

Protected _lastObjectRendered

_lastObjectRendered: DisplayObject

Protected _tempDisplayObjectParent

_tempDisplayObjectParent: Container

autoResize

autoResize: boolean

blendModes

blendModes: any

clearBeforeRender

clearBeforeRender: boolean

height

height: number

options

preserveDrawingBuffer

preserveDrawingBuffer: boolean

resolution

resolution: number

roundPixels

roundPixels: boolean

screen

screen: Rectangle

transparent

transparent: boolean

type

type: number

view

view: HTMLCanvasElement

width

width: number

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static prefixed

prefixed: string | boolean

Methods

addListener

  • addListener(event: string | symbol, fn: Function, context?: any): this
  • Alias method for on

    Parameters

    • event: string | symbol
    • fn: Function
    • Optional context: any

    Returns this

destroy

  • destroy(removeView?: boolean): void
  • Parameters

    • Optional removeView: boolean

    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>

generateTexture

  • Parameters

    • displayObject: DisplayObject
    • Optional scaleMode: number
    • Optional resolution: number

    Returns RenderTexture

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

off

  • off(event: string | symbol, fn?: Function, context?: any, once?: boolean): this
  • Alias method for removeListener

    Parameters

    • event: string | symbol
    • Optional fn: Function
    • Optional context: any
    • Optional once: boolean

    Returns this

on

  • on(event: string | symbol, fn: Function, context?: any): this
  • Add a listener for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • fn: Function

      The listener function.

    • Optional context: any

    Returns this

    this.

once

  • once(event: string | symbol, fn: Function, context?: any): this
  • Add a one-time listener for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • fn: Function

      The listener function.

    • Optional context: any

    Returns this

    this.

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: string | symbol

      The event name.

    Returns this

    this.

removeListener

  • removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): this
  • Remove the listeners of a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Optional fn: Function

      Only remove the listeners that match this function.

    • Optional context: any

      Only remove the listeners that have this context.

    • Optional once: boolean

      Only remove one-time listeners.

    Returns this

    this.

render

  • render(...args: any[]): void
  • Parameters

    • Rest ...args: any[]

    Returns void

resize

  • resize(screenWidth: number, screenHeight: number): void
  • Parameters

    • screenWidth: number
    • screenHeight: number

    Returns void

setMaxListeners

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

    deprecated

    Returns this

Generated using TypeDoc