three-forcegraph
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -7,2 +7,3 @@ 'use strict'; | ||
var tinyColor = _interopDefault(require('tinycolor2')); | ||
require('whatwg-fetch'); | ||
var three = require('three'); | ||
@@ -14,3 +15,2 @@ var d3Force3d = require('d3-force-3d'); | ||
var Kapsule = _interopDefault(require('kapsule')); | ||
var qwest = _interopDefault(require('qwest')); | ||
var accessorFn = _interopDefault(require('accessor-fn')); | ||
@@ -293,3 +293,6 @@ | ||
state.fetchingJson = true; | ||
qwest.get(state.jsonUrl).then(function (_, json) { | ||
fetch(state.jsonUrl).then(function (r) { | ||
return r.json(); | ||
}).then(function (json) { | ||
state.fetchingJson = false; | ||
@@ -331,3 +334,8 @@ state.graphData = json; | ||
if (customObj) { | ||
obj = customObj.clone(); | ||
obj = customObj; | ||
if (state.nodeThreeObject === obj) { | ||
// clone object if it's a shared object among all nodes | ||
obj = obj.clone(); | ||
} | ||
} else { | ||
@@ -334,0 +342,0 @@ // Default object (sphere mesh) |
import { schemePaired } from 'd3-scale-chromatic'; | ||
import tinyColor from 'tinycolor2'; | ||
import 'whatwg-fetch'; | ||
import { Mesh, MeshLambertMaterial, BufferGeometry, BufferAttribute, Matrix4, Vector3, SphereGeometry, CylinderGeometry, Line, LineBasicMaterial, Group } from 'three'; | ||
@@ -9,3 +10,2 @@ import { forceSimulation, forceLink, forceManyBody, forceCenter } from 'd3-force-3d'; | ||
import Kapsule from 'kapsule'; | ||
import qwest from 'qwest'; | ||
import accessorFn from 'accessor-fn'; | ||
@@ -288,3 +288,6 @@ | ||
state.fetchingJson = true; | ||
qwest.get(state.jsonUrl).then(function (_, json) { | ||
fetch(state.jsonUrl).then(function (r) { | ||
return r.json(); | ||
}).then(function (json) { | ||
state.fetchingJson = false; | ||
@@ -326,3 +329,8 @@ state.graphData = json; | ||
if (customObj) { | ||
obj = customObj.clone(); | ||
obj = customObj; | ||
if (state.nodeThreeObject === obj) { | ||
// clone object if it's a shared object among all nodes | ||
obj = obj.clone(); | ||
} | ||
} else { | ||
@@ -329,0 +337,0 @@ // Default object (sphere mesh) |
{ | ||
"name": "three-forcegraph", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "Force-directed graph as a ThreeJS 3d object", | ||
@@ -42,7 +42,7 @@ "unpkg": "dist/three-forcegraph.min.js", | ||
"kapsule": "^1.9.0", | ||
"ngraph.forcelayout": "^0.2.1", | ||
"ngraph.forcelayout": "^0.5.0", | ||
"ngraph.forcelayout3d": "^0.0.16", | ||
"ngraph.graph": "^0.0.14", | ||
"qwest": "^4.5.0", | ||
"tinycolor2": "^1.4.1" | ||
"tinycolor2": "^1.4.1", | ||
"whatwg-fetch": "^2.0.3" | ||
}, | ||
@@ -58,9 +58,9 @@ "peerDependencies": { | ||
"babel-preset-env": "^1.6.1", | ||
"rollup": "^0.56.2", | ||
"rollup": "^0.56.5", | ||
"rollup-plugin-babel": "^3.0.3", | ||
"rollup-plugin-commonjs": "^8.3.0", | ||
"rollup-plugin-node-resolve": "^3.0.3", | ||
"rollup-plugin-commonjs": "^9.0.0", | ||
"rollup-plugin-node-resolve": "^3.2.0", | ||
"rollup-watch": "^4.3.1", | ||
"uglify-js": "3.3.4" | ||
"uglify-js": "3.3.13" | ||
} | ||
} |
@@ -23,3 +23,6 @@ import resolve from 'rollup-plugin-node-resolve'; | ||
babel({ exclude: 'node_modules/**' }) | ||
] | ||
], | ||
moduleContext: { | ||
[require.resolve('whatwg-fetch')]: 'window' | ||
} | ||
}; |
@@ -19,3 +19,6 @@ import babel from 'rollup-plugin-babel'; | ||
babel() | ||
] | ||
], | ||
moduleContext: { | ||
[require.resolve('whatwg-fetch')]: 'window' | ||
} | ||
}; |
@@ -0,1 +1,2 @@ | ||
import 'whatwg-fetch'; | ||
import { | ||
@@ -42,3 +43,2 @@ Mesh, | ||
import Kapsule from 'kapsule'; | ||
import qwest from 'qwest'; | ||
import accessorFn from 'accessor-fn'; | ||
@@ -236,3 +236,4 @@ | ||
state.fetchingJson = true; | ||
qwest.get(state.jsonUrl).then((_, json) => { | ||
fetch(state.jsonUrl).then(r => r.json()).then(json => { | ||
state.fetchingJson = false; | ||
@@ -272,3 +273,8 @@ state.graphData = json; | ||
if (customObj) { | ||
obj = customObj.clone(); | ||
obj = customObj; | ||
if (state.nodeThreeObject === obj) { | ||
// clone object if it's a shared object among all nodes | ||
obj = obj.clone(); | ||
} | ||
} else { // Default object (sphere mesh) | ||
@@ -275,0 +281,0 @@ const val = valAccessor(node) || 1; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
1220862
28
10221
5
+ Addedwhatwg-fetch@^2.0.3
+ Addedngraph.events@0.0.4(transitive)
+ Addedngraph.forcelayout@0.5.0(transitive)
+ Addedngraph.physics.simulator@0.3.0(transitive)
+ Addedwhatwg-fetch@2.0.4(transitive)
- Removedqwest@^4.5.0
- Removedjquery-param@0.1.2(transitive)
- Removedngraph.forcelayout@0.2.1(transitive)
- Removedngraph.physics.simulator@0.1.1(transitive)
- Removedpinkyswear@2.2.3(transitive)
- Removedqwest@4.5.0(transitive)
Updatedngraph.forcelayout@^0.5.0