steveruizok / perfect-cursors

Perfect interpolation for multiplayer cursors.
MIT License
613 stars 13 forks source link

Open to decoupling perfect-cursors from @tldraw? #1

Open brycepj opened 2 years ago

brycepj commented 2 years ago

The number and size of JS dependencies required by this (awesome!) library are pretty huge relative to what it actually does. Installing from npm requires installing particular versions of react, react-dom, and cypress, to name a few. Makes it pretty hard to consider using in a non-tldraw application.

Looks like importing Vec from @tldraw is the primary culprit. I wonder if it's worth copying over Vec, though I know that's not as clean as a direct import. I'm obviously open to other approaches, and I'd be happy to submit a PR if it would be considered.

steveruizok commented 2 years ago

Hey, that's a good point, especially for the dev dependencies. Vec is a tiny library though (1.4kB gzipped), and I believe it's the only runtime dependency, so I don't think that should be an issue?