3d-force-graph 1.73.1 → 1.73.3

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.
@@ -1,4 +1,4 @@
1
- import { AmbientLight, DirectionalLight, Vector3 } from 'three';
1
+ import { AmbientLight, DirectionalLight, Vector3, REVISION } from 'three';
2
2
  import { DragControls } from 'three/examples/jsm/controls/DragControls.js';
3
3
  import ThreeForceGraph from 'three-forcegraph';
4
4
  import ThreeRenderObjects from 'three-render-objects';
@@ -66,7 +66,7 @@ function _toPrimitive(t, r) {
66
66
  }
67
67
  function _toPropertyKey(t) {
68
68
  var i = _toPrimitive(t, "string");
69
- return "symbol" == typeof i ? i : String(i);
69
+ return "symbol" == typeof i ? i : i + "";
70
70
  }
71
71
  function _defineProperty(obj, key, value) {
72
72
  key = _toPropertyKey(key);
@@ -141,7 +141,8 @@ var three = window.THREE ? window.THREE // Prefer consumption from global THREE,
141
141
  : {
142
142
  AmbientLight: AmbientLight,
143
143
  DirectionalLight: DirectionalLight,
144
- Vector3: Vector3
144
+ Vector3: Vector3,
145
+ REVISION: REVISION
145
146
  };
146
147
 
147
148
  //
@@ -477,7 +478,7 @@ var _3dForceGraph = Kapsule({
477
478
  });
478
479
 
479
480
  // config renderObjs
480
- state.renderObjs.renderer().useLegacyLights = false; // force behavior for three < 155
481
+ three.REVISION < 155 && (state.renderObjs.renderer().useLegacyLights = false); // force behavior for three < 155
481
482
  state.renderObjs.hoverOrderComparator(function (a, b) {
482
483
  // Prioritize graph objects
483
484
  var aObj = getGraphObj(a);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3d-force-graph",
3
- "version": "1.73.1",
3
+ "version": "1.73.3",
4
4
  "description": "UI component for a 3D force-directed graph using ThreeJS and d3-force-3d layout engine",
5
5
  "type": "module",
6
6
  "unpkg": "dist/3d-force-graph.min.js",
@@ -53,18 +53,18 @@
53
53
  "three-render-objects": "^1.29"
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/core": "^7.23.9",
57
- "@babel/preset-env": "^7.23.9",
56
+ "@babel/core": "^7.24.3",
57
+ "@babel/preset-env": "^7.24.3",
58
58
  "@rollup/plugin-babel": "^6.0.4",
59
59
  "@rollup/plugin-commonjs": "^25.0.7",
60
60
  "@rollup/plugin-node-resolve": "^15.2.3",
61
61
  "@rollup/plugin-terser": "^0.4.4",
62
- "postcss": "^8.4.35",
62
+ "postcss": "^8.4.38",
63
63
  "rimraf": "^5.0.5",
64
- "rollup": "^4.9.6",
64
+ "rollup": "^4.13.1",
65
65
  "rollup-plugin-dts": "^6.1.0",
66
66
  "rollup-plugin-postcss": "^4.0.2",
67
- "typescript": "^5.3.3"
67
+ "typescript": "^5.4.3"
68
68
  },
69
69
  "engines": {
70
70
  "node": ">=12"