three-render-objects 1.40.1 → 1.40.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.
|
@@ -314,7 +314,7 @@ var threeRenderObjects = Kapsule({
|
|
|
314
314
|
}
|
|
315
315
|
function setLookAt(lookAt) {
|
|
316
316
|
var lookAtVect = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);
|
|
317
|
-
if (state.controls.target) {
|
|
317
|
+
if (state.controls.enabled && state.controls.target) {
|
|
318
318
|
state.controls.target = lookAtVect;
|
|
319
319
|
} else {
|
|
320
320
|
// Fly controls doesn't have target attribute
|
|
@@ -499,6 +499,8 @@ var threeRenderObjects = Kapsule({
|
|
|
499
499
|
|
|
500
500
|
// Handle click events on objs
|
|
501
501
|
state.container.addEventListener('pointerup', function (ev) {
|
|
502
|
+
if (!state.isPointerPressed) return; // don't trigger click events if pointer is not pressed on the canvas
|
|
503
|
+
|
|
502
504
|
state.isPointerPressed = false;
|
|
503
505
|
if (state.isPointerDragging) {
|
|
504
506
|
state.isPointerDragging = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-render-objects",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.3",
|
|
4
4
|
"description": "Easy way to render ThreeJS objects with built-in interaction defaults",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -56,19 +56,19 @@
|
|
|
56
56
|
"three": ">=0.168"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "^7.
|
|
60
|
-
"@babel/preset-env": "^7.
|
|
59
|
+
"@babel/core": "^7.28.0",
|
|
60
|
+
"@babel/preset-env": "^7.28.0",
|
|
61
61
|
"@rollup/plugin-babel": "^6.0.4",
|
|
62
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
62
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
63
63
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
64
64
|
"@rollup/plugin-terser": "^0.4.4",
|
|
65
|
-
"@types/react": "^19.1.
|
|
66
|
-
"postcss": "^8.5.
|
|
65
|
+
"@types/react": "^19.1.8",
|
|
66
|
+
"postcss": "^8.5.6",
|
|
67
67
|
"rimraf": "^6.0.1",
|
|
68
|
-
"rollup": "^4.
|
|
68
|
+
"rollup": "^4.44.1",
|
|
69
69
|
"rollup-plugin-dts": "^6.2.1",
|
|
70
70
|
"rollup-plugin-postcss": "^4.0.2",
|
|
71
|
-
"three": "^0.
|
|
71
|
+
"three": "^0.178.0",
|
|
72
72
|
"typescript": "^5.8.3"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|