Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/canvas-graphics

Package Overview
Dependencies
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/canvas-graphics - npm Package Compare versions

Comparing version 6.3.2 to 6.4.0

60

dist/browser/canvas-graphics.js
/*!
* @pixi/canvas-graphics - v6.3.2
* Compiled Wed, 04 May 2022 17:49:13 UTC
* @pixi/canvas-graphics - v6.4.0
* Compiled Wed, 01 Jun 2022 21:14:23 UTC
*

@@ -21,10 +21,9 @@ * @pixi/canvas-graphics is licensed under the MIT License.

/**
* Calculate points of an offset polygon
* @see {@link http://csharphelper.com/blog/2016/01/enlarge-a-polygon-in-c/}
*
* @private
* @param {number[]} points - polygon coordinates
* @param {number} offset
* @return {number[]} - offset points
*/
* Calculate points of an offset polygon
* @see {@link http://csharphelper.com/blog/2016/01/enlarge-a-polygon-in-c/}
* @private
* @param {number[]} points - polygon coordinates
* @param {number} offset
* @returns {number[]} - offset points
*/
PolygonUtils.offsetPolygon = function (points, offset) {

@@ -74,16 +73,15 @@ var offsetPoints = [];

/**
* Determine the intersection point of two line segments
* @see {@link here http://paulbourke.net/geometry/pointlineplane/}
*
* @private
* @param {number} x1 - x-coordinate of start point at first line
* @param {number} y1 - y-coordinate of start point at first line
* @param {number} x2 - x-coordinate of end point at first line
* @param {number} y2 - y-coordinate of end point at first line
* @param {number} x3 - x-coordinate of start point at second line
* @param {number} y3 - y-coordinate of start point at second line
* @param {number} x4 - x-coordinate of end point at second line
* @param {number} y4 - y-coordinate of end point at second line
* @returns {[number, number] | null} - [x, y] coordinates of intersection
*/
* Determine the intersection point of two line segments
* @see {@link here http://paulbourke.net/geometry/pointlineplane/}
* @private
* @param {number} x1 - x-coordinate of start point at first line
* @param {number} y1 - y-coordinate of start point at first line
* @param {number} x2 - x-coordinate of end point at first line
* @param {number} y2 - y-coordinate of end point at first line
* @param {number} x3 - x-coordinate of start point at second line
* @param {number} y3 - y-coordinate of start point at second line
* @param {number} x4 - x-coordinate of end point at second line
* @param {number} y4 - y-coordinate of end point at second line
* @returns {[number, number] | null} - [x, y] coordinates of intersection
*/
PolygonUtils.findIntersection = function (x1, y1, x2, y2, x3, y3, x4, y4) {

@@ -107,6 +105,5 @@ var denominator = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));

* @see {@link https://stackoverflow.com/questions/1165647}
*
* @private
* @param {number[]} polygon - polygon coordinates
* @return {boolean}
* @returns {boolean} - true if polygon is clockwise
*/

@@ -136,3 +133,2 @@ PolygonUtils.isPolygonClockwise = function (polygon) {

* Renderer dedicated to drawing and batching graphics objects.
*
* @class

@@ -153,3 +149,2 @@ * @protected

* calculates fill/stroke style for canvas
*
* @private

@@ -178,3 +173,2 @@ * @param style - A graphics {@link PIXI.FILL_STYLE} where if `texture` is specified then a tinted CanvasPattern

* Renders a Graphics object to a canvas.
*
* @param graphics - the actual graphics object to render

@@ -405,3 +399,2 @@ */

* Paint stroke for polygon and holes
*
* @private

@@ -455,3 +448,2 @@ * @param shape - Shape to be drawn

* Paint Ellipse
*
* @private

@@ -502,3 +494,2 @@ * @param shape - Shape to be drawn

* Paint Rounded Rectangle
*
* @private

@@ -584,5 +575,5 @@ * @param shape - Shape to be drawn

* @memberof PIXI.Graphics#
* @param {PIXI.SCALE_MODES} scaleMode - The scale mode of the texture.
* @param {PIXI.SCALE_MODES} [scaleMode] - The scale mode of the texture.
* @param {number} resolution - The resolution of the texture.
* @return {PIXI.Texture} The new texture.
* @returns {PIXI.Texture} The new texture.
*/

@@ -616,3 +607,2 @@ graphics.Graphics.prototype.generateCanvasTexture = function generateCanvasTexture(scaleMode, resolution) {

* Renders the object using the Canvas renderer
*
* @method _renderCanvas

@@ -619,0 +609,0 @@ * @memberof PIXI.Graphics#

/*!
* @pixi/canvas-graphics - v6.3.2
* Compiled Wed, 04 May 2022 17:49:13 UTC
* @pixi/canvas-graphics - v6.4.0
* Compiled Wed, 01 Jun 2022 21:14:23 UTC
*

@@ -5,0 +5,0 @@ * @pixi/canvas-graphics is licensed under the MIT License.

/*!
* @pixi/canvas-graphics - v6.3.2
* Compiled Wed, 04 May 2022 17:49:13 UTC
* @pixi/canvas-graphics - v6.4.0
* Compiled Wed, 01 Jun 2022 21:14:23 UTC
*

@@ -26,10 +26,9 @@ * @pixi/canvas-graphics is licensed under the MIT License.

/**
* Calculate points of an offset polygon
* @see {@link http://csharphelper.com/blog/2016/01/enlarge-a-polygon-in-c/}
*
* @private
* @param {number[]} points - polygon coordinates
* @param {number} offset
* @return {number[]} - offset points
*/
* Calculate points of an offset polygon
* @see {@link http://csharphelper.com/blog/2016/01/enlarge-a-polygon-in-c/}
* @private
* @param {number[]} points - polygon coordinates
* @param {number} offset
* @returns {number[]} - offset points
*/
PolygonUtils.offsetPolygon = function (points, offset) {

@@ -79,16 +78,15 @@ var offsetPoints = [];

/**
* Determine the intersection point of two line segments
* @see {@link here http://paulbourke.net/geometry/pointlineplane/}
*
* @private
* @param {number} x1 - x-coordinate of start point at first line
* @param {number} y1 - y-coordinate of start point at first line
* @param {number} x2 - x-coordinate of end point at first line
* @param {number} y2 - y-coordinate of end point at first line
* @param {number} x3 - x-coordinate of start point at second line
* @param {number} y3 - y-coordinate of start point at second line
* @param {number} x4 - x-coordinate of end point at second line
* @param {number} y4 - y-coordinate of end point at second line
* @returns {[number, number] | null} - [x, y] coordinates of intersection
*/
* Determine the intersection point of two line segments
* @see {@link here http://paulbourke.net/geometry/pointlineplane/}
* @private
* @param {number} x1 - x-coordinate of start point at first line
* @param {number} y1 - y-coordinate of start point at first line
* @param {number} x2 - x-coordinate of end point at first line
* @param {number} y2 - y-coordinate of end point at first line
* @param {number} x3 - x-coordinate of start point at second line
* @param {number} y3 - y-coordinate of start point at second line
* @param {number} x4 - x-coordinate of end point at second line
* @param {number} y4 - y-coordinate of end point at second line
* @returns {[number, number] | null} - [x, y] coordinates of intersection
*/
PolygonUtils.findIntersection = function (x1, y1, x2, y2, x3, y3, x4, y4) {

@@ -112,6 +110,5 @@ var denominator = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));

* @see {@link https://stackoverflow.com/questions/1165647}
*
* @private
* @param {number[]} polygon - polygon coordinates
* @return {boolean}
* @returns {boolean} - true if polygon is clockwise
*/

@@ -141,3 +138,2 @@ PolygonUtils.isPolygonClockwise = function (polygon) {

* Renderer dedicated to drawing and batching graphics objects.
*
* @class

@@ -158,3 +154,2 @@ * @protected

* calculates fill/stroke style for canvas
*
* @private

@@ -183,3 +178,2 @@ * @param style - A graphics {@link PIXI.FILL_STYLE} where if `texture` is specified then a tinted CanvasPattern

* Renders a Graphics object to a canvas.
*
* @param graphics - the actual graphics object to render

@@ -410,3 +404,2 @@ */

* Paint stroke for polygon and holes
*
* @private

@@ -460,3 +453,2 @@ * @param shape - Shape to be drawn

* Paint Ellipse
*
* @private

@@ -507,3 +499,2 @@ * @param shape - Shape to be drawn

* Paint Rounded Rectangle
*
* @private

@@ -589,5 +580,5 @@ * @param shape - Shape to be drawn

* @memberof PIXI.Graphics#
* @param {PIXI.SCALE_MODES} scaleMode - The scale mode of the texture.
* @param {PIXI.SCALE_MODES} [scaleMode] - The scale mode of the texture.
* @param {number} resolution - The resolution of the texture.
* @return {PIXI.Texture} The new texture.
* @returns {PIXI.Texture} The new texture.
*/

@@ -621,3 +612,2 @@ graphics.Graphics.prototype.generateCanvasTexture = function generateCanvasTexture(scaleMode, resolution) {

* Renders the object using the Canvas renderer
*
* @method _renderCanvas

@@ -624,0 +614,0 @@ * @memberof PIXI.Graphics#

/*!
* @pixi/canvas-graphics - v6.3.2
* Compiled Wed, 04 May 2022 17:49:13 UTC
* @pixi/canvas-graphics - v6.4.0
* Compiled Wed, 01 Jun 2022 21:14:23 UTC
*

@@ -5,0 +5,0 @@ * @pixi/canvas-graphics is licensed under the MIT License.

/*!
* @pixi/canvas-graphics - v6.3.2
* Compiled Wed, 04 May 2022 17:49:13 UTC
* @pixi/canvas-graphics - v6.4.0
* Compiled Wed, 01 Jun 2022 21:14:23 UTC
*

@@ -22,10 +22,9 @@ * @pixi/canvas-graphics is licensed under the MIT License.

/**
* Calculate points of an offset polygon
* @see {@link http://csharphelper.com/blog/2016/01/enlarge-a-polygon-in-c/}
*
* @private
* @param {number[]} points - polygon coordinates
* @param {number} offset
* @return {number[]} - offset points
*/
* Calculate points of an offset polygon
* @see {@link http://csharphelper.com/blog/2016/01/enlarge-a-polygon-in-c/}
* @private
* @param {number[]} points - polygon coordinates
* @param {number} offset
* @returns {number[]} - offset points
*/
PolygonUtils.offsetPolygon = function (points, offset) {

@@ -75,16 +74,15 @@ var offsetPoints = [];

/**
* Determine the intersection point of two line segments
* @see {@link here http://paulbourke.net/geometry/pointlineplane/}
*
* @private
* @param {number} x1 - x-coordinate of start point at first line
* @param {number} y1 - y-coordinate of start point at first line
* @param {number} x2 - x-coordinate of end point at first line
* @param {number} y2 - y-coordinate of end point at first line
* @param {number} x3 - x-coordinate of start point at second line
* @param {number} y3 - y-coordinate of start point at second line
* @param {number} x4 - x-coordinate of end point at second line
* @param {number} y4 - y-coordinate of end point at second line
* @returns {[number, number] | null} - [x, y] coordinates of intersection
*/
* Determine the intersection point of two line segments
* @see {@link here http://paulbourke.net/geometry/pointlineplane/}
* @private
* @param {number} x1 - x-coordinate of start point at first line
* @param {number} y1 - y-coordinate of start point at first line
* @param {number} x2 - x-coordinate of end point at first line
* @param {number} y2 - y-coordinate of end point at first line
* @param {number} x3 - x-coordinate of start point at second line
* @param {number} y3 - y-coordinate of start point at second line
* @param {number} x4 - x-coordinate of end point at second line
* @param {number} y4 - y-coordinate of end point at second line
* @returns {[number, number] | null} - [x, y] coordinates of intersection
*/
PolygonUtils.findIntersection = function (x1, y1, x2, y2, x3, y3, x4, y4) {

@@ -108,6 +106,5 @@ var denominator = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));

* @see {@link https://stackoverflow.com/questions/1165647}
*
* @private
* @param {number[]} polygon - polygon coordinates
* @return {boolean}
* @returns {boolean} - true if polygon is clockwise
*/

@@ -137,3 +134,2 @@ PolygonUtils.isPolygonClockwise = function (polygon) {

* Renderer dedicated to drawing and batching graphics objects.
*
* @class

@@ -154,3 +150,2 @@ * @protected

* calculates fill/stroke style for canvas
*
* @private

@@ -179,3 +174,2 @@ * @param style - A graphics {@link PIXI.FILL_STYLE} where if `texture` is specified then a tinted CanvasPattern

* Renders a Graphics object to a canvas.
*
* @param graphics - the actual graphics object to render

@@ -406,3 +400,2 @@ */

* Paint stroke for polygon and holes
*
* @private

@@ -456,3 +449,2 @@ * @param shape - Shape to be drawn

* Paint Ellipse
*
* @private

@@ -503,3 +495,2 @@ * @param shape - Shape to be drawn

* Paint Rounded Rectangle
*
* @private

@@ -585,5 +576,5 @@ * @param shape - Shape to be drawn

* @memberof PIXI.Graphics#
* @param {PIXI.SCALE_MODES} scaleMode - The scale mode of the texture.
* @param {PIXI.SCALE_MODES} [scaleMode] - The scale mode of the texture.
* @param {number} resolution - The resolution of the texture.
* @return {PIXI.Texture} The new texture.
* @returns {PIXI.Texture} The new texture.
*/

@@ -617,3 +608,2 @@ Graphics.prototype.generateCanvasTexture = function generateCanvasTexture(scaleMode, resolution) {

* Renders the object using the Canvas renderer
*
* @method _renderCanvas

@@ -620,0 +610,0 @@ * @memberof PIXI.Graphics#

/*!
* @pixi/canvas-graphics - v6.3.2
* Compiled Wed, 04 May 2022 17:49:13 UTC
* @pixi/canvas-graphics - v6.4.0
* Compiled Wed, 01 Jun 2022 21:14:23 UTC
*

@@ -5,0 +5,0 @@ * @pixi/canvas-graphics is licensed under the MIT License.

@@ -1,7 +0,9 @@

declare namespace GlobalMixins {
interface Graphics {
declare namespace GlobalMixins
{
interface Graphics
{
_renderCanvas(renderer: import('@pixi/canvas-renderer').CanvasRenderer): void;
generateCanvasTexture(scaleMode: import('@pixi/constants').SCALE_MODES, resolution?: number): Texture;
generateCanvasTexture(scaleMode?: import('@pixi/constants').SCALE_MODES, resolution?: number): Texture;
cachedGraphicsData: import('@pixi/graphics').GraphicsData[];
}
}

@@ -9,3 +9,2 @@ /// <reference path="./global.d.ts" />

* Renderer dedicated to drawing and batching graphics objects.
*
* @class

@@ -26,3 +25,2 @@ * @protected

* calculates fill/stroke style for canvas
*
* @private

@@ -36,3 +34,2 @@ * @param style - A graphics {@link PIXI.FILL_STYLE} where if `texture` is specified then a tinted CanvasPattern

* Renders a Graphics object to a canvas.
*
* @param graphics - the actual graphics object to render

@@ -43,3 +40,2 @@ */

* Paint stroke for polygon and holes
*
* @private

@@ -57,3 +53,2 @@ * @param shape - Shape to be drawn

* Paint Ellipse
*
* @private

@@ -70,3 +65,2 @@ * @param shape - Shape to be drawn

* Paint Rounded Rectangle
*
* @private

@@ -73,0 +67,0 @@ * @param shape - Shape to be drawn

{
"name": "@pixi/canvas-graphics",
"version": "6.3.2",
"version": "6.4.0",
"main": "dist/cjs/canvas-graphics.js",
"module": "dist/esm/canvas-graphics.js",
"bundle": "dist/browser/canvas-graphics.js",
"types": "index.d.ts",
"exports": {
".": {
"import": {
"default": "./dist/cjs/canvas-graphics.js",
"types": "./index.d.ts"
},
"require": {
"default": "./dist/esm/canvas-graphics.js",
"types": "./index.d.ts"
}
}
},
"description": "Canvas mixin for the graphics package",

@@ -28,10 +41,10 @@ "author": "Mat Groves",

"peerDependencies": {
"@pixi/canvas-display": "6.3.2",
"@pixi/canvas-renderer": "6.3.2",
"@pixi/constants": "6.3.2",
"@pixi/core": "6.3.2",
"@pixi/graphics": "6.3.2",
"@pixi/math": "6.3.2"
"@pixi/canvas-display": "6.4.0",
"@pixi/canvas-renderer": "6.4.0",
"@pixi/constants": "6.4.0",
"@pixi/core": "6.4.0",
"@pixi/graphics": "6.4.0",
"@pixi/math": "6.4.0"
},
"gitHead": "87031295631dcd7db3e24b99ed7ceb2c4f963a40"
"gitHead": "e7eaa713b6e0eeb335e90384aec778f5c99c60d5"
}

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc