janusweb 1.5.50 → 1.5.51

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "janusweb",
3
3
  "description": "Web client for JanusVR worlds",
4
- "version": "1.5.50",
4
+ "version": "1.5.51",
5
5
  "main": "scripts/janusweb.js",
6
6
  "author": "James Baicoianu",
7
7
  "license": "MIT",
@@ -293,22 +293,10 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
293
293
  if (pos) this.body.pos = pos;
294
294
  this.body.start();
295
295
  if (scale && this.body) this.body.scale.fromArray(scale);
296
-
297
- elation.events.add(this, 'load', ev => {
298
- if (this.body.modelasset) {
299
- if (this.body.modelasset.loaded) {
300
- this.loadAnimations();
301
- if (this.animation_extras) {
302
- this.loadAnimationExtras();
303
- }
304
- } else {
305
- elation.events.add(this.body.modelasset, 'asset_load_complete', () => {
306
- this.loadAnimations();
307
- if (this.animation_extras) {
308
- this.loadAnimationExtras();
309
- }
310
- });
311
- }
296
+ elation.events.add(this.body.modelasset, 'asset_load', ev => {
297
+ this.loadAnimations();
298
+ if (this.animation_extras) {
299
+ this.loadAnimationExtras();
312
300
  }
313
301
  // FIXME - this prevents avatars from being culled, which prevents our default mesh from disappearing but also means we lose out on possible performance optimizations in rooms with lots of avatars
314
302
  this.objects['3d'].traverse(n => {
package/scripts/object.js CHANGED
@@ -109,7 +109,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
109
109
  object = this.object;
110
110
  setTimeout(() => { this.handleLoad(); this.assignTextures(); }, 100);
111
111
  } else if (this.janusid) {
112
- var asset = this.getAsset('model', this.janusid, true);
112
+ var asset = this.modelasset = this.getAsset('model', this.janusid, true);
113
113
  this.dispatchEvent({type: 'loadstart'});
114
114
  if (asset) {
115
115
  if (asset.loaded) {
package/scripts/room.js CHANGED
@@ -1374,7 +1374,7 @@ elation.require([
1374
1374
  if (this.jsobjects[objectargs.js_id]) {
1375
1375
  objectargs.js_id = objectargs.js_id + '_' + window.uniqueId();
1376
1376
  }
1377
- var object = parentobj.spawn(realtype, this.roomid + '_' + objectargs.js_id, objectargs),
1377
+ var object = parentobj.spawn(realtype, (parentobj.js_id || room.roomid) + '_' + objectargs.js_id, objectargs),
1378
1378
  proxyobj = object.getProxyObject(customElement);
1379
1379
  if (proxyobj && objectargs.js_id && !objectargs.isinternal && (parentobj == this || 'js_id' in args)) {
1380
1380
  this.jsobjects[objectargs.js_id] = proxyobj;