This demo demonstrate some sprites properties and special effects.
The following code example show how to tweak sprite properties.
// load sprite's texture asset
let texture = await Shaku.assets.loadTexture('assets/sprite.png');
// create a sprite
let sprite = new Shaku.gfx.Sprite(texture);
sprite.position.set(100, 100)
sprite.rotation = Math.PI;
sprite.skew = new Shaku.utils.Vector2(150, 0);
sprite.color = Shaku.utils.Color.red;
// create a sprites batch
let spritesBatch = new Shaku.gfx.SpriteBatch();
// part below goes between startFrame() and endFrame()
// -------------------------------------------------------
// draw the sprite
spritesBatch.begin();
spritesBatch.drawSprite(sprite);
spritesBatch.end();