Paper.js does clear the rectangle for you.
But you need to be aware thatit differs to other frameworks such as processing in the sense that you create a scene graph / DOM rather than directly giving drawing commands. The objects you create are then drawing themselves in the frame / draw loop.
So what you describe sounds like instead of creating your elements once and then modifying them according to the verlet simulation, you're creating a new scene graph on each frame, but are not getting rid of the old one. This also explains why it slows down so much.
I don't have time to look into the code right now, but hope that this feedback will help improving your code?
Best,
Jürg
> --
> You received this message because you are subscribed to the Google Groups "Paper.js" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
paperjs+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>