Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose AppOptions and correct its types #5986

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions examples/src/examples/animation/blend-trees-1d.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, data, glsla
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/animation/blend-trees-2d-cartesian.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/animation/component-properties.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@ async function example({ canvas, deviceType, data, assetPath, glslangPath, twgsl
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/animation/events.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/animation/layer-masks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/animation/locomotion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,10 @@ async function example({ canvas, deviceType, assetPath, ammoPath, glslangPath, t
pc.RigidBodyComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
4 changes: 0 additions & 4 deletions examples/src/examples/animation/tween.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath
pc.ElementComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.FontHandler,
// @ts-ignore
pc.JsonHandler,
// @ts-ignore
pc.ScriptHandler
];

Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/camera/first-person.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath, assetPath,
pc.RigidBodyComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler
];

Expand Down
1 change: 0 additions & 1 deletion examples/src/examples/camera/fly.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ async function example({ canvas, deviceType, glslangPath, twgslPath, scriptsPath
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.ScriptHandler
];

Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/camera/orbit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ async function example({ canvas, deviceType, glslangPath, twgslPath, assetPath,
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler
];

Expand Down
4 changes: 0 additions & 4 deletions examples/src/examples/graphics/area-lights.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath }
pc.LightComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.JsonHandler,
// @ts-ignore
pc.CubemapHandler
];

Expand Down
2 changes: 0 additions & 2 deletions examples/src/examples/graphics/area-picker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.TextureHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/graphics/asset-viewer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,10 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
pc.ElementComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.JsonHandler,
// @ts-ignore
pc.FontHandler
];

Expand Down
1 change: 0 additions & 1 deletion examples/src/examples/graphics/batching-dynamic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) {
const createOptions = new pc.AppOptions();
createOptions.graphicsDevice = device;

// @ts-ignore
createOptions.batchManager = pc.BatchManager;

createOptions.componentSystems = [
Expand Down
4 changes: 0 additions & 4 deletions examples/src/examples/graphics/clustered-area-lights.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.JsonHandler
];

Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/graphics/clustered-lighting.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler
];

Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/graphics/clustered-omni-shadows.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.CubemapHandler
];

Expand Down
2 changes: 0 additions & 2 deletions examples/src/examples/graphics/clustered-spot-shadows.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ScriptHandler
];

Expand Down
6 changes: 0 additions & 6 deletions examples/src/examples/graphics/contact-hardening-shadows.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,11 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
pc.AnimComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.JsonHandler,
// @ts-ignore
pc.AnimClipHandler,
// @ts-ignore
pc.AnimStateGraphHandler
];

Expand Down
1 change: 0 additions & 1 deletion examples/src/examples/graphics/grab-pass.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ async function example({ canvas, deviceType, files, assetPath, glslangPath, twgs
pc.CameraComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler
];

Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/graphics/ground-fog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ async function example({ canvas, deviceType, files, assetPath, scriptsPath, glsl
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler
];

Expand Down
1 change: 0 additions & 1 deletion examples/src/examples/graphics/hardware-instancing.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath }
pc.CameraComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler
];

Expand Down
4 changes: 0 additions & 4 deletions examples/src/examples/graphics/light-physical-units.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.JsonHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/graphics/lights-baked-a-o.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
createOptions.mouse = new pc.Mouse(document.body);
createOptions.touch = new pc.TouchDevice(document.body);

// @ts-ignore
createOptions.lightmapper = pc.Lightmapper;

createOptions.componentSystems = [
Expand All @@ -184,13 +183,9 @@ async function example({ canvas, deviceType, data, assetPath, scriptsPath, glsla
pc.ScriptComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.CubemapHandler
];

Expand Down
1 change: 0 additions & 1 deletion examples/src/examples/graphics/lights-baked.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ async function example({ canvas, deviceType, glslangPath, twgslPath }) {
const createOptions = new pc.AppOptions();
createOptions.graphicsDevice = device;

// @ts-ignore
createOptions.lightmapper = pc.Lightmapper;

createOptions.componentSystems = [
Expand Down
3 changes: 0 additions & 3 deletions examples/src/examples/graphics/lights.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,8 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
pc.LightComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.CubemapHandler
];

Expand Down
1 change: 0 additions & 1 deletion examples/src/examples/graphics/lines.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath }
pc.LightComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler
];

Expand Down
5 changes: 0 additions & 5 deletions examples/src/examples/graphics/lit-material.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,10 @@ async function example({ canvas, deviceType, assetPath, scriptsPath, glslangPath
pc.ElementComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.ContainerHandler,
// @ts-ignore
pc.ScriptHandler,
// @ts-ignore
pc.JsonHandler,
// @ts-ignore
pc.FontHandler
];

Expand Down
2 changes: 0 additions & 2 deletions examples/src/examples/graphics/material-anisotropic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath }
pc.ElementComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.FontHandler
];

Expand Down
2 changes: 0 additions & 2 deletions examples/src/examples/graphics/material-basic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath }
pc.ElementComponentSystem
];
createOptions.resourceHandlers = [
// @ts-ignore
pc.TextureHandler,
// @ts-ignore
pc.FontHandler
];

Expand Down
Loading