pencil-js/pencil.js

Should Line points be relative or absolute ?

GMartigny opened this issue · 1 comments

The question was settled in #18, but I wanted to re-open the debate for the Line class here.

I often find myself wanting to draw a line between two moving shape in a scene (absolute positions). If the shapes are moving and the line is not keeping reference to these positions, it's not possible without using absolute positions.

In the other hand, being able to move the Line as a whole (with dra'n'drop or programatically) makes more sense. Moreover, Pencil.js is build around relative positions and they're used everywhere else.

Relative over absolute positions
Pros:

  • All points follow the main position
    • Is possible to do drag'n'drop
  • It's the standard in Pencil
  • Changing impact at least Line, Spline and Path
    Cons:
  • Who need to drag'n'drop a line ??
  • Can't draw line between moving shapes
  • Absolute is more straightforward

Any opinion on that ?

Since c3bbc7b Line (and so do Spline) have an option to define which referential to use.