@colyseus/schema
Advanced tools
Comparing version 3.0.0-alpha.6 to 3.0.0-alpha.7
@@ -16,3 +16,3 @@ /// <reference types="node" /> | ||
encode(it?: Iterator, view?: StateView, buffer?: Buffer, changeTrees?: Map<import("./ChangeTree").ChangeTree<any>, Map<number, import("../encoding/spec").OPERATION>>): Buffer; | ||
encodeAll(it?: Iterator): Buffer; | ||
encodeAll(it?: Iterator, buffer?: Buffer): Buffer; | ||
encodeAllView(view: StateView, sharedOffset: number, it: Iterator, bytes?: Buffer): Buffer; | ||
@@ -19,0 +19,0 @@ encodeView(view: StateView, sharedOffset: number, it: Iterator, bytes?: Buffer): Buffer; |
@@ -101,3 +101,3 @@ "use strict"; | ||
} | ||
encodeAll(it = { offset: 0 }) { | ||
encodeAll(it = { offset: 0 }, buffer = this.sharedBuffer) { | ||
// console.log(`encodeAll(), this.$root.allChanges (${this.$root.allChanges.size})`); | ||
@@ -107,3 +107,3 @@ // Array.from(this.$root.allChanges.entries()).map((item) => { | ||
// }); | ||
return this.encode(it, undefined, this.sharedBuffer, this.root.allChanges); | ||
return this.encode(it, undefined, buffer, this.root.allChanges); | ||
} | ||
@@ -110,0 +110,0 @@ encodeAllView(view, sharedOffset, it, bytes = this.sharedBuffer) { |
{ | ||
"name": "@colyseus/schema", | ||
"version": "3.0.0-alpha.6", | ||
"version": "3.0.0-alpha.7", | ||
"description": "Binary state serializer with delta encoding for games", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -134,3 +134,3 @@ import type { Schema } from "../Schema"; | ||
encodeAll(it: Iterator = { offset: 0 }) { | ||
encodeAll(it: Iterator = { offset: 0 }, buffer: Buffer = this.sharedBuffer) { | ||
// console.log(`encodeAll(), this.$root.allChanges (${this.$root.allChanges.size})`); | ||
@@ -142,3 +142,3 @@ | ||
return this.encode(it, undefined, this.sharedBuffer, this.root.allChanges); | ||
return this.encode(it, undefined, buffer, this.root.allChanges); | ||
} | ||
@@ -145,0 +145,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2463613