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:
- Demo 1: Box
- Demo 2: Scale
- Demo 3: Rotation
- Demo 4: SpriteSheet
- Demo 5: Blending
- Demo 6:TileSet
- Demo 7: Paralax Background
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