@colyseus/schema 3.0.0-alpha.22 → 3.0.0-alpha.23

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.
@@ -3508,7 +3508,11 @@ class Encoder {
3508
3508
  }
3509
3509
  if (it.offset > buffer.byteLength) {
3510
3510
  const newSize = getNextPowerOf2(buffer.byteLength * 2);
3511
- console.warn("@colyseus/schema encode buffer overflow. Current buffer size: " + buffer.byteLength + ", encoding offset: " + it.offset + ", new size: " + newSize);
3511
+ console.warn(`@colyseus/schema buffer overflow. Encoded state is higher than default BUFFER_SIZE. Use the following to increase default BUFFER_SIZE:
3512
+
3513
+ import { Encoder } from "@colyseus/schema";
3514
+ Encoder.BUFFER_SIZE = ${Math.round(newSize / 1024)} * 1024; // ${Math.round(newSize / 1024)} KB
3515
+ `);
3512
3516
  //
3513
3517
  // resize buffer and re-encode (TODO: can we avoid re-encoding here?)
3514
3518
  //