mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
Add Texture premultiply alpha serialization support
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user