Commit b9f09347 authored by asdf's avatar asdf

去掉预乘

parent 9d03152a
...@@ -65,17 +65,17 @@ cc.Class({ ...@@ -65,17 +65,17 @@ cc.Class({
if (this.data.type == 'Image') { if (this.data.type == 'Image') {
return; return;
} }
GameData.loadDBCount++;
var imageUrl = this.data.tex_png; var imageUrl = this.data.tex_png;
var skeUrl = this.data.ske_json; var skeUrl = this.data.ske_json;
var atlasUrl = this.data.tex_json; var atlasUrl = this.data.tex_json;
// imageUrl = 'http://127.0.0.1/walkingfish_tex.png'; // imageUrl = 'http://127.0.0.1/walkingfish_tex.png';
// skeUrl = 'http://127.0.0.1/walkingfish_ske.json'; // skeUrl = 'http://127.0.0.1/walkingfish_ske.json';
// atlasUrl = 'http://127.0.0.1/walkingfish_tex.json'; // atlasUrl = 'http://127.0.0.1/walkingfish_tex.json';
// if(this.index == 1){
// imageUrl = 'http://127.0.0.1/1_tex.png'; // imageUrl = 'http://127.0.0.1/NewProject_2_tex.png';
// skeUrl = 'http://127.0.0.1/1_ske.json'; // skeUrl = 'http://127.0.0.1/NewProject_2_ske.json';
// atlasUrl = 'http://127.0.0.1/1_tex.json'; // atlasUrl = 'http://127.0.0.1/NewProject_2_tex.json';
// }
cc.assetManager.loadAny([{ url: atlasUrl, ext: '.txt' }, { url: skeUrl, ext: '.txt' }], (error, assets) => { cc.assetManager.loadAny([{ url: atlasUrl, ext: '.txt' }, { url: skeUrl, ext: '.txt' }], (error, assets) => {
if (error) { if (error) {
console.log(error) console.log(error)
...@@ -105,20 +105,8 @@ cc.Class({ ...@@ -105,20 +105,8 @@ cc.Class({
this.animationName = data.animation[0].name; this.animationName = data.animation[0].name;
this.dragonBone.animationName = this.animationName; this.dragonBone.animationName = this.animationName;
GameData.loadDBCb.push(() => { // this.dragonBone.premultipliedAlpha = true;
if(this.hadSetPremultiplyAlpha){ // atlas.texture.setPremultiplyAlpha(true);
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.setSpineScale(data.canvas); this.setSpineScale(data.canvas);
} }
......
...@@ -83,8 +83,6 @@ cc.Class({ ...@@ -83,8 +83,6 @@ cc.Class({
window.GameData = {}; window.GameData = {};
GameData._currPageIndex = 0; GameData._currPageIndex = 0;
GameData._isPageTurning = false; GameData._isPageTurning = false;
GameData.loadDBCount = 0;
GameData.loadDBCb = [];
}, },
_designSize: null, // 设计分辨率 _designSize: null, // 设计分辨率
...@@ -254,7 +252,6 @@ cc.Class({ ...@@ -254,7 +252,6 @@ cc.Class({
* 初始化下方小圆点 * 初始化下方小圆点
*/ */
initIndicators() { initIndicators() {
console.log(this.data)
let len = this.data.contentObj.dataArray.length; let len = this.data.contentObj.dataArray.length;
let haveCover = this.data.contentObj.haveCover; let haveCover = this.data.contentObj.haveCover;
for (let i = 0; i < len; i++) { 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