icn3d 3.54.2 → 3.54.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.
package/icn3d.module.js CHANGED
@@ -105949,14 +105949,7 @@ class WebGLPathTracer {
105949
105949
  ic.setOptionCls.setStyle("proteins", atom.style);
105950
105950
  }
105951
105951
 
105952
- //Render the scene and objects into pixels.
105953
- render_base(bPathTracer) { let ic = this.icn3d, me = ic.icn3dui;
105954
- let thisClass = this;
105955
-
105956
- if(me.bNode) return;
105957
-
105958
- let cam = (ic.bControlGl && !me.bNode) ? window.cam : ic.cam;
105959
-
105952
+ setDirectLight(cam) { let ic = this.icn3d; ic.icn3dui;
105960
105953
  if(ic.directionalLight) {
105961
105954
  let quaternion = new Quaternion();
105962
105955
  quaternion.setFromUnitVectors( new Vector3$1(0, 0, ic.cam_z).normalize(), cam.position.clone().normalize() );
@@ -105971,6 +105964,19 @@ class WebGLPathTracer {
105971
105964
  ic.directionalLight3.applyMatrix4(cam.matrixWorld);
105972
105965
  }
105973
105966
 
105967
+ return cam;
105968
+ }
105969
+
105970
+ //Render the scene and objects into pixels.
105971
+ render_base(bPathTracer) { let ic = this.icn3d, me = ic.icn3dui;
105972
+ let thisClass = this;
105973
+
105974
+ if(me.bNode) return;
105975
+
105976
+ let cam = (ic.bControlGl && !me.bNode) ? window.cam : ic.cam;
105977
+
105978
+ cam = this.setDirectLight(cam);
105979
+
105974
105980
  if(!ic.bVr) ic.renderer.setPixelRatio( window.devicePixelRatio ); // r71
105975
105981
 
105976
105982
  if(ic.bVr) {
@@ -106012,8 +106018,14 @@ class WebGLPathTracer {
106012
106018
  else {
106013
106019
  if(bPathTracer) {
106014
106020
  ic.bImpo = false; // disable impostor for path tracing
106021
+ // remove the highlights since they are not 3D objects
106022
+ ic.hlUpdateCls.clearHighlight();
106023
+
106015
106024
  const pathTracer = new WebGLPathTracer(ic.renderer);
106016
106025
  pathTracer.setScene(ic.scene, cam);
106026
+
106027
+ cam = this.setDirectLight(cam);
106028
+
106017
106029
  //pathTracer.renderUpdates(); // Updates samples if the scene/camera changes
106018
106030
  //pathTracer.render(ic.scene, cam);
106019
106031
 
@@ -154621,7 +154633,7 @@ class iCn3DUI {
154621
154633
  //even when multiple iCn3D viewers are shown together.
154622
154634
  this.pre = this.cfg.divid + "_";
154623
154635
 
154624
- this.REVISION = '3.54.0';
154636
+ this.REVISION = '3.54.1';
154625
154637
 
154626
154638
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
154627
154639
  this.bNode = (Object.keys(window).length < 3) ? true : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.54.2",
3
+ "version": "3.54.3",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {