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
Add opacity support. #644
Add opacity support. #644
Conversation
@philipgiuliani How can I test that my modifications are not breaking anything with setClip and placeholderFillStyle? Also, I believe the opacity property on the drawer is deprecated. This was useful when we had multiple drawers. |
* Sketch canvas used to temporarily draw tiles which cannot be drawn directly | ||
* to the main canvas due to opacity. | ||
*/ | ||
this.sketchCanvas = this.useCanvas ? document.createElement( "canvas" ) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since adding a new Canvas can have a big impact on our memory footprint, I think it would be good if we could do it only as needed, i.e. the first time we have a fractional opacity.
I love it. Of course there are details to attend to. In addition to the comments above, a few more:
|
I think I covered all of your comments in the above commit. I am not too happy with drawer.clear which seems inconsistent to me. Did you have that in mind? I still need to test placeholderFillStyle and setClip, thanks for the pointers. |
I love how this is coming together! I'm looking forward to using this feature. :) |
Ok, I think this is ready for merging. |
Looks good! The Travis build glitched, so I've restarted it. I'll merge if the result is good. Thanks again for tackling this! |
I just started from a fresh fork, so this is a new PR but this is the continuation of #630.