janusweb 1.5.36 → 1.5.40
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.
|
@@ -42,15 +42,14 @@ elation.elements.define('janus-avatar-picker', class extends elation.elements.ba
|
|
|
42
42
|
this.defineAttribute('src', { type: 'string' });
|
|
43
43
|
this.defineAttribute('sources', { type: 'object' });
|
|
44
44
|
this.defineAttribute('previewpos', { type: 'vector3', default: V(-2, 0, -3) });
|
|
45
|
-
this.defineAttribute('hideconfirm', { type: 'boolean', default:
|
|
46
|
-
this.defineAttribute('hidereset', { type: 'boolean', default:
|
|
45
|
+
this.defineAttribute('hideconfirm', { type: 'boolean', default: true });
|
|
46
|
+
this.defineAttribute('hidereset', { type: 'boolean', default: true });
|
|
47
47
|
this.selected = false;
|
|
48
48
|
}
|
|
49
49
|
create() {
|
|
50
50
|
let tpl = '';
|
|
51
51
|
if (this.sources) {
|
|
52
52
|
let sources = (elation.utils.isString(this.sources) ? JSON.parse(this.sources) : this.sources);
|
|
53
|
-
console.log('HI YES', sources);
|
|
54
53
|
if (sources.length > 1) {
|
|
55
54
|
tpl += '<ui-tabs>';
|
|
56
55
|
sources.forEach(source => {
|
|
@@ -178,9 +177,11 @@ this.appendChild(this.previewwindow);
|
|
|
178
177
|
handleAvatarSelect(ev) {
|
|
179
178
|
console.log('selected an avatar', ev.data);
|
|
180
179
|
this.selected = ev.data;
|
|
181
|
-
this.showPreview(ev.data.url);
|
|
182
180
|
if (this.elements.confirm) {
|
|
181
|
+
this.showPreview(ev.data.url);
|
|
183
182
|
this.elements.confirm.disabled = false;
|
|
183
|
+
} else {
|
|
184
|
+
this.handleAvatarConfirm();
|
|
184
185
|
}
|
|
185
186
|
this.dispatchEvent(new CustomEvent("select", { detail: this.selected }));
|
|
186
187
|
}
|
|
@@ -229,7 +230,8 @@ this.appendChild(this.previewwindow);
|
|
|
229
230
|
});
|
|
230
231
|
elation.elements.define('janus-avatar-picker-item', class extends elation.elements.ui.item {
|
|
231
232
|
create() {
|
|
232
|
-
|
|
233
|
+
super.create();
|
|
234
|
+
//elation.events.add(this, 'click', (ev) => { console.log('duh', this); this.click(ev) });
|
|
233
235
|
let item = this.value;
|
|
234
236
|
let defaulticon = janus.ui.apps.default.apps.avatar.resolveFullURL('./images/default-avatar.jpg');
|
|
235
237
|
this.elements = elation.elements.fromString(`
|
package/package.json
CHANGED
package/scripts/janusghost.js
CHANGED
|
@@ -238,15 +238,34 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
|
|
|
238
238
|
//rotation: V(0, 180, 0),
|
|
239
239
|
lighting: this.lighting,
|
|
240
240
|
//cull_face: 'none'
|
|
241
|
+
opacity: 0.9999,
|
|
242
|
+
renderorder: this.renderorder || 100,
|
|
243
|
+
shader_chunk_replace: (this.lighting ? {
|
|
244
|
+
'color_fragment': 'color_fragment_discard_close',
|
|
245
|
+
} : {}),
|
|
241
246
|
});
|
|
242
247
|
this.face.start();
|
|
243
248
|
} else {
|
|
244
249
|
this.face = headid;
|
|
250
|
+
this.face.lighting = this.lighting;
|
|
251
|
+
this.face.opacity = 0.9999;
|
|
252
|
+
this.face.renderorder = this.renderorder || 100;
|
|
253
|
+
this.face.shader_chunk_replace = (this.lighting ? {
|
|
254
|
+
'color_fragment': 'color_fragment_discard_close',
|
|
255
|
+
} : {});
|
|
245
256
|
this.head.appendChild(headid);
|
|
246
257
|
this.face.start();
|
|
247
258
|
}
|
|
248
|
-
|
|
259
|
+
if (scale) {
|
|
260
|
+
this.face.scale.fromArray(scale);
|
|
261
|
+
if (this.label) {
|
|
262
|
+
this.label.scale.fromArray(scale);
|
|
263
|
+
this.label.pos.multiply(this.label.scale);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
this.head.pos = headpos.clone().multiply(this.face.scale);
|
|
249
267
|
this.face.applyPosition(headpos.negate());
|
|
268
|
+
|
|
250
269
|
if (this.remotevideo) {
|
|
251
270
|
this.updateVideoScreen();
|
|
252
271
|
this.face.addEventListener('load', (ev) => {
|
|
@@ -256,13 +275,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
|
|
|
256
275
|
}
|
|
257
276
|
}
|
|
258
277
|
//this.head.properties.position.copy(headpos);
|
|
259
|
-
|
|
260
|
-
this.face.scale.fromArray(scale);
|
|
261
|
-
if (this.label) {
|
|
262
|
-
this.label.scale.fromArray(scale);
|
|
263
|
-
this.label.pos.multiply(this.label.scale);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
278
|
+
|
|
266
279
|
}
|
|
267
280
|
}
|
|
268
281
|
this.setBody = function(bodyid, scale, pos) {
|
|
@@ -328,7 +341,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
|
|
|
328
341
|
if (this.body.animationmixer) {
|
|
329
342
|
this.cloneAnimations(animasset);
|
|
330
343
|
}
|
|
331
|
-
this.body.setAnimation('idle');
|
|
344
|
+
//this.body.setAnimation('idle');
|
|
332
345
|
}
|
|
333
346
|
});
|
|
334
347
|
animasset.load();
|
|
@@ -336,7 +349,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
|
|
|
336
349
|
if (this.body.animationmixer) {
|
|
337
350
|
this.cloneAnimations(animasset);
|
|
338
351
|
}
|
|
339
|
-
this.body.setAnimation('idle');
|
|
352
|
+
//this.body.setAnimation('idle');
|
|
340
353
|
}
|
|
341
354
|
}
|
|
342
355
|
this.cloneAnimations = function(animasset) {
|
package/scripts/janusplayer.js
CHANGED
|
@@ -373,7 +373,6 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
|
|
|
373
373
|
if (this.head) {
|
|
374
374
|
this.head.objects['3d'].matrixWorld.extractBasis(v.view_xdir, v.view_ydir, v.view_zdir);
|
|
375
375
|
v.head_pos.setFromMatrixPosition(this.head.objects['3d'].matrixWorld);
|
|
376
|
-
v.view_zdir.negate();
|
|
377
376
|
}
|
|
378
377
|
|
|
379
378
|
if (this.gaze && this.gaze.object) {
|
|
@@ -491,7 +490,7 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
|
|
|
491
490
|
avatar_src: 'data:text/plain,' + encodeURIComponent(avatar),
|
|
492
491
|
showlabel: false,
|
|
493
492
|
//pos: V(0, -this.fatness, 0),
|
|
494
|
-
|
|
493
|
+
rotation: V(0, 180, 0),
|
|
495
494
|
renderorder: 101,
|
|
496
495
|
});
|
|
497
496
|
this.ghost.orientation.set(0,1,0,0);
|
|
@@ -655,7 +654,7 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
|
|
|
655
654
|
avatar_src: 'data:text/plain,' + encodeURIComponent(avatar),
|
|
656
655
|
showlabel: false,
|
|
657
656
|
//pos: V(0, -this.fatness, 0),
|
|
658
|
-
|
|
657
|
+
rotation: V(0, 180, 0),
|
|
659
658
|
renderorder: 101,
|
|
660
659
|
});
|
|
661
660
|
|
package/utils/init.sh
CHANGED