All Projects → mriiiron → wesa

mriiiron / wesa

Licence: MIT license
WebGL Engine of Sprite Animation

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to wesa

susse
super ültra sweet sprite editor
Stars: ✭ 22 (-4.35%)
Mutual labels:  sprite-animation
benimator
A sprite animation library for rust game development
Stars: ✭ 134 (+482.61%)
Mutual labels:  sprite-animation
Pixelorama
A free & open-source 2D sprite editor, made with the Godot Engine! Available on Windows, Linux, macOS and the Web!
Stars: ✭ 2,535 (+10921.74%)
Mutual labels:  sprite-animation
React Game Kit
Component library for making games with React & React Native
Stars: ✭ 4,480 (+19378.26%)
Mutual labels:  sprite-animation
bitmapflow
A tool to generate inbetweens for animated sprites, written in godot-rust
Stars: ✭ 388 (+1586.96%)
Mutual labels:  sprite-animation

WESA - WebGL-based Engine of Sprite Animation

Perhaps the simplest and lightest (14KB, currently) solution for turning your brilliant idea into old-school style, pixel-friendly sprite animations being displayed on the web.

You may consider to use fancy libs such as PixiJS or even ThreeJS, but WESA would be your simple but elegant start to learn to animate your favorite sprites in browser.

WesaJS will always be fully open-sourced, for the sake of my personal passion on sprite animations and retro-style games.

Basic Example

Include WESA

<script src="./js/wesa.min.js"></script>

Prepare a Canvas

<canvas id="canvas" width="640" height="480"></canvas>

Write Scripts

// Initializing WESA
wesa.core.init(document.getElementById('canvas'));

// Adding sprite sheets
wesa.assets.source.spriteSheetUrlArray.push('./assets/texture/megaman.png');

// Adding object definition file
wesa.assets.source.objectJsonUrl = './assets/megaman.json';

wesa.assets.load(function () {

    // Create the scene
    let scene = new wesa.Scene('Scene');

    // Add a sprite
    scene.addSpriteToLayer(0, new wesa.Sprite({
        object: wesa.assets.objectList[0],
        action: 0,
        team: 0,
        position: { x: 0, y: 0 },
        scale: 4
    }));

    // Run the scene
    let animate = function () {
        requestAnimationFrame(animate);
        scene.update();
        scene.render();
    }
    animate();

});

See full demo

More Demos

  • Coming soon!

Gallery

History

WesaJS is a successor of my following college works:

To-do

  • Pausing

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].