Discussion about basic scissors masking implementation on StageGL #970
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! We have been using EaselJS for over one year in several proyects and really fits our needs: really similar to old flash approach, works fine on any platform we tested, good integration with adobe animate...
However, for our next project we need some basic masking features, with 'as good as possible' performance on mobile phones.
I've been trying to understand the StageGL implementation and I made some code that performs gl.scissors-based masking over mask bounds added to containers or movieclips.
I made some tests and it seems to work, but, with this PR I want to ask you about your opinion, if you think I'm breaking something I didn't realized, or if it seems a good approach.
Basically, what I did was modify the _appendToBatch method. If a mask is found in a container, it forces to render the current batch, applies masking, and start appending the new elements. After all the items that should be masked are added. I force to render the current batch and remove the mask.
Thanks a lot!