Commit ef4fc63
committed
Add isMetricsReady for use in bounds computation
Bounds computations don't need to get a fully updated copy of
the skin's texture. It just needs to know the size and rotation
center, which is what this method can check for.
Default implementation defaults to !!getTexture([100, 100]) for
compatibility with quirks relying on the old behavior. The
getTexture() functions in scratch-render don't fall prey to issues
such as TurboWarp/extensions#2207
so this default implementation is fine.
(TextBubbleSkin almost does, but its drawables are non-interactive)
Closes #161 parent 8d55eab commit ef4fc63
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
1639 | | - | |
| 1639 | + | |
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
| |||
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
1914 | | - | |
| 1914 | + | |
1915 | 1915 | | |
1916 | 1916 | | |
1917 | 1917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
| |||
0 commit comments