three-render-objects 1.40.0 → 1.40.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.
|
@@ -229,7 +229,7 @@ var threeRenderObjects = Kapsule({
|
|
|
229
229
|
methods: {
|
|
230
230
|
tick: function tick(state) {
|
|
231
231
|
if (state.initialised) {
|
|
232
|
-
state.controls.update && state.controls.update(Math.min(1, state.clock.getDelta())); // timedelta is required for fly controls
|
|
232
|
+
state.controls.enabled && state.controls.update && state.controls.update(Math.min(1, state.clock.getDelta())); // timedelta is required for fly controls
|
|
233
233
|
|
|
234
234
|
state.postProcessingComposer ? state.postProcessingComposer.render() // if using postprocessing, switch the output to it
|
|
235
235
|
: state.renderer.render(state.scene, state.camera);
|
|
@@ -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.2",
|
|
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.27.1",
|
|
60
|
+
"@babel/preset-env": "^7.27.2",
|
|
61
61
|
"@rollup/plugin-babel": "^6.0.4",
|
|
62
62
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
63
63
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
64
64
|
"@rollup/plugin-terser": "^0.4.4",
|
|
65
|
-
"@types/react": "^19.1.
|
|
65
|
+
"@types/react": "^19.1.4",
|
|
66
66
|
"postcss": "^8.5.3",
|
|
67
67
|
"rimraf": "^6.0.1",
|
|
68
|
-
"rollup": "^4.
|
|
68
|
+
"rollup": "^4.40.2",
|
|
69
69
|
"rollup-plugin-dts": "^6.2.1",
|
|
70
70
|
"rollup-plugin-postcss": "^4.0.2",
|
|
71
|
-
"three": "^0.
|
|
71
|
+
"three": "^0.176.0",
|
|
72
72
|
"typescript": "^5.8.3"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|