three-render-objects 1.40.3 → 1.40.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.
|
@@ -289,10 +289,14 @@ var threeRenderObjects = Kapsule({
|
|
|
289
289
|
} else {
|
|
290
290
|
var camPos = Object.assign({}, camera.position);
|
|
291
291
|
var camLookAt = getLookAt();
|
|
292
|
-
state.tweenGroup.add(new Tween(camPos).to(finalPos, transitionDuration).easing(Easing.Quadratic.Out).onUpdate(setCameraPos).
|
|
292
|
+
state.tweenGroup.add(new Tween(camPos).to(finalPos, transitionDuration).easing(Easing.Quadratic.Out).onUpdate(setCameraPos).onComplete(function () {
|
|
293
|
+
state.tweenGroup.remove(this);
|
|
294
|
+
}).start());
|
|
293
295
|
|
|
294
296
|
// Face direction in 1/3rd of time
|
|
295
|
-
state.tweenGroup.add(new Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(Easing.Quadratic.Out).onUpdate(setLookAt).
|
|
297
|
+
state.tweenGroup.add(new Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(Easing.Quadratic.Out).onUpdate(setLookAt).onComplete(function () {
|
|
298
|
+
state.tweenGroup.remove(this);
|
|
299
|
+
}).start());
|
|
296
300
|
}
|
|
297
301
|
return this;
|
|
298
302
|
}
|
|
@@ -473,9 +477,9 @@ var threeRenderObjects = Kapsule({
|
|
|
473
477
|
|
|
474
478
|
// detect point drag
|
|
475
479
|
!state.isPointerDragging && ev.type === 'pointermove' && (ev.pressure > 0 || state.isPointerPressed) // ev.pressure always 0 on Safari, so we used the isPointerPressed tracker
|
|
476
|
-
&& (ev.pointerType
|
|
480
|
+
&& (ev.pointerType === 'mouse' || ev.movementX === undefined || [ev.movementX, ev.movementY].some(function (m) {
|
|
477
481
|
return Math.abs(m) > 1;
|
|
478
|
-
})) // relax drag trigger sensitivity on touch events
|
|
482
|
+
})) // relax drag trigger sensitivity on non-mouse (touch/pen) events
|
|
479
483
|
&& (state.isPointerDragging = true);
|
|
480
484
|
if (state.enablePointerInteraction) {
|
|
481
485
|
// update the pointer pos
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-render-objects",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.5",
|
|
4
4
|
"description": "Easy way to render ThreeJS objects with built-in interaction defaults",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -56,20 +56,20 @@
|
|
|
56
56
|
"three": ">=0.168"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "^7.
|
|
60
|
-
"@babel/preset-env": "^7.
|
|
61
|
-
"@rollup/plugin-babel": "^
|
|
62
|
-
"@rollup/plugin-commonjs": "^
|
|
63
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
64
|
-
"@rollup/plugin-terser": "^0.
|
|
65
|
-
"@types/react": "^19.
|
|
66
|
-
"postcss": "^8.5.
|
|
67
|
-
"rimraf": "^6.
|
|
68
|
-
"rollup": "^4.
|
|
69
|
-
"rollup-plugin-dts": "^6.
|
|
59
|
+
"@babel/core": "^7.29.0",
|
|
60
|
+
"@babel/preset-env": "^7.29.0",
|
|
61
|
+
"@rollup/plugin-babel": "^7.0.0",
|
|
62
|
+
"@rollup/plugin-commonjs": "^29.0.2",
|
|
63
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
64
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
65
|
+
"@types/react": "^19.2.14",
|
|
66
|
+
"postcss": "^8.5.8",
|
|
67
|
+
"rimraf": "^6.1.3",
|
|
68
|
+
"rollup": "^4.59.0",
|
|
69
|
+
"rollup-plugin-dts": "^6.4.0",
|
|
70
70
|
"rollup-plugin-postcss": "^4.0.2",
|
|
71
71
|
"three": "^0.178.0",
|
|
72
|
-
"typescript": "^5.
|
|
72
|
+
"typescript": "^5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=12"
|