Search the Community
Showing results for tags 'rotated'.
-
Hola! I wanted to take a screenshot of my game and download it to the user's device. I have this working, almost except that on my iPhone5s in Safari, the downloaded image is upsidedown. To get the screen shot I use my code below (specifically, the toDataURL() function). On my desktop, the downloaded image is oriented the right way. But not in Safari mobile. I don't have Safari Desktop to try it there, so I'm not sure if mobile vs. desktop makes a difference. Has anyone dealt with this? Know of any work arounds? Thank you in advance! saveCanvas : function () { var link = document.createElement('a'); link.href = this.game.canvas.toDataURL('image/png'); link.download = 'Highscore.jpg'; document.body.appendChild(link); link.click(); document.body.removeChild(link); }
-
Hi, I'm relatively new to Pixi. I have a problem similar to the one mentioned in this post: http://www.html5gamedevs.com/topic/5766-bunny-drag-example-with-correct-mouse-offset/?hl=%2Bdrag+%2Bpixi I used the code from the post and it worked seamlessly. However, when i began rotating the Sprites the offset became wrong, and the sprite jumps to another location when i begin dragging it. Do i have to use some trigonometric function to reverse the rotation? How can I do this? Here is a version with rotation: http://jsfiddle.net/cXfpq/2/ Here without rotation: http://jsfiddle.net/dirkk0/cXfpq/ Thanks in advance! Felix
- 2 replies
-
- drag and drop
- dragging
- (and 5 more)