Socket
Socket
Sign inDemoInstall

@excalidraw/laser-pointer

Package Overview
Dependencies
0
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @excalidraw/laser-pointer

Generate outline for laser pointer tool


Version published
Weekly downloads
2.7K
increased by91.35%
Maintainers
3
Install size
251 kB
Created
Weekly downloads
 

Readme

Source

Laser Pointer

Usage

import { LaserPointer } from '@excalidraw/laser-pointer'

const stroke = new LaserPointer(options)

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

const outline = stroke.getStrokeOutline()

Options

PropertyTypeDefaultDescription
sizenumber2Radius of the stroke.
streamlinenumber0.42Interpolate input points to reduce jitter.
simplifynumber0.1Reduce stroke size by sacrificing precision.
simplifyPhase"input" | "output" | "tail" "output"Decides when the simplification algorithm should be applied.
sizeMapping(details: SizeMappingDetails) => number() => 1Maps each point to a value between 0.0 and 1.0.
keepHeadbooleanfalseWhether size mapping should influence the head of the stroke.

Keywords

FAQs

Last updated on 11 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc