Commit b9f09347 authored by asdf's avatar asdf

去掉预乘

parent 9d03152a
......@@ -65,17 +65,17 @@ cc.Class({
if (this.data.type == 'Image') {
return;
}
GameData.loadDBCount++;
var imageUrl = this.data.tex_png;
var skeUrl = this.data.ske_json;
var atlasUrl = this.data.tex_json;
// imageUrl = 'http://127.0.0.1/walkingfish_tex.png';
// skeUrl = 'http://127.0.0.1/walkingfish_ske.json';
// atlasUrl = 'http://127.0.0.1/walkingfish_tex.json';
// imageUrl = 'http://127.0.0.1/1_tex.png';
// skeUrl = 'http://127.0.0.1/1_ske.json';
// atlasUrl = 'http://127.0.0.1/1_tex.json';
// if(this.index == 1){
// imageUrl = 'http://127.0.0.1/NewProject_2_tex.png';
// skeUrl = 'http://127.0.0.1/NewProject_2_ske.json';
// atlasUrl = 'http://127.0.0.1/NewProject_2_tex.json';
// }
cc.assetManager.loadAny([{ url: atlasUrl, ext: '.txt' }, { url: skeUrl, ext: '.txt' }], (error, assets) => {
if (error) {
console.log(error)
......@@ -105,20 +105,8 @@ cc.Class({
this.animationName = data.animation[0].name;
this.dragonBone.animationName = this.animationName;
GameData.loadDBCb.push(() => {
if(this.hadSetPremultiplyAlpha){
return;
}
this.hadSetPremultiplyAlpha = true;
this.dragonBone.premultipliedAlpha = true;
this.dragonBone.dragonAtlasAsset.texture.setPremultiplyAlpha(true);
})
GameData.loadDBCount--;
if (GameData.loadDBCount <= 0) {
for (let i = 0; i < GameData.loadDBCb.length; i++) {
GameData.loadDBCb[i] && GameData.loadDBCb[i]();
}
}
// this.dragonBone.premultipliedAlpha = true;
// atlas.texture.setPremultiplyAlpha(true);
this.setSpineScale(data.canvas);
}
......
......@@ -83,8 +83,6 @@ cc.Class({
window.GameData = {};
GameData._currPageIndex = 0;
GameData._isPageTurning = false;
GameData.loadDBCount = 0;
GameData.loadDBCb = [];
},
_designSize: null, // 设计分辨率
......@@ -254,7 +252,6 @@ cc.Class({
* 初始化下方小圆点
*/
initIndicators() {
console.log(this.data)
let len = this.data.contentObj.dataArray.length;
let haveCover = this.data.contentObj.haveCover;
for (let i = 0; i < len; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment