@inwebo/grid.js

ES6 Grid implementation

Grid.js activity by Inwebo veritas Grid.js repository size by Inwebo veritas Grid.js version size by Inwebo veritas Grid.js last activity by Inwebo veritas

Grid.js

Grid render demo

Cols: 40, Rows: 30, Tile: 30px x 40px, Offset: x 40px, y 40px
Grid
Tile (px)
Offset (px)
Colours

Features

  • Smart javascript Canvas API use.
  • One Job
  • Light weight
  • Easy to understand Pas de foutaises !
  • Modern Javascript (ES6), OOP ready. Extends a class and forget about javascript prototype
  • Manipulate color transparency
  • Animate sprite as you want, choose your frames and animation duration. With SpriteMap object.



Requirements

You must understand the canvas API, you must know ES6 and Node.js compilation. If you need help i'm available here github.




Installation

npm install @inwebo/render.js

Class

RendererAbstract.js

You must not instanciate it, build main rendering logic and expose a canvas context

Renderer2D.js

Extends RenderAbstract and expose a canvas2 context.

RendererOffScreen.js

Extends RenderAbstract, render an offscreen image and expose image's imageData.

              
                window.addEventListener("DOMContentLoaded", (event) => {
                });
              
            

Thanks

  • Mustard ui