I have an event that creates a new sprite container from image files in the pictures folder, using PIXI.js.
I love this!!!! As long as z value is negative, it draws under the tile map!! Sweet!!
I copied it from an older post here and thought it would be useful for my game. (Thanks to Shaz for pointing out tilemap property in SceneManager).
It works in every way I desire it to by adjusting some parameters...except now I cannot get rid of the pictures created by this method.
I have tried removeChild();
I have tried sprite.destroy();
I have tried rmmv script calls to clear pictures.
Any further attempts to get rid of it throws me an error:
Type Error: Undefined is not a function
Reference Error: image is not defined.
How do I remove these images...and if the same method of drawing is repeated several times, will it consume all of my device's memory?
Thanks in advance! 🙂
Screenshot info: It is a fan game of MTG (Magic: the gathering). Many of the land cards in MTG contain panoramic images of cool looking fantasy places. I can reposition and enlarge the card images so that only the portion showing the landscape art is visible, creating a faux parallax layer. In this screenshot, the image is enlarged only slightly, and drawn below the tilemap.
I love this!!!! As long as z value is negative, it draws under the tile map!! Sweet!!
I copied it from an older post here and thought it would be useful for my game. (Thanks to Shaz for pointing out tilemap property in SceneManager).
It works in every way I desire it to by adjusting some parameters...except now I cannot get rid of the pictures created by this method.
I have tried removeChild();
I have tried sprite.destroy();
I have tried rmmv script calls to clear pictures.
var image = PIXI.Sprite.fromImage('./img/pictures/mybackground.png');
SceneManager._scene._spriteset._tilemap.addChild(image);
img.x = 0;
img.y = 0;
img.z = -8;
img.width = 816;
img.height = 624;Any further attempts to get rid of it throws me an error:
Type Error: Undefined is not a function
Reference Error: image is not defined.
How do I remove these images...and if the same method of drawing is repeated several times, will it consume all of my device's memory?
Thanks in advance! 🙂
Screenshot info: It is a fan game of MTG (Magic: the gathering). Many of the land cards in MTG contain panoramic images of cool looking fantasy places. I can reposition and enlarge the card images so that only the portion showing the landscape art is visible, creating a faux parallax layer. In this screenshot, the image is enlarged only slightly, and drawn below the tilemap.