create-bloop 0.0.7 → 0.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bloop",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Create a new Bloop game",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
@@ -13,8 +13,8 @@
13
13
  "vite": "^7.2.2"
14
14
  },
15
15
  "dependencies": {
16
- "@bloopjs/bloop": "^0.0.80",
16
+ "@bloopjs/bloop": "^0.0.81",
17
17
  "@bloopjs/toodle": "^0.1.3",
18
- "@bloopjs/web": "^0.0.80"
18
+ "@bloopjs/web": "^0.0.81"
19
19
  }
20
20
  }
@@ -15,8 +15,8 @@
15
15
  "vite": "^7.2.2"
16
16
  },
17
17
  "dependencies": {
18
- "@bloopjs/bloop": "^0.0.80",
18
+ "@bloopjs/bloop": "^0.0.81",
19
19
  "@bloopjs/toodle": "^0.1.3",
20
- "@bloopjs/web": "^0.0.80"
20
+ "@bloopjs/web": "^0.0.81"
21
21
  }
22
22
  }
@@ -20,7 +20,6 @@ if (!canvas) throw new Error("No canvas element found");
20
20
 
21
21
  const toodle = await Toodle.attach(canvas, {
22
22
  filter: "nearest",
23
- backend: "webgpu",
24
23
  limits: { textureArrayLayers: 5 },
25
24
  });
26
25
 
@@ -65,15 +64,17 @@ window.addEventListener("keydown", (e) => {
65
64
  }
66
65
  });
67
66
 
68
- // Debug: Press G to toggle glitch effect
69
- const glitchEffect = createChromaticAberrationEffect(toodle);
70
- let glitchEnabled = false;
71
- window.addEventListener("keydown", (e) => {
72
- if (e.key === "g") {
73
- glitchEnabled = !glitchEnabled;
74
- toodle.postprocess = glitchEnabled ? glitchEffect : null;
75
- }
76
- });
67
+ // Debug: Press G to toggle glitch effect on webgpu backend
68
+ if (toodle.backend.type === "webgpu") {
69
+ const glitchEffect = createChromaticAberrationEffect(toodle);
70
+ let glitchEnabled = false;
71
+ window.addEventListener("keydown", (e) => {
72
+ if (e.key === "g") {
73
+ glitchEnabled = !glitchEnabled;
74
+ toodle.postprocess = glitchEnabled ? glitchEffect : null;
75
+ }
76
+ });
77
+ }
77
78
 
78
79
  game.system("title-input", {
79
80
  update({ bag, inputs }) {