Commit 9817ea0f authored by 范雪寒's avatar 范雪寒

feat: test

parent 0fdb58bc
......@@ -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===`);
......
......@@ -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_09_plus',
// 'op_03_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);
});
});
});
......
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