npm.io
0.56.0 • Published 8h ago

@litecanvas/utils

Licence
MIT
Version
0.56.0
Deps
0
Size
241 kB
Vulns
0
Weekly
0
Stars
2

Litecanvas Utilities

Small collection of tools for developing games with Litecanvas.

All modules of this package are automatically loaded on Litecanvas playground.

Install

NPM package

npm i @litecanvas/utils
// import everything
import * as utils from "@litecanvas/utils"

const pos = utils.vec(0, 0)
// or import just what you want
import { vec } from "@litecanvas/utils"

const pos = vec(0, 0)
Global/CDN

Download or load from a CDN:

// now the "utils" namespace is created
const pos = utils.vec(0, 0)
// 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

Keywords