From 09b9df6820188c5ddc7aa65f5deaac788617d014 Mon Sep 17 00:00:00 2001 From: kungfooman Date: Wed, 6 Dec 2023 13:42:56 +0100 Subject: [PATCH 1/3] Preparation --- conf-api.json | 7 ++++--- package-lock.json | 11 +++++++++-- package.json | 1 + src/framework/app-options.js | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/conf-api.json b/conf-api.json index c62ed4b6a56..e81aca09093 100644 --- a/conf-api.json +++ b/conf-api.json @@ -1,7 +1,8 @@ { "plugins": [ "plugins/markdown", - "./node_modules/jsdoc-tsimport-plugin/index.js" + "./node_modules/jsdoc-tsimport-plugin/index.js", + "./node_modules/jsdoc-typeof-plugin" ], "recurseDepth": 10, "source": { @@ -10,7 +11,7 @@ "sourceType": "module", "tags": { "allowUnknownTags": true, - "dictionaries": ["jsdoc","closure"] + "dictionaries": ["jsdoc", "closure"] }, "templates": { "cleverLinks": false, @@ -22,4 +23,4 @@ "recurse": true, "template": "./node_modules/@playcanvas/jsdoc-template" } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 4b73c78a1fe..33fa2069c6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "playcanvas", - "version": "1.67.0-dev", + "version": "1.68.0-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "playcanvas", - "version": "1.67.0-dev", + "version": "1.68.0-dev", "license": "MIT", "dependencies": { "@types/webxr": "^0.5.7", @@ -30,6 +30,7 @@ "fflate": "^0.8.1", "jsdoc": "^4.0.2", "jsdoc-tsimport-plugin": "^1.0.5", + "jsdoc-typeof-plugin": "^1.0.0", "karma": "^6.4.2", "karma-chrome-launcher": "^3.2.0", "karma-mocha": "2.0.1", @@ -5499,6 +5500,12 @@ "node": ">=12.0.0" } }, + "node_modules/jsdoc-typeof-plugin": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-typeof-plugin/-/jsdoc-typeof-plugin-1.0.0.tgz", + "integrity": "sha512-iG/LKaVnwRgi+EET6oi6uWNi+hVSUNM1t1NAywfCPIayDgsbQ4LWynnqO4IDTOPS7qObEWLJOjoqNby8+oiqXg==", + "dev": true + }, "node_modules/jsdoc/node_modules/escape-string-regexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", diff --git a/package.json b/package.json index 6c2a0c955a3..0f073d6c6d4 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "fflate": "^0.8.1", "jsdoc": "^4.0.2", "jsdoc-tsimport-plugin": "^1.0.5", + "jsdoc-typeof-plugin": "^1.0.0", "karma": "^6.4.2", "karma-chrome-launcher": "^3.2.0", "karma-mocha": "2.0.1", diff --git a/src/framework/app-options.js b/src/framework/app-options.js index f1303ebcb1a..cd9cd16faef 100644 --- a/src/framework/app-options.js +++ b/src/framework/app-options.js @@ -93,14 +93,14 @@ class AppOptions { /** * The component systems the app requires. * - * @type {import('./components/system.js').ComponentSystem[]} + * @type {typeof import('./components/system.js').ComponentSystem[]} */ componentSystems = []; /** * The resource handlers the app requires. * - * @type {import('./handlers/handler.js').ResourceHandler[]} + * @type {typeof import('./handlers/handler.js').ResourceHandler[]} */ resourceHandlers = []; } From 9a5949274048871e4bebdc4e88c0decfa3b7c7ae Mon Sep 17 00:00:00 2001 From: kungfooman Date: Wed, 6 Dec 2023 14:03:28 +0100 Subject: [PATCH 2/3] animation examples: remove ts-ignore --- examples/src/examples/animation/blend-trees-1d.mjs | 5 ----- .../src/examples/animation/blend-trees-2d-cartesian.mjs | 5 ----- .../src/examples/animation/blend-trees-2d-directional.mjs | 5 ----- examples/src/examples/animation/component-properties.mjs | 4 ---- examples/src/examples/animation/events.mjs | 5 ----- examples/src/examples/animation/layer-masks.mjs | 5 ----- examples/src/examples/animation/locomotion.mjs | 7 ------- examples/src/examples/animation/tween.mjs | 5 ----- .../src/examples/graphics/contact-hardening-shadows.mjs | 5 ----- src/framework/app-options.js | 2 +- 10 files changed, 1 insertion(+), 47 deletions(-) diff --git a/examples/src/examples/animation/blend-trees-1d.mjs b/examples/src/examples/animation/blend-trees-1d.mjs index 0b3c8bfdb8d..0ed5b330b8f 100644 --- a/examples/src/examples/animation/blend-trees-1d.mjs +++ b/examples/src/examples/animation/blend-trees-1d.mjs @@ -46,15 +46,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, data, glsla createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/blend-trees-2d-cartesian.mjs b/examples/src/examples/animation/blend-trees-2d-cartesian.mjs index 3ade7b27b81..bd7819b2c6c 100644 --- a/examples/src/examples/animation/blend-trees-2d-cartesian.mjs +++ b/examples/src/examples/animation/blend-trees-2d-cartesian.mjs @@ -150,15 +150,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/blend-trees-2d-directional.mjs b/examples/src/examples/animation/blend-trees-2d-directional.mjs index 502a562f1e3..5e8bba7ae5b 100644 --- a/examples/src/examples/animation/blend-trees-2d-directional.mjs +++ b/examples/src/examples/animation/blend-trees-2d-directional.mjs @@ -107,15 +107,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/component-properties.mjs b/examples/src/examples/animation/component-properties.mjs index 092638b5c35..8e93d8e1828 100644 --- a/examples/src/examples/animation/component-properties.mjs +++ b/examples/src/examples/animation/component-properties.mjs @@ -39,13 +39,9 @@ async function example({ canvas, deviceType, data, assetPath, glslangPath, twgsl createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/events.mjs b/examples/src/examples/animation/events.mjs index ffecbaeee89..a8f4b4bee67 100644 --- a/examples/src/examples/animation/events.mjs +++ b/examples/src/examples/animation/events.mjs @@ -26,15 +26,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/layer-masks.mjs b/examples/src/examples/animation/layer-masks.mjs index 01a9806f8b1..90a396826fd 100644 --- a/examples/src/examples/animation/layer-masks.mjs +++ b/examples/src/examples/animation/layer-masks.mjs @@ -112,15 +112,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/locomotion.mjs b/examples/src/examples/animation/locomotion.mjs index c3702aa6e55..fe7ae0e9349 100644 --- a/examples/src/examples/animation/locomotion.mjs +++ b/examples/src/examples/animation/locomotion.mjs @@ -66,19 +66,12 @@ async function example({ canvas, deviceType, assetPath, ammoPath, glslangPath, t createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem, - // @ts-ignore pc.CollisionComponentSystem, - // @ts-ignore pc.RigidBodyComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/animation/tween.mjs b/examples/src/examples/animation/tween.mjs index 5f2e6172f96..09b3f4714d3 100644 --- a/examples/src/examples/animation/tween.mjs +++ b/examples/src/examples/animation/tween.mjs @@ -24,15 +24,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/contact-hardening-shadows.mjs b/examples/src/examples/graphics/contact-hardening-shadows.mjs index 9feab351a2e..e0c4e2f14f3 100644 --- a/examples/src/examples/graphics/contact-hardening-shadows.mjs +++ b/examples/src/examples/graphics/contact-hardening-shadows.mjs @@ -153,15 +153,10 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/src/framework/app-options.js b/src/framework/app-options.js index cd9cd16faef..667834fa942 100644 --- a/src/framework/app-options.js +++ b/src/framework/app-options.js @@ -100,7 +100,7 @@ class AppOptions { /** * The resource handlers the app requires. * - * @type {typeof import('./handlers/handler.js').ResourceHandler[]} + * @type {import('./handlers/handler.js').ResourceHandler[]} */ resourceHandlers = []; } From cdafc4fd0a7908307298646a55f4f006be66082e Mon Sep 17 00:00:00 2001 From: kungfooman Date: Wed, 6 Dec 2023 14:28:24 +0100 Subject: [PATCH 3/3] fix rest --- examples/src/examples/graphics/area-lights.mjs | 3 --- examples/src/examples/graphics/area-picker.mjs | 3 --- examples/src/examples/graphics/asset-viewer.mjs | 7 +------ examples/src/examples/graphics/batching-dynamic.mjs | 3 --- .../src/examples/graphics/clustered-area-lights.mjs | 4 ---- examples/src/examples/graphics/clustered-lighting.mjs | 4 ---- .../src/examples/graphics/clustered-omni-shadows.mjs | 6 +----- .../src/examples/graphics/clustered-spot-shadows.mjs | 6 +----- .../examples/graphics/contact-hardening-shadows.mjs | 2 +- examples/src/examples/graphics/grab-pass.mjs | 2 -- examples/src/examples/graphics/ground-fog.mjs | 4 ---- .../src/examples/graphics/hardware-instancing.mjs | 2 -- examples/src/examples/graphics/hierarchy.mjs | 3 --- examples/src/examples/graphics/layers.mjs | 3 --- .../src/examples/graphics/light-physical-units.mjs | 6 +----- examples/src/examples/graphics/lights-baked-a-o.mjs | 6 +----- examples/src/examples/graphics/lights-baked.mjs | 3 --- examples/src/examples/graphics/lights.mjs | 3 --- examples/src/examples/graphics/lines.mjs | 3 --- examples/src/examples/graphics/lit-material.mjs | 5 ----- .../src/examples/graphics/material-anisotropic.mjs | 4 ---- examples/src/examples/graphics/material-basic.mjs | 3 --- .../src/examples/graphics/material-clear-coat.mjs | 3 --- examples/src/examples/graphics/material-physical.mjs | 3 --- .../graphics/material-translucent-specular.mjs | 4 ---- examples/src/examples/graphics/mesh-decals.mjs | 3 --- examples/src/examples/graphics/mesh-deformation.mjs | 3 --- examples/src/examples/graphics/mesh-generation.mjs | 3 --- examples/src/examples/graphics/mesh-morph-many.mjs | 3 --- examples/src/examples/graphics/mesh-morph.mjs | 3 --- examples/src/examples/graphics/model-asset.mjs | 3 --- examples/src/examples/graphics/model-outline.mjs | 4 ---- examples/src/examples/graphics/model-textured-box.mjs | 3 --- .../src/examples/graphics/multi-render-targets.mjs | 6 ------ examples/src/examples/graphics/multi-view.mjs | 6 +----- examples/src/examples/graphics/painter.mjs | 5 ----- examples/src/examples/graphics/particles-spark.mjs | 4 ---- examples/src/examples/graphics/portal.mjs | 4 ---- examples/src/examples/graphics/post-effects.mjs | 8 +------- examples/src/examples/graphics/post-processing.mjs | 8 +------- examples/src/examples/graphics/reflection-box.mjs | 6 +----- examples/src/examples/graphics/reflection-cubemap.mjs | 4 ---- examples/src/examples/graphics/reflection-planar.mjs | 3 --- examples/src/examples/graphics/render-asset.mjs | 3 --- examples/src/examples/graphics/render-pass.mjs | 3 --- examples/src/examples/graphics/render-to-texture.mjs | 5 ----- examples/src/examples/graphics/shader-burn.mjs | 3 --- examples/src/examples/graphics/shader-compile.mjs | 3 --- examples/src/examples/graphics/shader-toon.mjs | 3 --- examples/src/examples/graphics/shader-wobble.mjs | 3 --- examples/src/examples/graphics/shadow-cascades.mjs | 6 +----- examples/src/examples/graphics/shapes.mjs | 3 --- examples/src/examples/graphics/texture-array.mjs | 4 ---- examples/src/examples/graphics/texture-basis.mjs | 3 --- examples/src/examples/input/gamepad.mjs | 2 -- examples/src/examples/input/keyboard.mjs | 2 -- examples/src/examples/input/mouse.mjs | 2 -- examples/src/examples/loaders/draco-glb.mjs | 3 --- examples/src/examples/loaders/glb.mjs | 3 --- examples/src/examples/loaders/gltf-export.mjs | 3 --- examples/src/examples/loaders/loaders-gl.mjs | 3 --- examples/src/examples/loaders/splat-many.mjs | 4 ---- examples/src/examples/loaders/splat.mjs | 4 ---- examples/src/examples/loaders/usdz-export.mjs | 3 --- examples/src/examples/misc/hello-world.mjs | 3 --- examples/src/examples/misc/spineboy.mjs | 2 -- examples/src/examples/physics/compound-collision.mjs | 11 ++--------- examples/src/examples/physics/falling-shapes.mjs | 7 ------- examples/src/examples/physics/offset-collision.mjs | 7 ------- examples/src/examples/physics/raycast.mjs | 7 ------- examples/src/examples/physics/vehicle.mjs | 6 ------ examples/src/examples/user-interface/button-basic.mjs | 5 ----- .../src/examples/user-interface/button-sprite.mjs | 5 ----- .../src/examples/user-interface/custom-shader.mjs | 5 ----- examples/src/examples/user-interface/layout-group.mjs | 7 ------- .../src/examples/user-interface/particle-system.mjs | 6 ------ examples/src/examples/user-interface/scroll-view.mjs | 8 -------- .../examples/user-interface/text-auto-font-size.mjs | 8 -------- examples/src/examples/user-interface/text-emojis.mjs | 9 --------- .../src/examples/user-interface/text-localization.mjs | 5 ----- .../src/examples/user-interface/text-typewriter.mjs | 5 ----- examples/src/examples/user-interface/text.mjs | 8 -------- .../src/examples/user-interface/world-to-screen.mjs | 6 ------ examples/src/examples/user-interface/world-ui.mjs | 7 ------- examples/src/examples/xr/ar-mesh-detection.mjs | 2 +- examples/src/examples/xr/ar-plane-detection.mjs | 2 +- 86 files changed, 15 insertions(+), 358 deletions(-) diff --git a/examples/src/examples/graphics/area-lights.mjs b/examples/src/examples/graphics/area-lights.mjs index fe1d75a84c2..ceafdf0de1c 100644 --- a/examples/src/examples/graphics/area-lights.mjs +++ b/examples/src/examples/graphics/area-lights.mjs @@ -28,11 +28,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/area-picker.mjs b/examples/src/examples/graphics/area-picker.mjs index a70575a94e0..04dcedf75d1 100644 --- a/examples/src/examples/graphics/area-picker.mjs +++ b/examples/src/examples/graphics/area-picker.mjs @@ -24,11 +24,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/asset-viewer.mjs b/examples/src/examples/graphics/asset-viewer.mjs index 7d55f8ab389..74db8d9070a 100644 --- a/examples/src/examples/graphics/asset-viewer.mjs +++ b/examples/src/examples/graphics/asset-viewer.mjs @@ -23,7 +23,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const assets = { @@ -51,15 +51,10 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/batching-dynamic.mjs b/examples/src/examples/graphics/batching-dynamic.mjs index c1cac856d44..cb88b63b1c8 100644 --- a/examples/src/examples/graphics/batching-dynamic.mjs +++ b/examples/src/examples/graphics/batching-dynamic.mjs @@ -20,11 +20,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.batchManager = pc.BatchManager; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; diff --git a/examples/src/examples/graphics/clustered-area-lights.mjs b/examples/src/examples/graphics/clustered-area-lights.mjs index b75a0e78b69..db053f93d7f 100644 --- a/examples/src/examples/graphics/clustered-area-lights.mjs +++ b/examples/src/examples/graphics/clustered-area-lights.mjs @@ -66,13 +66,9 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/clustered-lighting.mjs b/examples/src/examples/graphics/clustered-lighting.mjs index bac2712adfe..4437c4955e2 100644 --- a/examples/src/examples/graphics/clustered-lighting.mjs +++ b/examples/src/examples/graphics/clustered-lighting.mjs @@ -24,13 +24,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/clustered-omni-shadows.mjs b/examples/src/examples/graphics/clustered-omni-shadows.mjs index 99067678764..bb23c9a343a 100644 --- a/examples/src/examples/graphics/clustered-omni-shadows.mjs +++ b/examples/src/examples/graphics/clustered-omni-shadows.mjs @@ -47,7 +47,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const assets = { @@ -74,13 +74,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/clustered-spot-shadows.mjs b/examples/src/examples/graphics/clustered-spot-shadows.mjs index 2649a4c929e..4168ce9f6de 100644 --- a/examples/src/examples/graphics/clustered-spot-shadows.mjs +++ b/examples/src/examples/graphics/clustered-spot-shadows.mjs @@ -106,7 +106,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const observer = data; const assets = { @@ -130,13 +130,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/contact-hardening-shadows.mjs b/examples/src/examples/graphics/contact-hardening-shadows.mjs index e0c4e2f14f3..4abc82a0234 100644 --- a/examples/src/examples/graphics/contact-hardening-shadows.mjs +++ b/examples/src/examples/graphics/contact-hardening-shadows.mjs @@ -120,7 +120,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath, dracoPath }) { pc.WasmModule.setConfig('DracoDecoderModule', { diff --git a/examples/src/examples/graphics/grab-pass.mjs b/examples/src/examples/graphics/grab-pass.mjs index 37a0c67d81e..e8fd516e29d 100644 --- a/examples/src/examples/graphics/grab-pass.mjs +++ b/examples/src/examples/graphics/grab-pass.mjs @@ -27,9 +27,7 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/ground-fog.mjs b/examples/src/examples/graphics/ground-fog.mjs index 54f727c470f..3ff6aa9b2d2 100644 --- a/examples/src/examples/graphics/ground-fog.mjs +++ b/examples/src/examples/graphics/ground-fog.mjs @@ -46,13 +46,9 @@ async function example({ canvas, deviceType, files, assetPath, scriptsPath, glsl createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/hardware-instancing.mjs b/examples/src/examples/graphics/hardware-instancing.mjs index 4e3602cd3ee..b1fe2d76009 100644 --- a/examples/src/examples/graphics/hardware-instancing.mjs +++ b/examples/src/examples/graphics/hardware-instancing.mjs @@ -21,9 +21,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/hierarchy.mjs b/examples/src/examples/graphics/hierarchy.mjs index cab1df3f692..b7a9c90942b 100644 --- a/examples/src/examples/graphics/hierarchy.mjs +++ b/examples/src/examples/graphics/hierarchy.mjs @@ -17,11 +17,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; diff --git a/examples/src/examples/graphics/layers.mjs b/examples/src/examples/graphics/layers.mjs index c26d1daefa2..2a9a7593ba4 100644 --- a/examples/src/examples/graphics/layers.mjs +++ b/examples/src/examples/graphics/layers.mjs @@ -17,11 +17,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; diff --git a/examples/src/examples/graphics/light-physical-units.mjs b/examples/src/examples/graphics/light-physical-units.mjs index f840e8ae50f..3935a0ead02 100644 --- a/examples/src/examples/graphics/light-physical-units.mjs +++ b/examples/src/examples/graphics/light-physical-units.mjs @@ -109,7 +109,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const assets = { @@ -137,13 +137,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/lights-baked-a-o.mjs b/examples/src/examples/graphics/lights-baked-a-o.mjs index 602ba4ff2b4..b64a1e0dce1 100644 --- a/examples/src/examples/graphics/lights-baked-a-o.mjs +++ b/examples/src/examples/graphics/lights-baked-a-o.mjs @@ -153,7 +153,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const assets = { @@ -178,13 +178,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.lightmapper = pc.Lightmapper; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/lights-baked.mjs b/examples/src/examples/graphics/lights-baked.mjs index a3e7a0dab3a..1c1df3ee82e 100644 --- a/examples/src/examples/graphics/lights-baked.mjs +++ b/examples/src/examples/graphics/lights-baked.mjs @@ -20,11 +20,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.lightmapper = pc.Lightmapper; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; diff --git a/examples/src/examples/graphics/lights.mjs b/examples/src/examples/graphics/lights.mjs index a5234b941ca..c66b7aec544 100644 --- a/examples/src/examples/graphics/lights.mjs +++ b/examples/src/examples/graphics/lights.mjs @@ -122,11 +122,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/lines.mjs b/examples/src/examples/graphics/lines.mjs index ccf6cd8d670..7ce6c4287cf 100644 --- a/examples/src/examples/graphics/lines.mjs +++ b/examples/src/examples/graphics/lines.mjs @@ -21,11 +21,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/lit-material.mjs b/examples/src/examples/graphics/lit-material.mjs index ff5346b886f..a3369957306 100644 --- a/examples/src/examples/graphics/lit-material.mjs +++ b/examples/src/examples/graphics/lit-material.mjs @@ -30,15 +30,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/material-anisotropic.mjs b/examples/src/examples/graphics/material-anisotropic.mjs index 2ca1305220b..9356aa86cff 100644 --- a/examples/src/examples/graphics/material-anisotropic.mjs +++ b/examples/src/examples/graphics/material-anisotropic.mjs @@ -24,13 +24,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/material-basic.mjs b/examples/src/examples/graphics/material-basic.mjs index c48af89e9e3..19354a9965d 100644 --- a/examples/src/examples/graphics/material-basic.mjs +++ b/examples/src/examples/graphics/material-basic.mjs @@ -22,11 +22,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/material-clear-coat.mjs b/examples/src/examples/graphics/material-clear-coat.mjs index 1971be8bb76..38d2ef56103 100644 --- a/examples/src/examples/graphics/material-clear-coat.mjs +++ b/examples/src/examples/graphics/material-clear-coat.mjs @@ -26,11 +26,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/material-physical.mjs b/examples/src/examples/graphics/material-physical.mjs index cae8b0e76ec..e3054c6ebb8 100644 --- a/examples/src/examples/graphics/material-physical.mjs +++ b/examples/src/examples/graphics/material-physical.mjs @@ -22,11 +22,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/material-translucent-specular.mjs b/examples/src/examples/graphics/material-translucent-specular.mjs index 6bd0f9ef247..0e36f3305b6 100644 --- a/examples/src/examples/graphics/material-translucent-specular.mjs +++ b/examples/src/examples/graphics/material-translucent-specular.mjs @@ -22,13 +22,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/mesh-decals.mjs b/examples/src/examples/graphics/mesh-decals.mjs index df7b01cecdd..10acef32a3e 100644 --- a/examples/src/examples/graphics/mesh-decals.mjs +++ b/examples/src/examples/graphics/mesh-decals.mjs @@ -21,11 +21,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.CameraComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/mesh-deformation.mjs b/examples/src/examples/graphics/mesh-deformation.mjs index 7f4008b27d2..2e6b13ed0d4 100644 --- a/examples/src/examples/graphics/mesh-deformation.mjs +++ b/examples/src/examples/graphics/mesh-deformation.mjs @@ -23,11 +23,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/mesh-generation.mjs b/examples/src/examples/graphics/mesh-generation.mjs index 8bf95414c62..5bbd57ab0c6 100644 --- a/examples/src/examples/graphics/mesh-generation.mjs +++ b/examples/src/examples/graphics/mesh-generation.mjs @@ -21,11 +21,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/mesh-morph-many.mjs b/examples/src/examples/graphics/mesh-morph-many.mjs index 460db79ed58..89d6220644e 100644 --- a/examples/src/examples/graphics/mesh-morph-many.mjs +++ b/examples/src/examples/graphics/mesh-morph-many.mjs @@ -25,11 +25,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/mesh-morph.mjs b/examples/src/examples/graphics/mesh-morph.mjs index f5811fb8c97..2e4e493d487 100644 --- a/examples/src/examples/graphics/mesh-morph.mjs +++ b/examples/src/examples/graphics/mesh-morph.mjs @@ -17,11 +17,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; diff --git a/examples/src/examples/graphics/model-asset.mjs b/examples/src/examples/graphics/model-asset.mjs index 236765626c4..1b39c9d21af 100644 --- a/examples/src/examples/graphics/model-asset.mjs +++ b/examples/src/examples/graphics/model-asset.mjs @@ -21,11 +21,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.ModelComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/model-outline.mjs b/examples/src/examples/graphics/model-outline.mjs index b220ca7b2a6..3734b90e1ed 100644 --- a/examples/src/examples/graphics/model-outline.mjs +++ b/examples/src/examples/graphics/model-outline.mjs @@ -21,13 +21,9 @@ async function example({ canvas, deviceType, scriptsPath, glslangPath, twgslPath createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/model-textured-box.mjs b/examples/src/examples/graphics/model-textured-box.mjs index 95e1df0488f..59cbbf441e2 100644 --- a/examples/src/examples/graphics/model-textured-box.mjs +++ b/examples/src/examples/graphics/model-textured-box.mjs @@ -21,11 +21,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/multi-render-targets.mjs b/examples/src/examples/graphics/multi-render-targets.mjs index 17f864ee87c..dbcbaf2b784 100644 --- a/examples/src/examples/graphics/multi-render-targets.mjs +++ b/examples/src/examples/graphics/multi-render-targets.mjs @@ -32,17 +32,11 @@ async function example({ canvas, deviceType, files, dracoPath, assetPath, glslan createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/multi-view.mjs b/examples/src/examples/graphics/multi-view.mjs index 8c106da63a4..c8964aad547 100644 --- a/examples/src/examples/graphics/multi-view.mjs +++ b/examples/src/examples/graphics/multi-view.mjs @@ -35,7 +35,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath, dracoPath }) { // set up and load draco module, as the glb we load is draco compressed @@ -66,13 +66,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/painter.mjs b/examples/src/examples/graphics/painter.mjs index 27f27d82176..12a65f00ebb 100644 --- a/examples/src/examples/graphics/painter.mjs +++ b/examples/src/examples/graphics/painter.mjs @@ -20,15 +20,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ParticleSystemComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/particles-spark.mjs b/examples/src/examples/graphics/particles-spark.mjs index ed5e5461241..17fc0aac970 100644 --- a/examples/src/examples/graphics/particles-spark.mjs +++ b/examples/src/examples/graphics/particles-spark.mjs @@ -20,13 +20,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ParticleSystemComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/portal.mjs b/examples/src/examples/graphics/portal.mjs index b6c1cffd9dc..5a956270461 100644 --- a/examples/src/examples/graphics/portal.mjs +++ b/examples/src/examples/graphics/portal.mjs @@ -24,13 +24,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/post-effects.mjs b/examples/src/examples/graphics/post-effects.mjs index 950a42957ac..1bf8482da0c 100644 --- a/examples/src/examples/graphics/post-effects.mjs +++ b/examples/src/examples/graphics/post-effects.mjs @@ -151,7 +151,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath, dracoPath }) { // set up and load draco module, as the glb we load is draco compressed @@ -184,17 +184,11 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/post-processing.mjs b/examples/src/examples/graphics/post-processing.mjs index 252f05f6563..599d513bc1e 100644 --- a/examples/src/examples/graphics/post-processing.mjs +++ b/examples/src/examples/graphics/post-processing.mjs @@ -183,7 +183,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. */ -async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, dracoPath, pcx, data }) { +async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath, twgslPath, dracoPath, pcx, data }) { // set up and load draco module, as the glb we load is draco compressed pc.WasmModule.setConfig('DracoDecoderModule', { @@ -218,17 +218,11 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/reflection-box.mjs b/examples/src/examples/graphics/reflection-box.mjs index 0feb9bfe697..72bc1148b33 100644 --- a/examples/src/examples/graphics/reflection-box.mjs +++ b/examples/src/examples/graphics/reflection-box.mjs @@ -60,7 +60,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const assets = { @@ -82,13 +82,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/reflection-cubemap.mjs b/examples/src/examples/graphics/reflection-cubemap.mjs index bc124590a57..4be837f97ee 100644 --- a/examples/src/examples/graphics/reflection-cubemap.mjs +++ b/examples/src/examples/graphics/reflection-cubemap.mjs @@ -22,13 +22,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/reflection-planar.mjs b/examples/src/examples/graphics/reflection-planar.mjs index bd5d1699116..d5b28a7899a 100644 --- a/examples/src/examples/graphics/reflection-planar.mjs +++ b/examples/src/examples/graphics/reflection-planar.mjs @@ -24,11 +24,8 @@ async function example({ canvas, deviceType, files, scriptsPath, assetPath, glsl createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/render-asset.mjs b/examples/src/examples/graphics/render-asset.mjs index f2ff00dab89..e78434fb860 100644 --- a/examples/src/examples/graphics/render-asset.mjs +++ b/examples/src/examples/graphics/render-asset.mjs @@ -23,11 +23,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/render-pass.mjs b/examples/src/examples/graphics/render-pass.mjs index 0464e222fa6..3dc13865902 100644 --- a/examples/src/examples/graphics/render-pass.mjs +++ b/examples/src/examples/graphics/render-pass.mjs @@ -55,11 +55,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/render-to-texture.mjs b/examples/src/examples/graphics/render-to-texture.mjs index 2ce7eb50d6a..2f62dda2fac 100644 --- a/examples/src/examples/graphics/render-to-texture.mjs +++ b/examples/src/examples/graphics/render-to-texture.mjs @@ -35,15 +35,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.ParticleSystemComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/shader-burn.mjs b/examples/src/examples/graphics/shader-burn.mjs index 37f10aa5076..100c3e364b3 100644 --- a/examples/src/examples/graphics/shader-burn.mjs +++ b/examples/src/examples/graphics/shader-burn.mjs @@ -27,11 +27,8 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/shader-compile.mjs b/examples/src/examples/graphics/shader-compile.mjs index 55430b4dad0..54bb4b9c8aa 100644 --- a/examples/src/examples/graphics/shader-compile.mjs +++ b/examples/src/examples/graphics/shader-compile.mjs @@ -31,11 +31,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/shader-toon.mjs b/examples/src/examples/graphics/shader-toon.mjs index 012f9c07450..e2d5c7cefb2 100644 --- a/examples/src/examples/graphics/shader-toon.mjs +++ b/examples/src/examples/graphics/shader-toon.mjs @@ -26,11 +26,8 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/shader-wobble.mjs b/examples/src/examples/graphics/shader-wobble.mjs index b8f417e5b98..da44e84c0c8 100644 --- a/examples/src/examples/graphics/shader-wobble.mjs +++ b/examples/src/examples/graphics/shader-wobble.mjs @@ -26,11 +26,8 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/shadow-cascades.mjs b/examples/src/examples/graphics/shadow-cascades.mjs index ca3009d1438..5687b93910b 100644 --- a/examples/src/examples/graphics/shadow-cascades.mjs +++ b/examples/src/examples/graphics/shadow-cascades.mjs @@ -74,7 +74,7 @@ function controls({ observer, ReactPCUI, React, jsx, fragment }) { /** * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. - */ + */ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glslangPath, twgslPath }) { const assets = { @@ -96,13 +96,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/shapes.mjs b/examples/src/examples/graphics/shapes.mjs index 7e8778bf081..a7a24ccb9b8 100644 --- a/examples/src/examples/graphics/shapes.mjs +++ b/examples/src/examples/graphics/shapes.mjs @@ -18,11 +18,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/texture-array.mjs b/examples/src/examples/graphics/texture-array.mjs index 0b129d83c33..5733032bf91 100644 --- a/examples/src/examples/graphics/texture-array.mjs +++ b/examples/src/examples/graphics/texture-array.mjs @@ -95,13 +95,9 @@ async function example({ canvas, deviceType, data, files, assetPath, scriptsPath createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/graphics/texture-basis.mjs b/examples/src/examples/graphics/texture-basis.mjs index 70cd02f4e8d..32dc3f895ac 100644 --- a/examples/src/examples/graphics/texture-basis.mjs +++ b/examples/src/examples/graphics/texture-basis.mjs @@ -37,11 +37,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/input/gamepad.mjs b/examples/src/examples/input/gamepad.mjs index f62d7fa4db8..636809e4be7 100644 --- a/examples/src/examples/input/gamepad.mjs +++ b/examples/src/examples/input/gamepad.mjs @@ -24,9 +24,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/input/keyboard.mjs b/examples/src/examples/input/keyboard.mjs index 82cfabac59e..6a9c5548458 100644 --- a/examples/src/examples/input/keyboard.mjs +++ b/examples/src/examples/input/keyboard.mjs @@ -23,9 +23,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/input/mouse.mjs b/examples/src/examples/input/mouse.mjs index 4ddffdb08d2..7ec2edb6166 100644 --- a/examples/src/examples/input/mouse.mjs +++ b/examples/src/examples/input/mouse.mjs @@ -21,9 +21,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/draco-glb.mjs b/examples/src/examples/loaders/draco-glb.mjs index 5bb28517c09..fc80494d599 100644 --- a/examples/src/examples/loaders/draco-glb.mjs +++ b/examples/src/examples/loaders/draco-glb.mjs @@ -23,11 +23,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/glb.mjs b/examples/src/examples/loaders/glb.mjs index 360575b14d2..3f0349b2e28 100644 --- a/examples/src/examples/loaders/glb.mjs +++ b/examples/src/examples/loaders/glb.mjs @@ -24,11 +24,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/gltf-export.mjs b/examples/src/examples/loaders/gltf-export.mjs index 82e3042993f..d9d0e1a9abd 100644 --- a/examples/src/examples/loaders/gltf-export.mjs +++ b/examples/src/examples/loaders/gltf-export.mjs @@ -48,11 +48,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/loaders-gl.mjs b/examples/src/examples/loaders/loaders-gl.mjs index a07741b5e60..fb59254e39f 100644 --- a/examples/src/examples/loaders/loaders-gl.mjs +++ b/examples/src/examples/loaders/loaders-gl.mjs @@ -57,11 +57,8 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/splat-many.mjs b/examples/src/examples/loaders/splat-many.mjs index fa024021581..bbb4648929d 100644 --- a/examples/src/examples/loaders/splat-many.mjs +++ b/examples/src/examples/loaders/splat-many.mjs @@ -20,13 +20,9 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/splat.mjs b/examples/src/examples/loaders/splat.mjs index a0f6eaca607..e981e0def9e 100644 --- a/examples/src/examples/loaders/splat.mjs +++ b/examples/src/examples/loaders/splat.mjs @@ -20,13 +20,9 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.touch = new pc.TouchDevice(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/loaders/usdz-export.mjs b/examples/src/examples/loaders/usdz-export.mjs index 30fbec26f38..31fa8cb0069 100644 --- a/examples/src/examples/loaders/usdz-export.mjs +++ b/examples/src/examples/loaders/usdz-export.mjs @@ -35,11 +35,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath, createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/misc/hello-world.mjs b/examples/src/examples/misc/hello-world.mjs index cbb3a66c2e8..1c86bb0c201 100644 --- a/examples/src/examples/misc/hello-world.mjs +++ b/examples/src/examples/misc/hello-world.mjs @@ -17,11 +17,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) { createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/misc/spineboy.mjs b/examples/src/examples/misc/spineboy.mjs index 648f46d0b59..f11aa4b7d86 100644 --- a/examples/src/examples/misc/spineboy.mjs +++ b/examples/src/examples/misc/spineboy.mjs @@ -24,9 +24,7 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.graphicsDevice = device; createOptions.componentSystems = [ - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/physics/compound-collision.mjs b/examples/src/examples/physics/compound-collision.mjs index a871bad18c1..c3af5e0ba33 100644 --- a/examples/src/examples/physics/compound-collision.mjs +++ b/examples/src/examples/physics/compound-collision.mjs @@ -25,19 +25,12 @@ async function example({ canvas, deviceType, ammoPath, glslangPath, twgslPath }) createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.CollisionComponentSystem, - // @ts-ignore pc.RigidBodyComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ @@ -70,8 +63,8 @@ async function example({ canvas, deviceType, ammoPath, glslangPath, twgslPath }) app.scene.ambientLight = new pc.Color(0.2, 0.2, 0.2); /** - * @param {pc.Color} color - * @returns {pc.StandardMaterial} + * @param {pc.Color} color - The diffuse color. + * @returns {pc.StandardMaterial} The standard material. */ function createMaterial(color) { const material = new pc.StandardMaterial(); diff --git a/examples/src/examples/physics/falling-shapes.mjs b/examples/src/examples/physics/falling-shapes.mjs index 54871a5fd53..93f52769abf 100644 --- a/examples/src/examples/physics/falling-shapes.mjs +++ b/examples/src/examples/physics/falling-shapes.mjs @@ -29,19 +29,12 @@ async function example({ canvas, deviceType, assetPath, ammoPath, glslangPath, t createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.CollisionComponentSystem, - // @ts-ignore pc.RigidBodyComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/physics/offset-collision.mjs b/examples/src/examples/physics/offset-collision.mjs index 9a179a8ec36..d0857553a53 100644 --- a/examples/src/examples/physics/offset-collision.mjs +++ b/examples/src/examples/physics/offset-collision.mjs @@ -32,19 +32,12 @@ async function example({ canvas, deviceType, assetPath, ammoPath, glslangPath, t createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.CollisionComponentSystem, - // @ts-ignore pc.RigidBodyComponentSystem, - // @ts-ignore pc.AnimComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/physics/raycast.mjs b/examples/src/examples/physics/raycast.mjs index 7119659d6b6..4d58df281ac 100644 --- a/examples/src/examples/physics/raycast.mjs +++ b/examples/src/examples/physics/raycast.mjs @@ -30,19 +30,12 @@ async function example({ canvas, deviceType, assetPath, ammoPath, glslangPath, t createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.CollisionComponentSystem, - // @ts-ignore pc.RigidBodyComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/physics/vehicle.mjs b/examples/src/examples/physics/vehicle.mjs index d79a3178d3a..80d3d2aaa66 100644 --- a/examples/src/examples/physics/vehicle.mjs +++ b/examples/src/examples/physics/vehicle.mjs @@ -34,17 +34,11 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, ammoPath, g createOptions.keyboard = new pc.Keyboard(document.body); createOptions.componentSystems = [ - // @ts-ignore pc.ModelComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScriptComponentSystem, - // @ts-ignore pc.CollisionComponentSystem, - // @ts-ignore pc.RigidBodyComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/button-basic.mjs b/examples/src/examples/user-interface/button-basic.mjs index 1c92f5476fa..25eac3edcb6 100644 --- a/examples/src/examples/user-interface/button-basic.mjs +++ b/examples/src/examples/user-interface/button-basic.mjs @@ -25,15 +25,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/button-sprite.mjs b/examples/src/examples/user-interface/button-sprite.mjs index b307f5cf10a..2e5be0f0c39 100644 --- a/examples/src/examples/user-interface/button-sprite.mjs +++ b/examples/src/examples/user-interface/button-sprite.mjs @@ -27,15 +27,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/custom-shader.mjs b/examples/src/examples/user-interface/custom-shader.mjs index 04fc1abf046..0d14b65cfb8 100644 --- a/examples/src/examples/user-interface/custom-shader.mjs +++ b/examples/src/examples/user-interface/custom-shader.mjs @@ -27,15 +27,10 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/layout-group.mjs b/examples/src/examples/user-interface/layout-group.mjs index 4588d118e8b..cec31b6bfbc 100644 --- a/examples/src/examples/user-interface/layout-group.mjs +++ b/examples/src/examples/user-interface/layout-group.mjs @@ -24,19 +24,12 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.LayoutGroupComponentSystem, - // @ts-ignore pc.LayoutChildComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/particle-system.mjs b/examples/src/examples/user-interface/particle-system.mjs index 9468e961d9c..cb9d735c6b5 100644 --- a/examples/src/examples/user-interface/particle-system.mjs +++ b/examples/src/examples/user-interface/particle-system.mjs @@ -25,17 +25,11 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.ParticleSystemComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/scroll-view.mjs b/examples/src/examples/user-interface/scroll-view.mjs index e3a2a185655..a67d2f74f54 100644 --- a/examples/src/examples/user-interface/scroll-view.mjs +++ b/examples/src/examples/user-interface/scroll-view.mjs @@ -24,21 +24,13 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.LayoutGroupComponentSystem, - // @ts-ignore pc.ScrollViewComponentSystem, - // @ts-ignore pc.ScrollbarComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/text-auto-font-size.mjs b/examples/src/examples/user-interface/text-auto-font-size.mjs index a7bc155f1ea..3ba65474f38 100644 --- a/examples/src/examples/user-interface/text-auto-font-size.mjs +++ b/examples/src/examples/user-interface/text-auto-font-size.mjs @@ -25,21 +25,13 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.LayoutGroupComponentSystem, - // @ts-ignore pc.ScrollViewComponentSystem, - // @ts-ignore pc.ScrollbarComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/text-emojis.mjs b/examples/src/examples/user-interface/text-emojis.mjs index e073fe60035..50a5feaf5e5 100644 --- a/examples/src/examples/user-interface/text-emojis.mjs +++ b/examples/src/examples/user-interface/text-emojis.mjs @@ -24,23 +24,14 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.LayoutGroupComponentSystem, - // @ts-ignore pc.ScrollViewComponentSystem, - // @ts-ignore pc.ScrollbarComponentSystem, - // @ts-ignore pc.LayoutChildComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/text-localization.mjs b/examples/src/examples/user-interface/text-localization.mjs index 2775cddbeb0..b6d6e247d9d 100644 --- a/examples/src/examples/user-interface/text-localization.mjs +++ b/examples/src/examples/user-interface/text-localization.mjs @@ -24,15 +24,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/text-typewriter.mjs b/examples/src/examples/user-interface/text-typewriter.mjs index a7c34971870..9ac551fcf39 100644 --- a/examples/src/examples/user-interface/text-typewriter.mjs +++ b/examples/src/examples/user-interface/text-typewriter.mjs @@ -25,15 +25,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/text.mjs b/examples/src/examples/user-interface/text.mjs index 8123fccdd4a..7382986f885 100644 --- a/examples/src/examples/user-interface/text.mjs +++ b/examples/src/examples/user-interface/text.mjs @@ -23,21 +23,13 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.LayoutGroupComponentSystem, - // @ts-ignore pc.ScrollViewComponentSystem, - // @ts-ignore pc.ScrollbarComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/world-to-screen.mjs b/examples/src/examples/user-interface/world-to-screen.mjs index eff4ae720cb..170715c0065 100644 --- a/examples/src/examples/user-interface/world-to-screen.mjs +++ b/examples/src/examples/user-interface/world-to-screen.mjs @@ -25,17 +25,11 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath } createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/user-interface/world-ui.mjs b/examples/src/examples/user-interface/world-ui.mjs index 8adbabab8dc..8a4b3ea1420 100644 --- a/examples/src/examples/user-interface/world-ui.mjs +++ b/examples/src/examples/user-interface/world-ui.mjs @@ -26,19 +26,12 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath createOptions.elementInput = new pc.ElementInput(canvas); createOptions.componentSystems = [ - // @ts-ignore pc.RenderComponentSystem, - // @ts-ignore pc.CameraComponentSystem, - // @ts-ignore pc.LightComponentSystem, - // @ts-ignore pc.ScreenComponentSystem, - // @ts-ignore pc.ButtonComponentSystem, - // @ts-ignore pc.ElementComponentSystem, - // @ts-ignore pc.ScriptComponentSystem ]; createOptions.resourceHandlers = [ diff --git a/examples/src/examples/xr/ar-mesh-detection.mjs b/examples/src/examples/xr/ar-mesh-detection.mjs index b15f24f3447..0647b02b321 100644 --- a/examples/src/examples/xr/ar-mesh-detection.mjs +++ b/examples/src/examples/xr/ar-mesh-detection.mjs @@ -5,7 +5,7 @@ import * as pc from 'playcanvas'; * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. */ -async function example({ canvas }) { +async function example({ canvas, assetPath }) { /** * @param {string} msg - The message. */ diff --git a/examples/src/examples/xr/ar-plane-detection.mjs b/examples/src/examples/xr/ar-plane-detection.mjs index 47203b0f37c..891ea3df361 100644 --- a/examples/src/examples/xr/ar-plane-detection.mjs +++ b/examples/src/examples/xr/ar-plane-detection.mjs @@ -5,7 +5,7 @@ import * as pc from 'playcanvas'; * @param {import('../../options.mjs').ExampleOptions} options - The example options. * @returns {Promise} The example application. */ -async function example({ canvas }) { +async function example({ canvas, assetPath }) { /** * @param {string} msg - The message. */