You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Don't include all of 'playcanvas' for these defines, it just
// causes bigger bundles and prolongs the build time by ~3s.
import{
DEVICETYPE_WEBGL2,
DEVICETYPE_WEBGPU,
DEVICETYPE_NULL
}from'playcanvas';
Previously we had:
// Don't include all of 'playcanvas' for these defines, it just// causes bigger bundles and prolongs the build time by ~3s.import{DEVICETYPE_WEBGL1,DEVICETYPE_WEBGL2,DEVICETYPE_WEBGPU,DEVICETYPE_NULL}from'playcanvas/src/platform/graphics/constants.js';
(hence the comment)
For some reason it was refactored and the comment was neither read nor removed.
The Examples UI doesn't really require PlayCanvas, it's like a fancy UI to pick content for an <iframe>, as the only function is to render the UI. It depends on exactly three constants for the DeviceSelector. These three constants add like 2-3 seconds build time and append an unused extra of ~1.7MB to generate examples/dist/index.js on every Ctrl+S now.
So possible actions are:
Keep it slow and oversized
Reimplement how it was
Just write them out without messing around with the imports, for example:
engine/examples/src/app/components/DeviceSelector.mjs
Lines 1 to 7 in 4075e5b
Previously we had:
(hence the comment)
For some reason it was refactored and the comment was neither read nor removed.
The Examples UI doesn't really require PlayCanvas, it's like a fancy UI to pick content for an
<iframe>
, as the only function is to render the UI. It depends on exactly three constants for theDeviceSelector
. These three constants add like 2-3 seconds build time and append an unused extra of ~1.7MB to generateexamples/dist/index.js
on everyCtrl+S
now.So possible actions are:
The text was updated successfully, but these errors were encountered: