teleportxr 1.0.74 → 1.0.76
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/README.md +11 -0
- package/package.json +1 -1
- package/scene/node.js +4 -4
package/README.md
CHANGED
|
@@ -4,3 +4,14 @@ Teleport virtual reality server for node.js
|
|
|
4
4
|
1. Ensure node.js is installed.
|
|
5
5
|
2. Run npm install teleportxr.
|
|
6
6
|
3. See https://github.com/teleportxr/teleport-nodejs-server-example.git for example usage.
|
|
7
|
+
|
|
8
|
+
## Environment variables
|
|
9
|
+
|
|
10
|
+
The library itself reads the following environment variables. Variables that
|
|
11
|
+
configure the example server (`TELEPORT_*`, `PORT`) are documented in the
|
|
12
|
+
[teleport-nodejs-server-example](https://github.com/teleportxr/teleport-nodejs-server-example)
|
|
13
|
+
README.
|
|
14
|
+
|
|
15
|
+
| Variable | Default | Description |
|
|
16
|
+
|----------|---------|-------------|
|
|
17
|
+
| `WEBRTC_CONNECT_TIMEOUT_MS` | `10000` | Time in milliseconds to wait for a client to complete WebRTC connection establishment. Clients that don't establish a peer connection within this window are disconnected and removed. Read in `client/client.js`. |
|
package/package.json
CHANGED
package/scene/node.js
CHANGED
|
@@ -267,12 +267,12 @@ class Node {
|
|
|
267
267
|
this.components.push(m);
|
|
268
268
|
}
|
|
269
269
|
setCanvasComponent(canvas_path) {
|
|
270
|
-
this.
|
|
270
|
+
this.components.forEach((component) => {
|
|
271
271
|
if (component.getType() == NodeDataType.TextCanvas) {
|
|
272
272
|
component.canvasPath = canvas_path;
|
|
273
273
|
component.data_uid = resources.GetResourceUidFromUrl(
|
|
274
|
-
core.GeometryPayloadType.
|
|
275
|
-
|
|
274
|
+
core.GeometryPayloadType.TextCanvas,
|
|
275
|
+
canvas_path
|
|
276
276
|
);
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
@@ -280,7 +280,7 @@ class Node {
|
|
|
280
280
|
var tc = new TextCanvasComponent();
|
|
281
281
|
tc.canvasPath = canvas_path;
|
|
282
282
|
tc.data_uid = resources.GetResourceUidFromUrl(
|
|
283
|
-
core.GeometryPayloadType.
|
|
283
|
+
core.GeometryPayloadType.TextCanvas,
|
|
284
284
|
canvas_path
|
|
285
285
|
);
|
|
286
286
|
this.components.push(tc);
|