Don't check skeleton alpha, use flags instead.

This commit is contained in:
Richard Davey 2020-10-20 17:57:59 +01:00
parent 552c2a15a6
commit ce3645cbb2

View file

@ -252,17 +252,14 @@ var SpineGameObject = new Class({
*/
willRender: function (camera)
{
var skeleton = this.skeleton;
if (!skeleton)
if (!this.skeleton)
{
return false;
}
var GameObjectRenderMask = 15;
var childAlpha = skeleton.color.a;
return !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)) || childAlpha === 0);
return !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));
},
/**