├── .gitignore ├── LICENSE.md ├── README.md ├── demo └── index.ts ├── dist ├── index.d.ts ├── index.js └── index.js.map ├── docs ├── index.html ├── index.js └── index.js.map ├── lib └── index.ts ├── package-lock.json ├── package.json ├── tsconfig-demo.json ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .parcel-cache 3 | pixijs 4 | .DS_Store -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2021 David Figatner 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pixi-dashed-line 2 | 3 | A pixi.js implementation to support dashed lines in PIXI.Graphics. 4 | 5 | * Two implementations of a dashed line for pixi.js: lineTo/moveTo w/gaps (preferred), and texture-based (using a dashed-line texture when drawing the line) 6 | * Dashed support for lineTo, drawCircle, drawEllipse, drawPolygon 7 | * Dashed lines can be scaled (allows for dashed lines to remain the same size regardless of zoom level) 8 | 9 | ## Live Demo 10 | 11 | [https://davidfig.github.io/pixi-dashed-line](https://davidfig.github.io/pixi-dashed-line/) ([source code](https://github.com/davidfig/pixi-dashed-line/blob/main/demo/index.ts)) 12 | 13 | ## Documentation 14 | 15 | ### class DashLine 16 | #### constructor(graphics: PIXI.Graphics, options?.DashLineOptions) 17 | ```js 18 | DashLine.DashLineOptions = { 19 | useTexture?=false - whether to use a texture or moveTo/lineTo (see notes below in README.md) 20 | dashes?=[10, 5] - an array holding one or more [dash, gap] entries, eg, [10, 5, 20, 10, ...]) 21 | width?=1 - width of the dashed line 22 | color?=0xffffff - color of the dashed line 23 | alpha?=1 - alpha of the dashed line 24 | options.cap? - add a PIXI.LINE_CAP style to dashed lines (only works for useTexture: false) 25 | options.join? - add a PIXI.LINE_JOIN style to the dashed lines (only works for useTexture: false) 26 | options.alignment? - change alignment of lines drawn (0.5 = middle, 1 = outer, 0 = inner) 27 | } 28 | ``` 29 | #### moveTo(x: number, y: number) 30 | Moves cursor to location 31 | 32 | #### lineTo(x: number, y: number, closePath?: boolean) 33 | Draws a dashed line. If closePath = true, then lineTo will leave a proper gap if its destination is the first point (ie, if this line closes the shape) 34 | 35 | #### drawCircle(x: number, y: number, radius: number, points=80, matrix?: PIXI.Matrix) 36 | where x,y is the center of circle, and points are the number of points used to draw the circle; matrix is applied before the draw (this adds a shape-specific transform to pixi's DisplayObject transforms) 37 | 38 | #### drawEllipse(x: number, y: number, radiusX: number, radiusY: number, points=80, matrix?: PIXI.Matrix) 39 | where x,y is the center of ellipse, and points are the number of points used to draw the ellipse; matrix is applied before the draw (this adds a shape-specific transform to pixi's DisplayObject transforms) 40 | 41 | #### drawRect(x: number, y: number, width: number, height: number, matrix?: PIXI.Matrix) 42 | draws a dashed rectangle; matrix is applied before the draw (this adds a shape-specific transform to pixi's DisplayObject transforms) 43 | 44 | #### drawPolygon(PIXI.Point[] | number[], matrix?: PIXI.Matrix) 45 | draws a dashed polygon; matrix is applied before the draw (this adds a shape-specific transform to pixi's DisplayObject transforms) 46 | 47 | #### setLineStyle() 48 | changes line style to the proper dashed line style -- this is useful if the graphics element's lineStyle was changed 49 | 50 | ## Simple Example 51 | 52 | ```js 53 | import { DashLine } from 'pixi-dashed-lines' 54 | 55 | ... 56 | const g = stage.addChild(new PIXI.Graphics()) 57 | 58 | const dash = new DashLine(g, { 59 | dash: [20, 10], 60 | width: 5, 61 | color: 0xff0000, 62 | }) 63 | 64 | // draws a dashed triangle 65 | dash.moveTo(0, 0) 66 | .lineTo(100, 100) 67 | .lineTo(0, 100) 68 | .lineTo(0, 0) 69 | 70 | ``` 71 | ## When to use options.useTexture = true 72 | 73 | For most use-cases, the lineTo/moveTo (`options.useTexture = false`) is better because it provides a more accurate implementation and supports cap and join styles. 74 | 75 | The texture-based approach (`options.useTexture = true`) is useful when the geometry is very large or very small as PIXI.Graphics does not handle those cases well (see https://www.html5gamedevs.com/topic/24876-weird-lines-when-using-extreme-coordinate-values/). You'll know you need this if zooming in and out on the dashed line causes out of memory errors :) 76 | 77 | ### Technical Notes on options.useTexture = true 78 | `options.useTexture=true` does not use pixi.js's line joins and caps for connecting lines (see https://mattdesl.svbtle.com/drawing-lines-is-hard): instead it uses `Graphics.lineTextureStyle` to supply a texture to draw the dashed lines. The texture needs a custom matrix to properly rotate the dash based on the angle of the next line (and to translate the texture so it starts properly (see https://www.html5gamedevs.com/topic/45698-begintexturefill/)). Without the matrix, the dash's length will change as the line's angle changes. 79 | 80 | Regrettably, pixi.js does not provide a mechanism to change the matrix of a texture without breaking the current line with a moveTo command. (This was my key insight that finally got this working. I banged my head many hours trying to figure out why the texture did not rotate properly. The answer was that you have to moveTo before changing the matrix.) 81 | 82 | ### Future work 83 | Ideally, the dashed line functionality should be built directly into pixi.js's Graphics line drawing module w/logic that separates the triangles of the dashed line to take into account changes in the angle of the line. I thought about adding it, but decided the amount of work was not worth it. (Especially since the use case for useTexture is limited to strange PIXI.Graphics geometries.) Maybe someone does a different calculus and adds this feature directly into pixi.js and makes this library obsolete. 84 | 85 | ## License 86 | MIT License 87 | (c) 2021 [David Figatner](https://yopeyopey.com/) 88 | -------------------------------------------------------------------------------- /demo/index.ts: -------------------------------------------------------------------------------- 1 | import * as PIXI from 'pixi.js' 2 | import { Viewport } from 'pixi-viewport' 3 | import { DashLine } from '../lib' 4 | 5 | let viewport: Viewport, g: PIXI.Graphics, x2: number, y2: number 6 | 7 | let useTexture = false 8 | 9 | function checkbox() { 10 | return document.querySelector('#use-texture') as HTMLInputElement 11 | } 12 | 13 | function setup() { 14 | const canvas = document.querySelector('canvas') 15 | const application = new PIXI.Application({ 16 | view: canvas, 17 | width: window.innerWidth, 18 | height: window.innerHeight, 19 | antialias: true, 20 | backgroundAlpha: 0, 21 | }) 22 | viewport = application.stage.addChild(new Viewport({ 23 | screenWidth: window.innerWidth, 24 | screenHeight: window.innerHeight, 25 | passiveWheel: false, 26 | stopPropagation: true, 27 | })) 28 | viewport.pinch().wheel().decelerate().drag() 29 | g = viewport.addChild(new PIXI.Graphics()) 30 | viewport.on('zoomed', () => draw()) 31 | y2 = window.innerHeight - 100 32 | x2 = window.innerWidth - 100 33 | checkbox().checked = useTexture 34 | checkbox().addEventListener('change', () => { 35 | useTexture = !useTexture 36 | draw() 37 | }) 38 | } 39 | 40 | function drawScalingRectangle() { 41 | const scale = 1 / viewport.scale.x 42 | const dash = new DashLine(g, { 43 | dash: [20, 10], 44 | width: 5, 45 | scale, 46 | useTexture, 47 | color: 0, 48 | alignment: 1, 49 | }) 50 | dash.drawRect(100, 100, x2 - 100, y2 - 100) 51 | 52 | const text = g.addChild(new PIXI.Text('This rectangle\'s outline size remains constant when zooming', { fill: 'black', fontSize: '15px' })) 53 | text.position.set(x2 - text.width, 100 - text.height - 5) 54 | } 55 | 56 | function drawJoinCapRectangle() { 57 | const dash = new DashLine(g, { 58 | dash: [20, 5], 59 | width: 3, 60 | color: 0xaa00aa, 61 | useTexture, 62 | cap: PIXI.LINE_CAP.ROUND, 63 | join: PIXI.LINE_JOIN.ROUND, 64 | }) 65 | dash.drawRect(150, 150, x2 - 200, y2 - 200) 66 | 67 | const text = g.addChild(new PIXI.Text('Using cap and joins (only works when useTexture: false)', { fill: 'black', fontSize: '15px' })) 68 | text.position.set(x2 - 50 - text.width, 150 - text.height - 5) 69 | } 70 | 71 | function drawCircle() { 72 | const dash = new DashLine(g, { 73 | dash: [10, 5], 74 | width: 3, 75 | color: 0x0000aa, 76 | useTexture, 77 | }) 78 | const x = window.innerWidth / 2 79 | const y = window.innerHeight / 2 80 | dash.drawCircle(x, y, 100) 81 | } 82 | 83 | function drawTinyCircle() { 84 | const dash = new DashLine(g, { 85 | dash: [10, 5], 86 | width: 0.5, 87 | color: 0xaa00aa, 88 | useTexture, 89 | }) 90 | const x = window.innerWidth / 2 91 | const y = window.innerHeight / 2 92 | dash.drawCircle(x, y, 5) 93 | } 94 | 95 | function drawEllipse() { 96 | const dot = new DashLine(g, { 97 | dash: [3, 3], 98 | width: 3, 99 | color: 0x00aa00, 100 | useTexture, 101 | }) 102 | const x = window.innerWidth / 2 103 | const y = window.innerHeight / 2 104 | dot.drawEllipse(x, y, 300, 200) 105 | } 106 | 107 | function drawPolygon() { 108 | const dash = new DashLine(g, { 109 | width: 2, 110 | color: 0xaa0000, 111 | useTexture, 112 | }) 113 | const x = window.innerWidth / 2 114 | const y = window.innerHeight / 2 115 | const size = 20 116 | dash.drawPolygon([x, y - size, x - size, y + size, x + size, y + size, x, y - size]) 117 | } 118 | 119 | function draw() { 120 | g.removeChildren() 121 | g.clear() 122 | drawScalingRectangle() 123 | drawJoinCapRectangle() 124 | drawCircle() 125 | drawTinyCircle() 126 | drawEllipse() 127 | drawPolygon() 128 | } 129 | 130 | function keyboard() { 131 | window.addEventListener('keydown', (event: KeyboardEvent) => { 132 | if (event.key === 'ArrowUp') { 133 | viewport.zoom(1, true) 134 | draw() 135 | } 136 | if (event.key === 'ArrowDown') { 137 | viewport.zoom(-1, true) 138 | draw() 139 | } 140 | }) 141 | } 142 | 143 | setup() 144 | draw() 145 | keyboard() -------------------------------------------------------------------------------- /dist/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as PIXI from 'pixi.js'; 2 | /** Define the dash: [dash length, gap size, dash size, gap size, ...] */ 3 | export declare type Dashes = number[]; 4 | export interface DashLineOptions { 5 | dash?: Dashes; 6 | width?: number; 7 | color?: number; 8 | alpha?: number; 9 | scale?: number; 10 | useTexture?: boolean; 11 | useDots?: boolean; 12 | cap?: PIXI.LINE_CAP; 13 | join?: PIXI.LINE_JOIN; 14 | alignment?: number; 15 | } 16 | export declare class DashLine { 17 | graphics: PIXI.Graphics; 18 | /** current length of the line */ 19 | lineLength: number; 20 | /** cursor location */ 21 | cursor: PIXI.Point; 22 | /** desired scale of line */ 23 | scale: number; 24 | private activeTexture; 25 | private start; 26 | private dashSize; 27 | private dash; 28 | private useTexture; 29 | private options; 30 | static dashTextureCache: Record; 31 | /** 32 | * Create a DashLine 33 | * @param graphics 34 | * @param [options] 35 | * @param [options.useTexture=false] - use the texture based render (useful for very large or very small dashed lines) 36 | * @param [options.dashes=[10,5] - an array holding the dash and gap (eg, [10, 5, 20, 5, ...]) 37 | * @param [options.width=1] - width of the dashed line 38 | * @param [options.alpha=1] - alpha of the dashed line 39 | * @param [options.color=0xffffff] - color of the dashed line 40 | * @param [options.cap] - add a PIXI.LINE_CAP style to dashed lines (only works for useTexture: false) 41 | * @param [options.join] - add a PIXI.LINE_JOIN style to the dashed lines (only works for useTexture: false) 42 | * @param [options.alignment] - The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner) 43 | */ 44 | constructor(graphics: PIXI.Graphics, options?: DashLineOptions); 45 | /** resets line style to enable dashed line (useful if lineStyle was changed on graphics element) */ 46 | setLineStyle(): void; 47 | private static distance; 48 | moveTo(x: number, y: number): this; 49 | lineTo(x: number, y: number, closePath?: boolean): this; 50 | closePath(): void; 51 | drawCircle(x: number, y: number, radius: number, points?: number, matrix?: PIXI.Matrix): this; 52 | drawEllipse(x: number, y: number, radiusX: number, radiusY: number, points?: number, matrix?: PIXI.Matrix): this; 53 | drawPolygon(points: PIXI.Point[] | number[], matrix?: PIXI.Matrix): this; 54 | drawRect(x: number, y: number, width: number, height: number, matrix?: PIXI.Matrix): this; 55 | private adjustLineStyle; 56 | private static getTexture; 57 | } 58 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __assign = (this && this.__assign) || function () { 3 | __assign = Object.assign || function(t) { 4 | for (var s, i = 1, n = arguments.length; i < n; i++) { 5 | s = arguments[i]; 6 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 7 | t[p] = s[p]; 8 | } 9 | return t; 10 | }; 11 | return __assign.apply(this, arguments); 12 | }; 13 | exports.__esModule = true; 14 | exports.DashLine = void 0; 15 | var PIXI = require("pixi.js"); 16 | var dashLineOptionsDefault = { 17 | dash: [10, 5], 18 | width: 1, 19 | color: 0xffffff, 20 | alpha: 1, 21 | scale: 1, 22 | useTexture: false, 23 | alignment: 0.5 24 | }; 25 | var DashLine = /** @class */ (function () { 26 | /** 27 | * Create a DashLine 28 | * @param graphics 29 | * @param [options] 30 | * @param [options.useTexture=false] - use the texture based render (useful for very large or very small dashed lines) 31 | * @param [options.dashes=[10,5] - an array holding the dash and gap (eg, [10, 5, 20, 5, ...]) 32 | * @param [options.width=1] - width of the dashed line 33 | * @param [options.alpha=1] - alpha of the dashed line 34 | * @param [options.color=0xffffff] - color of the dashed line 35 | * @param [options.cap] - add a PIXI.LINE_CAP style to dashed lines (only works for useTexture: false) 36 | * @param [options.join] - add a PIXI.LINE_JOIN style to the dashed lines (only works for useTexture: false) 37 | * @param [options.alignment] - The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner) 38 | */ 39 | function DashLine(graphics, options) { 40 | if (options === void 0) { options = {}; } 41 | /** cursor location */ 42 | this.cursor = new PIXI.Point(); 43 | /** desired scale of line */ 44 | this.scale = 1; 45 | this.graphics = graphics; 46 | options = __assign(__assign({}, dashLineOptionsDefault), options); 47 | this.dash = options.dash; 48 | this.dashSize = this.dash.reduce(function (a, b) { return a + b; }); 49 | this.useTexture = options.useTexture; 50 | this.options = options; 51 | this.setLineStyle(); 52 | } 53 | /** resets line style to enable dashed line (useful if lineStyle was changed on graphics element) */ 54 | DashLine.prototype.setLineStyle = function () { 55 | var options = this.options; 56 | if (this.useTexture) { 57 | var texture = DashLine.getTexture(options, this.dashSize); 58 | this.graphics.lineTextureStyle({ 59 | width: options.width * options.scale, 60 | color: options.color, 61 | alpha: options.alpha, 62 | texture: texture, 63 | alignment: options.alignment 64 | }); 65 | this.activeTexture = texture; 66 | } 67 | else { 68 | this.graphics.lineStyle({ 69 | width: options.width * options.scale, 70 | color: options.color, 71 | alpha: options.alpha, 72 | cap: options.cap, 73 | join: options.join, 74 | alignment: options.alignment 75 | }); 76 | } 77 | this.scale = options.scale; 78 | }; 79 | DashLine.distance = function (x1, y1, x2, y2) { 80 | return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); 81 | }; 82 | DashLine.prototype.moveTo = function (x, y) { 83 | this.lineLength = 0; 84 | this.cursor.set(x, y); 85 | this.start = new PIXI.Point(x, y); 86 | this.graphics.moveTo(this.cursor.x, this.cursor.y); 87 | return this; 88 | }; 89 | DashLine.prototype.lineTo = function (x, y, closePath) { 90 | if (typeof this.lineLength === undefined) { 91 | this.moveTo(0, 0); 92 | } 93 | var length = DashLine.distance(this.cursor.x, this.cursor.y, x, y); 94 | var angle = Math.atan2(y - this.cursor.y, x - this.cursor.x); 95 | var closed = closePath && x === this.start.x && y === this.start.y; 96 | if (this.useTexture) { 97 | this.graphics.moveTo(this.cursor.x, this.cursor.y); 98 | this.adjustLineStyle(angle); 99 | if (closed && this.dash.length % 2 === 0) { 100 | var gap = Math.min(this.dash[this.dash.length - 1], length); 101 | this.graphics.lineTo(x - Math.cos(angle) * gap, y - Math.sin(angle) * gap); 102 | this.graphics.closePath(); 103 | } 104 | else { 105 | this.graphics.lineTo(x, y); 106 | } 107 | } 108 | else { 109 | var cos = Math.cos(angle); 110 | var sin = Math.sin(angle); 111 | var x0 = this.cursor.x; 112 | var y0 = this.cursor.y; 113 | // find the first part of the dash for this line 114 | var place = this.lineLength % (this.dashSize * this.scale); 115 | var dashIndex = 0, dashStart = 0; 116 | var dashX = 0; 117 | for (var i = 0; i < this.dash.length; i++) { 118 | var dashSize = this.dash[i] * this.scale; 119 | if (place < dashX + dashSize) { 120 | dashIndex = i; 121 | dashStart = place - dashX; 122 | break; 123 | } 124 | else { 125 | dashX += dashSize; 126 | } 127 | } 128 | var remaining = length; 129 | // let count = 0 130 | while (remaining > 0) { // && count++ < 1000) { 131 | var dashSize = this.dash[dashIndex] * this.scale - dashStart; 132 | var dist = remaining > dashSize ? dashSize : remaining; 133 | if (closed) { 134 | var remainingDistance = DashLine.distance(x0 + cos * dist, y0 + sin * dist, this.start.x, this.start.y); 135 | if (remainingDistance <= dist) { 136 | if (dashIndex % 2 === 0) { 137 | var lastDash = DashLine.distance(x0, y0, this.start.x, this.start.y) - this.dash[this.dash.length - 1] * this.scale; 138 | x0 += cos * lastDash; 139 | y0 += sin * lastDash; 140 | this.graphics.lineTo(x0, y0); 141 | } 142 | break; 143 | } 144 | } 145 | x0 += cos * dist; 146 | y0 += sin * dist; 147 | if (dashIndex % 2) { 148 | this.graphics.moveTo(x0, y0); 149 | } 150 | else { 151 | this.graphics.lineTo(x0, y0); 152 | } 153 | remaining -= dist; 154 | dashIndex++; 155 | dashIndex = dashIndex === this.dash.length ? 0 : dashIndex; 156 | dashStart = 0; 157 | } 158 | // if (count >= 1000) console.log('failure', this.scale) 159 | } 160 | this.lineLength += length; 161 | this.cursor.set(x, y); 162 | return this; 163 | }; 164 | DashLine.prototype.closePath = function () { 165 | this.lineTo(this.start.x, this.start.y, true); 166 | }; 167 | DashLine.prototype.drawCircle = function (x, y, radius, points, matrix) { 168 | if (points === void 0) { points = 80; } 169 | var interval = Math.PI * 2 / points; 170 | var angle = 0, first; 171 | if (matrix) { 172 | first = new PIXI.Point(x + Math.cos(angle) * radius, y + Math.sin(angle) * radius); 173 | matrix.apply(first, first); 174 | this.moveTo(first[0], first[1]); 175 | } 176 | else { 177 | first = new PIXI.Point(x + Math.cos(angle) * radius, y + Math.sin(angle) * radius); 178 | this.moveTo(first.x, first.y); 179 | } 180 | angle += interval; 181 | for (var i = 1; i < points + 1; i++) { 182 | var next = i === points ? first : [x + Math.cos(angle) * radius, y + Math.sin(angle) * radius]; 183 | this.lineTo(next[0], next[1]); 184 | angle += interval; 185 | } 186 | return this; 187 | }; 188 | DashLine.prototype.drawEllipse = function (x, y, radiusX, radiusY, points, matrix) { 189 | if (points === void 0) { points = 80; } 190 | var interval = Math.PI * 2 / points; 191 | var first; 192 | var point = new PIXI.Point(); 193 | var f = 0; 194 | for (var i = 0; i < Math.PI * 2; i += interval) { 195 | var x0 = x - radiusX * Math.sin(i); 196 | var y0 = y - radiusY * Math.cos(i); 197 | if (matrix) { 198 | point.set(x0, y0); 199 | matrix.apply(point, point); 200 | x0 = point.x; 201 | y0 = point.y; 202 | } 203 | if (i === 0) { 204 | this.moveTo(x0, y0); 205 | first = { x: x0, y: y0 }; 206 | } 207 | else { 208 | this.lineTo(x0, y0); 209 | } 210 | } 211 | this.lineTo(first.x, first.y, true); 212 | return this; 213 | }; 214 | DashLine.prototype.drawPolygon = function (points, matrix) { 215 | var p = new PIXI.Point(); 216 | if (typeof points[0] === 'number') { 217 | if (matrix) { 218 | p.set(points[0], points[1]); 219 | matrix.apply(p, p); 220 | this.moveTo(p.x, p.y); 221 | for (var i = 2; i < points.length; i += 2) { 222 | p.set(points[i], points[i + 1]); 223 | matrix.apply(p, p); 224 | this.lineTo(p.x, p.y, i === points.length - 2); 225 | } 226 | } 227 | else { 228 | this.moveTo(points[0], points[1]); 229 | for (var i = 2; i < points.length; i += 2) { 230 | this.lineTo(points[i], points[i + 1], i === points.length - 2); 231 | } 232 | } 233 | } 234 | else { 235 | if (matrix) { 236 | var point = points[0]; 237 | p.copyFrom(point); 238 | matrix.apply(p, p); 239 | this.moveTo(p.x, p.y); 240 | for (var i = 1; i < points.length; i++) { 241 | var point_1 = points[i]; 242 | p.copyFrom(point_1); 243 | matrix.apply(p, p); 244 | this.lineTo(p.x, p.y, i === points.length - 1); 245 | } 246 | } 247 | else { 248 | var point = points[0]; 249 | this.moveTo(point.x, point.y); 250 | for (var i = 1; i < points.length; i++) { 251 | var point_2 = points[i]; 252 | this.lineTo(point_2.x, point_2.y, i === points.length - 1); 253 | } 254 | } 255 | } 256 | return this; 257 | }; 258 | DashLine.prototype.drawRect = function (x, y, width, height, matrix) { 259 | if (matrix) { 260 | var p = new PIXI.Point(); 261 | // moveTo(x, y) 262 | p.set(x, y); 263 | matrix.apply(p, p); 264 | this.moveTo(p.x, p.y); 265 | // lineTo(x + width, y) 266 | p.set(x + width, y); 267 | matrix.apply(p, p); 268 | this.lineTo(p.x, p.y); 269 | // lineTo(x + width, y + height) 270 | p.set(x + width, y + height); 271 | matrix.apply(p, p); 272 | this.lineTo(p.x, p.y); 273 | // lineto(x, y + height) 274 | p.set(x, y + height); 275 | matrix.apply(p, p); 276 | this.lineTo(p.x, p.y); 277 | // lineTo(x, y, true) 278 | p.set(x, y); 279 | matrix.apply(p, p); 280 | this.lineTo(p.x, p.y, true); 281 | } 282 | else { 283 | this.moveTo(x, y) 284 | .lineTo(x + width, y) 285 | .lineTo(x + width, y + height) 286 | .lineTo(x, y + height) 287 | .lineTo(x, y, true); 288 | } 289 | return this; 290 | }; 291 | // adjust the matrix for the dashed texture 292 | DashLine.prototype.adjustLineStyle = function (angle) { 293 | var lineStyle = this.graphics.line; 294 | lineStyle.matrix = new PIXI.Matrix(); 295 | if (angle) { 296 | lineStyle.matrix.rotate(angle); 297 | } 298 | if (this.scale !== 1) 299 | lineStyle.matrix.scale(this.scale, this.scale); 300 | var textureStart = -this.lineLength; 301 | lineStyle.matrix.translate(this.cursor.x + textureStart * Math.cos(angle), this.cursor.y + textureStart * Math.sin(angle)); 302 | this.graphics.lineStyle(lineStyle); 303 | }; 304 | // creates or uses cached texture 305 | DashLine.getTexture = function (options, dashSize) { 306 | var key = options.dash.toString(); 307 | if (DashLine.dashTextureCache[key]) { 308 | return DashLine.dashTextureCache[key]; 309 | } 310 | var canvas = document.createElement("canvas"); 311 | canvas.width = dashSize; 312 | canvas.height = Math.ceil(options.width); 313 | var context = canvas.getContext("2d"); 314 | if (!context) { 315 | console.warn('Did not get context from canvas'); 316 | return; 317 | } 318 | context.strokeStyle = "white"; 319 | context.globalAlpha = options.alpha; 320 | context.lineWidth = options.width; 321 | var x = 0; 322 | var y = options.width / 2; 323 | context.moveTo(x, y); 324 | for (var i = 0; i < options.dash.length; i += 2) { 325 | x += options.dash[i]; 326 | context.lineTo(x, y); 327 | if (options.dash.length !== i + 1) { 328 | x += options.dash[i + 1]; 329 | context.moveTo(x, y); 330 | } 331 | } 332 | context.stroke(); 333 | var texture = DashLine.dashTextureCache[key] = PIXI.Texture.from(canvas); 334 | texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; 335 | return texture; 336 | }; 337 | // cache of PIXI.Textures for dashed lines 338 | DashLine.dashTextureCache = {}; 339 | return DashLine; 340 | }()); 341 | exports.DashLine = DashLine; 342 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /dist/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8BAA+B;AAkB/B,IAAM,sBAAsB,GAA6B;IACrD,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACb,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,GAAG;CACjB,CAAA;AAED;IA0BI;;;;;;;;;;;;OAYG;IACH,kBAAY,QAAuB,EAAE,OAA6B;QAA7B,wBAAA,EAAA,YAA6B;QAjClE,sBAAsB;QACtB,W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EAAE;YAC7C,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACpB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;YACpB,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;gBAC/B,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;gBACxB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;aACvB;SACJ;QACD,OAAO,CAAC,MAAM,EAAE,CAAA;QAChB,IAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC1E,OAAO,CAAC,WAAW,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAA;QACxD,OAAO,OAAO,CAAA;IAClB,CAAC;IA3TD,0CAA0C;IACnC,yBAAgB,GAAiC,EAAE,CAAA;IA2T9D,eAAC;CAAA,AAnVD,IAmVC;AAnVY,4BAAQ"} -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 36 | 37 | 38 | 39 | 40 |
Demo for pixi-dashed-line
41 |
42 | 43 | 44 |
45 |
Drag and zoom viewport using mouse or touch
46 | 47 | -------------------------------------------------------------------------------- /docs/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts","../demo/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAcA,MAAM,sBAAsB,GAA6B;QACrD,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACb,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,KAAK;KACpB,CAAA;IAED,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G,CAAC,CAAA;QAChC,GAAG,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IACnC,CAAC;IAED,SAAS,WAAW;QAChB,MAAM,IAAI,GAAG,IAAI,cAAQ,CAAC,CAAC,EAAE;YACzB,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,QAAQ;YACf,UAAU;SACb,CAAC,CAAA;QACF,MAAM,CAAC,GAAG,MAAM,CAAC,UAAU,GAAG,CAAC,CAAA;QAC/B,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,CAAA;QAChC,MAAM,IAAI,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;IACxF,CAAC;IAED,SAAS,IAAI;QACT,CAAC,CAAC,cAAc,EAAE,CAAA;QAClB,CAAC,CAAC,KAAK,EAAE,CAAA;QACT,oBAAoB,EAAE,CAAA;QACtB,UAAU,EAAE,CAAA;QACZ,WAAW,EAAE,CAAA;QACb,WAAW,EAAE,CAAA;IACjB,CAAC;IAED,KAAK,EAAE,CAAA;IACP,IAAI,EAAE,CAAA"} -------------------------------------------------------------------------------- /lib/index.ts: -------------------------------------------------------------------------------- 1 | import * as PIXI from 'pixi.js' 2 | 3 | /** Define the dash: [dash length, gap size, dash size, gap size, ...] */ 4 | export type Dashes = number[] 5 | 6 | export interface DashLineOptions { 7 | dash?: Dashes, 8 | width?: number 9 | color?: number 10 | alpha?: number 11 | scale?: number 12 | useTexture?: boolean 13 | useDots?: boolean 14 | cap?: PIXI.LINE_CAP 15 | join?: PIXI.LINE_JOIN 16 | alignment?: number 17 | } 18 | 19 | const dashLineOptionsDefault: Partial = { 20 | dash: [10, 5], 21 | width: 1, 22 | color: 0xffffff, 23 | alpha: 1, 24 | scale: 1, 25 | useTexture: false, 26 | alignment: 0.5, 27 | } 28 | 29 | export class DashLine { 30 | graphics: PIXI.Graphics 31 | 32 | /** current length of the line */ 33 | lineLength: number 34 | 35 | /** cursor location */ 36 | cursor = new PIXI.Point() 37 | 38 | /** desired scale of line */ 39 | scale = 1 40 | 41 | // sanity check to ensure the lineStyle is still in use 42 | private activeTexture: PIXI.Texture 43 | 44 | private start: PIXI.Point 45 | 46 | private dashSize: number 47 | private dash: number[] 48 | 49 | private useTexture: boolean 50 | private options: DashLineOptions; 51 | 52 | // cache of PIXI.Textures for dashed lines 53 | static dashTextureCache: Record = {} 54 | 55 | /** 56 | * Create a DashLine 57 | * @param graphics 58 | * @param [options] 59 | * @param [options.useTexture=false] - use the texture based render (useful for very large or very small dashed lines) 60 | * @param [options.dashes=[10,5] - an array holding the dash and gap (eg, [10, 5, 20, 5, ...]) 61 | * @param [options.width=1] - width of the dashed line 62 | * @param [options.alpha=1] - alpha of the dashed line 63 | * @param [options.color=0xffffff] - color of the dashed line 64 | * @param [options.cap] - add a PIXI.LINE_CAP style to dashed lines (only works for useTexture: false) 65 | * @param [options.join] - add a PIXI.LINE_JOIN style to the dashed lines (only works for useTexture: false) 66 | * @param [options.alignment] - The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner) 67 | */ 68 | constructor(graphics: PIXI.Graphics, options: DashLineOptions = {}) { 69 | this.graphics = graphics 70 | options = { ...dashLineOptionsDefault, ...options } 71 | this.dash = options.dash 72 | this.dashSize = this.dash.reduce((a, b) => a + b) 73 | this.useTexture = options.useTexture 74 | this.options = options; 75 | this.setLineStyle(); 76 | } 77 | 78 | /** resets line style to enable dashed line (useful if lineStyle was changed on graphics element) */ 79 | setLineStyle() { 80 | const options = this.options 81 | if (this.useTexture) { 82 | const texture = DashLine.getTexture(options, this.dashSize) 83 | this.graphics.lineTextureStyle({ 84 | width: options.width * options.scale, 85 | color: options.color, 86 | alpha: options.alpha, 87 | texture, 88 | alignment: options.alignment, 89 | }) 90 | this.activeTexture = texture 91 | } else { 92 | this.graphics.lineStyle({ 93 | width: options.width * options.scale, 94 | color: options.color, 95 | alpha: options.alpha, 96 | cap: options.cap, 97 | join: options.join, 98 | alignment: options.alignment, 99 | }) 100 | 101 | } 102 | this.scale = options.scale 103 | } 104 | 105 | private static distance(x1: number, y1: number, x2: number, y2: number): number { 106 | return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)) 107 | } 108 | 109 | moveTo(x: number, y: number): this { 110 | this.lineLength = 0 111 | this.cursor.set(x, y) 112 | this.start = new PIXI.Point(x, y) 113 | this.graphics.moveTo(this.cursor.x, this.cursor.y) 114 | return this 115 | } 116 | 117 | lineTo(x: number, y: number, closePath?: boolean): this { 118 | if (typeof this.lineLength === undefined) { 119 | this.moveTo(0, 0) 120 | } 121 | const length = DashLine.distance(this.cursor.x, this.cursor.y, x, y) 122 | const angle = Math.atan2(y - this.cursor.y, x - this.cursor.x) 123 | const closed = closePath && x === this.start.x && y === this.start.y 124 | if (this.useTexture) { 125 | this.graphics.moveTo(this.cursor.x, this.cursor.y) 126 | this.adjustLineStyle(angle) 127 | if (closed && this.dash.length % 2 === 0) { 128 | const gap = Math.min(this.dash[this.dash.length - 1], length); 129 | this.graphics.lineTo(x - Math.cos(angle) * gap, y - Math.sin(angle) * gap) 130 | this.graphics.closePath(); 131 | } else { 132 | this.graphics.lineTo(x, y) 133 | } 134 | } else { 135 | const cos = Math.cos(angle) 136 | const sin = Math.sin(angle) 137 | let x0 = this.cursor.x 138 | let y0 = this.cursor.y 139 | 140 | // find the first part of the dash for this line 141 | const place = this.lineLength % (this.dashSize * this.scale) 142 | let dashIndex: number = 0, dashStart: number = 0 143 | let dashX = 0 144 | for (let i = 0; i < this.dash.length; i++) { 145 | const dashSize = this.dash[i] * this.scale 146 | if (place < dashX + dashSize) { 147 | dashIndex = i 148 | dashStart = place - dashX 149 | break 150 | } else { 151 | dashX += dashSize 152 | } 153 | } 154 | 155 | let remaining = length 156 | // let count = 0 157 | while (remaining > 0) { // && count++ < 1000) { 158 | const dashSize = this.dash[dashIndex] * this.scale - dashStart 159 | let dist = remaining > dashSize ? dashSize : remaining 160 | if (closed) { 161 | const remainingDistance = DashLine.distance(x0 + cos * dist, y0 + sin * dist, this.start.x, this.start.y) 162 | if (remainingDistance <= dist) { 163 | if (dashIndex % 2 === 0) { 164 | const lastDash = DashLine.distance(x0, y0, this.start.x, this.start.y) - this.dash[this.dash.length - 1] * this.scale 165 | x0 += cos * lastDash 166 | y0 += sin * lastDash 167 | this.graphics.lineTo(x0, y0) 168 | } 169 | break 170 | } 171 | } 172 | 173 | x0 += cos * dist 174 | y0 += sin * dist 175 | if (dashIndex % 2) { 176 | this.graphics.moveTo(x0, y0) 177 | } else { 178 | this.graphics.lineTo(x0, y0) 179 | } 180 | remaining -= dist 181 | 182 | dashIndex++ 183 | dashIndex = dashIndex === this.dash.length ? 0 : dashIndex 184 | dashStart = 0 185 | } 186 | // if (count >= 1000) console.log('failure', this.scale) 187 | } 188 | this.lineLength += length 189 | this.cursor.set(x, y) 190 | return this 191 | } 192 | 193 | closePath() { 194 | this.lineTo(this.start.x, this.start.y, true) 195 | } 196 | 197 | drawCircle(x: number, y: number, radius: number, points = 80, matrix?: PIXI.Matrix): this { 198 | const interval = Math.PI * 2 / points 199 | let angle = 0, first: PIXI.Point 200 | if (matrix) { 201 | first = new PIXI.Point(x + Math.cos(angle) * radius, y + Math.sin(angle) * radius) 202 | matrix.apply(first, first) 203 | this.moveTo(first[0], first[1]) 204 | } else { 205 | first = new PIXI.Point(x + Math.cos(angle) * radius, y + Math.sin(angle) * radius) 206 | this.moveTo(first.x, first.y) 207 | } 208 | angle += interval 209 | for (let i = 1; i < points + 1; i++) { 210 | const next = i === points ? first : [x + Math.cos(angle) * radius, y + Math.sin(angle) * radius] 211 | this.lineTo(next[0], next[1]) 212 | angle += interval 213 | } 214 | return this 215 | } 216 | 217 | drawEllipse(x: number, y: number, radiusX: number, radiusY: number, points = 80, matrix?: PIXI.Matrix): this { 218 | const interval = Math.PI * 2 / points 219 | let first: { x: number, y: number } 220 | const point = new PIXI.Point() 221 | let f = 0 222 | for (let i = 0; i < Math.PI * 2; i += interval) { 223 | let x0 = x - radiusX * Math.sin(i) 224 | let y0 = y - radiusY * Math.cos(i) 225 | if (matrix) { 226 | point.set(x0, y0) 227 | matrix.apply(point, point) 228 | x0 = point.x 229 | y0 = point.y 230 | } 231 | if (i === 0) { 232 | this.moveTo(x0, y0) 233 | first = { x: x0, y: y0 } 234 | } else { 235 | this.lineTo(x0, y0) 236 | } 237 | } 238 | this.lineTo(first.x, first.y, true) 239 | return this 240 | } 241 | 242 | drawPolygon(points: PIXI.Point[] | number[], matrix?: PIXI.Matrix): this { 243 | const p = new PIXI.Point() 244 | if (typeof points[0] === 'number') { 245 | if (matrix) { 246 | p.set(points[0] as number, points[1] as number) 247 | matrix.apply(p, p) 248 | this.moveTo(p.x, p.y) 249 | for (let i = 2; i < points.length; i += 2) { 250 | p.set(points[i] as number, points[i + 1] as number) 251 | matrix.apply(p, p) 252 | this.lineTo(p.x, p.y, i === points.length - 2) 253 | } 254 | } else { 255 | this.moveTo(points[0] as number, points[1] as number) 256 | for (let i = 2; i < points.length; i += 2) { 257 | this.lineTo(points[i] as number, points[i + 1] as number, i === points.length - 2) 258 | } 259 | } 260 | } else { 261 | if (matrix) { 262 | const point = points[0] as PIXI.Point 263 | p.copyFrom(point) 264 | matrix.apply(p, p) 265 | this.moveTo(p.x, p.y) 266 | for (let i = 1; i < points.length; i++) { 267 | const point = points[i] as PIXI.Point 268 | p.copyFrom(point) 269 | matrix.apply(p, p) 270 | this.lineTo(p.x, p.y, i === points.length - 1) 271 | } 272 | } else { 273 | const point = points[0] as PIXI.Point 274 | this.moveTo(point.x, point.y) 275 | for (let i = 1; i < points.length; i++) { 276 | const point = points[i] as PIXI.Point 277 | this.lineTo(point.x, point.y, i === points.length - 1) 278 | } 279 | } 280 | } 281 | return this 282 | } 283 | 284 | drawRect(x: number, y: number, width: number, height: number, matrix?: PIXI.Matrix): this { 285 | if (matrix) { 286 | const p = new PIXI.Point() 287 | 288 | // moveTo(x, y) 289 | p.set(x, y) 290 | matrix.apply(p, p) 291 | this.moveTo(p.x, p.y) 292 | 293 | // lineTo(x + width, y) 294 | p.set(x + width, y) 295 | matrix.apply(p, p) 296 | this.lineTo(p.x, p.y) 297 | 298 | // lineTo(x + width, y + height) 299 | p.set(x + width, y + height) 300 | matrix.apply(p, p) 301 | this.lineTo(p.x, p.y) 302 | 303 | // lineto(x, y + height) 304 | p.set(x, y + height) 305 | matrix.apply(p, p) 306 | this.lineTo(p.x, p.y) 307 | 308 | // lineTo(x, y, true) 309 | p.set(x, y) 310 | matrix.apply(p, p) 311 | this.lineTo(p.x, p.y, true) 312 | } else { 313 | this.moveTo(x, y) 314 | .lineTo(x + width, y) 315 | .lineTo(x + width, y + height) 316 | .lineTo(x, y + height) 317 | .lineTo(x, y, true) 318 | } 319 | return this 320 | } 321 | 322 | // adjust the matrix for the dashed texture 323 | private adjustLineStyle(angle: number) { 324 | const lineStyle = this.graphics.line 325 | lineStyle.matrix = new PIXI.Matrix() 326 | if (angle) { 327 | lineStyle.matrix.rotate(angle) 328 | } 329 | if (this.scale !== 1) lineStyle.matrix.scale(this.scale, this.scale) 330 | const textureStart = -this.lineLength 331 | lineStyle.matrix.translate(this.cursor.x + textureStart * Math.cos(angle), this.cursor.y + textureStart * Math.sin(angle)) 332 | this.graphics.lineStyle(lineStyle) 333 | } 334 | 335 | // creates or uses cached texture 336 | private static getTexture(options: DashLineOptions, dashSize: number): PIXI.Texture { 337 | const key = options.dash.toString() 338 | if (DashLine.dashTextureCache[key]) { 339 | return DashLine.dashTextureCache[key] 340 | } 341 | const canvas = document.createElement("canvas") 342 | canvas.width = dashSize 343 | canvas.height = Math.ceil(options.width) 344 | const context = canvas.getContext("2d") 345 | if (!context) { 346 | console.warn('Did not get context from canvas') 347 | return 348 | } 349 | context.strokeStyle = "white" 350 | context.globalAlpha = options.alpha 351 | context.lineWidth = options.width 352 | let x = 0 353 | const y = options.width / 2 354 | context.moveTo(x, y) 355 | for (let i = 0; i < options.dash.length; i += 2) { 356 | x += options.dash[i] 357 | context.lineTo(x, y) 358 | if (options.dash.length !== i + 1) { 359 | x += options.dash[i + 1] 360 | context.moveTo(x, y) 361 | } 362 | } 363 | context.stroke() 364 | const texture = DashLine.dashTextureCache[key] = PIXI.Texture.from(canvas) 365 | texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST 366 | return texture 367 | } 368 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixi-dashed-line", 3 | "version": "1.2.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "pixi-dashed-line", 9 | "version": "1.2.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "esbuild": "^0.12.15", 13 | "pixi-viewport": "^4.31.0", 14 | "pixi.js": "^6.2.2", 15 | "typescript": "^4.3.5" 16 | }, 17 | "peerDependencies": { 18 | "pixi.js": "^6.0.4" 19 | } 20 | }, 21 | "node_modules/@pixi/constants": { 22 | "version": "6.0.4", 23 | "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.0.4.tgz", 24 | "integrity": "sha512-khwRMfuHVdFk93L+bf0mmCwtSloYlfBfjdseIAbJL+VSpeMG1S2DzCYlMCPdp4mvDLU9LvkH2U2leZGEIx5j7g==", 25 | "dev": true, 26 | "peer": true 27 | }, 28 | "node_modules/@pixi/core": { 29 | "version": "6.0.4", 30 | "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.0.4.tgz", 31 | "integrity": "sha512-r1ceyAz0z3usUs0uj4u2986vVT2tQixGNin2o9FNhPFDXbN5EaoKHLtrjGBt1iylK/EUH/nfL5zq0SGa/loW0A==", 32 | "dev": true, 33 | "peer": true, 34 | "dependencies": { 35 | "@pixi/constants": "6.0.4", 36 | "@pixi/math": "6.0.4", 37 | "@pixi/runner": "6.0.4", 38 | "@pixi/settings": "6.0.4", 39 | "@pixi/ticker": "6.0.4", 40 | "@pixi/utils": "6.0.4" 41 | }, 42 | "funding": { 43 | "type": "opencollective", 44 | "url": "https://opencollective.com/pixijs" 45 | } 46 | }, 47 | "node_modules/@pixi/display": { 48 | "version": "6.0.4", 49 | "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.0.4.tgz", 50 | "integrity": "sha512-v6hjx5Gm5aIlLQ7xrsZ2lstI1cv/MtbWXJOhU8LXckkrHHUvAuJgml3+0pcHw8YLuOlepZngUuiqy/XjceVk8A==", 51 | "dev": true, 52 | "peer": true, 53 | "dependencies": { 54 | "@pixi/math": "6.0.4", 55 | "@pixi/settings": "6.0.4", 56 | "@pixi/utils": "6.0.4" 57 | } 58 | }, 59 | "node_modules/@pixi/interaction": { 60 | "version": "6.0.4", 61 | "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.0.4.tgz", 62 | "integrity": "sha512-4+FOKDpiF/+F9r3+y81xTBElcLqI3OpeeI9bkIw9pPHA41riXRQv+m0HWz76bGQK7zDAimAV9K2xff7Wa5nSeg==", 63 | "dev": true, 64 | "peer": true, 65 | "dependencies": { 66 | "@pixi/core": "6.0.4", 67 | "@pixi/display": "6.0.4", 68 | "@pixi/math": "6.0.4", 69 | "@pixi/ticker": "6.0.4", 70 | "@pixi/utils": "6.0.4" 71 | } 72 | }, 73 | "node_modules/@pixi/math": { 74 | "version": "6.0.4", 75 | "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.0.4.tgz", 76 | "integrity": "sha512-UwZ72CeZ2KsS4IlcEXgNiuD88omPk42Dct74+1G+R2+yPI+XRZq+hGQRTle/BbFYjxh9ccdQVyX9ToGv1XTd6Q==", 77 | "dev": true, 78 | "peer": true 79 | }, 80 | "node_modules/@pixi/polyfill": { 81 | "version": "6.2.2", 82 | "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.2.2.tgz", 83 | "integrity": "sha512-Fd5KnjrqG9Vwgl9sDfPvNeqW3/d+hG9Du7H3y5PmItBnu9wXldTtA+I5D0BLsL/wjjjCQLbPVFKwCJj511XfBw==", 84 | "dev": true, 85 | "dependencies": { 86 | "object-assign": "^4.1.1", 87 | "promise-polyfill": "^8.2.0" 88 | } 89 | }, 90 | "node_modules/@pixi/runner": { 91 | "version": "6.0.4", 92 | "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.0.4.tgz", 93 | "integrity": "sha512-ta6r36r2vC+fPB27URpSacPGQDtbJbdUoeGCJWAEwX+QI4vx4C9NYAcB0bIg8TLXiigCfA6by/RMnJ0dBiemFA==", 94 | "dev": true, 95 | "peer": true 96 | }, 97 | "node_modules/@pixi/settings": { 98 | "version": "6.0.4", 99 | "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.0.4.tgz", 100 | "integrity": "sha512-djiIsmULDwcHWNmEiZKm4zyVopu1NL+fClnbBmtDkGZw7nm37y6dOcdpYawJcxvE4/KLm6pspBiRTnrzdlqW7Q==", 101 | "dev": true, 102 | "peer": true, 103 | "dependencies": { 104 | "ismobilejs": "^1.1.0" 105 | } 106 | }, 107 | "node_modules/@pixi/ticker": { 108 | "version": "6.0.4", 109 | "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.0.4.tgz", 110 | "integrity": "sha512-PkFfPP5vHlgnApLks0Ia0okmFu6KPqBdIyquDqHJAcBdgljedm32KS6K2EH37xelBOzYHScjZ2SQGiiebVfClw==", 111 | "dev": true, 112 | "peer": true, 113 | "dependencies": { 114 | "@pixi/settings": "6.0.4" 115 | } 116 | }, 117 | "node_modules/@pixi/utils": { 118 | "version": "6.0.4", 119 | "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.0.4.tgz", 120 | "integrity": "sha512-35JTWsAJ8Va0vvtUSQvyOr3kGedGKVuJnHDO89B8C8tSFtMpJYrR44vp1b1p1vOjNak+ulGehZc8LzlCqymViQ==", 121 | "dev": true, 122 | "peer": true, 123 | "dependencies": { 124 | "@pixi/constants": "6.0.4", 125 | "@pixi/settings": "6.0.4", 126 | "@types/earcut": "^2.1.0", 127 | "earcut": "^2.2.2", 128 | "eventemitter3": "^3.1.0", 129 | "url": "^0.11.0" 130 | } 131 | }, 132 | "node_modules/@types/earcut": { 133 | "version": "2.1.1", 134 | "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.1.tgz", 135 | "integrity": "sha512-w8oigUCDjElRHRRrMvn/spybSMyX8MTkKA5Dv+tS1IE/TgmNZPqUYtvYBXGY8cieSE66gm+szeK+bnbxC2xHTQ==", 136 | "dev": true 137 | }, 138 | "node_modules/earcut": { 139 | "version": "2.2.3", 140 | "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.3.tgz", 141 | "integrity": "sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug==", 142 | "dev": true 143 | }, 144 | "node_modules/esbuild": { 145 | "version": "0.12.15", 146 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.15.tgz", 147 | "integrity": "sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==", 148 | "dev": true, 149 | "hasInstallScript": true, 150 | "bin": { 151 | "esbuild": "bin/esbuild" 152 | } 153 | }, 154 | "node_modules/eventemitter3": { 155 | "version": "3.1.2", 156 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", 157 | "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", 158 | "dev": true 159 | }, 160 | "node_modules/ismobilejs": { 161 | "version": "1.1.1", 162 | "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", 163 | "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==", 164 | "dev": true 165 | }, 166 | "node_modules/object-assign": { 167 | "version": "4.1.1", 168 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 169 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 170 | "dev": true, 171 | "engines": { 172 | "node": ">=0.10.0" 173 | } 174 | }, 175 | "node_modules/penner": { 176 | "version": "0.1.3", 177 | "resolved": "https://registry.npmjs.org/penner/-/penner-0.1.3.tgz", 178 | "integrity": "sha1-C4tILU6bOa8vPXw3WSIpuKzClwU=", 179 | "dev": true 180 | }, 181 | "node_modules/pixi-viewport": { 182 | "version": "4.31.0", 183 | "resolved": "https://registry.npmjs.org/pixi-viewport/-/pixi-viewport-4.31.0.tgz", 184 | "integrity": "sha512-VnI080My0dBN5b+JQEOdhSEr3zX4jD0CchMxhBfpj2BQoPIUppxTsi/R/kEdQ5ZnjGCn76/k0Q0xeW3WbEKb7g==", 185 | "dev": true, 186 | "dependencies": { 187 | "penner": "^0.1.3" 188 | }, 189 | "peerDependencies": { 190 | "@pixi/display": "^6.0.0", 191 | "@pixi/interaction": "^6.0.0", 192 | "@pixi/math": "^6.0.0", 193 | "@pixi/ticker": "^6.0.0" 194 | } 195 | }, 196 | "node_modules/pixi.js": { 197 | "version": "6.2.2", 198 | "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-6.2.2.tgz", 199 | "integrity": "sha512-/xCnJUsWTZuacR6JYTnRbUb+5grzlqpp2O1Ub7bCZCE3FApTCs7nMNYeLfdeP+np/MlGaM+SsPh2cXcafR3OZw==", 200 | "dev": true, 201 | "dependencies": { 202 | "@pixi/accessibility": "6.2.2", 203 | "@pixi/app": "6.2.2", 204 | "@pixi/compressed-textures": "6.2.2", 205 | "@pixi/constants": "6.2.2", 206 | "@pixi/core": "6.2.2", 207 | "@pixi/display": "6.2.2", 208 | "@pixi/extract": "6.2.2", 209 | "@pixi/filter-alpha": "6.2.2", 210 | "@pixi/filter-blur": "6.2.2", 211 | "@pixi/filter-color-matrix": "6.2.2", 212 | "@pixi/filter-displacement": "6.2.2", 213 | "@pixi/filter-fxaa": "6.2.2", 214 | "@pixi/filter-noise": "6.2.2", 215 | "@pixi/graphics": "6.2.2", 216 | "@pixi/interaction": "6.2.2", 217 | "@pixi/loaders": "6.2.2", 218 | "@pixi/math": "6.2.2", 219 | "@pixi/mesh": "6.2.2", 220 | "@pixi/mesh-extras": "6.2.2", 221 | "@pixi/mixin-cache-as-bitmap": "6.2.2", 222 | "@pixi/mixin-get-child-by-name": "6.2.2", 223 | "@pixi/mixin-get-global-position": "6.2.2", 224 | "@pixi/particle-container": "6.2.2", 225 | "@pixi/polyfill": "6.2.2", 226 | "@pixi/prepare": "6.2.2", 227 | "@pixi/runner": "6.2.2", 228 | "@pixi/settings": "6.2.2", 229 | "@pixi/sprite": "6.2.2", 230 | "@pixi/sprite-animated": "6.2.2", 231 | "@pixi/sprite-tiling": "6.2.2", 232 | "@pixi/spritesheet": "6.2.2", 233 | "@pixi/text": "6.2.2", 234 | "@pixi/text-bitmap": "6.2.2", 235 | "@pixi/ticker": "6.2.2", 236 | "@pixi/utils": "6.2.2" 237 | }, 238 | "funding": { 239 | "type": "opencollective", 240 | "url": "https://opencollective.com/pixijs" 241 | } 242 | }, 243 | "node_modules/pixi.js/node_modules/@pixi/accessibility": { 244 | "version": "6.2.2", 245 | "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-6.2.2.tgz", 246 | "integrity": "sha512-/mXRXCw67bmPY/OZ1Y1p747h3SSg7eqacIChAUJohjbcJK0R2EJRD2uVTspVIUpHPJA0ECNGBpKqk0C1Yzkj2w==", 247 | "dev": true, 248 | "peerDependencies": { 249 | "@pixi/core": "6.2.2", 250 | "@pixi/display": "6.2.2", 251 | "@pixi/utils": "6.2.2" 252 | } 253 | }, 254 | "node_modules/pixi.js/node_modules/@pixi/app": { 255 | "version": "6.2.2", 256 | "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.2.2.tgz", 257 | "integrity": "sha512-YBzVaSZGA842w2gsgqzxYwQMXeu2JZmSyiybi4raFsA35iOeMurXy7sEs5NP9JO+cjobJyx6echuHzZpKUjWsQ==", 258 | "dev": true, 259 | "peerDependencies": { 260 | "@pixi/core": "6.2.2", 261 | "@pixi/display": "6.2.2" 262 | } 263 | }, 264 | "node_modules/pixi.js/node_modules/@pixi/compressed-textures": { 265 | "version": "6.2.2", 266 | "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.2.2.tgz", 267 | "integrity": "sha512-ZjiqYCE6nGtsKTRa6w4W6Krh3vo4M3WT6lrP+VW6BfgUx3quEURt5GVFsFZrJpWF4yI1fShFmjBUOerrTLJGRQ==", 268 | "dev": true, 269 | "peerDependencies": { 270 | "@pixi/constants": "6.2.2", 271 | "@pixi/core": "6.2.2", 272 | "@pixi/loaders": "6.2.2", 273 | "@pixi/utils": "6.2.2" 274 | } 275 | }, 276 | "node_modules/pixi.js/node_modules/@pixi/constants": { 277 | "version": "6.2.2", 278 | "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.2.2.tgz", 279 | "integrity": "sha512-BKSoj/5SI+pQEatuCG5kXXWtCZmZZNMhfhXeqvYO/WNZ+LDxm6F4pllf0t7KjGs1ZBpNxVf6fyngF9Q5r3MgJQ==", 280 | "dev": true 281 | }, 282 | "node_modules/pixi.js/node_modules/@pixi/core": { 283 | "version": "6.2.2", 284 | "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.2.2.tgz", 285 | "integrity": "sha512-XAqgdJ1w9k1ZUBXECm19rcnN2ngm+tOP74HkGw4qQay0biM3JS+wtX4fWQmZNGr8krf6lJrNbsghbtUy70uUaw==", 286 | "dev": true, 287 | "funding": { 288 | "type": "opencollective", 289 | "url": "https://opencollective.com/pixijs" 290 | }, 291 | "peerDependencies": { 292 | "@pixi/constants": "6.2.2", 293 | "@pixi/math": "6.2.2", 294 | "@pixi/runner": "6.2.2", 295 | "@pixi/settings": "6.2.2", 296 | "@pixi/ticker": "6.2.2", 297 | "@pixi/utils": "6.2.2" 298 | } 299 | }, 300 | "node_modules/pixi.js/node_modules/@pixi/display": { 301 | "version": "6.2.2", 302 | "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.2.2.tgz", 303 | "integrity": "sha512-8a0R+9rjlUUjb13nBA6ZNj9gygJqt38B63uIZ2inkhxpIQf0CLo2hNxkqCqXiMeRuGmOw1n6neEDMnHO1Ks+xA==", 304 | "dev": true, 305 | "peerDependencies": { 306 | "@pixi/math": "6.2.2", 307 | "@pixi/settings": "6.2.2", 308 | "@pixi/utils": "6.2.2" 309 | } 310 | }, 311 | "node_modules/pixi.js/node_modules/@pixi/extract": { 312 | "version": "6.2.2", 313 | "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.2.2.tgz", 314 | "integrity": "sha512-w3gW1/VoHNqFEUNGRQBKm8dCdg816etbpbLExWctmPpNdyxos5N7DF44UMRFg40GPVBBNzYissrH/ojca4PFIA==", 315 | "dev": true, 316 | "peerDependencies": { 317 | "@pixi/core": "6.2.2", 318 | "@pixi/math": "6.2.2", 319 | "@pixi/utils": "6.2.2" 320 | } 321 | }, 322 | "node_modules/pixi.js/node_modules/@pixi/filter-alpha": { 323 | "version": "6.2.2", 324 | "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.2.2.tgz", 325 | "integrity": "sha512-CijLcgFdmivmSyZuM5Yyeo6R+PwalZp9OSoard1Oh5DBVvcRDn4m3cBM+nimR4YJbr0kiMbK4Ja8r+e2vwFVjA==", 326 | "dev": true, 327 | "peerDependencies": { 328 | "@pixi/core": "6.2.2" 329 | } 330 | }, 331 | "node_modules/pixi.js/node_modules/@pixi/filter-blur": { 332 | "version": "6.2.2", 333 | "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-6.2.2.tgz", 334 | "integrity": "sha512-ApFqn2fMIipr3mRp/8dZ74qraGGzzPO/EzvltDqJLru9vGlbX6dKLXZ6w5H8D/uN6aQW1e4N1Nrtzk5mvJVQ3g==", 335 | "dev": true, 336 | "peerDependencies": { 337 | "@pixi/core": "6.2.2", 338 | "@pixi/settings": "6.2.2" 339 | } 340 | }, 341 | "node_modules/pixi.js/node_modules/@pixi/filter-color-matrix": { 342 | "version": "6.2.2", 343 | "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.2.2.tgz", 344 | "integrity": "sha512-fQWbtKFWV29jKkq4d6TknEfQ5sF5OxcbJeZo0HJmgoV3FLZ0t21XE991CFI/TqDBo8U3wzUPZVbXxiFoDKmJ8w==", 345 | "dev": true, 346 | "peerDependencies": { 347 | "@pixi/core": "6.2.2" 348 | } 349 | }, 350 | "node_modules/pixi.js/node_modules/@pixi/filter-displacement": { 351 | "version": "6.2.2", 352 | "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-6.2.2.tgz", 353 | "integrity": "sha512-cd9um4kNNIeqKA/wVZw+iha+XVbBOYBC8En5hk3ZXAIXxCHxOCz3KS+aOVejXH5EB/gMDPvNNwygn0SCpSGdKA==", 354 | "dev": true, 355 | "peerDependencies": { 356 | "@pixi/core": "6.2.2", 357 | "@pixi/math": "6.2.2" 358 | } 359 | }, 360 | "node_modules/pixi.js/node_modules/@pixi/filter-fxaa": { 361 | "version": "6.2.2", 362 | "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-6.2.2.tgz", 363 | "integrity": "sha512-e4qekMlsiEcjV0JRoqH3b34sk8yzT4jsROYPHzk0IiafE+nNNcF3vQmcmnfC0aGIyODzmNdzFLjlFkRRSviydA==", 364 | "dev": true, 365 | "peerDependencies": { 366 | "@pixi/core": "6.2.2" 367 | } 368 | }, 369 | "node_modules/pixi.js/node_modules/@pixi/filter-noise": { 370 | "version": "6.2.2", 371 | "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-6.2.2.tgz", 372 | "integrity": "sha512-Jp4L6winS6ZGKpp76x3JyfEWnUMY44fQ90Ts3R3vKkZZFNDd3T4uisZ7YwvDKOhmSo5hY3lQkXaCg/YO5feXbw==", 373 | "dev": true, 374 | "peerDependencies": { 375 | "@pixi/core": "6.2.2" 376 | } 377 | }, 378 | "node_modules/pixi.js/node_modules/@pixi/graphics": { 379 | "version": "6.2.2", 380 | "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.2.2.tgz", 381 | "integrity": "sha512-mQyd6ef6/EF5nt7M1OObBEb9FCXxIP6AT30H01Z2wnnCgu4qj8MHrJxTkQxSHynQ+eVVPswzpVizUQZHlIYZNw==", 382 | "dev": true, 383 | "peerDependencies": { 384 | "@pixi/constants": "6.2.2", 385 | "@pixi/core": "6.2.2", 386 | "@pixi/display": "6.2.2", 387 | "@pixi/math": "6.2.2", 388 | "@pixi/sprite": "6.2.2", 389 | "@pixi/utils": "6.2.2" 390 | } 391 | }, 392 | "node_modules/pixi.js/node_modules/@pixi/interaction": { 393 | "version": "6.2.2", 394 | "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.2.2.tgz", 395 | "integrity": "sha512-gpNLCPc+j+RZSZqbKbzVRf4fSlOlYm0xqUVn6JtNH1kc+d9AV7Nmw9but4osP/eodDWsWPQ+7sPKClHY36bKRA==", 396 | "dev": true, 397 | "peerDependencies": { 398 | "@pixi/core": "6.2.2", 399 | "@pixi/display": "6.2.2", 400 | "@pixi/math": "6.2.2", 401 | "@pixi/ticker": "6.2.2", 402 | "@pixi/utils": "6.2.2" 403 | } 404 | }, 405 | "node_modules/pixi.js/node_modules/@pixi/loaders": { 406 | "version": "6.2.2", 407 | "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.2.2.tgz", 408 | "integrity": "sha512-jwFM59GeMQpzuniw5PlC7kCoXZEaKrw31/ecR1sXKWDtHRyMtvXTuf+R+tSol/1ISQ55c0JBTuUbLPwp7hPvFQ==", 409 | "dev": true, 410 | "peerDependencies": { 411 | "@pixi/constants": "6.2.2", 412 | "@pixi/core": "6.2.2", 413 | "@pixi/utils": "6.2.2" 414 | } 415 | }, 416 | "node_modules/pixi.js/node_modules/@pixi/math": { 417 | "version": "6.2.2", 418 | "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.2.2.tgz", 419 | "integrity": "sha512-TtsaooRRMc/WAZ4LKUDhP/d14BZElLjRNa2gopwTKUtrDa1KvzAMr8WJ8P+gaXl4DJ8B/MlgESdPhRUqVSUw0A==", 420 | "dev": true 421 | }, 422 | "node_modules/pixi.js/node_modules/@pixi/mesh": { 423 | "version": "6.2.2", 424 | "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-6.2.2.tgz", 425 | "integrity": "sha512-CsKFgTu2MP756sHeoCr9s4tHy2VmnDZPnvZ0ThV8QMnb5w3Z2qRDKlXSSIdNaQOxoAPKkqxIu0JbLK8kyX0oqw==", 426 | "dev": true, 427 | "peerDependencies": { 428 | "@pixi/constants": "6.2.2", 429 | "@pixi/core": "6.2.2", 430 | "@pixi/display": "6.2.2", 431 | "@pixi/math": "6.2.2", 432 | "@pixi/settings": "6.2.2", 433 | "@pixi/utils": "6.2.2" 434 | } 435 | }, 436 | "node_modules/pixi.js/node_modules/@pixi/mesh-extras": { 437 | "version": "6.2.2", 438 | "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-6.2.2.tgz", 439 | "integrity": "sha512-HFYWhWcV6gY7VYnMhz9OSEN14PPfVqLzWnglbegGEMqCbY/ZGsD8X99x/HLGQGd6L4FFto382q0Fj1xu+y/brg==", 440 | "dev": true, 441 | "peerDependencies": { 442 | "@pixi/constants": "6.2.2", 443 | "@pixi/core": "6.2.2", 444 | "@pixi/math": "6.2.2", 445 | "@pixi/mesh": "6.2.2", 446 | "@pixi/utils": "6.2.2" 447 | } 448 | }, 449 | "node_modules/pixi.js/node_modules/@pixi/mixin-cache-as-bitmap": { 450 | "version": "6.2.2", 451 | "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.2.2.tgz", 452 | "integrity": "sha512-t3jZKGa/qoRMetMWmGkXz8Kp1Uzmb+2y4/adqu+RdIeG3D1oItuGux+R36ZQO6dVRv3R8s2/Dex0aACek171zw==", 453 | "dev": true, 454 | "peerDependencies": { 455 | "@pixi/core": "6.2.2", 456 | "@pixi/display": "6.2.2", 457 | "@pixi/math": "6.2.2", 458 | "@pixi/settings": "6.2.2", 459 | "@pixi/sprite": "6.2.2", 460 | "@pixi/utils": "6.2.2" 461 | } 462 | }, 463 | "node_modules/pixi.js/node_modules/@pixi/mixin-get-child-by-name": { 464 | "version": "6.2.2", 465 | "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.2.2.tgz", 466 | "integrity": "sha512-BBrniLAkzDex4HyvVdE/DjphzQu4pZ8Nc5aDRIbiS1s283/IXr2oTcoaW23kCjhX0xgu++XcJQQMMyv3mlblZQ==", 467 | "dev": true, 468 | "peerDependencies": { 469 | "@pixi/display": "6.2.2" 470 | } 471 | }, 472 | "node_modules/pixi.js/node_modules/@pixi/mixin-get-global-position": { 473 | "version": "6.2.2", 474 | "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.2.2.tgz", 475 | "integrity": "sha512-Rz7DHn6koYFEeVG36rKiMwoTD+elJKqwQ24HHw0BAKz1VwGagBi0ZTcJ+nWplBOrw6ZPKfdOBwGQLXD7ODg8lQ==", 476 | "dev": true, 477 | "peerDependencies": { 478 | "@pixi/display": "6.2.2", 479 | "@pixi/math": "6.2.2" 480 | } 481 | }, 482 | "node_modules/pixi.js/node_modules/@pixi/particle-container": { 483 | "version": "6.2.2", 484 | "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-6.2.2.tgz", 485 | "integrity": "sha512-DYbSCcUiVLeM4sKZkzAp3F6dz3idyP1jecxbFqNmRjWRyMv7uXIO42rxGJMrd6BzA5j7DkywI3X0SqhhSZP7Ag==", 486 | "dev": true, 487 | "peerDependencies": { 488 | "@pixi/constants": "6.2.2", 489 | "@pixi/core": "6.2.2", 490 | "@pixi/display": "6.2.2", 491 | "@pixi/math": "6.2.2", 492 | "@pixi/utils": "6.2.2" 493 | } 494 | }, 495 | "node_modules/pixi.js/node_modules/@pixi/prepare": { 496 | "version": "6.2.2", 497 | "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-6.2.2.tgz", 498 | "integrity": "sha512-kJojn/6zEcao+XQyU+zWkBmQr0Tgeju3F9JYBpPQ8MKIUJYvDQDtRxYo9A6Xzxk8FJ373s2Ext/OelX2FcR3HQ==", 499 | "dev": true, 500 | "peerDependencies": { 501 | "@pixi/core": "6.2.2", 502 | "@pixi/display": "6.2.2", 503 | "@pixi/graphics": "6.2.2", 504 | "@pixi/settings": "6.2.2", 505 | "@pixi/text": "6.2.2", 506 | "@pixi/ticker": "6.2.2" 507 | } 508 | }, 509 | "node_modules/pixi.js/node_modules/@pixi/runner": { 510 | "version": "6.2.2", 511 | "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.2.2.tgz", 512 | "integrity": "sha512-q7bc6Eu2XplGzCQBOhbv32P0z48ixW/Su6epT9IOfDi2iTiPjB5Sxp9e+DZDFIzvkfLzgr67Ddy51YMvOp5sQg==", 513 | "dev": true 514 | }, 515 | "node_modules/pixi.js/node_modules/@pixi/settings": { 516 | "version": "6.2.2", 517 | "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.2.2.tgz", 518 | "integrity": "sha512-eQv0ykSwnJUd/LF4MuaFoL+eBNG+EUPAVfsnlsez/Y09aqwIzJyAjRx+uGp9adQ3XHXwYt2l2wINn+foF1y/8A==", 519 | "dev": true, 520 | "dependencies": { 521 | "ismobilejs": "^1.1.0" 522 | } 523 | }, 524 | "node_modules/pixi.js/node_modules/@pixi/sprite": { 525 | "version": "6.2.2", 526 | "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.2.2.tgz", 527 | "integrity": "sha512-Imr+sJWFh5GtarW3FBBUzedSexfijg7OL0A6qwMDHA011gjyVeRZ15uXP8fgIwUoHoMLsU6xk85jcucM9RfWuw==", 528 | "dev": true, 529 | "peerDependencies": { 530 | "@pixi/constants": "6.2.2", 531 | "@pixi/core": "6.2.2", 532 | "@pixi/display": "6.2.2", 533 | "@pixi/math": "6.2.2", 534 | "@pixi/settings": "6.2.2", 535 | "@pixi/utils": "6.2.2" 536 | } 537 | }, 538 | "node_modules/pixi.js/node_modules/@pixi/sprite-animated": { 539 | "version": "6.2.2", 540 | "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-6.2.2.tgz", 541 | "integrity": "sha512-MNkVIuC06aXn8bgfWyqQE8vmclCVLgmHB//hssr/1IFCVmnEEYZLyeWErkIA87grY3iV7tGOILEYSa3pod4XEg==", 542 | "dev": true, 543 | "peerDependencies": { 544 | "@pixi/core": "6.2.2", 545 | "@pixi/sprite": "6.2.2", 546 | "@pixi/ticker": "6.2.2" 547 | } 548 | }, 549 | "node_modules/pixi.js/node_modules/@pixi/sprite-tiling": { 550 | "version": "6.2.2", 551 | "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.2.2.tgz", 552 | "integrity": "sha512-HQ9RVObmwyPq+PM2wm2UEIMdsvWg96ymSz0NOh9bOfMSme18vSWv0Rbidv/FziQT8x6MpoLpYke0DYMGtbu0tA==", 553 | "dev": true, 554 | "peerDependencies": { 555 | "@pixi/constants": "6.2.2", 556 | "@pixi/core": "6.2.2", 557 | "@pixi/display": "6.2.2", 558 | "@pixi/math": "6.2.2", 559 | "@pixi/sprite": "6.2.2", 560 | "@pixi/utils": "6.2.2" 561 | } 562 | }, 563 | "node_modules/pixi.js/node_modules/@pixi/spritesheet": { 564 | "version": "6.2.2", 565 | "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.2.2.tgz", 566 | "integrity": "sha512-TZodC/pf+CW/8kZN+RPzObXWSPgYv1pp+foUnOHb7w8AyFnMljeqBPiUfLQaMzw91TI9AHLihoeeofqZ4wMpww==", 567 | "dev": true, 568 | "peerDependencies": { 569 | "@pixi/core": "6.2.2", 570 | "@pixi/loaders": "6.2.2", 571 | "@pixi/math": "6.2.2", 572 | "@pixi/utils": "6.2.2" 573 | } 574 | }, 575 | "node_modules/pixi.js/node_modules/@pixi/text": { 576 | "version": "6.2.2", 577 | "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.2.2.tgz", 578 | "integrity": "sha512-Hi6MO/QhllZ4IWkr7MBzImzHB88XXKlF5E9xt1vUBhdZb3KsQD+cPx+bNCFWn6ZMWDmOloJekzRkkSl3KrfBSw==", 579 | "dev": true, 580 | "peerDependencies": { 581 | "@pixi/core": "6.2.2", 582 | "@pixi/math": "6.2.2", 583 | "@pixi/settings": "6.2.2", 584 | "@pixi/sprite": "6.2.2", 585 | "@pixi/utils": "6.2.2" 586 | } 587 | }, 588 | "node_modules/pixi.js/node_modules/@pixi/text-bitmap": { 589 | "version": "6.2.2", 590 | "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-6.2.2.tgz", 591 | "integrity": "sha512-pJZM0o68n6cUFUdolvpuuloMccdQqvTc3CLzhLu9xW9HLx7NeFjZEQWTGQea8GXsGa1RhvlMd9x3AiVSNMI2FA==", 592 | "dev": true, 593 | "peerDependencies": { 594 | "@pixi/constants": "6.2.2", 595 | "@pixi/core": "6.2.2", 596 | "@pixi/display": "6.2.2", 597 | "@pixi/loaders": "6.2.2", 598 | "@pixi/math": "6.2.2", 599 | "@pixi/mesh": "6.2.2", 600 | "@pixi/settings": "6.2.2", 601 | "@pixi/text": "6.2.2", 602 | "@pixi/utils": "6.2.2" 603 | } 604 | }, 605 | "node_modules/pixi.js/node_modules/@pixi/ticker": { 606 | "version": "6.2.2", 607 | "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.2.2.tgz", 608 | "integrity": "sha512-tF3cRtcYnj3U3HFQ0IJKvAxFU1YUM96T0p8Qh478xZhvGxYGnjrQDPmjXePb4NocAdG5adb6//2uvQOd7o4rHg==", 609 | "dev": true, 610 | "peerDependencies": { 611 | "@pixi/settings": "6.2.2" 612 | } 613 | }, 614 | "node_modules/pixi.js/node_modules/@pixi/utils": { 615 | "version": "6.2.2", 616 | "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.2.2.tgz", 617 | "integrity": "sha512-rpS6QolFuRmm/QcKm5PYHOCkX6okl9a00u2osaMbmPP+l7XLATTxSsFhw64UbSNR+zmzsrhreRFBVFn3tf8K6w==", 618 | "dev": true, 619 | "dependencies": { 620 | "@types/earcut": "^2.1.0", 621 | "earcut": "^2.2.2", 622 | "eventemitter3": "^3.1.0", 623 | "url": "^0.11.0" 624 | }, 625 | "peerDependencies": { 626 | "@pixi/constants": "6.2.2", 627 | "@pixi/settings": "6.2.2" 628 | } 629 | }, 630 | "node_modules/promise-polyfill": { 631 | "version": "8.2.1", 632 | "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.2.1.tgz", 633 | "integrity": "sha512-3p9zj0cEHbp7NVUxEYUWjQlffXqnXaZIMPkAO7HhFh8u5636xLRDHOUo2vpWSK0T2mqm6fKLXYn1KP6PAZ2gKg==", 634 | "dev": true 635 | }, 636 | "node_modules/punycode": { 637 | "version": "1.3.2", 638 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", 639 | "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", 640 | "dev": true 641 | }, 642 | "node_modules/querystring": { 643 | "version": "0.2.0", 644 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", 645 | "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", 646 | "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", 647 | "dev": true, 648 | "engines": { 649 | "node": ">=0.4.x" 650 | } 651 | }, 652 | "node_modules/typescript": { 653 | "version": "4.3.5", 654 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", 655 | "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", 656 | "dev": true, 657 | "bin": { 658 | "tsc": "bin/tsc", 659 | "tsserver": "bin/tsserver" 660 | }, 661 | "engines": { 662 | "node": ">=4.2.0" 663 | } 664 | }, 665 | "node_modules/url": { 666 | "version": "0.11.0", 667 | "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", 668 | "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", 669 | "dev": true, 670 | "dependencies": { 671 | "punycode": "1.3.2", 672 | "querystring": "0.2.0" 673 | } 674 | } 675 | }, 676 | "dependencies": { 677 | "@pixi/constants": { 678 | "version": "6.0.4", 679 | "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.0.4.tgz", 680 | "integrity": "sha512-khwRMfuHVdFk93L+bf0mmCwtSloYlfBfjdseIAbJL+VSpeMG1S2DzCYlMCPdp4mvDLU9LvkH2U2leZGEIx5j7g==", 681 | "dev": true, 682 | "peer": true 683 | }, 684 | "@pixi/core": { 685 | "version": "6.0.4", 686 | "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.0.4.tgz", 687 | "integrity": "sha512-r1ceyAz0z3usUs0uj4u2986vVT2tQixGNin2o9FNhPFDXbN5EaoKHLtrjGBt1iylK/EUH/nfL5zq0SGa/loW0A==", 688 | "dev": true, 689 | "peer": true, 690 | "requires": { 691 | "@pixi/constants": "6.0.4", 692 | "@pixi/math": "6.0.4", 693 | "@pixi/runner": "6.0.4", 694 | "@pixi/settings": "6.0.4", 695 | "@pixi/ticker": "6.0.4", 696 | "@pixi/utils": "6.0.4" 697 | } 698 | }, 699 | "@pixi/display": { 700 | "version": "6.0.4", 701 | "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.0.4.tgz", 702 | "integrity": "sha512-v6hjx5Gm5aIlLQ7xrsZ2lstI1cv/MtbWXJOhU8LXckkrHHUvAuJgml3+0pcHw8YLuOlepZngUuiqy/XjceVk8A==", 703 | "dev": true, 704 | "peer": true, 705 | "requires": { 706 | "@pixi/math": "6.0.4", 707 | "@pixi/settings": "6.0.4", 708 | "@pixi/utils": "6.0.4" 709 | } 710 | }, 711 | "@pixi/interaction": { 712 | "version": "6.0.4", 713 | "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.0.4.tgz", 714 | "integrity": "sha512-4+FOKDpiF/+F9r3+y81xTBElcLqI3OpeeI9bkIw9pPHA41riXRQv+m0HWz76bGQK7zDAimAV9K2xff7Wa5nSeg==", 715 | "dev": true, 716 | "peer": true, 717 | "requires": { 718 | "@pixi/core": "6.0.4", 719 | "@pixi/display": "6.0.4", 720 | "@pixi/math": "6.0.4", 721 | "@pixi/ticker": "6.0.4", 722 | "@pixi/utils": "6.0.4" 723 | } 724 | }, 725 | "@pixi/math": { 726 | "version": "6.0.4", 727 | "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.0.4.tgz", 728 | "integrity": "sha512-UwZ72CeZ2KsS4IlcEXgNiuD88omPk42Dct74+1G+R2+yPI+XRZq+hGQRTle/BbFYjxh9ccdQVyX9ToGv1XTd6Q==", 729 | "dev": true, 730 | "peer": true 731 | }, 732 | "@pixi/polyfill": { 733 | "version": "6.2.2", 734 | "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.2.2.tgz", 735 | "integrity": "sha512-Fd5KnjrqG9Vwgl9sDfPvNeqW3/d+hG9Du7H3y5PmItBnu9wXldTtA+I5D0BLsL/wjjjCQLbPVFKwCJj511XfBw==", 736 | "dev": true, 737 | "requires": { 738 | "object-assign": "^4.1.1", 739 | "promise-polyfill": "^8.2.0" 740 | } 741 | }, 742 | "@pixi/runner": { 743 | "version": "6.0.4", 744 | "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.0.4.tgz", 745 | "integrity": "sha512-ta6r36r2vC+fPB27URpSacPGQDtbJbdUoeGCJWAEwX+QI4vx4C9NYAcB0bIg8TLXiigCfA6by/RMnJ0dBiemFA==", 746 | "dev": true, 747 | "peer": true 748 | }, 749 | "@pixi/settings": { 750 | "version": "6.0.4", 751 | "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.0.4.tgz", 752 | "integrity": "sha512-djiIsmULDwcHWNmEiZKm4zyVopu1NL+fClnbBmtDkGZw7nm37y6dOcdpYawJcxvE4/KLm6pspBiRTnrzdlqW7Q==", 753 | "dev": true, 754 | "peer": true, 755 | "requires": { 756 | "ismobilejs": "^1.1.0" 757 | } 758 | }, 759 | "@pixi/ticker": { 760 | "version": "6.0.4", 761 | "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.0.4.tgz", 762 | "integrity": "sha512-PkFfPP5vHlgnApLks0Ia0okmFu6KPqBdIyquDqHJAcBdgljedm32KS6K2EH37xelBOzYHScjZ2SQGiiebVfClw==", 763 | "dev": true, 764 | "peer": true, 765 | "requires": { 766 | "@pixi/settings": "6.0.4" 767 | } 768 | }, 769 | "@pixi/utils": { 770 | "version": "6.0.4", 771 | "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.0.4.tgz", 772 | "integrity": "sha512-35JTWsAJ8Va0vvtUSQvyOr3kGedGKVuJnHDO89B8C8tSFtMpJYrR44vp1b1p1vOjNak+ulGehZc8LzlCqymViQ==", 773 | "dev": true, 774 | "peer": true, 775 | "requires": { 776 | "@pixi/constants": "6.0.4", 777 | "@pixi/settings": "6.0.4", 778 | "@types/earcut": "^2.1.0", 779 | "earcut": "^2.2.2", 780 | "eventemitter3": "^3.1.0", 781 | "url": "^0.11.0" 782 | } 783 | }, 784 | "@types/earcut": { 785 | "version": "2.1.1", 786 | "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.1.tgz", 787 | "integrity": "sha512-w8oigUCDjElRHRRrMvn/spybSMyX8MTkKA5Dv+tS1IE/TgmNZPqUYtvYBXGY8cieSE66gm+szeK+bnbxC2xHTQ==", 788 | "dev": true 789 | }, 790 | "earcut": { 791 | "version": "2.2.3", 792 | "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.3.tgz", 793 | "integrity": "sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug==", 794 | "dev": true 795 | }, 796 | "esbuild": { 797 | "version": "0.12.15", 798 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.15.tgz", 799 | "integrity": "sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==", 800 | "dev": true 801 | }, 802 | "eventemitter3": { 803 | "version": "3.1.2", 804 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", 805 | "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", 806 | "dev": true 807 | }, 808 | "ismobilejs": { 809 | "version": "1.1.1", 810 | "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", 811 | "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==", 812 | "dev": true 813 | }, 814 | "object-assign": { 815 | "version": "4.1.1", 816 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 817 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 818 | "dev": true 819 | }, 820 | "penner": { 821 | "version": "0.1.3", 822 | "resolved": "https://registry.npmjs.org/penner/-/penner-0.1.3.tgz", 823 | "integrity": "sha1-C4tILU6bOa8vPXw3WSIpuKzClwU=", 824 | "dev": true 825 | }, 826 | "pixi-viewport": { 827 | "version": "4.31.0", 828 | "resolved": "https://registry.npmjs.org/pixi-viewport/-/pixi-viewport-4.31.0.tgz", 829 | "integrity": "sha512-VnI080My0dBN5b+JQEOdhSEr3zX4jD0CchMxhBfpj2BQoPIUppxTsi/R/kEdQ5ZnjGCn76/k0Q0xeW3WbEKb7g==", 830 | "dev": true, 831 | "requires": { 832 | "penner": "^0.1.3" 833 | } 834 | }, 835 | "pixi.js": { 836 | "version": "6.2.2", 837 | "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-6.2.2.tgz", 838 | "integrity": "sha512-/xCnJUsWTZuacR6JYTnRbUb+5grzlqpp2O1Ub7bCZCE3FApTCs7nMNYeLfdeP+np/MlGaM+SsPh2cXcafR3OZw==", 839 | "dev": true, 840 | "requires": { 841 | "@pixi/accessibility": "6.2.2", 842 | "@pixi/app": "6.2.2", 843 | "@pixi/compressed-textures": "6.2.2", 844 | "@pixi/constants": "6.2.2", 845 | "@pixi/core": "6.2.2", 846 | "@pixi/display": "6.2.2", 847 | "@pixi/extract": "6.2.2", 848 | "@pixi/filter-alpha": "6.2.2", 849 | "@pixi/filter-blur": "6.2.2", 850 | "@pixi/filter-color-matrix": "6.2.2", 851 | "@pixi/filter-displacement": "6.2.2", 852 | "@pixi/filter-fxaa": "6.2.2", 853 | "@pixi/filter-noise": "6.2.2", 854 | "@pixi/graphics": "6.2.2", 855 | "@pixi/interaction": "6.2.2", 856 | "@pixi/loaders": "6.2.2", 857 | "@pixi/math": "6.2.2", 858 | "@pixi/mesh": "6.2.2", 859 | "@pixi/mesh-extras": "6.2.2", 860 | "@pixi/mixin-cache-as-bitmap": "6.2.2", 861 | "@pixi/mixin-get-child-by-name": "6.2.2", 862 | "@pixi/mixin-get-global-position": "6.2.2", 863 | "@pixi/particle-container": "6.2.2", 864 | "@pixi/polyfill": "6.2.2", 865 | "@pixi/prepare": "6.2.2", 866 | "@pixi/runner": "6.2.2", 867 | "@pixi/settings": "6.2.2", 868 | "@pixi/sprite": "6.2.2", 869 | "@pixi/sprite-animated": "6.2.2", 870 | "@pixi/sprite-tiling": "6.2.2", 871 | "@pixi/spritesheet": "6.2.2", 872 | "@pixi/text": "6.2.2", 873 | "@pixi/text-bitmap": "6.2.2", 874 | "@pixi/ticker": "6.2.2", 875 | "@pixi/utils": "6.2.2" 876 | }, 877 | "dependencies": { 878 | "@pixi/accessibility": { 879 | "version": "6.2.2", 880 | "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-6.2.2.tgz", 881 | "integrity": "sha512-/mXRXCw67bmPY/OZ1Y1p747h3SSg7eqacIChAUJohjbcJK0R2EJRD2uVTspVIUpHPJA0ECNGBpKqk0C1Yzkj2w==", 882 | "dev": true, 883 | "requires": {} 884 | }, 885 | "@pixi/app": { 886 | "version": "6.2.2", 887 | "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.2.2.tgz", 888 | "integrity": "sha512-YBzVaSZGA842w2gsgqzxYwQMXeu2JZmSyiybi4raFsA35iOeMurXy7sEs5NP9JO+cjobJyx6echuHzZpKUjWsQ==", 889 | "dev": true, 890 | "requires": {} 891 | }, 892 | "@pixi/compressed-textures": { 893 | "version": "6.2.2", 894 | "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.2.2.tgz", 895 | "integrity": "sha512-ZjiqYCE6nGtsKTRa6w4W6Krh3vo4M3WT6lrP+VW6BfgUx3quEURt5GVFsFZrJpWF4yI1fShFmjBUOerrTLJGRQ==", 896 | "dev": true, 897 | "requires": {} 898 | }, 899 | "@pixi/constants": { 900 | "version": "6.2.2", 901 | "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.2.2.tgz", 902 | "integrity": "sha512-BKSoj/5SI+pQEatuCG5kXXWtCZmZZNMhfhXeqvYO/WNZ+LDxm6F4pllf0t7KjGs1ZBpNxVf6fyngF9Q5r3MgJQ==", 903 | "dev": true 904 | }, 905 | "@pixi/core": { 906 | "version": "6.2.2", 907 | "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.2.2.tgz", 908 | "integrity": "sha512-XAqgdJ1w9k1ZUBXECm19rcnN2ngm+tOP74HkGw4qQay0biM3JS+wtX4fWQmZNGr8krf6lJrNbsghbtUy70uUaw==", 909 | "dev": true, 910 | "requires": {} 911 | }, 912 | "@pixi/display": { 913 | "version": "6.2.2", 914 | "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.2.2.tgz", 915 | "integrity": "sha512-8a0R+9rjlUUjb13nBA6ZNj9gygJqt38B63uIZ2inkhxpIQf0CLo2hNxkqCqXiMeRuGmOw1n6neEDMnHO1Ks+xA==", 916 | "dev": true, 917 | "requires": {} 918 | }, 919 | "@pixi/extract": { 920 | "version": "6.2.2", 921 | "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.2.2.tgz", 922 | "integrity": "sha512-w3gW1/VoHNqFEUNGRQBKm8dCdg816etbpbLExWctmPpNdyxos5N7DF44UMRFg40GPVBBNzYissrH/ojca4PFIA==", 923 | "dev": true, 924 | "requires": {} 925 | }, 926 | "@pixi/filter-alpha": { 927 | "version": "6.2.2", 928 | "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.2.2.tgz", 929 | "integrity": "sha512-CijLcgFdmivmSyZuM5Yyeo6R+PwalZp9OSoard1Oh5DBVvcRDn4m3cBM+nimR4YJbr0kiMbK4Ja8r+e2vwFVjA==", 930 | "dev": true, 931 | "requires": {} 932 | }, 933 | "@pixi/filter-blur": { 934 | "version": "6.2.2", 935 | "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-6.2.2.tgz", 936 | "integrity": "sha512-ApFqn2fMIipr3mRp/8dZ74qraGGzzPO/EzvltDqJLru9vGlbX6dKLXZ6w5H8D/uN6aQW1e4N1Nrtzk5mvJVQ3g==", 937 | "dev": true, 938 | "requires": {} 939 | }, 940 | "@pixi/filter-color-matrix": { 941 | "version": "6.2.2", 942 | "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.2.2.tgz", 943 | "integrity": "sha512-fQWbtKFWV29jKkq4d6TknEfQ5sF5OxcbJeZo0HJmgoV3FLZ0t21XE991CFI/TqDBo8U3wzUPZVbXxiFoDKmJ8w==", 944 | "dev": true, 945 | "requires": {} 946 | }, 947 | "@pixi/filter-displacement": { 948 | "version": "6.2.2", 949 | "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-6.2.2.tgz", 950 | "integrity": "sha512-cd9um4kNNIeqKA/wVZw+iha+XVbBOYBC8En5hk3ZXAIXxCHxOCz3KS+aOVejXH5EB/gMDPvNNwygn0SCpSGdKA==", 951 | "dev": true, 952 | "requires": {} 953 | }, 954 | "@pixi/filter-fxaa": { 955 | "version": "6.2.2", 956 | "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-6.2.2.tgz", 957 | "integrity": "sha512-e4qekMlsiEcjV0JRoqH3b34sk8yzT4jsROYPHzk0IiafE+nNNcF3vQmcmnfC0aGIyODzmNdzFLjlFkRRSviydA==", 958 | "dev": true, 959 | "requires": {} 960 | }, 961 | "@pixi/filter-noise": { 962 | "version": "6.2.2", 963 | "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-6.2.2.tgz", 964 | "integrity": "sha512-Jp4L6winS6ZGKpp76x3JyfEWnUMY44fQ90Ts3R3vKkZZFNDd3T4uisZ7YwvDKOhmSo5hY3lQkXaCg/YO5feXbw==", 965 | "dev": true, 966 | "requires": {} 967 | }, 968 | "@pixi/graphics": { 969 | "version": "6.2.2", 970 | "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.2.2.tgz", 971 | "integrity": "sha512-mQyd6ef6/EF5nt7M1OObBEb9FCXxIP6AT30H01Z2wnnCgu4qj8MHrJxTkQxSHynQ+eVVPswzpVizUQZHlIYZNw==", 972 | "dev": true, 973 | "requires": {} 974 | }, 975 | "@pixi/interaction": { 976 | "version": "6.2.2", 977 | "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.2.2.tgz", 978 | "integrity": "sha512-gpNLCPc+j+RZSZqbKbzVRf4fSlOlYm0xqUVn6JtNH1kc+d9AV7Nmw9but4osP/eodDWsWPQ+7sPKClHY36bKRA==", 979 | "dev": true, 980 | "requires": {} 981 | }, 982 | "@pixi/loaders": { 983 | "version": "6.2.2", 984 | "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.2.2.tgz", 985 | "integrity": "sha512-jwFM59GeMQpzuniw5PlC7kCoXZEaKrw31/ecR1sXKWDtHRyMtvXTuf+R+tSol/1ISQ55c0JBTuUbLPwp7hPvFQ==", 986 | "dev": true, 987 | "requires": {} 988 | }, 989 | "@pixi/math": { 990 | "version": "6.2.2", 991 | "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.2.2.tgz", 992 | "integrity": "sha512-TtsaooRRMc/WAZ4LKUDhP/d14BZElLjRNa2gopwTKUtrDa1KvzAMr8WJ8P+gaXl4DJ8B/MlgESdPhRUqVSUw0A==", 993 | "dev": true 994 | }, 995 | "@pixi/mesh": { 996 | "version": "6.2.2", 997 | "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-6.2.2.tgz", 998 | "integrity": "sha512-CsKFgTu2MP756sHeoCr9s4tHy2VmnDZPnvZ0ThV8QMnb5w3Z2qRDKlXSSIdNaQOxoAPKkqxIu0JbLK8kyX0oqw==", 999 | "dev": true, 1000 | "requires": {} 1001 | }, 1002 | "@pixi/mesh-extras": { 1003 | "version": "6.2.2", 1004 | "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-6.2.2.tgz", 1005 | "integrity": "sha512-HFYWhWcV6gY7VYnMhz9OSEN14PPfVqLzWnglbegGEMqCbY/ZGsD8X99x/HLGQGd6L4FFto382q0Fj1xu+y/brg==", 1006 | "dev": true, 1007 | "requires": {} 1008 | }, 1009 | "@pixi/mixin-cache-as-bitmap": { 1010 | "version": "6.2.2", 1011 | "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.2.2.tgz", 1012 | "integrity": "sha512-t3jZKGa/qoRMetMWmGkXz8Kp1Uzmb+2y4/adqu+RdIeG3D1oItuGux+R36ZQO6dVRv3R8s2/Dex0aACek171zw==", 1013 | "dev": true, 1014 | "requires": {} 1015 | }, 1016 | "@pixi/mixin-get-child-by-name": { 1017 | "version": "6.2.2", 1018 | "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.2.2.tgz", 1019 | "integrity": "sha512-BBrniLAkzDex4HyvVdE/DjphzQu4pZ8Nc5aDRIbiS1s283/IXr2oTcoaW23kCjhX0xgu++XcJQQMMyv3mlblZQ==", 1020 | "dev": true, 1021 | "requires": {} 1022 | }, 1023 | "@pixi/mixin-get-global-position": { 1024 | "version": "6.2.2", 1025 | "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.2.2.tgz", 1026 | "integrity": "sha512-Rz7DHn6koYFEeVG36rKiMwoTD+elJKqwQ24HHw0BAKz1VwGagBi0ZTcJ+nWplBOrw6ZPKfdOBwGQLXD7ODg8lQ==", 1027 | "dev": true, 1028 | "requires": {} 1029 | }, 1030 | "@pixi/particle-container": { 1031 | "version": "6.2.2", 1032 | "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-6.2.2.tgz", 1033 | "integrity": "sha512-DYbSCcUiVLeM4sKZkzAp3F6dz3idyP1jecxbFqNmRjWRyMv7uXIO42rxGJMrd6BzA5j7DkywI3X0SqhhSZP7Ag==", 1034 | "dev": true, 1035 | "requires": {} 1036 | }, 1037 | "@pixi/prepare": { 1038 | "version": "6.2.2", 1039 | "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-6.2.2.tgz", 1040 | "integrity": "sha512-kJojn/6zEcao+XQyU+zWkBmQr0Tgeju3F9JYBpPQ8MKIUJYvDQDtRxYo9A6Xzxk8FJ373s2Ext/OelX2FcR3HQ==", 1041 | "dev": true, 1042 | "requires": {} 1043 | }, 1044 | "@pixi/runner": { 1045 | "version": "6.2.2", 1046 | "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.2.2.tgz", 1047 | "integrity": "sha512-q7bc6Eu2XplGzCQBOhbv32P0z48ixW/Su6epT9IOfDi2iTiPjB5Sxp9e+DZDFIzvkfLzgr67Ddy51YMvOp5sQg==", 1048 | "dev": true 1049 | }, 1050 | "@pixi/settings": { 1051 | "version": "6.2.2", 1052 | "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.2.2.tgz", 1053 | "integrity": "sha512-eQv0ykSwnJUd/LF4MuaFoL+eBNG+EUPAVfsnlsez/Y09aqwIzJyAjRx+uGp9adQ3XHXwYt2l2wINn+foF1y/8A==", 1054 | "dev": true, 1055 | "requires": { 1056 | "ismobilejs": "^1.1.0" 1057 | } 1058 | }, 1059 | "@pixi/sprite": { 1060 | "version": "6.2.2", 1061 | "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.2.2.tgz", 1062 | "integrity": "sha512-Imr+sJWFh5GtarW3FBBUzedSexfijg7OL0A6qwMDHA011gjyVeRZ15uXP8fgIwUoHoMLsU6xk85jcucM9RfWuw==", 1063 | "dev": true, 1064 | "requires": {} 1065 | }, 1066 | "@pixi/sprite-animated": { 1067 | "version": "6.2.2", 1068 | "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-6.2.2.tgz", 1069 | "integrity": "sha512-MNkVIuC06aXn8bgfWyqQE8vmclCVLgmHB//hssr/1IFCVmnEEYZLyeWErkIA87grY3iV7tGOILEYSa3pod4XEg==", 1070 | "dev": true, 1071 | "requires": {} 1072 | }, 1073 | "@pixi/sprite-tiling": { 1074 | "version": "6.2.2", 1075 | "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.2.2.tgz", 1076 | "integrity": "sha512-HQ9RVObmwyPq+PM2wm2UEIMdsvWg96ymSz0NOh9bOfMSme18vSWv0Rbidv/FziQT8x6MpoLpYke0DYMGtbu0tA==", 1077 | "dev": true, 1078 | "requires": {} 1079 | }, 1080 | "@pixi/spritesheet": { 1081 | "version": "6.2.2", 1082 | "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.2.2.tgz", 1083 | "integrity": "sha512-TZodC/pf+CW/8kZN+RPzObXWSPgYv1pp+foUnOHb7w8AyFnMljeqBPiUfLQaMzw91TI9AHLihoeeofqZ4wMpww==", 1084 | "dev": true, 1085 | "requires": {} 1086 | }, 1087 | "@pixi/text": { 1088 | "version": "6.2.2", 1089 | "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.2.2.tgz", 1090 | "integrity": "sha512-Hi6MO/QhllZ4IWkr7MBzImzHB88XXKlF5E9xt1vUBhdZb3KsQD+cPx+bNCFWn6ZMWDmOloJekzRkkSl3KrfBSw==", 1091 | "dev": true, 1092 | "requires": {} 1093 | }, 1094 | "@pixi/text-bitmap": { 1095 | "version": "6.2.2", 1096 | "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-6.2.2.tgz", 1097 | "integrity": "sha512-pJZM0o68n6cUFUdolvpuuloMccdQqvTc3CLzhLu9xW9HLx7NeFjZEQWTGQea8GXsGa1RhvlMd9x3AiVSNMI2FA==", 1098 | "dev": true, 1099 | "requires": {} 1100 | }, 1101 | "@pixi/ticker": { 1102 | "version": "6.2.2", 1103 | "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.2.2.tgz", 1104 | "integrity": "sha512-tF3cRtcYnj3U3HFQ0IJKvAxFU1YUM96T0p8Qh478xZhvGxYGnjrQDPmjXePb4NocAdG5adb6//2uvQOd7o4rHg==", 1105 | "dev": true, 1106 | "requires": {} 1107 | }, 1108 | "@pixi/utils": { 1109 | "version": "6.2.2", 1110 | "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.2.2.tgz", 1111 | "integrity": "sha512-rpS6QolFuRmm/QcKm5PYHOCkX6okl9a00u2osaMbmPP+l7XLATTxSsFhw64UbSNR+zmzsrhreRFBVFn3tf8K6w==", 1112 | "dev": true, 1113 | "requires": { 1114 | "@types/earcut": "^2.1.0", 1115 | "earcut": "^2.2.2", 1116 | "eventemitter3": "^3.1.0", 1117 | "url": "^0.11.0" 1118 | } 1119 | } 1120 | } 1121 | }, 1122 | "promise-polyfill": { 1123 | "version": "8.2.1", 1124 | "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.2.1.tgz", 1125 | "integrity": "sha512-3p9zj0cEHbp7NVUxEYUWjQlffXqnXaZIMPkAO7HhFh8u5636xLRDHOUo2vpWSK0T2mqm6fKLXYn1KP6PAZ2gKg==", 1126 | "dev": true 1127 | }, 1128 | "punycode": { 1129 | "version": "1.3.2", 1130 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", 1131 | "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", 1132 | "dev": true 1133 | }, 1134 | "querystring": { 1135 | "version": "0.2.0", 1136 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", 1137 | "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", 1138 | "dev": true 1139 | }, 1140 | "typescript": { 1141 | "version": "4.3.5", 1142 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", 1143 | "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", 1144 | "dev": true 1145 | }, 1146 | "url": { 1147 | "version": "0.11.0", 1148 | "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", 1149 | "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", 1150 | "dev": true, 1151 | "requires": { 1152 | "punycode": "1.3.2", 1153 | "querystring": "0.2.0" 1154 | } 1155 | } 1156 | } 1157 | } 1158 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixi-dashed-line", 3 | "version": "1.4.2", 4 | "description": "A pixi.js implementation to support dashed lines in PIXI.Graphics.", 5 | "main": "dist/index.js", 6 | "browser": "dist/index.js", 7 | "types": "dist/index.d.ts", 8 | "scripts": { 9 | "build": "tsc lib/index.ts --outDir dist --skipLibCheck --module commonjs --moduleResolution node --declaration --sourceMap", 10 | "build-demo": "esbuild demo/index.ts --outfile=docs/index.js --bundle", 11 | "prepublishOnly": "npm run build && npm run build-demo" 12 | }, 13 | "files": [ 14 | "dist/*", 15 | "lib/*" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/davidfig/pixi-dashed-line.git" 20 | }, 21 | "bugs": { 22 | "url": "https://github.com/davidfig/pixi-dashed-line/issues", 23 | "email": "david@yopeyopey.com" 24 | }, 25 | "homepage": "https://github.com/davidfig/pixi-dashed-line#readme", 26 | "keywords": [ 27 | "dash", 28 | "dots", 29 | "pixi.js", 30 | "dashed line", 31 | "dotted", 32 | "PIXI.Graphics" 33 | ], 34 | "author": "David Figatner (https://yopeyopey.com)", 35 | "license": "MIT", 36 | "peerDependencies": { 37 | "pixi.js": "^6.2.2" 38 | }, 39 | "devDependencies": { 40 | "esbuild": "^0.12.15", 41 | "pixi-viewport": "^4.31.0", 42 | "pixi.js": "^6.3.0", 43 | "typescript": "^4.3.5" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tsconfig-demo.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "sourceMap": true, 4 | "esModuleInterop": true, 5 | "moduleResolution": "node", 6 | "declaration": false, 7 | "outFile": "docs/index.js" 8 | }, 9 | "files": [ 10 | "demo/index.ts", 11 | "lib/index.ts" 12 | ] 13 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "sourceMap": true, 5 | "esModuleInterop": true, 6 | "moduleResolution": "node", 7 | "noEmit": true, 8 | "declaration": false, 9 | "module": "esnext", 10 | "resolveJsonModule": true, 11 | "skipLibCheck": true, 12 | }, 13 | "include": [ 14 | "**/*.ts", 15 | ] 16 | } -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@pixi/accessibility@6.3.0": 6 | version "6.3.0" 7 | resolved "https://registry.yarnpkg.com/@pixi/accessibility/-/accessibility-6.3.0.tgz#fe843d6080fa263d01dcb3c1adad00fc42cafb75" 8 | integrity sha512-G2IJovkixJ3MdXC456e7Nu9J2nLte01KwJPkWhhuuZkRQI6gBcLHn5flGG+QVx/dZDLySXyHiJ+1MAQ8kI9AbA== 9 | 10 | "@pixi/app@6.3.0": 11 | version "6.3.0" 12 | resolved "https://registry.yarnpkg.com/@pixi/app/-/app-6.3.0.tgz#9d8cb89e01b8a92c20700aa7d289e7ebc3f59be6" 13 | integrity sha512-Ud+D/VkGFCx9Z+i0OXDzXqT3zNrUJ9f3sZuoACz1VVD6nnSq+wBZPnyoOOsgfiMYo/0KYVJh+EdBKZS8aYnnVQ== 14 | 15 | "@pixi/compressed-textures@6.3.0": 16 | version "6.3.0" 17 | resolved "https://registry.yarnpkg.com/@pixi/compressed-textures/-/compressed-textures-6.3.0.tgz#a058043d03704f717f9ddfa527fb3947290ff782" 18 | integrity sha512-Y/SHGQZftvSM98/m89a1Pf99c9L5TGEPngueOcmjCABeGI33vOaL2VM4chkHXhG9HLqrHYAty24vXqOj42LbJw== 19 | 20 | "@pixi/constants@6.3.0": 21 | version "6.3.0" 22 | resolved "https://registry.yarnpkg.com/@pixi/constants/-/constants-6.3.0.tgz#c900b875ee132d7061af4c1ab53c060faec1a504" 23 | integrity sha512-295/bb0+5IugA9plqBnD6xrvApjgGRdaNJ6EryCa7UB2j8wt4YtuzLjNeaCtng9eJONgJXXPhPF85+spdWRMbg== 24 | 25 | "@pixi/core@6.3.0": 26 | version "6.3.0" 27 | resolved "https://registry.yarnpkg.com/@pixi/core/-/core-6.3.0.tgz#f0eeb6804f811f7de59e32130590f82c4b930745" 28 | integrity sha512-j7UMizcgDoUB9eDrZIP22xJCPYpjx2/BCl8deE5M9Cim9OR2qPxnNnt3jC1oKf2vVnNMTDrMOLekhMVo89FX2Q== 29 | dependencies: 30 | "@types/offscreencanvas" "^2019.6.4" 31 | 32 | "@pixi/display@6.3.0": 33 | version "6.3.0" 34 | resolved "https://registry.yarnpkg.com/@pixi/display/-/display-6.3.0.tgz#82781587c928ac49ea24dbc675781e885d3c4a08" 35 | integrity sha512-Uxc1aLTFzV55d3kOlh/g19RlE2okPXsroi5jfYGCNS0VCdFk0sp6jMNEwk12BwC0KcA5SU7217H4jLy38VCVpA== 36 | 37 | "@pixi/extract@6.3.0": 38 | version "6.3.0" 39 | resolved "https://registry.yarnpkg.com/@pixi/extract/-/extract-6.3.0.tgz#ee1f4eaa933e98c2c54930bb0c1b3f3935e4b1ad" 40 | integrity sha512-p5d3Jx0hoIQZsn1msIOyYCzyRjVkfiDUNkuzpLmNo9zng7C6bwqmIZWEMr5alm7+XwqKHlQdsBuK9PeUJt9fGQ== 41 | 42 | "@pixi/filter-alpha@6.3.0": 43 | version "6.3.0" 44 | resolved "https://registry.yarnpkg.com/@pixi/filter-alpha/-/filter-alpha-6.3.0.tgz#3585bfe8a215fb13f56352d34dee2243fd8651ad" 45 | integrity sha512-FyO35T2ym7R/rxaQzz3+dfpMlNn7b4XCFebD7hAgYoLqb+/vaM32ZjjoKBxxFRFqpZxBO6BObCyJQd245h+P4A== 46 | 47 | "@pixi/filter-blur@6.3.0": 48 | version "6.3.0" 49 | resolved "https://registry.yarnpkg.com/@pixi/filter-blur/-/filter-blur-6.3.0.tgz#7ac975c8e011201159afcca70b67966e5dfcde6e" 50 | integrity sha512-TpQxBbFnkcAxMOInMZDprRPXlfhQ0tYOvbnmdDbVTEGOqDXY/7do0bYRfsNshAyeyGE4NVIks1S/RlGkzHLhBg== 51 | 52 | "@pixi/filter-color-matrix@6.3.0": 53 | version "6.3.0" 54 | resolved "https://registry.yarnpkg.com/@pixi/filter-color-matrix/-/filter-color-matrix-6.3.0.tgz#bf6795960c4c1b608bf92c5f513b5e60b1888754" 55 | integrity sha512-9qKrRiaeINap7BgolI3GZ5RaRgYNx0pK8iyrn7vWcuQAxR/lPM+rfgWQPagjXdU9NbnbnfZj0LNOmgFqtWsZTQ== 56 | 57 | "@pixi/filter-displacement@6.3.0": 58 | version "6.3.0" 59 | resolved "https://registry.yarnpkg.com/@pixi/filter-displacement/-/filter-displacement-6.3.0.tgz#5b529f60878ba06b669535f52abc897df34b447d" 60 | integrity sha512-zjOnM3fVh4HOxEHzG/iN00ZmxCuZdxy+xTnjUZkbOgmXtDqRa9HakCBHlg60ZpF/NiIAkJNdrXx6nDhh2hve8Q== 61 | 62 | "@pixi/filter-fxaa@6.3.0": 63 | version "6.3.0" 64 | resolved "https://registry.yarnpkg.com/@pixi/filter-fxaa/-/filter-fxaa-6.3.0.tgz#e2d6864740f24c917e91f60f3776466f82f8baec" 65 | integrity sha512-dKhKNmQ8zgtvcT2s7nDU/0LETaCzydgosXAeEPO5XtkHA6asffjEAqiie9wpj3DzODOibNuC/wpiiwGmN6xGgw== 66 | 67 | "@pixi/filter-noise@6.3.0": 68 | version "6.3.0" 69 | resolved "https://registry.yarnpkg.com/@pixi/filter-noise/-/filter-noise-6.3.0.tgz#dc1608cf9cd432e1e7020baed4fa05013a296a8a" 70 | integrity sha512-+2qhb/wWkqI86xb2+NMxeoKUiA5Kx6Kvo1jCvSE4PdP5CGCFDLQqnj0NkIZCbl/3L0MiM9vy+JRmY+nVgre8Tw== 71 | 72 | "@pixi/graphics@6.3.0": 73 | version "6.3.0" 74 | resolved "https://registry.yarnpkg.com/@pixi/graphics/-/graphics-6.3.0.tgz#50e758385b7704d0a068db189a20f0244f5fd68d" 75 | integrity sha512-cnce8ddZSRgVuwK3hdWjEgf9WJljEXlJp+tOIEYvmNYnkvfaRpdeVRpF5yd+A24ZswrVRU9W/W7cXCMw2uq/vQ== 76 | 77 | "@pixi/interaction@6.3.0": 78 | version "6.3.0" 79 | resolved "https://registry.yarnpkg.com/@pixi/interaction/-/interaction-6.3.0.tgz#2329eae55884bf380a4c5443b29631a1fba6f283" 80 | integrity sha512-ZAgYJPnpQS07r69o6Mgn4SxurY+t05EWblC8bpVssQ/k2yU3xeWAKNV/Hk39AKrM5S+PBU9YyGX//jM+3gt8rQ== 81 | 82 | "@pixi/loaders@6.3.0": 83 | version "6.3.0" 84 | resolved "https://registry.yarnpkg.com/@pixi/loaders/-/loaders-6.3.0.tgz#82441d1f664c489a754db7d2deb68bccdf97f4d6" 85 | integrity sha512-FXW3DkcAg2w0FABS6ixmzJNQSdabHXWumltelYM76NmBSE8oaLmg6tniBvjrTlSxUs3HlgwdeqgnUHV9GIFxLQ== 86 | 87 | "@pixi/math@6.3.0": 88 | version "6.3.0" 89 | resolved "https://registry.yarnpkg.com/@pixi/math/-/math-6.3.0.tgz#2df6a27a8a73e1976ebbe90b01dfeab999b17bdb" 90 | integrity sha512-QkF9wl3/kXvthwWhrDAVgWQWl3T9dbyicHsoWfx0s9b3E0rx+PZcpz5ftaAVxGd7EvecIxV9nEUnna9TIjvwJQ== 91 | 92 | "@pixi/mesh-extras@6.3.0": 93 | version "6.3.0" 94 | resolved "https://registry.yarnpkg.com/@pixi/mesh-extras/-/mesh-extras-6.3.0.tgz#32a8720b3529b98cfe09035ceb3e6c39dc6c78a5" 95 | integrity sha512-rGvpW/UDNPDSALocT2w3jvBpF9TUgyvZMGcxqolIxDbrmRiyUeT1EeYnCQpIqQUnkKW1QKxLpuSjut2yfERe7A== 96 | 97 | "@pixi/mesh@6.3.0": 98 | version "6.3.0" 99 | resolved "https://registry.yarnpkg.com/@pixi/mesh/-/mesh-6.3.0.tgz#ce228e8a2c196579d6cf02c650c0b2ff26c43db7" 100 | integrity sha512-ljm1lk8ZyxQaZHl53psPptD7eO8yVt7mbEwly+qSyh61Nj950fq5CBgr2cd7TakBSUfiUthYAYP8wmdwop328Q== 101 | 102 | "@pixi/mixin-cache-as-bitmap@6.3.0": 103 | version "6.3.0" 104 | resolved "https://registry.yarnpkg.com/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.3.0.tgz#02d8422d2345f941c68bfe33f186537cce521c62" 105 | integrity sha512-KIbclUCTv6J2ERIX8LM0PaGezKqfmDbR8X/68irbwsYU3fRtsFb9X4IHttguiItYK8C6syyepEyIRbWB/poc6Q== 106 | 107 | "@pixi/mixin-get-child-by-name@6.3.0": 108 | version "6.3.0" 109 | resolved "https://registry.yarnpkg.com/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.3.0.tgz#5e58d496d2ecd79b98b566901eec74b3b3119c69" 110 | integrity sha512-R1nh985Fffo0HG3gmbbsBgbR0obGdjkVb31V9gUFileydY8u1jVA4sL1uzOfBbHAjDE+HFOO1wC1p6ygalUrkQ== 111 | 112 | "@pixi/mixin-get-global-position@6.3.0": 113 | version "6.3.0" 114 | resolved "https://registry.yarnpkg.com/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.3.0.tgz#ba02920c45ea3284b5c58371d9e5e32c61312c05" 115 | integrity sha512-hDzLubpLSRH6hp+mn8mpONZeMcMc75ndkz6WROXI0gfoUkFdzxHStGBSk4VJRgtSj1zzOgmEqo7LP/y2blgYlw== 116 | 117 | "@pixi/particle-container@6.3.0": 118 | version "6.3.0" 119 | resolved "https://registry.yarnpkg.com/@pixi/particle-container/-/particle-container-6.3.0.tgz#991c271e927e31414ff1a362b6148c368db6e3c8" 120 | integrity sha512-yjcMUHIPUL4T27ECBrxgn6j00CpomYLBvdxXWDDqMSnm2W6AA+cy7QM30dCm2mcbStzB4j+cbYvN1+nRIuIE8Q== 121 | 122 | "@pixi/polyfill@6.3.0": 123 | version "6.3.0" 124 | resolved "https://registry.yarnpkg.com/@pixi/polyfill/-/polyfill-6.3.0.tgz#4b8862c4c6ce589a21abfafa174acbfcee631d2c" 125 | integrity sha512-sjOLw0yndRipWOW3ykkCej5+VMZRBmnd32kUXXum9kgceSeL0w+iRPZrfvaFmgypqGnGpqwg24MsZ3vtIffd9g== 126 | dependencies: 127 | object-assign "^4.1.1" 128 | promise-polyfill "^8.2.0" 129 | 130 | "@pixi/prepare@6.3.0": 131 | version "6.3.0" 132 | resolved "https://registry.yarnpkg.com/@pixi/prepare/-/prepare-6.3.0.tgz#8f46e4a67e5189739a3cba70053dca4861ef0f8d" 133 | integrity sha512-eqQpEIAhctZ85YEQWYMI/LmNyLn8K+lpfH783YQQ1WjFmBrFgJzvm1vs+ztIRl+6EIzVIC28RmcBU15Vkmylew== 134 | 135 | "@pixi/runner@6.3.0": 136 | version "6.3.0" 137 | resolved "https://registry.yarnpkg.com/@pixi/runner/-/runner-6.3.0.tgz#e300c0865825fa736376801b57485d3d1d6f5fb8" 138 | integrity sha512-dG0YK/59dMay1pBD3sXYWtyDQ1gjRY8QCI38b+wQiH9oFMNFtj/f/RxkL1XyaK0r7sC8TjXUiQ+7+lZlmcqIjw== 139 | 140 | "@pixi/settings@6.3.0": 141 | version "6.3.0" 142 | resolved "https://registry.yarnpkg.com/@pixi/settings/-/settings-6.3.0.tgz#1207fdb65fa1cf305e34a97fdffb47004bb8e5f5" 143 | integrity sha512-UkbZmlexr6NGM6Qz30Et63bpWAmpmkknOOnavrhWPnnbhFIx4kVzU9mvGMHGSGNLJabX9+gFUdjDGSlzF42v4w== 144 | dependencies: 145 | ismobilejs "^1.1.0" 146 | 147 | "@pixi/sprite-animated@6.3.0": 148 | version "6.3.0" 149 | resolved "https://registry.yarnpkg.com/@pixi/sprite-animated/-/sprite-animated-6.3.0.tgz#d28947796dd666e8cd5ed8937b378acaab5615ca" 150 | integrity sha512-P4VroljvyiAc9acwbUVZTHKwM418x5AFOAEYAx9NkF9izh2HhinjLa+iRK70gPnEBOMPwqn1taVnz/n4/aYHWw== 151 | 152 | "@pixi/sprite-tiling@6.3.0": 153 | version "6.3.0" 154 | resolved "https://registry.yarnpkg.com/@pixi/sprite-tiling/-/sprite-tiling-6.3.0.tgz#75d0db26c471eaa6ca5c378c787de570486371d1" 155 | integrity sha512-4+HodD9QwhiqIptBpT3rXuJDAJ5TSg2IRnHOo/+qSopA70VC1E+RRgyVvxfRfopfptcAHi60XWfzvFLHSV3LsA== 156 | 157 | "@pixi/sprite@6.3.0": 158 | version "6.3.0" 159 | resolved "https://registry.yarnpkg.com/@pixi/sprite/-/sprite-6.3.0.tgz#8441400c001403250cd5bb21d456735373172532" 160 | integrity sha512-dv0CSkxjWZeUujYQ6NorJ5Cue6SL+RE/H739JK4+cAwEtoWpYqKqiw6aeUu4aqSRsqjhyk9ilhR+K1MbnImJKA== 161 | 162 | "@pixi/spritesheet@6.3.0": 163 | version "6.3.0" 164 | resolved "https://registry.yarnpkg.com/@pixi/spritesheet/-/spritesheet-6.3.0.tgz#d3047938f6ab3d93f69ff535f71fbc39ee86bd3e" 165 | integrity sha512-TAIIVA2KFJk7lKB4Ggep99bxpkSjnYlODuLEZ9EoJ6QIEx9A1HesaKwwqzfneeCzX5BOBeJMgZ++rujE29rrpg== 166 | 167 | "@pixi/text-bitmap@6.3.0": 168 | version "6.3.0" 169 | resolved "https://registry.yarnpkg.com/@pixi/text-bitmap/-/text-bitmap-6.3.0.tgz#43fe3585a551c9c08b885f2a74626f0def45ecf3" 170 | integrity sha512-ogoJ+k7MHUEUb8b+yBZOi9jLW/TvIEduf2FJ5S52sovjhjs1/uZw2sdR43tM9BGxP1W9H6GE5yOK5f2sEFZIKg== 171 | 172 | "@pixi/text@6.3.0": 173 | version "6.3.0" 174 | resolved "https://registry.yarnpkg.com/@pixi/text/-/text-6.3.0.tgz#f39b3aa2567de42f3d4266c276f5abb0529dbb23" 175 | integrity sha512-hDevLv8HztzdImA6sIvmpBpNoIyDCrMNJAdjTUo/Kw1aoKlDaOGx4K3J7wVTzV1d1WrreIXtOsO3rQUOzf/hmg== 176 | 177 | "@pixi/ticker@6.3.0": 178 | version "6.3.0" 179 | resolved "https://registry.yarnpkg.com/@pixi/ticker/-/ticker-6.3.0.tgz#0438efd9abbd74eab59be7361bac47553c25e4cb" 180 | integrity sha512-cEqyQgM5entsi+h85fUnESBzNc/yMRG/mqsfAr7/KraP7bmCcn3MYVuTycRMkRbuNPjC1NIpqkqiOaxzgAUGPw== 181 | 182 | "@pixi/utils@6.3.0": 183 | version "6.3.0" 184 | resolved "https://registry.yarnpkg.com/@pixi/utils/-/utils-6.3.0.tgz#74703e1593b3f7462165adcfaf41c62ce303829c" 185 | integrity sha512-QI5wb/fDdH8DAzIMlrYS0MhG382FPMLh4s3yRtOaftiOb84LL7Syz//SC+CJAyVB0UV/Lpr+T6PiCa4eBjRDgA== 186 | dependencies: 187 | "@types/earcut" "^2.1.0" 188 | earcut "^2.2.2" 189 | eventemitter3 "^3.1.0" 190 | url "^0.11.0" 191 | 192 | "@types/earcut@^2.1.0": 193 | version "2.1.1" 194 | resolved "https://registry.yarnpkg.com/@types/earcut/-/earcut-2.1.1.tgz#573a0af609f17005c751f6f4ffec49cfe358ea51" 195 | integrity sha512-w8oigUCDjElRHRRrMvn/spybSMyX8MTkKA5Dv+tS1IE/TgmNZPqUYtvYBXGY8cieSE66gm+szeK+bnbxC2xHTQ== 196 | 197 | "@types/offscreencanvas@^2019.6.4": 198 | version "2019.6.4" 199 | resolved "https://registry.yarnpkg.com/@types/offscreencanvas/-/offscreencanvas-2019.6.4.tgz#64f6d120b53925028299c744fcdd32d2cd525963" 200 | integrity sha512-u8SAgdZ8ROtkTF+mfZGOscl0or6BSj9A4g37e6nvxDc+YB/oDut0wHkK2PBBiC2bNR8TS0CPV+1gAk4fNisr1Q== 201 | 202 | earcut@^2.2.2: 203 | version "2.2.3" 204 | resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.3.tgz#d44ced2ff5a18859568e327dd9c7d46b16f55cf4" 205 | integrity sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug== 206 | 207 | esbuild@^0.12.15: 208 | version "0.12.29" 209 | resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.29.tgz#be602db7c4dc78944a9dbde0d1ea19d36c1f882d" 210 | integrity sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g== 211 | 212 | eventemitter3@^3.1.0: 213 | version "3.1.2" 214 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" 215 | integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== 216 | 217 | ismobilejs@^1.1.0: 218 | version "1.1.1" 219 | resolved "https://registry.yarnpkg.com/ismobilejs/-/ismobilejs-1.1.1.tgz#c56ca0ae8e52b24ca0f22ba5ef3215a2ddbbaa0e" 220 | integrity sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw== 221 | 222 | object-assign@^4.1.1: 223 | version "4.1.1" 224 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 225 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 226 | 227 | pixi-viewport@^4.31.0: 228 | version "4.34.4" 229 | resolved "https://registry.yarnpkg.com/pixi-viewport/-/pixi-viewport-4.34.4.tgz#78d575235225d852e5017e89da7cc939ec50a9f8" 230 | integrity sha512-JARPbHRxmbiedj2qc/kjwd0rKIplKoRcLIDjO9DAMtjXzAlVWAdkwLxvY7g2EJBCHqNqxrEQy9ssye1DM4XRKg== 231 | 232 | pixi.js@^6.3.0: 233 | version "6.3.0" 234 | resolved "https://registry.yarnpkg.com/pixi.js/-/pixi.js-6.3.0.tgz#466f28a06d6263337c0f91275faf229a02f6a65b" 235 | integrity sha512-ayOmVagMSa5lPVvznDf2e4EppwzPEDnB/q3AYdjTM9Ksw+JKT3lbLuZFo/6U0HNYF9DsJRJL/4ebReZh1hnqLQ== 236 | dependencies: 237 | "@pixi/accessibility" "6.3.0" 238 | "@pixi/app" "6.3.0" 239 | "@pixi/compressed-textures" "6.3.0" 240 | "@pixi/constants" "6.3.0" 241 | "@pixi/core" "6.3.0" 242 | "@pixi/display" "6.3.0" 243 | "@pixi/extract" "6.3.0" 244 | "@pixi/filter-alpha" "6.3.0" 245 | "@pixi/filter-blur" "6.3.0" 246 | "@pixi/filter-color-matrix" "6.3.0" 247 | "@pixi/filter-displacement" "6.3.0" 248 | "@pixi/filter-fxaa" "6.3.0" 249 | "@pixi/filter-noise" "6.3.0" 250 | "@pixi/graphics" "6.3.0" 251 | "@pixi/interaction" "6.3.0" 252 | "@pixi/loaders" "6.3.0" 253 | "@pixi/math" "6.3.0" 254 | "@pixi/mesh" "6.3.0" 255 | "@pixi/mesh-extras" "6.3.0" 256 | "@pixi/mixin-cache-as-bitmap" "6.3.0" 257 | "@pixi/mixin-get-child-by-name" "6.3.0" 258 | "@pixi/mixin-get-global-position" "6.3.0" 259 | "@pixi/particle-container" "6.3.0" 260 | "@pixi/polyfill" "6.3.0" 261 | "@pixi/prepare" "6.3.0" 262 | "@pixi/runner" "6.3.0" 263 | "@pixi/settings" "6.3.0" 264 | "@pixi/sprite" "6.3.0" 265 | "@pixi/sprite-animated" "6.3.0" 266 | "@pixi/sprite-tiling" "6.3.0" 267 | "@pixi/spritesheet" "6.3.0" 268 | "@pixi/text" "6.3.0" 269 | "@pixi/text-bitmap" "6.3.0" 270 | "@pixi/ticker" "6.3.0" 271 | "@pixi/utils" "6.3.0" 272 | 273 | promise-polyfill@^8.2.0: 274 | version "8.2.3" 275 | resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.2.3.tgz#2edc7e4b81aff781c88a0d577e5fe9da822107c6" 276 | integrity sha512-Og0+jCRQetV84U8wVjMNccfGCnMQ9mGs9Hv78QFe+pSDD3gWTpz0y+1QCuxy5d/vBFuZ3iwP2eycAkvqIMPmWg== 277 | 278 | punycode@1.3.2: 279 | version "1.3.2" 280 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" 281 | integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= 282 | 283 | querystring@0.2.0: 284 | version "0.2.0" 285 | resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" 286 | integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= 287 | 288 | typescript@^4.3.5: 289 | version "4.6.2" 290 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" 291 | integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== 292 | 293 | url@^0.11.0: 294 | version "0.11.0" 295 | resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" 296 | integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= 297 | dependencies: 298 | punycode "1.3.2" 299 | querystring "0.2.0" 300 | --------------------------------------------------------------------------------