@repcomm/scenario2d
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

scenario2d

Zero dependencies 2d scene graph for web canvas

Implemented Classes

  • Resource, TextResource, XmlResource, SvgResource

  • Object2d (base class for scene objs)

  • PathObject2d - svg d attribute equivalent

  • Transform2d - scale, translate, rotation

  • Vec2

Using

To install with npm run
npm install @repcomm/scenario2d

This package comes with typescript definitions, and should work in both typescript and javascript.

Example Usage

See index.html and index.js

Note: Example uses my other library exponent-ts

As well as es-module-shims.js to load node_modules using import maps directly in the browser.

This is to reduce build time to < 1s

hence the extra boilerplate in index.html

Compiling

To build you'll want to clone the repo
git clone https://github.com/RepComm/scenario2d.git

Run npm install to get dependencies

Run npm run build

Package Sidebar

Install

npm i @repcomm/scenario2d

Weekly Downloads

0

Version

2.0.3

License

Unlicense

Unpacked Size

913 kB

Total Files

43

Last publish

Collaborators

  • repcomm