Commit 9044b989 authored by limingzhe's avatar limingzhe

fix: getData

parent ba00d31c
No preview for this file type
......@@ -101,9 +101,21 @@ cc.Class({
this.preload();
},
getData(func) {
func(this.getDefaultData());
},
getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, 'scene');
return;
}
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
},
getDefaultData() {
......
{"ios":{"sceneName":"cc_mz_003","version":"ec4a5"},"android":{"sceneName":"cc_mz_003","version":"ec4a5"}}
\ No newline at end of file
{"ios":{"sceneName":"cc_mz_003","version":"e1a9b"},"android":{"sceneName":"cc_mz_003","version":"e1a9b"}}
\ No newline at end of file
......@@ -21,13 +21,13 @@
"c2jiwBCkpLKLROfPfGjwzP",
"07NeQx+mFJuaO0iSf/XOf0",
"13f0B3Hs9MPJcknfF1lO29",
"2eqAEk7JxKRIr+HqH7Z9wG",
"1ciKmQBHxNJJlsKdmvSAmg",
"2eqAEk7JxKRIr+HqH7Z9wG",
"02delMVqdBD70a/HSD99FK",
"93IDVMKShKZ70YLiLzQc9/",
"f3sNbslDJMIZ96Djt5W/Jn",
"f0gGIRqHNJKZHFIwxht8RR",
"d8HsitJHxOYqo801xBk8ev",
"f0gGIRqHNJKZHFIwxht8RR",
"2dIkcnaOFP14UhPDlNShCl",
"54BxrCQpNG/5bxKIuok1Vo",
"3dZisF9stDtoGZRqitNVc4",
......
......@@ -335,6 +335,16 @@ window.__require = function e(t, n, r) {
this.preload();
},
getData: function getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, "scene");
return;
}
var middleLayer = cc.find("middleLayer");
if (middleLayer) {
var middleLayerComponent = middleLayer.getComponent("middleLayer");
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
},
getDefaultData: function getDefaultData() {
......
......@@ -41858,14 +41858,14 @@
}
}
function deserializeCCObject(data, objectData) {
var mask = data[4][objectData[0]];
var clazz = mask[0];
var ctor = clazz[0];
var mask = data[4][objectData[OBJ_DATA_MASK]];
var clazz = mask[MASK_CLASS];
var ctor = clazz[CLASS_TYPE];
var obj = new ctor();
var keys = clazz[1];
var classTypeOffset = clazz[2];
var keys = clazz[CLASS_KEYS];
var classTypeOffset = clazz[CLASS_PROP_TYPE_OFFSET];
var maskTypeOffset = mask[mask.length - 1];
var i = 1;
var i = MASK_CLASS + 1;
for (;i < maskTypeOffset; ++i) {
var _key = keys[mask[i]];
obj[_key] = objectData[i];
......@@ -41903,15 +41903,15 @@
owner[key] = deserializeCCObject(data, value);
}
function parseCustomClass(data, owner, key, value) {
var ctor = data[3][value[0]];
owner[key] = deserializeCustomCCObject(data, ctor, value[1]);
var ctor = data[3][value[CUSTOM_OBJ_DATA_CLASS]];
owner[key] = deserializeCustomCCObject(data, ctor, value[CUSTOM_OBJ_DATA_CONTENT]);
}
function parseValueTypeCreated(data, owner, key, value) {
BuiltinValueTypeSetters[value[0]](owner[key], value);
BuiltinValueTypeSetters[value[VALUETYPE_SETTER]](owner[key], value);
}
function parseValueType(data, owner, key, value) {
var val = new BuiltinValueTypes[value[0]]();
BuiltinValueTypeSetters[value[0]](val, value);
var val = new BuiltinValueTypes[value[VALUETYPE_SETTER]]();
BuiltinValueTypeSetters[value[VALUETYPE_SETTER]](val, value);
owner[key] = val;
}
function parseTRS(data, owner, key, value) {
......@@ -41919,9 +41919,9 @@
typedArray.set(value);
}
function parseDict(data, owner, key, value) {
var dict = value[0];
var dict = value[DICT_JSON_LAYOUT];
owner[key] = dict;
for (var i = 1; i < value.length; i += 3) {
for (var i = DICT_JSON_LAYOUT + 1; i < value.length; i += 3) {
var _key3 = value[i];
var _type2 = value[i + 1];
var subValue = value[i + 2];
......@@ -41930,7 +41930,7 @@
}
}
function parseArray(data, owner, key, value) {
var array = value[0];
var array = value[ARRAY_ITEM_VALUES];
owner[key] = array;
for (var i = 0; i < array.length; ++i) {
var subValue = array[i];
......@@ -41958,7 +41958,7 @@
function parseInstances(data) {
var instances = data[5];
var instanceTypes = data[6];
var instanceTypesLen = 0 === instanceTypes ? 0 : instanceTypes.length;
var instanceTypesLen = instanceTypes === EMPTY_PLACEHOLDER ? 0 : instanceTypes.length;
var rootIndex = instances[instances.length - 1];
var normalObjectCount = instances.length - instanceTypesLen;
if ("number" !== typeof rootIndex) rootIndex = 0; else {
......@@ -42010,8 +42010,8 @@
var klassLayout = classes[i];
if ("string" !== typeof klassLayout) {
true;
if ("function" === typeof klassLayout[0]) throw new Error("Can not deserialize the same JSON data again.");
var _type5 = klassLayout[0];
if ("function" === typeof klassLayout[CLASS_TYPE]) throw new Error("Can not deserialize the same JSON data again.");
var _type5 = klassLayout[CLASS_TYPE];
doLookupClass(classFinder, _type5, klassLayout, CLASS_TYPE, silent, customFinder);
} else doLookupClass(classFinder, klassLayout, classes, i, silent, customFinder);
}
......@@ -42022,7 +42022,7 @@
var classes = data[3];
for (var i = 0; i < masks.length; ++i) {
var mask = masks[i];
mask[0] = classes[mask[0]];
mask[MASK_CLASS] = classes[mask[MASK_CLASS]];
}
}
}
......@@ -42058,7 +42058,7 @@
preprocessed = version.preprocessed;
version = version.version;
}
if (version < 1) throw new Error(cc.debug.getError(5304, version));
if (version < SUPPORT_MIN_FORMAT_VERSION) throw new Error(cc.debug.getError(5304, version));
options._version = version;
options.result = details;
data[0] = options;
window.__require=function t(e,n,o){function i(c,r){if(!n[c]){if(!e[c]){var s=c.split("/");if(s=s[s.length-1],!e[s]){var h="function"==typeof __require&&__require;if(!r&&h)return h(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+c+"'")}c=s}var u=n[c]={exports:{}};e[c][0].call(u.exports,function(t){return i(e[c][1][t]||t)},u,u.exports,t,e,n,o)}return n[c].exports}for(var a="function"==typeof __require&&__require,c=0;c<o.length;c++)i(o[c]);return i}({bgBottom_cc_mz_003:[function(t,e){"use strict";cc._RF.push(e,"25786oZQglO8pQoK+TpoYMM","bgBottom_cc_mz_003");var n=t("../script/util");cc.Class({extends:cc.Component,properties:{},_canTouch:null,_isTop:null,_arrowUp:null,_arrowDown:null,_pageIndex:null,_maxPage:null,_lineMaxCount:null,_disW:null,_maxW:null,onLoad:function(){this._canTouch=!0,this._isTop=!1,this._arrowUp=this.node.getChildByName("arrowUp"),this._arrowDown=this.node.getChildByName("arrowDown"),this.node.zIndex=10,this._itemLen=75,this._pageIndex=0,this._maxPage=0,this._disW=5,this._maxW=1190,this._lineMaxCount=Math.floor(this._maxW/(this._disW+this._itemLen))},start:function(){this._initListener(),this._initItemLayer()},_itemLayer:null,_initItemLayer:function(){this._itemLayer=new cc.Node,this.node.addChild(this._itemLayer)},_initListener:function(){this._initTopBtnListener(),this._initPageBtnListener()},_initTopBtnListener:function(){var t=this;this.node.getChildByName("btn").on("click",function(){if(t._canTouch){t._canTouch=!1;var e=80*t.node.scaleY,n=e;t._isTop&&(n=-e),cc.tween(t.node).by(.5,{y:n}).call(function(){t._canTouch=!0}).start(),t._setTopBtnState(.5),t._isTop=!t._isTop}})},_pageUpBtn:null,_pageDownBtn:null,_initPageBtnListener:function(){var t=this,e=this.node.getChildByName("pageUp");e.on("click",function(){t._canTouch&&(t._pageIndex<=0||(t._pageIndex--,t._refreshPage(),t._showBtnAnima(e)))}),this._pageUpBtn=e;var n=this.node.getChildByName("pageDown");n.on("click",function(){t._canTouch&&(t._pageIndex>=t._maxPage-1||(t._pageIndex++,t._refreshPage(),t._showBtnAnima(n)))}),this._pageDownBtn=n},_showBtnAnima:function(t){cc.tween(t).to(.08,{scale:1.3},{easing:"sineOut"}).to(.08,{scale:1},{easing:"sineOut"}).start()},_setPageBtnState:function(){0!=this._maxPage?(0==this._pageIndex?this._pageUpBtn.opacity=100:this._pageUpBtn.opacity=255,this._pageIndex==this._maxPage-1?this._pageDownBtn.opacity=100:this._pageDownBtn.opacity=255):this._pageUpBtn.active=this._pageDownBtn.active=!1},_setTopBtnState:function(t){var e,n;this._isTop?(e=this._arrowDown,n=this._arrowUp):(e=this._arrowUp,n=this._arrowDown),e.scale=1,n.scale=0,cc.tween(e).to(t/2,{scale:0},{easing:"cubicOut"}).start(),cc.tween(n).delay(t/2).to(t/2,{scale:1},{easing:"cubicOut"}).start()},_dataArr:null,setItemData:function(t){console.log(" in setItemData",t),t&&0!=t.length&&(this._dataArr=t,this._initPageArr(),this._pageIndex=0,this._refreshPage())},_pageArr:null,_initPageArr:function(){var t=[];this._pageArr=[t];for(var e=this._disW,n=0;n<this._dataArr.length;n++){var o=this._addOneItem(this._dataArr[n]);(e+=o.width+this._disW)>this._maxW?(t=[o],this._pageArr.push(t),e=this._disW+o.width+this._disW):t.push(o)}this._maxPage=this._pageArr.length,console.log("this._maxPage: ",this._maxPage)},_itemLen:null,_addOneItem:function(t){var e=new cc.Node;return e.width=this._itemLen,e.height=this._itemLen,e.data=t,this._addItemPic(e,t.pic_url),this._addItemLabel(e,t.text),this._addItemAudio(e,t.audio_url),this._addItemListener(e),t.isClicked&&(e.opacity=100),e},_addItemPic:function(t,e){var o=this;if(e){var i=.8*this._itemLen;cc.assetManager.loadRemote(e,function(e,a){var c=new cc.Node;t.addChild(c),c.width=a.width,c.height=a.height,c.y=(o._itemLen-i)/2,(0,n.setSprNodeMaxLen)(c,i,i);var r=new cc.SpriteFrame(a);c.addComponent(cc.Sprite).spriteFrame=r})}},_labelFont:null,_addItemLabel:function(t,e){if(e){var n=new cc.Node;n.color=cc.Color.BLACK;var o=n.addComponent(cc.Label);if(o.string=e,t.addChild(n),n.y=.4*-this._itemLen,o.fontSize=16,o.verticalAlign=cc.Label.VerticalAlign.CENTER,!this._labelFont){var i=this.node.getChildByName("font").getComponent(cc.Label);this._labelFont=i.font}o.font=this._labelFont,o._forceUpdateRenderData(!0),n.width>this._itemLen&&(t.width=n.width)}},_addItemAudio:function(t,e){e&&cc.assetManager.loadRemote(e,function(e,n){t.audioClip=n})},_addItemListener:function(t){var e=this,n=function(){console.log(" touch start "),e.node.emit("item_touch_start",t),t.hasEventListener(cc.Node.EventType.MOUSE_DOWN)&&t.off(cc.Node.EventType.MOUSE_DOWN,o)},o=function(){console.log(" mouse down "),e.node.emit("item_touch_start",t),t.hasEventListener(cc.Node.EventType.TOUCH_START)&&t.off(cc.Node.EventType.TOUCH_START,n)};t.on(cc.Node.EventType.TOUCH_START,n),t.on(cc.Node.EventType.MOUSE_DOWN,o)},_refreshPage:function(){var t=this;this._itemLayer.removeAllChildren(),this._dataArr;var e=this._disW,n=(this._pageIndex,this._lineMaxCount,this._pageArr[this._pageIndex]),o=this._getCurPageBaseX();n.forEach(function(n){var i=t._addOneItem(n.data);t._itemLayer.addChild(i),i.x=o+(e+i.width)/2,i.y=-25,o=i.x+(e+i.width)/2}),this._setPageBtnState()},_getCurPageBaseX:function(){var t=this._pageArr[this._pageIndex];console.log("arr: ",t);for(var e=this._disW,n=0;n<t.length;n++)e+=t[n].width+this._disW;return-e/2}}),cc._RF.pop()},{"../script/util":"util"}],cc_mz_003:[function(t,e){"use strict";cc._RF.push(e,"a1037YC5S1K27xN5HbC6IiE","cc_mz_003");var n=t("./util");cc.Class({extends:cc.Component,properties:{baseWidth:{default:1280,type:cc.Integer},baseHeight:{default:720,type:cc.Integer}},onLoad:function(){cc.macro.ENABLE_MULTI_TOUCH=!0,cc.debug.setDisplayStats(!1),this.initSceneData(),this.initSize()},initSceneData:function(){this._imageResList=[],this._audioResList=[],this._animaResList=[]},_designSize:null,initSize:function(){var t=cc.view.getFrameSize().width/cc.view.getFrameSize().height>=cc.Canvas.instance.designResolution.width/cc.Canvas.instance.designResolution.height;cc.Canvas.instance.fitHeight=t,cc.Canvas.instance.fitWidth=!t,this._designSize=cc.view.getDesignResolutionSize()},start:function(){var t=this;cc.debug.setDisplayStats(!1);var e=this.getData.bind(this);window&&window.courseware&&(e=window.courseware.getData),e(function(e){console.log("data:",e),t.data=e||t.getDefaultData(),t.preloadItem()}),console.log('cc.sys.capabilities["touches"] = ',cc.sys.capabilities.touches)},_imageResList:null,_audioResList:null,_animaResList:null,preloadItem:function(){this.addPreloadImage(),this.addPreloadAudio(),this.addPreloadAnima(),this.preload()},getData:function(t){t(this.getDefaultData())},getDefaultData:function(){return JSON.parse('{"bgColor":"#f9bd03","bgColorId":0,"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/9cdf3b30720c91c2876c88a07c997c8b.jpg","rect":{"x":248.39,"y":0,"width":1038.22,"height":584}},"hotZoneItemArr":[{"id":"1607409055453","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/71108d9f5c53f900a433d930ae63848b.jpg","text":"aaaa","audio_url":"http://staging-teach.cdn.ireadabc.com/a4d27ad173a95823d4b8ec82363c5aa0.mp3","itemType":"rect","fontScale":1.19921875,"imgScale":0.45807812500000006,"mapScale":1.19921875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/51e9d8e4e2e963a7658d07eba6c282f8.json","name":"Ubbie_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/4232e00c9b1d272e650e51dbb785e498.json","name":"Ubbie_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/2e56dbe3134380952a725eacceb86359.png","name":"Ubbie_tex.png"},"gIdx":"0","rect":{"x":64.45,"y":161.67,"width":198.98,"height":198.98}},{"id":"1607409064053","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/9dfdcdb9f7c0daa15ea8f7864342893a.jpg","text":"bbbb","audio_url":"http://staging-teach.cdn.ireadabc.com/440cf9d57752b30691d90ed565e8c924.mp3","itemType":"rect","fontScale":1.19921875,"imgScale":0.45807812500000006,"mapScale":1.19921875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/7efceac56cc9a61b107a11457390d3c6.json","name":"finish1_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d6e8db4fb385127de9e3cd9d8a9530f7.json","name":"finish1_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/96f5c7a9ac9f433c9c870c38b0811a38.png","name":"finish1_tex.png"},"gIdx":"0","rect":{"x":715.1,"y":151.72,"width":198.98,"height":198.98}},{"id":"1611130853038","index":2,"pic_url":"http://staging-teach.cdn.ireadabc.com/f6f4bbef497409fef3c8f1d375893829.png","audio_url":"http://staging-teach.cdn.ireadabc.com/85cff126986f5cc11b05e95181da5869.mp3","itemType":"pic","fontScale":1.19921875,"imgScale":0.6276324728260869,"mapScale":1.19921875,"gIdx":"1","rect":{"x":821.16,"y":397.2,"width":173.23,"height":173.23}},{"id":"1611130870716","index":3,"audio_url":"http://staging-teach.cdn.ireadabc.com/5285e1e88a26a08783757e9c43a8653f.mp3","itemType":"rect","fontScale":1.19921875,"imgScale":1,"mapScale":1.19921875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/7efceac56cc9a61b107a11457390d3c6.json","name":"finish1_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d6e8db4fb385127de9e3cd9d8a9530f7.json","name":"finish1_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/96f5c7a9ac9f433c9c870c38b0811a38.png","name":"finish1_tex.png"},"gIdx":"2","rect":{"x":388.75,"y":161.64,"width":260.72,"height":260.72}}],"bg_audio_url":"http://staging-teach.cdn.ireadabc.com/3fa65d5f667a2ef9059d3dfc5df74a4d.mp3"}')},preload:function(){var t=this,e=this._imageResList.concat(this._audioResList).concat(this._animaResList);cc.assetManager.loadAny(e,null,null,function(e,n){console.log(" preload data, ",n),t.loadEnd(),window&&window.air&&window.air.hideAirClassLoading()})},addPreloadImage:function(){var t=this;this.data.bgItem&&this._imageResList.push({url:this.data.bgItem.url}),this.data.hotZoneItemArr&&this.data.hotZoneItemArr.forEach(function(e){e.pic_url&&t._imageResList.push({url:e.pic_url})})},addPreloadAudio:function(){var t=this;this.data.hotZoneItemArr&&(this.data.hotZoneItemArr.forEach(function(e){t._audioResList.push({url:e.audio_url})}),this._audioResList.push({url:this.data.bg_audio_url}))},addPreloadAnima:function(){var t=this;this.data.hotZoneItemArr&&this.data.hotZoneItemArr.forEach(function(e){e.skeJsonData&&(t._animaResList.push({url:e.skeJsonData.url||""}),t._animaResList.push({url:e.texJsonData.url||""}),t._animaResList.push({url:e.texPngData.url||""}))})},loadEnd:function(){this.initView(),this.initAudio(),this.initListener(),this.initMusic()},initMusic:function(){cc.assetManager.loadRemote(this.data.bg_audio_url,function(t,e){cc.audioEngine.setMusicVolume(.3),cc.audioEngine.playMusic(e,!0)})},_wrongAudioSource:null,_gjAudioSource:null,_endAudio:null,initAudio:function(){this._wrongAudioSource=cc.find("Canvas/res/wrong_audio").getComponent(cc.AudioSource),this._gjAudioSource=cc.find("Canvas/res/good_job").getComponent(cc.AudioSource),this._endAudio=cc.find("Canvas/res/end_audio").getComponent(cc.AudioSource)},initListener:function(){var t=this,e=cc.find("Canvas/bgBottom"),n=cc.find("Canvas"),o=!1;e.on("item_touch_start",function(e){o=!0,t.touchStartItem(e)});var i=function(e){t.canvasTouchMove(e),console.log("touch move"),n.hasEventListener(cc.Node.EventType.MOUSE_MOVE)&&n.off(cc.Node.EventType.MOUSE_MOVE,a)},a=function(e){o&&(t.canvasTouchMove(e),console.log("mouse move"),n.hasEventListener(cc.Node.EventType.TOUCH_MOVE)&&(n.off(cc.Node.EventType.TOUCH_MOVE,i),t.removeHtmlCanvasListener("touchmove")))},c=function(e){o=!1,t.canvasTouchEnd(e),console.log("touch end"),n.hasEventListener(cc.Node.EventType.MOUSE_UP)&&n.off(cc.Node.EventType.MOUSE_UP,r),n.hasEventListener(cc.Node.EventType.MOUSE_LEAVE)&&n.off(cc.Node.EventType.MOUSE_LEAVE,r),t.removeHtmlTouchEnd()},r=function(e){o=!1,t.canvasTouchEnd(e),console.log("mouse up"),n.hasEventListener(cc.Node.EventType.TOUCH_END)&&n.off(cc.Node.EventType.TOUCH_END,c),n.hasEventListener(cc.Node.EventType.TOUCH_CANCEL)&&n.off(cc.Node.EventType.TOUCH_CANCEL,c)};n.on(cc.Node.EventType.TOUCH_MOVE,i),n.on(cc.Node.EventType.MOUSE_MOVE,a),n.on(cc.Node.EventType.TOUCH_END,c),n.on(cc.Node.EventType.TOUCH_CANCEL,c),n.on(cc.Node.EventType.MOUSE_UP,r)},removeHtmlCanvasListener:function(t){document.querySelector("canvas").addEventListener(t,function(){})},initWebListener:function(){console.log("in initWebListener"),document.querySelector("canvas"),document.addEventListener("touchstart",this.htmlCanvasTouchstartFunc.bind(this),this),document.addEventListener("touchmove",this.htmlCanvasTouchmoveFunc.bind(this),this),document.addEventListener("touchend",this.htmlCanvasTouchendFunc.bind(this),this),document.addEventListener("click",this.htmlCanvasClickFunc.bind(this),this)},htmlCanvasTouchstartFunc:function(t){console.log("html htmlCanvasTouchstartFunc");var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mousedown",t);e.dispatchEvent(n)},htmlCanvasTouchmoveFunc:function(t){console.log("html htmlCanvasTouchmoveFunc");var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mousemove",t);e.dispatchEvent(n)},htmlCanvasTouchendFunc:function(t){console.log("html htmlCanvasTouchendFunc");var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mouseup",t);e.dispatchEvent(n)},htmlCanvasTouchcancelFunc:function(t){var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mouseleave",t);e.dispatchEvent(n)},htmlCanvasClickFunc:function(t){if(!t.aaas){var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"click",t);n.aaas=1,e.dispatchEvent(n)}},removeHtmlTouchEnd:function(){document.querySelector("canvas").removeEventListener("touchend",this.htmlCanvasTouchendFunc,this)},initView:function(){this.initBg(),this.initHotZone(),this.initBottomPart()},_cocosScale:null,initBg:function(){var t=cc.view.getFrameSize(),e=cc.winSize.width/t.width,n=cc.winSize.height/t.height,o=Math.min(e,n);this._cocosScale=o;var i=cc.find("Canvas/bg");e=t.width/i.width,n=t.height/i.height,i.scale=Math.max(e,n)*o,i.anchorX=1,i.anchorY=0,i.x=t.width/2*o,i.y=-t.height/2*o;var a=cc.find("Canvas/bg"),c=new cc.Node;c.x=-a.x,c.y=-a.y,c.scaleX=a.scaleX,c.scaleY=a.scaleY,a.addChild(c);var r=c.addComponent(cc.Graphics);r.fillColor=this.data.bgColor||"#f9bd03",r.fillRect(-a.width/2,-a.height/2,a.width,a.height),r.fill()},initHotZone:function(){this.initHotZoneBg()},hotZoneBg:null,hotzoneCircleArr:null,initHotZoneBg:function(){var t=this;this.hotZoneBg=new cc.Node,this.hotZoneBg.name="hotZoneBg",this.hotZoneBg.parent=cc.find("Canvas"),this.hotZoneBg.zIndex=4,this.hotzoneCircleArr=[],this.data.bgItem&&cc.loader.load({url:this.data.bgItem.url},function(e,n){t.addMask(t.hotZoneBg),t.hotZoneBg.width=n.width,t.hotZoneBg.height=n.height,t.hotZoneBg.getBoundingBox();var o=cc.view.getFrameSize();cc.winSize,console.log("this.hotZoneBg.box: ",t.hotZoneBg.getBoundingBox()),console.log("let visiSize=cc.director.getVisibleSize();: ",cc.view.getVisibleSize()),console.log("lframeSize: ",o);var i=o.width/t._designSize.width,a=o.height/t._designSize.height,c=Math.min(i,a),r=cc.find("Canvas/bgBottom");r.scale=c*t._cocosScale,i=o.width*t._cocosScale/n.width,a=(o.height*t._cocosScale-80*c*t._cocosScale)/n.height;var s=new cc.Node,h=new cc.SpriteFrame(n);s.addComponent(cc.Sprite).spriteFrame=h,s.width=t.hotZoneBg.width,s.height=t.hotZoneBg.height,s.parent=t.hotZoneBg,t.hotZoneBg.scale=Math.min(i,a),t.hotZoneBg.y=o.height/2*t._cocosScale-t.hotZoneBg.height/2*t.hotZoneBg.scaleY;var u=cc.find("Canvas/bgWhite");u.y=t.hotZoneBg.y,u.scaleX=t.hotZoneBg.width*t.hotZoneBg.scaleX/u.width,u.scaleY=t.hotZoneBg.height*t.hotZoneBg.scaleY/u.height;var d=cc.find("Canvas"),l=new cc.Node;l.y=u.y,l.scaleX=u.scaleX,l.scaleY=u.scaleY,d.addChild(l);var g=l.addComponent(cc.Graphics);g.fillColor=cc.Color.BLACK.setA(30),g.fillRect(-u.width/2+8/u.scaleX*t.hotZoneBg.scale,-u.height/2-8/u.scaleX*t.hotZoneBg.scale,u.width,u.height),g.fill(),l.zIndex=1,u.zIndex=2,r.y=-o.height/2*t._cocosScale-15*r.scaleY,t.data.hotZoneItemArr.forEach(function(e){"0"==e.gIdx?t.setOneCirclePoint(e):"1"==e.gIdx?t.setOnePic(e):"2"==e.gIdx&&t.setOneAnima(e)})})},addMask:function(t){t.addComponent(cc.Mask).type=cc.Mask.Type.RECT},bottomPicArr:null,initBottomPart:function(){var t=cc.find("Canvas/bgBottom").getComponent("bgBottom_cc_mz_003"),e=[];this.data.hotZoneItemArr.forEach(function(t){"0"==t.gIdx&&e.push(t)}),t.setItemData(e),this.bottomPicArr=e},getBottomPicArr:function(){var t=[];return this.hotzoneCircleArr.forEach(function(e){console.log("item: ",e),t.push(e.data),console.log("arr: ",t)}),console.log("hotzoneCircleArr: ",this.hotzoneCircleArr),console.log("arr: ",t),t},setOneAnima:function(t){var e=this.hotZoneBg.scale*this.hotZoneBg.width/this.data.bgItem.rect.width,n=new cc.Node;n.name="rect"+t.index,this.hotZoneBg.addChild(n);var o=n.addComponent(cc.Graphics);o.lineWidth=4,o.strokeColor=cc.Color.BLACK,o.fillColor=cc.Color.WHITE.setA(100);var i=e/this.hotZoneBg.scaleY;n.width=t.rect.width*i,n.height=t.rect.height*i,n.x=-this.hotZoneBg.width/2+t.rect.x*i,n.y=this.hotZoneBg.height/2-t.rect.height*i-t.rect.y*i,n.anchorX=n.anchorY=0,this.data.bgItem.isShowDebugLine&&o.rect(0,0,n.width,n.height),o.stroke(),o.fill();var a=new cc.Node;a.name="anima_"+t.index,this.hotZoneBg.addChild(a),t.audio_url&&cc.assetManager.loadRemote(t.audio_url,function(t,e){a.audioClip=e});var c=a.addComponent(dragonBones.ArmatureDisplay),r=t.texPngData.url,s=t.skeJsonData.url,h=t.texJsonData.url;cc.loader.load(r,function(t,e){cc.loader.load({url:h,type:"txt"},function(t,o){cc.loader.load({url:s,type:"txt"},function(t,i){var r=new dragonBones.DragonBonesAtlasAsset;r.atlasJson=o,r.texture=e;var s=new dragonBones.DragonBonesAsset;s.dragonBonesJson=i,c.dragonAtlasAsset=r,c.dragonAsset=s;var h=JSON.parse(s.dragonBonesJson).armature;console.log("armatures: ",h);for(var u=[],d=0;d<h.length;d++)u.push(h[d].name);if(u.length>0){var l=u[0];c.armatureName=l;for(var g=h[0].animation,f=[],p=0;p<g.length;p++)f.push(g[p].name);n.addComponent(cc.Button),n.on("click",function(){n.isClicked,n.isClicked=!0,console.log("clicked"),a.audioClip&&(cc.audioEngine.stopAllEffects(),cc.audioEngine.playEffect(a.audioClip,!1,.8)),f.length>0&&c.playAnimation(f[0],1)})}})})})},setOnePic:function(t){var e=this,n=this.hotZoneBg.scale*this.hotZoneBg.width/this.data.bgItem.rect.width,o=new cc.Node;o.data=t,this.hotZoneBg.addChild(o),cc.loader.load({url:t.pic_url},function(i,a){o.addComponent(cc.Sprite).spriteFrame=new cc.SpriteFrame(a);var c=n/e.hotZoneBg.scaleY;o.width=t.rect.width*c,o.height=t.rect.height*c,o.x=-e.hotZoneBg.width/2+t.rect.x*c,o.y=e.hotZoneBg.height/2-t.rect.height*c-t.rect.y*c,o.anchorX=o.anchorY=0,t.audio_url&&e.addPicAudio(o)})},addPicAudio:function(t){var e=t.data;cc.assetManager.loadRemote(e.audio_url,function(e,n){t.audioClip=n}),t.addComponent(cc.Button),t.on("click",function(){t.audioClip&&(cc.audioEngine.stopAllEffects(),cc.audioEngine.playEffect(t.audioClip,!1,.8))})},setOneCirclePoint:function(t){var e=this,n=this.hotZoneBg.scale*this.hotZoneBg.width/this.data.bgItem.rect.width,o=new cc.Node;o.name="rect"+t.index,o.data=t,this.hotZoneBg.addChild(o);var i=o.addComponent(cc.Sprite),a=cc.find("Canvas/res/circle_bg_small");i.spriteFrame=a.getComponent(cc.Sprite).spriteFrame;var c=n/this.hotZoneBg.scaleY;if(o.width=a.width,o.height=a.height,o.x=-this.hotZoneBg.width/2+(t.rect.x+t.rect.width/2)*c,o.y=this.hotZoneBg.height/2-t.rect.height/2*c-t.rect.y*c,o.anchorX=o.anchorY=.5,t.audio_url&&cc.assetManager.loadRemote(t.audio_url,function(e,n){t.audioClip=n}),this.hotzoneCircleArr.push(o),t.skeJsonData){var r=new cc.Node;r.name="anima_"+t.index,this.hotZoneBg.addChild(r),t.animaNode=r,r.active=!1,t.audio_url&&cc.assetManager.loadRemote(t.audio_url,function(t,e){r.audioClip=e});var s=r.addComponent(dragonBones.ArmatureDisplay),h=t.texPngData.url,u=t.skeJsonData.url,d=t.texJsonData.url;cc.loader.load(h,function(t,n){cc.loader.load({url:d,type:"txt"},function(t,i){cc.loader.load({url:u,type:"txt"},function(t,a){var c=new dragonBones.DragonBonesAtlasAsset;c.atlasJson=i,c.texture=n;var h=new dragonBones.DragonBonesAsset;h.dragonBonesJson=a,s.dragonAtlasAsset=c,s.dragonAsset=h;var u=JSON.parse(h.dragonBonesJson).armature;console.log("armatures: ",u);for(var d=[],l=0;l<u.length;l++)d.push(u[l].name);if(d.length>0){var g=d[0];s.armatureName=g;for(var f=u[0].animation,p=[],m=0;m<f.length;m++)p.push(f[m].name);r.showAnima=function(){if(r.active=!0,o.isClicked,o.isClicked=!0,console.log("clicked"),r.audioClip){cc.audioEngine.stopAllEffects();var t=cc.audioEngine.playEffect(r.audioClip,!1,.8);cc.audioEngine.setFinishCallback(t,function(){var t=cc.audioEngine.playEffect(e._gjAudioSource.clip,!1,.8);cc.audioEngine.setFinishCallback(t,function(){e.checkGameEnd()&&e.gameEnd()})})}p.length>0&&s.playAnimation(p[0],1)}}})})})}},checkGameEnd:function(){for(var t=0;t<this.hotzoneCircleArr.length;t++)if(this.hotzoneCircleArr[t].active)return!1;return!0},gameEnd:function(){console.log("this.gameEnd"),this.playEndEffect()},playEndEffect:function(){(0,n.playAudio)(this._endAudio.clip,.8);var t=cc.find("Canvas/Main Camera");t.zIndex=100,(0,n.showTrebleFirework)(t,cc.find("RibbonNodeBase").children)},_curShowItem:null,bottomItemClick:function(){},_toCenterShow:function(t){var e=cc.find("Canvas/bgBottom");cc.tween(t).to(1,{x:0,y:0,scale:e.scale},{easing:"cubicOut"}).call(function(){}).start(),t.isSmall=!1,t.zIndex=11},hideCurShowItem:function(){var t=this.getTargetCircleNode(),e=t.parent.convertToWorldSpaceAR(cc.v2(t.x+t.width/2,t.y+t.height/2)),n=this._curShowItem.parent.convertToNodeSpaceAR(cc.v2(e.x,e.y)),o=t.parent.scaleY*t.height*t.scaleY/this._curShowItem.height,i=this._curShowItem;i.cantouch=!1,cc.tween(this._curShowItem).to(1,{scale:.95*o,x:n.x,y:n.y},{easing:"cubicOut"}).call(function(){i.cantouch=!0}).start(),this._curShowItem.isSmall=!0,this._curShowItem.zIndex=9,this._curShowItem=null},getTargetCircleNode:function(){var t=this._curShowItem.data.index;return this.hotzoneCircleArr.find(function(e){return e.data.index==t})},canvasClick:function(){console.log("canvas click"),this._curShowItem&&this.hideCurShowItem()},touchStartItem:function(t){if(!t.data.isDrag){t.data.isDrag=!0;var e=cc.find("Canvas/res/circle_bg_small"),n=cc.find("Canvas/bgBottom");t.opacity=0;var o=new cc.Node;o.parent=cc.find("Canvas"),o.zIndex=10,o.opacity=255,o.data=t.data,o.width=e.width,o.height=e.height,o.scale=n.scale*t.scale;var i=t.parent.convertToWorldSpaceAR(cc.v2(t.x,t.y)),a=o.parent.convertToNodeSpaceAR(cc.v2(i.x,i.y));o.x=a.x,o.y=a.y;var c=cc.instantiate(t);c.parent=o,c.opacity=255,c.x=0,c.y=0,c.scale=o.width/c.width,c.removeComponent(cc.Button);var r=t.getBoundingBoxToWorld(),s=o.getBoundingBoxToWorld(),h=r.width/s.width;console.log("worldRect1: ",r),console.log("worldRect2: ",s),console.log("rate: ",h),o.scale*=h,this._curShowItem=o,this._curShowItem.bgBottomItem=t,this._curShowItem.baseX=this._curShowItem.x,this._curShowItem.baseY=this._curShowItem.y}},checkOnTargetCircle:function(){for(var t=0;t<this.hotzoneCircleArr.length;t++){var e=this.hotzoneCircleArr[t];if(e.data.index==this._curShowItem.data.index){var n=this._curShowItem.parent.convertToWorldSpaceAR(cc.v2(this._curShowItem.x,this._curShowItem.y));if(e.getBoundingBoxToWorld().contains(n))return void this.itemAppear(e)}}this.itemBack()},itemAppear:function(t){t.active=!1,this._curShowItem.active=!1,t.data.animaNode&&t.data.animaNode.showAnima()},itemBack:function(){var t=cc.v2(this._curShowItem.x,this._curShowItem.y),e=cc.v2(this._curShowItem.baseX,this._curShowItem.baseY);t.sub(e).mag()<=20&&this._curShowItem.data.audioClip?(cc.audioEngine.stopAllEffects(),cc.audioEngine.playEffect(this._curShowItem.data.audioClip,!1,.8)):cc.audioEngine.playEffect(this._wrongAudioSource.clip,!1,.8);var n=this._curShowItem;cc.tween(n).to(.3,{x:n.baseX,y:n.baseY},{easing:"elasticOut"}).call(function(){n.bgBottomItem.opacity=255,n.removeFromParent(),n.data.isDrag=!1}).start()},canvasTouchMove:function(t){if(this._curShowItem){var e=t.getLocation();this._curShowItem.x=e.x-t.currentTarget.width/2,this._curShowItem.y=e.y-t.currentTarget.height/2}},canvasTouchEnd:function(t){this._curShowItem&&(this.checkOnTargetCircle(t),this._curShowItem=null)},createTouchEvent:function(t,e,n){[].concat(n.touches);var o=n.touches?n.touches[0]||{}:n,i=new Touch({identifier:-Date.now(),target:t,clientX:o.clientX||0,clientY:o.clientY||0,force:o.force,pageX:o.pageX,pageY:o.pageY,radiusX:o.radiusX,radiusY:o.radiusY,rotationAngle:n.rotationAngle,screenX:o.screenX,screenY:o.screenY}),a=new TouchEvent(e,{touches:[i],view:window,cancelable:!0,bubbles:!0,changedTouches:[i]});return a.fireByMe=!0,a.pageX=o.pageX,a.pageY=o.pageY,a.clientX=o.clientX,a.clientY=o.clientY,a.screenX=o.screenX,a.screenY=o.screenY,a}}),cc._RF.pop()},{"./util":void 0}],runtime:[function(t,e){"use strict";cc._RF.push(e,"5e66eIbuEVIi43aG8uDxSYt","runtime"),function(t){var n,o=Object.prototype,i=o.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",h="object"==typeof e,u=t.regeneratorRuntime;if(u)h&&(e.exports=u);else{(u=t.regeneratorRuntime=h?e.exports:{}).wrap=y;var d="suspendedStart",l="suspendedYield",g="executing",f="completed",p={},m={};m[c]=function(){return this};var v=Object.getPrototypeOf,_=v&&v(v(M([])));_&&_!==o&&i.call(_,c)&&(m=_);var w=E.prototype=b.prototype=Object.create(m);C.prototype=w.constructor=E,E.constructor=C,E[s]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(w),t},u.awrap=function(t){return{__await:t}},S(B.prototype),B.prototype[r]=function(){return this},u.AsyncIterator=B,u.async=function(t,e,n,o){var i=new B(y(t,e,n,o));return u.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(w),w[s]="Generator",w[c]=function(){return this},w.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=M,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(o,i){return r.type="throw",r.arg=t,e.next=o,i&&(e.method="next",e.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a],r=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var s=i.call(c,"catchLoc"),h=i.call(c,"finallyLoc");if(s&&h){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=t,c.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:M(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=n),p}}}function y(t,e,n,o){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new N(o||[]);return a._invoke=T(t,n,c),a}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(o){return{type:"throw",arg:o}}}function b(){}function C(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function B(t){function e(n,o,a,c){var r=x(t[n],t,o);if("throw"!==r.type){var s=r.arg,h=s.value;return h&&"object"==typeof h&&i.call(h,"__await")?Promise.resolve(h.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):Promise.resolve(h).then(function(t){s.value=t,a(s)},c)}c(r.arg)}var n;this._invoke=function(t,o){function i(){return new Promise(function(n,i){e(t,o,n,i)})}return n=n?n.then(i,i):i()}}function T(t,e,n){var o=d;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===f){if("throw"===i)throw a;return R()}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var r=A(c,n);if(r){if(r===p)continue;return r}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=x(t,e,n);if("normal"===s.type){if(o=n.done?f:l,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=f,n.method="throw",n.arg=s.arg)}}}function A(t,e){var o=t.iterator[e.method];if(o===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,A(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=x(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function M(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(i.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:R}}function R(){return{value:n,done:!0}}}(function(){return this}()||Function("","return this")()),cc._RF.pop()},{}],util:[function(t,e,n){"use strict";function o(t,e,n,o,i,a,c){try{var r=t[a](c),s=r.value}catch(h){return void n(h)}r.done?e(s):Promise.resolve(s).then(o,i)}function i(t){return function(){var e=this,n=arguments;return new Promise(function(i,a){var c=t.apply(e,n);function r(t){o(c,i,a,r,s,"next",t)}function s(t){o(c,i,a,r,s,"throw",t)}r(void 0)})}}function a(t,e){void 0===e&&(e=0);var n=Math.max(t,e),o=Math.min(t,e);return Math.floor(Math.random()*(n-o)+o)}function c(t){return new Promise(function(e,n){try{cc.loader.load(t,function(t,n){e(n)})}catch(o){n(o)}})}function r(){return(r=i(regeneratorRuntime.mark(function t(e,n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===n&&(n=1),t.abrupt("return",new Promise(function(t,o){try{if(!e)return void t();var i=cc.audioEngine.play(e,!1,n);cc.audioEngine.setFinishCallback(i,function(){t()})}catch(a){o(a)}}));case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}function s(){return h.apply(this,arguments)}function h(){return(h=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){try{setTimeout(function(){t()},1e3*e)}catch(o){n(o)}}));case 1:case"end":return t.stop()}},t)}))).apply(this,arguments)}cc._RF.push(e,"85554W5Em9M3Zcy2IwmWFqE","util"),n.__esModule=!0,n.getPosByAngle=function(t,e){var n=t*Math.PI/180;return{x:Math.sin(n)*e,y:Math.cos(n)*e}},n.getAngleByPos=function(t,e,n,o){var i=Math.abs(t-n),a=Math.abs(e-o),c=a/Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),r=Math.acos(c),s=Math.floor(180/(Math.PI/r)*100)/100;return n>t&&o>e&&(s=180-s),n===t&&o>e&&(s=180),n>t&&o===e&&(s=90),n<t&&o>e&&(s=180+s),n<t&&o===e&&(s=270),n<t&&o<e&&(s=360-s),s},n.exchangeNodePos=function(t,e){return t.convertToNodeSpaceAR(e._parent.convertToWorldSpaceAR(cc.v2(e.x,e.y)))},n.RandomInt=a,n.randomSortByArr=function(t){for(var e=[],n=t.concat();n.length>0;){var o=Math.floor(n.length*Math.random());e.push(n[o]),n.splice(o,1)}return e},n.setSprNodeMaxLen=function(t,e,n){var o=e/t.width,i=n/t.height,a=Math.min(o,i);t.scale=Math.round(1e3*a)/1e3},n.localPosTolocalPos=function(t,e){var n=e.parent.convertToWorldSpaceAR(cc.v2(e.x,e.y));return t.parent.convertToNodeSpaceAR(cc.v2(n.x,n.y))},n.getScaleRateBy2Node=function(t,e,n){void 0===n&&(n=!0);var o=e.getBoundingBoxToWorld(),i=t.getBoundingBoxToWorld(),a=o.width/i.width,c=o.height/i.height;return n?Math.max(a,c):Math.min(a,c)},n.asyncCCLoad=c,n.loadDragonBones=function(t,e,n,o){Promise.all([c(t),c({url:e,type:"txt"}),c({url:n,type:"txt"})]).then(function(t){var e=t[0],n=t[1],i=t[2];o(e,n,i)}).catch(function(t){console.log(t)})},n.playAudio=function(){return r.apply(this,arguments)},n.asyncDelay=s,n.showFireworks=d,n.asyncTweenTo=function(){return p.apply(this,arguments)},n.asyncTweenBy=m,n.showTrebleFirework=function(t,e){var n=new u(t,e);n.pos=cc.v2(0,-400),n.side=cc.v2(0,1e3),n.range=200,n.number=100,n.scalseRange=.4;var o=u.copy(n);o.pos=cc.v2(-600,-400),o.side=cc.v2(200,1e3);var i=u.copy(n);i.pos=cc.v2(600,-400),i.side=cc.v2(-200,1e3),d(n),d(o),d(i)},n.FireworkSettings=void 0;var u=function(){function t(t,e,n,o,i,a,c){void 0===n&&(n=cc.v2(0,0)),void 0===o&&(o=cc.v2(0,100)),void 0===i&&(i=50),void 0===a&&(a=100),void 0===c&&(c=0),this.baseNode=void 0,this.nodeList=void 0,this.pos=void 0,this.side=void 0,this.range=void 0,this.number=void 0,this.scalseRange=void 0,this.baseNode=t,this.nodeList=e,this.pos=n,this.side=o,this.range=i,this.number=a,this.scalseRange=c}return t.copy=function(e){return new t(e.baseNode,e.nodeList,e.pos,e.side,e.range,e.number)},t}();function d(){return l.apply(this,arguments)}function l(){return(l=i(regeneratorRuntime.mark(function t(e){var n,o,c,r,h,u,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=e.baseNode,o=e.nodeList,c=e.pos,r=e.side,h=e.range,u=e.number,d=e.scalseRange,new Array(u).fill(" ").forEach(function(){var t=i(regeneratorRuntime.mark(function t(){var e,i,u,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new cc.Node).parent=n,e.x=c.x,e.y=c.y,e.angle=60*Math.random()-30,(i=cc.instantiate(o[a(o.length)])).parent=e,i.active=!0,i.x=0,i.y=0,i.angle=0,i.scale=(Math.random()-.5)*d+1,u=Math.random(),l=Math.PI*(2*Math.random()-1),t.next=16,m(e,.3,{x:r.x*u+Math.cos(l)*h*u,y:r.y*u+Math.sin(l)*h*u},{easing:"quadIn"});case 16:return cc.tween(e).by(8,{y:-2e3}).start(),cc.tween(e).to(5,{scale:(Math.random()-.5)*d+1}).start(),g(e),t.next=21,s(Math.random());case 21:cc.tween(i).by(.15,{x:-10,angle:-10}).by(.3,{x:20,angle:20}).by(.15,{x:-10,angle:-10}).union().repeatForever().start(),cc.tween(e).delay(5).to(.3,{opacity:0}).call(function(){i.stopAllActions(),i.active=!1,i.parent=null,i=null}).start();case 23:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}function g(){return f.apply(this,arguments)}function f(){return(f=i(regeneratorRuntime.mark(function t(e){var n,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=1+Math.random(),o=a(-200,200)*n,t.next=4,m(e,n,{x:o,angle:60*o/200});case 4:g(e);case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function p(){return(p=i(regeneratorRuntime.mark(function t(e,n,o,i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=void 0),t.abrupt("return",new Promise(function(t,a){try{cc.tween(e).to(n,o,i).call(function(){t()}).start()}catch(c){a(c)}}));case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}function m(){return v.apply(this,arguments)}function v(){return(v=i(regeneratorRuntime.mark(function t(e,n,o,i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=void 0),t.abrupt("return",new Promise(function(t,a){try{cc.tween(e).by(n,o,i).call(function(){t()}).start()}catch(c){a(c)}}));case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}n.FireworkSettings=u,cc._RF.pop()},{}]},{},["bgBottom_cc_mz_003","cc_mz_003","runtime","util"]);
\ No newline at end of file
window.__require=function t(e,n,o){function i(c,r){if(!n[c]){if(!e[c]){var s=c.split("/");if(s=s[s.length-1],!e[s]){var h="function"==typeof __require&&__require;if(!r&&h)return h(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+c+"'")}c=s}var u=n[c]={exports:{}};e[c][0].call(u.exports,function(t){return i(e[c][1][t]||t)},u,u.exports,t,e,n,o)}return n[c].exports}for(var a="function"==typeof __require&&__require,c=0;c<o.length;c++)i(o[c]);return i}({bgBottom_cc_mz_003:[function(t,e){"use strict";cc._RF.push(e,"25786oZQglO8pQoK+TpoYMM","bgBottom_cc_mz_003");var n=t("../script/util");cc.Class({extends:cc.Component,properties:{},_canTouch:null,_isTop:null,_arrowUp:null,_arrowDown:null,_pageIndex:null,_maxPage:null,_lineMaxCount:null,_disW:null,_maxW:null,onLoad:function(){this._canTouch=!0,this._isTop=!1,this._arrowUp=this.node.getChildByName("arrowUp"),this._arrowDown=this.node.getChildByName("arrowDown"),this.node.zIndex=10,this._itemLen=75,this._pageIndex=0,this._maxPage=0,this._disW=5,this._maxW=1190,this._lineMaxCount=Math.floor(this._maxW/(this._disW+this._itemLen))},start:function(){this._initListener(),this._initItemLayer()},_itemLayer:null,_initItemLayer:function(){this._itemLayer=new cc.Node,this.node.addChild(this._itemLayer)},_initListener:function(){this._initTopBtnListener(),this._initPageBtnListener()},_initTopBtnListener:function(){var t=this;this.node.getChildByName("btn").on("click",function(){if(t._canTouch){t._canTouch=!1;var e=80*t.node.scaleY,n=e;t._isTop&&(n=-e),cc.tween(t.node).by(.5,{y:n}).call(function(){t._canTouch=!0}).start(),t._setTopBtnState(.5),t._isTop=!t._isTop}})},_pageUpBtn:null,_pageDownBtn:null,_initPageBtnListener:function(){var t=this,e=this.node.getChildByName("pageUp");e.on("click",function(){t._canTouch&&(t._pageIndex<=0||(t._pageIndex--,t._refreshPage(),t._showBtnAnima(e)))}),this._pageUpBtn=e;var n=this.node.getChildByName("pageDown");n.on("click",function(){t._canTouch&&(t._pageIndex>=t._maxPage-1||(t._pageIndex++,t._refreshPage(),t._showBtnAnima(n)))}),this._pageDownBtn=n},_showBtnAnima:function(t){cc.tween(t).to(.08,{scale:1.3},{easing:"sineOut"}).to(.08,{scale:1},{easing:"sineOut"}).start()},_setPageBtnState:function(){0!=this._maxPage?(0==this._pageIndex?this._pageUpBtn.opacity=100:this._pageUpBtn.opacity=255,this._pageIndex==this._maxPage-1?this._pageDownBtn.opacity=100:this._pageDownBtn.opacity=255):this._pageUpBtn.active=this._pageDownBtn.active=!1},_setTopBtnState:function(t){var e,n;this._isTop?(e=this._arrowDown,n=this._arrowUp):(e=this._arrowUp,n=this._arrowDown),e.scale=1,n.scale=0,cc.tween(e).to(t/2,{scale:0},{easing:"cubicOut"}).start(),cc.tween(n).delay(t/2).to(t/2,{scale:1},{easing:"cubicOut"}).start()},_dataArr:null,setItemData:function(t){console.log(" in setItemData",t),t&&0!=t.length&&(this._dataArr=t,this._initPageArr(),this._pageIndex=0,this._refreshPage())},_pageArr:null,_initPageArr:function(){var t=[];this._pageArr=[t];for(var e=this._disW,n=0;n<this._dataArr.length;n++){var o=this._addOneItem(this._dataArr[n]);(e+=o.width+this._disW)>this._maxW?(t=[o],this._pageArr.push(t),e=this._disW+o.width+this._disW):t.push(o)}this._maxPage=this._pageArr.length,console.log("this._maxPage: ",this._maxPage)},_itemLen:null,_addOneItem:function(t){var e=new cc.Node;return e.width=this._itemLen,e.height=this._itemLen,e.data=t,this._addItemPic(e,t.pic_url),this._addItemLabel(e,t.text),this._addItemAudio(e,t.audio_url),this._addItemListener(e),t.isClicked&&(e.opacity=100),e},_addItemPic:function(t,e){var o=this;if(e){var i=.8*this._itemLen;cc.assetManager.loadRemote(e,function(e,a){var c=new cc.Node;t.addChild(c),c.width=a.width,c.height=a.height,c.y=(o._itemLen-i)/2,(0,n.setSprNodeMaxLen)(c,i,i);var r=new cc.SpriteFrame(a);c.addComponent(cc.Sprite).spriteFrame=r})}},_labelFont:null,_addItemLabel:function(t,e){if(e){var n=new cc.Node;n.color=cc.Color.BLACK;var o=n.addComponent(cc.Label);if(o.string=e,t.addChild(n),n.y=.4*-this._itemLen,o.fontSize=16,o.verticalAlign=cc.Label.VerticalAlign.CENTER,!this._labelFont){var i=this.node.getChildByName("font").getComponent(cc.Label);this._labelFont=i.font}o.font=this._labelFont,o._forceUpdateRenderData(!0),n.width>this._itemLen&&(t.width=n.width)}},_addItemAudio:function(t,e){e&&cc.assetManager.loadRemote(e,function(e,n){t.audioClip=n})},_addItemListener:function(t){var e=this,n=function(){console.log(" touch start "),e.node.emit("item_touch_start",t),t.hasEventListener(cc.Node.EventType.MOUSE_DOWN)&&t.off(cc.Node.EventType.MOUSE_DOWN,o)},o=function(){console.log(" mouse down "),e.node.emit("item_touch_start",t),t.hasEventListener(cc.Node.EventType.TOUCH_START)&&t.off(cc.Node.EventType.TOUCH_START,n)};t.on(cc.Node.EventType.TOUCH_START,n),t.on(cc.Node.EventType.MOUSE_DOWN,o)},_refreshPage:function(){var t=this;this._itemLayer.removeAllChildren(),this._dataArr;var e=this._disW,n=(this._pageIndex,this._lineMaxCount,this._pageArr[this._pageIndex]),o=this._getCurPageBaseX();n.forEach(function(n){var i=t._addOneItem(n.data);t._itemLayer.addChild(i),i.x=o+(e+i.width)/2,i.y=-25,o=i.x+(e+i.width)/2}),this._setPageBtnState()},_getCurPageBaseX:function(){var t=this._pageArr[this._pageIndex];console.log("arr: ",t);for(var e=this._disW,n=0;n<t.length;n++)e+=t[n].width+this._disW;return-e/2}}),cc._RF.pop()},{"../script/util":"util"}],cc_mz_003:[function(t,e){"use strict";cc._RF.push(e,"a1037YC5S1K27xN5HbC6IiE","cc_mz_003");var n=t("./util");cc.Class({extends:cc.Component,properties:{baseWidth:{default:1280,type:cc.Integer},baseHeight:{default:720,type:cc.Integer}},onLoad:function(){cc.macro.ENABLE_MULTI_TOUCH=!0,cc.debug.setDisplayStats(!1),this.initSceneData(),this.initSize()},initSceneData:function(){this._imageResList=[],this._audioResList=[],this._animaResList=[]},_designSize:null,initSize:function(){var t=cc.view.getFrameSize().width/cc.view.getFrameSize().height>=cc.Canvas.instance.designResolution.width/cc.Canvas.instance.designResolution.height;cc.Canvas.instance.fitHeight=t,cc.Canvas.instance.fitWidth=!t,this._designSize=cc.view.getDesignResolutionSize()},start:function(){var t=this;cc.debug.setDisplayStats(!1);var e=this.getData.bind(this);window&&window.courseware&&(e=window.courseware.getData),e(function(e){console.log("data:",e),t.data=e||t.getDefaultData(),t.preloadItem()}),console.log('cc.sys.capabilities["touches"] = ',cc.sys.capabilities.touches)},_imageResList:null,_audioResList:null,_animaResList:null,preloadItem:function(){this.addPreloadImage(),this.addPreloadAudio(),this.addPreloadAnima(),this.preload()},getData:function(t){if(window&&window.courseware)window.courseware.getData(t,"scene");else{var e=cc.find("middleLayer");e?e.getComponent("middleLayer").getData(t):t(this.getDefaultData())}},getDefaultData:function(){return JSON.parse('{"bgColor":"#f9bd03","bgColorId":0,"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/9cdf3b30720c91c2876c88a07c997c8b.jpg","rect":{"x":248.39,"y":0,"width":1038.22,"height":584}},"hotZoneItemArr":[{"id":"1607409055453","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/71108d9f5c53f900a433d930ae63848b.jpg","text":"aaaa","audio_url":"http://staging-teach.cdn.ireadabc.com/a4d27ad173a95823d4b8ec82363c5aa0.mp3","itemType":"rect","fontScale":1.19921875,"imgScale":0.45807812500000006,"mapScale":1.19921875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/51e9d8e4e2e963a7658d07eba6c282f8.json","name":"Ubbie_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/4232e00c9b1d272e650e51dbb785e498.json","name":"Ubbie_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/2e56dbe3134380952a725eacceb86359.png","name":"Ubbie_tex.png"},"gIdx":"0","rect":{"x":64.45,"y":161.67,"width":198.98,"height":198.98}},{"id":"1607409064053","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/9dfdcdb9f7c0daa15ea8f7864342893a.jpg","text":"bbbb","audio_url":"http://staging-teach.cdn.ireadabc.com/440cf9d57752b30691d90ed565e8c924.mp3","itemType":"rect","fontScale":1.19921875,"imgScale":0.45807812500000006,"mapScale":1.19921875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/7efceac56cc9a61b107a11457390d3c6.json","name":"finish1_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d6e8db4fb385127de9e3cd9d8a9530f7.json","name":"finish1_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/96f5c7a9ac9f433c9c870c38b0811a38.png","name":"finish1_tex.png"},"gIdx":"0","rect":{"x":715.1,"y":151.72,"width":198.98,"height":198.98}},{"id":"1611130853038","index":2,"pic_url":"http://staging-teach.cdn.ireadabc.com/f6f4bbef497409fef3c8f1d375893829.png","audio_url":"http://staging-teach.cdn.ireadabc.com/85cff126986f5cc11b05e95181da5869.mp3","itemType":"pic","fontScale":1.19921875,"imgScale":0.6276324728260869,"mapScale":1.19921875,"gIdx":"1","rect":{"x":821.16,"y":397.2,"width":173.23,"height":173.23}},{"id":"1611130870716","index":3,"audio_url":"http://staging-teach.cdn.ireadabc.com/5285e1e88a26a08783757e9c43a8653f.mp3","itemType":"rect","fontScale":1.19921875,"imgScale":1,"mapScale":1.19921875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/7efceac56cc9a61b107a11457390d3c6.json","name":"finish1_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d6e8db4fb385127de9e3cd9d8a9530f7.json","name":"finish1_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/96f5c7a9ac9f433c9c870c38b0811a38.png","name":"finish1_tex.png"},"gIdx":"2","rect":{"x":388.75,"y":161.64,"width":260.72,"height":260.72}}],"bg_audio_url":"http://staging-teach.cdn.ireadabc.com/3fa65d5f667a2ef9059d3dfc5df74a4d.mp3"}')},preload:function(){var t=this,e=this._imageResList.concat(this._audioResList).concat(this._animaResList);cc.assetManager.loadAny(e,null,null,function(e,n){console.log(" preload data, ",n),t.loadEnd(),window&&window.air&&window.air.hideAirClassLoading()})},addPreloadImage:function(){var t=this;this.data.bgItem&&this._imageResList.push({url:this.data.bgItem.url}),this.data.hotZoneItemArr&&this.data.hotZoneItemArr.forEach(function(e){e.pic_url&&t._imageResList.push({url:e.pic_url})})},addPreloadAudio:function(){var t=this;this.data.hotZoneItemArr&&(this.data.hotZoneItemArr.forEach(function(e){t._audioResList.push({url:e.audio_url})}),this._audioResList.push({url:this.data.bg_audio_url}))},addPreloadAnima:function(){var t=this;this.data.hotZoneItemArr&&this.data.hotZoneItemArr.forEach(function(e){e.skeJsonData&&(t._animaResList.push({url:e.skeJsonData.url||""}),t._animaResList.push({url:e.texJsonData.url||""}),t._animaResList.push({url:e.texPngData.url||""}))})},loadEnd:function(){this.initView(),this.initAudio(),this.initListener(),this.initMusic()},initMusic:function(){cc.assetManager.loadRemote(this.data.bg_audio_url,function(t,e){cc.audioEngine.setMusicVolume(.3),cc.audioEngine.playMusic(e,!0)})},_wrongAudioSource:null,_gjAudioSource:null,_endAudio:null,initAudio:function(){this._wrongAudioSource=cc.find("Canvas/res/wrong_audio").getComponent(cc.AudioSource),this._gjAudioSource=cc.find("Canvas/res/good_job").getComponent(cc.AudioSource),this._endAudio=cc.find("Canvas/res/end_audio").getComponent(cc.AudioSource)},initListener:function(){var t=this,e=cc.find("Canvas/bgBottom"),n=cc.find("Canvas"),o=!1;e.on("item_touch_start",function(e){o=!0,t.touchStartItem(e)});var i=function(e){t.canvasTouchMove(e),console.log("touch move"),n.hasEventListener(cc.Node.EventType.MOUSE_MOVE)&&n.off(cc.Node.EventType.MOUSE_MOVE,a)},a=function(e){o&&(t.canvasTouchMove(e),console.log("mouse move"),n.hasEventListener(cc.Node.EventType.TOUCH_MOVE)&&(n.off(cc.Node.EventType.TOUCH_MOVE,i),t.removeHtmlCanvasListener("touchmove")))},c=function(e){o=!1,t.canvasTouchEnd(e),console.log("touch end"),n.hasEventListener(cc.Node.EventType.MOUSE_UP)&&n.off(cc.Node.EventType.MOUSE_UP,r),n.hasEventListener(cc.Node.EventType.MOUSE_LEAVE)&&n.off(cc.Node.EventType.MOUSE_LEAVE,r),t.removeHtmlTouchEnd()},r=function(e){o=!1,t.canvasTouchEnd(e),console.log("mouse up"),n.hasEventListener(cc.Node.EventType.TOUCH_END)&&n.off(cc.Node.EventType.TOUCH_END,c),n.hasEventListener(cc.Node.EventType.TOUCH_CANCEL)&&n.off(cc.Node.EventType.TOUCH_CANCEL,c)};n.on(cc.Node.EventType.TOUCH_MOVE,i),n.on(cc.Node.EventType.MOUSE_MOVE,a),n.on(cc.Node.EventType.TOUCH_END,c),n.on(cc.Node.EventType.TOUCH_CANCEL,c),n.on(cc.Node.EventType.MOUSE_UP,r)},removeHtmlCanvasListener:function(t){document.querySelector("canvas").addEventListener(t,function(){})},initWebListener:function(){console.log("in initWebListener"),document.querySelector("canvas"),document.addEventListener("touchstart",this.htmlCanvasTouchstartFunc.bind(this),this),document.addEventListener("touchmove",this.htmlCanvasTouchmoveFunc.bind(this),this),document.addEventListener("touchend",this.htmlCanvasTouchendFunc.bind(this),this),document.addEventListener("click",this.htmlCanvasClickFunc.bind(this),this)},htmlCanvasTouchstartFunc:function(t){console.log("html htmlCanvasTouchstartFunc");var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mousedown",t);e.dispatchEvent(n)},htmlCanvasTouchmoveFunc:function(t){console.log("html htmlCanvasTouchmoveFunc");var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mousemove",t);e.dispatchEvent(n)},htmlCanvasTouchendFunc:function(t){console.log("html htmlCanvasTouchendFunc");var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mouseup",t);e.dispatchEvent(n)},htmlCanvasTouchcancelFunc:function(t){var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"mouseleave",t);e.dispatchEvent(n)},htmlCanvasClickFunc:function(t){if(!t.aaas){var e=document.querySelector("canvas"),n=this.createTouchEvent(e,"click",t);n.aaas=1,e.dispatchEvent(n)}},removeHtmlTouchEnd:function(){document.querySelector("canvas").removeEventListener("touchend",this.htmlCanvasTouchendFunc,this)},initView:function(){this.initBg(),this.initHotZone(),this.initBottomPart()},_cocosScale:null,initBg:function(){var t=cc.view.getFrameSize(),e=cc.winSize.width/t.width,n=cc.winSize.height/t.height,o=Math.min(e,n);this._cocosScale=o;var i=cc.find("Canvas/bg");e=t.width/i.width,n=t.height/i.height,i.scale=Math.max(e,n)*o,i.anchorX=1,i.anchorY=0,i.x=t.width/2*o,i.y=-t.height/2*o;var a=cc.find("Canvas/bg"),c=new cc.Node;c.x=-a.x,c.y=-a.y,c.scaleX=a.scaleX,c.scaleY=a.scaleY,a.addChild(c);var r=c.addComponent(cc.Graphics);r.fillColor=this.data.bgColor||"#f9bd03",r.fillRect(-a.width/2,-a.height/2,a.width,a.height),r.fill()},initHotZone:function(){this.initHotZoneBg()},hotZoneBg:null,hotzoneCircleArr:null,initHotZoneBg:function(){var t=this;this.hotZoneBg=new cc.Node,this.hotZoneBg.name="hotZoneBg",this.hotZoneBg.parent=cc.find("Canvas"),this.hotZoneBg.zIndex=4,this.hotzoneCircleArr=[],this.data.bgItem&&cc.loader.load({url:this.data.bgItem.url},function(e,n){t.addMask(t.hotZoneBg),t.hotZoneBg.width=n.width,t.hotZoneBg.height=n.height,t.hotZoneBg.getBoundingBox();var o=cc.view.getFrameSize();cc.winSize,console.log("this.hotZoneBg.box: ",t.hotZoneBg.getBoundingBox()),console.log("let visiSize=cc.director.getVisibleSize();: ",cc.view.getVisibleSize()),console.log("lframeSize: ",o);var i=o.width/t._designSize.width,a=o.height/t._designSize.height,c=Math.min(i,a),r=cc.find("Canvas/bgBottom");r.scale=c*t._cocosScale,i=o.width*t._cocosScale/n.width,a=(o.height*t._cocosScale-80*c*t._cocosScale)/n.height;var s=new cc.Node,h=new cc.SpriteFrame(n);s.addComponent(cc.Sprite).spriteFrame=h,s.width=t.hotZoneBg.width,s.height=t.hotZoneBg.height,s.parent=t.hotZoneBg,t.hotZoneBg.scale=Math.min(i,a),t.hotZoneBg.y=o.height/2*t._cocosScale-t.hotZoneBg.height/2*t.hotZoneBg.scaleY;var u=cc.find("Canvas/bgWhite");u.y=t.hotZoneBg.y,u.scaleX=t.hotZoneBg.width*t.hotZoneBg.scaleX/u.width,u.scaleY=t.hotZoneBg.height*t.hotZoneBg.scaleY/u.height;var d=cc.find("Canvas"),l=new cc.Node;l.y=u.y,l.scaleX=u.scaleX,l.scaleY=u.scaleY,d.addChild(l);var g=l.addComponent(cc.Graphics);g.fillColor=cc.Color.BLACK.setA(30),g.fillRect(-u.width/2+8/u.scaleX*t.hotZoneBg.scale,-u.height/2-8/u.scaleX*t.hotZoneBg.scale,u.width,u.height),g.fill(),l.zIndex=1,u.zIndex=2,r.y=-o.height/2*t._cocosScale-15*r.scaleY,t.data.hotZoneItemArr.forEach(function(e){"0"==e.gIdx?t.setOneCirclePoint(e):"1"==e.gIdx?t.setOnePic(e):"2"==e.gIdx&&t.setOneAnima(e)})})},addMask:function(t){t.addComponent(cc.Mask).type=cc.Mask.Type.RECT},bottomPicArr:null,initBottomPart:function(){var t=cc.find("Canvas/bgBottom").getComponent("bgBottom_cc_mz_003"),e=[];this.data.hotZoneItemArr.forEach(function(t){"0"==t.gIdx&&e.push(t)}),t.setItemData(e),this.bottomPicArr=e},getBottomPicArr:function(){var t=[];return this.hotzoneCircleArr.forEach(function(e){console.log("item: ",e),t.push(e.data),console.log("arr: ",t)}),console.log("hotzoneCircleArr: ",this.hotzoneCircleArr),console.log("arr: ",t),t},setOneAnima:function(t){var e=this.hotZoneBg.scale*this.hotZoneBg.width/this.data.bgItem.rect.width,n=new cc.Node;n.name="rect"+t.index,this.hotZoneBg.addChild(n);var o=n.addComponent(cc.Graphics);o.lineWidth=4,o.strokeColor=cc.Color.BLACK,o.fillColor=cc.Color.WHITE.setA(100);var i=e/this.hotZoneBg.scaleY;n.width=t.rect.width*i,n.height=t.rect.height*i,n.x=-this.hotZoneBg.width/2+t.rect.x*i,n.y=this.hotZoneBg.height/2-t.rect.height*i-t.rect.y*i,n.anchorX=n.anchorY=0,this.data.bgItem.isShowDebugLine&&o.rect(0,0,n.width,n.height),o.stroke(),o.fill();var a=new cc.Node;a.name="anima_"+t.index,this.hotZoneBg.addChild(a),t.audio_url&&cc.assetManager.loadRemote(t.audio_url,function(t,e){a.audioClip=e});var c=a.addComponent(dragonBones.ArmatureDisplay),r=t.texPngData.url,s=t.skeJsonData.url,h=t.texJsonData.url;cc.loader.load(r,function(t,e){cc.loader.load({url:h,type:"txt"},function(t,o){cc.loader.load({url:s,type:"txt"},function(t,i){var r=new dragonBones.DragonBonesAtlasAsset;r.atlasJson=o,r.texture=e;var s=new dragonBones.DragonBonesAsset;s.dragonBonesJson=i,c.dragonAtlasAsset=r,c.dragonAsset=s;var h=JSON.parse(s.dragonBonesJson).armature;console.log("armatures: ",h);for(var u=[],d=0;d<h.length;d++)u.push(h[d].name);if(u.length>0){var l=u[0];c.armatureName=l;for(var g=h[0].animation,f=[],p=0;p<g.length;p++)f.push(g[p].name);n.addComponent(cc.Button),n.on("click",function(){n.isClicked,n.isClicked=!0,console.log("clicked"),a.audioClip&&(cc.audioEngine.stopAllEffects(),cc.audioEngine.playEffect(a.audioClip,!1,.8)),f.length>0&&c.playAnimation(f[0],1)})}})})})},setOnePic:function(t){var e=this,n=this.hotZoneBg.scale*this.hotZoneBg.width/this.data.bgItem.rect.width,o=new cc.Node;o.data=t,this.hotZoneBg.addChild(o),cc.loader.load({url:t.pic_url},function(i,a){o.addComponent(cc.Sprite).spriteFrame=new cc.SpriteFrame(a);var c=n/e.hotZoneBg.scaleY;o.width=t.rect.width*c,o.height=t.rect.height*c,o.x=-e.hotZoneBg.width/2+t.rect.x*c,o.y=e.hotZoneBg.height/2-t.rect.height*c-t.rect.y*c,o.anchorX=o.anchorY=0,t.audio_url&&e.addPicAudio(o)})},addPicAudio:function(t){var e=t.data;cc.assetManager.loadRemote(e.audio_url,function(e,n){t.audioClip=n}),t.addComponent(cc.Button),t.on("click",function(){t.audioClip&&(cc.audioEngine.stopAllEffects(),cc.audioEngine.playEffect(t.audioClip,!1,.8))})},setOneCirclePoint:function(t){var e=this,n=this.hotZoneBg.scale*this.hotZoneBg.width/this.data.bgItem.rect.width,o=new cc.Node;o.name="rect"+t.index,o.data=t,this.hotZoneBg.addChild(o);var i=o.addComponent(cc.Sprite),a=cc.find("Canvas/res/circle_bg_small");i.spriteFrame=a.getComponent(cc.Sprite).spriteFrame;var c=n/this.hotZoneBg.scaleY;if(o.width=a.width,o.height=a.height,o.x=-this.hotZoneBg.width/2+(t.rect.x+t.rect.width/2)*c,o.y=this.hotZoneBg.height/2-t.rect.height/2*c-t.rect.y*c,o.anchorX=o.anchorY=.5,t.audio_url&&cc.assetManager.loadRemote(t.audio_url,function(e,n){t.audioClip=n}),this.hotzoneCircleArr.push(o),t.skeJsonData){var r=new cc.Node;r.name="anima_"+t.index,this.hotZoneBg.addChild(r),t.animaNode=r,r.active=!1,t.audio_url&&cc.assetManager.loadRemote(t.audio_url,function(t,e){r.audioClip=e});var s=r.addComponent(dragonBones.ArmatureDisplay),h=t.texPngData.url,u=t.skeJsonData.url,d=t.texJsonData.url;cc.loader.load(h,function(t,n){cc.loader.load({url:d,type:"txt"},function(t,i){cc.loader.load({url:u,type:"txt"},function(t,a){var c=new dragonBones.DragonBonesAtlasAsset;c.atlasJson=i,c.texture=n;var h=new dragonBones.DragonBonesAsset;h.dragonBonesJson=a,s.dragonAtlasAsset=c,s.dragonAsset=h;var u=JSON.parse(h.dragonBonesJson).armature;console.log("armatures: ",u);for(var d=[],l=0;l<u.length;l++)d.push(u[l].name);if(d.length>0){var g=d[0];s.armatureName=g;for(var f=u[0].animation,p=[],m=0;m<f.length;m++)p.push(f[m].name);r.showAnima=function(){if(r.active=!0,o.isClicked,o.isClicked=!0,console.log("clicked"),r.audioClip){cc.audioEngine.stopAllEffects();var t=cc.audioEngine.playEffect(r.audioClip,!1,.8);cc.audioEngine.setFinishCallback(t,function(){var t=cc.audioEngine.playEffect(e._gjAudioSource.clip,!1,.8);cc.audioEngine.setFinishCallback(t,function(){e.checkGameEnd()&&e.gameEnd()})})}p.length>0&&s.playAnimation(p[0],1)}}})})})}},checkGameEnd:function(){for(var t=0;t<this.hotzoneCircleArr.length;t++)if(this.hotzoneCircleArr[t].active)return!1;return!0},gameEnd:function(){console.log("this.gameEnd"),this.playEndEffect()},playEndEffect:function(){(0,n.playAudio)(this._endAudio.clip,.8);var t=cc.find("Canvas/Main Camera");t.zIndex=100,(0,n.showTrebleFirework)(t,cc.find("RibbonNodeBase").children)},_curShowItem:null,bottomItemClick:function(){},_toCenterShow:function(t){var e=cc.find("Canvas/bgBottom");cc.tween(t).to(1,{x:0,y:0,scale:e.scale},{easing:"cubicOut"}).call(function(){}).start(),t.isSmall=!1,t.zIndex=11},hideCurShowItem:function(){var t=this.getTargetCircleNode(),e=t.parent.convertToWorldSpaceAR(cc.v2(t.x+t.width/2,t.y+t.height/2)),n=this._curShowItem.parent.convertToNodeSpaceAR(cc.v2(e.x,e.y)),o=t.parent.scaleY*t.height*t.scaleY/this._curShowItem.height,i=this._curShowItem;i.cantouch=!1,cc.tween(this._curShowItem).to(1,{scale:.95*o,x:n.x,y:n.y},{easing:"cubicOut"}).call(function(){i.cantouch=!0}).start(),this._curShowItem.isSmall=!0,this._curShowItem.zIndex=9,this._curShowItem=null},getTargetCircleNode:function(){var t=this._curShowItem.data.index;return this.hotzoneCircleArr.find(function(e){return e.data.index==t})},canvasClick:function(){console.log("canvas click"),this._curShowItem&&this.hideCurShowItem()},touchStartItem:function(t){if(!t.data.isDrag){t.data.isDrag=!0;var e=cc.find("Canvas/res/circle_bg_small"),n=cc.find("Canvas/bgBottom");t.opacity=0;var o=new cc.Node;o.parent=cc.find("Canvas"),o.zIndex=10,o.opacity=255,o.data=t.data,o.width=e.width,o.height=e.height,o.scale=n.scale*t.scale;var i=t.parent.convertToWorldSpaceAR(cc.v2(t.x,t.y)),a=o.parent.convertToNodeSpaceAR(cc.v2(i.x,i.y));o.x=a.x,o.y=a.y;var c=cc.instantiate(t);c.parent=o,c.opacity=255,c.x=0,c.y=0,c.scale=o.width/c.width,c.removeComponent(cc.Button);var r=t.getBoundingBoxToWorld(),s=o.getBoundingBoxToWorld(),h=r.width/s.width;console.log("worldRect1: ",r),console.log("worldRect2: ",s),console.log("rate: ",h),o.scale*=h,this._curShowItem=o,this._curShowItem.bgBottomItem=t,this._curShowItem.baseX=this._curShowItem.x,this._curShowItem.baseY=this._curShowItem.y}},checkOnTargetCircle:function(){for(var t=0;t<this.hotzoneCircleArr.length;t++){var e=this.hotzoneCircleArr[t];if(e.data.index==this._curShowItem.data.index){var n=this._curShowItem.parent.convertToWorldSpaceAR(cc.v2(this._curShowItem.x,this._curShowItem.y));if(e.getBoundingBoxToWorld().contains(n))return void this.itemAppear(e)}}this.itemBack()},itemAppear:function(t){t.active=!1,this._curShowItem.active=!1,t.data.animaNode&&t.data.animaNode.showAnima()},itemBack:function(){var t=cc.v2(this._curShowItem.x,this._curShowItem.y),e=cc.v2(this._curShowItem.baseX,this._curShowItem.baseY);t.sub(e).mag()<=20&&this._curShowItem.data.audioClip?(cc.audioEngine.stopAllEffects(),cc.audioEngine.playEffect(this._curShowItem.data.audioClip,!1,.8)):cc.audioEngine.playEffect(this._wrongAudioSource.clip,!1,.8);var n=this._curShowItem;cc.tween(n).to(.3,{x:n.baseX,y:n.baseY},{easing:"elasticOut"}).call(function(){n.bgBottomItem.opacity=255,n.removeFromParent(),n.data.isDrag=!1}).start()},canvasTouchMove:function(t){if(this._curShowItem){var e=t.getLocation();this._curShowItem.x=e.x-t.currentTarget.width/2,this._curShowItem.y=e.y-t.currentTarget.height/2}},canvasTouchEnd:function(t){this._curShowItem&&(this.checkOnTargetCircle(t),this._curShowItem=null)},createTouchEvent:function(t,e,n){[].concat(n.touches);var o=n.touches?n.touches[0]||{}:n,i=new Touch({identifier:-Date.now(),target:t,clientX:o.clientX||0,clientY:o.clientY||0,force:o.force,pageX:o.pageX,pageY:o.pageY,radiusX:o.radiusX,radiusY:o.radiusY,rotationAngle:n.rotationAngle,screenX:o.screenX,screenY:o.screenY}),a=new TouchEvent(e,{touches:[i],view:window,cancelable:!0,bubbles:!0,changedTouches:[i]});return a.fireByMe=!0,a.pageX=o.pageX,a.pageY=o.pageY,a.clientX=o.clientX,a.clientY=o.clientY,a.screenX=o.screenX,a.screenY=o.screenY,a}}),cc._RF.pop()},{"./util":void 0}],runtime:[function(t,e){"use strict";cc._RF.push(e,"5e66eIbuEVIi43aG8uDxSYt","runtime"),function(t){var n,o=Object.prototype,i=o.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",h="object"==typeof e,u=t.regeneratorRuntime;if(u)h&&(e.exports=u);else{(u=t.regeneratorRuntime=h?e.exports:{}).wrap=y;var d="suspendedStart",l="suspendedYield",g="executing",f="completed",p={},m={};m[c]=function(){return this};var v=Object.getPrototypeOf,_=v&&v(v(M([])));_&&_!==o&&i.call(_,c)&&(m=_);var w=E.prototype=b.prototype=Object.create(m);C.prototype=w.constructor=E,E.constructor=C,E[s]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(w),t},u.awrap=function(t){return{__await:t}},S(B.prototype),B.prototype[r]=function(){return this},u.AsyncIterator=B,u.async=function(t,e,n,o){var i=new B(y(t,e,n,o));return u.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(w),w[s]="Generator",w[c]=function(){return this},w.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},u.values=M,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(o,i){return r.type="throw",r.arg=t,e.next=o,i&&(e.method="next",e.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a],r=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var s=i.call(c,"catchLoc"),h=i.call(c,"finallyLoc");if(s&&h){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var c=a?a.completion:{};return c.type=t,c.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:M(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=n),p}}}function y(t,e,n,o){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new N(o||[]);return a._invoke=T(t,n,c),a}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(o){return{type:"throw",arg:o}}}function b(){}function C(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function B(t){function e(n,o,a,c){var r=x(t[n],t,o);if("throw"!==r.type){var s=r.arg,h=s.value;return h&&"object"==typeof h&&i.call(h,"__await")?Promise.resolve(h.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):Promise.resolve(h).then(function(t){s.value=t,a(s)},c)}c(r.arg)}var n;this._invoke=function(t,o){function i(){return new Promise(function(n,i){e(t,o,n,i)})}return n=n?n.then(i,i):i()}}function T(t,e,n){var o=d;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===f){if("throw"===i)throw a;return R()}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var r=A(c,n);if(r){if(r===p)continue;return r}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=x(t,e,n);if("normal"===s.type){if(o=n.done?f:l,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=f,n.method="throw",n.arg=s.arg)}}}function A(t,e){var o=t.iterator[e.method];if(o===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,A(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=x(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function M(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(i.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:R}}function R(){return{value:n,done:!0}}}(function(){return this}()||Function("","return this")()),cc._RF.pop()},{}],util:[function(t,e,n){"use strict";function o(t,e,n,o,i,a,c){try{var r=t[a](c),s=r.value}catch(h){return void n(h)}r.done?e(s):Promise.resolve(s).then(o,i)}function i(t){return function(){var e=this,n=arguments;return new Promise(function(i,a){var c=t.apply(e,n);function r(t){o(c,i,a,r,s,"next",t)}function s(t){o(c,i,a,r,s,"throw",t)}r(void 0)})}}function a(t,e){void 0===e&&(e=0);var n=Math.max(t,e),o=Math.min(t,e);return Math.floor(Math.random()*(n-o)+o)}function c(t){return new Promise(function(e,n){try{cc.loader.load(t,function(t,n){e(n)})}catch(o){n(o)}})}function r(){return(r=i(regeneratorRuntime.mark(function t(e,n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===n&&(n=1),t.abrupt("return",new Promise(function(t,o){try{if(!e)return void t();var i=cc.audioEngine.play(e,!1,n);cc.audioEngine.setFinishCallback(i,function(){t()})}catch(a){o(a)}}));case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}function s(){return h.apply(this,arguments)}function h(){return(h=i(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){try{setTimeout(function(){t()},1e3*e)}catch(o){n(o)}}));case 1:case"end":return t.stop()}},t)}))).apply(this,arguments)}cc._RF.push(e,"85554W5Em9M3Zcy2IwmWFqE","util"),n.__esModule=!0,n.getPosByAngle=function(t,e){var n=t*Math.PI/180;return{x:Math.sin(n)*e,y:Math.cos(n)*e}},n.getAngleByPos=function(t,e,n,o){var i=Math.abs(t-n),a=Math.abs(e-o),c=a/Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),r=Math.acos(c),s=Math.floor(180/(Math.PI/r)*100)/100;return n>t&&o>e&&(s=180-s),n===t&&o>e&&(s=180),n>t&&o===e&&(s=90),n<t&&o>e&&(s=180+s),n<t&&o===e&&(s=270),n<t&&o<e&&(s=360-s),s},n.exchangeNodePos=function(t,e){return t.convertToNodeSpaceAR(e._parent.convertToWorldSpaceAR(cc.v2(e.x,e.y)))},n.RandomInt=a,n.randomSortByArr=function(t){for(var e=[],n=t.concat();n.length>0;){var o=Math.floor(n.length*Math.random());e.push(n[o]),n.splice(o,1)}return e},n.setSprNodeMaxLen=function(t,e,n){var o=e/t.width,i=n/t.height,a=Math.min(o,i);t.scale=Math.round(1e3*a)/1e3},n.localPosTolocalPos=function(t,e){var n=e.parent.convertToWorldSpaceAR(cc.v2(e.x,e.y));return t.parent.convertToNodeSpaceAR(cc.v2(n.x,n.y))},n.getScaleRateBy2Node=function(t,e,n){void 0===n&&(n=!0);var o=e.getBoundingBoxToWorld(),i=t.getBoundingBoxToWorld(),a=o.width/i.width,c=o.height/i.height;return n?Math.max(a,c):Math.min(a,c)},n.asyncCCLoad=c,n.loadDragonBones=function(t,e,n,o){Promise.all([c(t),c({url:e,type:"txt"}),c({url:n,type:"txt"})]).then(function(t){var e=t[0],n=t[1],i=t[2];o(e,n,i)}).catch(function(t){console.log(t)})},n.playAudio=function(){return r.apply(this,arguments)},n.asyncDelay=s,n.showFireworks=d,n.asyncTweenTo=function(){return p.apply(this,arguments)},n.asyncTweenBy=m,n.showTrebleFirework=function(t,e){var n=new u(t,e);n.pos=cc.v2(0,-400),n.side=cc.v2(0,1e3),n.range=200,n.number=100,n.scalseRange=.4;var o=u.copy(n);o.pos=cc.v2(-600,-400),o.side=cc.v2(200,1e3);var i=u.copy(n);i.pos=cc.v2(600,-400),i.side=cc.v2(-200,1e3),d(n),d(o),d(i)},n.FireworkSettings=void 0;var u=function(){function t(t,e,n,o,i,a,c){void 0===n&&(n=cc.v2(0,0)),void 0===o&&(o=cc.v2(0,100)),void 0===i&&(i=50),void 0===a&&(a=100),void 0===c&&(c=0),this.baseNode=void 0,this.nodeList=void 0,this.pos=void 0,this.side=void 0,this.range=void 0,this.number=void 0,this.scalseRange=void 0,this.baseNode=t,this.nodeList=e,this.pos=n,this.side=o,this.range=i,this.number=a,this.scalseRange=c}return t.copy=function(e){return new t(e.baseNode,e.nodeList,e.pos,e.side,e.range,e.number)},t}();function d(){return l.apply(this,arguments)}function l(){return(l=i(regeneratorRuntime.mark(function t(e){var n,o,c,r,h,u,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=e.baseNode,o=e.nodeList,c=e.pos,r=e.side,h=e.range,u=e.number,d=e.scalseRange,new Array(u).fill(" ").forEach(function(){var t=i(regeneratorRuntime.mark(function t(){var e,i,u,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new cc.Node).parent=n,e.x=c.x,e.y=c.y,e.angle=60*Math.random()-30,(i=cc.instantiate(o[a(o.length)])).parent=e,i.active=!0,i.x=0,i.y=0,i.angle=0,i.scale=(Math.random()-.5)*d+1,u=Math.random(),l=Math.PI*(2*Math.random()-1),t.next=16,m(e,.3,{x:r.x*u+Math.cos(l)*h*u,y:r.y*u+Math.sin(l)*h*u},{easing:"quadIn"});case 16:return cc.tween(e).by(8,{y:-2e3}).start(),cc.tween(e).to(5,{scale:(Math.random()-.5)*d+1}).start(),g(e),t.next=21,s(Math.random());case 21:cc.tween(i).by(.15,{x:-10,angle:-10}).by(.3,{x:20,angle:20}).by(.15,{x:-10,angle:-10}).union().repeatForever().start(),cc.tween(e).delay(5).to(.3,{opacity:0}).call(function(){i.stopAllActions(),i.active=!1,i.parent=null,i=null}).start();case 23:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}function g(){return f.apply(this,arguments)}function f(){return(f=i(regeneratorRuntime.mark(function t(e){var n,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=1+Math.random(),o=a(-200,200)*n,t.next=4,m(e,n,{x:o,angle:60*o/200});case 4:g(e);case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function p(){return(p=i(regeneratorRuntime.mark(function t(e,n,o,i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=void 0),t.abrupt("return",new Promise(function(t,a){try{cc.tween(e).to(n,o,i).call(function(){t()}).start()}catch(c){a(c)}}));case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}function m(){return v.apply(this,arguments)}function v(){return(v=i(regeneratorRuntime.mark(function t(e,n,o,i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===i&&(i=void 0),t.abrupt("return",new Promise(function(t,a){try{cc.tween(e).by(n,o,i).call(function(){t()}).start()}catch(c){a(c)}}));case 2:case"end":return t.stop()}},t)}))).apply(this,arguments)}n.FireworkSettings=u,cc._RF.pop()},{}]},{},["bgBottom_cc_mz_003","cc_mz_003","runtime","util"]);
\ No newline at end of file
No preview for this file type
......@@ -93,6 +93,19 @@ cc.Class({
this.preload();
},
getData: function getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, 'scene');
return;
}
var middleLayer = cc.find('middleLayer');
if (middleLayer) {
var middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
},
getDefaultData: function getDefaultData() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"9836134e-b892-4283-b6b2-78b5acf3ed45": {
"asset": 1617772640000,
"meta": 1639648801619,
"meta": 1639826518853,
"relativePath": "effects"
},
"430eccbf-bf2c-4e6e-8c0c-884bbb487f32": {
"asset": 1617772640000,
"meta": 1639648801641,
"meta": 1639826518873,
"relativePath": "effects/__builtin-editor-gizmo-line.effect"
},
"6c5cf6e1-b044-4eac-9431-835644d57381": {
"asset": 1617772640000,
"meta": 1639648801654,
"meta": 1639826518894,
"relativePath": "effects/__builtin-editor-gizmo-unlit.effect"
},
"115286d1-2e10-49ee-aab4-341583f607e8": {
"asset": 1617772640000,
"meta": 1639648801688,
"meta": 1639826518928,
"relativePath": "effects/__builtin-editor-gizmo.effect"
},
"abc2cb62-7852-4525-a90d-d474487b88f2": {
"asset": 1617772640000,
"meta": 1639648801799,
"meta": 1639826519029,
"relativePath": "effects/builtin-phong.effect"
},
"e2f00085-c597-422d-9759-52c360279106": {
"asset": 1617772640000,
"meta": 1639648801872,
"meta": 1639826519084,
"relativePath": "effects/builtin-toon.effect"
},
"f8e6b000-5643-4b86-9080-aa680ce1f599": {
"asset": 1617772640000,
"meta": 1639648801887,
"meta": 1639826519098,
"relativePath": "image"
},
"71561142-4c83-4933-afca-cb7a17f67053": {
"asset": 1617772640000,
"meta": 1639648801903,
"meta": 1639826519115,
"relativePath": "image/default_btn_disabled.png"
},
"e851e89b-faa2-4484-bea6-5c01dd9f06e2": {
"asset": 1617772640000,
"meta": 1639648801904,
"meta": 1639826519116,
"relativePath": "image/default_btn_normal.png"
},
"b43ff3c2-02bb-4874-81f7-f2dea6970f18": {
"asset": 1617772640000,
"meta": 1639648801916,
"meta": 1639826519126,
"relativePath": "image/default_btn_pressed.png"
},
"edd215b9-2796-4a05-aaf5-81f96c9281ce": {
"asset": 1617772640000,
"meta": 1639648801920,
"meta": 1639826519129,
"relativePath": "image/default_editbox_bg.png"
},
"99170b0b-d210-46f1-b213-7d9e3f23098a": {
"asset": 1617772640000,
"meta": 1639648801930,
"meta": 1639826519137,
"relativePath": "image/default_progressbar_bg.png"
},
"d81ec8ad-247c-4e62-aa3c-d35c4193c7af": {
"asset": 1617772640000,
"meta": 1639648801929,
"meta": 1639826519138,
"relativePath": "image/default_panel.png"
},
"cfef78f1-c8df-49b7-8ed0-4c953ace2621": {
"asset": 1617772640000,
"meta": 1639648801959,
"meta": 1639826519146,
"relativePath": "image/default_progressbar.png"
},
"567dcd80-8bf4-4535-8a5a-313f1caf078a": {
"asset": 1617772640000,
"meta": 1639648801961,
"meta": 1639826519148,
"relativePath": "image/default_radio_button_off.png"
},
"4bab67cb-18e6-4099-b840-355f0473f890": {
"asset": 1617772640000,
"meta": 1639648801973,
"meta": 1639826519159,
"relativePath": "image/default_scrollbar_bg.png"
},
"9d60001f-b5f4-4726-a629-2659e3ded0b8": {
"asset": 1617772640000,
"meta": 1639648801974,
"meta": 1639826519161,
"relativePath": "image/default_radio_button_on.png"
},
"617323dd-11f4-4dd3-8eec-0caf6b3b45b9": {
"asset": 1617772640000,
"meta": 1639648801987,
"meta": 1639826519173,
"relativePath": "image/default_scrollbar_vertical_bg.png"
},
"d6d3ca85-4681-47c1-b5dd-d036a9d39ea2": {
"asset": 1617772640000,
"meta": 1639648801986,
"meta": 1639826519174,
"relativePath": "image/default_scrollbar_vertical.png"
},
"0275e94c-56a7-410f-bd1a-fc7483f7d14a": {
"asset": 1617772640000,
"meta": 1639648801995,
"meta": 1639826519183,
"relativePath": "image/default_sprite_splash.png"
},
"0291c134-b3da-4098-b7b5-e397edbe947f": {
"asset": 1617772640000,
"meta": 1639648801997,
"meta": 1639826519184,
"relativePath": "image/default_scrollbar.png"
},
"6e056173-d285-473c-b206-40a7fff5386e": {
"asset": 1617772640000,
"meta": 1639648802007,
"meta": 1639826519205,
"relativePath": "image/default_sprite.png"
},
"73a0903d-d80e-4e3c-aa67-f999543c08f5": {
"asset": 1617772640000,
"meta": 1639648802010,
"meta": 1639826519208,
"relativePath": "image/default_toggle_checkmark.png"
},
"c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f": {
"asset": 1617772640000,
"meta": 1639648802020,
"meta": 1639826519219,
"relativePath": "image/default_toggle_disabled.png"
},
"d29077ba-1627-4a72-9579-7b56a235340c": {
"asset": 1617772640000,
"meta": 1639648802021,
"meta": 1639826519220,
"relativePath": "image/default_toggle_normal.png"
},
"b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd": {
"asset": 1617772640000,
"meta": 1639648802029,
"meta": 1639826519228,
"relativePath": "image/default_toggle_pressed.png"
},
"5c3eedba-6c41-4c0c-9ba7-d91f813cbd1c": {
"asset": 1617772640000,
"meta": 1639648802030,
"meta": 1639826519230,
"relativePath": "materials"
},
"c4480a0a-6ac5-443f-8b40-361a14257fc8": {
"asset": 1617772640000,
"meta": 1639648802503,
"meta": 1639826519610,
"relativePath": "materials/builtin-phong.mtl"
},
"fc09f9bd-2cce-4605-b630-8145ef809ed6": {
"asset": 1617772640000,
"meta": 1639648802033,
"meta": 1639826519234,
"relativePath": "misc"
},
"2be36297-9abb-4fee-8049-9ed5e271da8a": {
"asset": 1617772640000,
"meta": 1639648802037,
"meta": 1639826519238,
"relativePath": "misc/default_video.mp4"
},
"db019bf7-f71c-4111-98cf-918ea180cb48": {
"asset": 1617772640000,
"meta": 1639648802037,
"meta": 1639826519239,
"relativePath": "model"
},
"e39e96e6-6f6e-413f-bcf1-ac7679bb648a": {
"asset": 1617772640000,
"meta": 1639648802038,
"meta": 1639826519240,
"relativePath": "model/prefab"
},
"a87cc147-01b2-43f8-8e42-a7ca90b0c757": {
"asset": 1617772640000,
"meta": 1639648802040,
"meta": 1639826519247,
"relativePath": "model/prefab/box.prefab"
},
"fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a": {
"asset": 1617772640000,
"meta": 1639648802042,
"meta": 1639826519245,
"relativePath": "model/prefab/capsule.prefab"
},
"b5fc2cf2-7942-483d-be1f-bbeadc4714ad": {
"asset": 1617772640000,
"meta": 1639648802046,
"meta": 1639826519249,
"relativePath": "model/prefab/cone.prefab"
},
"600301aa-3357-4a10-b086-84f011fa32ba": {
"asset": 1617772640000,
"meta": 1639648802044,
"meta": 1639826519243,
"relativePath": "image/default-particle.png"
},
"1c5e4038-953a-44c2-b620-0bbfc6170477": {
"asset": 1617772640000,
"meta": 1639648802047,
"meta": 1639826519250,
"relativePath": "model/prefab/cylinder.prefab"
},
"3f376125-a699-40ca-ad05-04d662eaa1f2": {
"asset": 1617772640000,
"meta": 1639648802049,
"meta": 1639826519252,
"relativePath": "model/prefab/plane.prefab"
},
"6c9ef10d-b479-420b-bfe6-39cdda6a8ae0": {
"asset": 1617772640000,
"meta": 1639648802050,
"meta": 1639826519253,
"relativePath": "model/prefab/quad.prefab"
},
"2d9a4b85-b0ab-4c46-84c5-18f393ab2058": {
"asset": 1617772640000,
"meta": 1639648802052,
"meta": 1639826519255,
"relativePath": "model/prefab/sphere.prefab"
},
"de510076-056b-484f-b94c-83bef217d0e1": {
"asset": 1617772640000,
"meta": 1639648802067,
"meta": 1639826519269,
"relativePath": "model/prefab/torus.prefab"
},
"f6e6dd15-71d1-4ffe-ace7-24fd39942c05": {
"asset": 1617772640000,
"meta": 1639648802068,
"meta": 1639826519270,
"relativePath": "obsolete"
},
"8a96b965-2dc0-4e03-aa90-3b79cb93b5b4": {
"asset": 1617772640000,
"meta": 1639648802082,
"meta": 1639826519283,
"relativePath": "obsolete/atom.png"
},
"f743d2b6-b7ea-4c14-a55b-547ed4d0a045": {
"asset": 1617772640000,
"meta": 1639648802083,
"meta": 1639826519284,
"relativePath": "particle"
},
"b8223619-7e38-47c4-841f-9160c232495a": {
"asset": 1617772640000,
"meta": 1639648802525,
"meta": 1639826519625,
"relativePath": "obsolete/atom.plist"
},
"d0a82d39-bede-46c4-b698-c81ff0dedfff": {
"asset": 1617772640000,
"meta": 1639648802100,
"meta": 1639826519296,
"relativePath": "particle/atom.png"
},
"ae6c6c98-11e4-452f-8758-75f5c6a56e83": {
"asset": 1617772640000,
"meta": 1639648802101,
"meta": 1639826519297,
"relativePath": "prefab"
},
"b2687ac4-099e-403c-a192-ff477686f4f5": {
"asset": 1617772640000,
"meta": 1639648802527,
"meta": 1639826519626,
"relativePath": "particle/atom.plist"
},
"897ef7a1-4860-4f64-968d-f5924b18668a": {
"asset": 1617772640000,
"meta": 1639648802103,
"meta": 1639826519299,
"relativePath": "prefab/2d-camera.prefab"
},
"70d7cdb0-04cd-41bb-9480-c06a4785f386": {
"asset": 1617772640000,
"meta": 1639648802106,
"meta": 1639826519301,
"relativePath": "prefab/3d-camera.prefab"
},
"70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4": {
"asset": 1617772640000,
"meta": 1639648802109,
"meta": 1639826519303,
"relativePath": "prefab/3d-particle.prefab"
},
"ed88f13d-fcad-4848-aa35-65a2cb973584": {
"asset": 1617772640000,
"meta": 1639648802112,
"meta": 1639826519305,
"relativePath": "prefab/3d-stage.prefab"
},
"972b9a4d-47ee-4c74-b5c3-61d8a69bc29f": {
"asset": 1617772640000,
"meta": 1639648802115,
"meta": 1639826519308,
"relativePath": "prefab/button.prefab"
},
"2c937608-2562-40ea-b264-7395df6f0cea": {
"asset": 1617772640000,
"meta": 1639648802117,
"meta": 1639826519311,
"relativePath": "prefab/canvas.prefab"
},
"61aeb05b-3b32-452b-8eed-2b76deeed554": {
"asset": 1617772640000,
"meta": 1639648802120,
"meta": 1639826519313,
"relativePath": "prefab/editbox.prefab"
},
"27756ebb-3d33-44b0-9b96-e858fadd4dd4": {
"asset": 1617772640000,
"meta": 1639648802122,
"meta": 1639826519318,
"relativePath": "prefab/label.prefab"
},
"785a442c-3ceb-45be-a46e-7317f625f3b9": {
"asset": 1617772640000,
"meta": 1639648802124,
"meta": 1639826519328,
"relativePath": "prefab/layout.prefab"
},
"a3ee0214-b432-4865-9666-4a3211814282": {
"asset": 1617772640000,
"meta": 1639648802125,
"meta": 1639826519329,
"relativePath": "prefab/light"
},
"61906da3-7003-4bda-9abc-5769c76faee4": {
"asset": 1617772640000,
"meta": 1639648802131,
"meta": 1639826519333,
"relativePath": "prefab/light/ambient.prefab"
},
"ddb99b39-7004-47cd-9705-751905c43c46": {
"asset": 1617772640000,
"meta": 1639648802143,
"meta": 1639826519335,
"relativePath": "prefab/light/directional.prefab"
},
"0cf30284-9073-46bc-9eba-e62b69dbbff3": {
"asset": 1617772640000,
"meta": 1639648802148,
"meta": 1639826519338,
"relativePath": "prefab/light/point.prefab"
},
"f5331fd2-bf42-4ee3-a3fd-3e1657600eff": {
"asset": 1617772640000,
"meta": 1639648802152,
"meta": 1639826519346,
"relativePath": "prefab/light/spot.prefab"
},
"ca8401fe-ad6e-41a8-bd46-8e3e4e9945be": {
"asset": 1617772640000,
"meta": 1639648802161,
"meta": 1639826519372,
"relativePath": "prefab/pageview.prefab"
},
"cd33edea-55f5-46c2-958d-357a01384a36": {
"asset": 1617772640000,
"meta": 1639648802163,
"meta": 1639826519376,
"relativePath": "prefab/particlesystem.prefab"
},
"5965ffac-69da-4b55-bcde-9225d0613c28": {
"asset": 1617772640000,
"meta": 1639648802204,
"meta": 1639826519382,
"relativePath": "prefab/progressBar.prefab"
},
"4a37dd57-78cd-4cec-aad4-f11a73d12b63": {
"asset": 1617772640000,
"meta": 1639648802207,
"meta": 1639826519386,
"relativePath": "prefab/richtext.prefab"
},
"32044bd2-481f-4cf1-a656-e2b2fb1594eb": {
"asset": 1617772640000,
"meta": 1639648802210,
"meta": 1639826519390,
"relativePath": "prefab/scrollview.prefab"
},
"0004d1cf-a0ad-47d8-ab17-34d3db9d35a3": {
"asset": 1617772640000,
"meta": 1639648802215,
"meta": 1639826519392,
"relativePath": "prefab/slider.prefab"
},
"1f55e3be-b89b-4b79-88de-47fd31018044": {
"asset": 1617772640000,
"meta": 1639648802217,
"meta": 1639826519394,
"relativePath": "prefab/sprite_splash.prefab"
},
"96083d03-c332-4a3f-9386-d03e2d19e8ee": {
"asset": 1617772640000,
"meta": 1639648802222,
"meta": 1639826519396,
"relativePath": "prefab/sprite.prefab"
},
"7de03a80-4457-438d-95a7-3e7cdffd6086": {
"asset": 1617772640000,
"meta": 1639648802224,
"meta": 1639826519397,
"relativePath": "prefab/tiledmap.prefab"
},
"0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c": {
"asset": 1617772640000,
"meta": 1639648802227,
"meta": 1639826519399,
"relativePath": "prefab/tiledtile.prefab"
},
"0d784963-d024-4ea6-a7db-03be0ad63010": {
"asset": 1617772640000,
"meta": 1639648802228,
"meta": 1639826519400,
"relativePath": "prefab/toggle.prefab"
},
"bf0a434c-84dd-4a8e-a08a-7a36f180cc75": {
"asset": 1617772640000,
"meta": 1639648802232,
"meta": 1639826519404,
"relativePath": "prefab/toggleContainer.prefab"
},
"d1b8be49-b0a0-435c-83b7-552bed4bbe35": {
"asset": 1617772640000,
"meta": 1639648802234,
"meta": 1639826519406,
"relativePath": "prefab/toggleGroup.prefab"
},
"232d2782-c4bd-4bb4-9e01-909f03d6d3b9": {
"asset": 1617772640000,
"meta": 1639648802237,
"meta": 1639826519407,
"relativePath": "prefab/videoplayer.prefab"
},
"d8afc78c-4eac-4a9f-83dd-67bc70344d33": {
"asset": 1617772640000,
"meta": 1639648802238,
"meta": 1639826519408,
"relativePath": "resources"
},
"294c1663-4adf-4a1e-a795-53808011a38a": {
"asset": 1617772640000,
"meta": 1639648802238,
"meta": 1639826519411,
"relativePath": "resources/effects"
},
"30682f87-9f0d-4f17-8a44-72863791461b": {
"asset": 1617772640000,
"meta": 1639648802250,
"meta": 1639826519420,
"relativePath": "resources/effects/builtin-2d-graphics.effect"
},
"144c3297-af63-49e8-b8ef-1cfa29b3be28": {
"asset": 1617772640000,
"meta": 1639648802263,
"meta": 1639826519428,
"relativePath": "resources/effects/builtin-2d-gray-sprite.effect"
},
"8c5001fd-07ee-4a4b-a8a0-63e15195e94d": {
"asset": 1617772640000,
"meta": 1639648802240,
"meta": 1639826519409,
"relativePath": "prefab/webview.prefab"
},
"f18742d7-56d2-4eb5-ae49-2d9d710b37c8": {
"asset": 1617772640000,
"meta": 1639648802274,
"meta": 1639826519438,
"relativePath": "resources/effects/builtin-2d-label.effect"
},
"0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7": {
"asset": 1617772640000,
"meta": 1639648802286,
"meta": 1639826519446,
"relativePath": "resources/effects/builtin-2d-spine.effect"
},
"2874f8dd-416c-4440-81b7-555975426e93": {
"asset": 1617772640000,
"meta": 1639648802295,
"meta": 1639826519457,
"relativePath": "resources/effects/builtin-2d-sprite.effect"
},
"829a282c-b049-4019-bd38-5ace8d8a6417": {
"asset": 1617772640000,
"meta": 1639648802403,
"meta": 1639826519536,
"relativePath": "resources/effects/builtin-3d-particle.effect"
},
"2a7c0036-e0b3-4fe1-8998-89a54b8a2bec": {
"asset": 1617772640000,
"meta": 1639648802428,
"meta": 1639826519561,
"relativePath": "resources/effects/builtin-3d-trail.effect"
},
"c0040c95-c57f-49cd-9cbc-12316b73d0d4": {
"asset": 1617772640000,
"meta": 1639648802437,
"meta": 1639826519568,
"relativePath": "resources/effects/builtin-clear-stencil.effect"
},
"6d91e591-4ce0-465c-809f-610ec95019c6": {
"asset": 1617772640000,
"meta": 1639648802455,
"meta": 1639826519583,
"relativePath": "resources/effects/builtin-unlit.effect"
},
"bbee2217-c261-49bd-a8ce-708d6bcc3500": {
"asset": 1617772640000,
"meta": 1639648802457,
"meta": 1639826519584,
"relativePath": "resources/materials"
},
"6f801092-0c37-4f30-89ef-c8d960825b36": {
"asset": 1617772640000,
"meta": 1639648802649,
"meta": 1639826519700,
"relativePath": "resources/materials/builtin-2d-base.mtl"
},
"954fec8b-cd16-4bb9-a3b7-7719660e7558": {
"asset": 1617772640000,
"meta": 1639648805785,
"meta": 1639826522373,
"relativePath": "model/primitives.fbx"
},
"a153945d-2511-4c14-be7b-05d242f47d57": {
"asset": 1617772640000,
"meta": 1639648802650,
"meta": 1639826519701,
"relativePath": "resources/materials/builtin-2d-graphics.mtl"
},
"3a7bb79f-32fd-422e-ada2-96f518fed422": {
"asset": 1617772640000,
"meta": 1639648802651,
"meta": 1639826519702,
"relativePath": "resources/materials/builtin-2d-gray-sprite.mtl"
},
"e02d87d4-e599-4d16-8001-e14891ac6506": {
"asset": 1617772640000,
"meta": 1639648802651,
"meta": 1639826519703,
"relativePath": "resources/materials/builtin-2d-label.mtl"
},
"7afd064b-113f-480e-b793-8817d19f63c3": {
"asset": 1617772640000,
"meta": 1639648802652,
"meta": 1639826519704,
"relativePath": "resources/materials/builtin-2d-spine.mtl"
},
"eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432": {
"asset": 1617772640000,
"meta": 1639648802653,
"meta": 1639826519705,
"relativePath": "resources/materials/builtin-2d-sprite.mtl"
},
"432fa09c-cf03-4cff-a186-982604408a07": {
"asset": 1617772640000,
"meta": 1639648802654,
"meta": 1639826519706,
"relativePath": "resources/materials/builtin-3d-particle.mtl"
},
"466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a": {
"asset": 1617772640000,
"meta": 1639648802655,
"meta": 1639826519707,
"relativePath": "resources/materials/builtin-3d-trail.mtl"
},
"cf7e0bb8-a81c-44a9-ad79-d28d43991032": {
"asset": 1617772640000,
"meta": 1639648802656,
"meta": 1639826519708,
"relativePath": "resources/materials/builtin-clear-stencil.mtl"
},
"2a296057-247c-4a1c-bbeb-0548b6c98650": {
"asset": 1617772640000,
"meta": 1639648802657,
"meta": 1639826519709,
"relativePath": "resources/materials/builtin-unlit.mtl"
},
"73e24a78-ff75-4f1c-90a7-d8ff527dcd3c": {
"asset": 1639624772149,
"meta": 1639648743095,
"meta": 1639826469755,
"relativePath": "cc_mz_003"
},
"4fd428f3-cf22-467b-8ae4-09dfc1fa94c2": {
......@@ -630,8 +630,8 @@
"relativePath": "cc_mz_003/texture/white_bg.jpg"
},
"a1037602-e52d-4adb-bc4d-e476c2e88884": {
"asset": 1639648629619,
"meta": 1639648631312,
"asset": 1639826359252,
"meta": 1639826448213,
"relativePath": "cc_mz_003/scene/cc_mz_003.js"
}
}
\ No newline at end of file
{"version":"1.0.8","stats":{"/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/__qc_index__.js":"2021-12-16T10:00:06.040Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/script/runtime.js":"2021-12-16T10:00:06.010Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/prefab/bgBottom_cc_mz_003.js":"2021-12-16T10:00:06.009Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/scene/cc_mz_003.js":"2021-12-16T10:00:06.011Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/script/util.js":"2021-12-16T10:00:06.010Z"}}
{"version":"1.0.8","stats":{"/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/__qc_index__.js":"2021-12-18T11:22:02.593Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/script/util.js":"2021-12-18T11:22:02.573Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/scene/cc_mz_003.js":"2021-12-18T11:22:02.574Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/prefab/bgBottom_cc_mz_003.js":"2021-12-18T11:22:02.571Z","/Users/lmz/Documents/workspace/pro_hw/cc_mz_003/temp/quick-scripts/src/assets/cc_mz_003/script/runtime.js":"2021-12-18T11:22:02.572Z"}}
This source diff could not be displayed because it is too large. You can view the blob instead.
(function () {
var scripts = [{"deps":{"./assets/cc_mz_003/script/runtime":1,"./assets/cc_mz_003/script/util":4,"./assets/cc_mz_003/prefab/bgBottom_cc_mz_003":2,"./assets/cc_mz_003/scene/cc_mz_003":3},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/cc_mz_003/script/runtime.js"},{"deps":{"../script/util":4},"path":"preview-scripts/assets/cc_mz_003/prefab/bgBottom_cc_mz_003.js"},{"deps":{},"path":"preview-scripts/assets/cc_mz_003/scene/cc_mz_003.js"},{"deps":{},"path":"preview-scripts/assets/cc_mz_003/script/util.js"}];
var scripts = [{"deps":{"./assets/cc_mz_003/script/util":1,"./assets/cc_mz_003/script/runtime":4,"./assets/cc_mz_003/prefab/bgBottom_cc_mz_003":3,"./assets/cc_mz_003/scene/cc_mz_003":2},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/cc_mz_003/script/util.js"},{"deps":{},"path":"preview-scripts/assets/cc_mz_003/scene/cc_mz_003.js"},{"deps":{"../script/util":1},"path":"preview-scripts/assets/cc_mz_003/prefab/bgBottom_cc_mz_003.js"},{"deps":{},"path":"preview-scripts/assets/cc_mz_003/script/runtime.js"}];
var entries = ["preview-scripts/__qc_index__.js"];
var bundleScript = 'preview-scripts/__qc_bundle__.js';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -93,6 +93,19 @@ cc.Class({
this.preload();
},
getData: function getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, 'scene');
return;
}
var middleLayer = cc.find('middleLayer');
if (middleLayer) {
var middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
},
getDefaultData: function getDefaultData() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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