viral-viewer-2 3.8.9 → 3.9.1

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.
@@ -6,17 +6,17 @@ class ViralRenderer {
6
6
  constructor(viralViewerApi) {
7
7
  this.viralViewerApi = viralViewerApi;
8
8
  this.renderer = new three_1.WebGLRenderer({
9
- // alpha: true,
9
+ alpha: true,
10
10
  antialias: true,
11
- // logarithmicDepthBuffer: true,
12
- // powerPreference: "high-performance",
11
+ logarithmicDepthBuffer: true,
12
+ powerPreference: "high-performance",
13
13
  });
14
14
  this.setupRenderer();
15
15
  }
16
16
  setupRenderer() {
17
17
  this.renderer.shadowMap.enabled = true;
18
18
  this.renderer.shadowMap.type = three_1.PCFSoftShadowMap;
19
- // this.renderer.setClearColor(0xffffff, 0);
19
+ this.renderer.setClearColor(0xffffff, 0);
20
20
  this.renderer.setSize(this.viralViewerApi.targetElement.offsetWidth, this.viralViewerApi.targetElement.offsetHeight);
21
21
  this.viralViewerApi.targetElement.appendChild(this.renderer.domElement);
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"viral-renderer.js","sourceRoot":"","sources":["../../../src/components/renderer/viral-renderer.ts"],"names":[],"mappings":";;;AAAA,iCAA8E;AAG9E,MAAa,aAAa;IAOxB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QANjD,aAAQ,GAAkB,IAAI,qBAAa,CAAC;YAC1C,eAAe;YACf,SAAS,EAAE,IAAI;YACf,gCAAgC;YAChC,uCAAuC;SACxC,CAAC,CAAC;QAED,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACM,aAAa;QAClB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QACvC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,wBAAgB,CAAC;QAChD,4CAA4C;QAC5C,IAAI,CAAC,QAAQ,CAAC,OAAO,CACnB,IAA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AClB,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,gBAAgB,CAAC,qBAAqB,EACrE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CACvC,CAAC;gBACF,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;aAChC;SACF;IACH,CAAC;CACF;AA3CD,sCA2CC"}
@@ -34089,7 +34089,7 @@ which can be placed in CurveUtils.
34089
34089
  childMesh.setMatrixAt(index, matrix4);
34090
34090
  //if number of polygon smaller than expect, generate edges
34091
34091
  if (geometry.attributes.position.count <= maxPolygonForEdge) {
34092
- const edges = new EdgesGeometry(geometry, 90);
34092
+ const edges = new EdgesGeometry(geometry, 120);
34093
34093
  const positions = edges.attributes.position.array;
34094
34094
  const indices = [];
34095
34095
  for (let i = 0; i < positions.length / 3; i += 2) {
@@ -34100,7 +34100,7 @@ which can be placed in CurveUtils.
34100
34100
  bufferGeometry.setAttribute("position", new BufferAttribute(new Float32Array(positions), 3));
34101
34101
  // Set the index attribute
34102
34102
  bufferGeometry.setIndex(indices);
34103
- const line = new LineSegments(bufferGeometry, new LineBasicMaterial({ color: "#666", linewidth: 0.5 }));
34103
+ const line = new LineSegments(bufferGeometry, new LineBasicMaterial({ color: "#666", linewidth: 1 }));
34104
34104
  line.applyMatrix4(matrix4);
34105
34105
  line.updateMatrix();
34106
34106
  childMesh.add(line);
@@ -34125,7 +34125,7 @@ which can be placed in CurveUtils.
34125
34125
  // }
34126
34126
  geometry = mergeVertices(dummyGeometry);
34127
34127
  geometry.computeVertexNormals();
34128
- const edges = new EdgesGeometry(geometry, 90);
34128
+ const edges = new EdgesGeometry(geometry, 120);
34129
34129
  const positions = edges.attributes.position.array;
34130
34130
  const indices = [];
34131
34131
  for (let i = 0; i < positions.length / 3; i += 2) {
@@ -34136,7 +34136,7 @@ which can be placed in CurveUtils.
34136
34136
  bufferGeometry.setAttribute("position", new BufferAttribute(new Float32Array(positions), 3));
34137
34137
  // Set the index attribute
34138
34138
  bufferGeometry.setIndex(indices);
34139
- const line = new LineSegments(bufferGeometry, new LineBasicMaterial({ color: "#202020", linewidth: 0.5 }));
34139
+ const line = new LineSegments(bufferGeometry, new LineBasicMaterial({ color: "#202020", linewidth: 1 }));
34140
34140
  const childMesh = new Mesh(geometry);
34141
34141
  childMesh.add(line);
34142
34142
  childMesh.castShadow = true;