@needle-tools/three 0.146.4 → 0.146.5
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/three.cjs +32518 -32517
- package/build/three.js +32523 -32522
- package/build/three.min.js +7 -6
- package/build/three.module.js +830 -829
- package/examples/jsm/controls/OrbitControls.js +6 -2
- package/package.json +1 -1
- package/src/renderers/shaders/ShaderChunk/map_fragment.glsl.js +5 -1
- package/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.js +4 -0
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
Spherical,
|
|
6
6
|
TOUCH,
|
|
7
7
|
Vector2,
|
|
8
|
-
Vector3
|
|
8
|
+
Vector3,
|
|
9
|
+
MathUtils
|
|
9
10
|
} from 'three';
|
|
10
11
|
|
|
11
12
|
// This set of controls performs orbiting, dollying (zooming), and panning.
|
|
@@ -222,7 +223,9 @@ class OrbitControls extends EventDispatcher {
|
|
|
222
223
|
spherical.makeSafe();
|
|
223
224
|
|
|
224
225
|
|
|
225
|
-
|
|
226
|
+
currentScale = MathUtils.lerp(currentScale, scale, scope.dampingFactor);
|
|
227
|
+
|
|
228
|
+
spherical.radius *= currentScale;
|
|
226
229
|
|
|
227
230
|
// restrict radius to be between desired limits
|
|
228
231
|
spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );
|
|
@@ -338,6 +341,7 @@ class OrbitControls extends EventDispatcher {
|
|
|
338
341
|
const sphericalDelta = new Spherical();
|
|
339
342
|
|
|
340
343
|
let scale = 1;
|
|
344
|
+
let currentScale = 1;
|
|
341
345
|
const panOffset = new Vector3();
|
|
342
346
|
let zoomChanged = false;
|
|
343
347
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export default /* glsl */`
|
|
2
2
|
#ifdef USE_MAP
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
#ifdef USE_MIPMAP_BIAS
|
|
5
|
+
vec4 sampledDiffuseColor = texture2D( map, vUv, mipmapBias );
|
|
6
|
+
#else
|
|
7
|
+
vec4 sampledDiffuseColor = texture2D( map, vUv, -0.5 );
|
|
8
|
+
#endif
|
|
5
9
|
|
|
6
10
|
#ifdef DECODE_VIDEO_TEXTURE
|
|
7
11
|
|