three-render-objects 1.36.0 → 1.37.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.
@@ -185,6 +185,10 @@ var threeRenderObjects = Kapsule({
185
185
  "default": 1,
186
186
  triggerUpdate: false
187
187
  },
188
+ pointsHoverPrecision: {
189
+ "default": 1,
190
+ triggerUpdate: false
191
+ },
188
192
  hoverOrderComparator: {
189
193
  "default": function _default() {
190
194
  return -1;
@@ -247,7 +251,7 @@ var threeRenderObjects = Kapsule({
247
251
  }
248
252
  if (topObject !== state.hoverObj) {
249
253
  state.onHover(topObject, state.hoverObj, state.intersection);
250
- state.tooltip.content(topObject ? accessorFn(state.tooltipContent)(topObject) || null : null);
254
+ state.tooltip.content(topObject ? accessorFn(state.tooltipContent)(topObject, state.intersection) || null : null);
251
255
  state.hoverObj = topObject;
252
256
  }
253
257
  }
@@ -390,6 +394,7 @@ var threeRenderObjects = Kapsule({
390
394
  var relCoords = new three.Vector2(x / state.width * 2 - 1, -(y / state.height) * 2 + 1);
391
395
  var raycaster = new three.Raycaster();
392
396
  raycaster.params.Line.threshold = state.lineHoverPrecision; // set linePrecision
397
+ raycaster.params.Points.threshold = state.pointsHoverPrecision; // set pointsPrecision
393
398
  raycaster.setFromCamera(relCoords, state.camera);
394
399
  return raycaster.intersectObjects(state.objects, true);
395
400
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-render-objects",
3
- "version": "1.36.0",
3
+ "version": "1.37.0",
4
4
  "description": "Easy way to render ThreeJS objects with built-in interaction defaults",
5
5
  "license": "MIT",
6
6
  "type": "module",