janusweb 1.5.44 → 1.5.46

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.
@@ -1235,7 +1235,7 @@ ui-spinner .loading-text {
1235
1235
  -webkit-animation: loading-text-opacity 2s linear 0s infinite normal;
1236
1236
  animation: loading-text-opacity 2s linear 0s infinite normal;
1237
1237
  color: #ffffff;
1238
- font-family: "Helvetica Neue, "Helvetica", ""arial";
1238
+ font-family: "Helvetica Neue", "Helvetica", "arial";
1239
1239
  font-size: 10px;
1240
1240
  font-weight: bold;
1241
1241
  margin-top: 45px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "janusweb",
3
3
  "description": "Web client for JanusVR worlds",
4
- "version": "1.5.44",
4
+ "version": "1.5.46",
5
5
  "main": "scripts/janusweb.js",
6
6
  "author": "James Baicoianu",
7
7
  "license": "MIT",
@@ -69,6 +69,10 @@ elation.require(['janusweb.janusbase'], function() {
69
69
  },
70
70
  select(object) {
71
71
  this.selected = object;
72
+ if (!object) {
73
+ this.deselect();
74
+ return;
75
+ }
72
76
  let objmeshes = [], skinnedmeshes = [];
73
77
  object.traverseObjects(n => {
74
78
  if (n instanceof THREE.Mesh && n.material !== this.outlinematerial) {
@@ -336,8 +336,8 @@ JanusClientConnection.prototype.connect = function() {
336
336
  this._websocket.onclose = function() {
337
337
  this.status = 0;
338
338
  this.dispatchEvent({type: 'disconnect'});
339
- if (this.pendingReconnect) {
340
- this.connect();
339
+ if (!this.pendingReconnect) {
340
+ this.reconnect();
341
341
  }
342
342
  }.bind(this);
343
343
 
@@ -346,10 +346,10 @@ JanusClientConnection.prototype.connect = function() {
346
346
  JanusClientConnection.prototype.reconnect = function(force) {
347
347
  var now = new Date().getTime();
348
348
  if (force || this.lastattempt + this.reconnectdelay <= now) {
349
+ this.pendingReconnect = true;
349
350
  if (this._websocket.readyState == this._websocket.OPEN) {
350
351
  console.log('Socket already connected, disconnecting');
351
352
  this.disconnect();
352
- this.pendingReconnect = true;
353
353
  } else {
354
354
  console.log('Reconnecting...');
355
355
  this.connect();
@@ -392,12 +392,18 @@ JanusClientConnection.prototype.setUserId = function(userId) {
392
392
  };
393
393
 
394
394
  JanusClientConnection.prototype.send = function(msg) {
395
- try {
396
- this._websocket.send(JSON.stringify(msg) + '\r\n');
397
- } catch (e) {
395
+ if (this._websocket.readyState == 3) {
398
396
  this.msgQueue.push(msg);
397
+ if (!this.pendingReconnect) {
398
+ this.reconnect();
399
+ }
400
+ } else {
401
+ try {
402
+ this._websocket.send(JSON.stringify(msg) + '\r\n');
403
+ } catch (e) {
404
+ this.msgQueue.push(msg);
405
+ }
399
406
  }
400
- //this.reconnect();
401
407
  };
402
408
 
403
409
  JanusClientConnection.prototype.onMessage = function(msg) {
@@ -191,7 +191,8 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
191
191
  emissive: 0x444400,
192
192
  alphaTest: .01,
193
193
  depthTest: false,
194
- depthWrite: false
194
+ depthWrite: false,
195
+ side: this.cull_face == 'none' ? THREE.DoubleSide : n.material.side,
195
196
  });
196
197
  }
197
198
  n.userData.thing = this;
@@ -313,7 +313,7 @@ elation.require(['engine.things.generic', 'janusweb.external.webxr-input-profile
313
313
  let visualResponse = component.visualResponses[k];
314
314
  // Find the topmost node in the visualization
315
315
  const valueNode = motionControllerRoot.getObjectByName(visualResponse.valueNodeName);
316
-
316
+ if (!valueNode) continue;
317
317
  // Calculate the new properties based on the weight supplied
318
318
  if (visualResponse.valueNodeProperty === 'visibility') {
319
319
  valueNode.visible = visualResponse.value;
@@ -103,7 +103,7 @@ elation.require(['janusweb.external.JanusClientConnection', 'janusweb.external.J
103
103
  }
104
104
  this.getServerForRoom = function(room) {
105
105
  var serverurl = this.getServerURLForRoom(room, true);
106
- if (serverurl && !this.servers[serverurl]) {
106
+ if (serverurl && !this.servers[serverurl] && !room.private) {
107
107
  var server = new JanusClientConnection({
108
108
  host: serverurl,
109
109
  userId: this.janusweb.userId,
package/scripts/object.js CHANGED
@@ -1018,10 +1018,10 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1018
1018
  m.opacity = (typeof oldmat.opacity != 'undefined' ? parseFloat(oldmat.opacity) : 1) * this.opacity;
1019
1019
  m.alphaTest = this.alphatest;
1020
1020
  m.aoMap = oldmat.aoMap;
1021
- m.normalMap = oldmat.normalMap;
1022
- m.bumpMap = oldmat.bumpMap;
1023
-
1024
1021
  if (!(m instanceof THREE.MeshBasicMaterial)) {
1022
+ m.normalMap = oldmat.normalMap;
1023
+ m.bumpMap = oldmat.bumpMap;
1024
+
1025
1025
  if (oldmat.emissiveMap) {
1026
1026
  m.emissiveMap = oldmat.emissiveMap;
1027
1027
  m.emissive.setRGB(1,1,1);