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.js +21 -9
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +21 -9
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -105048,14 +105048,7 @@ class WebGLPathTracer {
|
|
|
105048
105048
|
ic.setOptionCls.setStyle("proteins", atom.style);
|
|
105049
105049
|
}
|
|
105050
105050
|
|
|
105051
|
-
|
|
105052
|
-
render_base(bPathTracer) { let ic = this.icn3d, me = ic.icn3dui;
|
|
105053
|
-
let thisClass = this;
|
|
105054
|
-
|
|
105055
|
-
if(me.bNode) return;
|
|
105056
|
-
|
|
105057
|
-
let cam = (ic.bControlGl && !me.bNode) ? window.cam : ic.cam;
|
|
105058
|
-
|
|
105051
|
+
setDirectLight(cam) { let ic = this.icn3d; ic.icn3dui;
|
|
105059
105052
|
if(ic.directionalLight) {
|
|
105060
105053
|
let quaternion = new Quaternion();
|
|
105061
105054
|
quaternion.setFromUnitVectors( new Vector3$1(0, 0, ic.cam_z).normalize(), cam.position.clone().normalize() );
|
|
@@ -105070,6 +105063,19 @@ class WebGLPathTracer {
|
|
|
105070
105063
|
ic.directionalLight3.applyMatrix4(cam.matrixWorld);
|
|
105071
105064
|
}
|
|
105072
105065
|
|
|
105066
|
+
return cam;
|
|
105067
|
+
}
|
|
105068
|
+
|
|
105069
|
+
//Render the scene and objects into pixels.
|
|
105070
|
+
render_base(bPathTracer) { let ic = this.icn3d, me = ic.icn3dui;
|
|
105071
|
+
let thisClass = this;
|
|
105072
|
+
|
|
105073
|
+
if(me.bNode) return;
|
|
105074
|
+
|
|
105075
|
+
let cam = (ic.bControlGl && !me.bNode) ? window.cam : ic.cam;
|
|
105076
|
+
|
|
105077
|
+
cam = this.setDirectLight(cam);
|
|
105078
|
+
|
|
105073
105079
|
if(!ic.bVr) ic.renderer.setPixelRatio( window.devicePixelRatio ); // r71
|
|
105074
105080
|
|
|
105075
105081
|
if(ic.bVr) {
|
|
@@ -105111,8 +105117,14 @@ class WebGLPathTracer {
|
|
|
105111
105117
|
else {
|
|
105112
105118
|
if(bPathTracer) {
|
|
105113
105119
|
ic.bImpo = false; // disable impostor for path tracing
|
|
105120
|
+
// remove the highlights since they are not 3D objects
|
|
105121
|
+
ic.hlUpdateCls.clearHighlight();
|
|
105122
|
+
|
|
105114
105123
|
const pathTracer = new WebGLPathTracer(ic.renderer);
|
|
105115
105124
|
pathTracer.setScene(ic.scene, cam);
|
|
105125
|
+
|
|
105126
|
+
cam = this.setDirectLight(cam);
|
|
105127
|
+
|
|
105116
105128
|
//pathTracer.renderUpdates(); // Updates samples if the scene/camera changes
|
|
105117
105129
|
//pathTracer.render(ic.scene, cam);
|
|
105118
105130
|
|
|
@@ -153720,7 +153732,7 @@ class iCn3DUI {
|
|
|
153720
153732
|
//even when multiple iCn3D viewers are shown together.
|
|
153721
153733
|
this.pre = this.cfg.divid + "_";
|
|
153722
153734
|
|
|
153723
|
-
this.REVISION = '3.54.
|
|
153735
|
+
this.REVISION = '3.54.1';
|
|
153724
153736
|
|
|
153725
153737
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
153726
153738
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|