yorkie-js-sdk icon indicating copy to clipboard operation
yorkie-js-sdk copied to clipboard

Drawing animation for pen cursor isn't smooth for displaying remote cursors.

Open YoonKiJin opened this issue 10 months ago • 2 comments

Description:

The Simultaneous Cursors example uses two kinds of animations. One is an emoji "bubbling" animation for the Heart and Thumbs cursors, while the other is a "drawing" animation for the Pen cursor. For the drawing animation, the drawing is smooth for the current/local client. However, when displaying the pen drawing of other cursors, that is, remote users' cursors, the drawing animation isn't as smooth.

Below, the right side shows what a user would see when drawing with their own cursor. On the left is what would be displayed for another user.

pen

Why:

Improving this can improve the UX for anyone who may want to experiment with this SDK example. Furthermore, if this example were to be incorporated into the Yorkie homepage, it is even more important that it gives Yorkie users a high-quality UX.

YoonKiJin avatar Aug 10 '23 10:08 YoonKiJin

Can I get some explanation about why this is happening? Is it because there is some kind of throttle when passing the cursor position between peers?

krapie avatar Aug 10 '23 10:08 krapie

After experimenting with what values are being sent from local to remote cursors and logging what is being received, it seems that all x y values of all cursors currently on the screen are being sent and received properly. The issue seems be due to how the drawing is happening.

YoonKiJin avatar Aug 10 '23 10:08 YoonKiJin