New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crop cannot work with tint in canvas mode #2688
Comments
Using the Phaser Examples: http://phaser.io/examples/v2/sprites/dynamic-crop#gv, and adding a tint to
Under CANVAS mode: And under WEBGL mode: |
BTW, I'm using Google Chrome 49.0.2623.110 m. And the result is the same after I updated it to 52.0.2743.116 m. |
photonstorm
added a commit
that referenced
this issue
Aug 18, 2016
…s also cropped, beyond the initial crop. Now a cropped texture will re-tint itself every time the crop is updated, and has changed (thanks @phoenixyjll #2688)
Thanks for submitting this issue. We have fixed this, and the fix has been pushed to the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Issue is about (delete as applicable)
For example:
The code has different behaviors under CANVAS mode and WEBGL mode. In CANVAS mode, the rectangle's (x, y) doesn't work, and pic is always cropped from its top-left.
As for the Phaser source code,
renderSession.context.drawImage(this.tintedTexture, 0, 0, cw, ch, dx, dy, cw / resolution, ch / resolution);
(https://github.com/photonstorm/phaser/blob/dev/src/pixi/display/Sprite.js#L495)
it seems that the crop's cx, cy are always 0.
So should I always not use a tint when I need to crop in canvas mode, or it can be fixed so that it has the same behavior as the WEBGL mode?
Thank you.
The text was updated successfully, but these errors were encountered: