🛠 Status: In Development
The picimo package is currently in development. It's on the track to a 1.0 release, so I encourage you to use it and give me your feedback (or even better create pull requests if you want to contribute to this project), but be aware there are things that are not yet complete and you should expect some changes.
If you want to use picimo in your own projects, I recommend as long as the version is still at 0.0.x to check out the repository locally and use e.g. yarn link
(the npm package is currently updated only sometimes and irregularly)
picimo
.. is a typescript library for creating realtime 2.5d gfx in html5. It's based upon the fantastic three.js library which itself is based on WebGL.
One of the first ideas for this library was that it should be as simple as possible to display pixel art graphics in a responsive design aware environment (→ Projection)
As a consequence thereof a key feature of picimo is that it is easy to create custom sprites with webgl shaders and provide an extremely simple OO-based API (→ About Sprites and Vertex Objects) to handle those sprites without having to worry about the otherwise necessary WebGL boilerplate and internals such as attribute buffer arrays or geometry instancing.
Those who work with sprites will quickly realize that an easy way to import spritesheet images and texture-atlas definitions could be very handy. Picimo supports importing tilesets via grid-aligned spritesheet images or texture altases from json files (exported by tools such as TexturePacker).
For more detailed API usage and examples, please visit the kitchen-sink app or the examples/ directory.
How to import in your own projects
The picimo
npm package can be installed from NPM:
yarn add three picimo
The picimo npm package offers the following build fragments:
- the typescript types (referenced by
package.json:types
) to use the package in your typescript projects - a modern es2017 javascript module bundle (referenced by
package.json:exports
and also by the main
and module
properties) which can be used with modern javascript bundlers and must be transpiled by yourself to your dedicated browser target environment!
Development
You will need Node.js version v10+ and yarn.
After cloning the repo, run:
$ yarn install
To compile and build the sources:
$ yarn build
To run all linters and tests at once:
$ yarn test
Build System Overview
Picimo is a pure typescript library, which is transpiled using rollup and babel and is available as a npm package as build output.
Jest is used for testing.
To increase the general software quality eslint and prettier are used and should be utilized for each commit.