vasturiano / d3-force-surface

A multi-surface elastic collision force type for the d3-force simulation engine
MIT License
21 stars 1 forks source link

Rectange surface collision #1

Open DinoJay opened 7 years ago

DinoJay commented 7 years ago

Hello,

Thank You for this nice surface collision force algorithm. Is there a way to specify the width and height of a node instead of only the radius?

That would be really cool!

Best, Jan

vasturiano commented 7 years ago

@DinoJay that is currently not supported. Actually it's substantially more complicated to perform that computation. I may attempt to implement that sometime but for now it's not possible as part of this module.

This other plugin may help you though: https://github.com/emeeks/d3-bboxCollide