@colyseus/fossil-delta-serializer
Advanced tools
Comparing version 0.14.19 to 0.14.20
@@ -17,5 +17,9 @@ 'use strict'; | ||
class FossilDeltaSerializer { | ||
constructor() { | ||
this.id = 'fossil-delta'; | ||
} | ||
id = 'fossil-delta'; | ||
// when a new user connects, it receives the 'previousState', which holds | ||
// the last binary snapshot other users already have, therefore the patches | ||
// that follow will be the same for all clients. | ||
previousState; | ||
previousStateEncoded; | ||
patches; | ||
reset(newState) { | ||
@@ -47,3 +51,3 @@ this.previousState = newState; | ||
*/ | ||
if (newState === null || newState === void 0 ? void 0 : newState['$changes']) { // tslint:disable-line | ||
if (newState?.['$changes']) { // tslint:disable-line | ||
if (newState['$changes'].changes.size > 0) { // tslint:disable-line | ||
@@ -50,0 +54,0 @@ changed = true; |
{ | ||
"name": "@colyseus/fossil-delta-serializer", | ||
"version": "0.14.19", | ||
"version": "0.14.20", | ||
"input": "./src/index.ts", | ||
@@ -9,3 +9,3 @@ "main": "./build/index.js", | ||
"dependencies": { | ||
"@colyseus/core": "^0.14.19", | ||
"@colyseus/core": "^0.14.20", | ||
"fast-json-patch": "^2.0.5", | ||
@@ -30,3 +30,3 @@ "fossil-delta": "^1.0.1", | ||
}, | ||
"gitHead": "06fcf54d725f5b7ba1a07c99a9c4ae67dbe5e045" | ||
"gitHead": "a16fbee99a56462f12dfa2348f51811180014336" | ||
} |
Sorry, the diff of this file is not supported yet
159579
1367
Updated@colyseus/core@^0.14.20