viral-viewer-2 3.6.2 → 3.6.3

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.
@@ -13536,10 +13536,8 @@ function workerFunction() {
13536
13536
  instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,
13537
13537
  supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,
13538
13538
  outputColorSpace: currentRenderTarget === null ?
13539
- renderer.outputColorSpace :
13540
- currentRenderTarget.isXRRenderTarget === true ?
13541
- currentRenderTarget.texture.colorSpace :
13542
- LinearSRGBColorSpace,
13539
+ renderer.outputColorSpace : currentRenderTarget.isXRRenderTarget === true ?
13540
+ currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace,
13543
13541
  map: HAS_MAP,
13544
13542
  matcap: HAS_MATCAP,
13545
13543
  envMap: HAS_ENVMAP,
@@ -14647,9 +14645,7 @@ function workerFunction() {
14647
14645
  }
14648
14646
  }
14649
14647
  if (shadow.map === null || toVSM === true || fromVSM === true) {
14650
- const pars = this.type !== VSMShadowMap ?
14651
- { minFilter: NearestFilter, magFilter: NearestFilter } :
14652
- {};
14648
+ const pars = this.type !== VSMShadowMap ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};
14653
14649
  if (shadow.map !== null) {
14654
14650
  shadow.map.dispose();
14655
14651
  }
@@ -16516,8 +16512,7 @@ function workerFunction() {
16516
16512
  }
16517
16513
  else {
16518
16514
  const textures = renderTarget.isWebGLMultipleRenderTargets === true ?
16519
- renderTarget.texture :
16520
- [renderTarget.texture];
16515
+ renderTarget.texture : [renderTarget.texture];
16521
16516
  for (let i = 0; i < textures.length; i++) {
16522
16517
  const texture = textures[i];
16523
16518
  const glFormat = utils.convert(texture.format, texture.colorSpace);
@@ -16740,8 +16735,7 @@ function workerFunction() {
16740
16735
  function updateRenderTargetMipmap(renderTarget) {
16741
16736
  const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;
16742
16737
  const textures = renderTarget.isWebGLMultipleRenderTargets === true ?
16743
- renderTarget.texture :
16744
- [renderTarget.texture];
16738
+ renderTarget.texture : [renderTarget.texture];
16745
16739
  for (let i = 0, il = textures.length; i < il; i++) {
16746
16740
  const texture = textures[i];
16747
16741
  if (textureNeedsGenerateMipmaps(texture, supportsMips)) {
@@ -16760,8 +16754,7 @@ function workerFunction() {
16760
16754
  renderTarget.samples > 0 &&
16761
16755
  useMultisampledRTT(renderTarget) === false) {
16762
16756
  const textures = renderTarget.isWebGLMultipleRenderTargets ?
16763
- renderTarget.texture :
16764
- [renderTarget.texture];
16757
+ renderTarget.texture : [renderTarget.texture];
16765
16758
  const width = renderTarget.width;
16766
16759
  const height = renderTarget.height;
16767
16760
  let mask = _gl.COLOR_BUFFER_BIT;
@@ -17570,8 +17563,7 @@ function workerFunction() {
17570
17563
  renderer.capabilities.isWebGL2 === false) {
17571
17564
  const layerInit = {
17572
17565
  antialias: session.renderState.layers === undefined ?
17573
- attributes.antialias :
17574
- true,
17566
+ attributes.antialias : true,
17575
17567
  alpha: true,
17576
17568
  depth: attributes.depth,
17577
17569
  stencil: attributes.stencil,
@@ -18302,8 +18294,7 @@ function workerFunction() {
18302
18294
  if (hasUniformChanged(uniform, i, cache) === true) {
18303
18295
  const offset = uniform.__offset;
18304
18296
  const values = Array.isArray(uniform.value) ?
18305
- uniform.value :
18306
- [uniform.value];
18297
+ uniform.value : [uniform.value];
18307
18298
  let arrayOffset = 0;
18308
18299
  for (let i = 0; i < values.length; i++) {
18309
18300
  const value = values[i];
@@ -18364,8 +18355,7 @@ function workerFunction() {
18364
18355
  }
18365
18356
  else {
18366
18357
  const cachedObjects = Array.isArray(cache[index]) ?
18367
- cache[index] :
18368
- [cache[index]];
18358
+ cache[index] : [cache[index]];
18369
18359
  const values = Array.isArray(value) ? value : [value];
18370
18360
  for (let i = 0; i < cachedObjects.length; i++) {
18371
18361
  const cachedObject = cachedObjects[i];
@@ -18392,8 +18382,7 @@ function workerFunction() {
18392
18382
  storage: 0, // bytes
18393
18383
  };
18394
18384
  const values = Array.isArray(uniform.value) ?
18395
- uniform.value :
18396
- [uniform.value];
18385
+ uniform.value : [uniform.value];
18397
18386
  for (let j = 0, jl = values.length; j < jl; j++) {
18398
18387
  const value = values[j];
18399
18388
  const info = getUniformSize(value);
@@ -19229,8 +19218,7 @@ function workerFunction() {
19229
19218
  _transmissionRenderTarget = new WebGLRenderTarget(1024, 1024, {
19230
19219
  generateMipmaps: true,
19231
19220
  type: extensions.has("EXT_color_buffer_half_float") ?
19232
- HalfFloatType :
19233
- UnsignedByteType,
19221
+ HalfFloatType : UnsignedByteType,
19234
19222
  minFilter: LinearMipmapLinearFilter,
19235
19223
  samples: isWebGL2 && antialias === true ? 4 : 0,
19236
19224
  });
@@ -34120,8 +34108,17 @@ which can be placed in CurveUtils.
34120
34108
  self.postMessage(jsonData);
34121
34109
  }
34122
34110
  else {
34123
- dummyGeometry.computeVertexNormals();
34124
- const edges = new EdgesGeometry(dummyGeometry, 15);
34111
+ let geometry = new BufferGeometry();
34112
+ if (dummyGeometry.attributes.position.count > maxPolygonPerObject) {
34113
+ let modifier = new SimplifyModifier();
34114
+ geometry = modifier.modify(dummyGeometry, maxPolygonPerObject);
34115
+ console.log(dummyGeometry.attributes.position.count, geometry.attributes.position.count);
34116
+ }
34117
+ else {
34118
+ geometry = dummyGeometry;
34119
+ }
34120
+ geometry.computeVertexNormals();
34121
+ const edges = new EdgesGeometry(geometry, 15);
34125
34122
  const positions = edges.attributes.position.array;
34126
34123
  const indices = [];
34127
34124
  for (let i = 0; i < positions.length / 3; i += 2) {
@@ -34133,7 +34130,7 @@ which can be placed in CurveUtils.
34133
34130
  // Set the index attribute
34134
34131
  bufferGeometry.setIndex(indices);
34135
34132
  const line = new LineSegments(bufferGeometry, new LineBasicMaterial({ color: "#202020", linewidth: 0.5 }));
34136
- const childMesh = new Mesh(dummyGeometry);
34133
+ const childMesh = new Mesh(geometry);
34137
34134
  childMesh.add(line);
34138
34135
  childMesh.castShadow = true;
34139
34136
  childMesh.receiveShadow = true;