globe.gl 2.38.1 → 2.39.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.
package/README.md CHANGED
@@ -86,6 +86,7 @@ const myGlobe = new Globe(myDOMElement)
86
86
  * [Hex Bin Layer](#hex-bin-layer)
87
87
  * [Hexed Polygons Layer](#hexed-polygons-layer)
88
88
  * [Tiles Layer](#tiles-layer)
89
+ * [Particles Layer](#particles-layer)
89
90
  * [Rings Layer](#rings-layer)
90
91
  * [Labels Layer](#labels-layer)
91
92
  * [HTML Elements Layer](#html-elements-layer)
@@ -326,6 +327,28 @@ new Globe(<domElement>, { configOptions })
326
327
  | <b>onTileRightClick</b>(<i>fn</i>) | Callback function for tile right-clicks. The tile object, the event object and the clicked coordinates are included as arguments: `onTileRightClick(tile, event, { lat, lng, altitude })`. | - |
327
328
  | <b>onTileHover</b>(<i>fn</i>) | Callback function for tile mouse over events. The tile object (or `null` if there's no tile under the mouse line of sight) is included as the first argument, and the previous tile object (or `null`) as second argument: `onTileHover(tile, prevTile)`. | - |
328
329
 
330
+ ### Particles Layer
331
+
332
+ <p align="center">
333
+ <a href="//vasturiano.github.io/globe.gl/example/satellites/"><img width="70%" src="https://vasturiano.github.io/globe.gl/example/satellites/preview.png"></a>
334
+ </p>
335
+
336
+ | Method | Description | Default |
337
+ | --- | --- | :--: |
338
+ | <b>particlesData</b>([<i>array</i>]) | Getter/setter for the list of particle sets to represent in the particles map layer. Each particle set is displayed as a group of [Points](https://threejs.org/docs/#api/en/objects/Points). Each point in the group is a geometry vertex and can be individually positioned anywhere relative to the globe. | `[]` |
339
+ | <b>particlesList</b>([<i>str</i> or <i>fn</i>]) | Particle set accessor function or attribute for the list of particles in the set. By default, the data structure is expected to be an array of arrays of individual particle objects. | `d => d` |
340
+ | <b>particleLabel</b>([<i>str</i> or <i>fn</i>]) | Particle object accessor function or attribute for label (shown as tooltip). Supports plain text, HTML string content or an [HTML element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement). | `name` |
341
+ | <b>particleLat</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Particle object accessor function, attribute or a numeric constant for the latitude coordinate. | `lat` |
342
+ | <b>particleLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Particle object accessor function, attribute or a numeric constant for the longitude coordinate. | `lng` |
343
+ | <b>particleAltitude</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Particle object accessor function, attribute or a numeric constant for the altitude in terms of globe radius units. | 0.01 |
344
+ | <b>particlesSize</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Particle set accessor function, attribute or a numeric constant for the size of all the particles in the group. | `0.5` |
345
+ | <b>particlesSizeAttenuation</b>([<i>boolean</i>, <i>str</i> or <i>fn</i>]) | Particle set accessor function, attribute or a boolean constant for whether the size of each particle on the screen should be attenuated according to the distance to the camera. | `true` |
346
+ | <b>particlesColor</b>([<i>str</i> or <i>fn</i>]) | Particle set accessor function or attribute for the color of all the particles in the group. This setting will be ignored if `particlesTexture` is defined. | `white` |
347
+ | <b>particlesTexture</b>([<i>str</i> or <i>fn</i>]) | Particle set accessor function or attribute for the [Texture](https://threejs.org/docs/#api/en/textures/Texture) to be applied to all the particles in the group. | - |
348
+ | <b>onParticleClick</b>(<i>fn</i>) | Callback function for particle (left-button) clicks. The particle object, the event object and the clicked coordinates are included as arguments: `onParticleClick(particle, event, { lat, lng, altitude })`. | - |
349
+ | <b>onParticleRightClick</b>(<i>fn</i>) | Callback function for particle right-clicks. The particle object, the event object and the clicked coordinates are included as arguments: `onParticleRightClick(particle, event, { lat, lng, altitude })`. | - |
350
+ | <b>onParticleHover</b>(<i>fn</i>) | Callback function for particle mouse over events. The particle object (or `null` if there's no particle under the mouse line of sight) is included as the first argument, and the previous particle object (or `null`) as second argument: `onParticleHover(particle, prevParticle)`. | - |
351
+
329
352
  ### Rings Layer
330
353
 
331
354
  <p align="center">
@@ -388,10 +411,6 @@ new Globe(<domElement>, { configOptions })
388
411
 
389
412
  ### 3D Objects Layer
390
413
 
391
- <p align="center">
392
- <a href="//vasturiano.github.io/globe.gl/example/satellites/"><img width="70%" src="https://vasturiano.github.io/globe.gl/example/satellites/preview.png"></a>
393
- </p>
394
-
395
414
  | Method | Description | Default |
396
415
  | --- | --- | :--: |
397
416
  | <b>objectsData</b>([<i>array</i>]) | Getter/setter for the list of custom 3D objects to represent in the objects layer. Each object is rendered according to the `objectThreeObject` method. | `[]` |
@@ -431,7 +450,7 @@ new Globe(<domElement>, { configOptions })
431
450
  | <b>resumeAnimation</b>() | Resumes the rendering cycle of the component, and re-enables the user interaction. This method can be used together with `pauseAnimation` for performance optimization purposes. | |
432
451
  | <b>enablePointerInteraction</b>([<i>boolean</i>]) | Getter/setter for whether to enable the mouse tracking events. This activates an internal tracker of the canvas mouse position and enables the functionality of object hover/click and tooltip labels, at the cost of performance. If you're looking for maximum gain in your globe performance it's recommended to switch off this property. | `true` |
433
452
  | <b>pointerEventsFilter</b>([<i>fn</i>]) | Getter/setter for the filter function which defines whether a particular object can be the target of pointer interactions. In general, objects that are closer to the camera get precedence in capturing pointer events. This function allows having ignored object layers so that pointer events can be passed through to deeper objects in the various globe layers. The ThreeJS object and its associated data (if any) are passed as arguments: `pointerEventsFilter(obj, data)`. The function should return a boolean value. | `() => true` |
434
- | <b>lineHoverPrecision</b>([<i>num</i>]) | Getter/setter for the precision to use when detecting hover events over [Line](https://threejs.org/docs/#api/objects/Line) objects, such as arcs and paths. | 0.2 |
453
+ | <b>lineHoverPrecision</b>([<i>num</i>]) | Getter/setter for the precision to use when detecting hover events over [Line](https://threejs.org/docs/#api/objects/Line) and [Points](https://threejs.org/docs/#api/objects/Points) objects, such as arcs, paths or particles. | 0.2 |
435
454
  | <b>onZoom</b>(<i>fn</i>) | Callback function for point-of-view changes by zooming or rotating the globe using the orbit controls. The current point of view (with the syntax `{ lat, lng, altitude }`) is included as sole argument. | |
436
455
  | <b>lights</b>([<i>array</i>]) | Getter/setter for the list of lights to use in the scene. Each item should be an instance of [Light](https://threejs.org/docs/#api/en/lights/Light). | [AmbientLight](https://threejs.org/docs/?q=ambient#api/en/lights/AmbientLight) + [DirectionalLight](https://threejs.org/docs/#api/en/lights/DirectionalLight) (from above) |
437
456
  | <b>scene</b>() | Access the internal ThreeJS [Scene](https://threejs.org/docs/#api/scenes/Scene). Can be used to extend the current scene with additional objects not related to globe.gl. | |
@@ -58,6 +58,8 @@ interface GlobeGenericInstance<ChainableInstance>
58
58
  hexLabel(textAccessor: Accessor<HexBin, Label>): ChainableInstance;
59
59
  tileLabel(): ObjAccessor<Label>;
60
60
  tileLabel(textAccessor: ObjAccessor<Label>): ChainableInstance;
61
+ particleLabel(): ObjAccessor<Label>;
62
+ particleLabel(textAccessor: ObjAccessor<Label>): ChainableInstance;
61
63
  labelLabel(): ObjAccessor<Label>;
62
64
  labelLabel(textAccessor: ObjAccessor<Label>): ChainableInstance;
63
65
  objectLabel(): ObjAccessor<Label>;
@@ -91,6 +93,9 @@ interface GlobeGenericInstance<ChainableInstance>
91
93
  onHexPolygonHover(callback: (polygon: object | null, prevPolygon: object | null) => void): ChainableInstance;
92
94
  onTileClick(callback: (tile: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
93
95
  onTileRightClick(callback: (tile: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
96
+ onParticleHover(callback: (particle: object | null, prevParticle: object | null) => void): ChainableInstance;
97
+ onParticleClick(callback: (particle: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
98
+ onParticleRightClick(callback: (particle: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
94
99
  onTileHover(callback: (tile: object | null, prevTile: object | null) => void): ChainableInstance;
95
100
  onLabelClick(callback: (label: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
96
101
  onLabelRightClick(callback: (label: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
package/dist/globe.gl.js CHANGED
@@ -1,4 +1,4 @@
1
- // Version 2.38.1 globe.gl - https://github.com/vasturiano/globe.gl
1
+ // Version 2.39.0 globe.gl - https://github.com/vasturiano/globe.gl
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -134267,6 +134267,10 @@ var<${access}> ${name} : ${structName};`;
134267
134267
  "default": 1,
134268
134268
  triggerUpdate: false
134269
134269
  },
134270
+ pointsHoverPrecision: {
134271
+ "default": 1,
134272
+ triggerUpdate: false
134273
+ },
134270
134274
  hoverOrderComparator: {
134271
134275
  "default": function _default() {
134272
134276
  return -1;
@@ -134325,11 +134329,11 @@ var<${access}> ${name} : ${structName};`;
134325
134329
  });
134326
134330
  var topIntersect = intersects.length ? intersects[0] : null;
134327
134331
  topObject = topIntersect ? topIntersect.object : null;
134328
- state.intersectionPoint = topIntersect ? topIntersect.point : null;
134332
+ state.intersection = topIntersect || null;
134329
134333
  }
134330
134334
  if (topObject !== state.hoverObj) {
134331
- state.onHover(topObject, state.hoverObj);
134332
- state.tooltip.content(topObject ? index$2(state.tooltipContent)(topObject) || null : null);
134335
+ state.onHover(topObject, state.hoverObj, state.intersection);
134336
+ state.tooltip.content(topObject ? index$2(state.tooltipContent)(topObject, state.intersection) || null : null);
134333
134337
  state.hoverObj = topObject;
134334
134338
  }
134335
134339
  }
@@ -134472,6 +134476,7 @@ var<${access}> ${name} : ${structName};`;
134472
134476
  var relCoords = new three.Vector2(x / state.width * 2 - 1, -(y / state.height) * 2 + 1);
134473
134477
  var raycaster = new three.Raycaster();
134474
134478
  raycaster.params.Line.threshold = state.lineHoverPrecision; // set linePrecision
134479
+ raycaster.params.Points.threshold = state.pointsHoverPrecision; // set pointsPrecision
134475
134480
  raycaster.setFromCamera(relCoords, state.camera);
134476
134481
  return raycaster.intersectObjects(state.objects, true);
134477
134482
  },
@@ -134581,11 +134586,11 @@ var<${access}> ${name} : ${structName};`;
134581
134586
  // trigger click events asynchronously, to allow hoverObj to be set (on frame)
134582
134587
  if (ev.button === 0) {
134583
134588
  // left-click
134584
- state.onClick(state.hoverObj || null, ev, state.intersectionPoint); // trigger background clicks with null
134589
+ state.onClick(state.hoverObj || null, ev, state.intersection); // trigger background clicks with null
134585
134590
  }
134586
134591
  if (ev.button === 2 && state.onRightClick) {
134587
134592
  // right-click
134588
- state.onRightClick(state.hoverObj || null, ev, state.intersectionPoint);
134593
+ state.onRightClick(state.hoverObj || null, ev, state.intersection);
134589
134594
  }
134590
134595
  });
134591
134596
  }, {
@@ -134771,7 +134776,7 @@ var<${access}> ${name} : ${structName};`;
134771
134776
 
134772
134777
  // Expose config from ThreeGlobe
134773
134778
  var bindGlobe = linkKapsule('globe', threeGlobe);
134774
- var linkedGlobeProps = Object.assign.apply(Object, _toConsumableArray$7(['globeImageUrl', 'bumpImageUrl', 'globeTileEngineUrl', 'globeTileEngineMaxLevel', 'showGlobe', 'showGraticules', 'showAtmosphere', 'atmosphereColor', 'atmosphereAltitude', 'onGlobeReady', 'pointsData', 'pointLat', 'pointLng', 'pointColor', 'pointAltitude', 'pointRadius', 'pointResolution', 'pointsMerge', 'pointsTransitionDuration', 'arcsData', 'arcStartLat', 'arcStartLng', 'arcEndLat', 'arcEndLng', 'arcColor', 'arcAltitude', 'arcAltitudeAutoScale', 'arcStroke', 'arcCurveResolution', 'arcCircularResolution', 'arcDashLength', 'arcDashGap', 'arcDashInitialGap', 'arcDashAnimateTime', 'arcsTransitionDuration', 'polygonsData', 'polygonGeoJsonGeometry', 'polygonCapColor', 'polygonCapMaterial', 'polygonSideColor', 'polygonSideMaterial', 'polygonStrokeColor', 'polygonAltitude', 'polygonCapCurvatureResolution', 'polygonsTransitionDuration', 'pathsData', 'pathPoints', 'pathPointLat', 'pathPointLng', 'pathPointAlt', 'pathResolution', 'pathColor', 'pathStroke', 'pathDashLength', 'pathDashGap', 'pathDashInitialGap', 'pathDashAnimateTime', 'pathTransitionDuration', 'heatmapsData', 'heatmapPoints', 'heatmapPointLat', 'heatmapPointLng', 'heatmapPointWeight', 'heatmapBandwidth', 'heatmapColorFn', 'heatmapColorSaturation', 'heatmapBaseAltitude', 'heatmapTopAltitude', 'heatmapsTransitionDuration', 'hexBinPointsData', 'hexBinPointLat', 'hexBinPointLng', 'hexBinPointWeight', 'hexBinResolution', 'hexMargin', 'hexTopCurvatureResolution', 'hexTopColor', 'hexSideColor', 'hexAltitude', 'hexBinMerge', 'hexTransitionDuration', 'hexPolygonsData', 'hexPolygonGeoJsonGeometry', 'hexPolygonColor', 'hexPolygonAltitude', 'hexPolygonResolution', 'hexPolygonMargin', 'hexPolygonUseDots', 'hexPolygonCurvatureResolution', 'hexPolygonDotResolution', 'hexPolygonsTransitionDuration', 'tilesData', 'tileLat', 'tileLng', 'tileAltitude', 'tileWidth', 'tileHeight', 'tileUseGlobeProjection', 'tileMaterial', 'tileCurvatureResolution', 'tilesTransitionDuration', 'ringsData', 'ringLat', 'ringLng', 'ringAltitude', 'ringColor', 'ringResolution', 'ringMaxRadius', 'ringPropagationSpeed', 'ringRepeatPeriod', 'labelsData', 'labelLat', 'labelLng', 'labelAltitude', 'labelRotation', 'labelText', 'labelSize', 'labelTypeFace', 'labelColor', 'labelResolution', 'labelIncludeDot', 'labelDotRadius', 'labelDotOrientation', 'labelsTransitionDuration', 'htmlElementsData', 'htmlLat', 'htmlLng', 'htmlAltitude', 'htmlElement', 'htmlTransitionDuration', 'objectsData', 'objectLat', 'objectLng', 'objectAltitude', 'objectRotation', 'objectFacesSurface', 'objectThreeObject', 'customLayerData', 'customThreeObject', 'customThreeObjectUpdate'].map(function (p) {
134779
+ var linkedGlobeProps = Object.assign.apply(Object, _toConsumableArray$7(['globeImageUrl', 'bumpImageUrl', 'globeTileEngineUrl', 'globeTileEngineMaxLevel', 'showGlobe', 'showGraticules', 'showAtmosphere', 'atmosphereColor', 'atmosphereAltitude', 'onGlobeReady', 'pointsData', 'pointLat', 'pointLng', 'pointColor', 'pointAltitude', 'pointRadius', 'pointResolution', 'pointsMerge', 'pointsTransitionDuration', 'arcsData', 'arcStartLat', 'arcStartLng', 'arcEndLat', 'arcEndLng', 'arcColor', 'arcAltitude', 'arcAltitudeAutoScale', 'arcStroke', 'arcCurveResolution', 'arcCircularResolution', 'arcDashLength', 'arcDashGap', 'arcDashInitialGap', 'arcDashAnimateTime', 'arcsTransitionDuration', 'polygonsData', 'polygonGeoJsonGeometry', 'polygonCapColor', 'polygonCapMaterial', 'polygonSideColor', 'polygonSideMaterial', 'polygonStrokeColor', 'polygonAltitude', 'polygonCapCurvatureResolution', 'polygonsTransitionDuration', 'pathsData', 'pathPoints', 'pathPointLat', 'pathPointLng', 'pathPointAlt', 'pathResolution', 'pathColor', 'pathStroke', 'pathDashLength', 'pathDashGap', 'pathDashInitialGap', 'pathDashAnimateTime', 'pathTransitionDuration', 'heatmapsData', 'heatmapPoints', 'heatmapPointLat', 'heatmapPointLng', 'heatmapPointWeight', 'heatmapBandwidth', 'heatmapColorFn', 'heatmapColorSaturation', 'heatmapBaseAltitude', 'heatmapTopAltitude', 'heatmapsTransitionDuration', 'hexBinPointsData', 'hexBinPointLat', 'hexBinPointLng', 'hexBinPointWeight', 'hexBinResolution', 'hexMargin', 'hexTopCurvatureResolution', 'hexTopColor', 'hexSideColor', 'hexAltitude', 'hexBinMerge', 'hexTransitionDuration', 'hexPolygonsData', 'hexPolygonGeoJsonGeometry', 'hexPolygonColor', 'hexPolygonAltitude', 'hexPolygonResolution', 'hexPolygonMargin', 'hexPolygonUseDots', 'hexPolygonCurvatureResolution', 'hexPolygonDotResolution', 'hexPolygonsTransitionDuration', 'tilesData', 'tileLat', 'tileLng', 'tileAltitude', 'tileWidth', 'tileHeight', 'tileUseGlobeProjection', 'tileMaterial', 'tileCurvatureResolution', 'tilesTransitionDuration', 'particlesData', 'particlesList', 'particleLat', 'particleLng', 'particleAltitude', 'particlesSize', 'particlesSizeAttenuation', 'particlesColor', 'particlesTexture', 'ringsData', 'ringLat', 'ringLng', 'ringAltitude', 'ringColor', 'ringResolution', 'ringMaxRadius', 'ringPropagationSpeed', 'ringRepeatPeriod', 'labelsData', 'labelLat', 'labelLng', 'labelAltitude', 'labelRotation', 'labelText', 'labelSize', 'labelTypeFace', 'labelColor', 'labelResolution', 'labelIncludeDot', 'labelDotRadius', 'labelDotOrientation', 'labelsTransitionDuration', 'htmlElementsData', 'htmlLat', 'htmlLng', 'htmlAltitude', 'htmlElement', 'htmlTransitionDuration', 'objectsData', 'objectLat', 'objectLng', 'objectAltitude', 'objectRotation', 'objectFacesSurface', 'objectThreeObject', 'customLayerData', 'customThreeObject', 'customThreeObjectUpdate'].map(function (p) {
134775
134780
  return _defineProperty$4({}, p, bindGlobe.linkProp(p));
134776
134781
  })));
134777
134782
  var linkedGlobeMethods = Object.assign.apply(Object, _toConsumableArray$7(['globeMaterial', 'getGlobeRadius', 'getCoords', 'toGeoCoords'].map(function (p) {
@@ -134898,6 +134903,19 @@ var<${access}> ${name} : ${structName};`;
134898
134903
  onTileHover: {
134899
134904
  triggerUpdate: false
134900
134905
  },
134906
+ particleLabel: {
134907
+ "default": 'name',
134908
+ triggerUpdate: false
134909
+ },
134910
+ onParticleClick: {
134911
+ triggerUpdate: false
134912
+ },
134913
+ onParticleRightClick: {
134914
+ triggerUpdate: false
134915
+ },
134916
+ onParticleHover: {
134917
+ triggerUpdate: false
134918
+ },
134901
134919
  labelLabel: {
134902
134920
  triggerUpdate: false
134903
134921
  },
@@ -134951,7 +134969,8 @@ var<${access}> ${name} : ${structName};`;
134951
134969
  "default": 0.2,
134952
134970
  triggerUpdate: false,
134953
134971
  onChange: function onChange(val, state) {
134954
- return state.renderObjs.lineHoverPrecision(val);
134972
+ state.renderObjs.lineHoverPrecision(val);
134973
+ state.renderObjs.pointsHoverPrecision(val);
134955
134974
  }
134956
134975
  }
134957
134976
  }, linkedGlobeProps), linkedRenderObjsProps),
@@ -135068,6 +135087,7 @@ var<${access}> ${name} : ${structName};`;
135068
135087
  this.hexBinPointsData([]);
135069
135088
  this.hexPolygonsData([]);
135070
135089
  this.tilesData([]);
135090
+ this.particlesData([]);
135071
135091
  this.labelsData([]);
135072
135092
  this.htmlElementsData([]);
135073
135093
  this.objectsData([]);
@@ -135175,6 +135195,9 @@ var<${access}> ${name} : ${structName};`;
135175
135195
  tile: function tile(d) {
135176
135196
  return d;
135177
135197
  },
135198
+ particles: function particles(d, intersection) {
135199
+ return !intersection || !intersection.hasOwnProperty('index') || d.length <= intersection.index ? d : d[intersection.index];
135200
+ },
135178
135201
  label: function label(d) {
135179
135202
  return d;
135180
135203
  },
@@ -135195,7 +135218,7 @@ var<${access}> ${name} : ${structName};`;
135195
135218
  return !o;
135196
135219
  }; // || o.__globeObjType === 'globe' || o.__globeObjType === 'atmosphere';
135197
135220
  return isBackground(aObj) - isBackground(bObj);
135198
- }).tooltipContent(function (obj) {
135221
+ }).tooltipContent(function (obj, intersection) {
135199
135222
  var objAccessors = {
135200
135223
  point: state.pointLabel,
135201
135224
  arc: state.arcLabel,
@@ -135204,14 +135227,15 @@ var<${access}> ${name} : ${structName};`;
135204
135227
  hexbin: state.hexLabel,
135205
135228
  hexPolygon: state.hexPolygonLabel,
135206
135229
  tile: state.tileLabel,
135230
+ particles: state.particleLabel,
135207
135231
  label: state.labelLabel,
135208
135232
  object: state.objectLabel,
135209
135233
  custom: state.customLayerLabel
135210
135234
  };
135211
135235
  var globeObj = getGlobeObj(obj);
135212
135236
  var objType = globeObj && globeObj.__globeObjType;
135213
- return globeObj && objType && objAccessors.hasOwnProperty(objType) && dataAccessors.hasOwnProperty(objType) ? index$2(objAccessors[objType])(dataAccessors[objType](globeObj.__data)) || '' : '';
135214
- }).onHover(function (obj) {
135237
+ return globeObj && objType && objAccessors.hasOwnProperty(objType) && dataAccessors.hasOwnProperty(objType) ? index$2(objAccessors[objType])(dataAccessors[objType](globeObj.__data, intersection)) || '' : '';
135238
+ }).onHover(function (obj, _, intersection) {
135215
135239
  // Update tooltip and trigger onHover events
135216
135240
  var hoverObjFns = {
135217
135241
  point: state.onPointHover,
@@ -135222,6 +135246,7 @@ var<${access}> ${name} : ${structName};`;
135222
135246
  hexbin: state.onHexHover,
135223
135247
  hexPolygon: state.onHexPolygonHover,
135224
135248
  tile: state.onTileHover,
135249
+ particles: state.onParticleHover,
135225
135250
  label: state.onLabelHover,
135226
135251
  object: state.onObjectHover,
135227
135252
  custom: state.onCustomLayerHover
@@ -135236,6 +135261,7 @@ var<${access}> ${name} : ${structName};`;
135236
135261
  hexbin: state.onHexClick,
135237
135262
  hexPolygon: state.onHexPolygonClick,
135238
135263
  tile: state.onTileClick,
135264
+ particles: state.onParticleClick,
135239
135265
  label: state.onLabelClick,
135240
135266
  object: state.onObjectClick,
135241
135267
  custom: state.onCustomLayerClick
@@ -135246,12 +135272,12 @@ var<${access}> ${name} : ${structName};`;
135246
135272
  hoverObj && !hoverObjFns.hasOwnProperty(hoverObj.__globeObjType) && (hoverObj = null);
135247
135273
  if (hoverObj !== state.hoverObj) {
135248
135274
  var prevObjType = state.hoverObj ? state.hoverObj.__globeObjType : null;
135249
- var prevObjData = state.hoverObj ? dataAccessors[prevObjType](state.hoverObj.__data) : null;
135275
+ var prevObjData = state.hoverData;
135250
135276
  var objType = hoverObj ? hoverObj.__globeObjType : null;
135251
- var objData = hoverObj ? dataAccessors[objType](hoverObj.__data) : null;
135277
+ var objData = hoverObj ? dataAccessors[objType](hoverObj.__data, intersection) : null;
135252
135278
  if (prevObjType && prevObjType !== objType) {
135253
135279
  // Hover out
135254
- hoverObjFns[prevObjType] && hoverObjFns[prevObjType](null, prevObjData);
135280
+ hoverObjFns[prevObjType] && hoverObjFns[prevObjType](null, prevObjData || null);
135255
135281
  }
135256
135282
  if (objType) {
135257
135283
  // Hover in
@@ -135261,6 +135287,7 @@ var<${access}> ${name} : ${structName};`;
135261
135287
  // set pointer if hovered object is clickable
135262
135288
  state.renderObjs.renderer().domElement.classList[objType && clickObjFns[objType] ? 'add' : 'remove']('clickable');
135263
135289
  state.hoverObj = hoverObj;
135290
+ state.hoverData = objData;
135264
135291
  }
135265
135292
  }).onClick(function (obj, ev, intersection) {
135266
135293
  if (!obj) return; // ignore background clicks
@@ -135276,6 +135303,7 @@ var<${access}> ${name} : ${structName};`;
135276
135303
  hexbin: state.onHexClick,
135277
135304
  hexPolygon: state.onHexPolygonClick,
135278
135305
  tile: state.onTileClick,
135306
+ particles: state.onParticleClick,
135279
135307
  label: state.onLabelClick,
135280
135308
  object: state.onObjectClick,
135281
135309
  custom: state.onCustomLayerClick
@@ -135298,7 +135326,7 @@ var<${access}> ${name} : ${structName};`;
135298
135326
  } else {
135299
135327
  args.push(_this.toGeoCoords(point));
135300
135328
  }
135301
- dataAccessors.hasOwnProperty(objType) && args.unshift(dataAccessors[objType](globeObj.__data));
135329
+ dataAccessors.hasOwnProperty(objType) && args.unshift(dataAccessors[objType](globeObj.__data, intersection));
135302
135330
  objFns[objType].apply(objFns, args);
135303
135331
  }
135304
135332
  }).onRightClick(function (obj, ev, intersection) {
@@ -135315,6 +135343,7 @@ var<${access}> ${name} : ${structName};`;
135315
135343
  hexbin: state.onHexRightClick,
135316
135344
  hexPolygon: state.onHexPolygonRightClick,
135317
135345
  tile: state.onTileRightClick,
135346
+ particles: state.onParticleRightClick,
135318
135347
  label: state.onLabelRightClick,
135319
135348
  object: state.onObjectRightClick,
135320
135349
  custom: state.onCustomLayerRightClick
@@ -135337,7 +135366,7 @@ var<${access}> ${name} : ${structName};`;
135337
135366
  } else {
135338
135367
  args.push(_this.toGeoCoords(point));
135339
135368
  }
135340
- dataAccessors.hasOwnProperty(objType) && args.unshift(dataAccessors[objType](globeObj.__data));
135369
+ dataAccessors.hasOwnProperty(objType) && args.unshift(dataAccessors[objType](globeObj.__data, intersection));
135341
135370
  objFns[objType].apply(objFns, args);
135342
135371
  }
135343
135372
  });