three-render-objects 1.34.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.intersectionPoint = topIntersect ? topIntersect.point : null;
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.intersectionPoint); // trigger background clicks with null
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.intersectionPoint);
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.34.0",
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.5",
50
+ "float-tooltip": "^1.7",
51
51
  "kapsule": "^1.16",
52
52
  "polished": "4"
53
53
  },
@@ -61,7 +61,8 @@
61
61
  "@rollup/plugin-commonjs": "^28.0.2",
62
62
  "@rollup/plugin-node-resolve": "^16.0.0",
63
63
  "@rollup/plugin-terser": "^0.4.4",
64
- "postcss": "^8.4.49",
64
+ "@types/react": "^19.0.7",
65
+ "postcss": "^8.5.1",
65
66
  "rimraf": "^6.0.1",
66
67
  "rollup": "^4.30.1",
67
68
  "rollup-plugin-dts": "^6.1.1",