teleportxr 1.0.52 → 1.0.53

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.
Files changed (2) hide show
  1. package/client/client.js +4 -2
  2. package/package.json +1 -1
package/client/client.js CHANGED
@@ -559,9 +559,11 @@ class Client {
559
559
  console.log("Handshake claims to have "<<handshakeMessage.uint64_resourceCount<<" resources but has only enough data for "+numReceived);
560
560
  }
561
561
  else {
562
+ // Wrap the Node Buffer correctly: use its underlying ArrayBuffer together with
563
+ // byteOffset (Buffers may share a pooled ArrayBuffer, so offset 0 is wrong).
564
+ var dataView =new DataView(data.buffer, data.byteOffset, data.byteLength);
562
565
  var offset =message.HandshakeMessage.sizeof();
563
- var dataView =new DataView(data.buffer,offset,data.offset,data.length);
564
- for(let i=0;i<this.handshakeMessage.resourceCount;i++ ) {
566
+ for(let i=0;i<handshakeMessage.uint64_resourceCount;i++ ) {
565
567
  var uid=dataView.getBigUint64(offset,core.endian);
566
568
  this.geometryService.ConfirmResource(uid);
567
569
  offset+=core.UID_SIZE;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "name": "teleportxr",
17
17
  "description": "Teleport Spatial Server on node.js",
18
- "version": "1.0.52",
18
+ "version": "1.0.53",
19
19
  "repository": {
20
20
  "type": "git",
21
21
  "url": "git+https://github.com/simul/teleport-nodejs.git"