File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -1664,18 +1664,6 @@ class RenderWebGL extends EventEmitter {
1664
1664
this . _regionId = null ;
1665
1665
}
1666
1666
1667
- /**
1668
- * Get the screen-space scale of a drawable, as percentages of the drawable's "normal" size.
1669
- * @param {Drawable } drawable The drawable whose screen-space scale we're fetching.
1670
- * @returns {Array<number> } The screen-space X and Y dimensions of the drawable's scale, as percentages.
1671
- */
1672
- _getDrawableScreenSpaceScale ( drawable ) {
1673
- return [
1674
- drawable . scale [ 0 ] * this . _gl . canvas . width / this . _nativeSize [ 0 ] ,
1675
- drawable . scale [ 1 ] * this . _gl . canvas . height / this . _nativeSize [ 1 ]
1676
- ] ;
1677
- }
1678
-
1679
1667
/**
1680
1668
* Draw a set of Drawables, by drawable ID
1681
1669
* @param {Array<int> } drawables The Drawable IDs to draw, possibly this._drawList.
@@ -1708,7 +1696,10 @@ class RenderWebGL extends EventEmitter {
1708
1696
if ( ! drawable . getVisible ( ) && ! opts . ignoreVisibility ) continue ;
1709
1697
1710
1698
// Combine drawable scale with the native vs. backing pixel ratio
1711
- const drawableScale = this . _getDrawableScreenSpaceScale ( drawable ) ;
1699
+ const drawableScale = [
1700
+ drawable . scale [ 0 ] * this . _gl . canvas . width / this . _nativeSize [ 0 ] ,
1701
+ drawable . scale [ 1 ] * this . _gl . canvas . height / this . _nativeSize [ 1 ]
1702
+ ] ;
1712
1703
1713
1704
// If the skin or texture isn't ready yet, skip it.
1714
1705
if ( ! drawable . skin || ! drawable . skin . getTexture ( drawableScale ) ) continue ;
You can’t perform that action at this time.
0 commit comments