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

feat: test

parent 0fdb58bc
...@@ -138,7 +138,7 @@ export function initAir(_this) { ...@@ -138,7 +138,7 @@ export function initAir(_this) {
callback && callback(JSON.stringify(res)); callback && callback(JSON.stringify(res));
window.air.recognitionCameraCallBack = null; window.air.recognitionCameraCallBack = null;
}; };
this.callOcMethod("openRecognitionCamera", {}); window.courseware.callOcMethod("openRecognitionCamera", {});
}, },
getEngineInfo(callback) { getEngineInfo(callback) {
_this.log(`===成功调用getEngineInfo===`); _this.log(`===成功调用getEngineInfo===`);
......
...@@ -103,6 +103,7 @@ cc.Class({ ...@@ -103,6 +103,7 @@ cc.Class({
if (data1.rows && data1.rows.length > 0) { if (data1.rows && data1.rows.length > 0) {
this.preloadCount += data1.rows.length; this.preloadCount += data1.rows.length;
} }
console.log('data.rows = ' + JSON.stringify(data.rows));
this.batchPreloadScene(data.rows); this.batchPreloadScene(data.rows);
this.preloadSource(data1.rows); this.preloadSource(data1.rows);
}); });
...@@ -111,14 +112,14 @@ cc.Class({ ...@@ -111,14 +112,14 @@ cc.Class({
batchPreloadScene(scenes = []) { batchPreloadScene(scenes = []) {
const expects = [ const expects = [
// 'op_09_plus', // 'op_03_2',
// 'OP10_online', // 'OP10_online',
]; ];
const _this = this; const _this = this;
let i = 0; let i = 0;
const load = function () { const load = function () {
const scene = scenes[i]; const scene = scenes[i];
if(expects.includes(scene.sceneName)){ if (expects.includes(scene.sceneName)) {
_this.loadedCount++; _this.loadedCount++;
_this.updateProcessBar(); _this.updateProcessBar();
i++; i++;
...@@ -131,7 +132,7 @@ cc.Class({ ...@@ -131,7 +132,7 @@ cc.Class({
} }
cc.assetManager.loadBundle(scene.bondleUrl, { version: scene.version }, (err, bundle) => { cc.assetManager.loadBundle(scene.bondleUrl, { version: scene.version }, (err, bundle) => {
console.log(`${scene.bondleUrl}---场景开始loadBundle----`); console.log(`${scene.bondleUrl}---场景开始loadBundle----`);
if(!bundle){ if (!bundle) {
console.log("=====liu=======", JSON.stringify(err)); console.log("=====liu=======", JSON.stringify(err));
_this.loadedCount++; _this.loadedCount++;
_this.updateProcessBar(); _this.updateProcessBar();
...@@ -427,7 +428,7 @@ cc.Class({ ...@@ -427,7 +428,7 @@ cc.Class({
if (err) { if (err) {
return this.asyncDelayLog(err); return this.asyncDelayLog(err);
} }
bundle.loadScene(sceneName, (err, scene) => { bundle.loadScene(sceneName, null, null, (err, scene) => {
if (err) { if (err) {
this.asyncDelayLog('err: ', err); this.asyncDelayLog('err: ', err);
} }
...@@ -439,6 +440,7 @@ cc.Class({ ...@@ -439,6 +440,7 @@ cc.Class({
cc.find('middleLayer/ExitBtn').active = true; cc.find('middleLayer/ExitBtn').active = true;
this.hideWaitingLetters(); this.hideWaitingLetters();
middleLayer.scale = Canvas.width / middleLayer.width; 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