@@ -248,6 +248,8 @@ Object.assign(pc, function () {
248
248
_updateMeshInfos : function ( ) {
249
249
var i ;
250
250
251
+ // make sure we have as many meshInfo entries
252
+ // as the number of font textures and outline passes
251
253
var multiPassNeeded = ( this . _outlineThickness > 1.0 && this . _outlineColor . a > 0 ) ;
252
254
253
255
var passes = [ ] ;
@@ -1583,11 +1585,9 @@ Object.assign(pc, function () {
1583
1585
set : function ( value ) {
1584
1586
1585
1587
var previousFontType ;
1586
- // var previousFontVersion;
1587
1588
1588
1589
if ( this . _font ) {
1589
1590
previousFontType = this . _font . type ;
1590
- // previousFontVersion = this._font.data.version;
1591
1591
1592
1592
// remove render event listener
1593
1593
if ( this . _font . off ) this . _font . off ( 'render' , this . _onFontRender , this ) ;
@@ -1628,22 +1628,9 @@ Object.assign(pc, function () {
1628
1628
this . _updateMaterial ( screenSpace ) ;
1629
1629
}
1630
1630
1631
- // make sure we have as many meshInfo entries
1632
- // as the number of font textures and outline passes
1633
-
1634
1631
this . _multiPassEnabled = ! ( this . _outlineThickness > 1.0 && this . _outlineColor . a > 0 ) ; // this line forces a call to _updateMeshInfos
1635
1632
1636
1633
this . _updateText ( ) ;
1637
-
1638
- // if font version has changed we will need to change the _outlineThicknessScale and update the material parameter
1639
- // if (value.data.version !== previousFontVersion) {
1640
- // this._outlineThicknessScale = (this._font.data.version == 3) ? 0.2 : 0.1;
1641
- //
1642
- // for (var i = 0; i < this._model.meshInstances.length; i++) {
1643
- // var mi = this._model.meshInstances[i];
1644
- // mi.setParameter("outline_thickness", this._outlineThicknessScale * Math.min(this._outlineThickness,(this._font.data.version==3) ? 1.0 : 5.0));
1645
- // }
1646
- // }
1647
1634
}
1648
1635
} ) ;
1649
1636
0 commit comments