Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_debug
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
middleLayer_for_debug
Commits
9817ea0f
Commit
9817ea0f
authored
Dec 06, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: test
parent
0fdb58bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
air.js
assets/middleLayer_for_debug/script/air.js
+1
-1
middleLayer.js
assets/middleLayer_for_debug/script/middleLayer.js
+6
-4
No files found.
assets/middleLayer_for_debug/script/air.js
View file @
9817ea0f
...
...
@@ -138,7 +138,7 @@ export function initAir(_this) {
callback
&&
callback
(
JSON
.
stringify
(
res
));
window
.
air
.
recognitionCameraCallBack
=
null
;
};
this
.
callOcMethod
(
"
openRecognitionCamera
"
,
{});
window
.
courseware
.
callOcMethod
(
"
openRecognitionCamera
"
,
{});
},
getEngineInfo
(
callback
)
{
_this
.
log
(
`===成功调用getEngineInfo===`
);
...
...
assets/middleLayer_for_debug/script/middleLayer.js
View file @
9817ea0f
...
...
@@ -103,6 +103,7 @@ cc.Class({
if
(
data1
.
rows
&&
data1
.
rows
.
length
>
0
)
{
this
.
preloadCount
+=
data1
.
rows
.
length
;
}
console
.
log
(
'
data.rows =
'
+
JSON
.
stringify
(
data
.
rows
));
this
.
batchPreloadScene
(
data
.
rows
);
this
.
preloadSource
(
data1
.
rows
);
});
...
...
@@ -111,14 +112,14 @@ cc.Class({
batchPreloadScene
(
scenes
=
[])
{
const
expects
=
[
// 'op_0
9_plus
',
// 'op_0
3_2
',
// 'OP10_online',
];
const
_this
=
this
;
let
i
=
0
;
const
load
=
function
()
{
const
scene
=
scenes
[
i
];
if
(
expects
.
includes
(
scene
.
sceneName
))
{
if
(
expects
.
includes
(
scene
.
sceneName
))
{
_this
.
loadedCount
++
;
_this
.
updateProcessBar
();
i
++
;
...
...
@@ -131,7 +132,7 @@ cc.Class({
}
cc
.
assetManager
.
loadBundle
(
scene
.
bondleUrl
,
{
version
:
scene
.
version
},
(
err
,
bundle
)
=>
{
console
.
log
(
`
${
scene
.
bondleUrl
}
---场景开始loadBundle----`
);
if
(
!
bundle
)
{
if
(
!
bundle
)
{
console
.
log
(
"
=====liu=======
"
,
JSON
.
stringify
(
err
));
_this
.
loadedCount
++
;
_this
.
updateProcessBar
();
...
...
@@ -427,7 +428,7 @@ cc.Class({
if
(
err
)
{
return
this
.
asyncDelayLog
(
err
);
}
bundle
.
loadScene
(
sceneName
,
(
err
,
scene
)
=>
{
bundle
.
loadScene
(
sceneName
,
null
,
null
,
(
err
,
scene
)
=>
{
if
(
err
)
{
this
.
asyncDelayLog
(
'
err:
'
,
err
);
}
...
...
@@ -439,6 +440,7 @@ cc.Class({
cc
.
find
(
'
middleLayer/ExitBtn
'
).
active
=
true
;
this
.
hideWaitingLetters
();
middleLayer
.
scale
=
Canvas
.
width
/
middleLayer
.
width
;
console
.
log
(
'
middleLayer.scale =
'
+
middleLayer
.
scale
);
});
});
});
...
...
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