@pixi/sprite
Advanced tools
Comparing version 7.2.0-beta to 7.2.0-beta.2
import { BLEND_MODES, ObservablePoint, Rectangle, Texture } from '@pixi/core'; | ||
import { Container } from '@pixi/display'; | ||
import type { IBaseTextureOptions, IPointData, Renderer, TextureSource } from '@pixi/core'; | ||
import type { ColorSource, IBaseTextureOptions, IPointData, Renderer, TextureSource } from '@pixi/core'; | ||
import type { IDestroyOptions } from '@pixi/display'; | ||
@@ -110,3 +110,3 @@ export declare type SpriteSource = TextureSource | Texture; | ||
*/ | ||
private _tint; | ||
private _tintColor; | ||
/** | ||
@@ -213,4 +213,9 @@ * The tint applied to the sprite. This is a RGB value. A value of 0xFFFFFF will remove any tint effect. | ||
*/ | ||
get tint(): number; | ||
set tint(value: number); | ||
get tint(): ColorSource; | ||
set tint(value: ColorSource); | ||
/** | ||
* Get the tint as a RGB integer. | ||
* @ignore | ||
*/ | ||
get tintValue(): number; | ||
/** The texture that the sprite is using. */ | ||
@@ -217,0 +222,0 @@ get texture(): Texture; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
this._height = 0; | ||
this._tint = null; | ||
this._tintColor = new core.Color(16777215); | ||
this._tintRGB = null; | ||
@@ -230,8 +230,11 @@ this.tint = 16777215; | ||
get tint() { | ||
return this._tint; | ||
return this._tintColor.value; | ||
} | ||
set tint(value) { | ||
this._tint = value; | ||
this._tintRGB = core.Color.shared.setValue(value).toLittleEndianNumber(); | ||
this._tintColor.setValue(value); | ||
this._tintRGB = this._tintColor.toLittleEndianNumber(); | ||
} | ||
get tintValue() { | ||
return this._tintColor.toNumber(); | ||
} | ||
get texture() { | ||
@@ -238,0 +241,0 @@ return this._texture; |
{ | ||
"name": "@pixi/sprite", | ||
"version": "7.2.0-beta", | ||
"version": "7.2.0-beta.2", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "module": "lib/index.mjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89967
754