nova64 0.2.4 → 0.2.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/main.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nova64",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Nova64 — Ultimate 3D Fantasy Console runtime for JavaScript games powered by Three.js",
5
5
  "keywords": [
6
6
  "fantasy-console",
package/src/main.js CHANGED
@@ -146,7 +146,6 @@ function loop() {
146
146
  last = now;
147
147
 
148
148
  if (!paused || stepOnce) {
149
- iApi.step();
150
149
  const u0 = performance.now();
151
150
 
152
151
  // Tick the global novaStore time counter
@@ -198,6 +197,10 @@ function loop() {
198
197
  } catch (e) {
199
198
  console.error('❌ gpu.endFrame() error:', e.message, e.stack);
200
199
  }
200
+
201
+ // Snapshot input state at END of frame so keyp/isKeyPressed correctly
202
+ // detect transitions on the next frame (key pressed between frames).
203
+ iApi.step();
201
204
  }
202
205
  if (stepOnce) {
203
206
  stepOnce = false;