diff --git a/multiplayer/.prettierrc b/multiplayer/.prettierrc index 06c8d264b740..f5b0ff961c72 100644 --- a/multiplayer/.prettierrc +++ b/multiplayer/.prettierrc @@ -1,5 +1,6 @@ { "arrowParens": "avoid", "semi": true, - "tabWidth": 4 + "tabWidth": 4, + "printWidth": 120 } \ No newline at end of file diff --git a/multiplayer/package-lock.json b/multiplayer/package-lock.json index bd26eed22edb..e910df12a390 100644 --- a/multiplayer/package-lock.json +++ b/multiplayer/package-lock.json @@ -8,13 +8,16 @@ "name": "@arcade/multiplayer", "version": "0.1.0", "dependencies": { + "@ctrl/tinycolor": "^4.0.3", "@fortawesome/free-regular-svg-icons": "^6.2.0", "@fortawesome/free-solid-svg-icons": "^6.2.0", "@fortawesome/react-fontawesome": "^0.2.0", "@types/node": "^12.20.45", "engine.io-client": "^6.2.2", "framer-motion": "^6.5.1", + "jsonpath-plus": "^8.1.0", "nanoid": "^4.0.0", + "pixi.js": "^7.4.2", "qrcode.react": "^3.1.0", "react-scripts": "^5.0.1", "smart-buffer": "^4.2.0", @@ -2180,6 +2183,14 @@ "postcss-selector-parser": "^6.0.10" } }, + "node_modules/@ctrl/tinycolor": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.0.3.tgz", + "integrity": "sha512-e9nEVehVJwkymQpkGhdSNzLT2Lr9UTTby+JePq4Z2SxBbOQjY7pLgSouAaXvfaGQVSAaY0U4eJdwfSDmCbItcw==", + "engines": { + "node": ">=14" + } + }, "node_modules/@emotion/is-prop-valid": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", @@ -3247,6 +3258,349 @@ "node": ">= 8" } }, + "node_modules/@pixi/accessibility": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-7.4.2.tgz", + "integrity": "sha512-R6VEolm8uyy1FB1F2qaLKxVbzXAFTZCF2ka8fl9lsz7We6ZfO4QpXv9ur7DvzratjCQUQVCKo0/V7xL5q1EV/g==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/events": "7.4.2" + } + }, + "node_modules/@pixi/app": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/app/-/app-7.4.2.tgz", + "integrity": "sha512-ugkH3kOgjT8P1mTMY29yCOgEh+KuVMAn8uBxeY0aMqaUgIMysfpnFv+Aepp2CtvI9ygr22NC+OiKl+u+eEaQHw==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2" + } + }, + "node_modules/@pixi/assets": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/assets/-/assets-7.4.2.tgz", + "integrity": "sha512-anxho59H9egZwoaEdM5aLvYyxoz6NCy3CaQIvNHD1bbGg8L16Ih0e26QSBR5fu53jl8OjT6M7s+p6n7uu4+fGA==", + "dependencies": { + "@types/css-font-loading-module": "^0.0.12" + }, + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/color": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/color/-/color-7.4.2.tgz", + "integrity": "sha512-av1LOvhHsiaW8+T4n/FgnOKHby55/w7VcA1HzPIHRBtEcsmxvSCDanT1HU2LslNhrxLPzyVx18nlmalOyt5OBg==", + "dependencies": { + "@pixi/colord": "^2.9.6" + } + }, + "node_modules/@pixi/colord": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@pixi/colord/-/colord-2.9.6.tgz", + "integrity": "sha512-nezytU2pw587fQstUu1AsJZDVEynjskwOL+kibwcdxsMBFqPsFFNA7xl0ii/gXuDi6M0xj3mfRJj8pBSc2jCfA==" + }, + "node_modules/@pixi/compressed-textures": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-7.4.2.tgz", + "integrity": "sha512-VJrt7el6O4ZJSWkeOGXwrhJaiLg1UBhHB3fj42VR4YloYkAxpfd9K6s6IcbcVz7n9L48APKBMgHyaB2pX2Ck/A==", + "peerDependencies": { + "@pixi/assets": "7.4.2", + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/constants": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-7.4.2.tgz", + "integrity": "sha512-N9vn6Wpz5WIQg7ugUg2+SdqD2u2+NM0QthE8YzLJ4tLH2Iz+/TrnPKUJzeyIqbg3sxJG5ZpGGPiacqIBpy1KyA==" + }, + "node_modules/@pixi/core": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/core/-/core-7.4.2.tgz", + "integrity": "sha512-UbMtgSEnyCOFPzbE6ThB9qopXxbZ5GCof2ArB4FXOC5Xi/83MOIIYg5kf5M8689C5HJMhg2SrJu3xLKppF+CMg==", + "dependencies": { + "@pixi/color": "7.4.2", + "@pixi/constants": "7.4.2", + "@pixi/extensions": "7.4.2", + "@pixi/math": "7.4.2", + "@pixi/runner": "7.4.2", + "@pixi/settings": "7.4.2", + "@pixi/ticker": "7.4.2", + "@pixi/utils": "7.4.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/pixijs" + } + }, + "node_modules/@pixi/display": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/display/-/display-7.4.2.tgz", + "integrity": "sha512-DaD0J7gIlNlzO0Fdlby/0OH+tB5LtCY6rgFeCBKVDnzmn8wKW3zYZRenWBSFJ0Psx6vLqXYkSIM/rcokaKviIw==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/events": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/events/-/events-7.4.2.tgz", + "integrity": "sha512-Jw/w57heZjzZShIXL0bxOvKB+XgGIevyezhGtfF2ZSzQoSBWo+Fj1uE0QwKd0RIaXegZw/DhSmiMJSbNmcjifA==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2" + } + }, + "node_modules/@pixi/extensions": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/extensions/-/extensions-7.4.2.tgz", + "integrity": "sha512-Hmx2+O0yZ8XIvgomHM9GZEGcy9S9Dd8flmtOK5Aa3fXs/8v7xD08+ANQpN9ZqWU2Xs+C6UBlpqlt2BWALvKKKA==" + }, + "node_modules/@pixi/extract": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-7.4.2.tgz", + "integrity": "sha512-JOX27TRWjVEjauGBbF8PU7/g6LYXnivehdgqS5QlVDv1CNHTOrz/j3MdKcVWOhyZPbH5c9sh7lxyRxvd9AIuTQ==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/filter-alpha": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-7.4.2.tgz", + "integrity": "sha512-9OsKJ+yvY2wIcQXwswj5HQBiwNGymwmqdxfp7mo+nZSBoDmxUqvMZzE9UNJ3eUlswuNvNRO8zNOsQvwdz7WFww==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/filter-blur": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-7.4.2.tgz", + "integrity": "sha512-gOXBbIUx6CRZP1fmsis2wLzzSsofrqmIHhbf1gIkZMIQaLsc9T7brj+PaLTTiOiyJgnvGN5j20RZnkERWWKV0Q==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/filter-color-matrix": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-7.4.2.tgz", + "integrity": "sha512-ykZiR59Gvj80UKs9qm7jeUTKvn+wWk6HBVJOmJbK9jFK5juakDWp7BbH26U78Q61EWj97kI1FdfcbMkuQ7rqkA==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/filter-displacement": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-7.4.2.tgz", + "integrity": "sha512-QS/eWp/ivsxef3xapNeGwpPX7vrqQQeo99Fux4k5zsvplnNEsf91t6QYJLG776AbZEu/qh8VYRBA5raIVY/REw==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/filter-fxaa": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-7.4.2.tgz", + "integrity": "sha512-U/ptJgDsfs/r8y2a6gCaiPfDu2IFAxpQ4wtfmBpz6vRhqeE4kI8yNIUx5dZbui57zlsJaW0BNacOQxHU0vLkyQ==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/filter-noise": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-7.4.2.tgz", + "integrity": "sha512-Vy9ViBFhZEGh6xKkd3kFWErolZTwv1Y5Qb1bV7qPIYbvBECYsqzlR4uCrrjBV6KKm0PufpG/+NKC5vICZaqKzg==", + "peerDependencies": { + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/graphics": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-7.4.2.tgz", + "integrity": "sha512-jH4/Tum2RqWzHGzvlwEr7HIVduoLO57Ze705N2zQPkUD57TInn5911aGUeoua7f/wK8cTLGzgB9BzSo2kTdcHw==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/sprite": "7.4.2" + } + }, + "node_modules/@pixi/math": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/math/-/math-7.4.2.tgz", + "integrity": "sha512-7jHmCQoYk6e0rfSKjdNFOPl0wCcdgoraxgteXJTTHv3r0bMNx2pHD9FJ0VvocEUG7XHfj55O3+u7yItOAx0JaQ==" + }, + "node_modules/@pixi/mesh": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-7.4.2.tgz", + "integrity": "sha512-mEkKyQvvMrYXC3pahvH5WBIKtrtB63WixRr91ANFI7zXD+ESG6Ap6XtxMCJmXDQPwBDNk7SWVMiCflYuchG7kA==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2" + } + }, + "node_modules/@pixi/mesh-extras": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-7.4.2.tgz", + "integrity": "sha512-vNR/7wjxjs7sv9fGoKkHyU91ZAD+7EnMHBS5F3CVISlOIFxLi96NNZCB81oUIdky/90pHw40johd/4izR5zTyw==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/mesh": "7.4.2" + } + }, + "node_modules/@pixi/mixin-cache-as-bitmap": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-7.4.2.tgz", + "integrity": "sha512-6dgthi2ruUT/lervSrFDQ7vXkEsHo6CxdgV7W/wNdW1dqgQlKfDvO6FhjXzyIMRLSooUf5FoeluVtfsjkUIYrw==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/sprite": "7.4.2" + } + }, + "node_modules/@pixi/mixin-get-child-by-name": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-7.4.2.tgz", + "integrity": "sha512-0Cfw8JpQhsixprxiYph4Lj+B5n83Kk4ftNMXgM5xtZz+tVLz5s91qR0MqcdzwTGTJ7utVygiGmS4/3EfR/duRQ==", + "peerDependencies": { + "@pixi/display": "7.4.2" + } + }, + "node_modules/@pixi/mixin-get-global-position": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-7.4.2.tgz", + "integrity": "sha512-LcsahbVdX4DFS2IcGfNp4KaXuu7SjAwUp/flZSGIfstyKOKb5FWFgihtqcc9ZT4coyri3gs2JbILZub/zPZj1w==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2" + } + }, + "node_modules/@pixi/particle-container": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-7.4.2.tgz", + "integrity": "sha512-B78Qq86kt0lEa5WtB2YFIm3+PjhKfw9La9R++GBSgABl+g13s2UaZ6BIPxvY3JxWMdxPm4iPrQPFX1QWRN68mw==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/sprite": "7.4.2" + } + }, + "node_modules/@pixi/prepare": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-7.4.2.tgz", + "integrity": "sha512-PugyMzReCHXUzc3so9PPJj2OdHwibpUNWyqG4mWY2UUkb6c8NAGK1AnAPiscOvLilJcv/XQSFoNhX+N1jrvJEg==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/graphics": "7.4.2", + "@pixi/text": "7.4.2" + } + }, + "node_modules/@pixi/runner": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-7.4.2.tgz", + "integrity": "sha512-LPBpwym4vdyyDY5ucF4INQccaGyxztERyLTY1YN6aqJyyMmnc7iqXlIKt+a0euMBtNoLoxy6MWMvIuZj0JfFPA==" + }, + "node_modules/@pixi/settings": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-7.4.2.tgz", + "integrity": "sha512-pMN+L6aWgvUbwhFIL/BTHKe2ShYGPZ8h9wlVBnFHMtUcJcFLMF1B3lzuvCayZRepOphs6RY0TqvnDvVb585JhQ==", + "dependencies": { + "@pixi/constants": "7.4.2", + "@types/css-font-loading-module": "^0.0.12", + "ismobilejs": "^1.1.0" + } + }, + "node_modules/@pixi/sprite": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-7.4.2.tgz", + "integrity": "sha512-Ccf/OVQsB+HQV0Fyf5lwD+jk1jeU7uSIqEjbxenNNssmEdB7S5qlkTBV2EJTHT83+T6Z9OMOHsreJZerydpjeg==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2" + } + }, + "node_modules/@pixi/sprite-animated": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-7.4.2.tgz", + "integrity": "sha512-QPT6yxCUGOBN+98H3pyIZ1ZO6Y7BN1o0Q2IMZEsD1rNfZJrTYS3Q8VlCG5t2YlFlcB8j5iBo24bZb6FUxLOmsQ==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/sprite": "7.4.2" + } + }, + "node_modules/@pixi/sprite-tiling": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-7.4.2.tgz", + "integrity": "sha512-Z8PP6ewy3nuDYL+NeEdltHAhuucVgia33uzAitvH3OqqRSx6a6YRBFbNLUM9Sx+fBO2Lk3PpV1g6QZX+NE5LOg==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/sprite": "7.4.2" + } + }, + "node_modules/@pixi/spritesheet": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-7.4.2.tgz", + "integrity": "sha512-YIvHdpXW+AYp8vD0NkjJmrdnVHTZKidCnx6k8ATSuuvCT6O5Tuh2N/Ul2oDj4/QaePy0lVhyhAbZpJW00Jr7mQ==", + "peerDependencies": { + "@pixi/assets": "7.4.2", + "@pixi/core": "7.4.2" + } + }, + "node_modules/@pixi/text": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/text/-/text-7.4.2.tgz", + "integrity": "sha512-rZZWpJNsIQ8WoCWrcVg8Gi6L/PDakB941clo6dO3XjoII2ucoOUcnpe5HIkudxi2xPvS/8Bfq990gFEx50TP5A==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/sprite": "7.4.2" + } + }, + "node_modules/@pixi/text-bitmap": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-7.4.2.tgz", + "integrity": "sha512-lPBMJ83JnpFVL+6ckQ8KO8QmwdPm0z9Zs/M0NgFKH2F+BcjelRNnk80NI3O0qBDYSEDQIE+cFbKoZ213kf7zwA==", + "peerDependencies": { + "@pixi/assets": "7.4.2", + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/mesh": "7.4.2", + "@pixi/text": "7.4.2" + } + }, + "node_modules/@pixi/text-html": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/text-html/-/text-html-7.4.2.tgz", + "integrity": "sha512-duOu8oDYeDNuyPozj2DAsQ5VZBbRiwIXy78Gn7H2pCiEAefw/Uv5jJYwdgneKME0e1tOxz1eOUGKPcI6IJnZjw==", + "peerDependencies": { + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/sprite": "7.4.2", + "@pixi/text": "7.4.2" + } + }, + "node_modules/@pixi/ticker": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-7.4.2.tgz", + "integrity": "sha512-cAvxCh/KI6IW4m3tp2b+GQIf+DoSj9NNmPJmsOeEJ7LzvruG8Ps7SKI6CdjQob5WbceL1apBTDbqZ/f77hFDiQ==", + "dependencies": { + "@pixi/extensions": "7.4.2", + "@pixi/settings": "7.4.2", + "@pixi/utils": "7.4.2" + } + }, + "node_modules/@pixi/utils": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-7.4.2.tgz", + "integrity": "sha512-aU/itcyMC4TxFbmdngmak6ey4kC5c16Y5ntIYob9QnjNAfD/7GTsYIBnP6FqEAyO1eq0MjkAALxdONuay1BG3g==", + "dependencies": { + "@pixi/color": "7.4.2", + "@pixi/constants": "7.4.2", + "@pixi/settings": "7.4.2", + "@types/earcut": "^2.1.0", + "earcut": "^2.2.4", + "eventemitter3": "^4.0.0", + "url": "^0.11.0" + } + }, "node_modules/@pmmmwh/react-refresh-webpack-plugin": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.7.tgz", @@ -3706,6 +4060,16 @@ "@types/node": "*" } }, + "node_modules/@types/css-font-loading-module": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@types/css-font-loading-module/-/css-font-loading-module-0.0.12.tgz", + "integrity": "sha512-x2tZZYkSxXqWvTDgveSynfjq/T2HyiZHXb00j/+gy19yp70PHCizM48XFdjBCWH7eHBD0R5i/pw9yMBP/BH5uA==" + }, + "node_modules/@types/earcut": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.4.tgz", + "integrity": "sha512-qp3m9PPz4gULB9MhjGID7wpo3gJ4bTGXm7ltNDsmOvsPduTeHp8wSW9YckBj3mljeOh4F0m2z/0JKAALRKbmLQ==" + }, "node_modules/@types/eslint": { "version": "8.4.6", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.6.tgz", @@ -6702,6 +7066,11 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, + "node_modules/earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -9565,6 +9934,11 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "node_modules/ismobilejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", + "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==" + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -11747,6 +12121,18 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonpath-plus": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-8.1.0.tgz", + "integrity": "sha512-qVTiuKztFGw0dGhYi3WNqvddx3/SHtyDT0xJaeyz4uP0d1tkpG+0y5uYQ4OcIo1TLAz3PE/qDOW9F0uDt3+CTw==", + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/jsonpointer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", @@ -12874,6 +13260,47 @@ "node": ">= 6" } }, + "node_modules/pixi.js": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-7.4.2.tgz", + "integrity": "sha512-TifqgHGNofO7UCEbdZJOpUu7dUnpu4YZ0o76kfCqxDa4RS8ITc9zjECCbtalmuNXkVhSEZmBKQvE7qhHMqw/xg==", + "dependencies": { + "@pixi/accessibility": "7.4.2", + "@pixi/app": "7.4.2", + "@pixi/assets": "7.4.2", + "@pixi/compressed-textures": "7.4.2", + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/events": "7.4.2", + "@pixi/extensions": "7.4.2", + "@pixi/extract": "7.4.2", + "@pixi/filter-alpha": "7.4.2", + "@pixi/filter-blur": "7.4.2", + "@pixi/filter-color-matrix": "7.4.2", + "@pixi/filter-displacement": "7.4.2", + "@pixi/filter-fxaa": "7.4.2", + "@pixi/filter-noise": "7.4.2", + "@pixi/graphics": "7.4.2", + "@pixi/mesh": "7.4.2", + "@pixi/mesh-extras": "7.4.2", + "@pixi/mixin-cache-as-bitmap": "7.4.2", + "@pixi/mixin-get-child-by-name": "7.4.2", + "@pixi/mixin-get-global-position": "7.4.2", + "@pixi/particle-container": "7.4.2", + "@pixi/prepare": "7.4.2", + "@pixi/sprite": "7.4.2", + "@pixi/sprite-animated": "7.4.2", + "@pixi/sprite-tiling": "7.4.2", + "@pixi/spritesheet": "7.4.2", + "@pixi/text": "7.4.2", + "@pixi/text-bitmap": "7.4.2", + "@pixi/text-html": "7.4.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/pixijs" + } + }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -14462,7 +14889,6 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, "engines": { "node": ">=0.4.x" } @@ -16697,7 +17123,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", - "dev": true, "dependencies": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -16715,8 +17140,7 @@ "node_modules/url/node_modules/punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" }, "node_modules/util": { "version": "0.12.5", @@ -19030,6 +19454,11 @@ "integrity": "sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==", "requires": {} }, + "@ctrl/tinycolor": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.0.3.tgz", + "integrity": "sha512-e9nEVehVJwkymQpkGhdSNzLT2Lr9UTTby+JePq4Z2SxBbOQjY7pLgSouAaXvfaGQVSAaY0U4eJdwfSDmCbItcw==" + }, "@emotion/is-prop-valid": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", @@ -19854,6 +20283,258 @@ "fastq": "^1.6.0" } }, + "@pixi/accessibility": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-7.4.2.tgz", + "integrity": "sha512-R6VEolm8uyy1FB1F2qaLKxVbzXAFTZCF2ka8fl9lsz7We6ZfO4QpXv9ur7DvzratjCQUQVCKo0/V7xL5q1EV/g==", + "requires": {} + }, + "@pixi/app": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/app/-/app-7.4.2.tgz", + "integrity": "sha512-ugkH3kOgjT8P1mTMY29yCOgEh+KuVMAn8uBxeY0aMqaUgIMysfpnFv+Aepp2CtvI9ygr22NC+OiKl+u+eEaQHw==", + "requires": {} + }, + "@pixi/assets": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/assets/-/assets-7.4.2.tgz", + "integrity": "sha512-anxho59H9egZwoaEdM5aLvYyxoz6NCy3CaQIvNHD1bbGg8L16Ih0e26QSBR5fu53jl8OjT6M7s+p6n7uu4+fGA==", + "requires": { + "@types/css-font-loading-module": "^0.0.12" + } + }, + "@pixi/color": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/color/-/color-7.4.2.tgz", + "integrity": "sha512-av1LOvhHsiaW8+T4n/FgnOKHby55/w7VcA1HzPIHRBtEcsmxvSCDanT1HU2LslNhrxLPzyVx18nlmalOyt5OBg==", + "requires": { + "@pixi/colord": "^2.9.6" + } + }, + "@pixi/colord": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@pixi/colord/-/colord-2.9.6.tgz", + "integrity": "sha512-nezytU2pw587fQstUu1AsJZDVEynjskwOL+kibwcdxsMBFqPsFFNA7xl0ii/gXuDi6M0xj3mfRJj8pBSc2jCfA==" + }, + "@pixi/compressed-textures": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-7.4.2.tgz", + "integrity": "sha512-VJrt7el6O4ZJSWkeOGXwrhJaiLg1UBhHB3fj42VR4YloYkAxpfd9K6s6IcbcVz7n9L48APKBMgHyaB2pX2Ck/A==", + "requires": {} + }, + "@pixi/constants": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-7.4.2.tgz", + "integrity": "sha512-N9vn6Wpz5WIQg7ugUg2+SdqD2u2+NM0QthE8YzLJ4tLH2Iz+/TrnPKUJzeyIqbg3sxJG5ZpGGPiacqIBpy1KyA==" + }, + "@pixi/core": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/core/-/core-7.4.2.tgz", + "integrity": "sha512-UbMtgSEnyCOFPzbE6ThB9qopXxbZ5GCof2ArB4FXOC5Xi/83MOIIYg5kf5M8689C5HJMhg2SrJu3xLKppF+CMg==", + "requires": { + "@pixi/color": "7.4.2", + "@pixi/constants": "7.4.2", + "@pixi/extensions": "7.4.2", + "@pixi/math": "7.4.2", + "@pixi/runner": "7.4.2", + "@pixi/settings": "7.4.2", + "@pixi/ticker": "7.4.2", + "@pixi/utils": "7.4.2" + } + }, + "@pixi/display": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/display/-/display-7.4.2.tgz", + "integrity": "sha512-DaD0J7gIlNlzO0Fdlby/0OH+tB5LtCY6rgFeCBKVDnzmn8wKW3zYZRenWBSFJ0Psx6vLqXYkSIM/rcokaKviIw==", + "requires": {} + }, + "@pixi/events": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/events/-/events-7.4.2.tgz", + "integrity": "sha512-Jw/w57heZjzZShIXL0bxOvKB+XgGIevyezhGtfF2ZSzQoSBWo+Fj1uE0QwKd0RIaXegZw/DhSmiMJSbNmcjifA==", + "requires": {} + }, + "@pixi/extensions": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/extensions/-/extensions-7.4.2.tgz", + "integrity": "sha512-Hmx2+O0yZ8XIvgomHM9GZEGcy9S9Dd8flmtOK5Aa3fXs/8v7xD08+ANQpN9ZqWU2Xs+C6UBlpqlt2BWALvKKKA==" + }, + "@pixi/extract": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-7.4.2.tgz", + "integrity": "sha512-JOX27TRWjVEjauGBbF8PU7/g6LYXnivehdgqS5QlVDv1CNHTOrz/j3MdKcVWOhyZPbH5c9sh7lxyRxvd9AIuTQ==", + "requires": {} + }, + "@pixi/filter-alpha": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-7.4.2.tgz", + "integrity": "sha512-9OsKJ+yvY2wIcQXwswj5HQBiwNGymwmqdxfp7mo+nZSBoDmxUqvMZzE9UNJ3eUlswuNvNRO8zNOsQvwdz7WFww==", + "requires": {} + }, + "@pixi/filter-blur": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-7.4.2.tgz", + "integrity": "sha512-gOXBbIUx6CRZP1fmsis2wLzzSsofrqmIHhbf1gIkZMIQaLsc9T7brj+PaLTTiOiyJgnvGN5j20RZnkERWWKV0Q==", + "requires": {} + }, + "@pixi/filter-color-matrix": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-7.4.2.tgz", + "integrity": "sha512-ykZiR59Gvj80UKs9qm7jeUTKvn+wWk6HBVJOmJbK9jFK5juakDWp7BbH26U78Q61EWj97kI1FdfcbMkuQ7rqkA==", + "requires": {} + }, + "@pixi/filter-displacement": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-7.4.2.tgz", + "integrity": "sha512-QS/eWp/ivsxef3xapNeGwpPX7vrqQQeo99Fux4k5zsvplnNEsf91t6QYJLG776AbZEu/qh8VYRBA5raIVY/REw==", + "requires": {} + }, + "@pixi/filter-fxaa": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-7.4.2.tgz", + "integrity": "sha512-U/ptJgDsfs/r8y2a6gCaiPfDu2IFAxpQ4wtfmBpz6vRhqeE4kI8yNIUx5dZbui57zlsJaW0BNacOQxHU0vLkyQ==", + "requires": {} + }, + "@pixi/filter-noise": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-7.4.2.tgz", + "integrity": "sha512-Vy9ViBFhZEGh6xKkd3kFWErolZTwv1Y5Qb1bV7qPIYbvBECYsqzlR4uCrrjBV6KKm0PufpG/+NKC5vICZaqKzg==", + "requires": {} + }, + "@pixi/graphics": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-7.4.2.tgz", + "integrity": "sha512-jH4/Tum2RqWzHGzvlwEr7HIVduoLO57Ze705N2zQPkUD57TInn5911aGUeoua7f/wK8cTLGzgB9BzSo2kTdcHw==", + "requires": {} + }, + "@pixi/math": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/math/-/math-7.4.2.tgz", + "integrity": "sha512-7jHmCQoYk6e0rfSKjdNFOPl0wCcdgoraxgteXJTTHv3r0bMNx2pHD9FJ0VvocEUG7XHfj55O3+u7yItOAx0JaQ==" + }, + "@pixi/mesh": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mesh/-/mesh-7.4.2.tgz", + "integrity": "sha512-mEkKyQvvMrYXC3pahvH5WBIKtrtB63WixRr91ANFI7zXD+ESG6Ap6XtxMCJmXDQPwBDNk7SWVMiCflYuchG7kA==", + "requires": {} + }, + "@pixi/mesh-extras": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mesh-extras/-/mesh-extras-7.4.2.tgz", + "integrity": "sha512-vNR/7wjxjs7sv9fGoKkHyU91ZAD+7EnMHBS5F3CVISlOIFxLi96NNZCB81oUIdky/90pHw40johd/4izR5zTyw==", + "requires": {} + }, + "@pixi/mixin-cache-as-bitmap": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-7.4.2.tgz", + "integrity": "sha512-6dgthi2ruUT/lervSrFDQ7vXkEsHo6CxdgV7W/wNdW1dqgQlKfDvO6FhjXzyIMRLSooUf5FoeluVtfsjkUIYrw==", + "requires": {} + }, + "@pixi/mixin-get-child-by-name": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-7.4.2.tgz", + "integrity": "sha512-0Cfw8JpQhsixprxiYph4Lj+B5n83Kk4ftNMXgM5xtZz+tVLz5s91qR0MqcdzwTGTJ7utVygiGmS4/3EfR/duRQ==", + "requires": {} + }, + "@pixi/mixin-get-global-position": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-7.4.2.tgz", + "integrity": "sha512-LcsahbVdX4DFS2IcGfNp4KaXuu7SjAwUp/flZSGIfstyKOKb5FWFgihtqcc9ZT4coyri3gs2JbILZub/zPZj1w==", + "requires": {} + }, + "@pixi/particle-container": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/particle-container/-/particle-container-7.4.2.tgz", + "integrity": "sha512-B78Qq86kt0lEa5WtB2YFIm3+PjhKfw9La9R++GBSgABl+g13s2UaZ6BIPxvY3JxWMdxPm4iPrQPFX1QWRN68mw==", + "requires": {} + }, + "@pixi/prepare": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/prepare/-/prepare-7.4.2.tgz", + "integrity": "sha512-PugyMzReCHXUzc3so9PPJj2OdHwibpUNWyqG4mWY2UUkb6c8NAGK1AnAPiscOvLilJcv/XQSFoNhX+N1jrvJEg==", + "requires": {} + }, + "@pixi/runner": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-7.4.2.tgz", + "integrity": "sha512-LPBpwym4vdyyDY5ucF4INQccaGyxztERyLTY1YN6aqJyyMmnc7iqXlIKt+a0euMBtNoLoxy6MWMvIuZj0JfFPA==" + }, + "@pixi/settings": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-7.4.2.tgz", + "integrity": "sha512-pMN+L6aWgvUbwhFIL/BTHKe2ShYGPZ8h9wlVBnFHMtUcJcFLMF1B3lzuvCayZRepOphs6RY0TqvnDvVb585JhQ==", + "requires": { + "@pixi/constants": "7.4.2", + "@types/css-font-loading-module": "^0.0.12", + "ismobilejs": "^1.1.0" + } + }, + "@pixi/sprite": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-7.4.2.tgz", + "integrity": "sha512-Ccf/OVQsB+HQV0Fyf5lwD+jk1jeU7uSIqEjbxenNNssmEdB7S5qlkTBV2EJTHT83+T6Z9OMOHsreJZerydpjeg==", + "requires": {} + }, + "@pixi/sprite-animated": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite-animated/-/sprite-animated-7.4.2.tgz", + "integrity": "sha512-QPT6yxCUGOBN+98H3pyIZ1ZO6Y7BN1o0Q2IMZEsD1rNfZJrTYS3Q8VlCG5t2YlFlcB8j5iBo24bZb6FUxLOmsQ==", + "requires": {} + }, + "@pixi/sprite-tiling": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-7.4.2.tgz", + "integrity": "sha512-Z8PP6ewy3nuDYL+NeEdltHAhuucVgia33uzAitvH3OqqRSx6a6YRBFbNLUM9Sx+fBO2Lk3PpV1g6QZX+NE5LOg==", + "requires": {} + }, + "@pixi/spritesheet": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-7.4.2.tgz", + "integrity": "sha512-YIvHdpXW+AYp8vD0NkjJmrdnVHTZKidCnx6k8ATSuuvCT6O5Tuh2N/Ul2oDj4/QaePy0lVhyhAbZpJW00Jr7mQ==", + "requires": {} + }, + "@pixi/text": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/text/-/text-7.4.2.tgz", + "integrity": "sha512-rZZWpJNsIQ8WoCWrcVg8Gi6L/PDakB941clo6dO3XjoII2ucoOUcnpe5HIkudxi2xPvS/8Bfq990gFEx50TP5A==", + "requires": {} + }, + "@pixi/text-bitmap": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/text-bitmap/-/text-bitmap-7.4.2.tgz", + "integrity": "sha512-lPBMJ83JnpFVL+6ckQ8KO8QmwdPm0z9Zs/M0NgFKH2F+BcjelRNnk80NI3O0qBDYSEDQIE+cFbKoZ213kf7zwA==", + "requires": {} + }, + "@pixi/text-html": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/text-html/-/text-html-7.4.2.tgz", + "integrity": "sha512-duOu8oDYeDNuyPozj2DAsQ5VZBbRiwIXy78Gn7H2pCiEAefw/Uv5jJYwdgneKME0e1tOxz1eOUGKPcI6IJnZjw==", + "requires": {} + }, + "@pixi/ticker": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-7.4.2.tgz", + "integrity": "sha512-cAvxCh/KI6IW4m3tp2b+GQIf+DoSj9NNmPJmsOeEJ7LzvruG8Ps7SKI6CdjQob5WbceL1apBTDbqZ/f77hFDiQ==", + "requires": { + "@pixi/extensions": "7.4.2", + "@pixi/settings": "7.4.2", + "@pixi/utils": "7.4.2" + } + }, + "@pixi/utils": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-7.4.2.tgz", + "integrity": "sha512-aU/itcyMC4TxFbmdngmak6ey4kC5c16Y5ntIYob9QnjNAfD/7GTsYIBnP6FqEAyO1eq0MjkAALxdONuay1BG3g==", + "requires": { + "@pixi/color": "7.4.2", + "@pixi/constants": "7.4.2", + "@pixi/settings": "7.4.2", + "@types/earcut": "^2.1.0", + "earcut": "^2.2.4", + "eventemitter3": "^4.0.0", + "url": "^0.11.0" + } + }, "@pmmmwh/react-refresh-webpack-plugin": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.7.tgz", @@ -20150,6 +20831,16 @@ "@types/node": "*" } }, + "@types/css-font-loading-module": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@types/css-font-loading-module/-/css-font-loading-module-0.0.12.tgz", + "integrity": "sha512-x2tZZYkSxXqWvTDgveSynfjq/T2HyiZHXb00j/+gy19yp70PHCizM48XFdjBCWH7eHBD0R5i/pw9yMBP/BH5uA==" + }, + "@types/earcut": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.4.tgz", + "integrity": "sha512-qp3m9PPz4gULB9MhjGID7wpo3gJ4bTGXm7ltNDsmOvsPduTeHp8wSW9YckBj3mljeOh4F0m2z/0JKAALRKbmLQ==" + }, "@types/eslint": { "version": "8.4.6", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.6.tgz", @@ -22432,6 +23123,11 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, + "earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -24480,6 +25176,11 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "ismobilejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", + "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==" + }, "istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -26079,6 +26780,11 @@ "universalify": "^2.0.0" } }, + "jsonpath-plus": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-8.1.0.tgz", + "integrity": "sha512-qVTiuKztFGw0dGhYi3WNqvddx3/SHtyDT0xJaeyz4uP0d1tkpG+0y5uYQ4OcIo1TLAz3PE/qDOW9F0uDt3+CTw==" + }, "jsonpointer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", @@ -26927,6 +27633,43 @@ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" }, + "pixi.js": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-7.4.2.tgz", + "integrity": "sha512-TifqgHGNofO7UCEbdZJOpUu7dUnpu4YZ0o76kfCqxDa4RS8ITc9zjECCbtalmuNXkVhSEZmBKQvE7qhHMqw/xg==", + "requires": { + "@pixi/accessibility": "7.4.2", + "@pixi/app": "7.4.2", + "@pixi/assets": "7.4.2", + "@pixi/compressed-textures": "7.4.2", + "@pixi/core": "7.4.2", + "@pixi/display": "7.4.2", + "@pixi/events": "7.4.2", + "@pixi/extensions": "7.4.2", + "@pixi/extract": "7.4.2", + "@pixi/filter-alpha": "7.4.2", + "@pixi/filter-blur": "7.4.2", + "@pixi/filter-color-matrix": "7.4.2", + "@pixi/filter-displacement": "7.4.2", + "@pixi/filter-fxaa": "7.4.2", + "@pixi/filter-noise": "7.4.2", + "@pixi/graphics": "7.4.2", + "@pixi/mesh": "7.4.2", + "@pixi/mesh-extras": "7.4.2", + "@pixi/mixin-cache-as-bitmap": "7.4.2", + "@pixi/mixin-get-child-by-name": "7.4.2", + "@pixi/mixin-get-global-position": "7.4.2", + "@pixi/particle-container": "7.4.2", + "@pixi/prepare": "7.4.2", + "@pixi/sprite": "7.4.2", + "@pixi/sprite-animated": "7.4.2", + "@pixi/sprite-tiling": "7.4.2", + "@pixi/spritesheet": "7.4.2", + "@pixi/text": "7.4.2", + "@pixi/text-bitmap": "7.4.2", + "@pixi/text-html": "7.4.2" + } + }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -27896,8 +28639,7 @@ "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "dev": true + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" }, "querystring-es3": { "version": "0.2.1", @@ -29556,7 +30298,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", - "dev": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -29565,8 +30306,7 @@ "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" } } }, diff --git a/multiplayer/package.json b/multiplayer/package.json index 6337f65dc108..477f5f23b19e 100644 --- a/multiplayer/package.json +++ b/multiplayer/package.json @@ -3,13 +3,16 @@ "version": "0.1.0", "private": true, "dependencies": { + "@ctrl/tinycolor": "^4.0.3", "@fortawesome/free-regular-svg-icons": "^6.2.0", "@fortawesome/free-solid-svg-icons": "^6.2.0", "@fortawesome/react-fontawesome": "^0.2.0", "@types/node": "^12.20.45", "engine.io-client": "^6.2.2", "framer-motion": "^6.5.1", + "jsonpath-plus": "^8.1.0", "nanoid": "^4.0.0", + "pixi.js": "^7.4.2", "qrcode.react": "^3.1.0", "react-scripts": "^5.0.1", "smart-buffer": "^4.2.0", diff --git a/multiplayer/src/components/AppModal.tsx b/multiplayer/src/components/AppModal.tsx index 79c475c66c15..6576e1229de3 100644 --- a/multiplayer/src/components/AppModal.tsx +++ b/multiplayer/src/components/AppModal.tsx @@ -1,12 +1,7 @@ import { useContext, useState } from "react"; import { Textarea } from "react-common/components/controls/Textarea"; import { SignInModal } from "react-common/components/profile/SignInModal"; -import { - signInAsync, - kickPlayer, - leaveGameAsync, - sendAbuseReportAsync, -} from "../epics"; +import { signInAsync, kickPlayer, leaveGameAsync, sendAbuseReportAsync } from "../epics"; import { clearModal } from "../state/actions"; import { AppStateContext, dispatch } from "../state/AppStateContext"; import ConfirmModal from "./modals/ConfirmModal"; @@ -24,10 +19,8 @@ export default function Render() { onClose={() => dispatch(clearModal())} onSignIn={async (provider, rememberMe) => { const params: pxt.Map = {}; - if (deepLinks?.shareCode) - params["host"] = deepLinks.shareCode; - if (deepLinks?.joinCode) - params["join"] = deepLinks.joinCode; + if (deepLinks?.shareCode) params["host"] = deepLinks.shareCode; + if (deepLinks?.joinCode) params["join"] = deepLinks.joinCode; await signInAsync(provider.id, rememberMe, { params }); }} dialogMessages={state.modalOpts.dialogMessages} @@ -63,9 +56,7 @@ export default function Render() { }} onCancel={() => dispatch(clearModal())} > -
- {lf("Kick this player? They will be blocked from rejoining the game.")} -
+
{lf("Kick this player? They will be blocked from rejoining the game.")}
); case "leave-game": @@ -79,9 +70,7 @@ export default function Render() { }} onCancel={() => dispatch(clearModal())} > -
- {lf("End the game? All players will be disconnected.")} -
+
{lf("End the game? All players will be disconnected.")}
); } else { diff --git a/multiplayer/src/components/ArcadeSimulator.tsx b/multiplayer/src/components/ArcadeSimulator.tsx index 73f595bfad2f..266dab551d96 100644 --- a/multiplayer/src/components/ArcadeSimulator.tsx +++ b/multiplayer/src/components/ArcadeSimulator.tsx @@ -4,13 +4,7 @@ import { SimMultiplayer } from "../types"; import * as gameClient from "../services/gameClient"; // eslint-disable-next-line import/no-unassigned-import import "./ArcadeSimulator.css"; -import { - simDriver, - preloadSim, - simulateAsync, - buildSimJsInfo, - RunOptions, -} from "../services/simHost"; +import { simDriver, preloadSim, simulateAsync, buildSimJsInfo, RunOptions } from "../services/simHost"; import { state as currentState } from "../state"; let builtSimJsInfo: Promise | undefined; @@ -75,8 +69,7 @@ export default function Render() { // Once the simulator is ready, if this player is a guest, pass initial screen to simulator const { state: simState } = data; if (simState === "running" && clientRole === "guest") { - const { image, palette } = - gameClient.getCurrentScreen(); + const { image, palette } = gameClient.getCurrentScreen(); if (image) { simDriver()?.postMessage({ type: "multiplayer", diff --git a/multiplayer/src/components/CollabPage.tsx b/multiplayer/src/components/CollabPage.tsx new file mode 100644 index 000000000000..5c1b639527bd --- /dev/null +++ b/multiplayer/src/components/CollabPage.tsx @@ -0,0 +1,339 @@ +import { useContext, useEffect, useRef, useState } from "react"; +import { AppStateContext } from "../state/AppStateContext"; +import { Button } from "../../../react-common/components/controls/Button"; +import { leaveCollabAsync } from "../epics/leaveCollabAsync"; +import { BRUSH_COLORS, BRUSH_SIZES, BrushSize, Vec2Like } from "../types"; +import { getCollabCanvas } from "../services/collabCanvas"; +import * as collabClient from "../services/collabClient"; +import * as CollabEpics from "../epics/collab"; +import { dist, distSq, jsonReplacer, throttle } from "../util"; +import { BRUSH_PROPS, PLAYER_SPRITE_DATAURLS } from "../constants"; +import { nanoid } from "nanoid"; + +export interface CollabPageProps {} + +const setPlayerValueThrottled = throttle(collabClient.setPlayerValue, 100); + +export default function Render(props: CollabPageProps) { + const { state } = useContext(AppStateContext); + const { netMode, clientRole, collabInfo } = state; + + const [canvasContainer, setCanvasContainer] = useState(null); + const [selectedColorIndex, setSelectedColorIndex] = useState(0); + const [selectedSizeIndex, setSelectedSizeIndex] = useState(0); + const [selectedIconIndex, setSelectedIconIndex] = useState(0); + const [mouseDown, setMouseDown] = useState(false); + const [lastPosition, setLastPosition] = useState({ x: 0, y: 0 }); + const [brushAlpha, setBrushAlpha] = useState(0.25); + const [alphaSliderRef, setAlphaSliderRef] = useState(null); + const undoStack = useRef(new Array>()); + + useEffect(() => { + const collabCanvas = getCollabCanvas(); + collabCanvas.reset(); + collabCanvas.addPlayerSprite(collabClient.getClientId()!, 0, 0, 0); + }, []); + + const undo = () => { + const undoSet = undoStack.current.pop(); + if (undoSet) { + undoSet.forEach(spriteId => { + getCollabCanvas().removePaintSprite(spriteId); + collabClient.delSessionValue("s:" + spriteId); + }); + } + }; + + useEffect(() => { + const handleKeydown = (e: KeyboardEvent) => { + // handle ctrl-z + if (e.key === "z" && e.ctrlKey) { + undo(); + } + }; + window.addEventListener("keydown", handleKeydown); + return () => { + window.removeEventListener("keydown", handleKeydown); + }; + }, []); + + useEffect(() => { + const handleMouseDown = (e: MouseEvent) => { + if (!canvasContainer) return; + let canvasMouseX = e.clientX; + let canvasMouseY = e.clientY; + canvasMouseX -= canvasContainer.offsetLeft; + canvasMouseY -= canvasContainer.offsetTop; + canvasMouseX += canvasContainer.scrollLeft; + canvasMouseY += canvasContainer.scrollTop; + if (canvasMouseX < canvasContainer.scrollLeft) return; + if (canvasMouseY < canvasContainer.scrollTop) return; + if (canvasMouseX >= canvasContainer.scrollLeft + canvasContainer.clientWidth) return; + if (canvasMouseY >= canvasContainer.scrollTop + canvasContainer.clientHeight) return; + setMouseDown(true); + setLastPosition({ x: canvasMouseX, y: canvasMouseY }); + const spriteId = nanoid(); + const undoSet = new Set(); + undoSet.add(spriteId); + undoStack.current.push(undoSet); + getCollabCanvas().addPaintSprite( + spriteId, + canvasMouseX, + canvasMouseY, + selectedSizeIndex, + selectedColorIndex, + brushAlpha + ); + collabClient.setSessionValue( + "s:" + spriteId, + JSON.stringify({ + x: canvasMouseX, + y: canvasMouseY, + s: selectedSizeIndex, + c: selectedColorIndex, + a: brushAlpha, + }) + ); + }; + const handleMouseUp = (e: MouseEvent) => { + setMouseDown(false); + }; + const handleMouseMove = (e: MouseEvent) => { + if (!canvasContainer) return; + // Send position of mouse on canvas + let canvasMouseX = e.clientX; + let canvasMouseY = e.clientY; + canvasMouseX -= canvasContainer.offsetLeft; + canvasMouseY -= canvasContainer.offsetTop; + canvasMouseX += canvasContainer.scrollLeft; + canvasMouseY += canvasContainer.scrollTop; + + // TODO: support canvas pan and zoom + + // Update local sprite position on canvas + getCollabCanvas().updatePlayerSpritePosition(collabClient.getClientId()!, canvasMouseX, canvasMouseY); + const newPos = { x: canvasMouseX, y: canvasMouseY }; + const newPosStr = JSON.stringify(newPos); + // Send position to server + setPlayerValueThrottled("position", newPosStr); + + if (!mouseDown) return; + const undoSet = undoStack.current[undoStack.current.length - 1]; + const brushSize = BRUSH_PROPS[selectedSizeIndex].size; + const brushStep = brushSize / 5; + const posDist = dist(lastPosition, newPos); + if (posDist > brushStep) { + const numSteps = Math.ceil(posDist / brushStep); + const stepX = (newPos.x - lastPosition.x) / numSteps; + const stepY = (newPos.y - lastPosition.y) / numSteps; + for (let i = 0; i < numSteps; i++) { + const spriteId = nanoid(); + undoSet.add(spriteId); + const x = lastPosition.x + stepX * i; + const y = lastPosition.y + stepY * i; + getCollabCanvas().addPaintSprite(spriteId, x, y, selectedSizeIndex, selectedColorIndex, brushAlpha); + collabClient.setSessionValue( + "s:" + spriteId, + JSON.stringify({ + x, + y, + s: selectedSizeIndex, + c: selectedColorIndex, + a: brushAlpha, + }) + ); + } + setLastPosition(newPos); + } + }; + window.addEventListener("mousedown", handleMouseDown); + window.addEventListener("mouseup", handleMouseUp); + window.addEventListener("mousemove", handleMouseMove); + return () => { + window.removeEventListener("mousedown", handleMouseDown); + window.removeEventListener("mouseup", handleMouseUp); + window.removeEventListener("mousemove", handleMouseMove); + }; + }, [mouseDown, canvasContainer, lastPosition, selectedColorIndex, selectedSizeIndex, brushAlpha]); + + useEffect(() => { + if (canvasContainer && !canvasContainer.firstChild) { + const canvas = getCollabCanvas().view; + canvasContainer.append(canvas as any); + } + return () => { + if (canvasContainer) { + const canvas = getCollabCanvas().view; + canvasContainer.removeChild(canvas as any); + } + }; + }, [canvasContainer]); + + useEffect(() => { + let mouseIsDown = false; + if (!alphaSliderRef) return; + const handleMouseMove = (e: MouseEvent) => { + if (!mouseIsDown) return; + if (!alphaSliderRef) return; + let alphaMouseY = e.clientY; + alphaMouseY -= alphaSliderRef.offsetTop; + alphaMouseY += alphaSliderRef.scrollTop; + if (alphaMouseY < alphaSliderRef.scrollTop) return; + if (alphaMouseY >= alphaSliderRef.scrollTop + alphaSliderRef.clientHeight) return; + setBrushAlpha(alphaMouseY / alphaSliderRef.clientHeight); + }; + const handleMouseDown = (e: MouseEvent) => { + mouseIsDown = true; + handleMouseMove(e); + }; + const handleMouseUp = (e: MouseEvent) => { + mouseIsDown = false; + }; + alphaSliderRef.addEventListener("mousedown", handleMouseDown); + alphaSliderRef.addEventListener("mousemove", handleMouseMove); + alphaSliderRef.addEventListener("mouseup", handleMouseUp); + return () => { + alphaSliderRef?.removeEventListener("mousedown", handleMouseDown); + alphaSliderRef?.removeEventListener("mousemove", handleMouseMove); + alphaSliderRef?.removeEventListener("mouseup", handleMouseUp); + }; + }, [alphaSliderRef]); + + if (!collabInfo) return null; + if (netMode !== "connected") return null; + + const leaveClick = () => { + leaveCollabAsync("left"); + }; + + const brushColorClicked = (color: string, index: number) => { + setSelectedColorIndex(index); + }; + + const brushSizeClicked = (bs: BrushSize, index: number) => { + setSelectedSizeIndex(index); + }; + + const iconClicked = (index: number) => { + setSelectedIconIndex(index); + getCollabCanvas().updatePlayerSpriteImage(collabClient.getClientId()!, index); + collabClient.setPlayerValue("imgId", JSON.stringify(index)); + }; + + const handleCanvasContainerRef = (ref: HTMLDivElement) => { + setCanvasContainer(ref); + }; + + const handleAlphaSliderRef = (ref: HTMLDivElement) => { + setAlphaSliderRef(ref); + }; + + const handleUndoClick = () => { + undo(); + }; + + const SpriteRow: React.FC = ({ children }) =>
{children}
; + + const SpriteImg: React.FC<{ imgId: number }> = ({ imgId }) => ( +
iconClicked(imgId)} + className="tw-w-8 tw-h-8 tw-rounded-md tw-cursor-pointer tw-border-slate-800 tw-border tw-bg-slate-100" + style={{ + backgroundImage: `url(${PLAYER_SPRITE_DATAURLS[imgId]})`, + backgroundRepeat: "no-repeat", + backgroundPosition: "center", + padding: "1.1rem", + outline: imgId === selectedIconIndex ? "3px solid " + SELECTED_COLOR : undefined, + outlineOffset: "1px", + imageRendering: "pixelated", + }} + >
+ ); + + const SELECTED_COLOR = "#1e293b"; + + return ( +
+
+
+
+ {BRUSH_COLORS.map((bc, i) => ( +
brushColorClicked(bc, i)} + >
+ ))} +
+
+
+ {BRUSH_SIZES.map((bs, i) => ( +
brushSizeClicked(bs, i)} + >
+ ))} +
+
+
+
+
+
+ {[0, 2, 4].map(imgId => ( + + + + + ))} +
+
+ +
+
+
+
+
+ {collabInfo.joinCode} +
+
+
+
+
+ ); +} diff --git a/multiplayer/src/components/CopyButton.tsx b/multiplayer/src/components/CopyButton.tsx index cb8bbc3c31a6..20812b570627 100644 --- a/multiplayer/src/components/CopyButton.tsx +++ b/multiplayer/src/components/CopyButton.tsx @@ -46,28 +46,15 @@ export default function Render(props: { }, [copySuccessful]); return ( - ); } diff --git a/multiplayer/src/components/EditGameButton.tsx b/multiplayer/src/components/EditGameButton.tsx index 81a297767dde..3ad34679e9b8 100644 --- a/multiplayer/src/components/EditGameButton.tsx +++ b/multiplayer/src/components/EditGameButton.tsx @@ -6,9 +6,7 @@ export default function Render() { const { state } = useContext(AppStateContext); const gameId = state.gameState?.gameId; - const remixUrl = gameId - ? `${pxt.webConfig.relprefix.replace(/-+$/, "")}#pub:${gameId}` - : undefined; + const remixUrl = gameId ? `${pxt.webConfig.relprefix.replace(/-+$/, "")}#pub:${gameId}` : undefined; function handleEditGameClick() { if (remixUrl) { @@ -21,11 +19,7 @@ export default function Render() {