hackerwins / codepair-old

Real-time markdown editor for interviews, meetings and more...
https://codepair-old.yorkie.dev
Apache License 2.0
90 stars 29 forks source link

Apply UpdateMetadata to line drawing #155

Closed hackerwins closed 1 year ago

hackerwins commented 3 years ago

Description:

Apply UpdateMetadata to the line drawing.

When users draw lines, the users start drawing by mouse down, then when mouse up, a line is completed.

  1. While drawing a line, use UpdateMetadata to send raw points directly to the peers.
  2. When the line drawing is completed, sample raw points then add them to the document as a line.
  3. When painting lines using points, apply Bezier Curve to the sampled points.

Currently, during line drawing, the line is wobbly because it is painted by sampling points and changing it to a bezier curve.

Why:

easylogic commented 1 year ago

Close the issue because it supports tldraw.