@are/laser-pointer
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Excalidraw Freehand

Usage

import { ExcalidrawFreehand } from '@excalidraw/freehand'

const stroke = new ExcalidrawFreehand(options)

stroke.addPoint([100, 200, 1])
stroke.close()

const outline = stroke.getStrokeOutline()

Options

Property Type Default Description
size number 2 Radius of the stroke.
streamline number 0.42 Interpolate input points to reduce jitter.
simplify number 0.1 Reduce stroke size by sacrificing precision.
simplifyPhase "input" | "output" | "tail" "output" Decides when the simplification algorithm should be applied.
sizeMapping (details: SizeMappingDetails) => number () => 1 Maps each point to a value between 0.0 and 1.0.

Readme

Keywords

Package Sidebar

Install

npm i @are/laser-pointer

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

89.1 kB

Total Files

13

Last publish

Collaborators

  • are