File tree Expand file tree Collapse file tree
src/framework/components/element Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ class TextElement {
515515 this . _shadowColorUniform [ 2 ] = this . _shadowColor . b ;
516516 this . _shadowColorUniform [ 3 ] = this . _shadowColor . a ;
517517 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 ;
519519 this . _shadowOffsetUniform [ 0 ] = this . _shadowOffsetScale * this . _shadowOffset . x ;
520520 this . _shadowOffsetUniform [ 1 ] = ratio * this . _shadowOffsetScale * this . _shadowOffset . y ;
521521 mi . setParameter ( "shadow_offset" , this . _shadowOffsetUniform ) ;
@@ -1738,7 +1738,7 @@ class TextElement {
17381738
17391739 if ( this . _font && this . _model ) {
17401740 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 ;
17421742 this . _shadowOffsetUniform [ 0 ] = this . _shadowOffsetScale * this . _shadowOffset . x ;
17431743 this . _shadowOffsetUniform [ 1 ] = ratio * this . _shadowOffsetScale * this . _shadowOffset . y ;
17441744 var mi = this . _model . meshInstances [ i ] ;
You can’t perform that action at this time.
0 commit comments