janusweb 1.5.42 → 1.5.43

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/scripts/object.js CHANGED
@@ -51,6 +51,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
51
51
  shadow: { type: 'boolean', default: true, set: this.updateMaterial },
52
52
  shadow_receive: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Receive shadows from self and other objects' },
53
53
  shadow_cast: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Cast shadows onto self and other objects' },
54
+ shadow_side: { type: 'string', default: '', set: this.updateMaterial, comment: 'Cast shadows onto front, back, both, or auto (empty)' },
54
55
  wireframe: { type: 'boolean', default: false, set: this.updateMaterial, comment: 'Wireframe rendering' },
55
56
  fog: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Object is affected by fog' },
56
57
  lights: { type: 'boolean', default: false, comment: 'Load lights from model' },
@@ -58,7 +59,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
58
59
  cull_face: { type: 'string', default: 'back', set: this.updateMaterial, comment: 'Hide face sides (back, front, or none)' },
59
60
  blend_src: { type: 'string', set: this.updateMaterial, comment: 'Blend mode (source)' },
60
61
  blend_dest: { type: 'string', set: this.updateMaterial, comment: 'Blend mode (destination)' },
61
- blend_mode: { type: 'string', default: 'normal', set: this.updateMaterial, comment: 'Blend mode' },
62
+ blend_mode: { type: 'string', default: null, set: this.updateMaterial, comment: 'Blend mode' },
62
63
  depth_write: { type: 'boolean', default: null, set: this.updateMaterial },
63
64
  depth_test: { type: 'boolean', default: null, set: this.updateMaterial },
64
65
  depth_offset: { type: 'float', default: null, set: this.updateMaterial },
@@ -81,6 +82,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
81
82
  emissive_intensity: { type: 'float', default: 1, set: this.updateMaterial, comment: 'Intensity of material emissive color' },
82
83
  roughness: { type: 'float', default: null, min: 0, max: 1, set: this.updateMaterial, comment: 'Material roughness value' },
83
84
  metalness: { type: 'float', default: null, set: this.updateMaterial, comment: 'Material metalness value' },
85
+ transmission: { type: 'float', default: 0, set: this.updateMaterial, comment: 'Material transmission value' },
84
86
  usevertexcolors: { type: 'boolean', default: true, set: this.updateMaterial },
85
87
  gain: { type: 'float', default: 1.0, set: this.updateAudioNodes },
86
88
  onloadstart: { type: 'callback' },
@@ -113,19 +115,23 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
113
115
  if (asset.loaded) {
114
116
  setTimeout(elation.bind(this, this.handleLoad), 0);
115
117
  } else {
118
+ //this.loadingindicator = this.createObject('object', {});
119
+ /*
116
120
  this.loadingindicator = this.createObject('particle', {
117
121
  col: 'green',
118
122
  scale: V(.025),
119
123
  vel: V(-1, 0, -1),
120
124
  accel: V(0, -5, 0),
121
125
  rand_vel: V(2, 2, 2),
122
- count: 250,
123
- rate: 500,
126
+ count: 25,
127
+ rate: 50,
124
128
  duration: .5,
125
129
  collidable: false,
126
130
  collision_trigger: true,
127
131
  loop: true,
128
132
  });
133
+ */
134
+ //elation.events.add(asset, 'asset_load_queued,asset_load_start,asset_load_progress,asset_load_processing,asset_load_complete', ev => { console.log(ev.type, this, ev); });
129
135
  elation.events.add(asset, 'asset_load_complete', elation.bind(this, this.handleLoad));
130
136
  elation.events.add(asset, 'asset_load_progress', (ev) => { this.dispatchEvent({type: 'loadprogress', data: ev.data}); });
131
137
  }
@@ -204,12 +210,14 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
204
210
  }
205
211
  this.updateVideo = function() {
206
212
  if (!this.modelasset) return;
213
+ if (this.videotexture) {
214
+ if (this.videotexture.image) {
215
+ this.videotexture.image.pause();
216
+ }
217
+ }
207
218
  if (!this.videoasset || this.videoasset.name != this.video_id) {
208
219
  if (this.video_id && this.video_id != '' && !this.image_id) {
209
220
  this.loadVideo(this.video_id);
210
- if (this.modelasset && texture) {
211
- this.assignTextureParameters(texture, this.modelasset, this.videoasset);
212
- }
213
221
  } else {
214
222
  this.videotexture = null;
215
223
  }
@@ -246,9 +254,11 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
246
254
  // Refresh this object whenever the video has a new frame for us to display
247
255
  texture.onUpdate = (e) => this.refresh();
248
256
 
249
- if (videoasset.auto_play) {
257
+ if (videoasset.auto_play && texture.image) {
250
258
  texture.image.addEventListener('canplaythrough', function() {
251
- texture.image.play();
259
+ if (texture.image) {
260
+ texture.image.play();
261
+ }
252
262
  });
253
263
  }
254
264
 
@@ -260,6 +270,9 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
260
270
 
261
271
  elation.events.add(this, 'click', elation.bind(this, this.handleVideoClick));
262
272
  this.room.videos[videoid] = this;
273
+ if (this.modelasset && texture) {
274
+ this.assignTextureParameters(texture, this.modelasset, videoasset);
275
+ }
263
276
  }
264
277
  }
265
278
  this.updateWebsurface = function() {
@@ -296,6 +309,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
296
309
  this.websurface = this.spawn('januswebsurface', null, {janus: this.janus, room: this.room, websurface_id: this.websurface_id});
297
310
  elation.events.add(this, 'mouseover', elation.bind(this.websurface, this.websurface.hover));
298
311
  elation.events.add(this, 'mouseout', elation.bind(this.websurface, this.websurface.unhover));
312
+ elation.events.add(this, 'click', elation.bind(this.websurface, this.websurface.click));
299
313
  this.replaceWebsurfaceMaterial();
300
314
  this.websurface.start();
301
315
  }
@@ -357,6 +371,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
357
371
  blend_src = false,
358
372
  blend_dest = false,
359
373
  side = this.sidemap[this.properties.cull_face],
374
+ shadowside = this.sidemap[this.properties.shadow_side || this.properties.cull_face],
360
375
  textureasset,
361
376
  lightmaptextureasset,
362
377
  emissivetextureasset,
@@ -416,7 +431,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
416
431
 
417
432
  //texture.offset.copy(this.texture_offset);
418
433
  //texture.repeat.copy(this.texture_repeat);
419
- //texture.rotation = this.texture_rotation * THREE.Math.DEG2RAD;
434
+ //texture.rotation = this.texture_rotation * THREE.MathUtils.DEG2RAD;
420
435
 
421
436
  if (texture) {
422
437
  this.assignTextureParameters(texture, modelasset, textureasset);
@@ -434,7 +449,10 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
434
449
  }
435
450
  }
436
451
  if (normal_image_id) {
437
- let normaltextureasset = this.getAsset('image', normal_image_id, true);
452
+ let normaltextureasset = this.getAsset('image', normal_image_id, false);
453
+ if (!normaltextureasset) { // no image found, try video
454
+ normaltextureasset = this.getAsset('video', normal_image_id);
455
+ }
438
456
  if (normaltextureasset) {
439
457
  textureNormal = normaltextureasset.getInstance();
440
458
  if (!this.assetloadhandlers[textureNormal.uuid]) {
@@ -632,6 +650,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
632
650
  shadermaterial = shader.getInstance();
633
651
  shadermaterial.uniforms = this.room.parseShaderUniforms(shader.uniforms);
634
652
  shadermaterial.side = this.sidemap[this.properties.cull_face];
653
+ shadermaterial.shadowSide = shadowside
635
654
  shadermaterial.receiveShadow = this.shadow && this.shadow_receive;
636
655
  shadermaterial.castShadow = this.shadow && this.shadow_cast;
637
656
  shadermaterial.renderOrder = this.renderorder;
@@ -765,9 +784,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
765
784
  }
766
785
  if (m.normalMap) {
767
786
  var imagesrc = m.normalMap.sourceFile;
768
- var asset = this.getAsset('image', imagesrc, {id: imagesrc, src: imagesrc, hasalpha: false});
787
+ var asset = this.getAsset('image', imagesrc, {id: imagesrc, src: imagesrc, hasalpha: false, srgb: false});
769
788
  if (asset) {
770
- m.normalMap = asset.getInstance();
771
789
  m.normalMap = asset.getInstance();
772
790
  if (!this.assetloadhandlers[m.normalMap.uuid]) {
773
791
  this.assetloadhandlers[m.normalMap.uuid] = true;
@@ -783,9 +801,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
783
801
  m.bumpScale = this.bumpmap_scale;
784
802
  } else if (m.bumpMap) {
785
803
  var imagesrc = m.bumpMap.sourceFile;
786
- var asset = this.getAsset('image', imagesrc, {id: imagesrc, src: imagesrc, hasalpha: false});
804
+ var asset = this.getAsset('image', imagesrc, {id: imagesrc, src: imagesrc, hasalpha: false, srgb: false});
787
805
  if (asset) {
788
- m.normalMap = asset.getInstance();
789
806
  m.normalMap = asset.getInstance();
790
807
  if (!this.assetloadhandlers[m.normalMap.uuid]) {
791
808
  this.assetloadhandlers[m.normalMap.uuid] = true;
@@ -793,7 +810,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
793
810
  m.normalMap = ev.data; this.refresh();
794
811
  m.normalMap.offset.copy(this.texture_offset);
795
812
  m.normalMap.repeat.copy(this.texture_repeat);
796
- m.normalMap.rotation = this.texture_rotation * THREE.Math.DEG2RAD;
813
+ m.normalMap.rotation = this.texture_rotation * THREE.MathUtils.DEG2RAD;
797
814
  }));
798
815
  elation.events.add(asset, 'asset_load', elation.bind(this, function(ev) { m.normalMap = ev.data; this.refresh(); }));
799
816
  }
@@ -803,7 +820,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
803
820
  m.normalMap = textureNormal;
804
821
  } else if (m.normalMap) {
805
822
  var imagesrc = m.normalMap.sourceFile;
806
- var asset = this.getAsset('image', imagesrc, {id: imagesrc, src: imagesrc, hasalpha: false});
823
+ var asset = this.getAsset('image', imagesrc, {id: imagesrc, src: imagesrc, hasalpha: false, srgb: false});
807
824
  if (asset) {
808
825
  m.normalMap = asset.getInstance();
809
826
  if (!this.assetloadhandlers[m.normalMap.uuid]) {
@@ -817,11 +834,10 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
817
834
  if (textureLightmap && textureLightmap.image) {
818
835
  if (lightmaptextureasset.loaded) {
819
836
  m.lightMap = textureLightmap;
820
- } else {
821
- }
822
- if (!this.assetloadhandlers[m.lightMap.uuid]) {
823
- this.assetloadhandlers[m.lightMap.uuid] = true;
824
- elation.events.add(textureLightmap, 'asset_update', elation.bind(m, function(ev) { m.lightMap = ev.data; this.refresh(); }));
837
+ if (!this.assetloadhandlers[m.lightMap.uuid]) {
838
+ this.assetloadhandlers[m.lightMap.uuid] = true;
839
+ elation.events.add(textureLightmap, 'asset_update', elation.bind(m, function(ev) { m.lightMap = ev.data; this.refresh(); }));
840
+ }
825
841
  }
826
842
  } else if (m.lightMap) {
827
843
  var imagesrc = m.lightMap.sourceFile;
@@ -844,6 +860,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
844
860
  m.emissiveMap = textureEmissive;
845
861
  textureEmissive.encoding = THREE.sRGBEncoding;
846
862
  m.emissive = new THREE.Color(0xffffff);
863
+ } else if (m.emissiveMap) {
864
+ m.emissiveMap.encoding = THREE.sRGBEncoding;
847
865
  } else if (this.emissive) {
848
866
  //m.emissive = this.emissive.clone();
849
867
  m.emissive.copy(this.emissive)
@@ -864,13 +882,18 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
864
882
  } else if (this.metalness !== null) {
865
883
  m.metalness = this.metalness;
866
884
  }
885
+ if (this.transmission !== null) {
886
+ m.transmission = this.transmission;
887
+ }
867
888
 
868
889
  if (this.isUsingPBR() && !this.isUsingToonShader()) {
869
890
  m.envMap = this.getEnvmap();
891
+ m.envMapIntensity = room.skybox_intensity;
870
892
  }
871
893
 
872
894
  //m.roughness = 0.75;
873
895
  m.side = side;
896
+ m.shadowSide = shadowside;
874
897
 
875
898
  if (blend_src || blend_dest) {
876
899
  if (blend_src) m.blendSrc = blend_src;
@@ -882,8 +905,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
882
905
  if (!(this.blend_src == 'src_alpha' && this.blend_dest == 'one_minus_src_alpha')) {
883
906
  m.transparent = true;
884
907
  }
885
- } else {
886
- //m.blending = THREE.NormalBlending;
908
+ } else if (this.blend_mode) {
909
+ m.blending = this.blendModeMap[this.blend_mode];
887
910
  }
888
911
  if (this.depth_write !== null) {
889
912
  m.depthWrite = this.depth_write;
@@ -926,9 +949,9 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
926
949
  //m.needsUpdate = true;
927
950
  m.skinning = useSkinning;
928
951
  if (useVertexColors) {
929
- m.vertexColors = THREE.VertexColors;
952
+ m.vertexColors = true;
930
953
  } else {
931
- m.vertexColors = THREE.NoColors;
954
+ m.vertexColors = false
932
955
  }
933
956
  m.fog = this.fog;
934
957
  m.wireframe = this.wireframe;
@@ -1004,6 +1027,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1004
1027
  m.emissive.copy(this.emissive);
1005
1028
  }
1006
1029
  }
1030
+ if (oldmat.emissiveIntensity !== undefined) m.emissiveIntensity = oldmat.emissiveIntensity;
1007
1031
  }
1008
1032
 
1009
1033
  m.lightMap = oldmat.lightMap;
@@ -1031,6 +1055,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1031
1055
  if (oldmat.attenuationDistance !== undefined) m.attenuationDistance = oldmat.attenuationDistance;
1032
1056
  if (oldmat.thickness !== undefined) m.thickness = oldmat.thickness;
1033
1057
  if (oldmat.thicknessMap !== undefined) m.thicknessMap = oldmat.thicknessMap;
1058
+ if (oldmat.transmission !== undefined) m.transmission = oldmat.transmission;
1059
+ if (oldmat.transmissionMap !== undefined) m.transmissionMap = oldmat.transmissionMap;
1034
1060
 
1035
1061
  //m.reflectivity = (oldmat.reflectivity !== undefined ? oldmat.reflectivity : .5);
1036
1062
 
@@ -1064,7 +1090,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1064
1090
  shader.vertexShader = shader.vertexShader.replace('#include <' + oldchunkname + '>', '#include <' + newchunkname + '>');
1065
1091
  shader.fragmentShader = shader.fragmentShader.replace('#include <' + oldchunkname + '>', '#include <' + newchunkname + '>');
1066
1092
  }
1067
- }
1093
+ };
1068
1094
  }
1069
1095
  }
1070
1096
  return m;
@@ -1076,6 +1102,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1076
1102
  let materials = (elation.utils.isArray(n.material) ? n.material : [n.material]);
1077
1103
  materials.forEach(m => {
1078
1104
  m.envMap = envMap;
1105
+ m.envMapIntensity = room.skybox_intensity;
1079
1106
  });
1080
1107
  }
1081
1108
  });
@@ -1145,7 +1172,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1145
1172
  texture.generateMipmaps = linear && !(texture instanceof THREE.VideoTexture || texture instanceof THREE.SBSVideoTexture) && (textureasset && textureasset.detectImageType() != 'basis');
1146
1173
  texture.offset.copy(this.texture_offset);
1147
1174
  texture.repeat.copy(this.texture_repeat);
1148
- texture.rotation = this.texture_rotation * THREE.Math.DEG2RAD;
1175
+ texture.rotation = this.texture_rotation * THREE.MathUtils.DEG2RAD;
1149
1176
  if (texture.repeat.x > 1 || texture.repeat.y > 1) {
1150
1177
  texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
1151
1178
  }
@@ -1163,12 +1190,12 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1163
1190
  if (m.map) {
1164
1191
  m.map.offset.copy(this.texture_offset);
1165
1192
  m.map.repeat.copy(this.texture_repeat);
1166
- m.map.rotation = this.texture_rotation * THREE.Math.DEG2RAD;
1193
+ m.map.rotation = this.texture_rotation * THREE.MathUtils.DEG2RAD;
1167
1194
  }
1168
1195
  if (m.normalMap) {
1169
1196
  m.normalMap.offset.copy(this.texture_offset);
1170
1197
  m.normalMap.repeat.copy(this.texture_repeat);
1171
- m.normalMap.rotation = this.texture_rotation * THREE.Math.DEG2RAD;
1198
+ m.normalMap.rotation = this.texture_rotation * THREE.MathUtils.DEG2RAD;
1172
1199
  }
1173
1200
  // TODO - all maps which use uv layer 0 should be changed here
1174
1201
  });
@@ -1263,6 +1290,8 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1263
1290
  if (strerr.indexOf('NotSupportedError') == 0 && this.hls !== false) {
1264
1291
  console.log('Attempting to init hls', this.videoasset)
1265
1292
  this.videoasset.initHLS();
1293
+ } else {
1294
+ console.error(e);
1266
1295
  }
1267
1296
  });
1268
1297
  }
@@ -1368,7 +1397,9 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1368
1397
  }
1369
1398
  this.setupOnBeforeRenderListener = function(type, args, arg2, arg3) {
1370
1399
  if (this.onbeforerender) {
1371
- this.objects['3d'].onBeforeRender = this.onbeforerender;
1400
+ elation.events.add(this, 'load', ev => {
1401
+ this.objects['3d'].onBeforeRenderx = this.onbeforerender;
1402
+ });
1372
1403
  }
1373
1404
  }
1374
1405
  this.updateAudioNodes = function() {
@@ -1443,6 +1474,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1443
1474
  shadow: [ 'property', 'shadow' ],
1444
1475
  shadow_receive: [ 'property', 'shadow_receive' ],
1445
1476
  shadow_cast: [ 'property', 'shadow_cast' ],
1477
+ shadow_side: [ 'property', 'shadow_side' ],
1446
1478
  cull_face: [ 'property', 'cull_face' ],
1447
1479
  blend_src: [ 'property', 'blend_src' ],
1448
1480
  blend_dest: [ 'property', 'blend_dest' ],
@@ -1460,6 +1492,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
1460
1492
  emissive_intensity: [ 'property', 'emissive_intensity'],
1461
1493
  roughness: [ 'property', 'roughness'],
1462
1494
  metalness: [ 'property', 'metalness'],
1495
+ transmission: [ 'property', 'transmission'],
1463
1496
  usevertexcolors: [ 'property', 'usevertexcolors'],
1464
1497
 
1465
1498
  texture_offset: [ 'property', 'texture_offset'],
package/scripts/parts.js CHANGED
@@ -35,7 +35,7 @@ elation.require([], function() {
35
35
  engine: this._object.engine,
36
36
  properties: {
37
37
  object: object,
38
- rotation: [object.rotation.x * THREE.Math.RAD2DEG, object.rotation.y * THREE.Math.RAD2DEG, object.rotation.z * THREE.Math.RAD2DEG],
38
+ rotation: [object.rotation.x * THREE.MathUtils.RAD2DEG, object.rotation.y * THREE.MathUtils.RAD2DEG, object.rotation.z * THREE.MathUtils.RAD2DEG],
39
39
  room: rootobject.room
40
40
  }
41
41
  });
package/scripts/portal.js CHANGED
@@ -501,11 +501,11 @@ elation.require(['janusweb.janusbase'], function() {
501
501
  var offset = ((thickness / 2) / this.properties.scale.z) * 2;
502
502
  var box;
503
503
  if (this.round) {
504
- box = new THREE.CircleBufferGeometry(.5, 64);
504
+ box = new THREE.CircleGeometry(.5, 64);
505
505
  box.applyMatrix4(new THREE.Matrix4().makeScale(this.size.x, this.size.y, thickness));
506
506
  box.applyMatrix4(new THREE.Matrix4().makeTranslation(0, this.size.y/2, .02));
507
507
  } else {
508
- box = new THREE.BoxBufferGeometry(this.size.x, this.size.y, thickness);
508
+ box = new THREE.BoxGeometry(this.size.x, this.size.y, thickness);
509
509
  box.applyMatrix4(new THREE.Matrix4().makeTranslation(0, this.size.y/2, thickness + .02));
510
510
  }
511
511
 
@@ -536,27 +536,31 @@ elation.require(['janusweb.janusbase'], function() {
536
536
  var group = new THREE.Mesh(box, mat);
537
537
  group.renderOrder = 10;
538
538
  group.castShadow = true;
539
+ let framegeo;
539
540
 
540
541
  if (this.draw_glow) {
541
542
  var framewidth = .05,
542
543
  frameheight = .05,
543
544
  framedepth = .01 / this.properties.size.z;
544
- var framegeo = new THREE.BufferGeometry();
545
- var framepart = new THREE.BoxBufferGeometry(this.size.x,frameheight,framedepth);
545
+ //var framegeo = new THREE.BufferGeometry();
546
+ var framepart = new THREE.BoxGeometry(this.size.x,frameheight,framedepth);
546
547
  var framemat4 = new THREE.Matrix4();
547
548
 
548
549
 
549
550
  framemat4.makeTranslation(0,this.size.y - frameheight/2,framedepth + offset);
550
- framegeo.merge(framepart, framemat4);
551
+ let framepart1 = framepart.clone().applyMatrix4(framemat4);
552
+
551
553
  framemat4.makeTranslation(0,frameheight/2,framedepth + offset);
552
- framegeo.merge(framepart, framemat4);
554
+ let framepart2 = framepart.clone().applyMatrix4(framemat4);
553
555
 
554
- framepart = new THREE.BoxBufferGeometry(framewidth,this.size.y,framedepth);
556
+ framepart = new THREE.BoxGeometry(framewidth,this.size.y,framedepth);
555
557
 
556
558
  framemat4.makeTranslation(this.size.x / 2 - framewidth/2,this.size.y / 2,framedepth + offset);
557
- framegeo.merge(framepart, framemat4);
559
+ let framepart3 = framepart.clone().applyMatrix4(framemat4);
558
560
  framemat4.makeTranslation(-this.size.x / 2 + framewidth/2,this.size.y / 2,framedepth + offset);
559
- framegeo.merge(framepart, framemat4);
561
+ let framepart4 = framepart.clone().applyMatrix4(framemat4);
562
+
563
+ framegeo = THREE.BufferGeometryUtils.mergeBufferGeometries([framepart1, framepart2, framepart3, framepart4]);
560
564
 
561
565
  var framemat = new THREE.MeshPhongMaterial({color: 0x0000cc, emissive: 0x222222});
562
566
  var frame = new THREE.Mesh(framegeo, framemat);
@@ -113,8 +113,9 @@ elation.component.add('engine.things.remoteplayer', function() {
113
113
  this.mouth = this.createObject('sound', {
114
114
  pos: V(0, 0, 0),
115
115
  distancemodel: 'exponential',
116
- dist: 8,
117
- rolloff: 0.75,
116
+ dist: 1,
117
+ gain: 2,
118
+ rolloff: .4,
118
119
  });
119
120
  this.head.add(this.mouth._target);
120
121