Cadrach Posted February 5, 2015 Share Posted February 5, 2015 Hi, I am new to Phaser so maybe this question is silly, but I am having trouble doing something that I thought would be easier ^^. Basically I have an image, I want to apply a transform on this image, and then be able to use it as a new image (as if this new image did not have any transform prior) Currently I am doing the following://Get image & tint & transformvar bmd = game.make.image(80,80,'test');bmd.tint = (Math.random()*0xFFFFFF<<0);bmd.transformCallback = this.transform.ground;//Create canvas & generate texturevar canvas = new PIXI.CanvasRenderer(80,80);var newTexture = bmd.generateTexture(1, PIXI.scaleModes.DEFAULT, canvas);//Add a new image with the new texturegame.add.image(100, 100, newTexture);The new image has the random tint, but loses the transform. If I apply my transform to the new image it is rendered correctly. Any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts