viral-viewer-2 4.7.1 → 4.7.2

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,8 +13536,10 @@ function workerFunction() {
13536
13536
  instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null,
13537
13537
  supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES,
13538
13538
  outputColorSpace: currentRenderTarget === null ?
13539
- renderer.outputColorSpace : currentRenderTarget.isXRRenderTarget === true ?
13540
- currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace,
13539
+ renderer.outputColorSpace :
13540
+ currentRenderTarget.isXRRenderTarget === true ?
13541
+ currentRenderTarget.texture.colorSpace :
13542
+ LinearSRGBColorSpace,
13541
13543
  map: HAS_MAP,
13542
13544
  matcap: HAS_MATCAP,
13543
13545
  envMap: HAS_ENVMAP,
@@ -14645,7 +14647,9 @@ function workerFunction() {
14645
14647
  }
14646
14648
  }
14647
14649
  if (shadow.map === null || toVSM === true || fromVSM === true) {
14648
- const pars = this.type !== VSMShadowMap ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};
14650
+ const pars = this.type !== VSMShadowMap ?
14651
+ { minFilter: NearestFilter, magFilter: NearestFilter } :
14652
+ {};
14649
14653
  if (shadow.map !== null) {
14650
14654
  shadow.map.dispose();
14651
14655
  }
@@ -16513,7 +16517,8 @@ function workerFunction() {
16513
16517
  }
16514
16518
  else {
16515
16519
  const textures = renderTarget.isWebGLMultipleRenderTargets === true ?
16516
- renderTarget.texture : [renderTarget.texture];
16520
+ renderTarget.texture :
16521
+ [renderTarget.texture];
16517
16522
  for (let i = 0; i < textures.length; i++) {
16518
16523
  const texture = textures[i];
16519
16524
  const glFormat = utils.convert(texture.format, texture.colorSpace);
@@ -16736,7 +16741,8 @@ function workerFunction() {
16736
16741
  function updateRenderTargetMipmap(renderTarget) {
16737
16742
  const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2;
16738
16743
  const textures = renderTarget.isWebGLMultipleRenderTargets === true ?
16739
- renderTarget.texture : [renderTarget.texture];
16744
+ renderTarget.texture :
16745
+ [renderTarget.texture];
16740
16746
  for (let i = 0, il = textures.length; i < il; i++) {
16741
16747
  const texture = textures[i];
16742
16748
  if (textureNeedsGenerateMipmaps(texture, supportsMips)) {
@@ -16755,7 +16761,8 @@ function workerFunction() {
16755
16761
  renderTarget.samples > 0 &&
16756
16762
  useMultisampledRTT(renderTarget) === false) {
16757
16763
  const textures = renderTarget.isWebGLMultipleRenderTargets ?
16758
- renderTarget.texture : [renderTarget.texture];
16764
+ renderTarget.texture :
16765
+ [renderTarget.texture];
16759
16766
  const width = renderTarget.width;
16760
16767
  const height = renderTarget.height;
16761
16768
  let mask = _gl.COLOR_BUFFER_BIT;
@@ -17564,7 +17571,8 @@ function workerFunction() {
17564
17571
  renderer.capabilities.isWebGL2 === false) {
17565
17572
  const layerInit = {
17566
17573
  antialias: session.renderState.layers === undefined ?
17567
- attributes.antialias : true,
17574
+ attributes.antialias :
17575
+ true,
17568
17576
  alpha: true,
17569
17577
  depth: attributes.depth,
17570
17578
  stencil: attributes.stencil,
@@ -18295,7 +18303,8 @@ function workerFunction() {
18295
18303
  if (hasUniformChanged(uniform, i, cache) === true) {
18296
18304
  const offset = uniform.__offset;
18297
18305
  const values = Array.isArray(uniform.value) ?
18298
- uniform.value : [uniform.value];
18306
+ uniform.value :
18307
+ [uniform.value];
18299
18308
  let arrayOffset = 0;
18300
18309
  for (let i = 0; i < values.length; i++) {
18301
18310
  const value = values[i];
@@ -18356,7 +18365,8 @@ function workerFunction() {
18356
18365
  }
18357
18366
  else {
18358
18367
  const cachedObjects = Array.isArray(cache[index]) ?
18359
- cache[index] : [cache[index]];
18368
+ cache[index] :
18369
+ [cache[index]];
18360
18370
  const values = Array.isArray(value) ? value : [value];
18361
18371
  for (let i = 0; i < cachedObjects.length; i++) {
18362
18372
  const cachedObject = cachedObjects[i];
@@ -18383,7 +18393,8 @@ function workerFunction() {
18383
18393
  storage: 0, // bytes
18384
18394
  };
18385
18395
  const values = Array.isArray(uniform.value) ?
18386
- uniform.value : [uniform.value];
18396
+ uniform.value :
18397
+ [uniform.value];
18387
18398
  for (let j = 0, jl = values.length; j < jl; j++) {
18388
18399
  const value = values[j];
18389
18400
  const info = getUniformSize(value);
@@ -19219,7 +19230,8 @@ function workerFunction() {
19219
19230
  _transmissionRenderTarget = new WebGLRenderTarget(1024, 1024, {
19220
19231
  generateMipmaps: true,
19221
19232
  type: extensions.has("EXT_color_buffer_half_float") ?
19222
- HalfFloatType : UnsignedByteType,
19233
+ HalfFloatType :
19234
+ UnsignedByteType,
19223
19235
  minFilter: LinearMipmapLinearFilter,
19224
19236
  samples: isWebGL2 && antialias === true ? 4 : 0,
19225
19237
  });
@@ -34011,14 +34023,14 @@ which can be placed in CurveUtils.
34011
34023
  }
34012
34024
  // this array have a structure
34013
34025
  // [11, 12, 13 , 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44]
34014
- //
34026
+ //
34015
34027
  // then it will be converted to matrix4 like structure below:
34016
34028
  // [11, 21, 31, 41]
34017
34029
  // [12, 22, 32, 42]
34018
34030
  // [13, 23, 33, 43]
34019
34031
  // [14, 24, 34, 44]
34020
34032
  // 41, 42, 43 is translation from main origin
34021
- //
34033
+ //
34022
34034
  // Explain about axis, in revit axis follow x,y,z structure. but in threejs follow x,z,y structure, which y stand for height
34023
34035
  // IMPORTANT: x direction in threejs is opposite with x direction in revit
34024
34036
  let numbers = [
@@ -34090,7 +34102,7 @@ which can be placed in CurveUtils.
34090
34102
  instancedMesh.userData.MaterialIds = [];
34091
34103
  for (let index = 0; index < solids.length; index++) {
34092
34104
  const solid = solids[index];
34093
- const startVertexCount = mergedGeometry.attributes.position.count;
34105
+ const startVertexCount = index == 0 ? 0 : mergedGeometry.attributes.position.count;
34094
34106
  mergedGeometry = mergedGeometry.merge(solid.geometry);
34095
34107
  const endVertexCount = mergedGeometry.attributes.position.count;
34096
34108
  mergedGeometry.groups.addGroup(startVertexCount, endVertexCount, index);