Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Sprite_Character


Sprite_Character

The sprite for displaying a character.

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _anchor

Protected _animationSprites

_animationSprites: Array<Sprite_Animation>

The animation sprites assigned to the sprite object.

type

{Array}

memberof

Sprite_Base

Protected _balloonDuration

_balloonDuration: number

Protected _balloonSprite

_balloonSprite: Sprite_Balloon

The current balloon sprite assigned to the sprite.

type

{Sprite_Balloon}

memberof

Sprite_Character

Protected _bitmap

_bitmap: Bitmap

Protected _blendColor

_blendColor: Array<Number>

Protected _bounds

_bounds: Bounds

Protected _boundsID

_boundsID: number

Protected _boundsRect

_boundsRect: Rectangle

Protected _bushDepth

_bushDepth: number

Protected _cacheAsBitmap

_cacheAsBitmap: boolean

Protected _cacheData

_cacheData: boolean

Protected _canvas

_canvas: HTMLCanvasElement

Protected _character

_character: Game_Character

The Game_Character object assigned to the sprite.

type

{Game_Character}

memberof

Sprite_Character

Protected _colorTone

_colorTone: Array<Number>

Protected _context

_context: CanvasRenderingContext2D

Protected _destroyed

_destroyed: boolean

Protected _effectTarget

_effectTarget: Sprite_Base

The target that will have the animations applied to it.

type

{Sprite_Base}

memberof

Sprite_Base

Protected _enabledFilters

_enabledFilters: Filter[] | null

Protected _filters

_filters: Filter[] | null

Protected _frame

_frame: Rectangle

Protected _height

_height: number

Protected _hiding

_hiding: boolean

Property determining the sprite's visibility.

type

{boolean}

memberof

Sprite_Base

Private _isPicture

_isPicture: boolean

use heavy renderer that will reduce border artifacts and apply advanced blendModes

type

{boolean}

Protected _lastBoundsID

_lastBoundsID: number

Protected _localBoundsRect

_localBoundsRect: Rectangle

Protected _lowerBody

_lowerBody: Sprite

Protected _mask

_mask: Graphics | Sprite

Protected _offset

_offset: Point

Protected _realFrame

_realFrame: Rectangle

Protected _texture

_texture: Texture

Protected _textureID

_textureID: number

Protected _textureTrimmedID

_textureTrimmedID: number

Protected _tilesetId

_tilesetId: number

Protected _tint

_tint: number

Protected _tintRGB

_tintRGB: number

Protected _tintTexture

_tintTexture: BaseTexture

Protected _transformID

_transformID: number

Protected _transformTrimmedID

_transformTrimmedID: number

Protected _upperBody

_upperBody: Sprite

Protected _width

_width: number

accessible

accessible: boolean

accessibleHint

accessibleHint: string | null

accessibleTitle

accessibleTitle: string | null

alpha

alpha: number

anchor

bitmap

bitmap: Bitmap

The image for the sprite.

property

bitmap

type

Bitmap

blendMode

blendMode: number

The blend mode to be applied to the sprite.

property

blendMode

type

Number

buttonMode

buttonMode: boolean

cacheAsBitmap

cacheAsBitmap: boolean

Protected cachedTint

cachedTint: number

children

children: Array<DisplayObject>

[read-only] The array of children of the sprite.

property

children

type

Array

cursor

cursor: string

defaultCursor

defaultCursor: string

filterArea

filterArea: Rectangle

filters

filters: Array<Filter>

Sets the filters for the sprite.

property

filters

type

Array

height

height: number

The height of the sprite without the scale.

property

height

type

Number

hitArea

interactive

interactive: boolean

interactiveChildren

interactiveChildren: boolean

localTransform

localTransform: Matrix

mask

name

name: string | null

Protected onChildrenChange

onChildrenChange: function

Type declaration

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

      • Rest ...args: any[]

      Returns void

opacity

opacity: number

The opacity of the sprite (0 to 255).

property

opacity

type

Number

opaque

opaque: boolean

parent

parent: Container

[read-only] The object that contains the sprite.

property

parent

type

PIXI.DisplayObjectContainer

pivot

pluginName

pluginName: string

point

point: Point

The origin point of the sprite. (0,0) to (1,1).

property

anchor

type

Point

position

renderable

renderable: boolean

rotation

rotation: number

The rotation of the sprite in radians.

property

rotation

type

Number

scale

scale: Point

The scale factor of the sprite.

property

scale

type

Point

skew

spriteId

spriteId: number

tabIndex

tabIndex: number

texture

texture: Texture

Protected textureDirty

textureDirty: boolean

tint

tint: number

transform

transform: TransformBase

vertexData

vertexData: Float32Array

Protected vertexTrimmedData

vertexTrimmedData: Float32Array

visible

visible: boolean

The visibility of the sprite.

property

visible

type

Boolean

voidFilter

voidFilter: Filter

width

width: number

The width of the sprite without the scale.

property

width

type

Number

worldAlpha

worldAlpha: number

worldTransform

worldTransform: Matrix

worldVisible

worldVisible: boolean

x

x: number

The x coordinate of the sprite.

property

x

type

Number

y

y: number

The y coordinate of the sprite.

property

y

type

Number

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static _counter

_counter: number

Number of the created objects.

static
property

_counter

type

Number

Static prefixed

prefixed: string | boolean

Methods

Protected _cacheAsBitmapDestroy

  • _cacheAsBitmapDestroy(options: boolean | any): void

Protected _calculateBounds

  • _calculateBounds(): void

Protected _calculateCachedBounds

Private _createTinter

  • _createTinter(w: number, h: number): void

Protected _destroyCachedDisplayObject

  • _destroyCachedDisplayObject(): void

Private _executeTint

  • _executeTint(x: number, y: number, w: number, h: number): void

Protected _getCachedLocalBounds

Protected _initCachedDisplayObject

Protected _initCachedDisplayObjectCanvas

Private _isInBitmapRect

  • _isInBitmapRect(x: number, y: number, w: number, h: number): boolean

Private _needsTint

  • _needsTint(): boolean

Private _onBitmapLoad

  • _onBitmapLoad(): void

Protected _onTextureUpdate

  • _onTextureUpdate(): void

Protected _recursivePostUpdateTransform

  • _recursivePostUpdateTransform(): void

Private _refresh

  • _refresh(): void

Protected _renderCachedCanvas

Protected _renderCachedWebGL

Private _renderCanvas

Private _renderCanvas_PIXI

Private _renderWebGL

Private _renderWebGL_PIXI

Private _speedUpCustomBlendModes

addChild

addChildAt

addListener

calculateBounds

  • calculateBounds(): void

Protected calculateTrimmedVertices

  • calculateTrimmedVertices(): void

calculateVertices

  • calculateVertices(): void

characterBlockX

  • characterBlockX(): number

characterBlockY

  • characterBlockY(): number

characterPatternX

  • characterPatternX(): number

characterPatternY

  • characterPatternY(): number

Protected containerUpdateTransform

  • containerUpdateTransform(): void

containsPoint

  • containsPoint(point: Point): boolean
  • Parameters

    Returns boolean

createHalfBodySprites

  • createHalfBodySprites(): void

destroy

Protected displayObjectUpdateTransform

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

endBalloon

  • endBalloon(): void

eventNames

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

    Returns Array<string | symbol>

getBlendColor

  • getBlendColor(): Array<number>

getBounds

getChildAt

getChildByName

getChildIndex

getColorTone

  • getColorTone(): Array<number>

getGlobalPosition

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

getLocalBounds

hide

  • hide(): void

initMembers

  • initMembers(): void

isAnimationPlaying

  • isAnimationPlaying(): boolean

isBalloonPlaying

  • isBalloonPlaying(): boolean

isImageChanged

  • isImageChanged(): boolean

isTile

  • isTile(): boolean

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

move

  • move(x: number, y: number): void
  • Sets the x and y at once.

    method

    move

    Parameters

    • x: number

      The x coordinate of the sprite

    • y: number

      The y coordinate of the sprite

    Returns void

off

  • off(event: "added" | "removed" | string, fn?: Function, context?: any): this
  • Parameters

    • event: "added" | "removed" | string
    • Optional fn: Function
    • Optional context: any

    Returns this

on

  • on(event: "added" | "removed", fn: function, context?: any): this
  • on(event: string, fn: Function, context?: any): this
  • Parameters

    • event: "added" | "removed"
    • fn: function
    • Optional context: any

    Returns this

  • Parameters

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

    Returns this

Protected onAnchorUpdate

  • onAnchorUpdate(): void
  • Returns void

once

  • once(event: "added" | "removed", fn: function, context?: any): this
  • once(event: string, fn: Function, context?: any): this
  • Parameters

    • event: "added" | "removed"
    • fn: function
    • Optional context: any

    Returns this

  • Parameters

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

    Returns this

patternHeight

  • patternHeight(): number

patternWidth

  • patternWidth(): number

removeAllListeners

removeChild

removeChildAt

removeChildren

  • removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]
  • Parameters

    • Optional beginIndex: number
    • Optional endIndex: number

    Returns DisplayObject[]

removeListener

renderAdvancedWebGL

renderCanvas

renderWebGL

setBlendColor

  • setBlendColor(color: Array<number>): void

setCharacter

setCharacterBitmap

  • setCharacterBitmap(): void

setChildIndex

setColorTone

  • setColorTone(tone: Array<number>): void

setFrame

  • setFrame(x: number, y: number, width: number, height: number): void
  • Sets the rectagle of the bitmap that the sprite displays.

    method

    setFrame

    Parameters

    • x: number

      The x coordinate of the frame

    • y: number

      The y coordinate of the frame

    • width: number

      The width of the frame

    • height: number

      The height of the frame

    Returns void

setMaxListeners

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

    deprecated

    Returns this

setParent

setTileBitmap

  • setTileBitmap(): void

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

setupAnimation

  • setupAnimation(): void

setupBalloon

  • setupBalloon(): void

show

  • show(): void

startAnimation

  • startAnimation(animation: Animation, mirror: boolean, delay: number): void

startBalloon

  • startBalloon(): void

swapChildren

tilesetBitmap

  • tilesetBitmap(tileId: number): Bitmap

toGlobal

toLocal

trackedPointers

  • trackedPointers(): object

update

  • update(): void

updateAnimation

  • updateAnimation(): void

updateAnimationSprites

  • updateAnimationSprites(): void

updateBalloon

  • updateBalloon(): void
  • Processes the balloon sprite, calls the endBaloon method if the balloon sprite is done playing.

    memberof

    Sprite_Character

    Returns void

updateBitmap

  • updateBitmap(): void

updateCharacterFrame

  • updateCharacterFrame(): void

updateFrame

  • updateFrame(): void

updateHalfBodySprites

  • updateHalfBodySprites(): void

updateOther

  • updateOther(): void

updatePosition

  • updatePosition(): void

updateTileFrame

  • updateTileFrame(): void

Private updateTransform

  • updateTransform(): void

updateVisibility

  • updateVisibility(): void

Static from

  • from(source: number | string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): Sprite
  • Parameters

    • source: number | string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement

    Returns Sprite

Static fromFrame

  • fromFrame(frameId: string): Sprite
  • Parameters

    • frameId: string

    Returns Sprite

Static fromImage

  • fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite
  • Parameters

    • imageId: string
    • Optional crossorigin: boolean
    • Optional scaleMode: number

    Returns Sprite

Generated using TypeDoc