Initial
This commit is contained in:
31
resources/app/node_modules/@pixi/graphics/lib/GraphicsData.mjs
generated
vendored
Normal file
31
resources/app/node_modules/@pixi/graphics/lib/GraphicsData.mjs
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
class GraphicsData {
|
||||
/**
|
||||
* @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.
|
||||
* @param fillStyle - the width of the line to draw
|
||||
* @param lineStyle - the color of the line to draw
|
||||
* @param matrix - Transform matrix
|
||||
*/
|
||||
constructor(shape, fillStyle = null, lineStyle = null, matrix = null) {
|
||||
this.points = [], this.holes = [], this.shape = shape, this.lineStyle = lineStyle, this.fillStyle = fillStyle, this.matrix = matrix, this.type = shape.type;
|
||||
}
|
||||
/**
|
||||
* Creates a new GraphicsData object with the same values as this one.
|
||||
* @returns - Cloned GraphicsData object
|
||||
*/
|
||||
clone() {
|
||||
return new GraphicsData(
|
||||
this.shape,
|
||||
this.fillStyle,
|
||||
this.lineStyle,
|
||||
this.matrix
|
||||
);
|
||||
}
|
||||
/** Destroys the Graphics data. */
|
||||
destroy() {
|
||||
this.shape = null, this.holes.length = 0, this.holes = null, this.points.length = 0, this.points = null, this.lineStyle = null, this.fillStyle = null;
|
||||
}
|
||||
}
|
||||
export {
|
||||
GraphicsData
|
||||
};
|
||||
//# sourceMappingURL=GraphicsData.mjs.map
|
||||
Reference in New Issue
Block a user