wgsl-play 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{WgslPlay-CCLBqqBa.js → WgslPlay-B5UCLKGK.js} +11 -0
- package/dist/WgslPlay.js +1 -1
- package/dist/index.js +1 -1
- package/dist/wgsl-play.js +4635 -4466
- package/package.json +4 -4
- package/src/WgslPlay.ts +13 -0
|
@@ -287,6 +287,9 @@ var WgslPlay = class extends HTMLElement {
|
|
|
287
287
|
this.controls.setPlaying(false);
|
|
288
288
|
}
|
|
289
289
|
this.initialize();
|
|
290
|
+
upgradeProperty(this, "conditions");
|
|
291
|
+
upgradeProperty(this, "source");
|
|
292
|
+
upgradeProperty(this, "project");
|
|
290
293
|
}
|
|
291
294
|
disconnectedCallback() {
|
|
292
295
|
this.resizeObserver.disconnect();
|
|
@@ -609,6 +612,14 @@ function getStyles() {
|
|
|
609
612
|
}
|
|
610
613
|
return styles;
|
|
611
614
|
}
|
|
615
|
+
/** Absorb instance properties set before custom element upgrade. */
|
|
616
|
+
function upgradeProperty(el, prop) {
|
|
617
|
+
if (Object.hasOwn(el, prop)) {
|
|
618
|
+
const value = el[prop];
|
|
619
|
+
delete el[prop];
|
|
620
|
+
el[prop] = value;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
612
623
|
/** Convert file path to module path (e.g., "effects/main.wesl" -> "package::effects::main"). */
|
|
613
624
|
function toModulePath(filePath) {
|
|
614
625
|
return fileToModulePath(filePath, "package", false);
|
package/dist/WgslPlay.js
CHANGED
package/dist/index.js
CHANGED