Skip to content

Proof of concept for scaling images

Pre-release
Pre-release
Compare
Choose a tag to compare
@starwed starwed released this 20 Jan 20:31

Adds a scale param to image: image(url, repeatFlag, scaleFactor). Example:

// Display test.png at twice the size
Crafty.e("WebGL, Image").image("test.png", "no-repeat", 2).attr({x:0, y:0}); 

This is a quick+dirty attempt, and there are probably some bugs lurking here! :)