d13 Posted May 26, 2015 Share Posted May 26, 2015 Hello.. can anyone suggest the best way to change a sprite's texture after the sprite has been created?I believe there was a `setTexture` method to do this in v.2, but I can't find an equivalent in v.3. Quote Link to comment Share on other sites More sharing options...
bubamara Posted May 27, 2015 Share Posted May 27, 2015 /** * @method * @private * @name PIXI.Sprite#setTexture * @see {@link PIXI.Sprite#texture} * @deprecated since version 3.0 */core.Sprite.prototype.setTexture = function(texture) { this.texture = texture; console.warn('setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;');}; Quote Link to comment Share on other sites More sharing options...
xerver Posted May 27, 2015 Share Posted May 27, 2015 Like bubamara mentioned if you run setTexture it literally will log and tell you what to use instead, or you could look in the deprecation file. d13 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.