Marodheure Posted December 14, 2021 Share Posted December 14, 2021 (edited) Hello, i'm trying to do a color picker with pixijs v6.2.0 It's work almost, but i have a problem when i have a rotating sprite on the ledge of the stage, because that change dinamicaly the width and height stage, but don't change the x and y position of others sprites in the stage. Exemple 1: The mouse down event is set on the stage https://jsfiddle.net/Marodheure/gzytp4hr/94/ If you comment the line 53 (for the sprite rotation) in the javascipt tab, that will work. Exemple 2: The mouse down event is set on a sprite, and the readpixels too, to avoid to have not fixe dimensions, but that does not work too, but i don't know why https://jsfiddle.net/Marodheure/dtLsj0b1/40/ You can click to see in console the resulting: x y, width height, rgba Thank you for reading and helping Edited December 15, 2021 by Marodheure improve code in exemple Quote Link to comment Share on other sites More sharing options...
Marodheure Posted December 14, 2021 Author Share Posted December 14, 2021 (edited) Finaly it's not hard, i have just put the sprite used like a color pallet in a container, and do the readpixels on this new container. Exemple: https://jsfiddle.net/Marodheure/zd3oy8t7/11/ ^^ Edited December 15, 2021 by Marodheure improve code in exemple 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.