From c234bed61d3b3faa35c1bb820b96f7ec379f12fc Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Thu, 14 Nov 2024 16:38:40 +0000 Subject: [PATCH] Update Examples Browser NPM dependencies (#7113) * Update Examples Browser NPM dependencies * Fix a couple of eslint warnings * Fix another eslint error * Fix another eslint error * Remove newline@ * Fix another eslint error * Reverted tokenizer and language regex eslint fixes --------- Co-authored-by: kpal --- examples/assets/scripts/misc/camera-frame.mjs | 2 - examples/eslint.config.mjs | 30 + examples/iframe/loader.mjs | 6 +- examples/iframe/utils.mjs | 12 +- examples/package-lock.json | 4247 +++++++++-------- examples/package.json | 75 +- examples/rollup.config.js | 12 +- examples/scripts/build-examples.mjs | 6 +- examples/scripts/build-metadata.mjs | 4 +- examples/scripts/build-thumbnails.mjs | 17 +- examples/scripts/utils.mjs | 6 +- .../src/app/components/DeviceSelector.mjs | 4 +- examples/src/app/components/ErrorBoundary.mjs | 6 +- examples/src/app/components/Example.mjs | 11 +- examples/src/app/components/MainLayout.mjs | 3 +- examples/src/app/components/Menu.mjs | 2 +- examples/src/app/components/Sidebar.mjs | 110 +- .../components/code-editor/CodeEditorBase.mjs | 40 +- .../code-editor/CodeEditorDesktop.mjs | 9 +- .../code-editor/CodeEditorMobile.mjs | 3 +- examples/src/app/iframe.mjs | 3 +- examples/src/app/index.mjs | 2 +- examples/src/app/monaco/languages/glsl.mjs | 2 +- examples/src/app/monaco/languages/wgsl.mjs | 2 +- examples/src/app/monaco/tokenizer-rules.mjs | 2 +- examples/src/app/paths.mjs | 10 +- examples/src/app/strings.mjs | 22 +- .../animation/blend-trees-1d.example.mjs | 16 +- .../blend-trees-2d-cartesian.controls.mjs | 16 +- .../blend-trees-2d-cartesian.example.mjs | 20 +- .../blend-trees-2d-directional.controls.mjs | 2 +- .../blend-trees-2d-directional.example.mjs | 20 +- .../component-properties.example.mjs | 8 +- .../src/examples/animation/events.example.mjs | 14 +- .../animation/layer-masks.example.mjs | 22 +- .../examples/animation/locomotion.example.mjs | 28 +- .../src/examples/animation/tween.example.mjs | 12 +- .../examples/camera/first-person.example.mjs | 20 +- examples/src/examples/camera/fly.example.mjs | 8 +- .../src/examples/camera/multi.example.mjs | 12 +- .../src/examples/camera/orbit.example.mjs | 10 +- .../examples/compute/histogram.example.mjs | 20 +- .../examples/compute/particles.example.mjs | 24 +- .../examples/compute/texture-gen.example.mjs | 24 +- .../compute/vertex-update.example.mjs | 28 +- .../gizmos/transform-rotate.example.mjs | 10 +- .../gizmos/transform-scale.example.mjs | 10 +- .../gizmos/transform-translate.example.mjs | 10 +- .../graphics/ambient-occlusion.example.mjs | 29 +- .../examples/graphics/area-lights.example.mjs | 20 +- .../examples/graphics/area-picker.example.mjs | 14 +- .../graphics/asset-viewer.example.mjs | 26 +- .../graphics/batching-dynamic.example.mjs | 8 +- .../clustered-area-lights.example.mjs | 18 +- .../graphics/clustered-lighting.example.mjs | 16 +- .../clustered-omni-shadows.example.mjs | 24 +- .../clustered-spot-shadows.example.mjs | 24 +- .../contact-hardening-shadows.example.mjs | 24 +- .../examples/graphics/dispersion.example.mjs | 12 +- .../dithered-transparency.example.mjs | 16 +- .../examples/graphics/grab-pass.example.mjs | 14 +- .../examples/graphics/ground-fog.example.mjs | 20 +- .../examples/graphics/hierarchy.example.mjs | 10 +- .../graphics/instancing-basic.example.mjs | 10 +- .../graphics/instancing-custom.example.mjs | 10 +- .../graphics/instancing-glb.example.mjs | 12 +- .../graphics/instancing-gooch.example.mjs | 18 +- .../graphics/integer-textures.example.mjs | 24 +- .../src/examples/graphics/layers.example.mjs | 8 +- .../graphics/light-physical-units.example.mjs | 24 +- .../graphics/lights-baked-a-o.example.mjs | 16 +- .../graphics/lights-baked.example.mjs | 8 +- .../src/examples/graphics/lights.example.mjs | 26 +- .../src/examples/graphics/lines.example.mjs | 10 +- .../graphics/lit-material.example.mjs | 20 +- .../graphics/material-anisotropic.example.mjs | 10 +- .../graphics/material-clear-coat.example.mjs | 16 +- .../graphics/material-physical.example.mjs | 12 +- .../material-translucent-specular.example.mjs | 10 +- .../material-transparency.example.mjs | 8 +- .../examples/graphics/mesh-decals.example.mjs | 8 +- .../graphics/mesh-deformation.example.mjs | 12 +- .../graphics/mesh-generation.example.mjs | 10 +- .../graphics/mesh-morph-many.example.mjs | 12 +- .../examples/graphics/mesh-morph.example.mjs | 8 +- .../examples/graphics/model-asset.example.mjs | 10 +- .../graphics/model-outline.example.mjs | 10 +- .../graphics/model-textured-box.example.mjs | 10 +- .../graphics/multi-render-targets.example.mjs | 20 +- .../examples/graphics/multi-view.example.mjs | 20 +- .../graphics/normals-and-tangents.example.mjs | 12 +- .../graphics/outlines-colored.example.mjs | 26 +- .../examples/graphics/paint-mesh.example.mjs | 14 +- .../src/examples/graphics/painter.example.mjs | 8 +- .../graphics/particles-anim-index.example.mjs | 8 +- .../graphics/particles-mesh.example.mjs | 12 +- .../particles-random-sprites.example.mjs | 10 +- .../graphics/particles-snow.example.mjs | 10 +- .../graphics/particles-spark.example.mjs | 8 +- .../point-cloud-simulation.example.mjs | 11 +- .../examples/graphics/point-cloud.example.mjs | 14 +- .../src/examples/graphics/portal.example.mjs | 16 +- .../graphics/post-effects.example.mjs | 32 +- .../graphics/post-processing.example.mjs | 26 +- .../graphics/reflection-box.example.mjs | 20 +- .../graphics/reflection-cubemap.example.mjs | 12 +- .../graphics/reflection-planar.example.mjs | 14 +- .../graphics/render-asset.example.mjs | 14 +- .../examples/graphics/render-pass.example.mjs | 18 +- .../graphics/render-to-texture.example.mjs | 16 +- .../examples/graphics/shader-burn.example.mjs | 12 +- .../graphics/shader-compile.example.mjs | 20 +- .../graphics/shader-hatch.example.mjs | 38 +- .../examples/graphics/shader-toon.example.mjs | 10 +- .../graphics/shader-wobble.example.mjs | 10 +- .../graphics/shadow-cascades.example.mjs | 14 +- .../src/examples/graphics/shapes.example.mjs | 8 +- .../src/examples/graphics/sky.example.mjs | 14 +- .../src/examples/graphics/taa.example.mjs | 14 +- .../graphics/texture-array.example.mjs | 20 +- .../graphics/texture-basis.example.mjs | 22 +- .../graphics/transform-feedback.example.mjs | 10 +- .../graphics/video-texture.example.mjs | 18 +- .../examples/graphics/wgsl-shader.example.mjs | 6 +- .../src/examples/input/gamepad.example.mjs | 12 +- .../src/examples/input/keyboard.example.mjs | 12 +- examples/src/examples/input/mouse.example.mjs | 12 +- .../src/examples/loaders/bundle.example.mjs | 8 +- .../examples/loaders/draco-glb.example.mjs | 16 +- examples/src/examples/loaders/glb.example.mjs | 10 +- .../examples/loaders/gltf-export.example.mjs | 46 +- .../examples/loaders/gsplat-many.example.mjs | 18 +- .../src/examples/loaders/gsplat.example.mjs | 10 +- .../examples/loaders/loaders-gl.example.mjs | 10 +- examples/src/examples/loaders/obj.example.mjs | 18 +- .../examples/loaders/usdz-export.example.mjs | 36 +- examples/src/examples/misc/editor.example.mjs | 10 +- .../src/examples/misc/esm-script.example.mjs | 8 +- .../src/examples/misc/hello-world.example.mjs | 6 +- .../src/examples/misc/mini-stats.example.mjs | 8 +- .../src/examples/misc/multi-app.example.mjs | 6 +- .../src/examples/misc/spineboy.example.mjs | 14 +- .../physics/compound-collision.example.mjs | 24 +- .../physics/falling-shapes.example.mjs | 20 +- .../physics/offset-collision.example.mjs | 22 +- .../src/examples/physics/raycast.example.mjs | 22 +- .../src/examples/physics/vehicle.example.mjs | 26 +- .../src/examples/sound/positional.example.mjs | 14 +- .../user-interface/button-basic.example.mjs | 10 +- .../user-interface/button-sprite.example.mjs | 16 +- .../user-interface/custom-shader.example.mjs | 8 +- .../user-interface/layout-group.example.mjs | 8 +- .../particle-system.example.mjs | 12 +- .../user-interface/scroll-view.example.mjs | 8 +- .../text-auto-font-size.example.mjs | 8 +- .../user-interface/text-emojis.example.mjs | 10 +- .../text-localization.example.mjs | 10 +- .../text-typewriter.example.mjs | 10 +- .../examples/user-interface/text.example.mjs | 8 +- .../world-to-screen.example.mjs | 16 +- .../user-interface/world-ui.example.mjs | 14 +- .../xr/ar-anchors-persistence.example.mjs | 17 +- examples/src/examples/xr/ar-basic.example.mjs | 16 +- .../examples/xr/ar-camera-color.example.mjs | 19 +- .../examples/xr/ar-camera-depth.example.mjs | 16 +- .../xr/ar-depth-sensing-placer.example.mjs | 14 +- .../xr/ar-hit-test-anchors.example.mjs | 19 +- .../src/examples/xr/ar-hit-test.example.mjs | 16 +- .../examples/xr/ar-mesh-detection.example.mjs | 18 +- .../xr/ar-plane-detection.example.mjs | 18 +- examples/src/examples/xr/vr-basic.example.mjs | 16 +- .../examples/xr/vr-controllers.example.mjs | 18 +- .../src/examples/xr/vr-movement.example.mjs | 14 +- examples/src/examples/xr/xr-hands.example.mjs | 22 +- .../src/examples/xr/xr-picking.example.mjs | 12 +- examples/src/examples/xr/xr-ui.example.mjs | 32 +- .../utils/plugins/rollup-build-examples.mjs | 6 +- examples/utils/plugins/rollup-copy-static.mjs | 4 +- examples/utils/utils.mjs | 7 +- 179 files changed, 3727 insertions(+), 3219 deletions(-) create mode 100644 examples/eslint.config.mjs diff --git a/examples/assets/scripts/misc/camera-frame.mjs b/examples/assets/scripts/misc/camera-frame.mjs index 494982fefc0..622a1828e69 100644 --- a/examples/assets/scripts/misc/camera-frame.mjs +++ b/examples/assets/scripts/misc/camera-frame.mjs @@ -1,5 +1,3 @@ -/* eslint-disable jsdoc/check-tag-names */ - import { Script, Color, diff --git a/examples/eslint.config.mjs b/examples/eslint.config.mjs new file mode 100644 index 00000000000..777155eb74e --- /dev/null +++ b/examples/eslint.config.mjs @@ -0,0 +1,30 @@ +import playcanvasConfig from '@playcanvas/eslint-config'; +import globals from 'globals'; + +export default [ + ...playcanvasConfig, + { + files: ['**/*.js', '**/*.mjs'], + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + 'ObjModelParser': 'readonly', + 'OutlineEffect': 'readonly' + } + }, + rules: { + 'import/no-unresolved': 'off' + } + }, + { + ignores: [ + 'assets/scripts/utils/area-light-lut-bin-gen.js', + 'cache', + 'dist', + 'src/lib', + 'src/app/monaco/languages', + 'src/app/monaco/tokenizer-rules.mjs' + ] + } +]; diff --git a/examples/iframe/loader.mjs b/examples/iframe/loader.mjs index 16b61492a28..b1a6ad10786 100644 --- a/examples/iframe/loader.mjs +++ b/examples/iframe/loader.mjs @@ -1,6 +1,6 @@ -import { updateDeviceType, fetchFile, localImport, clearImports, parseConfig, fire } from 'examples/utils'; -import { data, refresh } from 'examples/observer'; import files from 'examples/files'; +import { data, refresh } from 'examples/observer'; +import { updateDeviceType, fetchFile, localImport, clearImports, parseConfig, fire } from 'examples/utils'; import MiniStats from './ministats.mjs'; @@ -82,7 +82,7 @@ class ExampleLoader { */ const locations = []; lines.forEach((line) => { - const match = /^\s*at\s(.+):(\d+):(\d+)$/g.exec(line); + const match = /^\s*at\s(.+):(\d+):(\d+)$/.exec(line); if (!match) { return; } diff --git a/examples/iframe/utils.mjs b/examples/iframe/utils.mjs index 238d4c7c82a..d2f5fde584c 100644 --- a/examples/iframe/utils.mjs +++ b/examples/iframe/utils.mjs @@ -16,9 +16,9 @@ export const rootPath = root.replace(/\/iframe/g, ''); */ export function getQueryParams(url) { return Object.fromEntries(url - .split('?').pop() - .split('#')[0] - .split('&').map(s => s.split('='))); + .split('?').pop() + .split('#')[0] + .split('&').map(s => s.split('='))); } /** @@ -90,14 +90,14 @@ export function clearImports() { * @returns {Record} - The parsed config. */ export function parseConfig(script) { - const regex = /\/\/ @config ([^ \n]+) ?([^\n]+)?/g; + const regex = /\/\/ @config (\S+)(?:\s+([^\n]+))?/g; let match; /** @type {Record} */ const config = {}; while ((match = regex.exec(script)) !== null) { const key = match[1].trim(); const val = match[2]?.trim(); - config[key] = /true|false/g.test(val) ? val === 'true' : val ?? true; + config[key] = /true|false/.test(val) ? val === 'true' : val ?? true; } return config; } @@ -113,7 +113,7 @@ export function updateDeviceType(config) { deviceType = DEVICE_TYPES.includes(savedDevice) ? savedDevice : 'webgl2'; if (params.deviceType && DEVICE_TYPES.includes(params.deviceType)) { - console.warn("Overriding default device: ", params.deviceType); + console.warn('Overriding default device: ', params.deviceType); deviceType = params.deviceType; return; } diff --git a/examples/package-lock.json b/examples/package-lock.json index a9d8c1be505..119d626c252 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -9,64 +9,64 @@ "version": "0.0.0", "license": "MIT", "devDependencies": { - "@babel/standalone": "^7.22.9", - "@monaco-editor/react": "^4.5.1", - "@playcanvas/eslint-config": "^1.5.0", - "@playcanvas/observer": "1.4.0", - "@playcanvas/pcui": "^4.3.0", - "@rollup/plugin-commonjs": "^22.0.2", - "@rollup/plugin-node-resolve": "^13.3.0", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-terser": "^0.4.3", - "@tweenjs/tween.js": "^21.0.0", - "@types/react": "^18.2.18", - "@types/react-dom": "^18.2.7", + "@babel/standalone": "^7.26.2", + "@monaco-editor/react": "^4.6.0", + "@playcanvas/eslint-config": "^2.0.7", + "@playcanvas/observer": "^1.5.1", + "@playcanvas/pcui": "^4.6.0", + "@rollup/plugin-commonjs": "^28.0.1", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-replace": "^6.0.1", + "@rollup/plugin-terser": "^0.4.4", + "@tweenjs/tween.js": "^25.0.0", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", "@types/react-router-dom": "^5.3.3", - "concurrently": "^7.6.0", + "concurrently": "^9.1.0", "cross-env": "^7.0.2", - "eslint": "^8.46.0", + "eslint": "^9.14.0", "examples": "file:./iframe", - "fflate": "^0.8.0", - "fs-extra": "^10.1.0", - "monaco-editor": "^0.33.0", + "fflate": "^0.8.2", + "fs-extra": "^11.2.0", + "monaco-editor": "^0.52.0", "playcanvas": "file:..", "prop-types": "^15.7.2", - "puppeteer": "^20.9.0", + "puppeteer": "^23.8.0", "react": "^18.3.1", - "react-dom": "^18.2.0", - "react-es6": "^1.0.0", + "react-dom": "^18.3.1", + "react-es6": "^1.0.2", "react-router-dom": "^5.3.4", - "rollup": "^2.79.1", - "serve": "^14.2.0", - "sharp": "^0.32.6" + "rollup": "^4.26.0", + "serve": "^14.2.4", + "sharp": "^0.33.5" } }, "..": { "name": "playcanvas", - "version": "1.71.0-dev", + "version": "2.3.0-dev", "dev": true, "license": "MIT", "dependencies": { - "@types/webxr": "^0.5.15", + "@types/webxr": "^0.5.16", "@webgpu/types": "^0.1.40" }, "devDependencies": { "@babel/core": "^7.24.4", - "@babel/eslint-parser": "^7.24.1", + "@babel/eslint-parser": "^7.25.1", "@babel/preset-env": "^7.24.4", - "@playcanvas/canvas-mock": "^1.0.1", - "@playcanvas/eslint-config": "^1.7.1", + "@playcanvas/eslint-config": "^2.0.2", "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-strip": "^3.0.4", "@rollup/plugin-terser": "^0.4.4", "@rollup/pluginutils": "^5.1.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "chai": "^5.1.0", - "eslint": "^8.57.0", + "eslint": "^9.10.0", "fflate": "^0.8.2", "global-jsdom": "^24.0.0", - "jsdom": "^24.0.0", + "globals": "^15.9.0", + "jsdom": "^24.1.3", "karma": "^6.4.3", "karma-chrome-launcher": "^3.2.0", "karma-mocha": "^2.0.1", @@ -79,10 +79,11 @@ "rollup-plugin-jscc": "2.0.0", "rollup-plugin-visualizer": "^5.12.0", "serve": "^14.2.2", - "sinon": "^17.0.1", - "typedoc": "^0.25.13", - "typedoc-plugin-mdn-links": "^3.1.22", - "typescript": "^5.4.5", + "sinon": "^18.0.0", + "skia-canvas": "^1.0.2", + "typedoc": "^0.26.3", + "typedoc-plugin-mdn-links": "^3.2.2", + "typescript": "^5.5.3", "xhr2": "^0.2.1" }, "engines": { @@ -1936,11 +1937,6 @@ "node": ">= 8" } }, - "../node_modules/@playcanvas/canvas-mock": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "../node_modules/@playcanvas/eslint-config": { "version": "1.7.1", "dev": true, @@ -8528,238 +8524,146 @@ "name": "examples", "dev": true }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/code-frame": { - "version": "7.22.10", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.10", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.22.10", + "node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", + "node_modules/@babel/standalone": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.26.2.tgz", + "integrity": "sha512-i2VbegsRfwa9yq3xmfDX3tG2yh9K0cCqwpSyVG2nPxifh0EOnucAZUeO/g4lW2Zfg03aPJNtPfxQbDHzXc7H+w==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", + "node_modules/@emnapi/runtime": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", "dev": true, - "license": "MIT", + "optional": true, "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" + "tslib": "^2.4.0" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", + "node_modules/@es-joy/jsdoccomment": { + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz", + "integrity": "sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==", "dev": true, - "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "comment-parser": "1.4.1", + "esquery": "^1.6.0", + "jsdoc-type-pratt-parser": "~4.1.0" }, "engines": { - "node": ">=4" + "node": ">=16" } }, - "node_modules/@babel/runtime": { - "version": "7.22.10", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, - "license": "MIT", "dependencies": { - "regenerator-runtime": "^0.14.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@babel/standalone": { - "version": "7.22.10", + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@es-joy/jsdoccomment": { - "version": "0.39.4", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, - "license": "MIT", - "dependencies": { - "comment-parser": "1.3.1", - "esquery": "^1.5.0", - "jsdoc-type-pratt-parser": "~4.0.0" - }, "engines": { - "node": ">=16" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", + "node_modules/@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", "dev": true, - "license": "MIT", "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.1", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -8767,79 +8671,82 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", + "node_modules/@eslint/js": { + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", + "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/eslintrc/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@eslint/js": { - "version": "8.46.0", + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", "dev": true, - "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", + "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" + "levn": "^0.4.1" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.4", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, - "license": "MIT", "dependencies": { - "ms": "2.1.2" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/ms": { - "version": "2.1.2", + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -8848,34 +8755,403 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, "engines": { - "node": ">=6.0.0" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", "dev": true, "license": "MIT", "engines": { @@ -8892,9 +9168,10 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", @@ -8906,9 +9183,10 @@ } }, "node_modules/@monaco-editor/loader": { - "version": "1.3.3", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.4.0.tgz", + "integrity": "sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==", "dev": true, - "license": "MIT", "dependencies": { "state-local": "^1.0.6" }, @@ -8917,11 +9195,12 @@ } }, "node_modules/@monaco-editor/react": { - "version": "4.5.1", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.6.0.tgz", + "integrity": "sha512-RFkU9/i7cN2bsq/iTkurMWOEErmYcY6JiQI3Jn+WeR/FGISH8JbHERjpS9oRuSOPvDMJI0Z8nJeKkbOs9sBYQw==", "dev": true, - "license": "MIT", "dependencies": { - "@monaco-editor/loader": "^1.3.3" + "@monaco-editor/loader": "^1.4.0" }, "peerDependencies": { "monaco-editor": ">= 0.25.0 < 1", @@ -8929,184 +9208,157 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, - "engines": { - "node": ">= 8" + "funding": { + "url": "https://opencollective.com/unts" } }, "node_modules/@playcanvas/eslint-config": { - "version": "1.5.0", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@playcanvas/eslint-config/-/eslint-config-2.0.7.tgz", + "integrity": "sha512-sejCX0vlzdzeP74Eu0lToxg+cuqocQ+IAZpobVw2P+upZj6ENfJbAJMTdtqjWkuohPXHmgOe3dryI+9F3yK7rg==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-jsdoc": "^44.0.2" + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsdoc": "^50.3.1", + "eslint-plugin-regexp": "^2.6.0" }, "peerDependencies": { - "eslint": ">= 4" + "eslint": ">= 8" } }, "node_modules/@playcanvas/observer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@playcanvas/observer/-/observer-1.5.1.tgz", + "integrity": "sha512-0y4OQOtwhgCvFaNlhLgi4ycSeOdnp0Frf4R+8eewxtfZQW1Muox2lkUGoMywoRRLhaRjUMdaxQN1o53lNjlB9w==", + "dev": true }, "node_modules/@playcanvas/pcui": { - "version": "4.3.0", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@playcanvas/pcui/-/pcui-4.6.0.tgz", + "integrity": "sha512-1r1WQak+oMKPmhsYfKq7xiVhsJQREtHTrztVTvCnxCAq75y1Lm3qHWixYZ3YF/RQb8sSNpBoOb1fivXIeHLmew==", "dev": true, - "license": "MIT", "dependencies": { - "@playcanvas/observer": "^1.4.0" + "@playcanvas/observer": "^1.5.1" } }, "node_modules/@puppeteer/browsers": { - "version": "1.4.6", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.4.1.tgz", + "integrity": "sha512-0kdAbmic3J09I6dT8e9vE2JOCSt13wHCW5x/ly8TSt2bDtuIWe2TgLZZDHdcziw9AVCzflMAXCrVyRIhIs44Ng==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.3.0", - "tar-fs": "3.0.4", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" + "debug": "^4.3.7", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" }, "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=18" } }, - "node_modules/@puppeteer/browsers/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.1", + "node_modules/@puppeteer/browsers/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=12" + "node": ">=10" } }, "node_modules/@rollup/plugin-commonjs": { - "version": "22.0.2", + "version": "28.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", + "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", "dev": true, - "license": "MIT", "dependencies": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" }, "engines": { - "node": ">= 12.0.0" + "node": ">=16.0.0 || 14 >= 14.17" }, "peerDependencies": { - "rollup": "^2.68.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.3.0", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", + "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", "dev": true, - "license": "MIT", "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.1.0", "is-module": "^1.0.0", - "resolve": "^1.19.0" + "resolve": "^1.22.1" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.42.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-replace": { - "version": "4.0.0", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-6.0.1.tgz", + "integrity": "sha512-2sPh9b73dj5IxuMmDAsQWVFT7mR+yoHweBaXG2W/R8vQ+IWZlnaI7BR7J6EguVQUp1hd8Z7XuozpDjEKQAAC2Q==", "dev": true, - "license": "MIT", "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "magic-string": "^0.25.7" + "@rollup/pluginutils": "^5.0.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0 || ^2.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-terser": { - "version": "0.4.3", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", "dev": true, - "license": "MIT", "dependencies": { "serialize-javascript": "^6.0.1", "smob": "^1.0.0", @@ -9116,7 +9368,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.x || ^3.x" + "rollup": "^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -9125,55 +9377,311 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "3.1.0", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", "dev": true, - "license": "MIT", "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" }, "engines": { - "node": ">= 8.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "1.0.1", + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.26.0.tgz", + "integrity": "sha512-gJNwtPDGEaOEgejbaseY6xMFu+CPltsc8/T+diUTTbOQLqD+bnrJq9ulH6WD69TqwqWmrfRAtUv30cCFZlbGTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.26.0.tgz", + "integrity": "sha512-YJa5Gy8mEZgz5JquFruhJODMq3lTHWLm1fOy+HIANquLzfIOzE9RA5ie3JjCdVb9r46qfAQY/l947V0zfGJ0OQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.26.0.tgz", + "integrity": "sha512-ErTASs8YKbqTBoPLp/kA1B1Um5YSom8QAc4rKhg7b9tyyVqDBlQxy7Bf2wW7yIlPGPg2UODDQcbkTlruPzDosw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.26.0.tgz", + "integrity": "sha512-wbgkYDHcdWW+NqP2mnf2NOuEbOLzDblalrOWcPyY6+BRbVhliavon15UploG7PpBRQ2bZJnbmh8o3yLoBvDIHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.26.0.tgz", + "integrity": "sha512-Y9vpjfp9CDkAG4q/uwuhZk96LP11fBz/bYdyg9oaHYhtGZp7NrbkQrj/66DYMMP2Yo/QPAsVHkV891KyO52fhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.26.0.tgz", + "integrity": "sha512-A/jvfCZ55EYPsqeaAt/yDAG4q5tt1ZboWMHEvKAH9Zl92DWvMIbnZe/f/eOXze65aJaaKbL+YeM0Hz4kLQvdwg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.26.0.tgz", + "integrity": "sha512-paHF1bMXKDuizaMODm2bBTjRiHxESWiIyIdMugKeLnjuS1TCS54MF5+Y5Dx8Ui/1RBPVRE09i5OUlaLnv8OGnA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.26.0.tgz", + "integrity": "sha512-cwxiHZU1GAs+TMxvgPfUDtVZjdBdTsQwVnNlzRXC5QzIJ6nhfB4I1ahKoe9yPmoaA/Vhf7m9dB1chGPpDRdGXg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.26.0.tgz", + "integrity": "sha512-4daeEUQutGRCW/9zEo8JtdAgtJ1q2g5oHaoQaZbMSKaIWKDQwQ3Yx0/3jJNmpzrsScIPtx/V+1AfibLisb3AMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.26.0.tgz", + "integrity": "sha512-eGkX7zzkNxvvS05ROzJ/cO/AKqNvR/7t1jA3VZDi2vRniLKwAWxUr85fH3NsvtxU5vnUUKFHKh8flIBdlo2b3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.26.0.tgz", + "integrity": "sha512-Odp/lgHbW/mAqw/pU21goo5ruWsytP7/HCC/liOt0zcGG0llYWKrd10k9Fj0pdj3prQ63N5yQLCLiE7HTX+MYw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.26.0.tgz", + "integrity": "sha512-MBR2ZhCTzUgVD0OJdTzNeF4+zsVogIR1U/FsyuFerwcqjZGvg2nYe24SAHp8O5sN8ZkRVbHwlYeHqcSQ8tcYew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.26.0.tgz", + "integrity": "sha512-YYcg8MkbN17fMbRMZuxwmxWqsmQufh3ZJFxFGoHjrE7bv0X+T6l3glcdzd7IKLiwhT+PZOJCblpnNlz1/C3kGQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.26.0.tgz", + "integrity": "sha512-ZuwpfjCwjPkAOxpjAEjabg6LRSfL7cAJb6gSQGZYjGhadlzKKywDkCUnJ+KEfrNY1jH5EEoSIKLCb572jSiglA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.26.0.tgz", + "integrity": "sha512-+HJD2lFS86qkeF8kNu0kALtifMpPCZU80HvwztIKnYwym3KnA1os6nsX4BGSTLtS2QVAGG1P3guRgsYyMA0Yhg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.26.0.tgz", + "integrity": "sha512-WUQzVFWPSw2uJzX4j6YEbMAiLbs0BUysgysh8s817doAYhR5ybqTI1wtKARQKo6cGop3pHnrUJPFCsXdoFaimQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.26.0.tgz", + "integrity": "sha512-D4CxkazFKBfN1akAIY6ieyOqzoOoBV1OICxgUblWxff/pSjCA2khXlASUx7mK6W1oP4McqhgcCsu6QaLj3WMWg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.26.0.tgz", + "integrity": "sha512-2x8MO1rm4PGEP0xWbubJW5RtbNLk3puzAMaLQd3B3JHVw4KcHlmXcO+Wewx9zCoo7EUFiMlu/aZbCJ7VjMzAag==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true }, "node_modules/@tweenjs/tween.js": { - "version": "21.0.0", - "dev": true, - "license": "MIT" + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-25.0.0.tgz", + "integrity": "sha512-XKLA6syeBUaPzx4j3qwMqzzq+V4uo72BnlbOjmuljLrRqdsd3qnzvZZoxvMHZ23ndsRS4aufU6JOZYpCbU6T1A==", + "dev": true }, "node_modules/@types/estree": { - "version": "0.0.39", - "dev": true, - "license": "MIT" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true }, "node_modules/@types/history": { "version": "4.7.11", "dev": true, "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true }, "node_modules/@types/node": { - "version": "20.4.9", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, - "license": "MIT" + "optional": true, + "dependencies": { + "undici-types": "~6.19.8" + } }, "node_modules/@types/prop-types": { "version": "15.7.5", @@ -9181,19 +9689,20 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.2.19", + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", "dev": true, - "license": "MIT", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.2.7", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/react": "*" } @@ -9218,31 +9727,26 @@ } }, "node_modules/@types/resolve": { - "version": "1.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/scheduler": { - "version": "0.16.3", - "dev": true, - "license": "MIT" + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true }, "node_modules/@types/yauzl": { - "version": "2.10.0", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" } }, "node_modules/@zeit/schemas": { - "version": "2.29.0", - "dev": true, - "license": "MIT" + "version": "2.36.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.36.0.tgz", + "integrity": "sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==", + "dev": true }, "node_modules/accepts": { "version": "1.3.8", @@ -9257,9 +9761,10 @@ } }, "node_modules/acorn": { - "version": "8.10.0", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -9269,16 +9774,18 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/agent-base": { - "version": "7.1.0", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -9286,31 +9793,11 @@ "node": ">= 14" } }, - "node_modules/agent-base/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/agent-base/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -9373,8 +9860,9 @@ }, "node_modules/are-docs-informative": { "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", "dev": true, - "license": "MIT", "engines": { "node": ">=14" } @@ -9386,30 +9874,37 @@ }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-includes": { - "version": "3.1.6", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -9420,15 +9915,17 @@ } }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.2", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -9438,13 +9935,14 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.1", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -9455,13 +9953,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -9472,15 +9971,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.1", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, - "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -9492,8 +9994,9 @@ }, "node_modules/ast-types": { "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^2.0.1" }, @@ -9502,9 +10005,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, - "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -9513,17 +10020,66 @@ } }, "node_modules/b4a": { - "version": "1.6.4", - "dev": true, - "license": "ISC" + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", "dev": true, "license": "MIT" }, + "node_modules/bare-events": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", + "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", + "dev": true, + "optional": true + }, + "node_modules/bare-fs": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", + "dev": true, + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-path": "^2.0.0", + "bare-stream": "^2.0.0" + } + }, + "node_modules/bare-os": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", + "dev": true, + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", + "dev": true, + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, + "node_modules/bare-stream": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.2.tgz", + "integrity": "sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==", + "dev": true, + "optional": true, + "dependencies": { + "streamx": "^2.20.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { @@ -9538,27 +10094,17 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/basic-ftp": { - "version": "5.0.3", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" } }, - "node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/boxen": { "version": "7.0.0", "dev": true, @@ -9686,6 +10232,8 @@ }, "node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -9701,7 +10249,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -9709,8 +10256,9 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, - "license": "MIT", "engines": { "node": "*" } @@ -9720,17 +10268,6 @@ "dev": true, "license": "MIT" }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bytes": { "version": "3.0.0", "dev": true, @@ -9740,12 +10277,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, - "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9753,8 +10297,9 @@ }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -9810,17 +10355,15 @@ "node": ">=8" } }, - "node_modules/chownr": { - "version": "1.1.4", - "dev": true, - "license": "ISC" - }, "node_modules/chromium-bidi": { - "version": "0.4.16", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", + "integrity": "sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "mitt": "3.0.0" + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" }, "peerDependencies": { "devtools-protocol": "*" @@ -9909,9 +10452,10 @@ "license": "MIT" }, "node_modules/comment-parser": { - "version": "1.3.1", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 12.0.0" } @@ -9973,26 +10517,25 @@ "license": "MIT" }, "node_modules/concurrently": { - "version": "7.6.0", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.0.tgz", + "integrity": "sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==", "dev": true, - "license": "MIT", "dependencies": { - "chalk": "^4.1.0", - "date-fns": "^2.29.1", + "chalk": "^4.1.2", "lodash": "^4.17.21", - "rxjs": "^7.0.0", - "shell-quote": "^1.7.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^8.1.0", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "supports-color": "^8.1.1", "tree-kill": "^1.2.2", - "yargs": "^17.3.1" + "yargs": "^17.7.2" }, "bin": { "conc": "dist/bin/concurrently.js", "concurrently": "dist/bin/concurrently.js" }, "engines": { - "node": "^12.20.0 || ^14.13.0 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" @@ -10000,27 +10543,37 @@ }, "node_modules/content-disposition": { "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cosmiconfig": { - "version": "8.2.0", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, - "license": "MIT", "dependencies": { - "import-fresh": "^3.2.1", + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" + "parse-json": "^5.2.0" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/cross-env": { @@ -10040,14 +10593,6 @@ "yarn": ">=1" } }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "dev": true, @@ -10067,48 +10612,80 @@ "license": "MIT" }, "node_modules/data-uri-to-buffer": { - "version": "5.0.1", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 14" } }, - "node_modules/date-fns": { - "version": "2.30.0", + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/runtime": "^7.21.0" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">=0.11" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, - "license": "MIT", "dependencies": { - "mimic-response": "^3.1.0" + "ms": "^2.1.3" }, "engines": { - "node": ">=10" + "node": ">=6.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/deep-extend": { @@ -10121,8 +10698,9 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/deepmerge": { "version": "4.3.1", @@ -10132,11 +10710,30 @@ "node": ">=0.10.0" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-properties": { - "version": "1.2.0", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, - "license": "MIT", "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -10149,8 +10746,9 @@ }, "node_modules/degenerator": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", "dev": true, - "license": "MIT", "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -10161,22 +10759,25 @@ } }, "node_modules/detect-libc": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=8" } }, "node_modules/devtools-protocol": { - "version": "0.0.1147663", - "dev": true, - "license": "BSD-3-Clause" + "version": "0.0.1367902", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", + "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==", + "dev": true }, "node_modules/doctrine": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -10196,64 +10797,83 @@ }, "node_modules/end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "license": "MIT", "dependencies": { "once": "^1.4.0" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/error-ex": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-abstract": { - "version": "1.22.1", + "version": "1.23.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.4.tgz", + "integrity": "sha512-HR1gxH5OaiN7XH7uiWH0RLw0RcFySiSoW1ctxmD1ahTw3uGBtkmm/ng0tDU1OtYx5OK6EOL5Y6O21cDflG3Jcg==", "dev": true, - "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.1", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.1", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.4", "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.0", - "safe-array-concat": "^1.0.0", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.10" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -10262,31 +10882,73 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, - "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, - "license": "MIT", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "license": "MIT", "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -10309,8 +10971,9 @@ }, "node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -10320,8 +10983,9 @@ }, "node_modules/escodegen": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -10339,72 +11003,90 @@ } }, "node_modules/eslint": { - "version": "8.46.0", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.14.0.tgz", + "integrity": "sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.14.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", + "@humanwhocodes/retry": "^0.4.0", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.13.0", "resolve": "^1.22.4" } }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/eslint-module-utils": { - "version": "2.8.0", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^3.2.7" }, @@ -10417,173 +11099,155 @@ } } }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/eslint-plugin-import": { - "version": "2.28.0", + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, - "license": "MIT", "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.12.1", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", - "resolve": "^1.22.3", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", "semver": "^6.3.1", - "tsconfig-paths": "^3.14.2" + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-jsdoc": { - "version": "44.2.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@es-joy/jsdoccomment": "~0.39.4", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.3.1", - "debug": "^4.3.4", - "escape-string-regexp": "^4.0.0", - "esquery": "^1.5.0", - "semver": "^7.5.1", - "spdx-expression-parse": "^3.0.1" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, - "node_modules/eslint-plugin-jsdoc/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-plugin-jsdoc/node_modules/semver": { - "version": "7.5.4", + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "license": "ISC", "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "ms": "^2.1.1" } }, - "node_modules/eslint-scope": { - "version": "7.2.2", + "node_modules/eslint-plugin-jsdoc": { + "version": "50.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.5.0.tgz", + "integrity": "sha512-xTkshfZrUbiSHXBwZ/9d5ulZ2OcHXxSvm/NPo494H/hadLRJwOq5PMV0EUpMqsb9V+kQo+9BAgi6Z7aJtdBp2A==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "@es-joy/jsdoccomment": "~0.49.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.6", + "escape-string-regexp": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.6.0", + "parse-imports": "^2.1.1", + "semver": "^7.6.3", + "spdx-expression-parse": "^4.0.0", + "synckit": "^0.9.1" }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.2", - "dev": true, - "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=18" }, - "funding": { - "url": "https://opencollective.com/eslint" + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, - "node_modules/eslint/node_modules/debug": { - "version": "4.3.4", + "node_modules/eslint-plugin-jsdoc/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=10" } }, - "node_modules/eslint/node_modules/doctrine": { - "version": "3.0.0", + "node_modules/eslint-plugin-regexp": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.6.0.tgz", + "integrity": "sha512-FCL851+kislsTEQEMioAlpDuK5+E5vs0hi1bF8cFlPlHcEjeRhuAzEsGikXRreE+0j4WhW2uO54MqTjXtYOi3A==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "esutils": "^2.0.2" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.9.1", + "comment-parser": "^1.4.0", + "jsdoc-type-pratt-parser": "^4.0.0", + "refa": "^0.12.1", + "regexp-ast-analysis": "^0.7.1", + "scslre": "^0.3.0" }, "engines": { - "node": ">=6.0.0" + "node": "^18 || >=20" + }, + "peerDependencies": { + "eslint": ">=8.44.0" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", + "node_modules/eslint-scope": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, - "license": "ISC", "dependencies": { - "is-glob": "^4.0.3" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=10.13.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ms": { - "version": "2.1.2", + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "license": "MIT" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, "node_modules/espree": { - "version": "9.6.1", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -10591,8 +11255,9 @@ }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -10602,9 +11267,10 @@ } }, "node_modules/esquery": { - "version": "1.5.0", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -10614,8 +11280,9 @@ }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -10625,8 +11292,9 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -10681,18 +11349,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/expand-template": { - "version": "2.0.3", - "dev": true, - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, "node_modules/extract-zip": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -10708,96 +11369,75 @@ "@types/yauzl": "^2.9.1" } }, - "node_modules/extract-zip/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/extract-zip/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "dev": true, "license": "MIT" }, "node_modules/fast-fifo": { - "version": "1.3.0", - "dev": true, - "license": "MIT" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^1.3.2" - } - }, - "node_modules/fast-url-parser/node_modules/punycode": { - "version": "1.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, "node_modules/fd-slicer": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, - "license": "MIT", "dependencies": { "pend": "~1.2.0" } }, - "node_modules/fflate": { - "version": "0.8.0", + "node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", "dev": true, - "license": "MIT" + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true }, "node_modules/file-entry-cache": { - "version": "6.0.1", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, - "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -10810,67 +11450,80 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, - "license": "MIT", "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.2.7", - "dev": true, - "license": "ISC" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true }, "node_modules/for-each": { "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "license": "MIT", "dependencies": { "is-callable": "^1.1.3" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/fs-extra": { - "version": "10.1.0", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, - "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.14" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "ISC" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/function-bind": { - "version": "1.1.1", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, - "license": "MIT" + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { - "version": "1.1.5", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -10881,8 +11534,9 @@ }, "node_modules/functions-have-names": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -10896,14 +11550,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, - "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10911,8 +11570,9 @@ }, "node_modules/get-stream": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, - "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -10924,12 +11584,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -10939,113 +11601,52 @@ } }, "node_modules/get-uri": { - "version": "6.0.1", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", "dev": true, - "license": "MIT", "dependencies": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^5.0.1", + "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4", - "fs-extra": "^8.1.0" + "fs-extra": "^11.2.0" }, "engines": { "node": ">= 14" } }, - "node_modules/get-uri/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/get-uri/node_modules/fs-extra": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/get-uri/node_modules/jsonfile": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/get-uri/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/get-uri/node_modules/universalify": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/glob": { - "version": "7.2.3", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-glob": "^4.0.3" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "13.20.0", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { - "version": "1.0.3", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, - "license": "MIT", "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -11056,8 +11657,9 @@ }, "node_modules/gopd": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -11070,26 +11672,11 @@ "dev": true, "license": "ISC" }, - "node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/has": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11103,20 +11690,22 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, - "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -11126,8 +11715,9 @@ }, "node_modules/has-symbols": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -11136,11 +11726,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, - "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -11149,10 +11740,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/history": { "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.1.2", "loose-envify": "^1.2.0", @@ -11164,16 +11768,18 @@ }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "react-is": "^16.7.0" } }, "node_modules/http-proxy-agent": { - "version": "7.0.0", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, - "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -11182,31 +11788,11 @@ "node": ">= 14" } }, - "node_modules/http-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/http-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/https-proxy-agent": { - "version": "7.0.1", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, - "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -11215,27 +11801,6 @@ "node": ">= 14" } }, - "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/https-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/human-signals": { "version": "2.1.0", "dev": true, @@ -11246,6 +11811,8 @@ }, "node_modules/ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { @@ -11260,21 +11827,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/ignore": { - "version": "5.2.4", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -11288,57 +11856,56 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, "node_modules/ini": { "version": "1.3.8", "dev": true, "license": "ISC" }, "node_modules/internal-slot": { - "version": "1.0.5", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, - "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { "node": ">= 0.4" } }, - "node_modules/ip": { - "version": "1.1.8", + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "dev": true, - "license": "MIT" + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/is-array-buffer": { - "version": "3.0.2", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11346,13 +11913,15 @@ }, "node_modules/is-arrayish": { "version": "0.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true }, "node_modules/is-bigint": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" }, @@ -11362,8 +11931,9 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -11375,24 +11945,26 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "license": "MIT", - "dependencies": { - "builtin-modules": "^3.3.0" - }, "engines": { - "node": ">=6" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-callable": { - "version": "1.2.7", + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, - "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, "engines": { "node": ">= 0.4" }, @@ -11400,12 +11972,16 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-core-module": { - "version": "2.13.0", + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", "dev": true, - "license": "MIT", "dependencies": { - "has": "^1.0.3" + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11413,8 +11989,9 @@ }, "node_modules/is-date-object": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -11441,8 +12018,9 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -11457,8 +12035,9 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -11472,9 +12051,10 @@ "license": "MIT" }, "node_modules/is-negative-zero": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -11484,8 +12064,9 @@ }, "node_modules/is-number-object": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -11496,14 +12077,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-port-reachable": { "version": "4.0.0", "dev": true, @@ -11525,8 +12098,9 @@ }, "node_modules/is-regex": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -11539,11 +12113,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11562,8 +12140,9 @@ }, "node_modules/is-string": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -11576,8 +12155,9 @@ }, "node_modules/is-symbol": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -11589,11 +12169,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, - "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -11604,8 +12185,9 @@ }, "node_modules/is-weakref": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2" }, @@ -11626,8 +12208,9 @@ }, "node_modules/isarray": { "version": "2.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true }, "node_modules/isexe": { "version": "2.0.0", @@ -11641,8 +12224,9 @@ }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -11650,33 +12234,50 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/jsdoc-type-pratt-parser": { - "version": "4.0.0", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", + "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12.0.0" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true }, "node_modules/json5": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.0" }, @@ -11695,10 +12296,20 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -11709,13 +12320,15 @@ }, "node_modules/lines-and-columns": { "version": "1.2.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -11733,8 +12346,9 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/loose-envify": { "version": "1.4.0", @@ -11748,22 +12362,21 @@ } }, "node_modules/lru-cache": { - "version": "6.0.0", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/magic-string": { - "version": "0.25.9", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, - "license": "MIT", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/merge-stream": { @@ -11798,17 +12411,6 @@ "node": ">=6" } }, - "node_modules/mimic-response": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/minimatch": { "version": "3.1.2", "dev": true, @@ -11828,35 +12430,29 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mitt": { - "version": "3.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "dev": true, - "license": "MIT" - }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true + }, "node_modules/monaco-editor": { - "version": "0.33.0", - "dev": true, - "license": "MIT" + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.0.tgz", + "integrity": "sha512-OeWhNpABLCeTqubfqLMXGsqf6OmPU6pHM85kF3dhy6kq5hnhuVS1p3VrEW/XhWHc71P2tHyS5JFySD8mgs1crw==", + "dev": true }, "node_modules/ms": { "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", @@ -11868,61 +12464,13 @@ }, "node_modules/netmask": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4.0" } }, - "node_modules/node-abi": { - "version": "3.45.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-abi/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "6.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-fetch": { - "version": "2.6.12", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/npm-run-path": { "version": "4.0.1", "dev": true, @@ -11943,28 +12491,34 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, - "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-keys": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { - "version": "4.1.4", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -11976,13 +12530,15 @@ } }, "node_modules/object.fromentries": { - "version": "2.0.6", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -11992,24 +12548,28 @@ } }, "node_modules/object.groupby": { - "version": "1.0.0", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/object.values": { - "version": "1.1.6", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -12028,8 +12588,9 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } @@ -12049,16 +12610,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, - "license": "MIT", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -12066,8 +12628,9 @@ }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -12080,8 +12643,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -12093,51 +12657,31 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.0.0", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", + "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", "dev": true, - "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.1" + "https-proxy-agent": "^7.0.5", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.4" }, "engines": { "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/pac-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/pac-resolver": { - "version": "7.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", "dev": true, - "license": "MIT", "dependencies": { "degenerator": "^5.0.0", - "ip": "^1.1.8", "netmask": "^2.0.2" }, "engines": { @@ -12146,8 +12690,9 @@ }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -12155,10 +12700,24 @@ "node": ">=6" } }, + "node_modules/parse-imports": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.2.1.tgz", + "integrity": "sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==", + "dev": true, + "dependencies": { + "es-module-lexer": "^1.5.3", + "slashes": "^3.0.12" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -12174,24 +12733,18 @@ }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-is-inside": { "version": "1.0.2", - "dev": true, - "license": "(WTFPL OR MIT)" + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true }, "node_modules/path-key": { "version": "3.1.1", @@ -12207,37 +12760,30 @@ "license": "MIT" }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "dev": true }, "node_modules/pend": { "version": "1.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true }, "node_modules/picomatch": { - "version": "2.3.1", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -12247,69 +12793,29 @@ "resolved": "..", "link": true }, - "node_modules/prebuild-install": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/prebuild-install/node_modules/tar-fs": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/prebuild-install/node_modules/tar-stream": { - "version": "2.2.0", + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, "engines": { - "node": ">=6" + "node": ">= 0.4" } }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -12325,156 +12831,92 @@ } }, "node_modules/proxy-agent": { - "version": "6.3.0", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", "dev": true, - "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "engines": { "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/proxy-agent/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/proxy-from-env": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true }, "node_modules/pump": { - "version": "3.0.0", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dev": true, - "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "node_modules/punycode": { - "version": "2.3.0", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/puppeteer": { - "version": "20.9.0", + "version": "23.8.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.8.0.tgz", + "integrity": "sha512-MFWDMWoCcOpwNwQIjA9gPKWrEUbj8bLCzkK56w5lZPMUT6wK4FfpgOEPxKffVmXEMYMZzgcjxzqy15b/Q1ibaw==", "dev": true, "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "1.4.6", - "cosmiconfig": "8.2.0", - "puppeteer-core": "20.9.0" + "@puppeteer/browsers": "2.4.1", + "chromium-bidi": "0.8.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1367902", + "puppeteer-core": "23.8.0", + "typed-query-selector": "^2.12.0" }, - "engines": { - "node": ">=16.3.0" - } - }, - "node_modules/puppeteer-core": { - "version": "20.9.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", - "cross-fetch": "4.0.0", - "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" }, "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18" } }, - "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.4", + "node_modules/puppeteer-core": { + "version": "23.8.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.8.0.tgz", + "integrity": "sha512-c2ymGN2M//We7pC+JhP2dE/g4+qnT89BO+EMSZyJmecN3DN6RNqErA7eH7DrWoNIcU75r2nP4VHa4pswAL6NVg==", "dev": true, - "license": "MIT", "dependencies": { - "ms": "2.1.2" + "@puppeteer/browsers": "2.4.1", + "chromium-bidi": "0.8.0", + "debug": "^4.3.7", + "devtools-protocol": "0.0.1367902", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.0" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=18" } }, - "node_modules/puppeteer-core/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/queue-tick": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true }, "node_modules/randombytes": { "version": "2.1.0", @@ -12486,8 +12928,9 @@ }, "node_modules/range-parser": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -12526,21 +12969,23 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, - "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-es6": { - "version": "1.0.0", - "dev": true, - "license": "MIT" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/react-es6/-/react-es6-1.0.2.tgz", + "integrity": "sha512-Nw4SDw6JB87+qWwltgyKPQwepxIZ5LrANenBUh+PO6ofUVaml+fBRr8RGakFFVqB7vITKPARmjxpKfdTFAQE9Q==", + "dev": true }, "node_modules/react-is": { "version": "16.13.1", @@ -12549,8 +12994,9 @@ }, "node_modules/react-router": { "version": "5.3.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", + "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -12568,8 +13014,9 @@ }, "node_modules/react-router-dom": { "version": "5.3.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.4.tgz", + "integrity": "sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -12583,32 +13030,62 @@ "react": ">=15" } }, - "node_modules/readable-stream": { - "version": "3.6.2", + "node_modules/react-router/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/react-router/node_modules/path-to-regexp": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/refa": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/refa/-/refa-0.12.1.tgz", + "integrity": "sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==", "dev": true, - "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "@eslint-community/regexpp": "^4.8.0" }, "engines": { - "node": ">= 6" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/regenerator-runtime": { - "version": "0.14.0", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/regexp-ast-analysis": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.7.1.tgz", + "integrity": "sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==", "dev": true, - "license": "MIT" + "dependencies": { + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.1" + }, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", + "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -12647,8 +13124,9 @@ }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -12671,76 +13149,56 @@ }, "node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/resolve-pathname": { "version": "3.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", + "dev": true }, - "node_modules/rimraf": { - "version": "3.0.2", + "node_modules/rollup": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.26.0.tgz", + "integrity": "sha512-ilcl12hnWonG8f+NxU6BlgysVA0gvY2l8N0R84S1HcINbW20bvwuCngJkkInV6LXhwRpucsW5k1ovDwEdBVrNg==", "dev": true, - "license": "ISC", "dependencies": { - "glob": "^7.1.3" + "@types/estree": "1.0.6" }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "2.79.1", - "dev": true, - "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.26.0", + "@rollup/rollup-android-arm64": "4.26.0", + "@rollup/rollup-darwin-arm64": "4.26.0", + "@rollup/rollup-darwin-x64": "4.26.0", + "@rollup/rollup-freebsd-arm64": "4.26.0", + "@rollup/rollup-freebsd-x64": "4.26.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.26.0", + "@rollup/rollup-linux-arm-musleabihf": "4.26.0", + "@rollup/rollup-linux-arm64-gnu": "4.26.0", + "@rollup/rollup-linux-arm64-musl": "4.26.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.26.0", + "@rollup/rollup-linux-riscv64-gnu": "4.26.0", + "@rollup/rollup-linux-s390x-gnu": "4.26.0", + "@rollup/rollup-linux-x64-gnu": "4.26.0", + "@rollup/rollup-linux-x64-musl": "4.26.0", + "@rollup/rollup-win32-arm64-msvc": "4.26.0", + "@rollup/rollup-win32-ia32-msvc": "4.26.0", + "@rollup/rollup-win32-x64-msvc": "4.26.0", "fsevents": "~2.3.2" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/rxjs": { "version": "7.8.1", "dev": true, @@ -12750,12 +13208,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.0", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -12786,30 +13245,50 @@ "license": "MIT" }, "node_modules/safe-regex-test": { - "version": "1.0.0", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/scheduler": { - "version": "0.23.0", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dev": true, - "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" } }, + "node_modules/scslre": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.3.0.tgz", + "integrity": "sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.0", + "regexp-ast-analysis": "^0.7.0" + }, + "engines": { + "node": "^14.0.0 || >=16.0.0" + } + }, "node_modules/semver": { "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -12823,12 +13302,13 @@ } }, "node_modules/serve": { - "version": "14.2.0", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.2.4.tgz", + "integrity": "sha512-qy1S34PJ/fcY8gjVGszDB3EXiPSk5FKhUa7tQe0UPRddxRidc2V6cNHPNewbE1D7MAkgLuWEt3Vw56vYy73tzQ==", "dev": true, - "license": "MIT", "dependencies": { - "@zeit/schemas": "2.29.0", - "ajv": "8.11.0", + "@zeit/schemas": "2.36.0", + "ajv": "8.12.0", "arg": "5.0.2", "boxen": "7.0.0", "chalk": "5.0.1", @@ -12836,7 +13316,7 @@ "clipboardy": "3.0.0", "compression": "1.7.4", "is-port-reachable": "4.0.0", - "serve-handler": "6.1.5", + "serve-handler": "6.1.6", "update-check": "1.5.4" }, "bin": { @@ -12847,32 +13327,34 @@ } }, "node_modules/serve-handler": { - "version": "6.1.5", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz", + "integrity": "sha512-x5RL9Y2p5+Sh3D38Fh9i/iQ5ZK+e4xuXRd/pGbM4D13tgo/MGwbttUk8emytcr1YYzBYs+apnUngBDFYfpjPuQ==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", "mime-types": "2.1.18", "minimatch": "3.1.2", "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", + "path-to-regexp": "3.3.0", "range-parser": "1.2.0" } }, "node_modules/serve-handler/node_modules/mime-db": { "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/serve-handler/node_modules/mime-types": { "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "~1.33.0" }, @@ -12880,15 +13362,11 @@ "node": ">= 0.6" } }, - "node_modules/serve-handler/node_modules/path-to-regexp": { - "version": "2.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/serve/node_modules/ajv": { - "version": "8.11.0", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -12913,38 +13391,86 @@ }, "node_modules/serve/node_modules/json-schema-traverse": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, - "license": "MIT" + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/sharp": { - "version": "0.32.6", + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", "dev": true, "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "color": "^4.2.3", - "detect-libc": "^2.0.2", - "node-addon-api": "^6.1.0", - "prebuild-install": "^7.1.1", - "semver": "^7.5.4", - "simple-get": "^4.0.1", - "tar-fs": "^3.0.4", - "tunnel-agent": "^0.6.0" + "detect-libc": "^2.0.3", + "semver": "^7.6.3" }, "engines": { - "node": ">=14.15.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" } }, "node_modules/sharp/node_modules/semver": { - "version": "7.5.4", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -12980,66 +13506,28 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "4.0.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "3.0.7", + "dev": true, + "license": "ISC" + }, "node_modules/simple-swizzle": { "version": "0.2.2", "dev": true, @@ -13053,10 +13541,17 @@ "dev": true, "license": "MIT" }, + "node_modules/slashes": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", + "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==", + "dev": true + }, "node_modules/smart-buffer": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -13068,57 +13563,33 @@ "license": "MIT" }, "node_modules/socks": { - "version": "2.7.1", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dev": true, - "license": "MIT", "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks-proxy-agent": { - "version": "8.0.1", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", "dev": true, - "license": "MIT", "dependencies": { - "agent-base": "^7.0.1", + "agent-base": "^7.1.1", "debug": "^4.3.4", - "socks": "^2.7.1" + "socks": "^2.8.3" }, "engines": { "node": ">= 14" } }, - "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socks-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/socks/node_modules/ip": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/source-map": { "version": "0.6.1", "dev": true, @@ -13136,55 +13607,52 @@ "source-map": "^0.6.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "dev": true, - "license": "MIT" - }, - "node_modules/spawn-command": { - "version": "0.0.2-1", - "dev": true, - "license": "MIT" - }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "dev": true, - "license": "CC-BY-3.0" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true }, "node_modules/spdx-expression-parse": { - "version": "3.0.1", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "dev": true, - "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { - "version": "3.0.13", - "dev": true, - "license": "CC0-1.0" + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true }, "node_modules/state-local": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz", + "integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==", + "dev": true }, "node_modules/streamx": { - "version": "2.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", + "integrity": "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==", "dev": true, - "license": "MIT", "dependencies": { - "safe-buffer": "~5.2.0" + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" } }, "node_modules/string-width": { @@ -13201,13 +13669,15 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.7", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -13217,26 +13687,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13255,8 +13730,9 @@ }, "node_modules/strip-bom": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -13271,8 +13747,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -13305,20 +13782,41 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/tar-fs": { - "version": "3.0.4", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, - "license": "MIT", "dependencies": { - "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" } }, "node_modules/tar-stream": { - "version": "3.1.6", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "dev": true, - "license": "MIT", "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -13342,30 +13840,35 @@ "node": ">=10" } }, + "node_modules/text-decoder": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", + "dev": true + }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true }, "node_modules/through": { "version": "2.3.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true }, "node_modules/tiny-invariant": { - "version": "1.3.1", - "dev": true, - "license": "MIT" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "dev": true }, "node_modules/tiny-warning": { "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "dev": true }, "node_modules/tree-kill": { "version": "1.2.2", @@ -13376,9 +13879,10 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, - "license": "MIT", "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -13387,25 +13891,16 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "dev": true, - "license": "0BSD" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -13413,39 +13908,31 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-buffer": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -13455,15 +13942,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, - "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -13473,36 +13962,36 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typescript": { - "version": "5.1.6", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true }, "node_modules/unbox-primitive": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -13515,13 +14004,21 @@ }, "node_modules/unbzip2-stream": { "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, - "license": "MIT", "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "optional": true + }, "node_modules/universalify": { "version": "2.0.0", "dev": true, @@ -13541,21 +14038,24 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true }, "node_modules/value-equal": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==", + "dev": true }, "node_modules/vary": { "version": "1.1.2", @@ -13565,20 +14065,6 @@ "node": ">= 0.8" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "dev": true, @@ -13595,8 +14081,9 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -13609,15 +14096,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.11", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, - "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -13686,6 +14174,15 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "dev": true, @@ -13704,13 +14201,15 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/ws": { - "version": "8.13.0", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -13735,11 +14234,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/yargs": { "version": "17.7.2", "dev": true, @@ -13767,8 +14261,9 @@ }, "node_modules/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, - "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -13776,14 +14271,24 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/examples/package.json b/examples/package.json index 437bc43224d..28cf914d219 100644 --- a/examples/package.json +++ b/examples/package.json @@ -12,68 +12,41 @@ "build:thumbnails": "node ./scripts/build-thumbnails.mjs", "clean": "node ./scripts/clean.mjs", "develop": "cross-env NODE_ENV=development concurrently --kill-others \"npm run watch\" \"npm run serve\"", - "lint": "eslint --ext .js,.mjs .", + "lint": "eslint .", "serve": "serve dist -l 5555 --no-request-logging --config ../serve.json", "watch": "npm run -s build:pre && cross-env NODE_ENV=development rollup -c -w" }, - "eslintConfig": { - "root": true, - "extends": [ - "@playcanvas/eslint-config" - ], - "globals": { - "ObjModelParser": "readonly", - "OutlineEffect": "readonly", - "pcx": "readonly" - }, - "rules": { - "import/no-unresolved": "off", - "jsdoc/check-tag-names": [ - "error", - { - "definedTags": [ - "attribute" - ] - } - ] - } - }, - "eslintIgnore": [ - "area-light-lut-bin-gen.js", - "dist", - "lib" - ], "devDependencies": { - "@babel/standalone": "^7.22.9", - "@monaco-editor/react": "^4.5.1", - "@playcanvas/eslint-config": "^1.5.0", - "@playcanvas/observer": "1.4.0", - "@playcanvas/pcui": "^4.3.0", - "@rollup/plugin-commonjs": "^22.0.2", - "@rollup/plugin-node-resolve": "^13.3.0", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-terser": "^0.4.3", - "@tweenjs/tween.js": "^21.0.0", - "@types/react": "^18.2.18", - "@types/react-dom": "^18.2.7", + "@babel/standalone": "^7.26.2", + "@monaco-editor/react": "^4.6.0", + "@playcanvas/eslint-config": "^2.0.7", + "@playcanvas/observer": "^1.5.1", + "@playcanvas/pcui": "^4.6.0", + "@rollup/plugin-commonjs": "^28.0.1", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-replace": "^6.0.1", + "@rollup/plugin-terser": "^0.4.4", + "@tweenjs/tween.js": "^25.0.0", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", "@types/react-router-dom": "^5.3.3", - "concurrently": "^7.6.0", + "concurrently": "^9.1.0", "cross-env": "^7.0.2", - "eslint": "^8.46.0", + "eslint": "^9.14.0", "examples": "file:./iframe", - "fflate": "^0.8.0", - "fs-extra": "^10.1.0", - "monaco-editor": "^0.33.0", + "fflate": "^0.8.2", + "fs-extra": "^11.2.0", + "monaco-editor": "^0.52.0", "playcanvas": "file:..", "prop-types": "^15.7.2", - "puppeteer": "^20.9.0", + "puppeteer": "^23.8.0", "react": "^18.3.1", - "react-dom": "^18.2.0", - "react-es6": "^1.0.0", + "react-dom": "^18.3.1", + "react-es6": "^1.0.2", "react-router-dom": "^5.3.4", - "rollup": "^2.79.1", - "serve": "^14.2.0", - "sharp": "^0.32.6" + "rollup": "^4.26.0", + "serve": "^14.2.4", + "sharp": "^0.33.5" }, "author": "PlayCanvas ", "license": "MIT" diff --git a/examples/rollup.config.js b/examples/rollup.config.js index 22e1974c717..a0dd5deb9d3 100644 --- a/examples/rollup.config.js +++ b/examples/rollup.config.js @@ -1,23 +1,21 @@ +import { execSync } from 'child_process'; import fs from 'fs'; import path from 'path'; -import { execSync } from 'child_process'; // 1st party Rollup plugins import commonjs from '@rollup/plugin-commonjs'; -import replace from '@rollup/plugin-replace'; import resolve from '@rollup/plugin-node-resolve'; +import replace from '@rollup/plugin-replace'; import terser from '@rollup/plugin-terser'; // custom plugins -import { copyStatic } from './utils/plugins/rollup-copy-static.mjs'; import { buildExamples } from './utils/plugins/rollup-build-examples.mjs'; - -// engine rollup utils +import { copyStatic } from './utils/plugins/rollup-copy-static.mjs'; +import { isModuleWithExternalDependencies } from './utils/utils.mjs'; import { treeshakeIgnore } from '../utils/plugins/rollup-treeshake-ignore.mjs'; import { buildTarget } from '../utils/rollup-build-target.mjs'; // util functions -import { isModuleWithExternalDependencies } from './utils/utils.mjs'; const NODE_ENV = process.env.NODE_ENV ?? ''; const ENGINE_PATH = !process.env.ENGINE_PATH && NODE_ENV === 'development' ? @@ -45,7 +43,7 @@ const getEnginePathFiles = () => { const checkAppEngine = () => { // types if (!fs.existsSync('../build/playcanvas.d.ts')) { - const cmd = `npm run build target:types --prefix ../`; + const cmd = 'npm run build target:types --prefix ../'; console.log('\x1b[32m%s\x1b[0m', cmd); execSync(cmd); } diff --git a/examples/scripts/build-examples.mjs b/examples/scripts/build-examples.mjs index 8213365433d..2222dec521f 100644 --- a/examples/scripts/build-examples.mjs +++ b/examples/scripts/build-examples.mjs @@ -5,8 +5,8 @@ import fs from 'fs'; import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; -import { exampleMetaData } from '../cache/metadata.mjs'; import { parseConfig, engineFor, patchScript } from './utils.mjs'; +import { exampleMetaData } from '../cache/metadata.mjs'; // @ts-ignore const __filename = fileURLToPath(import.meta.url); @@ -43,7 +43,7 @@ const generateExampleFile = (categoryKebab, exampleNameKebab, setEngineType, fil const engine = engineFor(engineType); html = html.replace(/'@ENGINE'/g, JSON.stringify(engine)); - if (/'@([A-Z0-9_]+)'/g.test(html)) { + if (/'@[A-Z0-9_]+'/.test(html)) { throw new Error('HTML file still has unreplaced values'); } @@ -114,7 +114,7 @@ export const build = (env = {}) => { const scriptPath = resolve(path, `${exampleNameKebab}.${file}`); let script = fs.readFileSync(scriptPath, 'utf-8'); - if (/\.(mjs|js)$/.test(file)) { + if (/\.(?:mjs|js)$/.test(file)) { script = patchScript(script); } fs.writeFileSync(`${MAIN_DIR}/dist/iframe/${name}.${file}`, script); diff --git a/examples/scripts/build-metadata.mjs b/examples/scripts/build-metadata.mjs index 003c0fc4a8c..022ddbbafa5 100644 --- a/examples/scripts/build-metadata.mjs +++ b/examples/scripts/build-metadata.mjs @@ -2,8 +2,8 @@ import fs from 'fs'; import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; -import { toKebabCase } from '../src/app/strings.mjs'; import { objStringify, getDirFiles, parseConfig } from './utils.mjs'; +import { toKebabCase } from '../src/app/strings.mjs'; // @ts-ignore const __filename = fileURLToPath(import.meta.url); @@ -28,7 +28,7 @@ const main = () => { const categoryKebab = toKebabCase(category); examplesFiles.forEach((exampleFile) => { - if (!/\example.mjs$/.test(exampleFile)) { + if (!/example.mjs$/.test(exampleFile)) { return; } const examplePath = resolve(`${categoryPath}/${exampleFile}`); diff --git a/examples/scripts/build-thumbnails.mjs b/examples/scripts/build-thumbnails.mjs index 2fedb4eea65..da20799a4ab 100644 --- a/examples/scripts/build-thumbnails.mjs +++ b/examples/scripts/build-thumbnails.mjs @@ -3,14 +3,15 @@ */ /* eslint-disable no-await-in-loop */ import fs from 'fs'; -import puppeteer from 'puppeteer'; -import sharp from 'sharp'; +import { spawn, execSync } from 'node:child_process'; import { dirname } from 'path'; import { fileURLToPath } from 'url'; -import { spawn, execSync } from 'node:child_process'; -import { exampleMetaData } from '../cache/metadata.mjs'; +import puppeteer from 'puppeteer'; +import sharp from 'sharp'; + import { sleep } from './utils.mjs'; +import { exampleMetaData } from '../cache/metadata.mjs'; // @ts-ignore const __filename = fileURLToPath(import.meta.url); @@ -152,13 +153,13 @@ const takeThumbnails = async (pool, categoryKebab, exampleNameKebab) => { // copy and crop image for large thumbnail await sharp(imgData) - .resize(320, 240) - .toFile(`${MAIN_DIR}/thumbnails/${categoryKebab}_${exampleNameKebab}_large.webp`); + .resize(320, 240) + .toFile(`${MAIN_DIR}/thumbnails/${categoryKebab}_${exampleNameKebab}_large.webp`); // copy and crop image for small thumbnail await sharp(imgData) - .resize(64, 48) - .toFile(`${MAIN_DIR}/thumbnails/${categoryKebab}_${exampleNameKebab}_small.webp`); + .resize(64, 48) + .toFile(`${MAIN_DIR}/thumbnails/${categoryKebab}_${exampleNameKebab}_small.webp`); // remove screenshot fs.unlinkSync(`${MAIN_DIR}/thumbnails/${categoryKebab}_${exampleNameKebab}.webp`); diff --git a/examples/scripts/utils.mjs b/examples/scripts/utils.mjs index 1cb75d2759e..236ecb7db85 100644 --- a/examples/scripts/utils.mjs +++ b/examples/scripts/utils.mjs @@ -53,14 +53,14 @@ export const getDirFiles = (path) => { * @returns {ExampleConfig} - The parsed config. */ export const parseConfig = (script) => { - const regex = /\/\/ @config ([^ \n]+) ?([^\n]+)?/g; + const regex = /\/\/ @config (\S+)(?:\s+([^\n]+))?/g; let match; /** @type {Record} */ const config = {}; while ((match = regex.exec(script)) !== null) { const key = match[1].trim(); const val = match[2]?.trim(); - config[key] = /true|false/g.test(val) ? val === 'true' : val ?? true; + config[key] = /true|false/.test(val) ? val === 'true' : val ?? true; } return config; }; @@ -89,7 +89,7 @@ export const engineFor = (type) => { */ export const patchScript = (script) => { // remove playcanvas imports - script = script.replace(/ *import[\s\w*{},]+["']playcanvas["'] *;?[\s\r\n]*/g, ''); + script = script.replace(/ *import[\s\w*{},]+["']playcanvas["'] *;?\s*/g, ''); return script; }; diff --git a/examples/src/app/components/DeviceSelector.mjs b/examples/src/app/components/DeviceSelector.mjs index 5f7c90d6e2d..cd111374bb7 100644 --- a/examples/src/app/components/DeviceSelector.mjs +++ b/examples/src/app/components/DeviceSelector.mjs @@ -1,12 +1,12 @@ -import { Component } from 'react'; import { SelectInput } from '@playcanvas/pcui/react'; +import { Component } from 'react'; -import { jsx } from '../jsx.mjs'; import { DEVICETYPE_WEBGPU, DEVICETYPE_WEBGL2, DEVICETYPE_NULL } from '../constants.mjs'; +import { jsx } from '../jsx.mjs'; const deviceTypeNames = { [DEVICETYPE_WEBGPU]: 'WebGPU', diff --git a/examples/src/app/components/ErrorBoundary.mjs b/examples/src/app/components/ErrorBoundary.mjs index 83a84532e7c..de63e82c77a 100644 --- a/examples/src/app/components/ErrorBoundary.mjs +++ b/examples/src/app/components/ErrorBoundary.mjs @@ -1,9 +1,9 @@ -import { Component } from 'react'; import { Label } from '@playcanvas/pcui/react'; +import { Component } from 'react'; import { fragment, jsx } from '../jsx.mjs'; -// eslint-disable-next-line jsdoc/require-property + /** * @typedef {object} Props * @property {import('react').ReactNode} children - The children. @@ -40,7 +40,7 @@ class ErrorBoundary extends TypedComponent { const lines = stack.split('\n'); const locations = []; lines.forEach((line) => { - const match = /\((.+):(\d+):(\d+)\)$/g.exec(line); + const match = /\((.+):(\d+):(\d+)\)$/.exec(line); if (!match) { return; } diff --git a/examples/src/app/components/Example.mjs b/examples/src/app/components/Example.mjs index 0760835a9a9..d08cc9bc07c 100644 --- a/examples/src/app/components/Example.mjs +++ b/examples/src/app/components/Example.mjs @@ -1,17 +1,16 @@ -import React, { Component } from 'react'; -import { withRouter } from 'react-router-dom'; import * as PCUI from '@playcanvas/pcui'; import * as ReactPCUI from '@playcanvas/pcui/react'; import { Panel, Container, Button, Spinner } from '@playcanvas/pcui/react'; +import React, { Component } from 'react'; +import { withRouter } from 'react-router-dom'; -import { DeviceSelector } from './DeviceSelector.mjs'; import { CodeEditorMobile } from './code-editor/CodeEditorMobile.mjs'; +import { DeviceSelector } from './DeviceSelector.mjs'; import { ErrorBoundary } from './ErrorBoundary.mjs'; - import { MIN_DESKTOP_WIDTH } from '../constants.mjs'; -import { iframePath } from '../paths.mjs'; -import { jsx, fragment } from '../jsx.mjs'; import { iframe } from '../iframe.mjs'; +import { jsx, fragment } from '../jsx.mjs'; +import { iframePath } from '../paths.mjs'; import { getOrientation } from '../utils.mjs'; /** @typedef {import('../events.js').StateEvent} StateEvent */ diff --git a/examples/src/app/components/MainLayout.mjs b/examples/src/app/components/MainLayout.mjs index 71d06e95fa7..9993870398a 100644 --- a/examples/src/app/components/MainLayout.mjs +++ b/examples/src/app/components/MainLayout.mjs @@ -1,12 +1,11 @@ +import { Container } from '@playcanvas/pcui/react'; import { Component } from 'react'; import { HashRouter, Switch, Route, Redirect } from 'react-router-dom'; -import { Container } from '@playcanvas/pcui/react'; import { CodeEditorDesktop } from './code-editor/CodeEditorDesktop.mjs'; import { Example } from './Example.mjs'; import { Menu } from './Menu.mjs'; import { SideBar } from './Sidebar.mjs'; - import { iframe } from '../iframe.mjs'; import { jsx } from '../jsx.mjs'; import { getOrientation } from '../utils.mjs'; diff --git a/examples/src/app/components/Menu.mjs b/examples/src/app/components/Menu.mjs index 6988eec216d..8f82df28ea2 100644 --- a/examples/src/app/components/Menu.mjs +++ b/examples/src/app/components/Menu.mjs @@ -1,5 +1,5 @@ -import { Component } from 'react'; import { Button, Container } from '@playcanvas/pcui/react'; +import { Component } from 'react'; import { jsx } from '../jsx.mjs'; import { logo } from '../paths.mjs'; diff --git a/examples/src/app/components/Sidebar.mjs b/examples/src/app/components/Sidebar.mjs index 6f5b1a74b4e..5d68cd3fa0d 100644 --- a/examples/src/app/components/Sidebar.mjs +++ b/examples/src/app/components/Sidebar.mjs @@ -1,14 +1,14 @@ -import { Component } from 'react'; +import { Observer } from '@playcanvas/observer'; import { BindingTwoWay, BooleanInput, Container, Label, LabelGroup, Panel, TextInput } from '@playcanvas/pcui/react'; +import { Component } from 'react'; import { Link } from 'react-router-dom'; -import { Observer } from '@playcanvas/observer'; import { exampleMetaData } from '../../../cache/metadata.mjs'; import { MIN_DESKTOP_WIDTH } from '../constants.mjs'; -import { thumbnailPath } from '../paths.mjs'; +import { iframe } from '../iframe.mjs'; import { jsx } from '../jsx.mjs'; +import { thumbnailPath } from '../paths.mjs'; import { getOrientation } from '../utils.mjs'; -import { iframe } from '../iframe.mjs'; // eslint-disable-next-line jsdoc/require-property /** @@ -209,61 +209,61 @@ class SideBar extends TypedComponent { } const { hash } = this.state; return Object.keys(categories) - .sort((a, b) => (a > b ? 1 : -1)) - .map((category) => { - return jsx( - Panel, + .sort((a, b) => (a > b ? 1 : -1)) + .map((category) => { + return jsx( + Panel, + { + key: category, + class: 'categoryPanel', + headerText: category.split('-').join(' ').toUpperCase(), + collapsible: true, + collapsed: false + }, + jsx( + 'ul', { - key: category, - class: 'categoryPanel', - headerText: category.split('-').join(' ').toUpperCase(), - collapsible: true, - collapsed: false + className: 'category-nav' }, - jsx( - 'ul', - { - className: 'category-nav' - }, - Object.keys(categories[category].examples) - .sort((a, b) => (a > b ? 1 : -1)) - .map((example) => { - const path = `/${category}/${example}`; - const isSelected = new RegExp(`${path}$`).test(hash); - const className = `nav-item ${isSelected ? 'selected' : null}`; - return jsx( - Link, + Object.keys(categories[category].examples) + .sort((a, b) => (a > b ? 1 : -1)) + .map((example) => { + const path = `/${category}/${example}`; + const isSelected = new RegExp(`${path}$`).test(hash); + const className = `nav-item ${isSelected ? 'selected' : null}`; + return jsx( + Link, + { + key: example, + to: path, + onClick: e => this._onClickExample(e, path) + }, + jsx( + 'div', + { className: className, id: `link-${category}-${example}` }, + jsx('img', { + className: 'small-thumbnail', + loading: 'lazy', + src: `${thumbnailPath}${category}_${example}_small.webp` + }), + jsx('img', { + className: 'large-thumbnail', + loading: 'lazy', + src: `${thumbnailPath}${category}_${example}_large.webp` + }), + jsx( + 'div', { - key: example, - to: path, - onClick: e => this._onClickExample(e, path) + className: 'nav-item-text' }, - jsx( - 'div', - { className: className, id: `link-${category}-${example}` }, - jsx('img', { - className: 'small-thumbnail', - loading: 'lazy', - src: thumbnailPath + `${category}_${example}_small.webp` - }), - jsx('img', { - className: 'large-thumbnail', - loading: 'lazy', - src: thumbnailPath + `${category}_${example}_large.webp` - }), - jsx( - 'div', - { - className: 'nav-item-text' - }, - example.split('-').join(' ').toUpperCase() - ) - ) - ); - }) - ) - ); - }); + example.split('-').join(' ').toUpperCase() + ) + ) + ); + }) + ) + ); + }); } render() { diff --git a/examples/src/app/components/code-editor/CodeEditorBase.mjs b/examples/src/app/components/code-editor/CodeEditorBase.mjs index c441f3f1a54..454cb1da3b8 100644 --- a/examples/src/app/components/code-editor/CodeEditorBase.mjs +++ b/examples/src/app/components/code-editor/CodeEditorBase.mjs @@ -1,11 +1,11 @@ -import { Component } from 'react'; import { loader } from '@monaco-editor/react'; +import { Component } from 'react'; -import { pcTypes } from '../../paths.mjs'; import { jsx } from '../../jsx.mjs'; +import * as languages from '../../monaco/languages/index.mjs'; import { playcanvasTheme } from '../../monaco/theme.mjs'; import { jsRules } from '../../monaco/tokenizer-rules.mjs'; -import * as languages from '../../monaco/languages/index.mjs'; +import { pcTypes } from '../../paths.mjs'; /** @typedef {import('../../events.js').StateEvent} StateEvent */ @@ -19,7 +19,7 @@ function getShowMinimap() { return showMinimap; } -// eslint-disable-next-line jsdoc/require-property + /** * @typedef {Record} Props */ @@ -90,9 +90,9 @@ class CodeEditorBase extends TypedComponent { for (const id in languages) { monaco.languages.register({ id }); // @ts-ignore - monaco.languages.setLanguageConfiguration(id, languages[id].conf); + monaco.languages.setLanguageConfiguration(id, languages[id].conf); // eslint-disable-line import/namespace // @ts-ignore - monaco.languages.setMonarchTokensProvider(id, languages[id].language); + monaco.languages.setMonarchTokensProvider(id, languages[id].language); // eslint-disable-line import/namespace } // patches highlighter tokenizer for javascript to include jsdoc @@ -104,20 +104,20 @@ class CodeEditorBase extends TypedComponent { }); fetch(pcTypes) - .then((r) => { - return r.text(); - }) - .then((playcanvasDefs) => { - // set types - monaco.languages.typescript.typescriptDefaults.addExtraLib( - playcanvasDefs, - '@playcanvas/playcanvas.d.ts' - ); - monaco.languages.typescript.javascriptDefaults.addExtraLib( - playcanvasDefs, - '@playcanvas/playcanvas.d.ts' - ); - }); + .then((r) => { + return r.text(); + }) + .then((playcanvasDefs) => { + // set types + monaco.languages.typescript.typescriptDefaults.addExtraLib( + playcanvasDefs, + '@playcanvas/playcanvas.d.ts' + ); + monaco.languages.typescript.javascriptDefaults.addExtraLib( + playcanvasDefs, + '@playcanvas/playcanvas.d.ts' + ); + }); } /** diff --git a/examples/src/app/components/code-editor/CodeEditorDesktop.mjs b/examples/src/app/components/code-editor/CodeEditorDesktop.mjs index 41324602958..9cc4069b2eb 100644 --- a/examples/src/app/components/code-editor/CodeEditorDesktop.mjs +++ b/examples/src/app/components/code-editor/CodeEditorDesktop.mjs @@ -1,10 +1,9 @@ -import { Button, Container, Panel } from '@playcanvas/pcui/react'; import MonacoEditor, { loader } from '@monaco-editor/react'; +import { Button, Container, Panel } from '@playcanvas/pcui/react'; import { CodeEditorBase } from './CodeEditorBase.mjs'; - -import { jsx } from '../../jsx.mjs'; import { iframe } from '../../iframe.mjs'; +import { jsx } from '../../jsx.mjs'; import { removeRedundantSpaces } from '../../strings.mjs'; /** @typedef {import('../../events.js').StateEvent} StateEvent */ @@ -41,7 +40,7 @@ const FILE_TYPE_LANGUAGES = { */ let monacoEditor; -// eslint-disable-next-line jsdoc/require-property + /** * @typedef {Record} Props */ @@ -191,7 +190,7 @@ class CodeEditorDesktop extends CodeEditorBase { if (!panelToggleDiv) { return; } - panelToggleDiv.addEventListener('click', function () { + panelToggleDiv.addEventListener('click', () => { codePane.classList.toggle('collapsed'); localStorage.setItem('codePaneCollapsed', codePane.classList.contains('collapsed') ? 'true' : 'false'); }); diff --git a/examples/src/app/components/code-editor/CodeEditorMobile.mjs b/examples/src/app/components/code-editor/CodeEditorMobile.mjs index d7c33d0dc83..2fd274c76a3 100644 --- a/examples/src/app/components/code-editor/CodeEditorMobile.mjs +++ b/examples/src/app/components/code-editor/CodeEditorMobile.mjs @@ -1,10 +1,9 @@ import MonacoEditor from '@monaco-editor/react'; import { CodeEditorBase } from './CodeEditorBase.mjs'; - import { jsx } from '../../jsx.mjs'; -// eslint-disable-next-line jsdoc/require-property + /** * @typedef {Record} Props */ diff --git a/examples/src/app/iframe.mjs b/examples/src/app/iframe.mjs index 541b63c41a5..b961caea186 100644 --- a/examples/src/app/iframe.mjs +++ b/examples/src/app/iframe.mjs @@ -34,7 +34,8 @@ class IFrame { } get path() { - const groups = /([\w\d-]+)_([\w\d-]+).html$/g.exec(this.window?.location.href ?? ''); + /* eslint-disable-next-line */ + const groups = /([\w-]+)_([\w-]+).html$/.exec(this.window?.location.href ?? ''); if (!groups) { return ''; } diff --git a/examples/src/app/index.mjs b/examples/src/app/index.mjs index 764ebcae388..dbdc5c4fd21 100644 --- a/examples/src/app/index.mjs +++ b/examples/src/app/index.mjs @@ -1,8 +1,8 @@ import { createRoot } from 'react-dom/client'; +import { MainLayout } from './components/MainLayout.mjs'; import { jsx } from './jsx.mjs'; -import { MainLayout } from './components/MainLayout.mjs'; import '@playcanvas/pcui/styles'; diff --git a/examples/src/app/monaco/languages/glsl.mjs b/examples/src/app/monaco/languages/glsl.mjs index 45e5dd52857..851a78349ab 100644 --- a/examples/src/app/monaco/languages/glsl.mjs +++ b/examples/src/app/monaco/languages/glsl.mjs @@ -290,4 +290,4 @@ export const language = { [/\/\/.*$/, 'comment'] ] } -}; +}; \ No newline at end of file diff --git a/examples/src/app/monaco/languages/wgsl.mjs b/examples/src/app/monaco/languages/wgsl.mjs index 6f9ae73d2fc..c5e20e11f90 100644 --- a/examples/src/app/monaco/languages/wgsl.mjs +++ b/examples/src/app/monaco/languages/wgsl.mjs @@ -482,4 +482,4 @@ export const language = { [/0[iu]?/, 'number'] // Must match last ] } -}; +}; \ No newline at end of file diff --git a/examples/src/app/monaco/tokenizer-rules.mjs b/examples/src/app/monaco/tokenizer-rules.mjs index 16feaac7efd..aaad7b5a9ab 100644 --- a/examples/src/app/monaco/tokenizer-rules.mjs +++ b/examples/src/app/monaco/tokenizer-rules.mjs @@ -12,4 +12,4 @@ export const jsRules = { [/\}/, 'comment.doc', '@pop'], [/./, 'type.identifier'] ] -}; +}; \ No newline at end of file diff --git a/examples/src/app/paths.mjs b/examples/src/app/paths.mjs index 8b09cb6e5e2..890093ad826 100644 --- a/examples/src/app/paths.mjs +++ b/examples/src/app/paths.mjs @@ -2,12 +2,12 @@ const href = typeof location !== 'undefined' ? location.href : ''; const url = new URL(href); const root = url.pathname.replace(/\/([^/]+\.html)?$/g, ''); -export const assetPath = root + '/static/assets/'; +export const assetPath = `${root}/static/assets/`; -export const pcTypes = root + '/playcanvas.d.ts'; +export const pcTypes = `${root}/playcanvas.d.ts`; -export const iframePath = root + '/iframe/'; +export const iframePath = `${root}/iframe/`; -export const thumbnailPath = root + '/thumbnails/'; +export const thumbnailPath = `${root}/thumbnails/`; -export const logo = root + '/playcanvas-logo.png'; +export const logo = `${root}/playcanvas-logo.png`; diff --git a/examples/src/app/strings.mjs b/examples/src/app/strings.mjs index b9ca69e639c..c565ec533f5 100644 --- a/examples/src/app/strings.mjs +++ b/examples/src/app/strings.mjs @@ -19,12 +19,12 @@ function capitalizeFirstLetter(string) { */ function toKebabCase(str) { return str - .replace(/([A-Z])([A-Z])/g, '$1-$2') // case for "...AO" -> '...-a-o' - .replace(/([a-z])([A-Z])/g, '$1-$2') - .replace(/([A-Z])([A-Z])([a-z])/g, '$1-$2$3') - .toLowerCase() - .replace(/(\d)d/g, '-$1d') - .replace(/--/g, '-'); + .replace(/([A-Z])([A-Z])/g, '$1-$2') // case for "...AO" -> '...-a-o' + .replace(/([a-z])([A-Z])/g, '$1-$2') + .replace(/([A-Z])([A-Z])([a-z])/g, '$1-$2$3') + .toLowerCase() + .replace(/(\d)d/g, '-$1d') + .replace(/--/g, '-'); } /** @@ -51,16 +51,16 @@ function countLeadingSpaces(str) { */ function removeRedundantSpaces(code) { const lines = code - .split('\n') - .slice(0, -1) // ignore last line - it's just used for nice template-string indentation - .filter(_ => Boolean(_.trim())) // ignore spaces-only lines - .map(countLeadingSpaces); + .split('\n') + .slice(0, -1) // ignore last line - it's just used for nice template-string indentation + .filter(_ => Boolean(_.trim())) // ignore spaces-only lines + .map(countLeadingSpaces); if (!lines.length) { return code; } const n = Math.min(...lines); const removeSpacesRegExp = new RegExp(' '.repeat(n), 'g'); - const prettyCode = code.replace(removeSpacesRegExp, '').trim() + '\n'; + const prettyCode = `${code.replace(removeSpacesRegExp, '').trim()}\n`; return prettyCode; } diff --git a/examples/src/examples/animation/blend-trees-1d.example.mjs b/examples/src/examples/animation/blend-trees-1d.example.mjs index dd583a561df..c2cd643f9c2 100644 --- a/examples/src/examples/animation/blend-trees-1d.example.mjs +++ b/examples/src/examples/animation/blend-trees-1d.example.mjs @@ -1,29 +1,29 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - idleAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/idle.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + idleAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/idle.glb` }), danceAnim: new pc.Asset('danceAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/win-dance.glb' + url: `${rootPath}/static/assets/animations/bitmoji/win-dance.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - bloom: new pc.Asset('bloom', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bloom.js' }) + bloom: new pc.Asset('bloom', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bloom.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/animation/blend-trees-2d-cartesian.controls.mjs b/examples/src/examples/animation/blend-trees-2d-cartesian.controls.mjs index 8bd8c440469..9c85e18d5f1 100644 --- a/examples/src/examples/animation/blend-trees-2d-cartesian.controls.mjs +++ b/examples/src/examples/animation/blend-trees-2d-cartesian.controls.mjs @@ -17,15 +17,15 @@ export const controls = ({ React, jsx, fragment }) => { if (e.targetTouches) { const offset = canvas.getBoundingClientRect(); position - .set(e.targetTouches[0].clientX - offset.x, e.targetTouches[0].clientY - offset.y) - .mulScalar(1 / (width / 2)) - .sub(pc.Vec2.ONE); + .set(e.targetTouches[0].clientX - offset.x, e.targetTouches[0].clientY - offset.y) + .mulScalar(1 / (width / 2)) + .sub(pc.Vec2.ONE); } else { if (e.buttons) { position - .set(e.offsetX, e.offsetY) - .mulScalar(1 / (width / 2)) - .sub(pc.Vec2.ONE); + .set(e.offsetX, e.offsetY) + .mulScalar(1 / (width / 2)) + .sub(pc.Vec2.ONE); } else { return; } @@ -114,8 +114,8 @@ export const controls = ({ React, jsx, fragment }) => { onAppStart() { const { canvas } = this; // @ts-ignore engine-tsd - const dim = window.top.controlPanel.offsetWidth + 'px'; - canvas.setAttribute('style', 'width: ' + dim + '; height: ' + dim + ';'); + const dim = `${window.top.controlPanel.offsetWidth}px`; + canvas.setAttribute('style', `width: ${dim}; height: ${dim};`); canvas.setAttribute('width', dim); canvas.setAttribute('height', dim); this.drawPosition(); diff --git a/examples/src/examples/animation/blend-trees-2d-cartesian.example.mjs b/examples/src/examples/animation/blend-trees-2d-cartesian.example.mjs index 96fd14f830a..2c23a6acb66 100644 --- a/examples/src/examples/animation/blend-trees-2d-cartesian.example.mjs +++ b/examples/src/examples/animation/blend-trees-2d-cartesian.example.mjs @@ -1,32 +1,32 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - idleAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/idle.glb' }), - walkAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/walk.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + idleAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/idle.glb` }), + walkAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/walk.glb` }), eagerAnim: new pc.Asset('idleAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/idle-eager.glb' + url: `${rootPath}/static/assets/animations/bitmoji/idle-eager.glb` }), danceAnim: new pc.Asset('danceAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/win-dance.glb' + url: `${rootPath}/static/assets/animations/bitmoji/win-dance.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - bloom: new pc.Asset('bloom', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bloom.js' }) + bloom: new pc.Asset('bloom', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bloom.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/animation/blend-trees-2d-directional.controls.mjs b/examples/src/examples/animation/blend-trees-2d-directional.controls.mjs index 8a4ba4f364f..eba5352ef5a 100644 --- a/examples/src/examples/animation/blend-trees-2d-directional.controls.mjs +++ b/examples/src/examples/animation/blend-trees-2d-directional.controls.mjs @@ -17,7 +17,7 @@ export const controls = ({ React, jsx, fragment }) => { const height = width; const halfWidth = Math.floor(width / 2); const halfHeight = Math.floor(height / 2); - canvas.setAttribute('style', 'width: ' + width + 'px; height: ' + height + 'px;'); + canvas.setAttribute('style', `width: ${width}px; height: ${height}px;`); canvas.setAttribute('width', width); canvas.setAttribute('height', height); const ctx = canvas.getContext('2d'); diff --git a/examples/src/examples/animation/blend-trees-2d-directional.example.mjs b/examples/src/examples/animation/blend-trees-2d-directional.example.mjs index 01598b069e1..3ebcd206fae 100644 --- a/examples/src/examples/animation/blend-trees-2d-directional.example.mjs +++ b/examples/src/examples/animation/blend-trees-2d-directional.example.mjs @@ -1,30 +1,30 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - idleAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/idle.glb' }), - walkAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/walk.glb' }), - jogAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/run.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + idleAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/idle.glb` }), + walkAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/walk.glb` }), + jogAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/run.glb` }), danceAnim: new pc.Asset('danceAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/win-dance.glb' + url: `${rootPath}/static/assets/animations/bitmoji/win-dance.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - bloom: new pc.Asset('bloom', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bloom.js' }) + bloom: new pc.Asset('bloom', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bloom.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/animation/component-properties.example.mjs b/examples/src/examples/animation/component-properties.example.mjs index 4e9121ed0be..e7e01b97e3a 100644 --- a/examples/src/examples/animation/component-properties.example.mjs +++ b/examples/src/examples/animation/component-properties.example.mjs @@ -1,20 +1,20 @@ // @config DESCRIPTION This example demonstrates how to use the Anim Component to animate the properties of other Components. -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { playcanvasGreyTexture: new pc.Asset('playcanvasGreyTexture', 'texture', { - url: rootPath + '/static/assets/textures/playcanvas-grey.png' + url: `${rootPath}/static/assets/textures/playcanvas-grey.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/animation/events.example.mjs b/examples/src/examples/animation/events.example.mjs index e7c967345c4..74f14bcb017 100644 --- a/examples/src/examples/animation/events.example.mjs +++ b/examples/src/examples/animation/events.example.mjs @@ -1,24 +1,24 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - walkAnim: new pc.Asset('walkAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/walk.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + walkAnim: new pc.Asset('walkAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/walk.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/table-mountain-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/table-mountain-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/animation/layer-masks.example.mjs b/examples/src/examples/animation/layer-masks.example.mjs index 8508e7931fa..3b34b3563d6 100644 --- a/examples/src/examples/animation/layer-masks.example.mjs +++ b/examples/src/examples/animation/layer-masks.example.mjs @@ -1,33 +1,33 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - idleAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/idle.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + idleAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/idle.glb` }), idleEagerAnim: new pc.Asset('idleEagerAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/idle-eager.glb' + url: `${rootPath}/static/assets/animations/bitmoji/idle-eager.glb` }), - walkAnim: new pc.Asset('walkAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/walk.glb' }), + walkAnim: new pc.Asset('walkAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/walk.glb` }), danceAnim: new pc.Asset('danceAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/win-dance.glb' + url: `${rootPath}/static/assets/animations/bitmoji/win-dance.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - bloom: new pc.Asset('bloom', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bloom.js' }) + bloom: new pc.Asset('bloom', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bloom.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -198,7 +198,7 @@ assetListLoader.load(() => { */ const drawSkeleton = (entity) => { entity.children.forEach((/** @type {pc.Entity} */ c) => { - const target = modelEntity.anim._targets[entity.path + '/graph/localPosition']; + const target = modelEntity.anim._targets[`${entity.path}/graph/localPosition`]; if (target) { app.drawLine( entity.getPosition(), diff --git a/examples/src/examples/animation/locomotion.example.mjs b/examples/src/examples/animation/locomotion.example.mjs index 6a87adb94d6..8ff126511df 100644 --- a/examples/src/examples/animation/locomotion.example.mjs +++ b/examples/src/examples/animation/locomotion.example.mjs @@ -1,14 +1,14 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('Ammo', () => resolve()); @@ -16,27 +16,27 @@ await new Promise((resolve) => { const assets = { playcanvasGreyTexture: new pc.Asset('playcanvasGreyTexture', 'texture', { - url: rootPath + '/static/assets/textures/playcanvas-grey.png' + url: `${rootPath}/static/assets/textures/playcanvas-grey.png` }), - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - idleAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/idle.glb' }), - walkAnim: new pc.Asset('walkAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/walk.glb' }), - jogAnim: new pc.Asset('jogAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/run.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + idleAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/idle.glb` }), + walkAnim: new pc.Asset('walkAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/walk.glb` }), + jogAnim: new pc.Asset('jogAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/run.glb` }), jumpAnim: new pc.Asset('jumpAnim', 'container', { - url: rootPath + '/static/assets/animations/bitmoji/jump-flip.glb' + url: `${rootPath}/static/assets/animations/bitmoji/jump-flip.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -294,7 +294,7 @@ assetListLoader.load(() => { planeEntity.render.meshInstances[0].material = material; app.root.addChild(planeEntity); - data.on('jump', function () { + data.on('jump', () => { const isJumping = characterEntity.anim.baseLayer.activeState === 'Jump'; if (!isJumping) { characterEntity.anim.setTrigger('jump'); diff --git a/examples/src/examples/animation/tween.example.mjs b/examples/src/examples/animation/tween.example.mjs index 1a24dd97a8b..239c2df3549 100644 --- a/examples/src/examples/animation/tween.example.mjs +++ b/examples/src/examples/animation/tween.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -7,14 +7,14 @@ window.focus(); await import('https://cdnjs.cloudflare.com/ajax/libs/tween.js/20.0.0/tween.umd.js'); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/animation/tween.js' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/animation/tween.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -153,7 +153,7 @@ assetListLoader.load(() => { camera.translate(0.65, -5.5, 20); app.root.addChild(camera); - app.on('update', function () { + app.on('update', () => { app.drawLines(points, colors); }); }); diff --git a/examples/src/examples/camera/first-person.example.mjs b/examples/src/examples/camera/first-person.example.mjs index 5fd3ac0cd31..8dd6c65fde2 100644 --- a/examples/src/examples/camera/first-person.example.mjs +++ b/examples/src/examples/camera/first-person.example.mjs @@ -1,16 +1,16 @@ // @config DESCRIPTION
(WASD) Move
(Space) Jump
(Mouse) Look
-import * as pc from 'playcanvas'; import { deviceType, rootPath, fileImport } from 'examples/utils'; +import * as pc from 'playcanvas'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { @@ -19,17 +19,17 @@ await new Promise((resolve) => { const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const assets = { - map: new pc.Asset('map', 'container', { url: rootPath + '/static/assets/models/fps-map.glb' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/first-person-camera.js' }), + map: new pc.Asset('map', 'container', { url: `${rootPath}/static/assets/models/fps-map.glb` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/first-person-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/morning-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/morning-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; diff --git a/examples/src/examples/camera/fly.example.mjs b/examples/src/examples/camera/fly.example.mjs index 9548dee8c84..406267320d5 100644 --- a/examples/src/examples/camera/fly.example.mjs +++ b/examples/src/examples/camera/fly.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -41,7 +41,7 @@ app.on('destroy', () => { }); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/fly-camera.js' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/fly-camera.js` }) }; /** diff --git a/examples/src/examples/camera/multi.example.mjs b/examples/src/examples/camera/multi.example.mjs index f81a4a4d37f..18123ffbef8 100644 --- a/examples/src/examples/camera/multi.example.mjs +++ b/examples/src/examples/camera/multi.example.mjs @@ -1,10 +1,10 @@ // @config DESCRIPTION
(WASDQE) Move
(LMB) Orbit, (RMB) Fly
(Scroll Wheel) zoom
(MMB / Hold Shift) Pan
(F) Focus
// @config HIDDEN -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; +import * as pc from 'playcanvas'; -const { MultiCamera } = await fileImport(rootPath + '/static/scripts/camera/multi-camera.mjs'); +const { MultiCamera } = await fileImport(`${rootPath}/static/scripts/camera/multi-camera.mjs`); const canvas = document.getElementById('application-canvas'); if (!(canvas instanceof HTMLCanvasElement)) { @@ -14,18 +14,18 @@ window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/camera/orbit.example.mjs b/examples/src/examples/camera/orbit.example.mjs index 1a05c130aca..e09c98916a3 100644 --- a/examples/src/examples/camera/orbit.example.mjs +++ b/examples/src/examples/camera/orbit.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -30,8 +30,8 @@ const app = new pc.AppBase(canvas); app.init(createOptions); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; // Set the canvas to fill the window and automatically change resolution to be the same as the canvas size diff --git a/examples/src/examples/compute/histogram.example.mjs b/examples/src/examples/compute/histogram.example.mjs index 9b7e062bfc8..cfcb8653551 100644 --- a/examples/src/examples/compute/histogram.example.mjs +++ b/examples/src/examples/compute/histogram.example.mjs @@ -1,7 +1,7 @@ // @config WEBGL_DISABLED -import * as pc from 'playcanvas'; -import { deviceType, rootPath } from 'examples/utils'; import files from 'examples/files'; +import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; // Note: the example is based on this article: // https://webgpufundamentals.org/webgpu/lessons/webgpu-compute-shaders-histogram.html @@ -11,19 +11,19 @@ const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('applic window.focus(); const assets = { - solid: new pc.Asset('solid', 'container', { url: rootPath + '/static/assets/models/icosahedron.glb' }), + solid: new pc.Asset('solid', 'container', { url: `${rootPath}/static/assets/models/icosahedron.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -98,11 +98,11 @@ assetListLoader.load(() => { shaderLanguage: pc.SHADERLANGUAGE_WGSL, cshader: files['compute-shader.wgsl'], - // format of a bind group, providing resources for the compute shader + // format of a bind group, providing resources for the compute shader computeBindGroupFormat: new pc.BindGroupFormat(device, [ - // input texture - the scene color map, without a sampler + // input texture - the scene color map, without a sampler new pc.BindTextureFormat('uSceneColorMap', pc.SHADERSTAGE_COMPUTE, undefined, undefined, false), - // output storage buffer + // output storage buffer new pc.BindStorageBufferFormat('outBuffer', pc.SHADERSTAGE_COMPUTE) ]) }) : @@ -131,7 +131,7 @@ assetListLoader.load(() => { app.root.addChild(solid); let firstFrame = true; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { // The update function runs every frame before the frame gets rendered. On the first time it // runs, the scene color map has not been rendered yet, so we skip the first frame. if (firstFrame) { diff --git a/examples/src/examples/compute/particles.example.mjs b/examples/src/examples/compute/particles.example.mjs index 591a8b94779..df3df1f455e 100644 --- a/examples/src/examples/compute/particles.example.mjs +++ b/examples/src/examples/compute/particles.example.mjs @@ -1,25 +1,25 @@ // @config WEBGL_DISABLED -import * as pc from 'playcanvas'; -import { deviceType, rootPath } from 'examples/utils'; import files from 'examples/files'; +import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -86,7 +86,7 @@ assetListLoader.load(() => { shaderLanguage: pc.SHADERLANGUAGE_WGSL, cshader: files['shader-shared.wgsl'] + files['shader-simulation.wgsl'], - // format of a uniform buffer used by the compute shader + // format of a uniform buffer used by the compute shader computeUniformBufferFormats: { ub: new pc.UniformBufferFormat(device, [ new pc.UniformFormat('count', pc.UNIFORMTYPE_UINT), @@ -95,13 +95,13 @@ assetListLoader.load(() => { ]) }, - // format of a bind group, providing resources for the compute shader + // format of a bind group, providing resources for the compute shader computeBindGroupFormat: new pc.BindGroupFormat(device, [ - // a uniform buffer we provided the format for + // a uniform buffer we provided the format for new pc.BindUniformBufferFormat('ub', pc.SHADERSTAGE_COMPUTE), - // particle storage buffer + // particle storage buffer new pc.BindStorageBufferFormat('particles', pc.SHADERSTAGE_COMPUTE), - // rad only collision spheres + // rad only collision spheres new pc.BindStorageBufferFormat('spheres', pc.SHADERSTAGE_COMPUTE, true) ]) }) : @@ -252,7 +252,7 @@ assetListLoader.load(() => { }); app.root.addChild(entity); - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { if (device.supportsCompute) { // update non-constant parameters each frame compute.setParameter('dt', dt); diff --git a/examples/src/examples/compute/texture-gen.example.mjs b/examples/src/examples/compute/texture-gen.example.mjs index 41211c180e5..543b0975aee 100644 --- a/examples/src/examples/compute/texture-gen.example.mjs +++ b/examples/src/examples/compute/texture-gen.example.mjs @@ -1,26 +1,26 @@ // @config WEBGL_DISABLED -import * as pc from 'playcanvas'; -import { deviceType, rootPath } from 'examples/utils'; import files from 'examples/files'; +import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - texture: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - solid: new pc.Asset('solid', 'container', { url: rootPath + '/static/assets/models/icosahedron.glb' }), + texture: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + solid: new pc.Asset('solid', 'container', { url: `${rootPath}/static/assets/models/icosahedron.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -96,13 +96,13 @@ assetListLoader.load(() => { ]) }, - // format of a bind group, providing resources for the compute shader + // format of a bind group, providing resources for the compute shader computeBindGroupFormat: new pc.BindGroupFormat(device, [ - // a uniform buffer we provided format for + // a uniform buffer we provided format for new pc.BindUniformBufferFormat('ub', pc.SHADERSTAGE_COMPUTE), - // input textures + // input textures new pc.BindTextureFormat('inTexture', pc.SHADERSTAGE_COMPUTE, undefined, undefined, false), - // output storage textures + // output storage textures new pc.BindStorageTextureFormat('outTexture', pc.PIXELFORMAT_RGBA8, pc.TEXTUREDIMENSION_2D) ]) }) : @@ -164,7 +164,7 @@ assetListLoader.load(() => { let time = 0; const srcTexture = assets.texture.resource; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt; if (device.supportsCompute) { diff --git a/examples/src/examples/compute/vertex-update.example.mjs b/examples/src/examples/compute/vertex-update.example.mjs index 81ebc5c65ed..5ac6d33a29c 100644 --- a/examples/src/examples/compute/vertex-update.example.mjs +++ b/examples/src/examples/compute/vertex-update.example.mjs @@ -1,28 +1,28 @@ // @config WEBGL_DISABLED -import * as pc from 'playcanvas'; -import { deviceType, rootPath } from 'examples/utils'; import files from 'examples/files'; +import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.jpg' }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.jpg' }), - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.jpg` }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.jpg` }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/table-mountain-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/table-mountain-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -118,7 +118,7 @@ assetListLoader.load(() => { shaderLanguage: pc.SHADERLANGUAGE_WGSL, cshader: files['compute-shader.wgsl'], - // format of a uniform buffer used by the compute shader + // format of a uniform buffer used by the compute shader computeUniformBufferFormats: { ub: new pc.UniformBufferFormat(device, [ new pc.UniformFormat('count', pc.UNIFORMTYPE_UINT), @@ -128,11 +128,11 @@ assetListLoader.load(() => { ]) }, - // format of a bind group, providing resources for the compute shader + // format of a bind group, providing resources for the compute shader computeBindGroupFormat: new pc.BindGroupFormat(device, [ - // a uniform buffer we provided format for + // a uniform buffer we provided format for new pc.BindUniformBufferFormat('ub', pc.SHADERSTAGE_COMPUTE), - // the vertex buffer we want to modify + // the vertex buffer we want to modify new pc.BindStorageBufferFormat('vb', pc.SHADERSTAGE_COMPUTE) ]) }) : @@ -153,7 +153,7 @@ assetListLoader.load(() => { compute.setParameter('normalOffset', normalElement?.offset / 4); // number of floats offset let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; if (entity) { // update non-constant parameters each frame diff --git a/examples/src/examples/gizmos/transform-rotate.example.mjs b/examples/src/examples/gizmos/transform-rotate.example.mjs index 4f43bf31501..68ed8e189ec 100644 --- a/examples/src/examples/gizmos/transform-rotate.example.mjs +++ b/examples/src/examples/gizmos/transform-rotate.example.mjs @@ -1,14 +1,14 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -36,8 +36,8 @@ app.setCanvasResolution(pc.RESOLUTION_AUTO); // load assets const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; /** * @param {pc.Asset[] | number[]} assetList - The asset list. diff --git a/examples/src/examples/gizmos/transform-scale.example.mjs b/examples/src/examples/gizmos/transform-scale.example.mjs index 87eefeeb4ac..7b2fae32e3a 100644 --- a/examples/src/examples/gizmos/transform-scale.example.mjs +++ b/examples/src/examples/gizmos/transform-scale.example.mjs @@ -1,14 +1,14 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -36,8 +36,8 @@ app.setCanvasResolution(pc.RESOLUTION_AUTO); // load assets const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; /** * @param {pc.Asset[] | number[]} assetList - The asset list. diff --git a/examples/src/examples/gizmos/transform-translate.example.mjs b/examples/src/examples/gizmos/transform-translate.example.mjs index 956e9cdd0e2..bf5372a42cd 100644 --- a/examples/src/examples/gizmos/transform-translate.example.mjs +++ b/examples/src/examples/gizmos/transform-translate.example.mjs @@ -1,14 +1,14 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -36,8 +36,8 @@ app.setCanvasResolution(pc.RESOLUTION_AUTO); // load assets const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; /** * @param {pc.Asset[] | number[]} assetList - The asset list. diff --git a/examples/src/examples/graphics/ambient-occlusion.example.mjs b/examples/src/examples/graphics/ambient-occlusion.example.mjs index ccafe056574..b01146cb31e 100644 --- a/examples/src/examples/graphics/ambient-occlusion.example.mjs +++ b/examples/src/examples/graphics/ambient-occlusion.example.mjs @@ -1,34 +1,34 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - laboratory: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/laboratory.glb' }), - orbit: new pc.Asset('orbit', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - ssao: new pc.Asset('ssao', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-ssao.js' }), + laboratory: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/laboratory.glb` }), + orbit: new pc.Asset('orbit', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + ssao: new pc.Asset('ssao', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-ssao.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -193,12 +193,13 @@ assetListLoader.load(() => { // if scale has changed, adjust min angle based on scale to avoid depth related artifacts const pathArray = path.split('.'); if (pathArray[2] === 'scale') { - if (value < 0.6) + if (value < 0.6) { data.set('data.ssao.minAngle', 40); - else if (value < 0.8) + } else if (value < 0.8) { data.set('data.ssao.minAngle', 20); - else + } else { data.set('data.ssao.minAngle', 10); + } } }); diff --git a/examples/src/examples/graphics/area-lights.example.mjs b/examples/src/examples/graphics/area-lights.example.mjs index faa6c60455d..da514ac46d0 100644 --- a/examples/src/examples/graphics/area-lights.example.mjs +++ b/examples/src/examples/graphics/area-lights.example.mjs @@ -1,27 +1,27 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.jpg' }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.jpg' }), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - luts: new pc.Asset('luts', 'json', { url: rootPath + '/static/assets/json/area-light-luts.json' }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.jpg` }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.jpg` }), + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + luts: new pc.Asset('luts', 'json', { url: `${rootPath}/static/assets/json/area-light-luts.json` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -242,7 +242,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt; const factor1 = (Math.sin(time) + 1) * 0.5; diff --git a/examples/src/examples/graphics/area-picker.example.mjs b/examples/src/examples/graphics/area-picker.example.mjs index 74551243bb0..642a99ee5e7 100644 --- a/examples/src/examples/graphics/area-picker.example.mjs +++ b/examples/src/examples/graphics/area-picker.example.mjs @@ -1,23 +1,23 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - bloom: new pc.Asset('bloom', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bloom.js' }), + bloom: new pc.Asset('bloom', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bloom.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -77,7 +77,7 @@ assetListLoader.load(() => { // handle mouse move event and store current mouse position to use as a position to pick from the scene new pc.Mouse(document.body).on( pc.EVENT_MOUSEMOVE, - function (event) { + (event) => { mouseX = event.x; mouseY = event.y; }, @@ -180,7 +180,7 @@ assetListLoader.load(() => { // update each frame let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt * 0.1; // orbit the camera around diff --git a/examples/src/examples/graphics/asset-viewer.example.mjs b/examples/src/examples/graphics/asset-viewer.example.mjs index e84aad07346..5f2288137c6 100644 --- a/examples/src/examples/graphics/asset-viewer.example.mjs +++ b/examples/src/examples/graphics/asset-viewer.example.mjs @@ -1,30 +1,30 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbitCamera: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + orbitCamera: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - dish: new pc.Asset('dish', 'container', { url: rootPath + '/static/assets/models/IridescentDishWithOlives.glb' }), - mosquito: new pc.Asset('mosquito', 'container', { url: rootPath + '/static/assets/models/MosquitoInAmber.glb' }), - sheen: new pc.Asset('sheen', 'container', { url: rootPath + '/static/assets/models/SheenChair.glb' }), - lamp: new pc.Asset('lamp', 'container', { url: rootPath + '/static/assets/models/StainedGlassLamp.glb' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }), - checkerboard: new pc.Asset('checkerboard', 'texture', { url: rootPath + '/static/assets/textures/checkboard.png' }) + dish: new pc.Asset('dish', 'container', { url: `${rootPath}/static/assets/models/IridescentDishWithOlives.glb` }), + mosquito: new pc.Asset('mosquito', 'container', { url: `${rootPath}/static/assets/models/MosquitoInAmber.glb` }), + sheen: new pc.Asset('sheen', 'container', { url: `${rootPath}/static/assets/models/SheenChair.glb` }), + lamp: new pc.Asset('lamp', 'container', { url: `${rootPath}/static/assets/models/StainedGlassLamp.glb` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }), + checkerboard: new pc.Asset('checkerboard', 'texture', { url: `${rootPath}/static/assets/textures/checkboard.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -239,12 +239,12 @@ assetListLoader.load(() => { // focus on mosquito jumpToAsset(3); - data.on('previous', function () { + data.on('previous', () => { jumpToAsset(-1); }); // remove light button handler - data.on('next', function () { + data.on('next', () => { jumpToAsset(1); }); }); diff --git a/examples/src/examples/graphics/batching-dynamic.example.mjs b/examples/src/examples/graphics/batching-dynamic.example.mjs index 03e8837d1a8..4579f68c781 100644 --- a/examples/src/examples/graphics/batching-dynamic.example.mjs +++ b/examples/src/examples/graphics/batching-dynamic.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -115,7 +115,7 @@ light.setLocalEulerAngles(15, 30, 0); // Set an update function on the app's update event let time = 0; -app.on('update', function (/** @type {number} */ dt) { +app.on('update', (/** @type {number} */ dt) => { time += dt; // move all entities along orbits diff --git a/examples/src/examples/graphics/clustered-area-lights.example.mjs b/examples/src/examples/graphics/clustered-area-lights.example.mjs index 51858a6ef09..5c1ab2dd92d 100644 --- a/examples/src/examples/graphics/clustered-area-lights.example.mjs +++ b/examples/src/examples/graphics/clustered-area-lights.example.mjs @@ -1,7 +1,7 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -14,17 +14,17 @@ data.set('settings', { }); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.jpg' }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.jpg' }), - luts: new pc.Asset('luts', 'json', { url: rootPath + '/static/assets/json/area-light-luts.json' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.jpg` }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.jpg` }), + luts: new pc.Asset('luts', 'json', { url: `${rootPath}/static/assets/json/area-light-luts.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // enable HDR rendering if supported displayFormat: pc.DISPLAYFORMAT_HDR diff --git a/examples/src/examples/graphics/clustered-lighting.example.mjs b/examples/src/examples/graphics/clustered-lighting.example.mjs index 69989fae006..4db6aac393e 100644 --- a/examples/src/examples/graphics/clustered-lighting.example.mjs +++ b/examples/src/examples/graphics/clustered-lighting.example.mjs @@ -1,19 +1,19 @@ // @config ENGINE performance -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/normal-map.png' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/normal-map.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // enable HDR rendering if supported displayFormat: pc.DISPLAYFORMAT_HDR @@ -217,18 +217,18 @@ assetListLoader.load(() => { // Set an update function on the app's update event let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt; // move lights along sin based waves around the cylinder - pointLightList.forEach(function (light, i) { + pointLightList.forEach((light, i) => { const angle = (i / pointLightList.length) * Math.PI * 2; const y = Math.sin(time * 0.5 + 7 * angle) * 30 + 70; light.setLocalPosition(30 * Math.sin(angle), y, 30 * Math.cos(angle)); }); // rotate spot lights around - spotLightList.forEach(function (spotlight, i) { + spotLightList.forEach((spotlight, i) => { const angle = (i / spotLightList.length) * Math.PI * 2; spotlight.setLocalPosition(40 * Math.sin(time + angle), 5, 40 * Math.cos(time + angle)); spotlight.lookAt(pc.Vec3.ZERO); diff --git a/examples/src/examples/graphics/clustered-omni-shadows.example.mjs b/examples/src/examples/graphics/clustered-omni-shadows.example.mjs index f9ce3482bda..866ce182472 100644 --- a/examples/src/examples/graphics/clustered-omni-shadows.example.mjs +++ b/examples/src/examples/graphics/clustered-omni-shadows.example.mjs @@ -1,37 +1,37 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/normal-map.png' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/normal-map.png` }), xmas_negx: new pc.Asset('xmas_negx', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_negx.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_negx.png` }), xmas_negy: new pc.Asset('xmas_negy', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_negy.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_negy.png` }), xmas_negz: new pc.Asset('xmas_negz', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_negz.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_negz.png` }), xmas_posx: new pc.Asset('xmas_posx', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_posx.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_posx.png` }), xmas_posy: new pc.Asset('xmas_posy', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_posy.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_posy.png` }), xmas_posz: new pc.Asset('xmas_posz', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_posz.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_posz.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -252,7 +252,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt * 0.3; const radius = 250; for (let i = 0; i < omniLights.length; i++) { diff --git a/examples/src/examples/graphics/clustered-spot-shadows.example.mjs b/examples/src/examples/graphics/clustered-spot-shadows.example.mjs index 0c5ae089d50..db909e45212 100644 --- a/examples/src/examples/graphics/clustered-spot-shadows.example.mjs +++ b/examples/src/examples/graphics/clustered-spot-shadows.example.mjs @@ -1,28 +1,28 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const observer = data; const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - channels: new pc.Asset('channels', 'texture', { url: rootPath + '/static/assets/textures/channels.png' }), - heart: new pc.Asset('heart', 'texture', { url: rootPath + '/static/assets/textures/heart.png' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/normal-map.png' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + channels: new pc.Asset('channels', 'texture', { url: `${rootPath}/static/assets/textures/channels.png` }), + heart: new pc.Asset('heart', 'texture', { url: `${rootPath}/static/assets/textures/heart.png` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/normal-map.png` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -293,7 +293,7 @@ assetListLoader.load(() => { } // add light button handler - data.on('add', function () { + data.on('add', () => { if (spotLightList.length < maxLights) { createLight(spotLightList.length); updateLightCount(); @@ -301,7 +301,7 @@ assetListLoader.load(() => { }); // remove light button handler - data.on('remove', function () { + data.on('remove', () => { if (spotLightList.length) { const light = spotLightList.pop(); app.root.removeChild(light); @@ -312,7 +312,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { // don't move lights around when they're static if (!lightsStatic) { time += dt * 0.15; @@ -320,7 +320,7 @@ assetListLoader.load(() => { // rotate spot lights around const lightPos = new pc.Vec3(); - spotLightList.forEach(function (spotlight, i) { + spotLightList.forEach((spotlight, i) => { const angle = (i / spotLightList.length) * Math.PI * 2; const x = 130 * Math.sin(angle + time); const z = 130 * Math.cos(angle + time); diff --git a/examples/src/examples/graphics/contact-hardening-shadows.example.mjs b/examples/src/examples/graphics/contact-hardening-shadows.example.mjs index 5002d5d72a4..ee1f328114b 100644 --- a/examples/src/examples/graphics/contact-hardening-shadows.example.mjs +++ b/examples/src/examples/graphics/contact-hardening-shadows.example.mjs @@ -1,15 +1,15 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); await new Promise((resolve) => { @@ -17,22 +17,22 @@ await new Promise((resolve) => { }); const assets = { - orbitCamera: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + orbitCamera: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - cube: new pc.Asset('cube', 'container', { url: rootPath + '/static/assets/models/playcanvas-cube.glb' }), - luts: new pc.Asset('luts', 'json', { url: rootPath + '/static/assets/json/area-light-luts.json' }), - asset: new pc.Asset('asset', 'container', { url: rootPath + '/static/assets/models/robot-arm.glb' }) + cube: new pc.Asset('cube', 'container', { url: `${rootPath}/static/assets/models/playcanvas-cube.glb` }), + luts: new pc.Asset('luts', 'json', { url: `${rootPath}/static/assets/json/area-light-luts.json` }), + asset: new pc.Asset('asset', 'container', { url: `${rootPath}/static/assets/models/robot-arm.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -304,7 +304,7 @@ assetListLoader.load(() => { let time = 0; let timeDiff = 0; let index = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { if (time === 0) { // @ts-ignore engine-tsd camera.script.orbitCamera.distance = 25; diff --git a/examples/src/examples/graphics/dispersion.example.mjs b/examples/src/examples/graphics/dispersion.example.mjs index f431eb0dc79..4f8946150a6 100644 --- a/examples/src/examples/graphics/dispersion.example.mjs +++ b/examples/src/examples/graphics/dispersion.example.mjs @@ -1,24 +1,24 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - model: new pc.Asset('cube', 'container', { url: rootPath + '/static/assets/models/dispersion-test.glb' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + model: new pc.Asset('cube', 'container', { url: `${rootPath}/static/assets/models/dispersion-test.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/dithered-transparency.example.mjs b/examples/src/examples/graphics/dithered-transparency.example.mjs index dd67efba8c9..ae3077b0d6a 100644 --- a/examples/src/examples/graphics/dithered-transparency.example.mjs +++ b/examples/src/examples/graphics/dithered-transparency.example.mjs @@ -1,7 +1,7 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -10,18 +10,18 @@ const assets = { envAtlas: new pc.Asset( 'env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/table-mountain-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/table-mountain-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - table: new pc.Asset('table', 'container', { url: rootPath + '/static/assets/models/glass-table.glb' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - diffuse: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/playcanvas.png' }) + table: new pc.Asset('table', 'container', { url: `${rootPath}/static/assets/models/glass-table.glb` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + diffuse: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/playcanvas.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // disable anti-aliasing as TAA is used to smooth edges antialias: false diff --git a/examples/src/examples/graphics/grab-pass.example.mjs b/examples/src/examples/graphics/grab-pass.example.mjs index 556836491e0..8f14534f3d4 100644 --- a/examples/src/examples/graphics/grab-pass.example.mjs +++ b/examples/src/examples/graphics/grab-pass.example.mjs @@ -1,25 +1,25 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/normal-map.png' }), - roughness: new pc.Asset('roughness', 'texture', { url: rootPath + '/static/assets/textures/pc-gray.png' }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/normal-map.png` }), + roughness: new pc.Asset('roughness', 'texture', { url: `${rootPath}/static/assets/textures/pc-gray.png` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -167,7 +167,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // rotate the primitives diff --git a/examples/src/examples/graphics/ground-fog.example.mjs b/examples/src/examples/graphics/ground-fog.example.mjs index cb0099f90a2..b3f32d26f7d 100644 --- a/examples/src/examples/graphics/ground-fog.example.mjs +++ b/examples/src/examples/graphics/ground-fog.example.mjs @@ -1,27 +1,27 @@ -import * as pc from 'playcanvas'; -import { data } from 'examples/observer'; import files from 'examples/files'; +import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - terrain: new pc.Asset('terrain', 'container', { url: rootPath + '/static/assets/models/terrain.glb' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + terrain: new pc.Asset('terrain', 'container', { url: `${rootPath}/static/assets/models/terrain.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - texture: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/clouds.jpg' }) + texture: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/clouds.jpg` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -127,7 +127,7 @@ assetListLoader.load(() => { // Create a new material with a fog shader const material = new pc.ShaderMaterial({ uniqueName: 'GroundFogShader', - vertexCode: `#define VERTEXSHADER\n` + pc.shaderChunks.screenDepthPS + files['shader.vert'], + vertexCode: `#define VERTEXSHADER\n${pc.shaderChunks.screenDepthPS}${files['shader.vert']}`, fragmentCode: pc.shaderChunks.screenDepthPS + files['shader.frag'] }); material.setParameter('uTexture', assets.texture.resource); @@ -154,7 +154,7 @@ assetListLoader.load(() => { let firstFrame = true; let currentTime = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { // on the first frame, when camera is updated, move it further away from the focus tree if (firstFrame) { firstFrame = false; diff --git a/examples/src/examples/graphics/hierarchy.example.mjs b/examples/src/examples/graphics/hierarchy.example.mjs index eba11f5e470..d31efc31245 100644 --- a/examples/src/examples/graphics/hierarchy.example.mjs +++ b/examples/src/examples/graphics/hierarchy.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -105,7 +105,7 @@ const scale = 1.7; const scaleDelta = 0.25; const spacing = 7; createChildren(root, gridSize, scale, scaleDelta, spacing, levels); -console.log('number of created entities: ' + entities.length); +console.log(`number of created entities: ${entities.length}`); // Create main camera const camera = new pc.Entity(); @@ -128,7 +128,7 @@ app.root.addChild(light); // update each frame let time = 0; -app.on('update', function (dt) { +app.on('update', (dt) => { time += dt; // rotation quaternion changing with time diff --git a/examples/src/examples/graphics/instancing-basic.example.mjs b/examples/src/examples/graphics/instancing-basic.example.mjs index a0847ea17ce..d2d33f5cd1b 100644 --- a/examples/src/examples/graphics/instancing-basic.example.mjs +++ b/examples/src/examples/graphics/instancing-basic.example.mjs @@ -1,6 +1,6 @@ // @config DESCRIPTION This example shows how to use the instancing feature of a StandardMaterial to render multiple copies of a mesh. -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -9,15 +9,15 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -121,7 +121,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let angle = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { // orbit camera around angle += dt * 0.2; camera.setLocalPosition(8 * Math.sin(angle), 0, 8 * Math.cos(angle)); diff --git a/examples/src/examples/graphics/instancing-custom.example.mjs b/examples/src/examples/graphics/instancing-custom.example.mjs index 6f9f183d0e1..da323edd8ce 100644 --- a/examples/src/examples/graphics/instancing-custom.example.mjs +++ b/examples/src/examples/graphics/instancing-custom.example.mjs @@ -1,6 +1,6 @@ // @config DESCRIPTION This example demonstrates how to customize the shader handling the instancing of a StandardMaterial. -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -9,15 +9,15 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/table-mountain-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/table-mountain-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -153,7 +153,7 @@ assetListLoader.load(() => { // An update function executes once per frame let time = 0; const spherePos = new pc.Vec3(); - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // move the large sphere up and down diff --git a/examples/src/examples/graphics/instancing-glb.example.mjs b/examples/src/examples/graphics/instancing-glb.example.mjs index 0757069b789..ee7706f6aec 100644 --- a/examples/src/examples/graphics/instancing-glb.example.mjs +++ b/examples/src/examples/graphics/instancing-glb.example.mjs @@ -1,25 +1,25 @@ // @config DESCRIPTION This example demonstrates the functionality of the EXT_mesh_gpu_instancing extension, which enables GPU instancing of meshes stored in a glTF file. -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/table-mountain-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/table-mountain-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - glb: new pc.Asset('glb', 'container', { url: rootPath + '/static/assets/models/simple-instancing.glb' }) + glb: new pc.Asset('glb', 'container', { url: `${rootPath}/static/assets/models/simple-instancing.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/instancing-gooch.example.mjs b/examples/src/examples/graphics/instancing-gooch.example.mjs index 66bab6e0405..54239802a3f 100644 --- a/examples/src/examples/graphics/instancing-gooch.example.mjs +++ b/examples/src/examples/graphics/instancing-gooch.example.mjs @@ -1,31 +1,31 @@ // @config DESCRIPTION This example demonstrates how a custom shader can be used to render instanced geometry, but also skinned, morphed and static geometry. A simple Gooch shading shader is used. -import * as pc from 'playcanvas'; import { deviceType, rootPath, fileImport } from 'examples/utils'; +import * as pc from 'playcanvas'; // import the createGoochMaterial function from the gooch-material.mjs file -const { createGoochMaterial } = await fileImport(rootPath + '/static/assets/scripts/misc/gooch-material.mjs'); +const { createGoochMaterial } = await fileImport(`${rootPath}/static/assets/scripts/misc/gooch-material.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - tree: new pc.Asset('cube', 'container', { url: rootPath + '/static/assets/models/low-poly-tree.glb' }), + tree: new pc.Asset('cube', 'container', { url: `${rootPath}/static/assets/models/low-poly-tree.glb` }), - bitmoji: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - danceAnim: new pc.Asset('walkAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/win-dance.glb' }), + bitmoji: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + danceAnim: new pc.Asset('walkAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/win-dance.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -161,7 +161,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // generate a light direction that rotates around the scene, and set it on the materials diff --git a/examples/src/examples/graphics/integer-textures.example.mjs b/examples/src/examples/graphics/integer-textures.example.mjs index 7cb67974f50..bf7ea5e95ae 100644 --- a/examples/src/examples/graphics/integer-textures.example.mjs +++ b/examples/src/examples/graphics/integer-textures.example.mjs @@ -1,8 +1,8 @@ // @config DESCRIPTION
  • Click to add sand
  • Shift-click to remove sand
  • Press space to reset.
-import * as pc from 'playcanvas'; -import { data } from 'examples/observer'; import files from 'examples/files'; +import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -28,24 +28,24 @@ const TEXTURE_WIDTH = TEXTURE_HEIGHT * TEXTURE_RATIO; // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -272,7 +272,7 @@ assetListLoader.load(() => { ); let mouseState = 0; - mouse.on(pc.EVENT_MOUSEDOWN, function (event) { + mouse.on(pc.EVENT_MOUSEDOWN, (event) => { if (event.button === pc.MOUSEBUTTON_LEFT) { if (keyboard.isPressed(pc.KEY_SHIFT)) { mouseState = 2; @@ -283,7 +283,7 @@ assetListLoader.load(() => { mouseState = 2; } }); - mouse.on(pc.EVENT_MOUSEUP, function () { + mouse.on(pc.EVENT_MOUSEUP, () => { mouseState = 0; }); @@ -291,7 +291,7 @@ assetListLoader.load(() => { const planePoint = new pc.Vec3(); const mousePos = new pc.Vec2(); const mouseUniform = new Float32Array(2); - mouse.on(pc.EVENT_MOUSEMOVE, function (event) { + mouse.on(pc.EVENT_MOUSEMOVE, (event) => { const x = event.x; const y = event.y; @@ -310,7 +310,7 @@ assetListLoader.load(() => { }); let passNum = 0; - app.on('update', function (/** @type {number} */) { + app.on('update', (/** @type {number} */) => { mouseUniform[0] = mousePos.x; mouseUniform[1] = mousePos.y; diff --git a/examples/src/examples/graphics/layers.example.mjs b/examples/src/examples/graphics/layers.example.mjs index 96587dd3d97..dd01f6ee4ed 100644 --- a/examples/src/examples/graphics/layers.example.mjs +++ b/examples/src/examples/graphics/layers.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -105,7 +105,7 @@ blueBox.addComponent('render', { blueBox.setLocalScale(2.5, 2.5, 2.5); app.root.addChild(blueBox); -app.on('update', function (dt) { +app.on('update', (dt) => { if (redBox) { redBox.rotate(0, 10 * dt, 0); } diff --git a/examples/src/examples/graphics/light-physical-units.example.mjs b/examples/src/examples/graphics/light-physical-units.example.mjs index 425bf429ad6..5445695e229 100644 --- a/examples/src/examples/graphics/light-physical-units.example.mjs +++ b/examples/src/examples/graphics/light-physical-units.example.mjs @@ -1,30 +1,30 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbitCamera: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + orbitCamera: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - lights: new pc.Asset('lights', 'container', { url: rootPath + '/static/assets/models/Lights.glb' }), - sheen: new pc.Asset('sheen', 'container', { url: rootPath + '/static/assets/models/SheenChair.glb' }), - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.jpg' }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.jpg' }), - luts: new pc.Asset('luts', 'json', { url: rootPath + '/static/assets/json/area-light-luts.json' }) + lights: new pc.Asset('lights', 'container', { url: `${rootPath}/static/assets/models/Lights.glb` }), + sheen: new pc.Asset('sheen', 'container', { url: `${rootPath}/static/assets/models/SheenChair.glb` }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.jpg` }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.jpg` }), + luts: new pc.Asset('luts', 'json', { url: `${rootPath}/static/assets/json/area-light-luts.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -292,7 +292,7 @@ assetListLoader.load(() => { let resizeControlPanel = true; let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // resize control panel to fit the content better diff --git a/examples/src/examples/graphics/lights-baked-a-o.example.mjs b/examples/src/examples/graphics/lights-baked-a-o.example.mjs index 72918fb6414..e77d9537116 100644 --- a/examples/src/examples/graphics/lights-baked-a-o.example.mjs +++ b/examples/src/examples/graphics/lights-baked-a-o.example.mjs @@ -1,7 +1,7 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -10,17 +10,17 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - house: new pc.Asset('house', 'container', { url: rootPath + '/static/assets/models/house.glb' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + house: new pc.Asset('house', 'container', { url: `${rootPath}/static/assets/models/house.glb` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -244,14 +244,14 @@ assetListLoader.load(() => { }); // Set an update function on the app's update event - app.on('update', function (dt) { + app.on('update', (dt) => { // bake lightmaps when HUD properties change if (needBake) { needBake = false; app.lightmapper.bake(null, bakeType); // update stats with the bake duration - data.set('data.stats.duration', app.lightmapper.stats.totalRenderTime.toFixed(1) + 'ms'); + data.set('data.stats.duration', `${app.lightmapper.stats.totalRenderTime.toFixed(1)}ms`); } }); }); diff --git a/examples/src/examples/graphics/lights-baked.example.mjs b/examples/src/examples/graphics/lights-baked.example.mjs index bd18dfbb236..ae04064f204 100644 --- a/examples/src/examples/graphics/lights-baked.example.mjs +++ b/examples/src/examples/graphics/lights-baked.example.mjs @@ -1,14 +1,14 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -134,7 +134,7 @@ app.lightmapper.bake(null, pc.BAKE_COLORDIR); // Set an update function on the app's update event let time = 4; -app.on('update', function (dt) { +app.on('update', (dt) => { time += dt; // orbit camera diff --git a/examples/src/examples/graphics/lights.example.mjs b/examples/src/examples/graphics/lights.example.mjs index d4c8503aa31..7a04c940f15 100644 --- a/examples/src/examples/graphics/lights.example.mjs +++ b/examples/src/examples/graphics/lights.example.mjs @@ -1,6 +1,6 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -15,32 +15,32 @@ function createMaterial(colors) { } const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - heart: new pc.Asset('heart', 'texture', { url: rootPath + '/static/assets/textures/heart.png' }), + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + heart: new pc.Asset('heart', 'texture', { url: `${rootPath}/static/assets/textures/heart.png` }), xmas_negx: new pc.Asset('xmas_negx', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_negx.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_negx.png` }), xmas_negy: new pc.Asset('xmas_negy', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_negy.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_negy.png` }), xmas_negz: new pc.Asset('xmas_negz', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_negz.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_negz.png` }), xmas_posx: new pc.Asset('xmas_posx', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_posx.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_posx.png` }), xmas_posy: new pc.Asset('xmas_posy', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_posy.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_posy.png` }), xmas_posz: new pc.Asset('xmas_posz', 'texture', { - url: rootPath + '/static/assets/cubemaps/xmas_faces/xmas_posz.png' + url: `${rootPath}/static/assets/cubemaps/xmas_faces/xmas_posz.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -218,7 +218,7 @@ assetListLoader.load(() => { // Allow user to toggle individual lights app.keyboard.on( 'keydown', - function (e) { + (e) => { // if the user is editing an input field, ignore key presses if (e.element.constructor.name === 'HTMLInputElement') return; switch (e.key) { @@ -238,7 +238,7 @@ assetListLoader.load(() => { // Simple update loop to rotate the light let angleRad = 1; - app.on('update', function (dt) { + app.on('update', (dt) => { angleRad += 0.3 * dt; if (entity) { lights.spot.lookAt(new pc.Vec3(0, -5, 0)); diff --git a/examples/src/examples/graphics/lines.example.mjs b/examples/src/examples/graphics/lines.example.mjs index 58e58ea32a9..ed9c605e94c 100644 --- a/examples/src/examples/graphics/lines.example.mjs +++ b/examples/src/examples/graphics/lines.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,15 +8,15 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -122,7 +122,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // generate grid of lines - store positions and colors as an arrays of numbers instead of diff --git a/examples/src/examples/graphics/lit-material.example.mjs b/examples/src/examples/graphics/lit-material.example.mjs index 648b47fed2a..27b519e68d9 100644 --- a/examples/src/examples/graphics/lit-material.example.mjs +++ b/examples/src/examples/graphics/lit-material.example.mjs @@ -1,28 +1,28 @@ // @config HIDDEN -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbitCamera: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + orbitCamera: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }), - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.jpg' }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.jpg' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.jpg` }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.jpg` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -150,7 +150,7 @@ assetListLoader.load(() => { app.root.addChild(primitive); let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt; material.setParameter('material_specularRgb', [ (Math.sin(time) + 1.0) * 0.5, diff --git a/examples/src/examples/graphics/material-anisotropic.example.mjs b/examples/src/examples/graphics/material-anisotropic.example.mjs index 9f335a730f2..f0c99c8795f 100644 --- a/examples/src/examples/graphics/material-anisotropic.example.mjs +++ b/examples/src/examples/graphics/material-anisotropic.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/material-clear-coat.example.mjs b/examples/src/examples/graphics/material-clear-coat.example.mjs index bb3359e0f91..29bdc44c618 100644 --- a/examples/src/examples/graphics/material-clear-coat.example.mjs +++ b/examples/src/examples/graphics/material-clear-coat.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,18 +8,18 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/flakes5n.png' }), - diffuse: new pc.Asset('diffuse', 'texture', { url: rootPath + '/static/assets/textures/flakes5c.png' }), - other: new pc.Asset('other', 'texture', { url: rootPath + '/static/assets/textures/flakes5o.png' }) + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/flakes5n.png` }), + diffuse: new pc.Asset('diffuse', 'texture', { url: `${rootPath}/static/assets/textures/flakes5c.png` }), + other: new pc.Asset('other', 'texture', { url: `${rootPath}/static/assets/textures/flakes5o.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -126,7 +126,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { // rotate camera around the objects time += dt; camera.setLocalPosition(3 * Math.sin(time * 0.5), 0, 3 * Math.cos(time * 0.5)); diff --git a/examples/src/examples/graphics/material-physical.example.mjs b/examples/src/examples/graphics/material-physical.example.mjs index f670410a2cf..92eb2c38134 100644 --- a/examples/src/examples/graphics/material-physical.example.mjs +++ b/examples/src/examples/graphics/material-physical.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -121,7 +121,7 @@ assetListLoader.load(() => { let y = 0; const rot = new pc.Quat(); - mouse.on('mousemove', function (event) { + mouse.on('mousemove', (event) => { if (event.buttons[pc.MOUSEBUTTON_LEFT]) { x += event.dx; y += event.dy; diff --git a/examples/src/examples/graphics/material-translucent-specular.example.mjs b/examples/src/examples/graphics/material-translucent-specular.example.mjs index 0525de81242..61ccd509579 100644 --- a/examples/src/examples/graphics/material-translucent-specular.example.mjs +++ b/examples/src/examples/graphics/material-translucent-specular.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/material-transparency.example.mjs b/examples/src/examples/graphics/material-transparency.example.mjs index b9c396779ba..7945f114d73 100644 --- a/examples/src/examples/graphics/material-transparency.example.mjs +++ b/examples/src/examples/graphics/material-transparency.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // disable anti-aliasing to make dithering more pronounced antialias: false, diff --git a/examples/src/examples/graphics/mesh-decals.example.mjs b/examples/src/examples/graphics/mesh-decals.example.mjs index e6df95f26d0..e4b677068ce 100644 --- a/examples/src/examples/graphics/mesh-decals.example.mjs +++ b/examples/src/examples/graphics/mesh-decals.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - heart: new pc.Asset('heart', 'texture', { url: rootPath + '/static/assets/textures/heart.png' }) + heart: new pc.Asset('heart', 'texture', { url: `${rootPath}/static/assets/textures/heart.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // enable HDR rendering if supported displayFormat: pc.DISPLAYFORMAT_HDR diff --git a/examples/src/examples/graphics/mesh-deformation.example.mjs b/examples/src/examples/graphics/mesh-deformation.example.mjs index 421b23356ad..fe1f80fe796 100644 --- a/examples/src/examples/graphics/mesh-deformation.example.mjs +++ b/examples/src/examples/graphics/mesh-deformation.example.mjs @@ -1,23 +1,23 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -94,7 +94,7 @@ assetListLoader.load(() => { const tempPositions = []; let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; if (entity) { diff --git a/examples/src/examples/graphics/mesh-generation.example.mjs b/examples/src/examples/graphics/mesh-generation.example.mjs index b386ffae3d8..2e4fda9d1a9 100644 --- a/examples/src/examples/graphics/mesh-generation.example.mjs +++ b/examples/src/examples/graphics/mesh-generation.example.mjs @@ -1,19 +1,19 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { playcanvasGrey: new pc.Asset('playcanvasGrey', 'texture', { - url: rootPath + '/static/assets/textures/playcanvas-grey.png' + url: `${rootPath}/static/assets/textures/playcanvas-grey.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -182,7 +182,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // Move the lights along circles, also keep separate list of their position for faster update in next block of code diff --git a/examples/src/examples/graphics/mesh-morph-many.example.mjs b/examples/src/examples/graphics/mesh-morph-many.example.mjs index cb8973c30bd..54303cd9ef4 100644 --- a/examples/src/examples/graphics/mesh-morph-many.example.mjs +++ b/examples/src/examples/graphics/mesh-morph-many.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - morph: new pc.Asset('glb', 'container', { url: rootPath + '/static/assets/models/morph-stress-test.glb' }) + morph: new pc.Asset('glb', 'container', { url: `${rootPath}/static/assets/models/morph-stress-test.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -85,7 +85,7 @@ assetListLoader.load(() => { // update function called once per frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // modify weights of all morph targets along sin curve diff --git a/examples/src/examples/graphics/mesh-morph.example.mjs b/examples/src/examples/graphics/mesh-morph.example.mjs index ad3b17cec80..87f21a20bc6 100644 --- a/examples/src/examples/graphics/mesh-morph.example.mjs +++ b/examples/src/examples/graphics/mesh-morph.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -183,7 +183,7 @@ for (let k = 0; k < 3; k++) { // update function called once per frame let time = 0; -app.on('update', function (dt) { +app.on('update', (dt) => { time += dt; for (let m = 0; m < morphInstances.length; m++) { diff --git a/examples/src/examples/graphics/model-asset.example.mjs b/examples/src/examples/graphics/model-asset.example.mjs index 4fedeef00b6..e798d2d7248 100644 --- a/examples/src/examples/graphics/model-asset.example.mjs +++ b/examples/src/examples/graphics/model-asset.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -75,7 +75,7 @@ assetListLoader.load(() => { light.translate(5, 0, 15); app.root.addChild(light); - app.on('update', function (dt) { + app.on('update', (dt) => { if (entity) { entity.rotate(0, 10 * dt, 0); } diff --git a/examples/src/examples/graphics/model-outline.example.mjs b/examples/src/examples/graphics/model-outline.example.mjs index 59e4cef0377..b2b228dcfa0 100644 --- a/examples/src/examples/graphics/model-outline.example.mjs +++ b/examples/src/examples/graphics/model-outline.example.mjs @@ -1,16 +1,16 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - outline: new pc.Asset('outline', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-outline.js' }) + outline: new pc.Asset('outline', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-outline.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); device.maxPixelRatio = Math.min(window.devicePixelRatio, 2); @@ -174,7 +174,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // rotate the camera around the objects diff --git a/examples/src/examples/graphics/model-textured-box.example.mjs b/examples/src/examples/graphics/model-textured-box.example.mjs index 2b0105cf81a..acfbab6d675 100644 --- a/examples/src/examples/graphics/model-textured-box.example.mjs +++ b/examples/src/examples/graphics/model-textured-box.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - clouds: new pc.Asset('clouds', 'texture', { url: rootPath + '/static/assets/textures/clouds.jpg' }) + clouds: new pc.Asset('clouds', 'texture', { url: `${rootPath}/static/assets/textures/clouds.jpg` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -84,7 +84,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let angle = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { angle += dt; if (angle > 360) { angle = 0; diff --git a/examples/src/examples/graphics/multi-render-targets.example.mjs b/examples/src/examples/graphics/multi-render-targets.example.mjs index 485201df84f..4907699f58f 100644 --- a/examples/src/examples/graphics/multi-render-targets.example.mjs +++ b/examples/src/examples/graphics/multi-render-targets.example.mjs @@ -1,31 +1,31 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - board: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/chess-board.glb' }), + board: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/chess-board.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -105,7 +105,7 @@ assetListLoader.load(() => { // render to multiple targets if supported const colorBuffers = [texture0, texture1, texture2]; const renderTarget = new pc.RenderTarget({ - name: `MRT`, + name: 'MRT', colorBuffers: colorBuffers, depth: true, flipY: !app.graphicsDevice.isWebGPU, @@ -160,7 +160,7 @@ assetListLoader.load(() => { // update things every frame let angle = 1; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { angle += dt; // orbit the camera around diff --git a/examples/src/examples/graphics/multi-view.example.mjs b/examples/src/examples/graphics/multi-view.example.mjs index 051f0268ccc..f0eba0ca40c 100644 --- a/examples/src/examples/graphics/multi-view.example.mjs +++ b/examples/src/examples/graphics/multi-view.example.mjs @@ -1,15 +1,15 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); await new Promise((resolve) => { @@ -17,20 +17,20 @@ await new Promise((resolve) => { }); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - board: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/chess-board.glb' }) + board: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/chess-board.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -181,7 +181,7 @@ assetListLoader.load(() => { // update function called once per frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // orbit camera left around diff --git a/examples/src/examples/graphics/normals-and-tangents.example.mjs b/examples/src/examples/graphics/normals-and-tangents.example.mjs index bf6780eecf6..67708177ecd 100644 --- a/examples/src/examples/graphics/normals-and-tangents.example.mjs +++ b/examples/src/examples/graphics/normals-and-tangents.example.mjs @@ -1,25 +1,25 @@ // @config HIDDEN -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbitCamera: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + orbitCamera: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/NormalTangentTest.glb' }) + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/NormalTangentTest.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/outlines-colored.example.mjs b/examples/src/examples/graphics/outlines-colored.example.mjs index f0882104d6c..7bfef730010 100644 --- a/examples/src/examples/graphics/outlines-colored.example.mjs +++ b/examples/src/examples/graphics/outlines-colored.example.mjs @@ -1,32 +1,32 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - laboratory: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/laboratory.glb' }), - orbit: new pc.Asset('orbit', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - ssao: new pc.Asset('ssao', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-ssao.js' }), + laboratory: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/laboratory.glb` }), + orbit: new pc.Asset('orbit', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + ssao: new pc.Asset('ssao', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-ssao.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -103,9 +103,9 @@ assetListLoader.load(() => { const outlineRenderer = new pc.OutlineRenderer(app); // add entities to the outline renderer - outlineRenderer.addEntity(laboratoryEntity.findByName("Weltkugel"), pc.Color.RED); - outlineRenderer.addEntity(laboratoryEntity.findByName("Stuhl"), pc.Color.WHITE); - outlineRenderer.addEntity(laboratoryEntity.findByName("Teleskop"), pc.Color.GREEN); + outlineRenderer.addEntity(laboratoryEntity.findByName('Weltkugel'), pc.Color.RED); + outlineRenderer.addEntity(laboratoryEntity.findByName('Stuhl'), pc.Color.WHITE); + outlineRenderer.addEntity(laboratoryEntity.findByName('Teleskop'), pc.Color.GREEN); app.on('update', (/** @type {number} */ dt) => { diff --git a/examples/src/examples/graphics/paint-mesh.example.mjs b/examples/src/examples/graphics/paint-mesh.example.mjs index a12e3f7244d..fd3ce1dd99f 100644 --- a/examples/src/examples/graphics/paint-mesh.example.mjs +++ b/examples/src/examples/graphics/paint-mesh.example.mjs @@ -1,6 +1,6 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -10,17 +10,17 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }, { srgb: true }), - decal: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/heart.png' }, { srgb: true }) + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }, { srgb: true }), + decal: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/heart.png` }, { srgb: true }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -172,7 +172,7 @@ assetListLoader.load(() => { let time = 0; let decalTime = 0; const decalFrequency = 0.5; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt * 0.7; // a decal projection box is an orthographic projection from some position. We calculate position diff --git a/examples/src/examples/graphics/painter.example.mjs b/examples/src/examples/graphics/painter.example.mjs index 647a864f10d..6dd7aac630b 100644 --- a/examples/src/examples/graphics/painter.example.mjs +++ b/examples/src/examples/graphics/painter.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -162,7 +162,7 @@ const pos = new pc.Vec3(); const usedBrushes = []; // update things each frame -app.on('update', function (dt) { +app.on('update', (dt) => { // if the last brush stroke is finished, generate new random one if (progress >= 1) { progress = 0; diff --git a/examples/src/examples/graphics/particles-anim-index.example.mjs b/examples/src/examples/graphics/particles-anim-index.example.mjs index fa90d71e2df..77f5097edd9 100644 --- a/examples/src/examples/graphics/particles-anim-index.example.mjs +++ b/examples/src/examples/graphics/particles-anim-index.example.mjs @@ -1,19 +1,19 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { particlesNumbers: new pc.Asset('particlesNumbers', 'texture', { - url: rootPath + '/static/assets/textures/particles-numbers.png' + url: `${rootPath}/static/assets/textures/particles-numbers.png` }, { srgb: true }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/particles-mesh.example.mjs b/examples/src/examples/graphics/particles-mesh.example.mjs index ab98ce2cb77..c645c0403df 100644 --- a/examples/src/examples/graphics/particles-mesh.example.mjs +++ b/examples/src/examples/graphics/particles-mesh.example.mjs @@ -1,25 +1,25 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - torus: new pc.Asset('heart', 'container', { url: rootPath + '/static/assets/models/torus.glb' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), + torus: new pc.Asset('heart', 'container', { url: `${rootPath}/static/assets/models/torus.glb` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/particles-random-sprites.example.mjs b/examples/src/examples/graphics/particles-random-sprites.example.mjs index 9c14ca43529..fe8086384cd 100644 --- a/examples/src/examples/graphics/particles-random-sprites.example.mjs +++ b/examples/src/examples/graphics/particles-random-sprites.example.mjs @@ -1,22 +1,22 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { particlesCoinsTexture: new pc.Asset('particlesCoinsTexture', 'texture', { - url: rootPath + '/static/assets/textures/particles-coins.png' + url: `${rootPath}/static/assets/textures/particles-coins.png` }, { srgb: true }), particlesBonusTexture: new pc.Asset('particlesBonusTexture', 'texture', { - url: rootPath + '/static/assets/textures/particles-bonus.png' + url: `${rootPath}/static/assets/textures/particles-bonus.png` }, { srgb: true }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/particles-snow.example.mjs b/examples/src/examples/graphics/particles-snow.example.mjs index 5bf75d85c17..73a4ca7a6c0 100644 --- a/examples/src/examples/graphics/particles-snow.example.mjs +++ b/examples/src/examples/graphics/particles-snow.example.mjs @@ -1,19 +1,19 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - snowflake: new pc.Asset('snowflake', 'texture', { url: rootPath + '/static/assets/textures/snowflake.png' }, { srgb: true }) + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + snowflake: new pc.Asset('snowflake', 'texture', { url: `${rootPath}/static/assets/textures/snowflake.png` }, { srgb: true }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/particles-spark.example.mjs b/examples/src/examples/graphics/particles-spark.example.mjs index 2671743825f..e533744c02c 100644 --- a/examples/src/examples/graphics/particles-spark.example.mjs +++ b/examples/src/examples/graphics/particles-spark.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - spark: new pc.Asset('spark', 'texture', { url: rootPath + '/static/assets/textures/spark.png' }, { srgb: true }) + spark: new pc.Asset('spark', 'texture', { url: `${rootPath}/static/assets/textures/spark.png` }, { srgb: true }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/point-cloud-simulation.example.mjs b/examples/src/examples/graphics/point-cloud-simulation.example.mjs index 4cf9d6dc245..8eef341f177 100644 --- a/examples/src/examples/graphics/point-cloud-simulation.example.mjs +++ b/examples/src/examples/graphics/point-cloud-simulation.example.mjs @@ -1,14 +1,14 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -113,7 +113,7 @@ app.root.addChild(entity); // Set an update function on the app's update event let time = 0, previousTime; -app.on('update', function (dt) { +app.on('update', (dt) => { previousTime = time; time += dt; @@ -147,8 +147,9 @@ app.on('update', function (dt) { } // once a second change how many points are visible - if (Math.round(time) !== Math.round(previousTime)) + if (Math.round(time) !== Math.round(previousTime)) { visiblePoints = Math.floor(50000 + Math.random() * maxNumPoints - 50000); + } // update mesh vertices updateMesh(mesh); diff --git a/examples/src/examples/graphics/point-cloud.example.mjs b/examples/src/examples/graphics/point-cloud.example.mjs index 362ea53496a..9c5c31fefd6 100644 --- a/examples/src/examples/graphics/point-cloud.example.mjs +++ b/examples/src/examples/graphics/point-cloud.example.mjs @@ -1,14 +1,14 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -24,7 +24,7 @@ const app = new pc.AppBase(canvas); app.init(createOptions); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -70,9 +70,9 @@ assetListLoader.load(() => { const renderComponents = entity.findComponents('render'); // for all render components - renderComponents.forEach(function (/** @type {pc.RenderComponent} */ render) { + renderComponents.forEach((/** @type {pc.RenderComponent} */ render) => { // For all meshes in the render component, assign new material - render.meshInstances.forEach(function (meshInstance) { + render.meshInstances.forEach((meshInstance) => { meshInstance.material = material; }); @@ -81,7 +81,7 @@ assetListLoader.load(() => { }); let currentTime = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { // Update the time and pass it to shader currentTime += dt; material.setParameter('uTime', currentTime); diff --git a/examples/src/examples/graphics/portal.example.mjs b/examples/src/examples/graphics/portal.example.mjs index 6ec2b42f93e..3b4256164c3 100644 --- a/examples/src/examples/graphics/portal.example.mjs +++ b/examples/src/examples/graphics/portal.example.mjs @@ -1,6 +1,6 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -9,18 +9,18 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - portal: new pc.Asset('portal', 'container', { url: rootPath + '/static/assets/models/portal.glb' }), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - bitmoji: new pc.Asset('bitmoji', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }) + portal: new pc.Asset('portal', 'container', { url: `${rootPath}/static/assets/models/portal.glb` }), + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + bitmoji: new pc.Asset('bitmoji', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/graphics/post-effects.example.mjs b/examples/src/examples/graphics/post-effects.example.mjs index 5b6fd0e989d..79730452414 100644 --- a/examples/src/examples/graphics/post-effects.example.mjs +++ b/examples/src/examples/graphics/post-effects.example.mjs @@ -1,39 +1,39 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - board: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/chess-board.glb' }), - bloom: new pc.Asset('bloom', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bloom.js' }), - bokeh: new pc.Asset('bokeh', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-bokeh.js' }), - sepia: new pc.Asset('sepia', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-sepia.js' }), + board: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/chess-board.glb` }), + bloom: new pc.Asset('bloom', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bloom.js` }), + bokeh: new pc.Asset('bokeh', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-bokeh.js` }), + sepia: new pc.Asset('sepia', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-sepia.js` }), vignette: new pc.Asset('vignette', 'script', { - url: rootPath + '/static/scripts/posteffects/posteffect-vignette.js' + url: `${rootPath}/static/scripts/posteffects/posteffect-vignette.js` }), - ssao: new pc.Asset('ssao', 'script', { url: rootPath + '/static/scripts/posteffects/posteffect-ssao.js' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }), + ssao: new pc.Asset('ssao', 'script', { url: `${rootPath}/static/scripts/posteffects/posteffect-ssao.js` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -183,7 +183,7 @@ assetListLoader.load(() => { // Allow user to toggle individual post effects app.keyboard.on( 'keydown', - function (e) { + (e) => { // if the user is editing an input field, ignore key presses if (e.element.constructor.name === 'HTMLInputElement') return; switch (e.key) { @@ -237,7 +237,7 @@ assetListLoader.load(() => { // update things every frame let angle = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { angle += dt; // rotate the skydome diff --git a/examples/src/examples/graphics/post-processing.example.mjs b/examples/src/examples/graphics/post-processing.example.mjs index bc4cb11b675..9b73ca371c4 100644 --- a/examples/src/examples/graphics/post-processing.example.mjs +++ b/examples/src/examples/graphics/post-processing.example.mjs @@ -1,35 +1,35 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - platform: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/scifi-platform.glb' }), - mosquito: new pc.Asset('mosquito', 'container', { url: rootPath + '/static/assets/models/MosquitoInAmber.glb' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + platform: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/scifi-platform.glb` }), + mosquito: new pc.Asset('mosquito', 'container', { url: `${rootPath}/static/assets/models/MosquitoInAmber.glb` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // The scene is rendered to an antialiased texture, so we disable antialiasing on the canvas // to avoid the additional cost. This is only used for the UI which renders on top of the @@ -312,7 +312,7 @@ assetListLoader.load(() => { // update things every frame let angle = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { angle += dt; // scale the boxes diff --git a/examples/src/examples/graphics/reflection-box.example.mjs b/examples/src/examples/graphics/reflection-box.example.mjs index 55a88a193b1..c9fa239703b 100644 --- a/examples/src/examples/graphics/reflection-box.example.mjs +++ b/examples/src/examples/graphics/reflection-box.example.mjs @@ -1,20 +1,20 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script1: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - script2: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/utils/cubemap-renderer.js' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/normal-map.png' }) + script1: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + script2: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/utils/cubemap-renderer.js` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/normal-map.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -147,14 +147,14 @@ assetListLoader.load(() => { 'style', 'display: block; width: 1px; height: 1px; position: absolute; opacity: 0; z-index: -1000; top: 0px; pointer-events: none' ); - video.src = rootPath + '/static/assets/video/SampleVideo_1280x720_1mb.mp4'; + video.src = `${rootPath}/static/assets/video/SampleVideo_1280x720_1mb.mp4`; document.body.append(video); - video.addEventListener('canplaythrough', function () { + video.addEventListener('canplaythrough', () => { videoTexture.setSource(video); }); // Listen for the 'loadedmetadata' event to resize the texture appropriately - video.addEventListener('loadedmetadata', function () { + video.addEventListener('loadedmetadata', () => { videoTexture.resize(video.videoWidth, video.videoHeight); }); @@ -315,7 +315,7 @@ assetListLoader.load(() => { let time = 0; let updateProbeCount = 1; let updateVideo = true; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt * 0.3; // Update the video data to the texture every other frame diff --git a/examples/src/examples/graphics/reflection-cubemap.example.mjs b/examples/src/examples/graphics/reflection-cubemap.example.mjs index ca7c59a43fd..7541c5d42b5 100644 --- a/examples/src/examples/graphics/reflection-cubemap.example.mjs +++ b/examples/src/examples/graphics/reflection-cubemap.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/utils/cubemap-renderer.js' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/utils/cubemap-renderer.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -249,7 +249,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // rotate primitives around their center and also orbit them around the shiny sphere diff --git a/examples/src/examples/graphics/reflection-planar.example.mjs b/examples/src/examples/graphics/reflection-planar.example.mjs index 93e279e6c55..3f3f48a81a7 100644 --- a/examples/src/examples/graphics/reflection-planar.example.mjs +++ b/examples/src/examples/graphics/reflection-planar.example.mjs @@ -1,6 +1,6 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -9,17 +9,17 @@ const assets = { envatlas: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/utils/planar-renderer.js' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/utils/planar-renderer.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -173,7 +173,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // rotate primitives around their center and also orbit them around the shiny sphere diff --git a/examples/src/examples/graphics/render-asset.example.mjs b/examples/src/examples/graphics/render-asset.example.mjs index 5e5530b1a86..5898ff61a25 100644 --- a/examples/src/examples/graphics/render-asset.example.mjs +++ b/examples/src/examples/graphics/render-asset.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,17 +8,17 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - cube: new pc.Asset('cube', 'container', { url: rootPath + '/static/assets/models/playcanvas-cube.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + cube: new pc.Asset('cube', 'container', { url: `${rootPath}/static/assets/models/playcanvas-cube.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -83,7 +83,7 @@ assetListLoader.load(() => { app.scene.skyboxMip = 1; // spin the meshes - app.on('update', function (dt) { + app.on('update', (dt) => { if (cubeEntities[0]) { cubeEntities[0].rotate(3 * dt, 10 * dt, 6 * dt); } diff --git a/examples/src/examples/graphics/render-pass.example.mjs b/examples/src/examples/graphics/render-pass.example.mjs index 7fac150a672..2bbe6ca5a42 100644 --- a/examples/src/examples/graphics/render-pass.example.mjs +++ b/examples/src/examples/graphics/render-pass.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -33,25 +33,25 @@ class RenderPassTint extends pc.RenderPassShaderQuad { // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - board: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/chess-board.glb' }), + board: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/chess-board.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -149,7 +149,7 @@ assetListLoader.load(() => { // update things every frame let angle = 3; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { angle += dt; // move the focus position in the world diff --git a/examples/src/examples/graphics/render-to-texture.example.mjs b/examples/src/examples/graphics/render-to-texture.example.mjs index 7e7e490449f..c7eab5273d7 100644 --- a/examples/src/examples/graphics/render-to-texture.example.mjs +++ b/examples/src/examples/graphics/render-to-texture.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -17,17 +17,17 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - checkerboard: new pc.Asset('checkerboard', 'texture', { url: rootPath + '/static/assets/textures/checkboard.png' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + checkerboard: new pc.Asset('checkerboard', 'texture', { url: `${rootPath}/static/assets/textures/checkboard.png` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -150,7 +150,7 @@ assetListLoader.load(() => { addressV: pc.ADDRESS_CLAMP_TO_EDGE }); const renderTarget = new pc.RenderTarget({ - name: `RT`, + name: 'RT', colorBuffer: texture, depth: true, flipY: !app.graphicsDevice.isWebGPU, @@ -263,7 +263,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; let switchTime = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { // rotate texture camera around the objects time += dt; textureCamera.setLocalPosition(12 * Math.sin(time), 3, 12 * Math.cos(time)); diff --git a/examples/src/examples/graphics/shader-burn.example.mjs b/examples/src/examples/graphics/shader-burn.example.mjs index 15295c0e71f..834a7f9ceb8 100644 --- a/examples/src/examples/graphics/shader-burn.example.mjs +++ b/examples/src/examples/graphics/shader-burn.example.mjs @@ -1,19 +1,19 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), - clouds: new pc.Asset('clouds', 'texture', { url: rootPath + '/static/assets/textures/clouds.jpg' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), + clouds: new pc.Asset('clouds', 'texture', { url: `${rootPath}/static/assets/textures/clouds.jpg` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // Enable HDR rendering if supported displayFormat: pc.DISPLAYFORMAT_HDR @@ -112,7 +112,7 @@ assetListLoader.load(() => { material.update(); let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += 0.2 * dt; // reverse time diff --git a/examples/src/examples/graphics/shader-compile.example.mjs b/examples/src/examples/graphics/shader-compile.example.mjs index b94fc5a3f5c..af43f6e5da1 100644 --- a/examples/src/examples/graphics/shader-compile.example.mjs +++ b/examples/src/examples/graphics/shader-compile.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,22 +8,22 @@ window.focus(); pc.Tracing.set(pc.TRACEID_SHADER_COMPILE, true); const assets = { - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.jpg' }), - normal: new pc.Asset('normal', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.jpg' }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.jpg' }), - luts: new pc.Asset('luts', 'json', { url: rootPath + '/static/assets/json/area-light-luts.json' }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.jpg` }), + normal: new pc.Asset('normal', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.jpg` }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.jpg` }), + luts: new pc.Asset('luts', 'json', { url: `${rootPath}/static/assets/json/area-light-luts.json` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -174,11 +174,11 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt; // orbit spot lights around - lights.forEach(function (light, i) { + lights.forEach((light, i) => { const angle = (i / lights.length) * Math.PI * 2; light.setLocalPosition(8 * Math.sin(time + angle), 4, 8 * Math.cos(time + angle)); }); diff --git a/examples/src/examples/graphics/shader-hatch.example.mjs b/examples/src/examples/graphics/shader-hatch.example.mjs index 2a14c08f107..800012b959f 100644 --- a/examples/src/examples/graphics/shader-hatch.example.mjs +++ b/examples/src/examples/graphics/shader-hatch.example.mjs @@ -1,41 +1,41 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; +import * as pc from 'playcanvas'; // import the createHatchMaterial function from the hatch-material.mjs file -const { createHatchMaterial } = await fileImport(rootPath + '/static/assets/scripts/misc/hatch-material.mjs'); +const { createHatchMaterial } = await fileImport(`${rootPath}/static/assets/scripts/misc/hatch-material.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - board: new pc.Asset('board', 'container', { url: rootPath + '/static/assets/models/chess-board.glb' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + board: new pc.Asset('board', 'container', { url: `${rootPath}/static/assets/models/chess-board.glb` }), - bitmoji: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - danceAnim: new pc.Asset('walkAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/win-dance.glb' }), - morph: new pc.Asset('glb', 'container', { url: rootPath + '/static/assets/models/morph-stress-test.glb' }), + bitmoji: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + danceAnim: new pc.Asset('walkAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/win-dance.glb` }), + morph: new pc.Asset('glb', 'container', { url: `${rootPath}/static/assets/models/morph-stress-test.glb` }), // hatch textures, sorted from light to dark - hatch0: new pc.Asset('hatch0', 'texture', { url: rootPath + '/static/assets/textures/hatch-0.jpg' }, { srgb: true }), - hatch1: new pc.Asset('hatch1', 'texture', { url: rootPath + '/static/assets/textures/hatch-1.jpg' }, { srgb: true }), - hatch2: new pc.Asset('hatch2', 'texture', { url: rootPath + '/static/assets/textures/hatch-2.jpg' }, { srgb: true }), - hatch3: new pc.Asset('hatch3', 'texture', { url: rootPath + '/static/assets/textures/hatch-3.jpg' }, { srgb: true }), - hatch4: new pc.Asset('hatch4', 'texture', { url: rootPath + '/static/assets/textures/hatch-4.jpg' }, { srgb: true }), - hatch5: new pc.Asset('hatch5', 'texture', { url: rootPath + '/static/assets/textures/hatch-5.jpg' }, { srgb: true }) + hatch0: new pc.Asset('hatch0', 'texture', { url: `${rootPath}/static/assets/textures/hatch-0.jpg` }, { srgb: true }), + hatch1: new pc.Asset('hatch1', 'texture', { url: `${rootPath}/static/assets/textures/hatch-1.jpg` }, { srgb: true }), + hatch2: new pc.Asset('hatch2', 'texture', { url: `${rootPath}/static/assets/textures/hatch-2.jpg` }, { srgb: true }), + hatch3: new pc.Asset('hatch3', 'texture', { url: `${rootPath}/static/assets/textures/hatch-3.jpg` }, { srgb: true }), + hatch4: new pc.Asset('hatch4', 'texture', { url: `${rootPath}/static/assets/textures/hatch-4.jpg` }, { srgb: true }), + hatch5: new pc.Asset('hatch5', 'texture', { url: `${rootPath}/static/assets/textures/hatch-5.jpg` }, { srgb: true }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const createOptions = new pc.AppOptions(); @@ -182,7 +182,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // generate a light direction that rotates around the scene, and set it on the materials diff --git a/examples/src/examples/graphics/shader-toon.example.mjs b/examples/src/examples/graphics/shader-toon.example.mjs index 13a66f213bd..e2b5cf0b6ef 100644 --- a/examples/src/examples/graphics/shader-toon.example.mjs +++ b/examples/src/examples/graphics/shader-toon.example.mjs @@ -1,18 +1,18 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -101,7 +101,7 @@ assetListLoader.load(() => { material.update(); // rotate the statue - app.on('update', function (dt) { + app.on('update', (dt) => { entity.rotate(0, 60 * dt, 0); }); }); diff --git a/examples/src/examples/graphics/shader-wobble.example.mjs b/examples/src/examples/graphics/shader-wobble.example.mjs index b3824db67b2..6384aa9317d 100644 --- a/examples/src/examples/graphics/shader-wobble.example.mjs +++ b/examples/src/examples/graphics/shader-wobble.example.mjs @@ -1,18 +1,18 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -107,7 +107,7 @@ assetListLoader.load(() => { material.update(); let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // set time parameter for the shader diff --git a/examples/src/examples/graphics/shadow-cascades.example.mjs b/examples/src/examples/graphics/shadow-cascades.example.mjs index 0797500be81..3183266c8c6 100644 --- a/examples/src/examples/graphics/shadow-cascades.example.mjs +++ b/examples/src/examples/graphics/shadow-cascades.example.mjs @@ -1,25 +1,25 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - terrain: new pc.Asset('terrain', 'container', { url: rootPath + '/static/assets/models/terrain.glb' }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + terrain: new pc.Asset('terrain', 'container', { url: `${rootPath}/static/assets/models/terrain.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -177,7 +177,7 @@ assetListLoader.load(() => { const cloudSpeed = 0.2; let frameNumber = 0; let time = 0; - app.on('update', function (/** @type {number} */ dt) { + app.on('update', (/** @type {number} */ dt) => { time += dt; // on the first frame, when camera is updated, move it further away from the focus tree diff --git a/examples/src/examples/graphics/shapes.example.mjs b/examples/src/examples/graphics/shapes.example.mjs index caf5101a842..f88674d97bf 100644 --- a/examples/src/examples/graphics/shapes.example.mjs +++ b/examples/src/examples/graphics/shapes.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -45,7 +45,7 @@ const shapes = ['box', 'plane', 'cone', 'cylinder', 'sphere', 'capsule']; let x = -1, y = -1; -shapes.forEach(function (shape) { +shapes.forEach((shape) => { // Create an entity with a render component const entity = new pc.Entity(shape); entity.addComponent('render', { diff --git a/examples/src/examples/graphics/sky.example.mjs b/examples/src/examples/graphics/sky.example.mjs index a077c3ff024..b27fff0d17f 100644 --- a/examples/src/examples/graphics/sky.example.mjs +++ b/examples/src/examples/graphics/sky.example.mjs @@ -1,31 +1,31 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }), hdri_street: new pc.Asset( 'hdri', 'texture', - { url: rootPath + '/static/assets/hdri/wide-street.hdr' }, + { url: `${rootPath}/static/assets/hdri/wide-street.hdr` }, { mipmaps: false } ), hdri_room: new pc.Asset( 'hdri', 'texture', - { url: rootPath + '/static/assets/hdri/empty-room.hdr' }, + { url: `${rootPath}/static/assets/hdri/empty-room.hdr` }, { mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // enable HDR rendering if supported displayFormat: pc.DISPLAYFORMAT_HDR diff --git a/examples/src/examples/graphics/taa.example.mjs b/examples/src/examples/graphics/taa.example.mjs index 3ca4af656ef..36f517414fd 100644 --- a/examples/src/examples/graphics/taa.example.mjs +++ b/examples/src/examples/graphics/taa.example.mjs @@ -1,26 +1,26 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, fileImport } from 'examples/utils'; -const { CameraFrame } = await fileImport(rootPath + '/static/assets/scripts/misc/camera-frame.mjs'); +import * as pc from 'playcanvas'; +const { CameraFrame } = await fileImport(`${rootPath}/static/assets/scripts/misc/camera-frame.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - house: new pc.Asset('house', 'container', { url: rootPath + '/static/assets/models/pbr-house.glb' }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + house: new pc.Asset('house', 'container', { url: `${rootPath}/static/assets/models/pbr-house.glb` }), envatlas: new pc.Asset( 'env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/table-mountain-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/table-mountain-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // disable anti-aliasing as TAA is used to smooth edges antialias: false diff --git a/examples/src/examples/graphics/texture-array.example.mjs b/examples/src/examples/graphics/texture-array.example.mjs index 4d0e2729334..ed7dfe77feb 100644 --- a/examples/src/examples/graphics/texture-array.example.mjs +++ b/examples/src/examples/graphics/texture-array.example.mjs @@ -1,7 +1,7 @@ -import * as pc from 'playcanvas'; -import { data } from 'examples/observer'; import files from 'examples/files'; +import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -46,17 +46,17 @@ function generateMipmaps(width, height) { } const assets = { - rockyTrail: new pc.Asset('rockyTrail', 'texture', { url: rootPath + '/static/assets/textures/rocky_trail_diff_1k.jpg' }, { srgb: true }), - rockBoulder: new pc.Asset('rockBoulder', 'texture', { url: rootPath + '/static/assets/textures/rock_boulder_cracked_diff_1k.jpg' }, { srgb: true }), - coastSand: new pc.Asset('coastSand', 'texture', { url: rootPath + '/static/assets/textures/coast_sand_rocks_02_diff_1k.jpg' }, { srgb: true }), - aerialRocks: new pc.Asset('aeralRocks', 'texture', { url: rootPath + '/static/assets/textures/aerial_rocks_02_diff_1k.jpg' }, { srgb: true }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + rockyTrail: new pc.Asset('rockyTrail', 'texture', { url: `${rootPath}/static/assets/textures/rocky_trail_diff_1k.jpg` }, { srgb: true }), + rockBoulder: new pc.Asset('rockBoulder', 'texture', { url: `${rootPath}/static/assets/textures/rock_boulder_cracked_diff_1k.jpg` }, { srgb: true }), + coastSand: new pc.Asset('coastSand', 'texture', { url: `${rootPath}/static/assets/textures/coast_sand_rocks_02_diff_1k.jpg` }, { srgb: true }), + aerialRocks: new pc.Asset('aeralRocks', 'texture', { url: `${rootPath}/static/assets/textures/aerial_rocks_02_diff_1k.jpg` }, { srgb: true }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -223,7 +223,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let angle = 0; let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; angle = (angle + dt * 10) % 360; diff --git a/examples/src/examples/graphics/texture-basis.example.mjs b/examples/src/examples/graphics/texture-basis.example.mjs index dbc12af2b60..0cfb0b35524 100644 --- a/examples/src/examples/graphics/texture-basis.example.mjs +++ b/examples/src/examples/graphics/texture-basis.example.mjs @@ -1,37 +1,37 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); // initialize basis pc.basisInitialize({ - glueUrl: rootPath + '/static/lib/basis/basis.wasm.js', - wasmUrl: rootPath + '/static/lib/basis/basis.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/basis/basis.js' + glueUrl: `${rootPath}/static/lib/basis/basis.wasm.js`, + wasmUrl: `${rootPath}/static/lib/basis/basis.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/basis/basis.js` }); const assets = { - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.basis' }, { srgb: true }), - gloss: new pc.Asset('gloss', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-gloss.basis' }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.basis` }, { srgb: true }), + gloss: new pc.Asset('gloss', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-gloss.basis` }), normal: new pc.Asset( 'normal', 'texture', - { url: rootPath + '/static/assets/textures/seaside-rocks01-normal.basis' }, + { url: `${rootPath}/static/assets/textures/seaside-rocks01-normal.basis` }, { type: pc.TEXTURETYPE_SWIZZLEGGGR } ), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -122,7 +122,7 @@ assetListLoader.load(() => { // Set an update function on the app's update event let angle = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { angle = (angle + dt * 10) % 360; // Rotate the boxes diff --git a/examples/src/examples/graphics/transform-feedback.example.mjs b/examples/src/examples/graphics/transform-feedback.example.mjs index dec30a2bfce..be71a4603e1 100644 --- a/examples/src/examples/graphics/transform-feedback.example.mjs +++ b/examples/src/examples/graphics/transform-feedback.example.mjs @@ -1,15 +1,15 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -25,7 +25,7 @@ const app = new pc.AppBase(canvas); app.init(createOptions); const assets = { - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -151,7 +151,7 @@ assetListLoader.load(() => { // update things each frame let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { // rotate camera around time += dt; camera.setLocalPosition(9 * Math.sin(time * 0.2), 6, 25 * Math.cos(time * 0.2)); diff --git a/examples/src/examples/graphics/video-texture.example.mjs b/examples/src/examples/graphics/video-texture.example.mjs index 96c69bbbc45..18960d2e99d 100644 --- a/examples/src/examples/graphics/video-texture.example.mjs +++ b/examples/src/examples/graphics/video-texture.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -23,7 +23,7 @@ const app = new pc.AppBase(canvas); app.init(createOptions); const assets = { - tv: new pc.Asset('tv', 'container', { url: rootPath + '/static/assets/models/tv.glb' }) + tv: new pc.Asset('tv', 'container', { url: `${rootPath}/static/assets/models/tv.glb` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -94,15 +94,15 @@ assetListLoader.load(() => { 'display: block; width: 1px; height: 1px; position: absolute; opacity: 0; z-index: -1000; top: 0px; pointer-events: none' ); - video.src = rootPath + '/static/assets/video/SampleVideo_1280x720_1mb.mp4'; + video.src = `${rootPath}/static/assets/video/SampleVideo_1280x720_1mb.mp4`; document.body.append(video); - video.addEventListener('canplaythrough', function () { + video.addEventListener('canplaythrough', () => { videoTexture.setSource(video); }); // Listen for the 'loadedmetadata' event to resize the texture appropriately - video.addEventListener('loadedmetadata', function () { + video.addEventListener('loadedmetadata', () => { videoTexture.resize(video.videoWidth, video.videoHeight); }); @@ -123,7 +123,7 @@ assetListLoader.load(() => { video.load(); const mouse = new pc.Mouse(document.body); - mouse.on('mousedown', function (event) { + mouse.on('mousedown', (event) => { if (entity && event.buttons[pc.MOUSEBUTTON_LEFT]) { video.muted = !video.muted; } @@ -131,7 +131,7 @@ assetListLoader.load(() => { let upload = false; let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt; // rotate the tv object diff --git a/examples/src/examples/graphics/wgsl-shader.example.mjs b/examples/src/examples/graphics/wgsl-shader.example.mjs index dfde9dfc678..04ffa48d5ea 100644 --- a/examples/src/examples/graphics/wgsl-shader.example.mjs +++ b/examples/src/examples/graphics/wgsl-shader.example.mjs @@ -1,8 +1,8 @@ // @config WEBGL_DISABLED // @config HIDDEN -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -11,8 +11,8 @@ window.focus(); // and twgsl to compile shaders used internally by the engine. const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/input/gamepad.example.mjs b/examples/src/examples/input/gamepad.example.mjs index b85fe31f977..a78486fb4c6 100644 --- a/examples/src/examples/input/gamepad.example.mjs +++ b/examples/src/examples/input/gamepad.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -10,16 +10,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -68,7 +68,7 @@ assetListLoader.load(() => { app.root.addChild(entity); const gamepads = new pc.GamePads(); - app.on('update', function () { + app.on('update', () => { gamepads.update(); if (gamepads.isPressed(pc.PAD_1, pc.PAD_LEFT)) { entity.rotate(0, -1, 0); diff --git a/examples/src/examples/input/keyboard.example.mjs b/examples/src/examples/input/keyboard.example.mjs index 8e0305ebc87..bcf10e4426f 100644 --- a/examples/src/examples/input/keyboard.example.mjs +++ b/examples/src/examples/input/keyboard.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -65,7 +65,7 @@ assetListLoader.load(() => { app.root.addChild(entity); const keyboard = new pc.Keyboard(document.body); - app.on('update', function () { + app.on('update', () => { if (keyboard.isPressed(pc.KEY_LEFT)) { entity.rotate(0, -1, 0); } diff --git a/examples/src/examples/input/mouse.example.mjs b/examples/src/examples/input/mouse.example.mjs index 24cd054c849..cfeaedd97a0 100644 --- a/examples/src/examples/input/mouse.example.mjs +++ b/examples/src/examples/input/mouse.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,16 +8,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - statue: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/statue.glb' }) + statue: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/statue.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -69,7 +69,7 @@ assetListLoader.load(() => { let x = 0; const y = 0; - mouse.on('mousemove', function (event) { + mouse.on('mousemove', (event) => { if (event.buttons[pc.MOUSEBUTTON_LEFT]) { x += event.dx; diff --git a/examples/src/examples/loaders/bundle.example.mjs b/examples/src/examples/loaders/bundle.example.mjs index 5c313929c29..a4237a02f07 100644 --- a/examples/src/examples/loaders/bundle.example.mjs +++ b/examples/src/examples/loaders/bundle.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; // The example demonstrates loading multiple assets from a single bundle file @@ -21,8 +21,8 @@ assets.bundle.data = { assets: [assets.scene.id, assets.torus.id] }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -92,7 +92,7 @@ assetListLoader.load(() => { let time = 0; let activeCamera = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time -= dt; entityTorus.rotateLocal(360 * dt, 0, 0); diff --git a/examples/src/examples/loaders/draco-glb.example.mjs b/examples/src/examples/loaders/draco-glb.example.mjs index a361cac01a6..70d79ea58e3 100644 --- a/examples/src/examples/loaders/draco-glb.example.mjs +++ b/examples/src/examples/loaders/draco-glb.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('DracoDecoderModule', () => resolve()); @@ -15,8 +15,8 @@ await new Promise((resolve) => { const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -43,7 +43,7 @@ app.on('destroy', () => { }); const assets = { - heart: new pc.Asset('heart', 'container', { url: rootPath + '/static/assets/models/heart_draco.glb' }) + heart: new pc.Asset('heart', 'container', { url: `${rootPath}/static/assets/models/heart_draco.glb` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -76,7 +76,7 @@ assetListLoader.load(() => { light.setLocalPosition(1, 1, 5); app.root.addChild(light); - app.on('update', function (dt) { + app.on('update', (dt) => { if (entity) { entity.rotate(4 * dt, -20 * dt, 0); } diff --git a/examples/src/examples/loaders/glb.example.mjs b/examples/src/examples/loaders/glb.example.mjs index 55a6aab5f99..e20c8ed0033 100644 --- a/examples/src/examples/loaders/glb.example.mjs +++ b/examples/src/examples/loaders/glb.example.mjs @@ -1,5 +1,5 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -8,13 +8,13 @@ window.focus(); // lights and cameras, and switches between the cameras every 2 seconds. const assets = { - scene: new pc.Asset('scene', 'container', { url: rootPath + '/static/assets/models/geometry-camera-light.glb' }) + scene: new pc.Asset('scene', 'container', { url: `${rootPath}/static/assets/models/geometry-camera-light.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -78,7 +78,7 @@ assetListLoader.load(() => { let time = 0; let activeCamera = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time -= dt; // change the camera every few seconds diff --git a/examples/src/examples/loaders/gltf-export.example.mjs b/examples/src/examples/loaders/gltf-export.example.mjs index fc61797319e..08ed1e6e2c7 100644 --- a/examples/src/examples/loaders/gltf-export.example.mjs +++ b/examples/src/examples/loaders/gltf-export.example.mjs @@ -1,6 +1,6 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -18,9 +18,9 @@ appInner.appendChild(div); // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { - glueUrl: rootPath + '/static/lib/draco/draco.wasm.js', - wasmUrl: rootPath + '/static/lib/draco/draco.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/draco/draco.js' + glueUrl: `${rootPath}/static/lib/draco/draco.wasm.js`, + wasmUrl: `${rootPath}/static/lib/draco/draco.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/draco/draco.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('DracoDecoderModule', () => resolve(true)); @@ -28,29 +28,29 @@ await new Promise((resolve) => { // initialize basis to allow to load compressed textures pc.basisInitialize({ - glueUrl: rootPath + '/static/lib/basis/basis.wasm.js', - wasmUrl: rootPath + '/static/lib/basis/basis.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/basis/basis.js' + glueUrl: `${rootPath}/static/lib/basis/basis.wasm.js`, + wasmUrl: `${rootPath}/static/lib/basis/basis.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/basis/basis.js` }); const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - bench: new pc.Asset('bench', 'container', { url: rootPath + '/static/assets/models/bench_wooden_01.glb' }), - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - board: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/chess-board.glb' }), - boombox: new pc.Asset('statue', 'container', { url: rootPath + '/static/assets/models/boom-box.glb' }), - color: new pc.Asset('color', 'texture', { url: rootPath + '/static/assets/textures/seaside-rocks01-color.basis' }) + bench: new pc.Asset('bench', 'container', { url: `${rootPath}/static/assets/models/bench_wooden_01.glb` }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + board: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/chess-board.glb` }), + boombox: new pc.Asset('statue', 'container', { url: `${rootPath}/static/assets/models/boom-box.glb` }), + color: new pc.Asset('color', 'texture', { url: `${rootPath}/static/assets/textures/seaside-rocks01-color.basis` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -142,17 +142,17 @@ assetListLoader.load(() => { }; new pc.GltfExporter() - .build(app.root, options) - .then((arrayBuffer) => { - const blob = new Blob([arrayBuffer], { type: 'application/octet-stream' }); + .build(app.root, options) + .then((arrayBuffer) => { + const blob = new Blob([arrayBuffer], { type: 'application/octet-stream' }); - // @ts-ignore - link.href = URL.createObjectURL(blob); - }) - .catch(console.error); + // @ts-ignore + link.href = URL.createObjectURL(blob); + }) + .catch(console.error); // when clicking on the download UI button, trigger the download - data.on('download', function () { + data.on('download', () => { link.click(); }); }); diff --git a/examples/src/examples/loaders/gsplat-many.example.mjs b/examples/src/examples/loaders/gsplat-many.example.mjs index 8925628c90f..c1d26e79997 100644 --- a/examples/src/examples/loaders/gsplat-many.example.mjs +++ b/examples/src/examples/loaders/gsplat-many.example.mjs @@ -1,15 +1,15 @@ -import * as pc from 'playcanvas'; -import { data } from 'examples/observer'; import files from 'examples/files'; +import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // disable antialiasing as gaussian splats do not benefit from it and it's expensive antialias: false @@ -47,10 +47,10 @@ app.on('destroy', () => { }); const assets = { - gallery: new pc.Asset('gallery', 'container', { url: rootPath + '/static/assets/models/vr-gallery.glb' }), - guitar: new pc.Asset('gsplat', 'gsplat', { url: rootPath + '/static/assets/splats/guitar.ply' }), - biker: new pc.Asset('gsplat', 'gsplat', { url: rootPath + '/static/assets/splats/biker.ply' }), - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + gallery: new pc.Asset('gallery', 'container', { url: `${rootPath}/static/assets/models/vr-gallery.glb` }), + guitar: new pc.Asset('gsplat', 'gsplat', { url: `${rootPath}/static/assets/splats/guitar.ply` }), + biker: new pc.Asset('gsplat', 'gsplat', { url: `${rootPath}/static/assets/splats/biker.ply` }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -133,7 +133,7 @@ assetListLoader.load(() => { }); let currentTime = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { currentTime += dt; const material = guitar.gsplat?.material; diff --git a/examples/src/examples/loaders/gsplat.example.mjs b/examples/src/examples/loaders/gsplat.example.mjs index 86d0c59b867..74beb79b6bd 100644 --- a/examples/src/examples/loaders/gsplat.example.mjs +++ b/examples/src/examples/loaders/gsplat.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, // disable antialiasing as gaussian splats do not benefit from it and it's expensive antialias: false @@ -45,8 +45,8 @@ app.on('destroy', () => { }); const assets = { - biker: new pc.Asset('gsplat', 'gsplat', { url: rootPath + '/static/assets/splats/biker.ply' }), - orbit: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + biker: new pc.Asset('gsplat', 'gsplat', { url: `${rootPath}/static/assets/splats/biker.ply` }), + orbit: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); diff --git a/examples/src/examples/loaders/loaders-gl.example.mjs b/examples/src/examples/loaders/loaders-gl.example.mjs index 01ecd398195..dc0453dcc8e 100644 --- a/examples/src/examples/loaders/loaders-gl.example.mjs +++ b/examples/src/examples/loaders/loaders-gl.example.mjs @@ -1,7 +1,7 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, loadES5, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -13,8 +13,8 @@ const DRACO = await loadES5('https://cdn.jsdelivr.net/npm/@loaders.gl/draco@2.3. // Note that many additional formats are supported by the library and can be used. const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; /** @type {pc.GraphicsDevice} */ @@ -101,10 +101,10 @@ camera.translate(-20, 15, 20); camera.lookAt(0, 7, 0); app.root.addChild(camera); // Load the draco model, don't wait for it. -loadModel(rootPath + '/static/assets/models/park_points.drc'); +loadModel(`${rootPath}/static/assets/models/park_points.drc`); // update things each frame let time = 0; -app.on('update', function (dt) { +app.on('update', (dt) => { time += dt; // orbit the camera if (camera) { diff --git a/examples/src/examples/loaders/obj.example.mjs b/examples/src/examples/loaders/obj.example.mjs index 175de1439e8..0cc4c20f72a 100644 --- a/examples/src/examples/loaders/obj.example.mjs +++ b/examples/src/examples/loaders/obj.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -41,19 +41,19 @@ app.on('destroy', () => { app.scene.ambientLight = new pc.Color(0.2, 0.2, 0.2); -const objurl = rootPath + '/static/assets/models/monkey.obj'; -const scripturl = rootPath + '/static/scripts/parsers/obj-model.js'; +const objurl = `${rootPath}/static/assets/models/monkey.obj`; +const scripturl = `${rootPath}/static/scripts/parsers/obj-model.js`; /** @type {pc.Entity} */ let entity; -app.assets.loadFromUrl(scripturl, 'script', function () { +app.assets.loadFromUrl(scripturl, 'script', () => { // OBJ Parser is not enabled by default in engine. Add the parser to the model resource handler // set up obj parser // @ts-ignore globally loaded ObjModelParser - app.loader.getHandler('model').addParser(new ObjModelParser(app.graphicsDevice), function (url) { + app.loader.getHandler('model').addParser(new ObjModelParser(app.graphicsDevice), (url) => { return pc.path.getExtension(url) === '.obj'; }); - app.assets.loadFromUrl(objurl, 'model', function (err, asset) { + app.assets.loadFromUrl(objurl, 'model', (err, asset) => { app.start(); entity = new pc.Entity(); @@ -90,7 +90,7 @@ light.addComponent('light', { light.translate(5, 0, 15); app.root.addChild(light); -app.on('update', function (dt) { +app.on('update', (dt) => { if (entity) { entity.rotate(0, 100 * dt, 0); } diff --git a/examples/src/examples/loaders/usdz-export.example.mjs b/examples/src/examples/loaders/usdz-export.example.mjs index 4ce4cacdf1e..59effb2e8fa 100644 --- a/examples/src/examples/loaders/usdz-export.example.mjs +++ b/examples/src/examples/loaders/usdz-export.example.mjs @@ -1,6 +1,6 @@ -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -20,16 +20,16 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - bench: new pc.Asset('bench', 'container', { url: rootPath + '/static/assets/models/bench_wooden_01.glb' }) + bench: new pc.Asset('bench', 'container', { url: `${rootPath}/static/assets/models/bench_wooden_01.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -87,25 +87,25 @@ assetListLoader.load(() => { }; new pc.UsdzExporter() - .build(entity, options) - .then((arrayBuffer) => { - const blob = new Blob([arrayBuffer], { type: 'application/octet-stream' }); - // On iPhone Safari, this link creates a clickable AR link on the screen. When this is clicked, - // the download of the .asdz file triggers its opening in QuickLook AT mode. - // In other browsers, this simply downloads the generated .asdz file. - - // @ts-ignore - link.href = URL.createObjectURL(blob); - }) - .catch(console.error); + .build(entity, options) + .then((arrayBuffer) => { + const blob = new Blob([arrayBuffer], { type: 'application/octet-stream' }); + // On iPhone Safari, this link creates a clickable AR link on the screen. When this is clicked, + // the download of the .asdz file triggers its opening in QuickLook AT mode. + // In other browsers, this simply downloads the generated .asdz file. + + // @ts-ignore + link.href = URL.createObjectURL(blob); + }) + .catch(console.error); // when clicking on the download UI button, trigger the download - data.on('download', function () { + data.on('download', () => { link.click(); }); // spin the meshe - app.on('update', function (dt) { + app.on('update', (dt) => { if (entity) { entity.rotate(0, -12 * dt, 0); } diff --git a/examples/src/examples/misc/editor.example.mjs b/examples/src/examples/misc/editor.example.mjs index 0b70e37a5eb..f50f1670de3 100644 --- a/examples/src/examples/misc/editor.example.mjs +++ b/examples/src/examples/misc/editor.example.mjs @@ -1,7 +1,7 @@ // @config DESCRIPTION
Translate (1), Rotate (2), Scale (3)
World/Local (X)
Perspective (P), Orthographic (O)
-import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { deviceType, rootPath, localImport } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -13,8 +13,8 @@ const { Selector } = await localImport('selector.mjs'); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -42,8 +42,8 @@ app.setCanvasResolution(pc.RESOLUTION_AUTO); // load assets const assets = { - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; /** * @param {pc.Asset[] | number[]} assetList - The asset list. diff --git a/examples/src/examples/misc/esm-script.example.mjs b/examples/src/examples/misc/esm-script.example.mjs index 83b2206499c..dbd9bc15300 100644 --- a/examples/src/examples/misc/esm-script.example.mjs +++ b/examples/src/examples/misc/esm-script.example.mjs @@ -1,16 +1,16 @@ // @config HIDDEN -import * as pc from 'playcanvas'; import { deviceType, rootPath, fileImport } from 'examples/utils'; +import * as pc from 'playcanvas'; -const { Rotator } = await fileImport(rootPath + '/static/assets/scripts/misc/rotator.mjs'); +const { Rotator } = await fileImport(`${rootPath}/static/assets/scripts/misc/rotator.mjs`); const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/misc/hello-world.example.mjs b/examples/src/examples/misc/hello-world.example.mjs index 35cea4c8680..97284f225a2 100644 --- a/examples/src/examples/misc/hello-world.example.mjs +++ b/examples/src/examples/misc/hello-world.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/misc/mini-stats.example.mjs b/examples/src/examples/misc/mini-stats.example.mjs index 612ad16c356..bd705f5550b 100644 --- a/examples/src/examples/misc/mini-stats.example.mjs +++ b/examples/src/examples/misc/mini-stats.example.mjs @@ -1,16 +1,16 @@ // @config ENGINE performance // @config NO_MINISTATS // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -192,7 +192,7 @@ let entity; let vertexBuffer; /** @type {{ destroy: () => void}} */ let texture; -app.on('update', function () { +app.on('update', () => { // execute some tasks multiple times per frame for (let i = 0; i < step; i++) { // allocating resources diff --git a/examples/src/examples/misc/multi-app.example.mjs b/examples/src/examples/misc/multi-app.example.mjs index c4d6ef1a3a9..1c80708892a 100644 --- a/examples/src/examples/misc/multi-app.example.mjs +++ b/examples/src/examples/misc/multi-app.example.mjs @@ -2,9 +2,9 @@ // @config NO_DEVICE_SELECTOR // @config WEBGPU_DISABLED // @config WEBGL_DISABLED -import * as pc from 'playcanvas'; import { data } from 'examples/observer'; import { rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; // Use custom createGraphicsDevice function to not automatically include fall backs /** @@ -16,7 +16,7 @@ async function createGraphicsDevice(canvas, deviceType) { let device; if (deviceType === 'webgpu') { device = new pc.WebgpuGraphicsDevice(canvas, {}); - await device.initWebGpu(rootPath + '/static/lib/glslang/glslang.js', rootPath + '/static/lib/twgsl/twgsl.js'); + await device.initWebGpu(`${rootPath}/static/lib/glslang/glslang.js`, `${rootPath}/static/lib/twgsl/twgsl.js`); } else if (deviceType === 'webgl2') { device = new pc.WebglGraphicsDevice(canvas); } else { @@ -31,7 +31,7 @@ async function createGraphicsDevice(canvas, deviceType) { */ async function createApp(deviceType) { const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const canvas = document.createElement('canvas'); diff --git a/examples/src/examples/misc/spineboy.example.mjs b/examples/src/examples/misc/spineboy.example.mjs index 58e06ee0560..4c2cf4d56d1 100644 --- a/examples/src/examples/misc/spineboy.example.mjs +++ b/examples/src/examples/misc/spineboy.example.mjs @@ -1,22 +1,22 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - skeleton: new pc.Asset('skeleton', 'json', { url: rootPath + '/static/assets//spine/spineboy-pro.json' }), - atlas: new pc.Asset('atlas', 'text', { url: rootPath + '/static/assets//spine/spineboy-pro.atlas' }), - texture: new pc.Asset('spineboy-pro.png', 'texture', { url: rootPath + '/static/assets//spine/spineboy-pro.png' }), + skeleton: new pc.Asset('skeleton', 'json', { url: `${rootPath}/static/assets//spine/spineboy-pro.json` }), + atlas: new pc.Asset('atlas', 'text', { url: `${rootPath}/static/assets//spine/spineboy-pro.atlas` }), + texture: new pc.Asset('spineboy-pro.png', 'texture', { url: `${rootPath}/static/assets//spine/spineboy-pro.png` }), spinescript: new pc.Asset('spinescript', 'script', { - url: rootPath + '/static/scripts/spine/playcanvas-spine.3.8.js' + url: `${rootPath}/static/scripts/spine/playcanvas-spine.3.8.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/physics/compound-collision.example.mjs b/examples/src/examples/physics/compound-collision.example.mjs index ccb4e19f7a0..96abdfc4f42 100644 --- a/examples/src/examples/physics/compound-collision.example.mjs +++ b/examples/src/examples/physics/compound-collision.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('Ammo', () => resolve()); @@ -15,8 +15,8 @@ await new Promise((resolve) => { const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -364,13 +364,13 @@ function parseEntity(e) { } if (e.components) { - e.components.forEach(function (c) { + e.components.forEach((c) => { entity.addComponent(c.type, c.options); }); } if (e.children) { - e.children.forEach(function (/** @type {typeof scene} */ child) { + e.children.forEach((/** @type {typeof scene} */ child) => { entity.addChild(parseEntity(child)); }); } @@ -380,7 +380,7 @@ function parseEntity(e) { // Parse the scene data above into entities and add them to the scene's root entity function parseScene(s) { - s.forEach(function (e) { + s.forEach((e) => { app.root.addChild(parseEntity(e)); }); } @@ -401,7 +401,7 @@ function spawnChair() { // Set an update function on the application's update event let time = 0; -app.on('update', function (dt) { +app.on('update', (dt) => { // Add a new chair every 250 ms time += dt; if (time > 0.25 && numChairs < 20) { @@ -410,8 +410,8 @@ app.on('update', function (dt) { } // Show active bodies in red and frozen bodies in gray - app.root.findComponents('rigidbody').forEach(function (/** @type {pc.RigidBodyComponent} */ body) { - body.entity.findComponents('render').forEach(function (/** @type {pc.RenderComponent} */ render) { + app.root.findComponents('rigidbody').forEach((/** @type {pc.RigidBodyComponent} */ body) => { + body.entity.findComponents('render').forEach((/** @type {pc.RenderComponent} */ render) => { render.material = body.isActive() ? red : gray; }); }); diff --git a/examples/src/examples/physics/falling-shapes.example.mjs b/examples/src/examples/physics/falling-shapes.example.mjs index 27d29086eb4..d59b941efb3 100644 --- a/examples/src/examples/physics/falling-shapes.example.mjs +++ b/examples/src/examples/physics/falling-shapes.example.mjs @@ -1,26 +1,26 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('Ammo', () => resolve()); }); const assets = { - torus: new pc.Asset('torus', 'container', { url: rootPath + '/static/assets/models/torus.glb' }) + torus: new pc.Asset('torus', 'container', { url: `${rootPath}/static/assets/models/torus.glb` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -224,7 +224,7 @@ assetListLoader.load(() => { // disable the templates because we don't want them to be visible // we'll just use them to clone other Entities - templates.forEach(function (template) { + templates.forEach((template) => { template.enabled = false; }); @@ -235,7 +235,7 @@ assetListLoader.load(() => { let count = 40; // Set an update function on the application's update event - app.on('update', function (dt) { + app.on('update', (dt) => { // create a falling box every 0.2 seconds if (count > 0) { timer -= dt; @@ -261,7 +261,7 @@ assetListLoader.load(() => { } // Show active bodies in red and frozen bodies in gray - app.root.findComponents('rigidbody').forEach(function (/** @type {pc.RigidBodyComponent} */ body) { + app.root.findComponents('rigidbody').forEach((/** @type {pc.RigidBodyComponent} */ body) => { body.entity.render.meshInstances[0].material = body.isActive() ? red : gray; }); }); diff --git a/examples/src/examples/physics/offset-collision.example.mjs b/examples/src/examples/physics/offset-collision.example.mjs index 01be737d671..b2ed94870e3 100644 --- a/examples/src/examples/physics/offset-collision.example.mjs +++ b/examples/src/examples/physics/offset-collision.example.mjs @@ -1,33 +1,33 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('Ammo', () => resolve()); }); const assets = { - model: new pc.Asset('model', 'container', { url: rootPath + '/static/assets/models/bitmoji.glb' }), - idleAnim: new pc.Asset('idleAnim', 'container', { url: rootPath + '/static/assets/animations/bitmoji/idle.glb' }), + model: new pc.Asset('model', 'container', { url: `${rootPath}/static/assets/models/bitmoji.glb` }), + idleAnim: new pc.Asset('idleAnim', 'container', { url: `${rootPath}/static/assets/animations/bitmoji/idle.glb` }), helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -229,7 +229,7 @@ assetListLoader.load(() => { let count = 40; // Set an update function on the application's update event - app.on('update', function (dt) { + app.on('update', (dt) => { // create a falling box every 0.2 seconds if (count > 0) { timer -= dt; @@ -247,7 +247,7 @@ assetListLoader.load(() => { } // Show active bodies in red and frozen bodies in gray - app.root.findByTag('shape').forEach(function (/** @type {pc.Entity} */ entity) { + app.root.findByTag('shape').forEach((/** @type {pc.Entity} */ entity) => { entity.render.meshInstances[0].material = entity.rigidbody.isActive() ? red : gray; }); diff --git a/examples/src/examples/physics/raycast.example.mjs b/examples/src/examples/physics/raycast.example.mjs index 7ad4f593c33..f5b275676f0 100644 --- a/examples/src/examples/physics/raycast.example.mjs +++ b/examples/src/examples/physics/raycast.example.mjs @@ -1,26 +1,26 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { pc.WasmModule.getInstance('Ammo', () => resolve()); }); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -133,10 +133,10 @@ assetListLoader.load(() => { // Create two rows of physical geometric shapes const types = ['box', 'capsule', 'cone', 'cylinder', 'sphere']; - types.forEach(function (type, idx) { + types.forEach((type, idx) => { createPhysicalShape(type, green, idx * 2 + 1, 2, 0); }); - types.forEach(function (type, idx) { + types.forEach((type, idx) => { createPhysicalShape(type, green, idx * 2 + 1, -2, 0); }); @@ -156,7 +156,7 @@ assetListLoader.load(() => { time += dt; // Reset all shapes to green - app.root.findComponents('render').forEach(function (/** @type {pc.RenderComponent}*/ render) { + app.root.findComponents('render').forEach((/** @type {pc.RenderComponent}*/ render) => { render.material = green; }); @@ -184,7 +184,7 @@ assetListLoader.load(() => { app.drawLine(start, end, white); const results = app.systems.rigidbody.raycastAll(start, end); - results.forEach(function (result) { + results.forEach((result) => { result.entity.render.material = red; // Render the normal on the surface from the hit point diff --git a/examples/src/examples/physics/vehicle.example.mjs b/examples/src/examples/physics/vehicle.example.mjs index 73437533451..ad7a0844357 100644 --- a/examples/src/examples/physics/vehicle.example.mjs +++ b/examples/src/examples/physics/vehicle.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); pc.WasmModule.setConfig('Ammo', { - glueUrl: rootPath + '/static/lib/ammo/ammo.wasm.js', - wasmUrl: rootPath + '/static/lib/ammo/ammo.wasm.wasm', - fallbackUrl: rootPath + '/static/lib/ammo/ammo.js' + glueUrl: `${rootPath}/static/lib/ammo/ammo.wasm.js`, + wasmUrl: `${rootPath}/static/lib/ammo/ammo.wasm.wasm`, + fallbackUrl: `${rootPath}/static/lib/ammo/ammo.js` }); await new Promise((resolve) => { @@ -18,19 +18,19 @@ const assets = { helipad: new pc.Asset( 'helipad-env-atlas', 'texture', - { url: rootPath + '/static/assets/cubemaps/helipad-env-atlas.png' }, + { url: `${rootPath}/static/assets/cubemaps/helipad-env-atlas.png` }, { type: pc.TEXTURETYPE_RGBP, mipmaps: false } ), - script1: new pc.Asset('script1', 'script', { url: rootPath + '/static/scripts/camera/tracking-camera.js' }), - script2: new pc.Asset('script2', 'script', { url: rootPath + '/static/scripts/physics/render-physics.js' }), - script3: new pc.Asset('script3', 'script', { url: rootPath + '/static/scripts/physics/action-physics-reset.js' }), - script4: new pc.Asset('script4', 'script', { url: rootPath + '/static/scripts/physics/vehicle.js' }) + script1: new pc.Asset('script1', 'script', { url: `${rootPath}/static/scripts/camera/tracking-camera.js` }), + script2: new pc.Asset('script2', 'script', { url: `${rootPath}/static/scripts/physics/render-physics.js` }), + script3: new pc.Asset('script3', 'script', { url: `${rootPath}/static/scripts/physics/action-physics-reset.js` }), + script4: new pc.Asset('script4', 'script', { url: `${rootPath}/static/scripts/physics/vehicle.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -148,7 +148,7 @@ assetListLoader.load(() => { cab.setLocalPosition(0, 1.2, -0.25); // Add the vehicle to the hierarchy - wheels.forEach(function (wheel) { + wheels.forEach((wheel) => { vehicle.addChild(wheel); }); vehicle.addChild(chassis); @@ -212,7 +212,7 @@ assetListLoader.load(() => { } }); - app.keyboard.on(pc.EVENT_KEYDOWN, function (e) { + app.keyboard.on(pc.EVENT_KEYDOWN, (e) => { if (e.key === pc.KEY_R) { app.fire('reset'); } diff --git a/examples/src/examples/sound/positional.example.mjs b/examples/src/examples/sound/positional.example.mjs index 502dc4f67bc..acb547b3b03 100644 --- a/examples/src/examples/sound/positional.example.mjs +++ b/examples/src/examples/sound/positional.example.mjs @@ -1,13 +1,13 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -52,11 +52,11 @@ app.on('destroy', () => { }); const assets = { - model: new pc.Asset('model', 'model', { url: rootPath + '/static/assets/models/playbot/playbot.json' }), + model: new pc.Asset('model', 'model', { url: `${rootPath}/static/assets/models/playbot/playbot.json` }), runAnim: new pc.Asset('runAnim', 'animation', { - url: rootPath + '/static/assets/animations/playbot/playbot-run.json' + url: `${rootPath}/static/assets/animations/playbot/playbot-run.json` }), - gravel: new pc.Asset('gravel', 'audio', { url: rootPath + '/static/assets/sounds/footsteps.mp3' }) + gravel: new pc.Asset('gravel', 'audio', { url: `${rootPath}/static/assets/sounds/footsteps.mp3` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -135,7 +135,7 @@ assetListLoader.load(() => { let angle = 135; const radius = 3; const height = 0; // 1.1; - app.on('update', function (dt) { + app.on('update', (dt) => { angle += 30 * dt; if (angle > 360) { angle -= 360; diff --git a/examples/src/examples/user-interface/button-basic.example.mjs b/examples/src/examples/user-interface/button-basic.example.mjs index 6a32a9684cb..253fa66b259 100644 --- a/examples/src/examples/user-interface/button-basic.example.mjs +++ b/examples/src/examples/user-interface/button-basic.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -97,7 +97,7 @@ assetListLoader.load(() => { button.addChild(label); // Change the background color every time the button is clicked - button.button.on('click', function () { + button.button.on('click', () => { camera.camera.clearColor = new pc.Color(Math.random(), Math.random(), Math.random()); }); }); diff --git a/examples/src/examples/user-interface/button-sprite.example.mjs b/examples/src/examples/user-interface/button-sprite.example.mjs index 3b2c741c157..2311044972b 100644 --- a/examples/src/examples/user-interface/button-sprite.example.mjs +++ b/examples/src/examples/user-interface/button-sprite.example.mjs @@ -1,20 +1,20 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }), red_button_atlas: new pc.Asset('red_button_atlas', 'texture', { - url: rootPath + '/static/assets/button/red_button_atlas.png' + url: `${rootPath}/static/assets/button/red_button_atlas.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -105,16 +105,16 @@ assetListLoader.load(() => { button.addChild(label); // Change the background color every time the button is clicked - button.button.on('click', function () { + button.button.on('click', () => { const r = Math.random(); camera.camera.clearColor = new pc.Color(r, r, r); }); // Move the button's label with the animation of the sprite - button.button.on('pressedstart', function () { + button.button.on('pressedstart', () => { label.translateLocal(0, -4, 0); }); - button.button.on('pressedend', function () { + button.button.on('pressedend', () => { label.translateLocal(0, 4, 0); }); diff --git a/examples/src/examples/user-interface/custom-shader.example.mjs b/examples/src/examples/user-interface/custom-shader.example.mjs index 74ed45f24f7..29e2531fe27 100644 --- a/examples/src/examples/user-interface/custom-shader.example.mjs +++ b/examples/src/examples/user-interface/custom-shader.example.mjs @@ -1,18 +1,18 @@ -import * as pc from 'playcanvas'; import files from 'examples/files'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - playcanvas: new pc.Asset('playcanvas', 'texture', { url: rootPath + '/static/assets/textures/playcanvas.png' }) + playcanvas: new pc.Asset('playcanvas', 'texture', { url: `${rootPath}/static/assets/textures/playcanvas.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/user-interface/layout-group.example.mjs b/examples/src/examples/user-interface/layout-group.example.mjs index 4123c23fe86..448ac9da5b6 100644 --- a/examples/src/examples/user-interface/layout-group.example.mjs +++ b/examples/src/examples/user-interface/layout-group.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/user-interface/particle-system.example.mjs b/examples/src/examples/user-interface/particle-system.example.mjs index ed4bc4b644c..363137abdbc 100644 --- a/examples/src/examples/user-interface/particle-system.example.mjs +++ b/examples/src/examples/user-interface/particle-system.example.mjs @@ -1,18 +1,18 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }), - spark: new pc.Asset('spark', 'texture', { url: rootPath + '/static/assets/textures/spark.png' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }), + spark: new pc.Asset('spark', 'texture', { url: `${rootPath}/static/assets/textures/spark.png` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -153,7 +153,7 @@ assetListLoader.load(() => { screen.screen.syncDrawOrder(); let time = 0; - app.on('update', function (dt) { + app.on('update', (dt) => { time += dt * 0.3; // move buttons along the circular path diff --git a/examples/src/examples/user-interface/scroll-view.example.mjs b/examples/src/examples/user-interface/scroll-view.example.mjs index 251c7804adb..7f6cea7ffa9 100644 --- a/examples/src/examples/user-interface/scroll-view.example.mjs +++ b/examples/src/examples/user-interface/scroll-view.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/user-interface/text-auto-font-size.example.mjs b/examples/src/examples/user-interface/text-auto-font-size.example.mjs index 10b61d3fed4..b48181d6701 100644 --- a/examples/src/examples/user-interface/text-auto-font-size.example.mjs +++ b/examples/src/examples/user-interface/text-auto-font-size.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/user-interface/text-emojis.example.mjs b/examples/src/examples/user-interface/text-emojis.example.mjs index fc4d6892e65..60d2d77788c 100644 --- a/examples/src/examples/user-interface/text-emojis.example.mjs +++ b/examples/src/examples/user-interface/text-emojis.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/arial.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/arial.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -123,7 +123,7 @@ assetListLoader.load(() => { anchor: new pc.Vec4(0.5, 0.5, 0.5, 0.5), fontAsset: assets.font.id, fontSize: elSize, - text: "The following are the CanvasFont's Texture Atlases,\ncontaining all the rendered characters:", + text: 'The following are the CanvasFont\'s Texture Atlases,\ncontaining all the rendered characters:', type: pc.ELEMENTTYPE_TEXT }); screen.addChild(debugText); diff --git a/examples/src/examples/user-interface/text-localization.example.mjs b/examples/src/examples/user-interface/text-localization.example.mjs index bfadb05fd0e..4dc09131515 100644 --- a/examples/src/examples/user-interface/text-localization.example.mjs +++ b/examples/src/examples/user-interface/text-localization.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -157,7 +157,7 @@ assetListLoader.load(() => { button.addChild(label); // Change the locale to the button text - button.button.on('click', function () { + button.button.on('click', () => { app.i18n.locale = labelText; }); diff --git a/examples/src/examples/user-interface/text-typewriter.example.mjs b/examples/src/examples/user-interface/text-typewriter.example.mjs index 040e9f64618..f43738832b0 100644 --- a/examples/src/examples/user-interface/text-typewriter.example.mjs +++ b/examples/src/examples/user-interface/text-typewriter.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -90,7 +90,7 @@ assetListLoader.load(() => { text.element.rangeEnd = 0; // Render a new character every 75ms - const id = setInterval(function () { + const id = setInterval(() => { text.element.rangeEnd += 1; if (text.element.rangeEnd >= loremIpsum.length) { text.element.rangeEnd = 0; diff --git a/examples/src/examples/user-interface/text.example.mjs b/examples/src/examples/user-interface/text.example.mjs index e95562b5b9e..584d676e6b3 100644 --- a/examples/src/examples/user-interface/text.example.mjs +++ b/examples/src/examples/user-interface/text.example.mjs @@ -1,17 +1,17 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); diff --git a/examples/src/examples/user-interface/world-to-screen.example.mjs b/examples/src/examples/user-interface/world-to-screen.example.mjs index 1012a131a84..508e189bf8f 100644 --- a/examples/src/examples/user-interface/world-to-screen.example.mjs +++ b/examples/src/examples/user-interface/world-to-screen.example.mjs @@ -1,18 +1,18 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - checkboard: new pc.Asset('checkboard', 'texture', { url: rootPath + '/static/assets/textures/checkboard.png' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + checkboard: new pc.Asset('checkboard', 'texture', { url: `${rootPath}/static/assets/textures/checkboard.png` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -147,7 +147,7 @@ assetListLoader.load(() => { // normally, this would be taking inputs, running physics simulation, etc let angle = startingAngle; const height = 0.5; - app.on('update', function (dt) { + app.on('update', (dt) => { angle += dt * speed; if (angle > 360) { angle -= 360; @@ -186,7 +186,7 @@ assetListLoader.load(() => { name.addComponent('button', { imageEntity: name }); - name.button.on('click', function () { + name.button.on('click', () => { const color = new pc.Color(Math.random(), Math.random(), Math.random()); name.element.color = color; entity.render.material.setParameter('material_diffuse', [color.r, color.g, color.b]); @@ -205,7 +205,7 @@ assetListLoader.load(() => { playerInfo.addChild(healthBar); // update the player text's position to always hover the player - app.on('update', function () { + app.on('update', () => { // get the desired world position const worldPosition = entity.getPosition(); worldPosition.y += 0.6; // slightly above the player's head diff --git a/examples/src/examples/user-interface/world-ui.example.mjs b/examples/src/examples/user-interface/world-ui.example.mjs index f744d0d9474..80c08b0e8d4 100644 --- a/examples/src/examples/user-interface/world-ui.example.mjs +++ b/examples/src/examples/user-interface/world-ui.example.mjs @@ -1,19 +1,19 @@ -import * as pc from 'playcanvas'; import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); const assets = { - checkboard: new pc.Asset('checkboard', 'texture', { url: rootPath + '/static/assets/textures/checkboard.png' }), - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }), - script: new pc.Asset('script', 'script', { url: rootPath + '/static/scripts/camera/orbit-camera.js' }) + checkboard: new pc.Asset('checkboard', 'texture', { url: `${rootPath}/static/assets/textures/checkboard.png` }), + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }), + script: new pc.Asset('script', 'script', { url: `${rootPath}/static/scripts/camera/orbit-camera.js` }) }; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js' + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js` }; const device = await pc.createGraphicsDevice(canvas, gfxOptions); @@ -162,7 +162,7 @@ assetListLoader.load(() => { button.addChild(buttonText); // Change the background color every time the button is clicked - button.button.on('click', function () { + button.button.on('click', () => { camera.camera.clearColor = new pc.Color(Math.random(), Math.random(), Math.random()); }); }); diff --git a/examples/src/examples/xr/ar-anchors-persistence.example.mjs b/examples/src/examples/xr/ar-anchors-persistence.example.mjs index ebe65359c3a..f0ebf883d78 100644 --- a/examples/src/examples/xr/ar-anchors-persistence.example.mjs +++ b/examples/src/examples/xr/ar-anchors-persistence.example.mjs @@ -92,7 +92,7 @@ if (app.xr.supported) { camera.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { anchors: true, callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -100,12 +100,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -120,7 +120,7 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } @@ -138,13 +138,13 @@ if (app.xr.supported) { } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (!app.xr.hitTest.supported) { message('AR Hit Test is not supported'); @@ -195,8 +195,9 @@ if (app.xr.supported) { target = null; // mobile screen input source - if (inputSource.targetRayMode === pc.XRTARGETRAY_SCREEN && lastHitTestResult) + if (inputSource.targetRayMode === pc.XRTARGETRAY_SCREEN && lastHitTestResult) { createAnchor(lastHitTestResult); + } lastHitTestResult = null; }); diff --git a/examples/src/examples/xr/ar-basic.example.mjs b/examples/src/examples/xr/ar-basic.example.mjs index 6e060e17c30..8dfa44da6f0 100644 --- a/examples/src/examples/xr/ar-basic.example.mjs +++ b/examples/src/examples/xr/ar-basic.example.mjs @@ -84,7 +84,7 @@ if (app.xr.supported) { if (app.xr.isAvailable(pc.XRTYPE_AR)) { c.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -92,12 +92,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -112,20 +112,20 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { - message('Immersive AR is ' + (available ? 'available' : 'unavailable')); + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { + message(`Immersive AR is ${available ? 'available' : 'unavailable'}`); }); if (!app.xr.isAvailable(pc.XRTYPE_AR)) { diff --git a/examples/src/examples/xr/ar-camera-color.example.mjs b/examples/src/examples/xr/ar-camera-color.example.mjs index 48e4b0be113..377d490b145 100644 --- a/examples/src/examples/xr/ar-camera-color.example.mjs +++ b/examples/src/examples/xr/ar-camera-color.example.mjs @@ -95,7 +95,7 @@ if (app.xr.supported) { c.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { cameraColor: true, // request access to camera color callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -103,12 +103,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -123,19 +123,19 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (!app.xr.views.supportedColor) { message('AR Camera Color is not supported'); @@ -152,9 +152,10 @@ if (app.xr.supported) { if (app.xr.views.availableColor) { for (let i = 0; i < app.xr.views.list.length; i++) { const view = app.xr.views.list[i]; - if (!view.textureColor) - // check if color texture is available + // check if color texture is available + if (!view.textureColor) { continue; + } // apply camera color texture to material diffuse channel if (!material.diffuseMap) { diff --git a/examples/src/examples/xr/ar-camera-depth.example.mjs b/examples/src/examples/xr/ar-camera-depth.example.mjs index f84e56806fa..01085621238 100644 --- a/examples/src/examples/xr/ar-camera-depth.example.mjs +++ b/examples/src/examples/xr/ar-camera-depth.example.mjs @@ -115,7 +115,7 @@ const updateShader = (array, float) => { shaderDepthArray = array; shaderDepthFloat = float; - const key = 'textureDepthSensing_' + array + float; + const key = `textureDepthSensing_${array}${float}`; if (shaderDepthArray) materialDepth.setDefine('XRDEPTH_ARRAY', true); if (shaderDepthFloat) materialDepth.setDefine('XRDEPTH_FLOAT', true); @@ -156,7 +156,7 @@ if (app.xr.supported) { dataFormatPreference: pc.XRDEPTHSENSINGFORMAT_F32 }, callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -164,12 +164,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -184,23 +184,23 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); console.log('depth gpu optimized', app.xr.views.depthGpuOptimized); console.log('depth texture format', app.xr.views.depthPixelFormat); }); - app.xr.on('end', function () { + app.xr.on('end', () => { shaderUpdated = false; message('Immersive AR session has ended'); plane.enabled = false; }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (!app.xr.views.supportedDepth) { message('AR Camera Depth is not supported'); diff --git a/examples/src/examples/xr/ar-depth-sensing-placer.example.mjs b/examples/src/examples/xr/ar-depth-sensing-placer.example.mjs index 5ac6b5b22f6..7ce83483d7a 100644 --- a/examples/src/examples/xr/ar-depth-sensing-placer.example.mjs +++ b/examples/src/examples/xr/ar-depth-sensing-placer.example.mjs @@ -84,7 +84,7 @@ if (app.xr.supported) { dataFormatPreference: pc.XRDEPTHSENSINGFORMAT_F32 }, callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -92,12 +92,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -112,21 +112,21 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); console.log('depth gpu optimized', app.xr.views.depthGpuOptimized); console.log('depth texture format', app.xr.views.depthPixelFormat); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (!app.xr.views.supportedDepth) { message('AR Camera Depth is not supported'); diff --git a/examples/src/examples/xr/ar-hit-test-anchors.example.mjs b/examples/src/examples/xr/ar-hit-test-anchors.example.mjs index bf67b15eaab..b6260e8258c 100644 --- a/examples/src/examples/xr/ar-hit-test-anchors.example.mjs +++ b/examples/src/examples/xr/ar-hit-test-anchors.example.mjs @@ -98,7 +98,7 @@ if (app.xr.supported) { c.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { anchors: true, callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -106,12 +106,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -126,7 +126,7 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } @@ -147,7 +147,7 @@ if (app.xr.supported) { return; } - hitTestSource.on('result', function (position, rotation, inputSource, hitTestResult) { + hitTestSource.on('result', (position, rotation, inputSource, hitTestResult) => { target.setPosition(position); target.setRotation(rotation); lastHitTestResult = hitTestResult; @@ -164,13 +164,13 @@ if (app.xr.supported) { }); }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (!app.xr.hitTest.supported) { message('AR Hit Test is not supported'); @@ -219,8 +219,9 @@ if (app.xr.supported) { target = null; // mobile screen input source - if (inputSource.targetRayMode === pc.XRTARGETRAY_SCREEN && lastHitTestResult) + if (inputSource.targetRayMode === pc.XRTARGETRAY_SCREEN && lastHitTestResult) { createAnchor(lastHitTestResult); + } lastHitTestResult = null; }); diff --git a/examples/src/examples/xr/ar-hit-test.example.mjs b/examples/src/examples/xr/ar-hit-test.example.mjs index 25a32085da1..5913249e6f0 100644 --- a/examples/src/examples/xr/ar-hit-test.example.mjs +++ b/examples/src/examples/xr/ar-hit-test.example.mjs @@ -72,7 +72,7 @@ if (app.xr.supported) { if (app.xr.isAvailable(pc.XRTYPE_AR)) { c.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -80,12 +80,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -100,7 +100,7 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } @@ -115,7 +115,7 @@ if (app.xr.supported) { return; } - hitTestSource.on('result', function (position, rotation) { + hitTestSource.on('result', (position, rotation) => { target.setPosition(position); target.setRotation(rotation); }); @@ -123,13 +123,13 @@ if (app.xr.supported) { }); }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (app.xr.hitTest.supported) { message('Touch screen to start AR session and look at the floor or walls'); diff --git a/examples/src/examples/xr/ar-mesh-detection.example.mjs b/examples/src/examples/xr/ar-mesh-detection.example.mjs index ae63bac6acf..354e3af8795 100644 --- a/examples/src/examples/xr/ar-mesh-detection.example.mjs +++ b/examples/src/examples/xr/ar-mesh-detection.example.mjs @@ -1,6 +1,6 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -27,7 +27,7 @@ const message = function (msg) { }; const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const app = new pc.Application(canvas, { @@ -75,7 +75,7 @@ assetListLoader.load(() => { camera.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { meshDetection: true, callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -83,12 +83,12 @@ assetListLoader.load(() => { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -103,13 +103,13 @@ assetListLoader.load(() => { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); // Trigger manual room capture @@ -120,10 +120,10 @@ assetListLoader.load(() => { }); }, 500); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (app.xr.meshDetection.supported) { message('Touch screen to start AR session and look at the floor or walls'); diff --git a/examples/src/examples/xr/ar-plane-detection.example.mjs b/examples/src/examples/xr/ar-plane-detection.example.mjs index 51a2ba797f2..e328b89b3d2 100644 --- a/examples/src/examples/xr/ar-plane-detection.example.mjs +++ b/examples/src/examples/xr/ar-plane-detection.example.mjs @@ -1,6 +1,6 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -27,7 +27,7 @@ const message = function (msg) { }; const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }) }; const app = new pc.Application(canvas, { @@ -76,7 +76,7 @@ assetListLoader.load(() => { camera.camera.startXr(pc.XRTYPE_AR, pc.XRSPACE_LOCALFLOOR, { planeDetection: true, callback: function (err) { - if (err) message('WebXR Immersive AR failed to start: ' + err.message); + if (err) message(`WebXR Immersive AR failed to start: ${err.message}`); } }); } else { @@ -84,12 +84,12 @@ assetListLoader.load(() => { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -104,22 +104,22 @@ assetListLoader.load(() => { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive AR session has started'); // trigger manual scanning on session start // app.xr.initiateRoomCapture((err) => { }); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive AR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { if (available) { if (app.xr.planeDetection.supported) { message('Touch screen to start AR session and look at the floor or walls'); diff --git a/examples/src/examples/xr/vr-basic.example.mjs b/examples/src/examples/xr/vr-basic.example.mjs index 1912a35afff..2f68414dd42 100644 --- a/examples/src/examples/xr/vr-basic.example.mjs +++ b/examples/src/examples/xr/vr-basic.example.mjs @@ -82,7 +82,7 @@ if (app.xr.supported) { if (app.xr.isAvailable(pc.XRTYPE_VR)) { c.camera.startXr(pc.XRTYPE_VR, pc.XRSPACE_LOCAL, { callback: function (err) { - if (err) message('WebXR Immersive VR failed to start: ' + err.message); + if (err) message(`WebXR Immersive VR failed to start: ${err.message}`); } }); } else { @@ -90,12 +90,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -110,20 +110,20 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive VR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive VR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_VR, function (available) { - message('Immersive VR is ' + (available ? 'available' : 'unavailable')); + app.xr.on(`available:${pc.XRTYPE_VR}`, (available) => { + message(`Immersive VR is ${available ? 'available' : 'unavailable'}`); }); if (!app.xr.isAvailable(pc.XRTYPE_VR)) { diff --git a/examples/src/examples/xr/vr-controllers.example.mjs b/examples/src/examples/xr/vr-controllers.example.mjs index 517426ff7cc..11c0d881ccf 100644 --- a/examples/src/examples/xr/vr-controllers.example.mjs +++ b/examples/src/examples/xr/vr-controllers.example.mjs @@ -1,6 +1,6 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import { rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -36,7 +36,7 @@ app.on('destroy', () => { }); const assets = { - glb: new pc.Asset('glb', 'container', { url: rootPath + '/static/assets/models/vr-controller.glb' }) + glb: new pc.Asset('glb', 'container', { url: `${rootPath}/static/assets/models/vr-controller.glb` }) }; const assetListLoader = new pc.AssetListLoader(Object.values(assets), app.assets); @@ -94,7 +94,7 @@ assetListLoader.load(() => { // destroy input source related entity // when input source is removed - inputSource.on('remove', function () { + inputSource.on('remove', () => { controllers.splice(controllers.indexOf(entity), 1); entity.destroy(); }); @@ -113,7 +113,7 @@ assetListLoader.load(() => { if (app.xr.isAvailable(pc.XRTYPE_VR)) { c.camera.startXr(pc.XRTYPE_VR, pc.XRSPACE_LOCAL, { callback: function (err) { - if (err) message('Immersive VR failed to start: ' + err.message); + if (err) message(`Immersive VR failed to start: ${err.message}`); } }); } else { @@ -121,12 +121,12 @@ assetListLoader.load(() => { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -141,14 +141,14 @@ assetListLoader.load(() => { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); // when new input source added - app.xr.input.on('add', function (inputSource) { + app.xr.input.on('add', (inputSource) => { message('Controller Added'); createController(inputSource); }); @@ -156,7 +156,7 @@ assetListLoader.load(() => { message('Tap on screen to enter VR, and see controllers'); // update position and rotation for each controller - app.on('update', function () { + app.on('update', () => { for (let i = 0; i < controllers.length; i++) { const inputSource = controllers[i].inputSource; if (inputSource.grip) { diff --git a/examples/src/examples/xr/vr-movement.example.mjs b/examples/src/examples/xr/vr-movement.example.mjs index cd50eb662e6..7ebb4b1c4c9 100644 --- a/examples/src/examples/xr/vr-movement.example.mjs +++ b/examples/src/examples/xr/vr-movement.example.mjs @@ -88,7 +88,7 @@ const createController = function (inputSource) { // destroy input source related entity // when input source is removed - inputSource.on('remove', function () { + inputSource.on('remove', () => { controllers.splice(controllers.indexOf(entity), 1); entity.destroy(); }); @@ -107,7 +107,7 @@ if (app.xr.supported) { if (app.xr.isAvailable(pc.XRTYPE_VR)) { c.camera.startXr(pc.XRTYPE_VR, pc.XRSPACE_LOCAL, { callback: function (err) { - if (err) message('Immersive VR failed to start: ' + err.message); + if (err) message(`Immersive VR failed to start: ${err.message}`); } }); } else { @@ -115,12 +115,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -135,14 +135,14 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); // when new input source added - app.xr.input.on('add', function (inputSource) { + app.xr.input.on('add', (inputSource) => { createController(inputSource); }); @@ -161,7 +161,7 @@ if (app.xr.supported) { const lineColor = new pc.Color(1, 1, 1); // update position and rotation for each controller - app.on('update', function (dt) { + app.on('update', (dt) => { let i, inputSource; // first we update movement diff --git a/examples/src/examples/xr/xr-hands.example.mjs b/examples/src/examples/xr/xr-hands.example.mjs index da669c53d88..1cef9d96f48 100644 --- a/examples/src/examples/xr/xr-hands.example.mjs +++ b/examples/src/examples/xr/xr-hands.example.mjs @@ -1,6 +1,6 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; import files from 'examples/files'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -107,14 +107,14 @@ const createController = function (inputSource) { entity.addChild(jointEntity); } // when tracking lost, paint joints to red - inputSource.hand.on('trackinglost', function () { + inputSource.hand.on('trackinglost', () => { // @ts-ignore engine-tsd entity.joints[0].model.material.diffuse.set(1, 0, 0); // @ts-ignore engine-tsd entity.joints[0].model.material.update(); }); // when tracking recovered, paint joints to white - inputSource.hand.on('tracking', function () { + inputSource.hand.on('tracking', () => { // @ts-ignore engine-tsd entity.joints[0].model.material.diffuse.set(1, 1, 1); // @ts-ignore engine-tsd @@ -136,7 +136,7 @@ const createController = function (inputSource) { // destroy input source related entity // when input source is removed - inputSource.on('remove', function () { + inputSource.on('remove', () => { controllers.splice(controllers.indexOf(entity), 1); entity.destroy(); }); @@ -156,11 +156,11 @@ const vec3A = new pc.Vec3(); if (app.xr.supported) { // XR availability document - .querySelector(`.container > .button[data-xr="immersive-ar"]`) - ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_AR)); + .querySelector('.container > .button[data-xr="immersive-ar"]') + ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_AR)); document - .querySelector(`.container > .button[data-xr="immersive-vr"]`) - ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_VR)); + .querySelector('.container > .button[data-xr="immersive-vr"]') + ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_VR)); // XR availability events app.xr.on('available', (type, available) => { @@ -195,14 +195,14 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); // when new input source added - app.xr.input.on('add', function (inputSource) { + app.xr.input.on('add', (inputSource) => { message('Controller Added'); createController(inputSource); }); @@ -214,7 +214,7 @@ if (app.xr.supported) { } // update position and rotation for each controller - app.on('update', function () { + app.on('update', () => { for (let i = 0; i < controllers.length; i++) { const inputSource = controllers[i].inputSource; diff --git a/examples/src/examples/xr/xr-picking.example.mjs b/examples/src/examples/xr/xr-picking.example.mjs index ae5ad30fc9e..71decd93eba 100644 --- a/examples/src/examples/xr/xr-picking.example.mjs +++ b/examples/src/examples/xr/xr-picking.example.mjs @@ -87,7 +87,7 @@ if (app.xr.supported) { if (app.xr.isAvailable(pc.XRTYPE_VR)) { c.camera.startXr(pc.XRTYPE_VR, pc.XRSPACE_LOCAL, { callback: function (err) { - if (err) message('Immersive VR failed to start: ' + err.message); + if (err) message(`Immersive VR failed to start: ${err.message}`); } }); } else { @@ -95,12 +95,12 @@ if (app.xr.supported) { } }; - app.mouse.on('mousedown', function () { + app.mouse.on('mousedown', () => { if (!app.xr.active) activate(); }); if (app.touch) { - app.touch.on('touchend', function (evt) { + app.touch.on('touchend', (evt) => { if (!app.xr.active) { // if not in VR, activate activate(); @@ -115,7 +115,7 @@ if (app.xr.supported) { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } @@ -126,7 +126,7 @@ if (app.xr.supported) { // when input source is triggers select // pick closest box and change its color const ray = new pc.Ray(); - app.xr.input.on('select', function (inputSource) { + app.xr.input.on('select', (inputSource) => { let candidate = null; let candidateDist = Infinity; @@ -160,7 +160,7 @@ if (app.xr.supported) { // on each app update // render input source rays as a line - app.on('update', function () { + app.on('update', () => { for (let i = 0; i < app.xr.input.inputSources.length; i++) { const inputSource = app.xr.input.inputSources[i]; const direction = inputSource.getDirection(); diff --git a/examples/src/examples/xr/xr-ui.example.mjs b/examples/src/examples/xr/xr-ui.example.mjs index 77113927672..5fdb728170a 100644 --- a/examples/src/examples/xr/xr-ui.example.mjs +++ b/examples/src/examples/xr/xr-ui.example.mjs @@ -1,7 +1,7 @@ // @config WEBGPU_DISABLED -import * as pc from 'playcanvas'; -import { deviceType, rootPath } from 'examples/utils'; import files from 'examples/files'; +import { deviceType, rootPath } from 'examples/utils'; +import * as pc from 'playcanvas'; const canvas = /** @type {HTMLCanvasElement} */ (document.getElementById('application-canvas')); window.focus(); @@ -24,16 +24,16 @@ const message = function (msg) { }; const assets = { - font: new pc.Asset('font', 'font', { url: rootPath + '/static/assets/fonts/courier.json' }), - monitor: new pc.Asset('monitor', 'template', { url: rootPath + '/static/assets/templates/monitor.json' }) + font: new pc.Asset('font', 'font', { url: `${rootPath}/static/assets/fonts/courier.json` }), + monitor: new pc.Asset('monitor', 'template', { url: `${rootPath}/static/assets/templates/monitor.json` }) }; assets.font.id = 42; const gfxOptions = { deviceTypes: [deviceType], - glslangUrl: rootPath + '/static/lib/glslang/glslang.js', - twgslUrl: rootPath + '/static/lib/twgsl/twgsl.js', + glslangUrl: `${rootPath}/static/lib/glslang/glslang.js`, + twgslUrl: `${rootPath}/static/lib/twgsl/twgsl.js`, alpha: true }; @@ -117,11 +117,11 @@ assetListLoader.load(() => { if (app.xr.supported) { // XR availability document - .querySelector(`.container > .button[data-xr="immersive-ar"]`) - ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_AR)); + .querySelector('.container > .button[data-xr="immersive-ar"]') + ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_AR)); document - .querySelector(`.container > .button[data-xr="immersive-vr"]`) - ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_VR)); + .querySelector('.container > .button[data-xr="immersive-vr"]') + ?.classList.toggle('active', app.xr.isAvailable(pc.XRTYPE_VR)); // XR availability events app.xr.on('available', (type, available) => { @@ -156,13 +156,13 @@ assetListLoader.load(() => { } // end session by keyboard ESC - app.keyboard.on('keydown', function (evt) { + app.keyboard.on('keydown', (evt) => { if (evt.key === pc.KEY_ESCAPE && app.xr.active) { app.xr.end(); } }); - app.on('update', function () { + app.on('update', () => { // fps meter const now = Date.now(); if (now - fpsTime >= 1000) { @@ -185,14 +185,14 @@ assetListLoader.load(() => { } }); - app.xr.on('start', function () { + app.xr.on('start', () => { message('Immersive XR session has started'); }); - app.xr.on('end', function () { + app.xr.on('end', () => { message('Immersive XR session has ended'); }); - app.xr.on('available:' + pc.XRTYPE_AR, function (available) { - message('Immersive XR is ' + (available ? 'available' : 'unavailable')); + app.xr.on(`available:${pc.XRTYPE_AR}`, (available) => { + message(`Immersive XR is ${available ? 'available' : 'unavailable'}`); }); if (!app.xr.isAvailable(pc.XRTYPE_VR)) { diff --git a/examples/utils/plugins/rollup-build-examples.mjs b/examples/utils/plugins/rollup-build-examples.mjs index e136d3687a0..d98e1be60d3 100644 --- a/examples/utils/plugins/rollup-build-examples.mjs +++ b/examples/utils/plugins/rollup-build-examples.mjs @@ -1,10 +1,10 @@ // custom plugins -import { watch } from '../rollup-watch.mjs'; import { build } from '../../scripts/build-examples.mjs'; +import { watch } from '../rollup-watch.mjs'; const GREEN_OUT = '\x1b[32m'; -const BOLD_OUT = `\x1b[1m`; -const REGULAR_OUT = `\x1b[22m`; +const BOLD_OUT = '\x1b[1m'; +const REGULAR_OUT = '\x1b[22m'; /** * This plugin builds the standalone html files. diff --git a/examples/utils/plugins/rollup-copy-static.mjs b/examples/utils/plugins/rollup-copy-static.mjs index e4aec48c059..6de1d71252d 100644 --- a/examples/utils/plugins/rollup-copy-static.mjs +++ b/examples/utils/plugins/rollup-copy-static.mjs @@ -4,8 +4,8 @@ import fse from 'fs-extra'; import { watch } from '../rollup-watch.mjs'; const YELLOW_OUT = '\x1b[33m'; -const BOLD_OUT = `\x1b[1m`; -const REGULAR_OUT = `\x1b[22m`; +const BOLD_OUT = '\x1b[1m'; +const REGULAR_OUT = '\x1b[22m'; const copied = new Set(); diff --git a/examples/utils/utils.mjs b/examples/utils/utils.mjs index 43835aadff4..f3e4724ce60 100644 --- a/examples/utils/utils.mjs +++ b/examples/utils/utils.mjs @@ -1,7 +1,8 @@ +/* eslint-disable regexp/no-super-linear-backtracking */ const regexPatterns = [ - /^\s*export\s*\*\s*from\s*.+\s*;\s*$/gm, - /^\s*export\s*{.*}\s*from\s*.+\s*;\s*$/gm, - /^\s*import\s*.+\s*;\s*$/gm + /^\s*export\s*\*\s*from\s*(?:\S.*|[\t\v\f \xa0\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff])\s*;\s*$/gm, + /^\s*export\s*\{.*\}\s*from\s*(?:\S.*|[\t\v\f \xa0\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff])\s*;\s*$/gm, + /^\s*import\s*(?:\S.*|[\t\v\f \xa0\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff])\s*;\s*$/gm ]; /**