Skip to content

Commit

Permalink
check alphaop length
Browse files Browse the repository at this point in the history
  • Loading branch information
chapulina committed May 25, 2018
1 parent 0286bd7 commit 9f160f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gz3d/src/gzogre2json.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ GZ3D.Ogre2Json.prototype.Parse = function(_str)
// Opacity
var alphaOpEx = _.get(this.materialObj[material],
matName + '.technique.pass.texture_unit.alpha_op_ex');
if (alphaOpEx !== undefined)
if (alphaOpEx !== undefined && alphaOpEx.length === 4)
{
this.materials[matName]['opacity'] = Number(alphaOpEx[3]);
}
Expand Down

0 comments on commit 9f160f7

Please sign in to comment.