@mocanvas/editor · interface

TLDrawShapeSegment

interface TLDrawShapeSegment

One continuous run of a freehand stroke.

A stroke is a list of segments rather than one point list because lifting the pen — or drawing a straight segment with a modifier held — starts a new run that must not be smoothed into the previous one.


Properties · 3

dim?: number

Floats per point: DIM_2D or DIM_3D.

points: string

The segment's points, packed by b64Vecs.

type: "free" | "straight"

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.