dewdrop-sdk 0.5.5 → 0.5.6

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/session.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dewdrop-sdk",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Build a three.js game for Dewdrop: the Vite plugin, model calls, multiplayer, saves and voice.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/session.js CHANGED
@@ -22,13 +22,16 @@
22
22
  // by calling it, and `exit()` ends nothing: the console says so, once. The
23
23
  // game here is the browser's own window, which already takes any shape and
24
24
  // fires its own `resize`, so `allowPortrait()` changes nothing and says
25
- // what it does on Dewdrop, once.
25
+ // what it does on Dewdrop, once. `session.dev` is true in the game's dev
26
+ // version and false once it is published, in a backend too; `npm run dev`
27
+ // is development, so here it is true.
26
28
  import { defineHandlers, side } from './net.js';
27
29
 
28
30
  let told = false;
29
31
  let toldPortrait = false;
30
32
  class Session extends EventTarget {
31
33
  get ending() { return null; }
34
+ get dev() { return true; }
32
35
  exit() {
33
36
  if (side.backend) throw new DOMException('session.exit is unavailable in a backend', 'NotSupportedError');
34
37
  if (told) return;