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