zincjs 1.11.0 → 1.11.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.
- package/build/zinc.frontend.js +1 -1
- package/build/zinc.js +5 -5
- package/build/zinc.js.map +1 -1
- package/package.json +1 -1
- package/src/controls.js +6 -1
- package/src/primitives/marker.js +1 -1
package/package.json
CHANGED
package/src/controls.js
CHANGED
|
@@ -100,6 +100,7 @@ const CameraControls = function ( object, domElement, renderer, scene ) {
|
|
|
100
100
|
const _rel_eye = new THREE.Vector3();
|
|
101
101
|
const sceneSphere = new THREE.Sphere();
|
|
102
102
|
const _tempEye = new THREE.Vector3();
|
|
103
|
+
let hasUpdated = false;
|
|
103
104
|
let ndcControl = undefined;
|
|
104
105
|
let maxDist = 0;
|
|
105
106
|
const viewports = {
|
|
@@ -629,7 +630,6 @@ const CameraControls = function ( object, domElement, renderer, scene ) {
|
|
|
629
630
|
this.changeZoomByValue = delta_y => {
|
|
630
631
|
if (typeof this.cameraObject !== "undefined")
|
|
631
632
|
{
|
|
632
|
-
const width = rect.width;
|
|
633
633
|
const height = rect.height;
|
|
634
634
|
|
|
635
635
|
const a = this.cameraObject.position.clone();
|
|
@@ -670,6 +670,7 @@ const CameraControls = function ( object, domElement, renderer, scene ) {
|
|
|
670
670
|
}
|
|
671
671
|
this.near_plane_fly_debt += dy*dist;
|
|
672
672
|
}
|
|
673
|
+
hasUpdated = true;
|
|
673
674
|
}
|
|
674
675
|
}
|
|
675
676
|
}
|
|
@@ -1011,6 +1012,9 @@ const CameraControls = function ( object, domElement, renderer, scene ) {
|
|
|
1011
1012
|
this.cameraObject.lookAt( this.cameraObject.target );
|
|
1012
1013
|
}
|
|
1013
1014
|
|
|
1015
|
+
updated = updated || hasUpdated;
|
|
1016
|
+
hasUpdated = false;
|
|
1017
|
+
|
|
1014
1018
|
return updated;
|
|
1015
1019
|
};
|
|
1016
1020
|
|
|
@@ -1113,6 +1117,7 @@ const CameraControls = function ( object, domElement, renderer, scene ) {
|
|
|
1113
1117
|
newViewport.upVector[2]);
|
|
1114
1118
|
this.cameraObject.updateProjectionMatrix();
|
|
1115
1119
|
this.updateDirectionalLight();
|
|
1120
|
+
hasUpdated = true;
|
|
1116
1121
|
}
|
|
1117
1122
|
|
|
1118
1123
|
/**
|
package/src/primitives/marker.js
CHANGED
|
@@ -104,7 +104,7 @@ const Marker = function(zincObject) {
|
|
|
104
104
|
this.setImageForUserSprite = (image, size) => {
|
|
105
105
|
if (userSprite) {
|
|
106
106
|
this.morph.remove(userSprite);
|
|
107
|
-
userSprite
|
|
107
|
+
userSprite = undefined;
|
|
108
108
|
}
|
|
109
109
|
if (userTexture) userTexture.dispose();
|
|
110
110
|
if (userMaterial) userMaterial.dispose();
|