All Projects → vasturiano → d3-force-surface

vasturiano / d3-force-surface

Licence: MIT license
A multi-surface elastic collision force type for the d3-force simulation engine

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to d3-force-surface

3d Force Graph
3D force-directed graph component using ThreeJS/WebGL
Stars: ✭ 2,386 (+12457.89%)
Mutual labels:  d3js, force-directed-graphs
D3graphtheory
💥 Interactive and colorful 🎨 graph theory tutorials made using d3.js ⚡️
Stars: ✭ 1,364 (+7078.95%)
Mutual labels:  graph-theory, d3js
3d Force Graph Vr
3D force-directed graph component in VR
Stars: ✭ 112 (+489.47%)
Mutual labels:  graph-theory, d3js
Twitter-Sentiment-Analyzer
Twitter Sentiment Analyzer
Stars: ✭ 13 (-31.58%)
Mutual labels:  d3js
Libbulletjme
A JNI interface to Bullet Physics and V-HACD
Stars: ✭ 55 (+189.47%)
Mutual labels:  physics-simulation
chord-transitions
Transitioning Chord Diagram Demo with Angular/D3
Stars: ✭ 38 (+100%)
Mutual labels:  d3js
ReductionWrappers
R wrappers to connect Python dimensional reduction tools and single cell data objects (Seurat, SingleCellExperiment, etc...)
Stars: ✭ 31 (+63.16%)
Mutual labels:  force-directed-graphs
BitBruteForce-Wallet
No description or website provided.
Stars: ✭ 142 (+647.37%)
Mutual labels:  force
UBA
UEBA Solution for Insider Security. This repo is archived. Thanks!
Stars: ✭ 36 (+89.47%)
Mutual labels:  d3js
uLogMe
📊 📈 Automatically collect and visualize usage statistics on Ubuntu, with 🎹 key frequencies and 💻 window titles →
Stars: ✭ 61 (+221.05%)
Mutual labels:  d3js
ipc-toolkit
A set of reusable functions to integrate IPC into an existing simulation.
Stars: ✭ 84 (+342.11%)
Mutual labels:  physics-simulation
ProjectLockdown
Project Lockdown (an initiative from The IO Foundation) is a civic tech, interactive platform providing an overview of the state of Human and Digital Rights around the globe. It evaluates policies obtained from official sources that may impact their observance. It provides, among other tools, a layered map interface that allows for a visual repr…
Stars: ✭ 34 (+78.95%)
Mutual labels:  impact
Torque
2d 纯计算高性能刚体物理引擎
Stars: ✭ 62 (+226.32%)
Mutual labels:  physics-simulation
NetCoreForce
Salesforce REST API toolkit for .NET Standard and .NET Core
Stars: ✭ 77 (+305.26%)
Mutual labels:  force
github-readme-twitter
Add Twitter to your github readme
Stars: ✭ 73 (+284.21%)
Mutual labels:  d3js
econnessione
A chronological tracking of lies perpetrated against humanity.
Stars: ✭ 16 (-15.79%)
Mutual labels:  impact
web
The source code for the genshin.dev frontend.
Stars: ✭ 55 (+189.47%)
Mutual labels:  impact
RaiSimUnity
A visualizer for RaiSim based on Unity
Stars: ✭ 31 (+63.16%)
Mutual labels:  physics-simulation
PolyDraw
✳️ PTSource PolyDraw is a free 3D polygonal modeller for Windows x86 and x64, for creating or modifying 3D objects using a mesh of 3D points and parametric NURBS Curves .Exports and imports to over 40 formats including WebVR and 3D Printing.
Stars: ✭ 17 (-10.53%)
Mutual labels:  surface
bar-chart-race
Bar chart race using D3js
Stars: ✭ 32 (+68.42%)
Mutual labels:  d3js

d3.forceSurface

NPM package Build Size NPM Downloads

A multi-surface elastic collision force type for the d3-force simulation engine.

It can be used, for example to keep nodes within boundaries or in a game of Pong.

See also d3.forceBounce.

Quick start

import d3ForceSurface from 'd3-force-surface';

or

d3.forceSurface = require('d3-force-surface');

or even

<script src="//unpkg.com/d3-force-surface/dist/d3-force-surface.min.js"></script>

then

d3.forceSimulation()
    .nodes(<myNodes>)
    .force('surface', d3.forceSurface()
        .surfaces(<mySurfaces>)
    );

API reference

Method Description Default
surfaces([array]) Getter/setter for the list of surface lines []
elasticity([number]) Getter/setter for every collision's coefficient of restitution, aka elasticity. A value of 1 represents a purely elastic collision with no energy loss, while a 0 will fully eliminate the bounce in the collision direction. Values >1 can be used to introduce acceleration at each collision. Values <0 are not recommended. 1
radius([num or fn]) Getter/setter for the node object radius accessor function (fn(node)) or a constant (num) for all nodes. 1
from([fn]) Getter/setter for the surface object starting point accessor function fn(surface). It should return a two coordinate object: {x,y} surface.from
to([fn]) Getter/setter for the surface object ending point accessor function fn(surface). It should return a two coordinate object: {x,y} surface.to
oneWay([bool or fn]) Getter/setter for the surface object "one-way" flag accessor function (fn(surface)) or a constant for all surfaces. This flag indicates whether collisions of nodes against the surface should occur in both directions of movement or only in one (when the node is moving in a N>S orientation according to the W>E line axis), effectively ignoring collisions in the other direction. false
onImpact([fn]) Callback function triggered at every collision, with the signature onImpact(node, surface)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].