Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-force-3d

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-force-3d - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

.eslintrc.json

24

package.json
{
"name": "d3-force-3d",
"version": "1.1.0",
"version": "1.1.1",
"description": "Force-directed graph layout in 1D, 2D or 3D using velocity Verlet integration.",

@@ -22,5 +22,6 @@ "keywords": [

},
"main": "build/d3-force-3d.js",
"module": "index",
"jsnext:main": "index",
"main": "dist/d3-force-3d.js",
"unpkg": "dist/d3-force-3d.min.js",
"jsdelivr": "dist/d3-force-3d.min.js",
"module": "src/index.js",
"repository": {

@@ -31,5 +32,5 @@ "type": "git",

"scripts": {
"pretest": "rm -rf build && mkdir build && rollup -c --banner \"$(preamble)\"",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepare": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-force-3d.js -c -m -o build/d3-force-3d.min.js"
"pretest": "rollup -c",
"test": "tape 'test/**/*-test.js' && eslint src",
"prepublishOnly": "rm -rf dist && yarn test"
},

@@ -45,9 +46,8 @@ "dependencies": {

"devDependencies": {
"eslint": "4",
"package-preamble": "0.1",
"rollup": "0.50",
"eslint": "5",
"rollup": "0.64",
"rollup-plugin-node-resolve": "^3.0.0",
"tape": "4",
"uglify-js": "3"
"rollup-plugin-terser": "1",
"tape": "4"
}
}

@@ -5,3 +5,3 @@ # d3-force-3d

Extended version of [d3-force](https://github.com/d3/d3-force) to support other dimensions besides 2D, via the method [*numDimensions*](#simulation_numDimensions), supporting the values 1, 2 or 3 (default to 2). Fully backwards compatible with [d3-force](https://github.com/d3/d3-force) (version [1.1.0](https://github.com/d3/d3-force/tree/v1.1.0)), and should just work as a drop-in replacement d3 module.
Extended version of [d3-force](https://github.com/d3/d3-force) to support other dimensions besides 2D, via the method [*numDimensions*](#simulation_numDimensions), supporting the values 1, 2 or 3 (default to 2). Fully backwards compatible with [d3-force](https://github.com/d3/d3-force) (version [1.1.2](https://github.com/d3/d3-force/tree/v1.1.2)), and should just work as a drop-in replacement d3 module.

@@ -8,0 +8,0 @@ This module implements a [velocity Verlet](https://en.wikipedia.org/wiki/Verlet_integration) numerical integrator for simulating physical forces on particles. The simulation is simplified: it assumes a constant unit time step Δ*t* = 1 for each step, and a constant unit mass *m* = 1 for all particles. As a result, a force *F* acting on a particle is equivalent to a constant acceleration *a* over the time interval Δ*t*, and can be simulated simply by adding to the particle’s velocity, which is then added to the particle’s position.

@@ -0,19 +1,38 @@

import {terser} from "rollup-plugin-terser";
import * as meta from "./package.json";
import nodeResolve from 'rollup-plugin-node-resolve';
const definition = require("./package.json");
const dependencies = Object.keys(definition.dependencies);
export default {
input: "index",
external: dependencies,
const config = {
input: "src/index.js",
external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)),
output: {
file: `dist/${meta.name}.js`,
name: "d3",
format: "umd",
indent: false,
extend: true,
file: `build/${definition.name}.js`,
format: "umd",
globals: dependencies.reduce((p, v) => (p[v] = "d3", p), {}),
name: "d3"
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`,
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"})))
},
plugins: [
nodeResolve({ jsnext: true })
]
};
plugins: []
};
export default [
config,
{
...config,
output: {
...config.output,
file: `dist/${meta.name}.min.js`
},
plugins: [
...config.plugins,
nodeResolve({ jsnext: true }),
terser({
output: {
preamble: config.output.banner
}
})
]
}
];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc