create-bloop 0.0.21 → 0.0.23

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.21",
3
+ "version": "0.0.23",
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.92",
16
+ "@bloopjs/bloop": "^0.0.93",
17
17
  "@bloopjs/toodle": "^0.1.3",
18
- "@bloopjs/web": "^0.0.92"
18
+ "@bloopjs/web": "^0.0.93"
19
19
  }
20
20
  }
@@ -15,8 +15,8 @@
15
15
  "vite": "^7.2.2"
16
16
  },
17
17
  "dependencies": {
18
- "@bloopjs/bloop": "^0.0.92",
18
+ "@bloopjs/bloop": "^0.0.93",
19
19
  "@bloopjs/toodle": "^0.1.3",
20
- "@bloopjs/web": "^0.0.92"
20
+ "@bloopjs/web": "^0.0.93"
21
21
  }
22
22
  }
@@ -74,8 +74,8 @@ export function draw(g: typeof game, toodle: Toodle) {
74
74
 
75
75
  const viewport = toodle.Node({
76
76
  size: {
77
- width: toodle.resolution.width,
78
- height: toodle.resolution.height,
77
+ width: toodle.resolution.width / toodle.camera.zoom,
78
+ height: toodle.resolution.height / toodle.camera.zoom,
79
79
  },
80
80
  });
81
81
 
@@ -123,7 +123,7 @@ export function draw(g: typeof game, toodle: Toodle) {
123
123
 
124
124
  const p1Score = gameScreen.add(
125
125
  toodle.Text("Roboto", `P1: ${bag.p1.score}`, {
126
- fontSize: 16,
126
+ fontSize: 10,
127
127
  color: MARIO_COLOR,
128
128
  }),
129
129
  );
@@ -134,7 +134,7 @@ export function draw(g: typeof game, toodle: Toodle) {
134
134
 
135
135
  const p2Score = gameScreen.add(
136
136
  toodle.Text("Roboto", `P2: ${bag.p2.score}`, {
137
- fontSize: 16,
137
+ fontSize: 10,
138
138
  color: LUIGI_COLOR,
139
139
  }),
140
140
  );
@@ -16,16 +16,11 @@ export function setupGlitchEffect(toodle: Toodle): () => void {
16
16
  );
17
17
  }
18
18
 
19
- console.log("doGlitchEffect", performance.now(), {
20
- hasFocus: document.hasFocus(),
21
- });
22
19
  // Queue effect if page isn't visible or window doesn't have focus (IDE covering browser)
23
20
  if (document.visibilityState === "hidden" || !document.hasFocus()) {
24
- console.log("queueing glitch");
25
21
  glitchQueued = true;
26
22
  return;
27
23
  }
28
- console.log("doing glitch immediately");
29
24
  if (glitchTimeout > 0) {
30
25
  clearTimeout(glitchTimeout);
31
26
  }
@@ -36,11 +31,6 @@ export function setupGlitchEffect(toodle: Toodle): () => void {
36
31
  }
37
32
 
38
33
  document.addEventListener("visibilitychange", () => {
39
- console.log(
40
- "visibilityStateChange",
41
- document.visibilityState,
42
- performance.now(),
43
- );
44
34
  if (document.visibilityState === "visible" && glitchQueued) {
45
35
  glitchQueued = false;
46
36
  doGlitchEffect();
@@ -50,7 +40,6 @@ export function setupGlitchEffect(toodle: Toodle): () => void {
50
40
  // Handle case where another app (like IDE) covers the browser window
51
41
  // visibilitychange doesn't fire for this, but focus does when clicking back
52
42
  window.addEventListener("focus", () => {
53
- console.log("window focus", performance.now());
54
43
  if (glitchQueued) {
55
44
  glitchQueued = false;
56
45
  doGlitchEffect();
@@ -60,9 +49,7 @@ export function setupGlitchEffect(toodle: Toodle): () => void {
60
49
  return doGlitchEffect;
61
50
  }
62
51
 
63
- function createChromaticAberrationEffect(
64
- toodle: Toodle,
65
- ): Backends.PostProcess {
52
+ function createChromaticAberrationEffect(toodle: Toodle): Backends.PostProcess {
66
53
  if (!(toodle.backend instanceof Backends.WebGPUBackend)) {
67
54
  throw new Error("Post-processing requires WebGPU backend");
68
55
  }
@@ -7,7 +7,6 @@ export const MatchmakingSystem = PhaseSystem("title", {
7
7
  bag.mode = "online";
8
8
  bag.phase = "waiting";
9
9
  net.wantsRoomCode = "mario-demo";
10
- console.log("[netcode] setting wantsRoomCode");
11
10
  }
12
11
  },
13
12