# @litecanvas/utils

> Utilities to help build litecanvas games

Latest version **0.56.0** (published 2026-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @litecanvas/utils
pnpm add @litecanvas/utils
yarn add @litecanvas/utils
bun add @litecanvas/utils
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.56.0 |
| Published | 2026-11-19 |
| First published | 2024-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 240.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Luiz Bills <luizbills@pm.me> |
| Maintainers | luizbills |
| Keywords | litecanvas, utilities, helpers, camera, vector, grid |

## Links

- npm: https://www.npmjs.com/package/@litecanvas/utils
- Repository: https://github.com/litecanvas/utils.git#main
- Homepage: https://github.com/litecanvas/utils#readme
- Issues: https://github.com/litecanvas/utils/issues
- npm.io page: https://npm.io/package/@litecanvas/utils

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.56.0 (latest) — 2026-11-19
- 0.55.0 — 2026-10-22
- 0.54.0 — 2026-10-22
- 0.52.1 — 2026-05-29
- 0.52.0 — 2026-05-20
- 0.51.0 — 2026-05-14
- 0.50.0 — 2026-03-28
- 0.49.2 — 2026-03-12
- 0.49.1 — 2026-03-08
- 0.49.0 — 2026-03-08
- 0.48.0 — 2026-03-02
- 0.47.3 — 2026-02-24
- 0.47.2 — 2026-02-24
- 0.47.1 — 2026-02-24
- 0.47.0 — 2026-02-24
- … 64 more at https://npm.io/package/@litecanvas/utils/versions

## README

# Litecanvas Utilities

Small collection of tools for developing games with [Litecanvas](https://github.com/litecanvas/game-engine).

<!-- prettier-ignore -->
> [!TIP]
> **All modules of this package are automatically loaded on Litecanvas [playground](https://litecanvas.js.org/).**

## Install

### NPM package

```
npm i @litecanvas/utils
```

```js
// import everything
import * as utils from "@litecanvas/utils"

const pos = utils.vec(0, 0)
```

```js
// or import just what you want
import { vec } from "@litecanvas/utils"

const pos = vec(0, 0)
```

### Global/CDN

Download or load from a CDN:

- jsDelivr: https://cdn.jsdelivr.net/npm/@litecanvas/utils
- Unpkg: https://unpkg.com/@litecanvas/utils

```js
// now the "utils" namespace is created
const pos = utils.vec(0, 0)
```

```js
// also, you can  call this once to
// expose the components globally
utils.global()

// now the namescape is not required
const pos = vec(0, 0)
```

## Components

- **Camera**: Move-, zoom- and rotatable camera with shake. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/camera)
- **Vector**: Modular 2D vector. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/vector)
- **Actor**: class to represent game entities. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/actor)
- **Grid**: class to handle retangular grid areas. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/grid)
- **Collision** utilities. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/collision)
- **Tween** to create animations. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/tween)
- **Image** to manipulate images. [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/image)
- **Collection** to manipulate lists (arrays). [Usage & Docs](https://github.com/litecanvas/utils/tree/main/src/collection)
- And some [math utilities](https://github.com/litecanvas/utils/tree/main/src/math)...

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