This demo demonstrate texture's Wrap and Filter mode properties.
Press 1-3 to switch textures.
The following is a minimal code example to demonstrate different texture filters and wrap modes.
// load sprite's texture asset
let texture = await Shaku.assets.loadTexture('assets/sprite.png');
// set texture to linear filter (smooth)
texture.filter = Shaku.gfx.TextureFilterModes.Linear;
// set texture to nearest neighbor (pixelated)
texture.filter = Shaku.gfx.TextureFilterModes.Nearest;
// make texture repeat itself if source rect is out of boundaries
texture.wrapMode = Shaku.gfx.TextureWrapModes.Repeat;
// make texture mirror itself if source rect is out of boundaries
texture.wrapMode = Shaku.gfx.TextureWrapModes.RepeatMirrored;
// make texture clamp if source rect is out of boundaries (default)
texture.wrapMode = Shaku.gfx.TextureWrapModes.Clamp;