File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/framework/components/element Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ class TextElement {
515
515
this . _shadowColorUniform [ 2 ] = this . _shadowColor . b ;
516
516
this . _shadowColorUniform [ 3 ] = this . _shadowColor . a ;
517
517
mi . setParameter ( "shadow_color" , this . _shadowColorUniform ) ;
518
- var ratio = this . _font . data . info . maps [ i ] . width / this . _font . data . info . maps [ i ] . height ;
518
+ var ratio = - this . _font . data . info . maps [ i ] . width / this . _font . data . info . maps [ i ] . height ;
519
519
this . _shadowOffsetUniform [ 0 ] = this . _shadowOffsetScale * this . _shadowOffset . x ;
520
520
this . _shadowOffsetUniform [ 1 ] = ratio * this . _shadowOffsetScale * this . _shadowOffset . y ;
521
521
mi . setParameter ( "shadow_offset" , this . _shadowOffsetUniform ) ;
@@ -1738,7 +1738,7 @@ class TextElement {
1738
1738
1739
1739
if ( this . _font && this . _model ) {
1740
1740
for ( var i = 0 , len = this . _model . meshInstances . length ; i < len ; i ++ ) {
1741
- var ratio = this . _font . data . info . maps [ i ] . width / this . _font . data . info . maps [ i ] . height ;
1741
+ var ratio = - this . _font . data . info . maps [ i ] . width / this . _font . data . info . maps [ i ] . height ;
1742
1742
this . _shadowOffsetUniform [ 0 ] = this . _shadowOffsetScale * this . _shadowOffset . x ;
1743
1743
this . _shadowOffsetUniform [ 1 ] = ratio * this . _shadowOffsetScale * this . _shadowOffset . y ;
1744
1744
var mi = this . _model . meshInstances [ i ] ;
You can’t perform that action at this time.
0 commit comments