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
50691f21
Commit
50691f21
authored
Nov 07, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
5bf17130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
OP_18.js
assets/OP_18/scene/OP_18.js
+28
-1
No files found.
assets/OP_18/scene/OP_18.js
View file @
50691f21
...
...
@@ -2669,13 +2669,20 @@ cc.Class({
getTempWordArr
(
line
,
splitText
)
{
if
(
line
.
characters
)
{
return
getArrByCharacters
(
line
);
}
const
lineBox
=
{
left
:
line
.
left
,
top
:
line
.
top
,
right
:
line
.
right
,
bottom
:
line
.
bottom
};
const
baseX
=
lineBox
.
left
;
let
textIndex
=
0
;
const
oneDisW
=
(
lineBox
.
right
-
lineBox
.
left
)
/
line
.
content
.
length
;
const
arr
=
line
.
content
.
split
(
splitText
);
let
arr
=
line
.
content
.
split
(
splitText
);
const
wordArr
=
[];
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
content
=
arr
[
i
];
...
...
@@ -2693,6 +2700,26 @@ cc.Class({
return
wordArr
;
},
getArrByCharacters
(
line
)
{
const
wordArr
=
[];
const
arr
=
line
.
characters
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
const
{
character
,
poly
}
=
arr
[
i
];
const
content
=
character
;
const
location
=
{}
location
.
left
=
poly
[
0
];
location
.
top
=
poly
[
1
];
location
.
right
=
poly
[
2
];
location
.
bottom
=
poly
[
7
];
wordArr
.
push
({
content
,
location
});
}
return
wordArr
;
},
getPhotoWordArr
(
text
,
block
,
benchmark1Data
)
{
const
wordArr
=
[];
...
...
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