viral-viewer-2 4.7.1 → 4.7.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.
@@ -34011,14 +34011,14 @@ which can be placed in CurveUtils.
34011
34011
  }
34012
34012
  // this array have a structure
34013
34013
  // [11, 12, 13 , 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44]
34014
- //
34014
+ //
34015
34015
  // then it will be converted to matrix4 like structure below:
34016
34016
  // [11, 21, 31, 41]
34017
34017
  // [12, 22, 32, 42]
34018
34018
  // [13, 23, 33, 43]
34019
34019
  // [14, 24, 34, 44]
34020
34020
  // 41, 42, 43 is translation from main origin
34021
- //
34021
+ //
34022
34022
  // 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
34023
  // IMPORTANT: x direction in threejs is opposite with x direction in revit
34024
34024
  let numbers = [
@@ -34088,12 +34088,19 @@ which can be placed in CurveUtils.
34088
34088
  const instancedMesh = new InstancedMesh(mergedGeometry, new MeshBasicMaterial(), data.Instances.length);
34089
34089
  instancedMesh.userData.Instances = [];
34090
34090
  instancedMesh.userData.MaterialIds = [];
34091
+ let geometries = solids.map(x => x.geometry);
34092
+ mergedGeometry = mergeGeometries(geometries, true);
34091
34093
  for (let index = 0; index < solids.length; index++) {
34092
34094
  const solid = solids[index];
34093
- const startVertexCount = mergedGeometry.attributes.position.count;
34094
- mergedGeometry = mergedGeometry.merge(solid.geometry);
34095
- const endVertexCount = mergedGeometry.attributes.position.count;
34096
- mergedGeometry.groups.addGroup(startVertexCount, endVertexCount, index);
34095
+ // const startVertexCount =
34096
+ // index == 0 ? 0 : mergedGeometry.attributes.position.count;
34097
+ // mergedGeometry = mergedGeometry.merge(solid.geometry);
34098
+ // const endVertexCount = mergedGeometry.attributes.position.count;
34099
+ // mergedGeometry.groups.addGroup(
34100
+ // startVertexCount,
34101
+ // endVertexCount,
34102
+ // index
34103
+ // );
34097
34104
  instancedMesh.userData.MaterialIds.push(solid.userData.MaterialId);
34098
34105
  // group.add(instancedMesh);
34099
34106
  }