janusweb 1.5.54 → 1.5.56
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.
|
@@ -67,7 +67,7 @@ elation.elements.define('janus-avatar-picker', class extends elation.elements.ba
|
|
|
67
67
|
<ui-list name="avatar" selectable="1" collection="avatarlist" itemcomponent="janus-avatar-picker-item"></ui-list>
|
|
68
68
|
</ui-tab>
|
|
69
69
|
<ui-tab label="Ready Player Me">
|
|
70
|
-
<iframe data-src="https://demo.readyplayer.me/avatar?frameApi" allow="camera"></iframe>
|
|
70
|
+
<iframe name="rpmselector" data-src="https://demo.readyplayer.me/avatar?frameApi" allow="camera"></iframe>
|
|
71
71
|
</ui-tab>
|
|
72
72
|
</ui-tabs>
|
|
73
73
|
`;
|
|
@@ -94,7 +94,7 @@ elation.elements.define('janus-avatar-picker', class extends elation.elements.ba
|
|
|
94
94
|
let threshold = [];
|
|
95
95
|
for (let i = 0; i < 100; i += 10) threshold.push(i / 100);
|
|
96
96
|
let observer = new IntersectionObserver(ev => this.handleIntersectionChange(ev), { root: document, rootMargin: '0px', threshold: threshold });
|
|
97
|
-
observer.observe(this);
|
|
97
|
+
observer.observe(this.elements.rpmselector);
|
|
98
98
|
document.addEventListener('scroll', ev => this.handleScroll(ev));
|
|
99
99
|
window.addEventListener('message', ev => this.handleWindowMessage(ev));
|
|
100
100
|
}
|
|
@@ -264,9 +264,10 @@ this.appendChild(this.previewwindow);
|
|
|
264
264
|
<assets>
|
|
265
265
|
<assetobject id="body" src="${avatarurl}" />
|
|
266
266
|
<assetobject id="avatar_animations" src="${animurl}" />
|
|
267
|
+
<assetobject id="avatar_animations_sit" src="https://assets.metacade.com/james/readyplayerme/animation-pack-sit.glb" />
|
|
267
268
|
</assets>
|
|
268
269
|
<room>
|
|
269
|
-
<ghost body_id="body" bone_head="Head" morphtarget_mouth="mouthOpen" morphtarget_eyes="eyesClosed" />
|
|
270
|
+
<ghost body_id="body" bone_head="Head" morphtarget_mouth="mouthOpen" morphtarget_eyes="eyesClosed" animation_extras="avatar_animations_sit" />
|
|
270
271
|
</room>
|
|
271
272
|
</FireBoxRoom>
|
|
272
273
|
`;
|
package/package.json
CHANGED
package/scripts/client.js
CHANGED
|
@@ -71,7 +71,7 @@ elation.require(['elements.elements', 'elements', 'engine.engine', 'engine.asset
|
|
|
71
71
|
uiconfig: args.uiconfig,
|
|
72
72
|
showchat: elation.utils.any(args.showchat && args.showchat != 'false', true),
|
|
73
73
|
usevoip: elation.utils.any(args.usevoip && args.usevoip != 'false', false),
|
|
74
|
-
resolution: args.resolution,
|
|
74
|
+
resolution: elation.utils.any(args.resolution, ''),
|
|
75
75
|
fullsize: fullsize,
|
|
76
76
|
url: args.url,
|
|
77
77
|
networking: args.networking,
|
package/scripts/janusplayer.js
CHANGED
|
@@ -9,9 +9,10 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
|
|
|
9
9
|
<assets>
|
|
10
10
|
<assetobject id="body" src="http://www.baicoianu.com/~bai/janusweb/test/janus-avatar-base.glb" />
|
|
11
11
|
<assetobject id="avatar_animations" src="http://www.baicoianu.com/~bai/janusweb/test/janus-avatar-animations.glb" />
|
|
12
|
+
<assetobject id="avatar_animations_sit" src="http://www.baicoianu.com/~bai/janusweb/test/janus-avatar-animations-sit.glb" />
|
|
12
13
|
</assets>
|
|
13
14
|
<room>
|
|
14
|
-
<ghost scale=".01 .01 .01" col="#e0d5a1" body_id="body" bone_head="head" />
|
|
15
|
+
<ghost scale=".01 .01 .01" col="#e0d5a1" body_id="body" bone_head="head" animation_extras="avatar_animations_sit" />
|
|
15
16
|
</room>
|
|
16
17
|
</FireBoxRoom>
|
|
17
18
|
`;
|
package/scripts/object.js
CHANGED
|
@@ -667,9 +667,12 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
|
|
|
667
667
|
}
|
|
668
668
|
} else {
|
|
669
669
|
shadermaterial.blending = THREE.NormalBlending;
|
|
670
|
+
shadermaterial.transparent = this.transparent;
|
|
670
671
|
}
|
|
671
672
|
if (this.depth_write !== null) {
|
|
672
673
|
shadermaterial.depthWrite = this.depth_write;
|
|
674
|
+
} else {
|
|
675
|
+
shadermaterial.depthWrite = !this.transparent;
|
|
673
676
|
}
|
|
674
677
|
if (this.depth_test !== null) {
|
|
675
678
|
shadermaterial.depthTest = this.depth_test;
|
|
@@ -677,7 +680,10 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
|
|
|
677
680
|
if (this.color_write !== null) {
|
|
678
681
|
shadermaterial.colorWrite = this.color_write;
|
|
679
682
|
}
|
|
683
|
+
if (texture) shadermaterial.uniforms['iChannel0'].value = texture;
|
|
684
|
+
if (textureNormal) shadermaterial.uniforms['iChannel1'].value = textureNormal;
|
|
680
685
|
this.traverseObjects((n) => {
|
|
686
|
+
n.renderOrder = this.renderorder;
|
|
681
687
|
if (n.material) {
|
|
682
688
|
if (Array.isArray(n.material)) {
|
|
683
689
|
for (let i = 0; i < n.material.length; i++) {
|
package/scripts/portal.js
CHANGED
|
@@ -162,7 +162,9 @@ elation.require(['janusweb.janusbase'], function() {
|
|
|
162
162
|
}
|
|
163
163
|
this.adjustAspectRatio = function(image) {
|
|
164
164
|
let aspect = (image.width / image.height) / (this.size.x / this.size.y);
|
|
165
|
-
this.mesh
|
|
165
|
+
if (this.mesh) {
|
|
166
|
+
this.mesh.scale.set(aspect, 1, 1);
|
|
167
|
+
}
|
|
166
168
|
}
|
|
167
169
|
this.updateMaterial = function() {
|
|
168
170
|
if (this.objects['3d'] && this.material) {
|
package/scripts/room.js
CHANGED
|
@@ -304,7 +304,7 @@ elation.require([
|
|
|
304
304
|
let obj = this.getObjectById(this.urlhash);
|
|
305
305
|
if (obj) {
|
|
306
306
|
obj.localToWorld(spawnpoint.position.set(0,0,0));
|
|
307
|
-
spawnpoint.orientation.setFromRotationMatrix(obj.objects['3d'].matrixWorld.lookAt(spawnpoint.position, obj.localToWorld(V(0,0
|
|
307
|
+
spawnpoint.orientation.setFromRotationMatrix(obj.objects['3d'].matrixWorld.lookAt(spawnpoint.position, obj.localToWorld(V(0,0,-1)), obj.localToWorld(V(0,1,0).sub(spawnpoint.position))));
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
return spawnpoint;
|
|
@@ -1605,15 +1605,15 @@ elation.require([
|
|
|
1605
1605
|
let object = args.object;
|
|
1606
1606
|
if (args.mesh_verts) {
|
|
1607
1607
|
let geo = new THREE.BufferGeometry();
|
|
1608
|
-
geo.
|
|
1608
|
+
geo.setAttribute( 'position', new THREE.Float32BufferAttribute( args.mesh_verts, 3 ) );
|
|
1609
1609
|
if (args.mesh_faces) {
|
|
1610
1610
|
geo.setIndex(args.mesh_faces);
|
|
1611
1611
|
}
|
|
1612
1612
|
if (args.mesh_normals) {
|
|
1613
|
-
geo.
|
|
1613
|
+
geo.setAttribute( 'normal', new THREE.Float32BufferAttribute( args.mesh_normals, 3 ) );
|
|
1614
1614
|
}
|
|
1615
1615
|
if (args.mesh_uvs) {
|
|
1616
|
-
geo.
|
|
1616
|
+
geo.setAttribute( 'uv', new THREE.Float32BufferAttribute( args.mesh_uvs, 2 ) );
|
|
1617
1617
|
}
|
|
1618
1618
|
object = new THREE.Mesh(geo, new THREE.MeshPhongMaterial());
|
|
1619
1619
|
}
|