TheRedEncryption / GMScript

To make using HTML Canvas a whole lot easier!
MIT License
0 stars 0 forks source link

ImageSprite class doesn't accept new Image() #3

Closed Jamieson-H7 closed 1 year ago

Jamieson-H7 commented 1 year ago

When you try to create a new Image and use it in the ImageSprite constructor, it causes an error

// Create an Image
let direWarningImage = new Image();
direWarningImage.src = "./direwarning.png";
// Use it in the constructor
let imageSprite = new ImageSprite(direWarningImage, 20, 20); 

I feel like it would be more intuitive to be able to use either a file location or an Image

Jamieson-H7 commented 1 year ago

Fixed!