Skip to content

Update drawables' matrix + silhouette in _getConvexHullPointsForDrawable #585

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

Merged

Conversation

adroitwhiz
Copy link
Contributor

@adroitwhiz adroitwhiz commented Apr 15, 2020

Resolves

Resolves scratchfoundation/scratch-gui#5647
Resolves #546

Proposed Changes

This PR adds calls to updateMatrix and updateSilhouette inside RenderWebGL._getConvexHullPointsForDrawable.

Reason for Changes

Text bubbles are positioned according to the convex hull of their sprite's current costume/skin. Generating convex hulls requires the sprite's drawable to have an up-to-date inverse matrix and its skin to have an up-to-date silhouette.

If those attributes are not up-to-date, the convex hull will not be properly generated, and speech bubbles will be incorrectly positioned. See also scratchfoundation/scratch-gui#4344 for a previous instance of this happening.

These changes are also included in #555, but that PR is much larger in scope so it may be easier to review this one.

Copy link
Contributor

@fsih fsih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fsih fsih merged commit 4b2e171 into scratchfoundation:develop Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] say balloon goes to the wrong place first time a project is played (with some costumes) Follow up on the issue described in #398
2 participants