Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(texture, verticesX, verticesY)
{
const planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY);
const meshMaterial = new MeshMaterial(Texture.WHITE);
super(planeGeometry, meshMaterial);
// lets call the setter to ensure all necessary updates are performed
this.texture = texture;
}
_renderSpriteRect(renderer)
{
const rect = this.graphicsData[0].shape;
if (!this._spriteRect)
{
this._spriteRect = new Sprite(new Texture(Texture.WHITE));
}
const sprite = this._spriteRect;
const fillColor = this.graphicsData[0].fillColor;
if (this.tint === 0xffffff)
{
sprite.tint = fillColor;
}
else if (this.tint !== this._prevRectTint || fillColor !== this._prevRectFillColor)
{
const t1 = tempColor1;
const t2 = tempColor2;
hex2rgb(fillColor, t1);
hex2rgb(this.tint, t2);
lineStyle(width = 0, color = 0, alpha = 1, alignment = 0.5, native = false)
{
this.lineTextureStyle(width, Texture.WHITE, color, alpha, null, alignment, native);
return this;
}
lineTextureStyle(width = 0, texture = Texture.WHITE, color = 0xFFFFFF, alpha = 1,
matrix = null, alignment = 0.5, native = false)
{
if (this.currentPath)
{
this.startPoly();
}
const visible = width > 0 && alpha > 0;
if (!visible)
{
this._lineStyle.reset();
}
else
{
if (matrix)
/**
* The alpha value used when filling the Graphics object.
*
* @member {number}
* @default 1
*/
this.alpha = 1;
/**
* The texture to be used for the fill.
*
* @member {string}
* @default 0
*/
this.texture = Texture.WHITE;
/**
* The transform aplpied to the texture.
*
* @member {string}
* @default 0
*/
this.matrix = null;
/**
* If the current fill is visible.
*
* @member {boolean}
* @default false
*/
this.visible = false;
beginFill(color = 0, alpha = 1)
{
return this.beginTextureFill(Texture.WHITE, color, alpha);
}
constructor(texture, leftWidth, topHeight, rightWidth, bottomHeight)
{
super(Texture.WHITE, 4, 4);
this._origWidth = texture.orig.width;
this._origHeight = texture.orig.height;
/**
* The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
*
* @member {number}
* @override
*/
this._width = this._origWidth;
/**
* The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
*
* @member {number}