@@ -57,7 +57,7 @@ function Mesh (node, options) {
5757 positionOffset : null ,
5858 normals : null ,
5959 glossiness : {
60- factor : null ,
60+ strength : null ,
6161 color : [ 0 , 0 , 0 ]
6262 }
6363 } ;
@@ -304,18 +304,18 @@ Mesh.prototype.setGlossiness = function setGlossiness(glossiness, specularColor)
304304 var hasSpecularColor = specularColor && specularColor . getNormalizedRGB ;
305305
306306 if ( isMaterial ) {
307- this . value . glossiness . factor = null ;
307+ this . value . glossiness . strength = null ;
308308 this . value . expressions . glossiness = glossiness ;
309309 }
310310 else {
311311 this . value . expressions . glossiness = null ;
312- this . value . glossiness . factor = glossiness ;
312+ this . value . glossiness . strength = glossiness ;
313313 var glossinessValue = this . value . glossiness . color ;
314314 if ( hasSpecularColor ) {
315315 this . value . glossiness . color = specularColor ;
316316 glossinessValue = this . value . glossiness . color . getNormalizedRGB ( ) ;
317317 }
318- glossinessValue . push ( this . value . glossiness . factor ) ;
318+ glossinessValue . push ( this . value . glossiness . strength ) ;
319319 glossiness = glossinessValue ;
320320 }
321321
@@ -334,7 +334,7 @@ Mesh.prototype.setGlossiness = function setGlossiness(glossiness, specularColor)
334334 *
335335 * @method
336336 *
337- * @returns {MaterialExpress|Number } MaterialExpress or Number
337+ * @returns {MaterialExpress|Object } MaterialExpression or Glossiness
338338 */
339339Mesh . prototype . getGlossiness = function getGlossiness ( ) {
340340 return this . value . expressions . glossiness || this . value . glossiness ;
@@ -457,7 +457,7 @@ Mesh.prototype.onUpdate = function onUpdate() {
457457 this . _node . sendDrawCommand ( 'GL_UNIFORMS' ) ;
458458 this . _node . sendDrawCommand ( 'u_glossiness' ) ;
459459 var glossiness = this . value . glossiness . color . getNormalizedRGB ( ) ;
460- glossiness . push ( this . value . glossiness . factor ) ;
460+ glossiness . push ( this . value . glossiness . strength ) ;
461461 this . _node . sendDrawCommand ( glossiness ) ;
462462 this . _node . requestUpdateOnNextTick ( this . _id ) ;
463463 }
@@ -657,7 +657,7 @@ Mesh.prototype.draw = function draw () {
657657
658658 if ( value . geometry != null ) this . setGeometry ( value . geometry ) ;
659659 if ( value . color != null ) this . setBaseColor ( value . color ) ;
660- if ( value . glossiness . factor != null ) this . setGlossiness . apply ( this , value . glossiness . factor ) ;
660+ if ( value . glossiness . strength != null ) this . setGlossiness . apply ( this , value . glossiness . strength ) ;
661661 if ( value . drawOptions != null ) this . setDrawOptions ( value . drawOptions ) ;
662662 if ( value . flatShading != null ) this . setFlatShading ( value . flatShading ) ;
663663
0 commit comments