kittykatattack/spriteUtilities

filmstrip (possibly other methods too) to take texture as well

ironchestgames opened this issue · 3 comments

Hello,

I have a case where I already have the texture for my filmstrip, but the method only accepts the loader-resource key. If it could take any texture it would be more useful as well.

Kind Regards,

This is an excellent feature request.

if(typeof texture === 'string') {
//Find the width and height of the texture
var textureWidth = this.TextureCache[texture].width,
textureHeight = this.TextureCache[texture].height;
}else if(typeof texture === 'object'){
var textureWidth = texture.width,
textureHeight = texture.height;
}

??

@double-v Thanks - I will investigate that solution 😄