three-render-objects 1.35.0 → 1.36.0
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.
|
@@ -243,10 +243,10 @@ var threeRenderObjects = Kapsule({
|
|
|
243
243
|
});
|
|
244
244
|
var topIntersect = intersects.length ? intersects[0] : null;
|
|
245
245
|
topObject = topIntersect ? topIntersect.object : null;
|
|
246
|
-
state.
|
|
246
|
+
state.intersection = topIntersect || null;
|
|
247
247
|
}
|
|
248
248
|
if (topObject !== state.hoverObj) {
|
|
249
|
-
state.onHover(topObject, state.hoverObj);
|
|
249
|
+
state.onHover(topObject, state.hoverObj, state.intersection);
|
|
250
250
|
state.tooltip.content(topObject ? accessorFn(state.tooltipContent)(topObject) || null : null);
|
|
251
251
|
state.hoverObj = topObject;
|
|
252
252
|
}
|
|
@@ -499,11 +499,11 @@ var threeRenderObjects = Kapsule({
|
|
|
499
499
|
// trigger click events asynchronously, to allow hoverObj to be set (on frame)
|
|
500
500
|
if (ev.button === 0) {
|
|
501
501
|
// left-click
|
|
502
|
-
state.onClick(state.hoverObj || null, ev, state.
|
|
502
|
+
state.onClick(state.hoverObj || null, ev, state.intersection); // trigger background clicks with null
|
|
503
503
|
}
|
|
504
504
|
if (ev.button === 2 && state.onRightClick) {
|
|
505
505
|
// right-click
|
|
506
|
-
state.onRightClick(state.hoverObj || null, ev, state.
|
|
506
|
+
state.onRightClick(state.hoverObj || null, ev, state.intersection);
|
|
507
507
|
}
|
|
508
508
|
});
|
|
509
509
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-render-objects",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"description": "Easy way to render ThreeJS objects with built-in interaction defaults",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@tweenjs/tween.js": "18 - 25",
|
|
49
49
|
"accessor-fn": "1",
|
|
50
|
-
"float-tooltip": "^1.
|
|
50
|
+
"float-tooltip": "^1.7",
|
|
51
51
|
"kapsule": "^1.16",
|
|
52
52
|
"polished": "4"
|
|
53
53
|
},
|