Conrado Posted February 18, 2017 Share Posted February 18, 2017 Hello there, thanks for reading. I was wondering if there is a way to copy the pixels from a loaded and displayed sprite/image to a new object, im trying to make a "Find the differences" game and i want to set the rectangle/square X,Y,X2,Y2 of a difference and then make a copy of the difference when you click it, so a new object with just the picture of the difference is created, so i can manipulate the difference itself. Thanks again! Edit: im now using the bitMapData, and know how to copy the pixels, but how do i create a new object/sprite with this copied pixels? so i put it in a group this.bmd = game.make.bitmapData(800, 600); this.bmd.addToWorld(); this.currentDifferences = new Phaser.Rectangle(100,350,150,250); this.bmd.copyRect(this.currentPicture, this.currentDifferences, 200, 100); sbonavida 1 Link to comment Share on other sites More sharing options...
sbonavida Posted March 22, 2017 Share Posted March 22, 2017 I would like to know too. I invoke a expert phaser programmer. ^-^ Link to comment Share on other sites More sharing options...
Recommended Posts