H
H
helixly2015-07-14 23:25:10
JavaScript
helixly, 2015-07-14 23:25:10

How to track collisions of SVG objects?

The task when dragging an SVG object is to track its collision with another object and do something. If, for example, there are only 2 objects, then it would be possible to use standard tools like getBoundingClientRect () and catch a collision during the OnDrag event. But what if there are many elements? Maybe there are some ready-made libraries for such purposes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolay Talanov, 2015-07-14
@Ronnie_Gardocki

https://greensock.com/draggable - check it out. I haven't used it myself, but it fits the description. + Knowledgeable people advised me this in some cases.

D
Denis Ineshin, 2015-07-15
@IonDen

Paper.js is good at calculating this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question