wgsl-play 0.0.22 → 0.0.25

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/wgsl-play.js CHANGED
@@ -3961,7 +3961,7 @@ class sc extends HTMLElement {
3961
3961
  return this.getAttribute("autoplay") !== "false";
3962
3962
  }
3963
3963
  set autoplay(t) {
3964
- t ? this.removeAttribute("autoplay") : this.setAttribute("autoplay", "false");
3964
+ t !== !1 && t !== "false" ? this.removeAttribute("autoplay") : this.setAttribute("autoplay", "false");
3965
3965
  }
3966
3966
  /** Whether the shader is currently playing. */
3967
3967
  get isPlaying() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgsl-play",
3
- "version": "0.0.22",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "repository": "github:wgsl-tooling-wg/wesl-js",
6
6
  "exports": {
@@ -12,9 +12,9 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "wesl": "0.7.16",
16
- "wesl-fetch": "0.0.3",
17
- "wesl-gpu": "0.1.19"
15
+ "wesl": "0.7.17",
16
+ "wesl-gpu": "0.1.20",
17
+ "wesl-fetch": "0.0.5"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@playwright/test": "^1.53.2",
package/src/WgslPlay.ts CHANGED
@@ -236,8 +236,9 @@ export class WgslPlay extends HTMLElement {
236
236
  return this.getAttribute("autoplay") !== "false";
237
237
  }
238
238
 
239
- set autoplay(value: boolean) {
240
- if (value) this.removeAttribute("autoplay");
239
+ set autoplay(value: boolean | string) {
240
+ const enabled = value !== false && value !== "false";
241
+ if (enabled) this.removeAttribute("autoplay");
241
242
  else this.setAttribute("autoplay", "false");
242
243
  }
243
244