Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP_18
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
OP_18
Commits
4a5fbb1e
Commit
4a5fbb1e
authored
Nov 15, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
94323bf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
OP_18.js
assets/OP_18/scene/OP_18.js
+36
-36
No files found.
assets/OP_18/scene/OP_18.js
View file @
4a5fbb1e
...
...
@@ -843,8 +843,8 @@ cc.Class({
spr
.
node
.
y
=
animNode
.
y
;
spr
.
node
.
scale
=
animNode
.
scale
;
console
.
log
(
'
spr.node.width:
'
,
spr
.
node
.
width
)
console
.
log
(
'
spr.node.height:
'
,
spr
.
node
.
height
)
//
console.log(' spr.node.width: ', spr.node.width)
//
console.log(' spr.node.height: ', spr.node.height)
})
}
},
...
...
@@ -1984,27 +1984,27 @@ cc.Class({
//
if (this.debugLayer.parent && this.debugLayer.active) {
if
(
this
.
debugLayer
.
parent
&&
this
.
debugLayer
.
active
)
{
//
if (this.isCanDraw) {
//
return;
//
}
//
this.isCanDraw = true;
if
(
this
.
isCanDraw
)
{
return
;
}
this
.
isCanDraw
=
true
;
//
delayCall(0.1, () => {
//
this.isCanDraw = false;
//
})
//
}
delayCall
(
0.1
,
()
=>
{
this
.
isCanDraw
=
false
;
})
}
//
this.pushNodePoolArr();
this
.
pushNodePoolArr
();
//
if (!this.canTouch && isPool == false) {
//
this.dataPool.push(data);
//
console.log('! cantouch')
//
return;
//
}
if
(
!
this
.
canTouch
&&
isPool
==
false
)
{
this
.
dataPool
.
push
(
data
);
console
.
log
(
'
! cantouch
'
)
return
;
}
// this.changeBboxPos(data);
...
...
@@ -2453,7 +2453,7 @@ cc.Class({
}
console
.
log
(
'
answerData:
'
,
answerData
);
//
console.log('answerData: ', answerData);
// console.log('this.picNodeArr: ', this.picNodeArr);
if
(
Object
.
keys
(
answerData
).
length
==
0
)
{
...
...
@@ -2482,8 +2482,8 @@ cc.Class({
const
bigNodeArr
=
this
.
writeNodeArr1
;
const
smallNodeArr
=
this
.
writeNodeArr2
;
console
.
log
(
'
bigNodeArr:
'
,
bigNodeArr
);
console
.
log
(
'
smallNodeArr:
'
,
smallNodeArr
);
//
console.log('bigNodeArr: ', bigNodeArr);
//
console.log('smallNodeArr: ', smallNodeArr);
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
const
keyB
=
i
+
'
_
'
+
'
b
'
;
...
...
@@ -2659,7 +2659,7 @@ cc.Class({
// label.color = cc.Color.RED;
const
l
=
label
.
getComponent
(
cc
.
Label
);
label
.
anchorX
=
0
;
console
.
log
(
'
sentence~:
'
,
sentence
);
//
console.log(' sentence~: ', sentence);
}
...
...
@@ -2676,13 +2676,13 @@ cc.Class({
},
checkIsInsert
(
textArr
,
sentence
)
{
console
.
log
(
'
textArr:
'
,
textArr
);
console
.
log
(
'
sentence:
'
,
sentence
);
//
console.log('textArr: ', textArr);
//
console.log('sentence: ', sentence);
let
index
=
-
1
;
for
(
let
i
=
0
;
i
<
textArr
.
length
;
i
++
)
{
index
=
sentence
.
indexOf
(
textArr
[
i
],
index
);
console
.
log
(
'
index:
'
,
index
);
//
console.log('index: ', index);
if
(
index
==
-
1
)
{
return
false
;
}
...
...
@@ -3149,7 +3149,7 @@ cc.Class({
return
false
;
}
console
.
log
(
'
in getAnswerData:
'
,
text
);
//
console.log(' in getAnswerData: ', text);
const
benchmark1LabelData
=
this
.
benchmark1LabelData
;
let
benchmark2LabelData
;
...
...
@@ -3223,7 +3223,7 @@ cc.Class({
// console.log(' unitW ~~~ ', unitW);
// console.log(' unitH ~~~ ', unitH);
console
.
log
(
"
centerItemArr:
"
,
centerItemArr
);
//
console.log("centerItemArr: ", centerItemArr);
const
dotArr
=
[];
for
(
let
i
=
0
;
i
<
this
.
centerItemArr
.
length
;
i
++
)
{
...
...
@@ -3310,10 +3310,10 @@ cc.Class({
console
.
log
(
'
colorRect:
'
,
colorRect
);
console
.
log
(
'
dotArr:
'
,
dotArr
);
console
.
log
(
'
answerData:
'
,
answerData
.
toString
());
console
.
log
(
'
wordDataArr[i]:
'
,
wordDataArr
[
i
].
toString
());
//
console.log('colorRect: ', colorRect);
//
console.log('dotArr: ', dotArr);
//
console.log('answerData: ', answerData.toString());
//
console.log('wordDataArr[i]: ', wordDataArr[i].toString());
this
.
setOneAnswerData
(
colorRect
,
dotArr
,
answerData
,
wordDataArr
[
i
]);
...
...
@@ -3351,8 +3351,8 @@ cc.Class({
const
{
left
,
right
,
top
,
bottom
}
=
curTextArr
[
i
];
const
text
=
curTextArr
[
i
].
content
;
console
.
log
(
'
text..
'
,
JSON
.
stringify
(
curTextArr
[
i
]
));
console
.
log
(
'
text..
'
,
text
);
//
console.log('text..', JSON.stringify( curTextArr[i] ));
//
console.log('text..', text);
const
disW
=
(
right
-
left
)
/
text
.
length
;
const
disH
=
(
bottom
-
top
);
for
(
let
j
=
0
;
j
<
text
.
length
;
j
++
)
{
...
...
@@ -3453,7 +3453,7 @@ cc.Class({
const
unitH
=
-
topLabelData
.
top
+
bottomLabelData
.
bottom
;
const
rate
=
0.26
;
console
.
log
(
'
unitH:
'
,
unitH
);
//
console.log('unitH: ', unitH);
let
rectH
;
...
...
@@ -3464,7 +3464,7 @@ cc.Class({
if
(
-
topLeftPosY
>
-
topLabelData
.
top
-
totalH
/
3
)
{
unit
=
topLeftLetter
.
bottom
-
topLabelData
.
bottom
;
console
.
log
(
'
unit:
'
,
unit
);
//
console.log('unit: ', unit);
// 50
...
...
@@ -3481,7 +3481,7 @@ cc.Class({
rectW
=
0.54
*
rate
*
unitH
;
//27;
disW
=
0.6
*
rate
*
unitH
;
//46;
console
.
log
(
'
unit:
'
,
unit
);
//
console.log('unit: ', unit);
}
...
...
@@ -3627,7 +3627,7 @@ cc.Class({
// if (labelText.toLowerCase().indexOf(targetLabelText.toLowerCase()) != -1 && rect.intersects(dotRect)) {
const
len
=
targetLabelText
.
trim
().
length
;
console
.
log
(
'
len:
'
,
len
);
//
console.log('len: ', len);
if
(
!
answerData
[
key
])
{
answerData
[
key
]
=
{
colorRect
,
count
:
len
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment