Add Texture premultiply alpha serialization support

This commit is contained in:
pandamicro
2018-05-18 15:01:38 +08:00
parent 04d7e58462
commit 92865d88da
+6 -1
View File
@@ -657,7 +657,10 @@ var Texture2D = cc.Class({
}
}
}
let asset = "" + extId + "," + this._minFilter + "," + this._magFilter + "," + this._wrapS + "," + this._wrapT;
let asset = "" + extId + "," +
this._minFilter + "," + this._magFilter + "," +
this._wrapS + "," + this._wrapT + "," +
(this._premultiplyAlpha ? 1 : 0);
return asset;
},
@@ -687,6 +690,8 @@ var Texture2D = cc.Class({
// decode wraps
this._wrapS = parseInt(fields[3]);
this._wrapT = parseInt(fields[4]);
// decode premultiply alpha
this._premultiplyAlpha = !!parseInt(fields[5]);
}
}
});