Skip to content

Commit 8ef8566

Browse files
V1.0.6 (#19)
* Update dependencies * Change version to 1.0.6 and rebuild
1 parent 9f26620 commit 8ef8566

File tree

4 files changed

+15
-23
lines changed

4 files changed

+15
-23
lines changed

Diff for: lib/index.cjs.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ var partialScope = {
5656
camera: undefined,
5757
enabled: true,
5858
target: new three.Vector3(),
59-
minDistance: 0,
60-
maxDistance: Infinity,
6159
minZoom: 0,
6260
maxZoom: Infinity,
6361
// How far you can orbit vertically, upper and lower limits.
@@ -320,7 +318,7 @@ function createControls() {
320318
internals.spherical.phi = Math.max(scope.minPolarAngle + EPSILON, Math.min(scope.maxPolarAngle - EPSILON, internals.spherical.phi));
321319
internals.spherical.radius *= internals.scale;
322320
// restrict radius to be between desired limits
323-
internals.spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, internals.spherical.radius));
321+
internals.spherical.radius = Math.max(scope.minZoom, Math.min(scope.maxZoom, internals.spherical.radius));
324322
// move target to panned location
325323
scope.target.addScaledVector(internals.panOffset, scope.dampingFactor);
326324
offset.setFromSpherical(internals.spherical);

Diff for: lib/index.d.ts

-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ declare const partialScope: {
77
camera: PerspectiveCamera | undefined
88
enabled: boolean
99
target: Vector3
10-
minDistance: number
11-
maxDistance: number
1210
minZoom: number
1311
maxZoom: number
1412
minPolarAngle: number
@@ -29,8 +27,6 @@ declare function createControls(): {
2927
camera: PerspectiveCamera | undefined
3028
enabled: boolean
3129
target: Vector3
32-
minDistance: number
33-
maxDistance: number
3430
minZoom: number
3531
maxZoom: number
3632
minPolarAngle: number

Diff for: lib/index.esm.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ var partialScope = {
5050
camera: undefined,
5151
enabled: true,
5252
target: new Vector3(),
53-
minDistance: 0,
54-
maxDistance: Infinity,
5553
minZoom: 0,
5654
maxZoom: Infinity,
5755
// How far you can orbit vertically, upper and lower limits.
@@ -314,7 +312,7 @@ function createControls() {
314312
internals.spherical.phi = Math.max(scope.minPolarAngle + EPSILON, Math.min(scope.maxPolarAngle - EPSILON, internals.spherical.phi));
315313
internals.spherical.radius *= internals.scale;
316314
// restrict radius to be between desired limits
317-
internals.spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, internals.spherical.radius));
315+
internals.spherical.radius = Math.max(scope.minZoom, Math.min(scope.maxZoom, internals.spherical.radius));
318316
// move target to panned location
319317
scope.target.addScaledVector(internals.panOffset, scope.dampingFactor);
320318
offset.setFromSpherical(internals.spherical);

Diff for: package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "r3f-native-orbitcontrols",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "OrbitControls for React Three Fiber in React Native",
55
"main": "lib/index.cjs.js",
66
"module": "lib/index.esm.js",
@@ -28,19 +28,19 @@
2828
"three": ">=0.139.0"
2929
},
3030
"devDependencies": {
31-
"@rollup/plugin-commonjs": "^21.1.0",
32-
"@rollup/plugin-node-resolve": "^13.2.1",
33-
"@types/react": "^18.0.24",
34-
"@types/react-native": "^0.70.6",
35-
"@types/three": "^0.144.0",
36-
"husky": "^8.0.1",
37-
"lint-staged": "^13.0.3",
38-
"prettier": "^2.7.1",
39-
"rollup": "^2.70.2",
31+
"@rollup/plugin-commonjs": "^24.1.0",
32+
"@rollup/plugin-node-resolve": "^15.0.2",
33+
"@types/react": "^18.0.35",
34+
"@types/react-native": "^0.71.5",
35+
"@types/three": "^0.150.1",
36+
"husky": "^8.0.3",
37+
"lint-staged": "^13.2.1",
38+
"prettier": "^2.8.7",
39+
"rollup": "^3.20.3",
4040
"rollup-plugin-delete": "^2.0.0",
41-
"rollup-plugin-dts": "^4.2.1",
42-
"rollup-plugin-typescript2": "^0.31.2",
43-
"typescript": "^4.8.4"
41+
"rollup-plugin-dts": "^5.3.0",
42+
"rollup-plugin-typescript2": "^0.34.1",
43+
"typescript": "^5.0.4"
4444
},
4545
"lint-staged": {
4646
"*.{ts,tsx,md}": "prettier --write --no-semi"

0 commit comments

Comments
 (0)