Sprite.d overview
Table of contents
- utils
- Sprite (class)
- destroy (method)
- update (method)
- hide (method)
- show (method)
- updateVisibility (method)
- move (method)
- setFrame (method)
- setHue (method)
- getBlendColor (method)
- setBlendColor (method)
- getColorTone (method)
- setColorTone (method)
- _onBitmapChange (method)
- _onBitmapLoad (method)
- _refresh (method)
- _createColorFilter (method)
- _updateColorFilter (method)
- _refreshFrame (property)
- spriteId (property)
- _bitmap (property)
- _frame (property)
- _hue (property)
- _blendColor (property)
- _colorTone (property)
- _colorFilter (property)
- _blendMode (property)
- _hidden (property)
- Sprite (class)
utils
Sprite (class)
The basic object that is rendered to the game screen.
Signature
export declare class Sprite<T> {
constructor(bitmap?: Bitmap)
}
destroy (method)
Destroys the sprite.
Signature
destroy(_options?: PIXIDestroyOptions): void
update (method)
Updates the sprite for each frame.
Signature
update(): void
hide (method)
Makes the sprite “hidden”.
Signature
hide(): void
show (method)
Releases the “hidden” state of the sprite.
Signature
show(): void
updateVisibility (method)
Reflects the “hidden” state of the sprite to the visible state.
Signature
updateVisibility(): void
move (method)
Sets the x and y at once.
Signature
move(x: number, y: number): void
setFrame (method)
Sets the rectagle of the bitmap that the sprite displays.
Signature
setFrame(x: number, y: number, width: number, height: number): void
setHue (method)
Sets the hue rotation value.
Signature
setHue(hue: number): void
getBlendColor (method)
Gets the blend color for the sprite.
Signature
getBlendColor(): [number, number, number, number]
setBlendColor (method)
Sets the blend color for the sprite.
Signature
setBlendColor(color: Color): void
getColorTone (method)
Gets the color tone for the sprite.
Signature
getColorTone(): [number, number, number, number]
setColorTone (method)
Sets the color tone for the sprite.
Signature
setColorTone(tone: Color): void
_onBitmapChange (method)
Signature
_onBitmapChange(): void
_onBitmapLoad (method)
Signature
_onBitmapLoad(bitmapLoaded: Bitmap): void
_refresh (method)
Signature
_refresh(): void
_createColorFilter (method)
Signature
_createColorFilter(): void
_updateColorFilter (method)
Signature
_updateColorFilter(): void
_refreshFrame (property)
Signature
_refreshFrame: boolean
spriteId (property)
Signature
spriteId: number
_bitmap (property)
Signature
_bitmap: T
_frame (property)
Signature
_frame: Rectangle
_hue (property)
Signature
_hue: number
_blendColor (property)
Signature
_blendColor: Color
_colorTone (property)
Signature
_colorTone: Color
_colorFilter (property)
Signature
_colorFilter: ColorFilter | null
_blendMode (property)
Signature
_blendMode: any
_hidden (property)
Signature
_hidden: boolean