teleportxr 1.0.80 → 1.0.82
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.
package/package.json
CHANGED
|
@@ -21,8 +21,10 @@ function encodeNode(node,buffer)
|
|
|
21
21
|
|
|
22
22
|
var t=node.encodeIntoDataView(dataView,byteOffset);
|
|
23
23
|
byteOffset=t;
|
|
24
|
-
// Actual size is now known
|
|
25
|
-
|
|
24
|
+
// Actual size is now known: write the count of bytes that follow the
|
|
25
|
+
// size field, in little-endian (the protocol convention). Without the
|
|
26
|
+
// explicit core.endian flag DataView defaults to big-endian.
|
|
27
|
+
dataView.setBigUint64(0,BigInt(byteOffset-8),core.endian);
|
|
26
28
|
return byteOffset;
|
|
27
29
|
}
|
|
28
30
|
module.exports= {encodeNode};
|
|
@@ -21,9 +21,10 @@ function EncodeResource(res,buffer)
|
|
|
21
21
|
var t=res.encodeIntoDataView(dataView,byteOffset);
|
|
22
22
|
byteOffset=t;
|
|
23
23
|
t-=8;
|
|
24
|
-
// Actual size is now known
|
|
25
|
-
//
|
|
26
|
-
|
|
24
|
+
// Actual size is now known: write the count of bytes that follow the
|
|
25
|
+
// size field, in little-endian (the protocol convention). Without the
|
|
26
|
+
// explicit core.endian flag DataView defaults to big-endian.
|
|
27
|
+
dataView.setBigUint64(0,BigInt(t),core.endian);
|
|
27
28
|
return byteOffset;
|
|
28
29
|
}
|
|
29
30
|
module.exports= {EncodeResource};
|
package/scene/node.js
CHANGED
|
@@ -209,6 +209,7 @@ class TextCanvasComponent extends Component
|
|
|
209
209
|
return NodeDataType.TextCanvas;
|
|
210
210
|
}
|
|
211
211
|
encodeIntoDataView(dataView,byteOffset) {
|
|
212
|
+
console.log("Encoding TextCanvasComponent: canvasPath=" + this.canvasPath + ", data_uid=" + this.data_uid);
|
|
212
213
|
byteOffset=core.put_uint8(dataView,byteOffset,NodeDataType.TextCanvas);
|
|
213
214
|
byteOffset=core.put_uint64(dataView,byteOffset,this.data_uid);
|
|
214
215
|
return byteOffset;
|
|
@@ -314,6 +315,9 @@ class Node {
|
|
|
314
315
|
this.components.length
|
|
315
316
|
);
|
|
316
317
|
for (var i = 0; i < this.components.length; i++) {
|
|
318
|
+
if (this.components[i].getType() == NodeDataType.TextCanvas) {
|
|
319
|
+
console.log("Encoding node '" + this.name + "' (uid=" + this.uid + ") TextCanvas component[" + i + "]");
|
|
320
|
+
}
|
|
317
321
|
byteOffset = this.components[i].encodeIntoDataView(
|
|
318
322
|
dataView,
|
|
319
323
|
byteOffset
|