# @excalidraw/laser-pointer

> Generate outline for laser pointer tool

Latest version **1.3.2** (published 2025-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @excalidraw/laser-pointer
pnpm add @excalidraw/laser-pointer
yarn add @excalidraw/laser-pointer
bun add @excalidraw/laser-pointer
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2025-06-27 |
| First published | 2023-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 251.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | aa1216, vjeux, dwelle, maielo, mrazator |
| Keywords | excalidraw, laserpointer |

## Links

- npm: https://www.npmjs.com/package/@excalidraw/laser-pointer
- npm.io page: https://npm.io/package/@excalidraw/laser-pointer

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.3.2 (latest) — 2025-06-27
- 1.3.1 — 2024-01-11
- 1.3.0 — 2024-01-08
- 1.2.0 — 2023-10-03
- 1.0.1 — 2023-09-27
- 1.0.0 — 2023-09-27

## README

# 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

| 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`.           |
| `keepHead`      | `boolean`                                 | `false`    | Whether size mapping should influence the head of the stroke. |

---
_Source: https://npm.io/package/@excalidraw/laser-pointer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
