HAGL

HAGL is a simple WebGL renderer to help you render image on screen. It is not a game engine, but you can use it to render your 2D game.

Download: click here

Demo:

How To Use:

var gl = new Hagl(canvas);
gl.drawImage(image, x, y);

You can also use options with drawing

var gl = new Hagl(canvas);
gl.drawImage(image, x, y, {options})

Available options:

  • offsetX, offsetY
    the offset 
  • scaleX, scaleY
    scale
  • rotation
    rotation
  • alpha 
    alpha/opacity
  • texU1, texV1, texU2, texV2
    If you want to use custom texture UV position


Tidak ada komentar:

Posting Komentar