Commit 4912d64b authored by limingzhe's avatar limingzhe

fix: debug

parent e653e317
No preview for this file type
......@@ -724,6 +724,8 @@ initMask() {
console.log( ' in initView')
// this.data.isDebug = true;
this.hideMask();
this.initVideo();
......@@ -758,9 +760,10 @@ initMask() {
// rightAnim.scale = 1;
// rightAnim.y = 30;
let display = rightAnim.getComponent(dragonBones.ArmatureDisplay)
display.timeScale = 1;
display.timeScale = 0.5;
rightAnim.scale = 1.5;
rightAnim.scale = 2;
// this.rightAnim = display;
},
......@@ -1033,15 +1036,15 @@ initMask() {
layer.anchorX = 0;
layer.anchorY = 1;
if (!quesData.bgItem2) {
return;
continue;
}
layer.data = quesData.bgItem2;
cc.loader.load({url: quesData.bgItem2.url}, (err, img) => {
quesData.debugBgImg = img;
quesData.checkBg = img;
layer.width = img.width;
......@@ -1093,25 +1096,16 @@ initMask() {
quesData.debugLayer = layer;
const drawLayer = new cc.Node();
quesData.debugLayer.addChild(drawLayer, 2);
quesData.debugDrawLayer = drawLayer;
// if (i != 0) {
// quesData.debugLayer.active = false;
// }
}
},
......@@ -1575,6 +1569,11 @@ showStartLight() {
this.quesIndex++;
this.initCurQues();
if (this.curQues?.debugLayer) {
this.curQues.debugLayer.active = true;
}
// this.initVideoRemote();
return;
......@@ -2764,6 +2763,10 @@ showStartLight() {
const {x, y} = data;
const colorDot = this.getColorDot(x, -y, 0.05, 0.05);
// const colorDot = this.getColorDot(0, 0, 0.05, 0.05);
// this.canvas.addChild(colorDot);
this.curQues.debugDrawLayer.addChild(colorDot, 1);
......@@ -2879,12 +2882,17 @@ showStartLight() {
const dotV2 = new cc.Vec2(rect.x + rect.width/2, rect.y + rect.height / 2);
const checkArr = this.curQues.starRectCheckArr;
// console.log("checkArr: " ,checkArr);
for (let i=0; i<checkArr.length; i++) {
const checkRect = checkArr[i].ccRect;
const key = checkArr[i].data.index + 1;
console.log("checkRect: " ,checkRect);
console.log("dotV2: " ,dotV2);
if (checkRect.contains(dotV2)) {
answerData[key] = {isFinish: true};
}
......@@ -2903,7 +2911,9 @@ showStartLight() {
const animaNode = this.curQues.starAnimaArr[i];
const key = (animaNode.data.index + 1).toString();
// const key = (animaNode.data.index + 1).toString();
const key = (i + 1).toString();
// console.log('~animaNode: ', animaNode)
// console.log('~key: ', key)
......@@ -2966,6 +2976,10 @@ showStartLight() {
w *= this.curQues.debugBgImg.width;
h *= this.curQues.debugBgImg.height;
console.log("w: ~" + w);
console.log("h: ~" + h);
console.log("this.curQues.debugLayer: ~" , this.curQues.debugLayer);
if (this.curQues.debugLayer.parent && this.curQues.debugLayer.active) {
const rect = {
......@@ -3011,6 +3025,8 @@ showStartLight() {
} else if (this.data2 != true) {
photoData = {"page_id":"3","book_name":"LWP_L2_B01_OnTheBoat_LotsofJobs_LOWRES"}
this.data2 = true;
} else if (this.data3 != true) {
......@@ -3027,10 +3043,11 @@ showStartLight() {
this.data6 = true;
}
} else {
// photoData = {"x":"0.55","y":"0.13"};
photoData = {"x":"0.26","y":"0.65"};
photoData = {"x":"0.21","y":"0.80"};
// photoData = {"x":"0.26","y":"0.65"};
// photoData = {"x":"0.64","y":"0.69"}
}
cb(photoData);
......@@ -3757,7 +3774,7 @@ showStartLight() {
rectNode.anchorX = rectNode.anchorY = 0;
if (quesData.bgItem.isShowDebugLine) {
if (quesData.bgItem.isShowDebugLine || this.data.isDebug) {
ctx.rect(0, 0, rectNode.width, rectNode.height);
}
ctx.stroke();
......@@ -3775,6 +3792,7 @@ showStartLight() {
});
}
console.log("rectNode~: ", rectNode);
animaNode.rectNode = rectNode;
......
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