@colyseus/sdk 0.17.34 → 0.17.35
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/LICENSE +1 -2
- package/build/3rd_party/discord.cjs +1 -1
- package/build/3rd_party/discord.mjs +1 -1
- package/build/Auth.cjs +1 -1
- package/build/Auth.mjs +1 -1
- package/build/Client.cjs +1 -1
- package/build/Client.mjs +1 -1
- package/build/Connection.cjs +1 -1
- package/build/Connection.mjs +1 -1
- package/build/HTTP.cjs +1 -1
- package/build/HTTP.mjs +1 -1
- package/build/Room.cjs +8 -3
- package/build/Room.cjs.map +1 -1
- package/build/Room.d.ts +6 -0
- package/build/Room.mjs +8 -3
- package/build/Room.mjs.map +1 -1
- package/build/Storage.cjs +1 -1
- package/build/Storage.mjs +1 -1
- package/build/core/nanoevents.cjs +1 -1
- package/build/core/nanoevents.mjs +1 -1
- package/build/core/signal.cjs +1 -1
- package/build/core/signal.mjs +1 -1
- package/build/core/utils.cjs +1 -1
- package/build/core/utils.mjs +1 -1
- package/build/debug.cjs +8 -8
- package/build/debug.cjs.map +1 -1
- package/build/debug.mjs +8 -8
- package/build/debug.mjs.map +1 -1
- package/build/errors/Errors.cjs +1 -1
- package/build/errors/Errors.mjs +1 -1
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/legacy.cjs +1 -1
- package/build/legacy.mjs +1 -1
- package/build/serializer/NoneSerializer.cjs +1 -1
- package/build/serializer/NoneSerializer.mjs +1 -1
- package/build/serializer/SchemaSerializer.cjs +1 -1
- package/build/serializer/SchemaSerializer.mjs +1 -1
- package/build/serializer/Serializer.cjs +1 -1
- package/build/serializer/Serializer.mjs +1 -1
- package/build/transport/H3Transport.cjs +1 -1
- package/build/transport/H3Transport.mjs +1 -1
- package/build/transport/WebSocketTransport.cjs +1 -1
- package/build/transport/WebSocketTransport.mjs +1 -1
- package/dist/colyseus-cocos-creator.js +8 -3
- package/dist/colyseus-cocos-creator.js.map +1 -1
- package/dist/colyseus.js +8 -3
- package/dist/colyseus.js.map +1 -1
- package/dist/debug.js +8 -8
- package/dist/debug.js.map +1 -1
- package/package.json +2 -2
- package/src/Room.ts +15 -2
- package/src/debug.ts +7 -7
- package/README.md +0 -27
- package/build/HTTP.bkp.d.ts +0 -103
- package/build/HTTP_bkp.d.ts +0 -18
- package/build/Protocol.cjs +0 -34
- package/build/Protocol.cjs.map +0 -1
- package/build/Protocol.d.ts +0 -21
- package/build/Protocol.mjs +0 -34
- package/build/Protocol.mjs.map +0 -1
- package/dist/colyseus.d.ts +0 -4148
package/build/debug.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This software is released under the MIT License.
|
|
4
4
|
// https://opensource.org/license/MIT
|
|
5
5
|
//
|
|
6
|
-
// colyseus.js@0.17.
|
|
6
|
+
// colyseus.js@0.17.35
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
9
|
var Client = require('./Client.cjs');
|
|
@@ -42,7 +42,7 @@ const preferences = {
|
|
|
42
42
|
position: 'top-right' // 'bottom-right', 'bottom-left', 'top-left', 'top-right'
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
// Load preferences from localStorage
|
|
45
|
+
// Load preferences from localStorage (hidden state from sessionStorage)
|
|
46
46
|
function loadPreferences() {
|
|
47
47
|
try {
|
|
48
48
|
const savedPrefs = localStorage.getItem('colyseus-debug-preferences') || '{}';
|
|
@@ -59,26 +59,26 @@ function loadPreferences() {
|
|
|
59
59
|
preferences.latencySimulation.enabled = latencyValue > 0;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
// Load hidden state
|
|
63
|
-
if (
|
|
62
|
+
// Load hidden state from sessionStorage
|
|
63
|
+
if (sessionStorage.getItem('colyseus-debug-hidden') === 'true') {
|
|
64
64
|
panelsHidden = true;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
catch (e) {
|
|
68
|
-
//
|
|
68
|
+
// Storage might not be available or JSON parse failed, ignore
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
// Save preferences to localStorage
|
|
71
|
+
// Save preferences to localStorage (hidden state to sessionStorage)
|
|
72
72
|
function savePreferences() {
|
|
73
73
|
try {
|
|
74
74
|
localStorage.setItem('colyseus-debug-preferences', JSON.stringify({
|
|
75
75
|
position: preferences.panelPosition.position,
|
|
76
76
|
latency: preferences.latencySimulation.delay,
|
|
77
|
-
hidden: panelsHidden
|
|
78
77
|
}));
|
|
78
|
+
sessionStorage.setItem('colyseus-debug-hidden', panelsHidden ? 'true' : 'false');
|
|
79
79
|
}
|
|
80
80
|
catch (e) {
|
|
81
|
-
//
|
|
81
|
+
// Storage might not be available, ignore
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
// Panel visibility state
|