Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DisplayObject

Hierarchy

Implements

Index

Constructors

constructor

  • Minimal EventEmitter interface that is molded against the Node.js EventEmitter interface.

    constructor
    api

    public

    Returns DisplayObject

Properties

Protected _bounds

_bounds: Bounds

Protected _boundsID

_boundsID: number

Protected _boundsRect

_boundsRect: Rectangle

Protected _cacheAsBitmap

_cacheAsBitmap: boolean

Protected _cacheData

_cacheData: boolean

Protected _destroyed

_destroyed: boolean

Protected _enabledFilters

_enabledFilters: Filter[] | null

Protected _filters

_filters: Filter[] | null

Protected _lastBoundsID

_lastBoundsID: number

Protected _localBoundsRect

_localBoundsRect: Rectangle

Protected _mask

_mask: Graphics | Sprite

accessible

accessible: boolean

accessibleHint

accessibleHint: string | null

accessibleTitle

accessibleTitle: string | null

alpha

alpha: number

buttonMode

buttonMode: boolean

cacheAsBitmap

cacheAsBitmap: boolean

cursor

cursor: string

defaultCursor

defaultCursor: string

filterArea

filterArea: Rectangle

filters

filters: Filter[] | null

hitArea

interactive

interactive: boolean

interactiveChildren

interactiveChildren: boolean

localTransform

localTransform: Matrix

mask

name

name: string | null

parent

parent: Container

pivot

position

renderable

renderable: boolean

rotation

rotation: number

scale

skew

tabIndex

tabIndex: number

transform

transform: TransformBase

visible

visible: boolean

worldAlpha

worldAlpha: number

worldTransform

worldTransform: Matrix

worldVisible

worldVisible: boolean

x

x: number

y

y: number

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static prefixed

prefixed: string | boolean

Methods

Protected _cacheAsBitmapDestroy

  • _cacheAsBitmapDestroy(options: boolean | any): void
  • Parameters

    • options: boolean | any

    Returns void

Protected _calculateCachedBounds

  • Returns Rectangle

Protected _destroyCachedDisplayObject

  • _destroyCachedDisplayObject(): void
  • Returns void

Protected _getCachedLocalBounds

  • Returns Rectangle

Protected _initCachedDisplayObject

  • Parameters

    Returns void

Protected _initCachedDisplayObjectCanvas

  • Parameters

    Returns void

Protected _recursivePostUpdateTransform

  • _recursivePostUpdateTransform(): void
  • Returns void

Protected _renderCachedCanvas

  • Parameters

    Returns void

Protected _renderCachedWebGL

  • Parameters

    Returns void

addListener

destroy

  • destroy(): void
  • Returns void

Protected displayObjectUpdateTransform

  • displayObjectUpdateTransform(): 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>

getBounds

  • Parameters

    • Optional skipUpdate: boolean
    • Optional rect: Rectangle

    Returns Rectangle

getGlobalPosition

  • getGlobalPosition(point?: Point, skipUpdate?: boolean): Point
  • Parameters

    • Optional point: Point
    • Optional skipUpdate: boolean

    Returns Point

getLocalBounds

  • Parameters

    Returns Rectangle

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

on

once

removeAllListeners

removeListener

renderCanvas

  • Parameters

    Returns void

renderWebGL

  • Parameters

    Returns void

setMaxListeners

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

    deprecated

    Returns this

setParent

  • Parameters

    Returns Container

setTransform

  • setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): DisplayObject
  • Parameters

    • Optional x: number
    • Optional y: number
    • Optional scaleX: number
    • Optional scaleY: number
    • Optional rotation: number
    • Optional skewX: number
    • Optional skewY: number
    • Optional pivotX: number
    • Optional pivotY: number

    Returns DisplayObject

toGlobal

  • Parameters

    Returns Point

  • Type parameters

    Parameters

    • position: PointLike
    • Optional point: T
    • Optional skipUpdate: boolean

    Returns T

toLocal

  • Parameters

    Returns Point

  • Type parameters

    Parameters

    Returns T

trackedPointers

  • trackedPointers(): object

updateTransform

  • updateTransform(): void
  • Returns void

Generated using TypeDoc