Commit f9af7c39 authored by wildfirecode13's avatar wildfirecode13

11

parent e9058992
.DS_Store
node_modules/
coverage/
dist/
npm-debug.log
selenium-debug.log
.idea
.builds
.project
.vscode
yarn-error.log
.yarn
.package-lock
yarn.lock
.cache
packages/**/package-lock.json
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(window, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/Main.ts");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./module/RES.ts":
/*!***********************!*\
!*** ./module/RES.ts ***!
\***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RES = void 0;
var RES;
(function (RES) {
var resData;
var videoEntityHash = {};
var soundHash = {};
var groupsCompleteHash = {};
var groupsPromiseHash = {};
var singleResPromiseHash = {};
function loadConfig(res) {
resData = res;
RES.resPath = res.path;
}
RES.loadConfig = loadConfig;
function loadSparkAssets(resList) {
var list = [];
for (var key in resList) {
list.push(resList[key]);
}
var p = new Promise(function (resolve, reject) {
loadResList(function (s) {
if (s) {
resolve();
}
else {
reject();
}
}, list);
});
return p;
}
RES.loadSparkAssets = loadSparkAssets;
function loadGroup(name) {
if (groupsCompleteHash[name]) {
return new Promise(function (resolve) {
resolve();
});
}
if (groupsPromiseHash[name]) {
return groupsPromiseHash[name];
}
var arr = getGroupResByName(name);
if (!arr || !arr.length) {
groupsCompleteHash[name] = true;
return new Promise(function (resolve) {
resolve();
});
}
var p = new Promise(function (resolve, reject) {
loadResList(function (s) {
delete groupsPromiseHash[name];
if (s) {
groupsCompleteHash[name] = true;
resolve();
}
else {
reject();
}
}, arr);
});
groupsPromiseHash[name] = p;
return p;
}
RES.loadGroup = loadGroup;
function getResAsync(str, comFun, thisObj) {
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
if (type == "png" || type == "jpg") {
if (FYGE.TextureCache[str]) {
comFun && comFun.call(thisObj, FYGE.TextureCache[str], str);
new Promise(function (r) {
r(FYGE.TextureCache[str]);
});
}
else {
return new Promise(function (resolve, reject) {
FYGE.GlobalLoader.loadImage(function (s, image) {
if (s) {
FYGE.Texture.addToCache(FYGE.Texture.from(image), str);
comFun && comFun.call(thisObj, FYGE.TextureCache[str], str);
resolve(FYGE.TextureCache[str]);
}
else {
comFun && comFun.call(thisObj, null, str);
reject();
}
}, str);
});
}
}
}
RES.getResAsync = getResAsync;
function getResByUrl() {
}
RES.getResByUrl = getResByUrl;
function getRes(str) {
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
if (type == "png" || type == "jpg") {
return FYGE.TextureCache[str] || null;
}
}
RES.getRes = getRes;
function hasRes(str) {
for (var i = 0; i < resData.groups.length; i++) {
var group = resData.groups[i];
var keys = group.keys;
if (keys && keys.split(",").indexOf(str) > -1) {
return group.name;
}
if (group.atlas && group.name + ".json" == str) {
return group.name;
}
}
return null;
}
function getGroupResByName(name) {
var group = getGroupByName(name);
if (!group)
return null;
if (group.atlas) {
var arr = [name + ".json"];
if (group.keys) {
arr = arr.concat(group.keys.split(",").filter(function (k) {
return k.substr(-4) != ".png";
}));
}
return arr;
}
else if (group.keys) {
return group.keys.split(",");
}
else {
return null;
}
}
function getGroupByName(name) {
var groups = resData.groups;
var group;
for (var i = 0; i < groups.length; i++) {
if (groups[i].name === name) {
group = groups[i];
break;
}
}
return group;
}
function loadResList(callback, arr) {
var count = 0;
var countAll = arr.length;
if (!countAll)
callback(true);
var mark = true;
for (var i = 0; i < countAll; i++) {
var resName = arr[i]['url'];
getResAsync(resName, function (res, str) {
if (!res)
mark = false;
if (++count == countAll)
callback(mark);
}, this);
}
}
RES.loadResList = loadResList;
function returnSingleResPromise(str, comFun, thisObj) {
singleResPromiseHash[str].then(function (r) {
comFun && comFun.call(thisObj, r, str);
}, function () {
comFun && comFun.call(thisObj, null, str);
});
return singleResPromiseHash[str];
}
var skinData;
function loadSkinConfig(skinJson) {
skinData = skinJson;
}
RES.loadSkinConfig = loadSkinConfig;
function initSkinDisplay(con, skin, root) {
var data = typeof (skin) == 'string' ? getSkinDataByName(skin) : skin;
if (!data.children || !data.children.length)
return;
for (var i = 0; i < data.children.length; i++) {
var child = data.children[i];
if (child.type == "skin")
continue;
var dis = con.addChild(getDisplayByData(child));
if (root && child.id)
root[child.id] = dis;
if (child.type == "container")
initSkinDisplay(dis, child, root);
}
}
RES.initSkinDisplay = initSkinDisplay;
function getSkinDataByName(skinName, skinNode) {
if (skinNode === void 0) { skinNode = skinData; }
if (!skinNode || !skinNode.children || !skinNode.children.length)
return null;
for (var i = 0; i < skinNode.children.length; i++) {
var child = skinNode.children[i];
if (child.name == skinName && (child.type == "container" || child.type == "skin"))
return child;
var gson = getSkinDataByName(skinName, child);
if (gson)
return gson;
}
return null;
}
RES.getSkinDataByName = getSkinDataByName;
function getSrcByUuid(resList, uuid) {
resList = resList || [];
for (var i = 0; i < resList.length; i++) {
if (resList[i].uuid == uuid) {
return resList[i].url;
}
}
return "";
}
RES.getSrcByUuid = getSrcByUuid;
function getDisplayByData(data) {
var dis;
switch (data.type) {
case "container":
dis = new FYGE.Container();
break;
case "button":
dis = new FYGE.Button(getRes(data.props.tUp), data.props.tDown ? getRes(data.props.tDown) : null, data.props.tDisable ? getRes(data.props.tDisable) : null);
break;
case "text":
dis = new FYGE.TextField();
for (var key in data.props)
dis[key] = data.props[key];
break;
case "sprite":
dis = new FYGE.Sprite(getRes(data.props.source));
break;
case "rect":
dis = new FYGE.Shape();
dis.beginFill(FYGE.string2hex(data.props.fillColor));
dis.drawRect(0, 0, data.props.width, data.props.height);
dis.endFill();
break;
}
dis.name = data.name;
dis.alpha = data.alpha || 1;
dis.position.set(data.x, data.y);
return dis;
}
function destroyRES() {
}
})(RES = exports.RES || (exports.RES = {}));
/***/ }),
/***/ "./module/ctrls/index.ts":
/*!*******************************!*\
!*** ./module/ctrls/index.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyAllCtrls = exports.removeTweens = exports.clearWait = exports.wait = exports.showAlert = exports.getCurrentScene = exports.changeScene = exports.closeCurrentPanel = exports.closeAllPanels = exports.showConfirm = exports.showPanel = exports.showToast = void 0;
var waitingCtrl_1 = __webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts");
var panelCtrl_1 = __webpack_require__(/*! ./panelCtrl */ "./module/ctrls/panelCtrl.ts");
var sceneCtrl_1 = __webpack_require__(/*! ./sceneCtrl */ "./module/ctrls/sceneCtrl.ts");
var toastCtrl_1 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
var toastCtrl_2 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
Object.defineProperty(exports, "showToast", { enumerable: true, get: function () { return toastCtrl_2.showToast; } });
__exportStar(__webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts"), exports);
exports.showPanel = function (panel, data) {
return panelCtrl_1.default.instance.show(panel, data);
};
exports.showConfirm = function (panel, data) {
var confirmPanel = panelCtrl_1.default.instance.show(panel, data);
return confirmPanel.makePromise();
};
exports.closeAllPanels = function () {
panelCtrl_1.default.instance.closeAll();
};
exports.closeCurrentPanel = function () {
panelCtrl_1.default.instance.closeCurrent();
};
exports.changeScene = function (scene, data) {
sceneCtrl_1.default.instance.change(scene, data);
};
function getCurrentScene() {
return sceneCtrl_1.default.instance.currentScene;
}
exports.getCurrentScene = getCurrentScene;
exports.showAlert = function (title, content) {
if (my) {
my.alert({
title: title || "",
content: content || ""
});
}
else {
console.log(title, content);
}
};
function wait(callback, time) {
var obj = {};
FYGE.Tween.get(obj)
.wait(time)
.call(callback);
return obj;
}
exports.wait = wait;
function clearWait(obj) {
obj && FYGE.Tween.removeTweens(obj);
}
exports.clearWait = clearWait;
function removeTweens(obj, isRecursive) {
if (isRecursive === void 0) { isRecursive = true; }
if (!obj)
return;
FYGE.Tween.removeTweens(obj);
if (!isRecursive || !obj.children || !obj.children.length)
return;
obj.children.forEach(function (child) {
removeTweens(child);
});
}
exports.removeTweens = removeTweens;
function destroyAllCtrls() {
toastCtrl_1.destroyToast();
waitingCtrl_1.destroyWaiting();
panelCtrl_1.default.instance.destroy();
sceneCtrl_1.default.instance.destroy();
}
exports.destroyAllCtrls = destroyAllCtrls;
/***/ }),
/***/ "./module/ctrls/panelCtrl.ts":
/*!***********************************!*\
!*** ./module/ctrls/panelCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var layers_1 = __webpack_require__(/*! ../views/layers */ "./module/views/layers.ts");
var waitingCtrl_1 = __webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts");
var toastCtrl_1 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
var PanelCtrl = (function () {
function PanelCtrl() {
this.stacks = [];
}
Object.defineProperty(PanelCtrl, "instance", {
get: function () {
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl());
},
enumerable: false,
configurable: true
});
PanelCtrl.prototype.init = function (parent) {
this._parent = parent;
var bg = new FYGE.Shape();
bg.beginFill(0);
bg.drawRect(layers_1.layers.stageOffsetX - parent.x, layers_1.layers.stageOffsetY - parent.y, layers_1.layers.stageWidth, layers_1.layers.stageHeight);
bg.endFill();
bg.hitTestByPixel = false;
bg.visible = false;
this._parent.addChild(bg);
this._bg = bg;
};
PanelCtrl.prototype.closeAll = function () {
this.stacks.forEach(function (e) { return e.hidePanel(); });
};
PanelCtrl.prototype.show = function (cls, data) {
var _this = this;
waitingCtrl_1.showWaiting();
var panel = new cls(data);
this.add(panel);
this.stacks.push(panel);
panel.onLoaded = function () {
waitingCtrl_1.hideWaiting();
_this.updateView(false);
panel.start(data);
if (panel.visible)
panel.showAni();
};
panel.onLoadError = function () {
waitingCtrl_1.hideWaiting();
toastCtrl_1.showToast("资源加载失败");
panel.removeEventListener('onDestroy', _this.onPanelHide, _this);
_this.remove(panel);
};
return panel;
};
PanelCtrl.prototype.updateView = function (showPanelAni) {
var _this = this;
if (showPanelAni === void 0) { showPanelAni = true; }
if (!this.stacks.length) {
if (this._bg.visible) {
this.bgAni = "hide";
FYGE.Tween.removeTweens(this._bg);
FYGE.Tween.get(this._bg)
.to({ alpha: 0 }, 200, FYGE.Ease.cubicOut)
.call(function () {
_this._bg.visible = false;
_this._current = null;
_this._parent.visible = false;
});
}
}
else {
this._parent.visible = true;
if (this.bgAni == "hide") {
this.bgAni = "show";
FYGE.Tween.removeTweens(this._bg);
this._bg.alpha = 0.7;
}
if (this._bg.visible === false) {
this._bg.visible = true;
this._bg.alpha = 0;
FYGE.Tween.get(this._bg).to({ alpha: 0.7 }, 200, FYGE.Ease.cubicOut);
}
}
for (var i = 0; i < this.stacks.length; i++) {
if (i < this.stacks.length - 1) {
this.stacks[i].visible = false;
}
else {
this.stacks[i].visible = true;
if (showPanelAni)
this.stacks[i].showAni();
this._current = this.stacks[i];
}
}
};
PanelCtrl.prototype.add = function (panel) {
this._parent.addChild(panel);
panel.addEventListener('onDestroy', this.onPanelHide, this);
};
PanelCtrl.prototype.remove = function (panel) {
this._parent.removeChild(panel);
this.stacks = this.stacks.filter(function (e) { return e != panel; });
};
PanelCtrl.prototype.onPanelHide = function (e) {
var panel = e.target;
panel.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(panel);
this.updateView();
};
PanelCtrl.prototype.closeCurrent = function () {
if (this._current) {
this._current.hidePanel();
}
};
PanelCtrl.prototype.destroy = function () {
PanelCtrl._instance = null;
this.stacks = null;
this._current = null;
this._parent = null;
FYGE.Tween.removeTweens(this._bg);
this._bg = null;
};
return PanelCtrl;
}());
exports.default = PanelCtrl;
/***/ }),
/***/ "./module/ctrls/sceneCtrl.ts":
/*!***********************************!*\
!*** ./module/ctrls/sceneCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var waitingCtrl_1 = __webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts");
var toastCtrl_1 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
var SceneCtrl = (function () {
function SceneCtrl() {
}
Object.defineProperty(SceneCtrl, "instance", {
get: function () {
return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl());
},
enumerable: false,
configurable: true
});
SceneCtrl.prototype.init = function (parent) {
this._parent = parent;
};
SceneCtrl.prototype.change = function (cls, data) {
var _this = this;
var scene = new cls(data);
scene.visible = false;
waitingCtrl_1.showWaiting();
var preScene = this._currentScene;
scene.onLoaded = function () {
waitingCtrl_1.hideWaiting();
scene.showAni(function () {
if (preScene)
preScene.destroy();
});
scene.visible = true;
scene.start(data);
};
scene.onLoadError = function () {
waitingCtrl_1.hideWaiting();
toastCtrl_1.showToast("资源加载失败");
_this._currentScene = preScene || null;
_this._parent.removeChild(scene);
};
this._currentScene = scene;
this._parent.addChild(scene);
};
Object.defineProperty(SceneCtrl.prototype, "currentScene", {
get: function () {
return this._currentScene;
},
enumerable: false,
configurable: true
});
SceneCtrl.prototype.destroy = function () {
SceneCtrl._instance = null;
this._currentScene = null;
this._parent = null;
};
return SceneCtrl;
}());
exports.default = SceneCtrl;
/***/ }),
/***/ "./module/ctrls/toastCtrl.ts":
/*!***********************************!*\
!*** ./module/ctrls/toastCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyToast = exports.showToast = void 0;
var layers_1 = __webpack_require__(/*! ../views/layers */ "./module/views/layers.ts");
var RES_1 = __webpack_require__(/*! ../RES */ "./module/RES.ts");
var inited = false;
var _toast;
var _parent;
var startY;
var endY;
var initToast = function () {
if (!inited) {
inited = true;
_toast = new Toast();
_parent = layers_1.layers.toastLayer;
_toast.alpha = 0;
_toast.x = layers_1.layers.stageOffsetX - _parent.x + (layers_1.layers.stageWidth - _toast.width) / 2;
var h = _toast.height;
var y = layers_1.layers.stageOffsetY - _parent.y;
startY = y - h;
endY = y + (layers_1.layers.stageHeight - h) / 2;
}
};
exports.showToast = function (msg) {
initToast();
_toast.show(msg);
_parent.addChild(_toast);
FYGE.Tween.removeTweens(_toast);
FYGE.Tween.get(_toast)
.set({ y: startY, alpha: 1 })
.to({ y: endY }, 500, FYGE.Ease.quartOut)
.wait(800)
.to({ alpha: 0 }, 300)
.call(function () {
_parent.removeChild(_toast);
});
};
exports.destroyToast = function () {
if (inited && _toast && !_toast.destroyed) {
_toast.destroy();
_toast = null;
_parent = null;
inited = false;
}
};
var Toast = (function (_super) {
__extends(Toast, _super);
function Toast() {
var _this = _super.call(this) || this;
_this.PADDING = 40;
_this.mouseChildren = false;
_this.mouseEnable = false;
var toastBgTexture = RES_1.RES.getRes("toastBg.png");
if (toastBgTexture) {
_this.bg = new FYGE.Sprite(toastBgTexture);
_this.addChild(_this.bg);
}
_this.msg = new FYGE.TextField();
_this.msg.size = 28;
_this.msg.fillColor = "0xffffff";
_this.msg.text = "";
_this.msg.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
_this.msg.textHeight = toastBgTexture ? toastBgTexture.height : 200;
_this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
_this.addChild(_this.msg);
return _this;
}
Toast.prototype.show = function (msg) {
this.msg.text = msg;
this.msg.x = ((this.bg ? this.bg.width : 0) - this.msg.textWidth) / 2;
};
Toast.prototype.destroy = function () {
_super.prototype.destroy.call(this);
this.msg = null;
this.bg = null;
};
return Toast;
}(FYGE.Container));
/***/ }),
/***/ "./module/ctrls/waitingCtrl.ts":
/*!*************************************!*\
!*** ./module/ctrls/waitingCtrl.ts ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyWaiting = exports.hideWaiting = exports.showWaiting = void 0;
var RES_1 = __webpack_require__(/*! ../RES */ "./module/RES.ts");
var layers_1 = __webpack_require__(/*! ../views/layers */ "./module/views/layers.ts");
var inited = false;
var _waiting;
var _parent;
var initWaiting = function () {
if (!inited) {
inited = true;
var waiting = new Waiting();
_parent = layers_1.layers.topLayer;
_waiting = waiting;
var offX = (layers_1.layers.stageWidth - 160) / 2;
var offY = (layers_1.layers.stageHeight - _waiting.height) / 2;
_waiting.x = layers_1.layers.stageOffsetX - _parent.x + offX;
_waiting.y = layers_1.layers.stageOffsetY - _parent.y + offY;
var bg = new FYGE.Graphics()
.beginFill(0x000000)
.drawRect(-offX, -offY, layers_1.layers.stageWidth, layers_1.layers.stageHeight)
.endFill();
bg.alpha = 0;
_waiting.addChildAt(bg, 0);
}
};
exports.showWaiting = function (msg) {
initWaiting();
_waiting.show(msg);
_parent.addChild(_waiting);
};
exports.hideWaiting = function () {
_parent.removeChild(_waiting);
};
exports.destroyWaiting = function () {
if (inited && _waiting && !_waiting.destroyed) {
_waiting.destroy();
_waiting = null;
_parent = null;
inited = false;
}
};
var Waiting = (function (_super) {
__extends(Waiting, _super);
function Waiting() {
var _this = _super.call(this) || this;
var rectBgTexture = RES_1.RES.getRes("waitingBg.png");
if (rectBgTexture) {
var rectBg = new FYGE.Sprite(rectBgTexture);
_this.addChild(rectBg);
var rotTexture = RES_1.RES.getRes("waitingRot.png");
var rot_1 = new FYGE.Sprite(rotTexture);
rot_1.x = (rectBgTexture.width - rotTexture.width) / 2;
rot_1.y = 47;
rot_1.anchorX = rotTexture.width / 2;
rot_1.anchorY = rotTexture.height / 2;
_this.addChild(rot_1);
var count_1 = 0;
rot_1.addEventListener(FYGE.Event.ENTER_FRAME, function () {
count_1++;
if (count_1 % 30 == 0)
rot_1.rotation += 45;
}, _this);
}
_this.msg = new FYGE.TextField();
_this.msg.y = 125;
_this.msg.textWidth = rectBgTexture ? rectBgTexture.width : 200;
_this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
_this.msg.size = 26;
_this.msg.fillColor = "#ffffff";
_this.addChild(_this.msg);
return _this;
}
Waiting.prototype.show = function (msg) {
if (msg === void 0) { msg = "加载中"; }
this.msg.text = msg;
};
Waiting.prototype.destroy = function () {
_super.prototype.destroy.call(this);
this.msg = null;
};
return Waiting;
}(FYGE.Container));
/***/ }),
/***/ "./module/views/Module.ts":
/*!********************************!*\
!*** ./module/views/Module.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Module = void 0;
var RES_1 = __webpack_require__(/*! ../RES */ "./module/RES.ts");
var ctrls_1 = __webpack_require__(/*! ../ctrls */ "./module/ctrls/index.ts");
var Module = (function (_super) {
__extends(Module, _super);
function Module(data) {
var _this = _super.call(this) || this;
_this.data = data;
_this.init();
return _this;
}
Module.prototype.init = function () {
var _this = this;
this.preLoadRes().then(function () {
if (_this.skinName)
RES_1.RES.initSkinDisplay(_this, _this.skinName, _this);
_this.initUi();
_this.onLoaded && _this.onLoaded();
}, function () {
_this.onLoadError && _this.onLoadError();
});
};
Module.prototype.preLoadRes = function () {
var _this = this;
return new Promise(function (resolve, reject) {
if (_this.groupNames && _this.groupNames.length) {
var arr = [];
for (var i = 0; i < _this.groupNames.length; i++) {
arr.push(RES_1.RES.loadGroup(_this.groupNames[i]));
}
Promise.all(arr).then(resolve, reject);
}
else {
resolve();
}
});
};
Module.prototype.initUi = function () {
};
Object.defineProperty(Module.prototype, "groupNames", {
get: function () { return null; },
enumerable: false,
configurable: true
});
Object.defineProperty(Module.prototype, "skinName", {
get: function () { return null; },
enumerable: false,
configurable: true
});
;
Module.prototype.start = function (data) {
this.initEvents();
};
Module.prototype.initEvents = function () {
};
Module.prototype.removeEvents = function () {
};
Module.prototype.enableMouseEvt = function (enable) {
this.mouseEnable = enable;
this.mouseChildren = enable;
};
Module.prototype.btnDelay = function (target, delay) {
if (delay === void 0) { delay = 2000; }
target.mouseEnable = false;
target.mouseChildren = false;
setTimeout(function () {
target.mouseEnable = true;
target.mouseChildren = true;
}, delay);
};
Module.prototype.destroy = function () {
ctrls_1.removeTweens(this);
this.removeEvents();
this.dispatchEvent("onDestroy");
_super.prototype.destroy.call(this);
};
return Module;
}(FYGE.Container));
exports.Module = Module;
/***/ }),
/***/ "./module/views/Scene.ts":
/*!*******************************!*\
!*** ./module/views/Scene.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scene = void 0;
var Module_1 = __webpack_require__(/*! ./Module */ "./module/views/Module.ts");
var Scene = (function (_super) {
__extends(Scene, _super);
function Scene() {
return _super !== null && _super.apply(this, arguments) || this;
}
Scene.prototype.showAni = function (callback) {
callback();
};
Scene.prototype.updateScene = function () {
};
return Scene;
}(Module_1.Module));
exports.Scene = Scene;
/***/ }),
/***/ "./module/views/layers.ts":
/*!********************************!*\
!*** ./module/views/layers.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyLayers = exports.layers = void 0;
var panelCtrl_1 = __webpack_require__(/*! ../ctrls/panelCtrl */ "./module/ctrls/panelCtrl.ts");
var sceneCtrl_1 = __webpack_require__(/*! ../ctrls/sceneCtrl */ "./module/ctrls/sceneCtrl.ts");
var Layers = (function (_super) {
__extends(Layers, _super);
function Layers() {
return _super !== null && _super.apply(this, arguments) || this;
}
Layers.prototype.init = function (stage) {
stage.addChild(this);
var arr = [
"_bottomLayer",
"_sceneLayer",
"_popupLayer",
"_toastLayer",
"_topLayer",
"_shareLayer"
];
for (var i = 0; i < arr.length; i++) {
this[arr[i]] = new FYGE.Container();
this.addChild(this[arr[i]]);
}
this.sceneLayer.y = this.stageOffsetY;
this.shareLayer.y = -this.stageOffsetY;
sceneCtrl_1.default.instance.init(this.sceneLayer);
panelCtrl_1.default.instance.init(this.popupLayer);
};
Object.defineProperty(Layers.prototype, "bottomLayer", {
get: function () { return this._bottomLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "sceneLayer", {
get: function () { return this._sceneLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "popupLayer", {
get: function () { return this._popupLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "toastLayer", {
get: function () { return this._toastLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "topLayer", {
get: function () { return this._topLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "shareLayer", {
get: function () { return this._shareLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageHeight", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.height;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageWidth", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.width;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageOffsetX", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.x;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageOffsetY", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.y;
},
enumerable: false,
configurable: true
});
return Layers;
}(FYGE.Container));
exports.layers = new Layers();
function destroyLayers() {
exports.layers.removeChildren();
if (exports.layers.parent)
exports.layers.parent.removeChild(exports.layers);
}
exports.destroyLayers = destroyLayers;
/***/ }),
/***/ "./resCanvasList.js":
/*!**************************!*\
!*** ./resCanvasList.js ***!
\**************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
const resCanvasList = {
'4ee17a9c-5deb-43be-b205-16fb7593d172': {
name: 'spark',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
},
'cb54f3b5-0469-46d1-99ea-734153b92078': {
name: 'bg',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/bg.c4359b9ea9e843cd8d929567b2fb52ed5518e105.png',
uuid: 'cb54f3b5-0469-46d1-99ea-734153b92078'
},
'593e9d74-4944-496a-b6c1-8316756f8bf7': {
name: '宝箱2',
ext: '.png',
uuid: '593e9d74-4944-496a-b6c1-8316756f8bf7',
url: '//yun.duiba.com.cn/spark/assets/022e25a3984ff122fbf960bd0cb87bff48f8c3bf.png'
}
};
/* harmony default export */ __webpack_exports__["default"] = (resCanvasList);
/***/ }),
/***/ "./src/Main.ts":
/*!*********************!*\
!*** ./src/Main.ts ***!
\*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Main = exports.GDispatcher = void 0;
var RES_1 = __webpack_require__(/*! ../module/RES */ "./module/RES.ts");
var layers_1 = __webpack_require__(/*! ../module/views/layers */ "./module/views/layers.ts");
var G_EVENT_1 = __webpack_require__(/*! ./common/G_EVENT */ "./src/common/G_EVENT.ts");
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var StartScene_1 = __webpack_require__(/*! ./scenes/StartScene */ "./src/scenes/StartScene.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ./TaoBaoNet */ "./src/TaoBaoNet.ts");
var resCanvasList_1 = __webpack_require__(/*! ../resCanvasList */ "./resCanvasList.js");
var stage_1 = __webpack_require__(/*! ./scenes/stage */ "./src/scenes/stage.ts");
exports.GDispatcher = new FYGE.EventDispatcher();
var Main = (function () {
function Main(canvas) {
var sysInfo;
if (my) {
FYGE.initedByCanvas(canvas);
sysInfo = my.getSystemInfoSync();
}
var stage = new FYGE.Stage(canvas, 750, 1624, sysInfo && sysInfo.windowWidth || document.body.clientWidth, sysInfo && sysInfo.windowHeight || document.body.clientHeight, FYGE.RENDERER_TYPE.CANVAS);
this.stage = stage;
stage_1.setStage(stage);
stage.addEventListener(FYGE.Event.INIT_STAGE, this.onAddToStage, this);
var self = this;
loop();
function loop() {
if (!self._pause) {
FYGE.Tween.flush();
stage.flush();
}
self.requestID = FYGE.getRequestAnimationFrame()(loop);
}
}
Main.prototype.onAddToStage = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
layers_1.layers.init(this.stage);
console.log("初始化层级完成");
return [4, RES_1.RES.loadSparkAssets(resCanvasList_1.default)];
case 1:
_a.sent();
console.log("通用资源加载完成");
ctrls_1.changeScene(StartScene_1.StartScene);
return [2];
}
});
});
};
Main.prototype.run = function () {
this._pause = false;
exports.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.ON_SHOW);
};
Main.prototype.pause = function () {
exports.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.ON_HIDE);
};
Main.prototype.addGlobalEvent = function (name, fun, thisObj, once) {
if (once === void 0) { once = false; }
if (once) {
exports.GDispatcher.once(name, fun, thisObj);
}
else {
exports.GDispatcher.addEventListener(name, fun, thisObj);
}
};
Main.prototype.dispatchGlobalEvent = function (name, data) {
exports.GDispatcher.dispatchEvent(name, data);
};
Main.prototype.removeGlobalEvent = function (name, fun, thisObj) {
exports.GDispatcher.removeEventListener(name, fun, thisObj);
};
Main.prototype.destroy = function () {
FYGE.Tween.removeAllTweens();
FYGE.getCancelAnimationFrame()(this.requestID);
layers_1.destroyLayers();
ctrls_1.destroyAllCtrls();
this.stage.destroy();
exports.GDispatcher.removeAllEventListener();
TaoBaoNet_1.destroyNetData();
};
return Main;
}());
exports.Main = Main;
/***/ }),
/***/ "./src/TaoBaoNet.ts":
/*!**************************!*\
!*** ./src/TaoBaoNet.ts ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName;
(function (TbNetName) {
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getIndex"] = "babycare.getIndex";
TbNetName["getActivityBaseInfoById"] = "babycare.getActivityBaseInfoById";
TbNetName["getGameInfo"] = "babycare.getGameInfo";
TbNetName["consumerTools"] = "babycare.consumerTools";
TbNetName["gameOver"] = "babycare.gameOver";
TbNetName["receiveTaskRewards"] = "babycare.receiveTaskRewards";
TbNetName["exchange"] = "babycare.exchange";
TbNetName["getPrizesByLevel"] = "babycare.getPrizesByLevel";
TbNetName["queryCredits"] = "babycare.queryCredits";
TbNetName["dojoin"] = "babycare.dojoin";
TbNetName["completeTask"] = "babycare.completeTask";
TbNetName["getTaskList"] = "babycare.getTaskList";
TbNetName["authorize"] = "mine.authorize";
TbNetName["favorShop"] = "mine.favorShop";
TbNetName["getUserAddress"] = "mine.getUserAddress";
TbNetName["getAdoptName"] = "mine.getAdoptName";
TbNetName["getAppData"] = "mine.getAppData";
TbNetName["navigateToOutside"] = "mine.navigateToOutside";
TbNetName["navigateTo"] = "mine.navigateTo";
TbNetName["navigateBack"] = "mine.navigateBack";
TbNetName["showSharePanel"] = "mine.showSharePanel";
TbNetName["openDetail"] = "mine.openDetail";
TbNetName["reportAnalytics"] = "mine.reportAnalytics";
})(TbNetName = exports.TbNetName || (exports.TbNetName = {}));
var dataRecord = {};
var fc;
function sendTbNet(netName, parameter, callback, hideMsg) {
if (hideMsg === void 0) { hideMsg = false; }
return new Promise(function (resolve, reject) {
var waitObj;
if (!my) {
var url = "../../mock/miniTb/" + netName + ".json";
fetchAsync(url)
.then(function (data) {
dataRecord[netName] = data;
if (!hideMsg && !data.success)
ctrls_1.showToast(data.message || "网络异常");
callback && callback(data.success, data);
resolve(data);
console.log("\n%c[ mock ]\n"
+ ("NAME : " + netName + " \n")
+ "STATE : %o \n"
+ "PARAM : %o \n"
+ "%cDATA : %o \n", "" + (data.success ? 'color:green' : 'color:red'), data.success, parameter, "" + (data.success ? 'color:green' : 'color:red'), data);
}, function () {
});
return;
}
var fun = function (e) {
ctrls_1.clearWait(waitObj);
Main_1.GDispatcher.removeEventListener(netName, fun);
var d = e.data;
dataRecord[netName] = d;
if (!hideMsg && !d.success)
ctrls_1.showToast(d.message || "网络超时");
callback && callback(d.success, d);
resolve(d);
console.log("\n%c[ request ]\n"
+ ("NAME : " + netName + " \n")
+ "STATE : %o \n"
+ "PARAM : %o \n"
+ "%cDATA : %o \n", "" + (d.success ? 'color:green' : 'color:red'), d.success, parameter, "" + (d.success ? 'color:green' : 'color:red'), d);
};
Main_1.GDispatcher.addEventListener(netName, fun);
waitObj = ctrls_1.wait(function () {
if (netName != TbNetName.favorShop &&
netName != TbNetName.getUserAddress &&
netName != TbNetName.authorize &&
netName != TbNetName.getAdoptName &&
netName != TbNetName.trackingReport &&
netName != TbNetName.reportAnalytics) {
fun({ type: netName, data: { success: false } });
}
}, 10000);
Main_1.GDispatcher.dispatchEvent({ type: "onMessage" }, { netName: netName, parameter: parameter });
});
}
exports.sendTbNet = sendTbNet;
function getTbData(netName) {
return dataRecord[netName] || null;
}
exports.getTbData = getTbData;
function destroyNetData() {
dataRecord = {};
}
exports.destroyNetData = destroyNetData;
function fetchAsync(url) {
return __awaiter(this, void 0, void 0, function () {
var response, data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, fetch(url)];
case 1:
response = _a.sent();
return [4, response.json()];
case 2:
data = _a.sent();
return [2, data];
}
});
});
}
var codeMsg = {
"210001": "服务器异常",
"210002": "用户不存在",
"210003": "邀请已达上限",
"210004": "无法邀请自己",
"210006": "该活动ID无效",
"210009": "该活动暂未开始",
"210010": "该分享ID不存在",
"210012": "该用户暂未获奖",
"210013": "领取失败",
"210015": "该活动已删除",
"210016": "该活动已经结束",
"210017": "该奖品已达领取上线",
"210018": "请先分享好友",
"210019": "暂有奖品未领取",
"210020": "暂有奖品未完成",
"210021": "请先玩一局游戏",
"210022": "请先选择奖品",
"210023": "领取失败,库存不足",
"210024": "请先成为会员",
"210025": "奖品已经过期",
"210026": "不能重复助力",
"210028": "请至我的奖品页重新领取",
};
/***/ }),
/***/ "./src/common/G_EVENT.ts":
/*!*******************************!*\
!*** ./src/common/G_EVENT.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.G_EVENT = void 0;
var G_EVENT;
(function (G_EVENT) {
G_EVENT["ON_SHOW"] = "onShow";
G_EVENT["ON_HIDE"] = "onHide";
G_EVENT["UPDATE_TASK"] = "UpdateTask";
})(G_EVENT = exports.G_EVENT || (exports.G_EVENT = {}));
/***/ }),
/***/ "./src/scenes/DropItem.ts":
/*!********************************!*\
!*** ./src/scenes/DropItem.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var DropItem = (function (_super) {
__extends(DropItem, _super);
function DropItem() {
var _this = _super.call(this) || this;
_this.texture = RES_1.RES.getRes(resCanvasList_1.default["593e9d74-4944-496a-b6c1-8316756f8bf7"].url);
_this.y = 0;
return _this;
}
DropItem.prototype.updatePosition = function () {
this.y += 10;
};
return DropItem;
}(FYGE.Sprite));
exports.default = DropItem;
/***/ }),
/***/ "./src/scenes/DropsCtrl.ts":
/*!*********************************!*\
!*** ./src/scenes/DropsCtrl.ts ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var stage_1 = __webpack_require__(/*! ./stage */ "./src/scenes/stage.ts");
var DropItem_1 = __webpack_require__(/*! ./DropItem */ "./src/scenes/DropItem.ts");
var DropsCtrl = (function () {
function DropsCtrl(root) {
this._root = root;
}
DropsCtrl.prototype.start = function () {
var _this = this;
stage_1.getStage().addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
for (var index = 0; index < 10; index++) {
setTimeout(function () {
_this.addDropItem();
}, 1000 * index);
}
};
DropsCtrl.prototype.addDropItem = function () {
this._drops = this._drops || [];
var drop = new DropItem_1.default();
this._root.addChild(drop);
drop.x = Math.random() * 400 + (750 - 400) / 2;
this._drops.push(drop);
};
DropsCtrl.prototype.onEnterFrame = function () {
if (this._drops)
this._drops.forEach(function (drop) { return drop.updatePosition(); });
};
DropsCtrl.prototype.destroy = function () {
stage_1.getStage().removeEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
};
return DropsCtrl;
}());
exports.default = DropsCtrl;
/***/ }),
/***/ "./src/scenes/Root.ts":
/*!****************************!*\
!*** ./src/scenes/Root.ts ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var DropsCtrl_1 = __webpack_require__(/*! ./DropsCtrl */ "./src/scenes/DropsCtrl.ts");
var Root = (function (_super) {
__extends(Root, _super);
function Root() {
var _this = _super.call(this) || this;
_this.once(FYGE.Event.ADDED_TO_STAGE, _this.onAddToStage, _this);
var bg = new FYGE.Sprite();
bg.x = 0;
bg.y = 0;
bg.texture = RES_1.RES.getRes(resCanvasList_1.default["cb54f3b5-0469-46d1-99ea-734153b92078"].url);
_this.addChild(bg);
console.log('fuck');
var ctrl = new DropsCtrl_1.default(_this);
ctrl.start();
return _this;
}
Root.prototype.onAddToStage = function () {
this.y = this.stage.viewRect.height / 2 - 1624 / 2;
};
return Root;
}(FYGE.Container));
exports.default = Root;
/***/ }),
/***/ "./src/scenes/StartScene.ts":
/*!**********************************!*\
!*** ./src/scenes/StartScene.ts ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.StartScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts");
var Root_1 = __webpack_require__(/*! ./Root */ "./src/scenes/Root.ts");
var StartScene = (function (_super) {
__extends(StartScene, _super);
function StartScene() {
return _super !== null && _super.apply(this, arguments) || this;
}
StartScene.prototype.initUi = function () {
_super.prototype.initUi.call(this);
var canvas = new FYGE.Container();
canvas.position.set(0, 0);
this.addChild(canvas);
};
StartScene.prototype.start = function () {
this.addChild(new Root_1.default());
};
return StartScene;
}(Scene_1.Scene));
exports.StartScene = StartScene;
/***/ }),
/***/ "./src/scenes/stage.ts":
/*!*****************************!*\
!*** ./src/scenes/stage.ts ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setStage = exports.getStage = void 0;
var _stage;
exports.getStage = function () { return _stage; };
exports.setStage = function (stage) {
_stage = stage;
};
/***/ })
/******/ });
});
//# sourceMappingURL=output.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./module/RES.ts","webpack:///./module/ctrls/index.ts","webpack:///./module/ctrls/panelCtrl.ts","webpack:///./module/ctrls/sceneCtrl.ts","webpack:///./module/ctrls/toastCtrl.ts","webpack:///./module/ctrls/waitingCtrl.ts","webpack:///./module/views/Module.ts","webpack:///./module/views/Scene.ts","webpack:///./module/views/layers.ts","webpack:///./resCanvasList.js","webpack:///./src/Main.ts","webpack:///./src/TaoBaoNet.ts","webpack:///./src/common/G_EVENT.ts","webpack:///./src/scenes/DropItem.ts","webpack:///./src/scenes/DropsCtrl.ts","webpack:///./src/scenes/Root.ts","webpack:///./src/scenes/StartScene.ts","webpack:///./src/scenes/stage.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;ACbA,IAAiB,GAAG,CAoXnB;AApXD,WAAiB,GAAG;IAChB,IAAI,OAAgB;IAQpB,IAAI,eAAe,GAEf,EAAE,CAAC;IAIP,IAAI,SAAS,GAAG,EAAE;IAIlB,IAAI,kBAAkB,GAElB,EAAE;IAIN,IAAI,iBAAiB,GAEjB,EAAE;IAIN,IAAI,oBAAoB,GAEpB,EAAE;IAeN,SAAgB,UAAU,CAAC,GAAG;QAC1B,OAAO,G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AClD,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAED,0BAAK,GAAL;QACE,IAAI,CAAC,QAAQ,CAAC,IAAI,cAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IACH,iBAAC;AAAD,CAAC,CAX+B,aAAK,GAWpC;AAXY,gCAAU;;;;;;;;;;;;;;;;ACJvB,IAAI,MAAM,CAAC;AACE,gBAAQ,GAAG,cAAiB,aAAM,EAAN,CAAM,CAAC;AAEnC,gBAAQ,GAAG,UAAC,KAAK;IAC5B,MAAM,GAAG,KAAK,CAAC;AACjB,CAAC,CAAC","file":"output.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/Main.ts\");\n","\r\n\r\ninterface ResData {\r\n /**\r\n * 分组数据\r\n */\r\n groups: GroupInt[];\r\n //暂时没有工具,不用\r\n resources?: any;\r\n path?: string;\r\n}\r\n\r\ninterface GroupInt {\r\n /**\r\n * 所有的资源名字,根据,分割,根据后缀区分类型\r\n * \r\n */\r\n keys: string;//\"aa.png,bb.jpg,name.json\"\r\n /**\r\n * 文件夹名字吧\r\n */\r\n name: string;\r\n /**\r\n * 图集\r\n * 线上打包合图可能有多张,暂时发现texturePacker版本问题只有一张\r\n */\r\n atlas: {\r\n [name: string]: {\r\n \"x\": number,\r\n \"y\": number,\r\n \"w\": number,\r\n \"h\": number,\r\n \"ox\": number,\r\n \"oy\": number,\r\n \"sw\": number,\r\n \"sh\": number,\r\n \"ro\": boolean\r\n },\r\n };\r\n}\r\n\r\ninterface SkinInt {\r\n name: string,\r\n x: 0,\r\n y: 0,\r\n type: 'container' | 'text' | 'button' | 'sprite' | 'rect' | 'skin',//skin的不初始化进节点,只作为数据\r\n children?: SkinInt[],\r\n id?: string,\r\n alpha: number,\r\n props?: {\r\n source?: string,\r\n\r\n text: string,\r\n size: number,\r\n fillColor: string,\r\n textAlpha: number,\r\n\r\n width: number,\r\n height: number,\r\n\r\n tUp: string,\r\n tDown: string,\r\n tDisable: string\r\n }\r\n}\r\n\r\n/**\r\n * 简单点,有工具的话像egret那样玩,可以自动生成图片组数据\r\n */\r\nexport namespace RES {\r\n let resData: ResData\r\n /**\r\n * 资源路径\r\n */\r\n export let resPath: string;\r\n /**\r\n * movieClip的ve数据\r\n */\r\n let videoEntityHash: {\r\n // [name: string]: FYGE.VideoEntity\r\n } = {};\r\n /**\r\n * 音频的加载\r\n */\r\n let soundHash = {}\r\n /**\r\n * 记录组加载完成\r\n */\r\n let groupsCompleteHash: {\r\n [name: string]: boolean\r\n } = {}\r\n /**\r\n * 记录加载的promise\r\n */\r\n let groupsPromiseHash: {\r\n [name: string]: Promise<any>\r\n } = {}\r\n /**\r\n * 单独资源加载的promise记录\r\n */\r\n let singleResPromiseHash: {\r\n [name: string]: Promise<any>\r\n } = {}\r\n\r\n /**\r\n * \r\n * @param res 资源数据,就是对象,不考虑加载json先\r\n * res格式{\r\n * path:1111/\r\n * groups: [\r\n * {\r\n * \r\n * }\r\n * ];\r\n * }\r\n * @param path \r\n */\r\n export function loadConfig(res) {\r\n resData = res;\r\n resPath = res.path;\r\n }\r\n\r\n\r\n export function loadSparkAssets(resList: any[]): Promise<any> {\r\n let list = [];\r\n for (let key in resList) {\r\n list.push(resList[key]);\r\n }\r\n let p: Promise<any> = new Promise((resolve, reject) => {\r\n loadResList((s) => {\r\n if (s) {\r\n resolve()\r\n } else {\r\n reject();\r\n }\r\n }, list/*, resPath + name*/)\r\n })\r\n return p;\r\n }\r\n\r\n\r\n /**\r\n * 根据组名加载一组资源,通常用于加载一个视图的的所有资源\r\n * 里的promise的resolve并没有返回值\r\n * @param name \r\n */\r\n export function loadGroup(name: string): Promise<any> {\r\n //已经加载完成的直接返回\r\n if (groupsCompleteHash[name]) {\r\n return new Promise((resolve) => {\r\n resolve()\r\n })\r\n }\r\n //如果是正在加载中的,返回正在加载中的promise\r\n if (groupsPromiseHash[name]) {\r\n return groupsPromiseHash[name];\r\n }\r\n //如果首次加载\r\n //获取资源组\r\n let arr = getGroupResByName(name);\r\n //如果不存在arr,直接返回空p,且标记完成\r\n if (!arr || !arr.length) {\r\n groupsCompleteHash[name] = true;\r\n return new Promise((resolve) => {\r\n resolve()\r\n })\r\n }\r\n // 建一个promise\r\n let p = new Promise((resolve, reject) => {\r\n loadResList((s) => {\r\n //移除\r\n delete groupsPromiseHash[name];\r\n if (s) {\r\n groupsCompleteHash[name] = true;\r\n resolve()\r\n } else {\r\n reject();\r\n }\r\n }, arr/*, resPath + name*/)\r\n })\r\n groupsPromiseHash[name] = p;\r\n return p;\r\n }\r\n /**\r\n * var textue = await RES.getResAsync(str);\r\n * @param str 可以是网络图片路径或键值\r\n * @param comFun 加载回调\r\n * @param thisObj this指向\r\n */\r\n export function getResAsync(str: string, comFun?: (res: any, str: string) => void, thisObj?: any): Promise<any> {\r\n // var arr = str.split(\".\");\r\n var type = str.substring(str.lastIndexOf(\".\") + 1, str.length);\r\n //如果是图片\r\n if (type == \"png\" || type == \"jpg\") {\r\n //原先就有了,加载过的,且已加载完成的\r\n if (FYGE.TextureCache[str]) {\r\n //回调形式\r\n comFun && comFun.call(thisObj, FYGE.TextureCache[str], str)\r\n new Promise((r) => {\r\n r(FYGE.TextureCache[str])\r\n })\r\n }\r\n else {\r\n return new Promise((resolve, reject) => {\r\n FYGE.GlobalLoader.loadImage((s, image) => {\r\n //入缓存\r\n if (s) {\r\n FYGE.Texture.addToCache(FYGE.Texture.from(image), str);\r\n comFun && comFun.call(thisObj, FYGE.TextureCache[str], str)\r\n resolve(FYGE.TextureCache[str])\r\n } else {\r\n comFun && comFun.call(thisObj, null, str)\r\n reject()\r\n }\r\n }, str)\r\n })\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 待写,根据网络路径加载图片\r\n */\r\n export function getResByUrl() {\r\n\r\n }\r\n\r\n /**\r\n * 获取素材,\r\n * @param str \r\n * @return 已加载好得素材或null\r\n */\r\n export function getRes(str: string)/*: Texture | VideoEntity*/ {\r\n var type = str.substring(str.lastIndexOf(\".\") + 1, str.length);\r\n if (type == \"png\" || type == \"jpg\") {\r\n return FYGE.TextureCache[str] || null;\r\n }\r\n }\r\n\r\n /**\r\n * 判断是否在资源组里\r\n * 考虑是否init就做表\r\n * 有就返回组名,为了加载路径,不然以后有工具可以放入resources\r\n */\r\n function hasRes(str: string): string {\r\n for (var i = 0; i < resData.groups.length; i++) {\r\n var group = resData.groups[i];\r\n var keys = group.keys;\r\n if (keys && keys.split(\",\").indexOf(str) > -1) {\r\n return group.name;\r\n }\r\n //如果是图集的json,altas现在是图集\r\n if (group.atlas && group.name + \".json\" == str) {\r\n return group.name;\r\n }\r\n }\r\n return null\r\n }\r\n\r\n /**\r\n * 处理数据,获得所有资源单项\r\n * @param name \r\n */\r\n function getGroupResByName(name: string) {\r\n var group: GroupInt = getGroupByName(name);\r\n if (!group) return null;\r\n //判断加载图集还是单图\r\n if (group.atlas) {\r\n // var arr: string[] = [].concat(group.atlas.split(\",\"));\r\n var arr = [name + \".json\"]\r\n //再添加非图片的资源,和图集已排除jpg\r\n if (group.keys) {\r\n arr = arr.concat(group.keys.split(\",\").filter((k: string) => {\r\n return k.substr(-4) != \".png\" //&& k.substr(-4) != \".jpg\"\r\n }))\r\n }\r\n return arr\r\n }\r\n else if (group.keys) {\r\n return group.keys.split(\",\")\r\n } else {\r\n return null\r\n }\r\n }\r\n\r\n /**\r\n * 根据名字找组\r\n * @param name \r\n */\r\n function getGroupByName(name: string): GroupInt {\r\n var groups = resData.groups;\r\n var group: GroupInt;\r\n for (var i = 0; i < groups.length; i++) {\r\n if (groups[i].name === name) {\r\n group = groups[i];\r\n break;\r\n }\r\n }\r\n return group\r\n }\r\n\r\n /**\r\n * 新版的加载一列资源\r\n * @param callback \r\n * @param arr \r\n */\r\n export function loadResList(callback: (allLoaded: boolean) => void, arr: string[]) {\r\n let count = 0;\r\n let countAll = arr.length;\r\n if (!countAll) callback(true);\r\n let mark = true;\r\n for (var i = 0; i < countAll; i++) {\r\n let resName = arr[i]['url'];\r\n getResAsync(resName, (res, str) => {\r\n //标记失败,如果有一项资源加载失败,标记下\r\n if (!res) mark = false\r\n if (++count == countAll) callback(mark);\r\n }, this)\r\n }\r\n }\r\n\r\n /**\r\n * \r\n * @param str \r\n * @param comFun \r\n * @param thisObj \r\n */\r\n function returnSingleResPromise(str: string, comFun?: (res: any, str: string) => void, thisObj?: any) {\r\n //已判断是否存在\r\n singleResPromiseHash[str].then(\r\n (r) => {\r\n comFun && comFun.call(thisObj, r, str)\r\n },\r\n () => {\r\n comFun && comFun.call(thisObj, null, str)\r\n }\r\n )\r\n return singleResPromiseHash[str];\r\n }\r\n\r\n //皮肤相关的也放在RES吧\r\n let skinData: SkinInt\r\n /**\r\n * 添加皮肤配置文件\r\n */\r\n export function loadSkinConfig(skinJson) {\r\n skinData = skinJson;\r\n }\r\n /**\r\n * 根据\r\n * @param con 添加显示对象的容器\r\n * @param skin 皮肤名字或数据\r\n * @param root 根容器,为了添加自定义引用\r\n */\r\n export function initSkinDisplay(con: FYGE.Container, skin: string | SkinInt, root?: FYGE.Container) {\r\n //@ts-ignore\r\n var data: SkinInt = typeof (skin) == 'string' ? getSkinDataByName(skin) : skin;\r\n if (!data.children || !data.children.length) return;\r\n // for (var i = data.children.length - 1; i >= 0; i--) {\r\n for (var i = 0; i < data.children.length; i++) {\r\n var child = data.children[i];\r\n if (child.type == \"skin\") continue;\r\n var dis = con.addChild(getDisplayByData(child));\r\n if (root && child.id) root[child.id] = dis;\r\n if (child.type == \"container\") initSkinDisplay(dis, child, root);\r\n }\r\n }\r\n /**\r\n * 遍历根据名字找节点数据,只会是container的\r\n * @param skinName \r\n */\r\n export function getSkinDataByName(skinName: string, skinNode: SkinInt = skinData): SkinInt {\r\n if (!skinNode || !skinNode.children || !skinNode.children.length) return null;\r\n for (var i = 0; i < skinNode.children.length; i++) {\r\n var child = skinNode.children[i];\r\n if (child.name == skinName && (child.type == \"container\" || child.type == \"skin\")) return child;\r\n var gson = getSkinDataByName(skinName, child);\r\n if (gson) return gson\r\n }\r\n return null;\r\n }\r\n\r\n export function getSrcByUuid(resList: any[], uuid: string): string {\r\n resList = resList || [];\r\n for (let i = 0; i < resList.length; i++) {\r\n if (resList[i].uuid == uuid) {\r\n return resList[i].url\r\n }\r\n }\r\n return \"\";\r\n }\r\n\r\n /**\r\n * 通过数据创建显示对象\r\n * @param data \r\n */\r\n function getDisplayByData(data: SkinInt): FYGE.Container {\r\n var dis: FYGE.Container;\r\n switch (data.type) {\r\n case \"container\":\r\n dis = new FYGE.Container();\r\n break;\r\n case \"button\":\r\n dis = new FYGE.Button(\r\n getRes(data.props.tUp),\r\n data.props.tDown ? getRes(data.props.tDown) : null,\r\n data.props.tDisable ? getRes(data.props.tDisable) : null,\r\n );\r\n break;\r\n case \"text\":\r\n dis = new FYGE.TextField();\r\n for (let key in data.props) dis[key] = data.props[key];\r\n break;\r\n case \"sprite\":\r\n dis = new FYGE.Sprite(getRes(data.props.source));\r\n break;\r\n case \"rect\":\r\n // dis = new FYGE.Graphics()\r\n // .beginFill(data.props.fillColor)\r\n // .drawRect(0, 0, data.props.width, data.props.height)\r\n // .endFill();\r\n dis = new FYGE.Shape()\r\n //@ts-ignore\r\n dis.beginFill(FYGE.string2hex(data.props.fillColor))\r\n //@ts-ignore\r\n dis.drawRect(0, 0, data.props.width, data.props.height)\r\n //@ts-ignore\r\n dis.endFill();\r\n break;\r\n }\r\n dis.name = data.name;\r\n dis.alpha = data.alpha || 1;\r\n dis.position.set(data.x, data.y);\r\n // if (data.type == \"text\") dis.y -= 4;//文本莫名偏下,移动下,手机调试的时候也试试\r\n return dis;\r\n }\r\n\r\n //貌似不需要,为了加载过一次的资源不用重新加载\r\n function destroyRES() {\r\n\r\n }\r\n}\r\n\r\n\r\n","import { destroyWaiting } from \"./waitingCtrl\";\r\nimport { Panel } from \"../views/Panel\";\r\nimport PanelCtrl from \"./panelCtrl\";\r\nimport SceneCtrl from \"./sceneCtrl\";\r\nimport { Scene } from \"../views/Scene\";\r\nimport { destroyToast } from \"./toastCtrl\";\r\nimport IConfirmPanel from \"../../src/common/IConfirmPanel\";\r\nimport ConfirmPanel from \"../../src/common/IConfirmPanel\";\r\nimport panelCtrl from \"./panelCtrl\";\r\n\r\n\r\nexport { showToast } from \"./toastCtrl\";\r\n\r\nexport * from \"./waitingCtrl\";\r\n/**\r\n * 展示弹框\r\n * @param panel 弹框类\r\n * @param data 数据\r\n */\r\nexport const showPanel = (panel: any, data?: any) => {\r\n return PanelCtrl.instance.show(panel, data)\r\n}\r\n\r\nexport const showConfirm = (panel: any, data?: any) => {\r\n const confirmPanel: ConfirmPanel = PanelCtrl.instance.show(panel, data);\r\n return confirmPanel.makePromise();\r\n}\r\n\r\n\r\n/**\r\n * 关闭所有弹框\r\n */\r\nexport const closeAllPanels = () => {\r\n PanelCtrl.instance.closeAll();\r\n}\r\n\r\n/**\r\n * 关闭当前弹框\r\n */\r\nexport const closeCurrentPanel = () => {\r\n PanelCtrl.instance.closeCurrent();\r\n}\r\n\r\n/**\r\n * 替换场景\r\n * @param scene\r\n * @param data\r\n */\r\nexport const changeScene = (scene: any, data?: any) => {\r\n SceneCtrl.instance.change(scene, data)\r\n}\r\n\r\n/**\r\n * 获取当前场景\r\n */\r\nexport function getCurrentScene(): any {\r\n return SceneCtrl.instance.currentScene\r\n}\r\n\r\n/**\r\n * 淘宝小程序的alert\r\n * @param {string} title\r\n * @param {string} content\r\n */\r\nexport const showAlert = (title?: string, content?: string) => {\r\n //@ts-ignore\r\n if (my) {\r\n //@ts-ignore\r\n my.alert({\r\n title: title || \"\",\r\n content: content || \"\"\r\n });\r\n } else {\r\n console.log(title, content)\r\n }\r\n\r\n}\r\n\r\n/**\r\n * 替换setTimeout 因为页面销毁时setTimeout不会停\r\n * 所以干脆用Tween的\r\n * @param {Function} callback\r\n * @param {number} time 毫秒计\r\n */\r\nexport function wait(callback: () => void, time: number): {} {\r\n let obj = {};\r\n FYGE.Tween.get(obj)\r\n .wait(time)\r\n .call(callback)\r\n return obj\r\n}\r\n\r\nexport function clearWait(obj: {}) {\r\n obj && FYGE.Tween.removeTweens(obj);\r\n}\r\n\r\n/**\r\n * 递归清除显示对象里面所有的Tween\r\n * @param obj\r\n * @param isRecursive 默认true,递归移除子级\r\n */\r\nexport function removeTweens(obj, isRecursive: boolean = true) {\r\n if (!obj) return\r\n FYGE.Tween.removeTweens(obj);\r\n if (!isRecursive || !obj.children || !obj.children.length) return\r\n obj.children.forEach(child => {\r\n removeTweens(child)\r\n });\r\n}\r\n\r\n/**\r\n * 销毁方法\r\n */\r\nexport function destroyAllCtrls() {\r\n destroyToast();\r\n destroyWaiting();\r\n PanelCtrl.instance.destroy();\r\n SceneCtrl.instance.destroy();\r\n}\r\n","\r\n\r\nimport { Panel } from \"../views/Panel\";\r\nimport { layers } from \"../views/layers\";\r\nimport { showWaiting, hideWaiting } from \"./waitingCtrl\";\r\nimport { showToast } from \"./toastCtrl\";\r\n\r\nexport default class PanelCtrl {\r\n /**\r\n * 父级容器\r\n */\r\n private _parent: FYGE.Container;\r\n /**\r\n * 半透明黑色背景\r\n */\r\n private _bg: FYGE.Shape;//FYGE.Graphics;\r\n /**\r\n * 所有的弹框\r\n */\r\n private stacks: Panel[] = [];\r\n\r\n private static _instance: PanelCtrl;\r\n static get instance() {\r\n return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl())\r\n }\r\n\r\n init(parent: FYGE.Container) {\r\n this._parent = parent;\r\n let bg = new FYGE.Shape();//Graphics()//Shape();\r\n bg.beginFill(0);\r\n bg.drawRect(//引用适配\r\n layers.stageOffsetX - parent.x,\r\n layers.stageOffsetY - parent.y,\r\n layers.stageWidth,\r\n layers.stageHeight\r\n );\r\n bg.endFill();\r\n bg.hitTestByPixel = false;\r\n bg.visible = false;\r\n this._parent.addChild(bg);\r\n this._bg = bg;\r\n }\r\n\r\n /**\r\n * 关闭所有弹框\r\n */\r\n closeAll() {\r\n this.stacks.forEach(e => e.hidePanel());\r\n }\r\n\r\n show<T extends Panel>(cls: any, data?: any): T {\r\n showWaiting()\r\n const panel: T = new cls(data);\r\n this.add(panel);\r\n this.stacks.push(panel);\r\n panel.onLoaded = () => {\r\n hideWaiting();\r\n this.updateView(false);//这里更新不显示动画先,自行判断是否显示\r\n //start只执行一边\r\n panel.start(data);\r\n //如果是最后一个才显示动画\r\n if (panel.visible) panel.showAni();\r\n }\r\n //资源加载失败时\r\n panel.onLoadError = () => {\r\n hideWaiting();\r\n showToast(\"资源加载失败\")\r\n panel.removeEventListener('onDestroy', this.onPanelHide, this);\r\n this.remove(panel);\r\n }\r\n return panel;\r\n }\r\n private bgAni: \"hide\" | \"show\";\r\n private updateView(showPanelAni: boolean = true) {\r\n //没有弹框的时候\r\n if (!this.stacks.length) {\r\n // this._bg.visible = false;\r\n // this._current = null;\r\n // this._parent.visible = false;\r\n if (this._bg.visible) {//原先背景存在时,待测试\r\n this.bgAni = \"hide\"\r\n FYGE.Tween.removeTweens(this._bg);\r\n FYGE.Tween.get(this._bg)\r\n .to({ alpha: 0 }, 200, FYGE.Ease.cubicOut)\r\n .call(() => {\r\n this._bg.visible = false;\r\n this._current = null;\r\n this._parent.visible = false;\r\n })\r\n }\r\n } else {\r\n //显示弹框层\r\n this._parent.visible = true;\r\n if (this.bgAni == \"hide\") {//如果正在执行蒙层消失动画,\r\n this.bgAni = \"show\"\r\n FYGE.Tween.removeTweens(this._bg);\r\n this._bg.alpha = 0.7;\r\n }\r\n //如果首次出现弹框,加个动画\r\n if (this._bg.visible === false) {\r\n this._bg.visible = true;\r\n this._bg.alpha = 0;\r\n FYGE.Tween.get(this._bg).to({ alpha: 0.7 }, 200, FYGE.Ease.cubicOut)\r\n }\r\n }\r\n\r\n for (let i = 0; i < this.stacks.length; i++) {\r\n if (i < this.stacks.length - 1) {\r\n this.stacks[i].visible = false;\r\n } else {\r\n this.stacks[i].visible = true;\r\n if (showPanelAni) this.stacks[i].showAni();\r\n this._current = this.stacks[i];\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 添加进父级并添加事件\r\n * @param panel \r\n */\r\n private add(panel: Panel) {\r\n this._parent.addChild(panel);\r\n panel.addEventListener('onDestroy', this.onPanelHide, this);\r\n }\r\n\r\n /**\r\n * 移除\r\n * @param panel \r\n */\r\n private remove(panel: Panel) {\r\n this._parent.removeChild(panel);\r\n this.stacks = this.stacks.filter(e => e != panel);\r\n }\r\n\r\n /**\r\n * 弹框移除时执行\r\n * @param e \r\n */\r\n private onPanelHide(e: FYGE.Event) {\r\n const panel = e.target as Panel;\r\n panel.removeEventListener('onDestroy', this.onPanelHide, this);\r\n this.remove(panel);\r\n this.updateView();\r\n }\r\n\r\n //当前弹框\r\n private _current: Panel;\r\n\r\n /**\r\n * 关闭当前弹框\r\n */\r\n closeCurrent() {\r\n if (this._current) {\r\n this._current.hidePanel();\r\n // this._current.removeEventListener('onDestroy', this.onPanelHide, this);\r\n // this.remove(this._current);\r\n // this.updateView();\r\n }\r\n }\r\n\r\n destroy() {\r\n PanelCtrl._instance = null;\r\n this.stacks = null;\r\n this._current = null;\r\n this._parent = null;\r\n FYGE.Tween.removeTweens(this._bg);\r\n this._bg = null;\r\n }\r\n}","\r\nimport { Scene } from \"../views/Scene\";\r\nimport { showWaiting, hideWaiting } from \"./waitingCtrl\";\r\nimport { showToast } from \"./toastCtrl\";\r\n\r\n\r\n\r\nexport default class SceneCtrl {\r\n\r\n private _parent: FYGE.Container;\r\n private _currentScene: Scene;\r\n\r\n private static _instance: SceneCtrl;\r\n static get instance() {\r\n return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl())\r\n }\r\n init(parent: FYGE.Container) {\r\n this._parent = parent;\r\n }\r\n\r\n change(cls: any, data?: any) {\r\n //如果是同一个场景,考虑是替换还是return\r\n // if (this._currentScene && this._currentScene instanceof cls) return;//new一个得了,playScene维护太蛋疼,到时看性能吧\r\n let scene: Scene = new cls(data);\r\n scene.visible = false;\r\n showWaiting();\r\n let preScene: Scene = this._currentScene;\r\n scene.onLoaded = () => {\r\n hideWaiting();\r\n scene.showAni(() => {\r\n if (preScene) preScene.destroy();\r\n })\r\n scene.visible = true;\r\n //start里可能处理资源信息,所以在onLoaded后执行\r\n scene.start(data);\r\n }\r\n //加载失败,继续用之前的场景,移除scene\r\n scene.onLoadError = () => {\r\n hideWaiting();\r\n showToast(\"资源加载失败\")\r\n this._currentScene = preScene || null;\r\n this._parent.removeChild(scene);\r\n }\r\n\r\n this._currentScene = scene;\r\n this._parent.addChild(scene);\r\n }\r\n\r\n get currentScene() {\r\n return this._currentScene\r\n }\r\n\r\n destroy() {\r\n SceneCtrl._instance = null;\r\n this._currentScene = null;\r\n this._parent = null;\r\n }\r\n}","\r\n\r\nimport { layers } from \"../views/layers\";\r\nimport { RES } from \"../RES\";\r\n\r\nlet inited = false;\r\nlet _toast: Toast;\r\nlet _parent: FYGE.Container;\r\nlet startY: number\r\nlet endY: number\r\nconst initToast = () => {\r\n if (!inited) {\r\n inited = true;\r\n _toast = new Toast();\r\n _parent = layers.toastLayer;\r\n _toast.alpha = 0;\r\n _toast.x = layers.stageOffsetX - _parent.x + (layers.stageWidth - _toast.width) / 2;\r\n var h = _toast.height;\r\n var y = layers.stageOffsetY - _parent.y;\r\n startY = y - h;\r\n endY = y + (layers.stageHeight - h) / 2;\r\n }\r\n}\r\nexport const showToast = (msg: string) => {\r\n initToast();\r\n _toast.show(msg)\r\n _parent.addChild(_toast);\r\n FYGE.Tween.removeTweens(_toast);\r\n FYGE.Tween.get(_toast)//动画看需求\r\n .set({ y: startY, alpha: 1 })\r\n .to({ y: endY }, 500, FYGE.Ease.quartOut)\r\n .wait(800)\r\n .to({ alpha: 0 }, 300)\r\n .call(() => {\r\n _parent.removeChild(_toast);\r\n })\r\n}\r\n\r\n/**\r\n * 对于之前淘宝小程序遇到的问题,需要销毁,否则会出问题\r\n */\r\nexport const destroyToast = () => {\r\n if (inited && _toast && !_toast.destroyed) {\r\n _toast.destroy();\r\n _toast = null;\r\n _parent = null;\r\n inited = false;\r\n }\r\n}\r\n\r\n/**\r\n * toast类,不对外导出,适配居中有问题,有时间改\r\n * 自身居中,\r\n */\r\nclass Toast extends FYGE.Container {\r\n msg: FYGE.TextField;\r\n bg: FYGE.Sprite;\r\n PADDING = 40;\r\n constructor() {\r\n super();\r\n this.mouseChildren = false;\r\n this.mouseEnable = false;\r\n var toastBgTexture: FYGE.Texture = RES.getRes(\"toastBg.png\");\r\n if (toastBgTexture) {\r\n this.bg = new FYGE.Sprite(toastBgTexture);\r\n // this.bg.x = (750 - 460) / 2// (layers.stageWidth - this.bg.width) / 2\r\n this.addChild(this.bg);\r\n }\r\n\r\n this.msg = new FYGE.TextField();\r\n this.msg.size = 28;\r\n this.msg.fillColor = \"0xffffff\";\r\n this.msg.text = \"\";\r\n this.msg.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;\r\n this.msg.textHeight = toastBgTexture?toastBgTexture.height:200;\r\n this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;\r\n this.addChild(this.msg)\r\n }\r\n /**\r\n * 显示时调用\r\n * @param msg \r\n */\r\n show(msg: string) {\r\n this.msg.text = msg;\r\n //文本居中适配\r\n this.msg.x = ( (this.bg?this.bg.width:0) - this.msg.textWidth) / 2//(layers.stageWidth - this.msg.textWidth) / 2;\r\n //是否需要根据文本宽度缩放背景\r\n // this.bg.width = Math.min(this.msg.textWidth + this.PADDING * 2, 523);\r\n //背景居中适配,由于上面一行注释,那这行就构造函数里只执行一次吧\r\n // this.bg.x = (layers.stageWidth - this.bg.width) / 2\r\n }\r\n\r\n destroy() {\r\n super.destroy();\r\n this.msg = null\r\n this.bg = null;\r\n }\r\n\r\n}","\r\nimport { RES } from \"../RES\";\r\nimport { layers } from \"../views/layers\";\r\n\r\nimport { showAlert } from \".\";\r\n\r\nlet inited = false;\r\nlet _waiting: Waiting;\r\nlet _parent: FYGE.Container\r\nconst initWaiting = () => {\r\n if (!inited) {\r\n inited = true;\r\n const waiting = new Waiting();\r\n _parent = layers.topLayer;\r\n _waiting = waiting;\r\n //居中偏移\r\n var offX = (layers.stageWidth - 160/*_waiting.width*/) / 2;\r\n var offY = (layers.stageHeight - _waiting.height) / 2;\r\n //位置适配\r\n _waiting.x = layers.stageOffsetX - _parent.x + offX;\r\n _waiting.y = layers.stageOffsetY - _parent.y + offY;\r\n //阻止事件用\r\n var bg: FYGE.Graphics = new FYGE.Graphics()\r\n .beginFill(0x000000)\r\n .drawRect(-offX, -offY, layers.stageWidth, layers.stageHeight)\r\n .endFill();\r\n bg.alpha = 0;\r\n _waiting.addChildAt(bg, 0);\r\n }\r\n}\r\n/**\r\n * 显示菊花圈\r\n * @param msg 尽量三个字\r\n */\r\nexport const showWaiting = (msg?: string) => {\r\n initWaiting();\r\n _waiting.show(msg)\r\n _parent.addChild(_waiting);\r\n}\r\n\r\n/**\r\n * 隐藏菊花圈\r\n */\r\nexport const hideWaiting = () => {\r\n _parent.removeChild(_waiting);\r\n}\r\n\r\nexport const destroyWaiting = () => {\r\n if (inited && _waiting && !_waiting.destroyed) {\r\n _waiting.destroy();\r\n _waiting = null;\r\n _parent = null;\r\n inited = false;\r\n }\r\n}\r\n\r\n\r\n/**\r\n * 菊花圈,有机会重写,应该适应所有场景居中\r\n */\r\nclass Waiting extends FYGE.Container {\r\n msg: FYGE.TextField;\r\n constructor() {\r\n super();\r\n //圆角矩形背景\r\n var rectBgTexture: FYGE.Texture = RES.getRes(\"waitingBg.png\")\r\n if (rectBgTexture) {\r\n var rectBg = new FYGE.Sprite(rectBgTexture);\r\n this.addChild(rectBg);\r\n var rotTexture: FYGE.Texture = RES.getRes(\"waitingRot.png\")\r\n let rot = new FYGE.Sprite(rotTexture);\r\n rot.x = (rectBgTexture.width - rotTexture.width) / 2\r\n rot.y = 47//533;\r\n rot.anchorX = rotTexture.width / 2;\r\n rot.anchorY = rotTexture.height / 2;\r\n this.addChild(rot);\r\n let count = 0;\r\n rot.addEventListener(FYGE.Event.ENTER_FRAME, () => {\r\n count++;\r\n if (count % 30 == 0) rot.rotation += 45;\r\n }, this)\r\n }\r\n\r\n this.msg = new FYGE.TextField();\r\n this.msg.y = 125;\r\n this.msg.textWidth=rectBgTexture?rectBgTexture.width:200;\r\n this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;\r\n this.msg.size = 26\r\n this.msg.fillColor = \"#ffffff\";\r\n this.addChild(this.msg);\r\n }\r\n\r\n show(msg: string = \"加载中\") {\r\n this.msg.text = msg;\r\n }\r\n\r\n destroy() {\r\n super.destroy();\r\n this.msg = null;\r\n }\r\n}\r\n\r\n","\r\nimport { RES } from \"../RES\";\r\nimport { removeTweens } from \"../ctrls\";\r\n\r\n/**\r\n *\r\n */\r\nexport class Module extends FYGE.Container {\r\n protected data: any;\r\n constructor(data?: any) {\r\n super();\r\n this.data = data;\r\n this.init();\r\n }\r\n /**\r\n * 初始化资源和皮肤\r\n */\r\n private init() {\r\n this.preLoadRes().then(\r\n () => {\r\n //添加皮肤配置\r\n if (this.skinName) RES.initSkinDisplay(this, this.skinName, this);\r\n this.initUi();\r\n this.onLoaded && this.onLoaded();\r\n },\r\n () => {\r\n this.onLoadError && this.onLoadError();\r\n }\r\n );\r\n }\r\n /**\r\n * 提前加载的资源\r\n */\r\n protected preLoadRes() {\r\n return new Promise((resolve, reject) => {\r\n if (this.groupNames && this.groupNames.length) {\r\n var arr: Promise<any>[] = [];\r\n for (var i = 0; i < this.groupNames.length; i++) {\r\n arr.push(RES.loadGroup(this.groupNames[i]))\r\n }\r\n Promise.all(arr).then(resolve, reject)\r\n } else {\r\n resolve()\r\n }\r\n })\r\n }\r\n\r\n /**\r\n * 初始化ui\r\n * 子类修改\r\n */\r\n protected initUi() {\r\n\r\n }\r\n\r\n /**\r\n * 资源加载完成后执行,用于场景及弹框控制\r\n */\r\n onLoaded: () => void\r\n\r\n /**\r\n * 资源加载失败时执行,用于场景及弹框控制\r\n */\r\n onLoadError: () => void;\r\n\r\n\r\n /**\r\n * 可以有多个组\r\n */\r\n get groupNames(): string[] { return null }\r\n /**\r\n * 皮肤名字\r\n */\r\n get skinName(): string { return null };\r\n\r\n /**\r\n * 在构造函数后执行\r\n */\r\n start(data?: any) {\r\n this.initEvents();\r\n }\r\n\r\n /**\r\n * 添加事件\r\n */\r\n initEvents(): void {\r\n\r\n }\r\n\r\n /**\r\n * 移除事件\r\n */\r\n removeEvents(): void {\r\n\r\n }\r\n\r\n /**\r\n * 鼠标事件\r\n * @param enable\r\n */\r\n protected enableMouseEvt(enable: boolean): void {\r\n this.mouseEnable = enable;\r\n this.mouseChildren = enable;\r\n }\r\n\r\n /**\r\n * 延时防连点\r\n * @param target\r\n * @param {number} delay\r\n */\r\n protected btnDelay(target, delay = 2000) {\r\n target.mouseEnable = false;\r\n target.mouseChildren = false;\r\n setTimeout(() => {\r\n target.mouseEnable = true;\r\n target.mouseChildren = true;\r\n }, delay);\r\n }\r\n\r\n\r\n public destroy(): void {\r\n //以防有些地方用了showAni\r\n removeTweens(this);\r\n\r\n // this.data = null;//看情况吧,有时候hidePanel后用了data,注意,还是先去掉吧\r\n //移除事件\r\n this.removeEvents();\r\n //派发销毁事件,主要用于场景及弹框控制\r\n this.dispatchEvent(\"onDestroy\");\r\n super.destroy();\r\n }\r\n}\r\n","import { Module } from \"./Module\";\r\nexport class Scene extends Module {\r\n\r\n /**\r\n * 显示动画\r\n * 继承时注意,回调要加\r\n * 因为这种动画基本原场景最好不消失\r\n */\r\n showAni(callback: Function) {\r\n callback()\r\n }\r\n /**\r\n * 统一更新方法\r\n */\r\n updateScene() {\r\n\r\n }\r\n}","\r\nimport PanelCtrl from \"../ctrls/panelCtrl\";\r\nimport SceneCtrl from \"../ctrls/sceneCtrl\";\r\n\r\n/**\r\n * 添加进舞台的所有层级\r\n * 仿白鹭的那套\r\n */\r\nclass Layers extends FYGE.Container {\r\n private _bottomLayer: FYGE.Container;\r\n private _sceneLayer: FYGE.Container;\r\n private _popupLayer: FYGE.Container;\r\n private _toastLayer: FYGE.Container;\r\n private _topLayer: FYGE.Container;\r\n private _shareLayer: FYGE.Container;\r\n init(stage: FYGE.Stage) {\r\n stage.addChild(this);\r\n var arr = [\r\n \"_bottomLayer\",\r\n \"_sceneLayer\",\r\n \"_popupLayer\",\r\n \"_toastLayer\",\r\n \"_topLayer\",\r\n \"_shareLayer\"\r\n ];\r\n for (var i = 0; i < arr.length; i++) {\r\n this[arr[i]] = new FYGE.Container();\r\n //有些时候,定宽的时候,部分layer置顶,部分居中,再处理\r\n //为了都置顶和置左,stage的方式永远居中视窗,要么改stage永远左上为00\r\n // this[arr[i]].y = this.stageOffsetY;\r\n //如果定宽这里没必要,肯定是0\r\n // this[arr[i]].x = this.stageOffsetX;//去掉,定高时就居中了\r\n this.addChild(this[arr[i]]);\r\n }\r\n //都以底部适配\r\n this.sceneLayer.y = this.stageOffsetY;\r\n // this.popupLayer.y = -this.stageOffsetY;\r\n // this.popupLayer.y -= 420 / 2;\r\n\r\n this.shareLayer.y = -this.stageOffsetY;\r\n //初始化场景层级\r\n SceneCtrl.instance.init(this.sceneLayer)\r\n //初始化弹框层级\r\n PanelCtrl.instance.init(this.popupLayer)\r\n\r\n }\r\n\r\n /**\r\n * 底图所在层级,比如统一的背景\r\n */\r\n get bottomLayer() { return this._bottomLayer }\r\n /**\r\n * 场景\r\n */\r\n get sceneLayer() { return this._sceneLayer }\r\n /**\r\n * 弹框\r\n */\r\n get popupLayer() { return this._popupLayer }\r\n /**\r\n * toast所在层级\r\n */\r\n get toastLayer() { return this._toastLayer }\r\n /**\r\n * 顶层,比如统一标题栏等\r\n */\r\n get topLayer() { return this._topLayer }\r\n /**\r\n * 分享引导层\r\n */\r\n get shareLayer() { return this._shareLayer }\r\n /**\r\n * 舞台信息都放在layers里吧\r\n * 舞台可见高度,初始化后才能使用\r\n */\r\n get stageHeight() {\r\n if (!this.stage) return 0;\r\n return this.stage.viewRect.height;\r\n }\r\n /**\r\n * 舞台可见宽度\r\n */\r\n get stageWidth() {\r\n if (!this.stage) return 0;\r\n return this.stage.viewRect.width;\r\n }\r\n /**\r\n * 适配方式x两边偏移的量,固定宽度x为0\r\n */\r\n get stageOffsetX() {\r\n if (!this.stage) return 0;\r\n return this.stage.viewRect.x;\r\n }\r\n get stageOffsetY() {\r\n if (!this.stage) return 0;\r\n return this.stage.viewRect.y;\r\n }\r\n /**\r\n * 舞台中心点位置x\r\n */\r\n // get stageCenterX(): number {\r\n // return this.stage.viewRect.x + this.stage.viewRect.width >> 1;\r\n // }\r\n /**\r\n * 舞台中心点位置y,layer位置做过偏移的就不对了,所以还是自行算吧\r\n */\r\n // get stageCenterY(): number {\r\n // return this.stage.viewRect.y + this.stage.viewRect.height >> 1;\r\n // }\r\n}\r\n\r\nexport const layers = new Layers();\r\n\r\n//先执行,在淘宝小程序中重新进入会再次初始化\r\nexport function destroyLayers() {\r\n //所有层级移除,init会重新建\r\n layers.removeChildren();\r\n //从父级stage移除自己,init会重新加\r\n if (layers.parent) layers.parent.removeChild(layers)\r\n}\r\n","const resCanvasList = {\n '4ee17a9c-5deb-43be-b205-16fb7593d172': {\n name: 'spark',\n ext: '.png',\n url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',\n uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'\n },\n 'cb54f3b5-0469-46d1-99ea-734153b92078': {\n name: 'bg',\n ext: '.png',\n url: '//yun.duiba.com.cn/spark/assets/bg.c4359b9ea9e843cd8d929567b2fb52ed5518e105.png',\n uuid: 'cb54f3b5-0469-46d1-99ea-734153b92078'\n },\n '593e9d74-4944-496a-b6c1-8316756f8bf7': {\n name: '宝箱2',\n ext: '.png',\n uuid: '593e9d74-4944-496a-b6c1-8316756f8bf7',\n url: '//yun.duiba.com.cn/spark/assets/022e25a3984ff122fbf960bd0cb87bff48f8c3bf.png'\n }\n};\nexport default resCanvasList;\n","import { RES } from \"../module/RES\";\r\nimport { layers, destroyLayers } from \"../module/views/layers\";\r\nimport { ResJson } from \"./ResJson\";\r\nimport { G_EVENT } from \"./common/G_EVENT\";\r\nimport { destroyAllCtrls, changeScene } from \"../module/ctrls\";\r\nimport { StartScene } from \"./scenes/StartScene\";\r\nimport { destroyNetData } from \"./TaoBaoNet\";\r\n\r\n\r\nimport resCanvasList from '../resCanvasList';\r\nimport { setStage } from \"./scenes/stage\";\r\n\r\n\r\n/**\r\n * 全局事件,为了和小程序交互\r\n * 有可能多处页面用到,所以单开\r\n */\r\nexport const GDispatcher = new FYGE.EventDispatcher();\r\n\r\nexport class Main {\r\n //主舞台\r\n stage: FYGE.Stage;\r\n private requestID;\r\n private _pause: boolean;\r\n constructor(canvas: HTMLCanvasElement) {\r\n var sysInfo;\r\n //@ts-ignore 存在my就初始化\r\n if (my) {\r\n FYGE.initedByCanvas(canvas)\r\n\r\n //@ts-ignore 存在my就初始化\r\n sysInfo = my.getSystemInfoSync()\r\n }\r\n //建舞台\r\n var stage = new FYGE.Stage(\r\n canvas,\r\n 750,//设计宽度,按设计搞给的就行\r\n 1624,//设计高度\r\n sysInfo && sysInfo.windowWidth || document.body.clientWidth,\r\n sysInfo && sysInfo.windowHeight || document.body.clientHeight,\r\n FYGE.RENDERER_TYPE.CANVAS\r\n );\r\n this.stage = stage;\r\n setStage(stage);\r\n //开始循环\r\n // FYGE.Stage.flushAll();\r\n //stage初始化\r\n stage.addEventListener(FYGE.Event.INIT_STAGE, this.onAddToStage, this);\r\n //帧率\r\n // var stats = new FYGE.Stats(\"canva4stats\");\r\n //循环\r\n var self = this;\r\n // console.log(FYGE)\r\n loop();\r\n function loop() {\r\n if (!self._pause) {\r\n // stats.begin();\r\n FYGE.Tween.flush()\r\n stage.flush();\r\n // stats.end();\r\n }\r\n //@ts-ignore\r\n self.requestID = FYGE.getRequestAnimationFrame()(loop);\r\n }\r\n }\r\n\r\n private async onAddToStage() {\r\n //初始化层级\r\n layers.init(this.stage);\r\n console.log(\"初始化层级完成\")\r\n //初始化资源配置\r\n // RES.loadConfig(ResJson);\r\n // console.log(\"初始化资源配置完成\")\r\n //皮肤配置加载\r\n // RES.loadSkinConfig(SkinJson);\r\n //加载通用资源\r\n // await RES.loadGroup(\"common\");\r\n await RES.loadSparkAssets(resCanvasList);\r\n console.log(\"通用资源加载完成\")\r\n //打开开始场景\r\n changeScene(StartScene);\r\n // changeScene(LoadingScene);\r\n // changeScene(SStartScene);\r\n // changeScene(StoryScene);\r\n // changeScene(AdoptScene);\r\n // console.log(\"恶趣味去\")\r\n // showPanel(NoStepPanel)\r\n //测试\r\n // sendTbNet(TbNetName.aaa, {}, (s, res) => {\r\n // console.log(res)\r\n // })\r\n //获取数据,,必成功\r\n // showWaiting();\r\n // sendTbNet(TbNetName.getAppData, {}, (s, res) => {\r\n // hideWaiting();\r\n // Tool.globalData = res.data;\r\n // changeScene(PlayScene);\r\n // //先去获取下任务列表的商品信息吧\r\n // sendTbNet(TbNetName.getTaskList, { activityId: Tool.globalData.activityId }, (s, res) => {\r\n // if (s) Tool.browseItems = res.data.browseItemIds.content;\r\n // })\r\n // })\r\n }\r\n\r\n //在小程序显示时调用onShow\r\n run() {\r\n this._pause = false\r\n //@ts-ignore Tween计时清零\r\n // FYGE.Tween._lastTime = null //下面的_pause 不执行,先去掉,试试有没有问题\r\n\r\n GDispatcher.dispatchEvent(G_EVENT.ON_SHOW);\r\n }\r\n //在小程序隐藏时调用onHide\r\n pause() {\r\n // this._pause = true;//先去掉吧\r\n GDispatcher.dispatchEvent(G_EVENT.ON_HIDE);\r\n }\r\n\r\n /**\r\n * 添加全局事件,用于小程序的交互调用\r\n * 一直很犹豫要不要放在main的实例里,还是和Main同级导出,还有上面的pause,run,下面的事件等\r\n * @param name\r\n * @param fun\r\n * @param thisObj\r\n */\r\n addGlobalEvent(name: string, fun: Function, thisObj?: any, once: boolean = false) {\r\n if (once) {\r\n GDispatcher.once(name, fun, thisObj)\r\n } else {\r\n GDispatcher.addEventListener(name, fun, thisObj)\r\n }\r\n }\r\n /**\r\n * 派发全局事件,用于小程序的交互调用\r\n * @param name 可以是事件名,也可以是事件\r\n * @param data\r\n */\r\n dispatchGlobalEvent(name: string | any, data?: any) {\r\n GDispatcher.dispatchEvent(name, data)\r\n }\r\n /**\r\n * 移除全局事件,用于小程序交互调用\r\n * @param name\r\n * @param fun\r\n * @param thisObj\r\n */\r\n removeGlobalEvent(name: string, fun: Function, thisObj?: any) {\r\n GDispatcher.removeEventListener(name, fun, thisObj)\r\n }\r\n\r\n\r\n //在小程序页面卸载时调用onUnload,多次销毁后会有问题,再检查\r\n destroy() {\r\n //Tween都移除,注意吧,可能原先的也被移除\r\n FYGE.Tween.removeAllTweens()\r\n // removeAllTimeoutId();//这个再看,尽量用tween的修改\r\n //停掉计时器\r\n FYGE.getCancelAnimationFrame()(this.requestID);\r\n //层级销毁\r\n destroyLayers()\r\n //销毁控制器\r\n destroyAllCtrls();\r\n //舞台销毁\r\n this.stage.destroy();\r\n //全局事件置空\r\n GDispatcher.removeAllEventListener();\r\n //网络数据记录清空\r\n destroyNetData();\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n","import { showToast, wait, clearWait } from \"../module/ctrls\";\r\nimport { GDispatcher } from \"./Main\";\r\n\r\n//接口枚举,包括需要调用淘宝的api,用是否含有兑吧区分,或者单独区分\r\nexport enum TbNetName {\r\n\r\n /**\r\n * 埋点统计 到时改名字\r\n * activityId params elemType\r\n */\r\n trackingReport = \"squirrelsAdoptRest2c.trackingReport\",\r\n /**\r\n * 进入活动调用, 刷新数据不调用该接口\r\n * activityId userNick avatar follow inviteId\r\n */\r\n getIndex = \"babycare.getIndex\",\r\n\r\n\r\n /**\r\n * 活动基本信息\r\n * @param activityId\r\n * @type {string}\r\n */\r\n getActivityBaseInfoById = \"babycare.getActivityBaseInfoById\",\r\n\r\n /**\r\n * 获取游戏信息\r\n * activityId\r\n */\r\n getGameInfo = \"babycare.getGameInfo\",\r\n /**\r\n * 消耗道具 ,会返回剩余所有道具数量\r\n * activityId \ttype\r\n */\r\n consumerTools = \"babycare.consumerTools\",\r\n /**\r\n * 提交分数\r\n * activityId level score\t stars\tisVisitSuccess(是否通关)\r\n */\r\n gameOver = \"babycare.gameOver\",\r\n /**\r\n * 领取任务奖励\r\n * activityId taskType\r\n */\r\n receiveTaskRewards = \"babycare.receiveTaskRewards\",\r\n /**\r\n * 积分兑换道具和体力\r\n * activityId type credits\r\n */\r\n exchange = \"babycare.exchange\",\r\n /**\r\n * 根据等级获取奖品列表\r\n * activityId level\r\n */\r\n getPrizesByLevel = \"babycare.getPrizesByLevel\",\r\n /**\r\n * 查询用户积分\r\n * activityId\r\n */\r\n queryCredits = \"babycare.queryCredits\",\r\n /**\r\n * 开始闯关,会返回体力值\r\n * activityId level\r\n */\r\n dojoin = \"babycare.dojoin\",\r\n /**\r\n * 完成任务(浏览商品详情页, 关注店铺)\r\n * activityId taskType\r\n */\r\n completeTask = \"babycare.completeTask\",\r\n /**\r\n * 任务列表\r\n * activityId\r\n */\r\n getTaskList = \"babycare.getTaskList\",\r\n\r\n ///////////////////前端调用接口都加个mine\r\n\r\n ////带用户操作,和index.js特殊操作的\r\n /**\r\n * 用户授权\r\n */\r\n authorize = 'mine.authorize',\r\n /**\r\n * 关注店铺\r\n */\r\n favorShop = \"mine.favorShop\",\r\n /**\r\n * 获取用户地址及确认\r\n * prizeId\r\n */\r\n getUserAddress = \"mine.getUserAddress\",\r\n /**\r\n * 获取名字\r\n * type\r\n */\r\n getAdoptName = \"mine.getAdoptName\",\r\n\r\n ///////////////////////////基本都是前端同步方法\r\n /**\r\n * 获取参数\r\n */\r\n getAppData = \"mine.getAppData\",\r\n /**\r\n * 小程序内跳到其他页面\r\n * url\r\n */\r\n navigateToOutside = \"mine.navigateToOutside\",\r\n /**\r\n * 跳转到小程序的其他页面\r\n * url\r\n */\r\n navigateTo = \"mine.navigateTo\",\r\n /**\r\n * 返回上一页或多页\r\n * delta,页面数,不传默认1\r\n */\r\n navigateBack = \"mine.navigateBack\",\r\n /**\r\n * 分享面板\r\n * openId\r\n */\r\n showSharePanel = \"mine.showSharePanel\",\r\n /**\r\n * 打开详情页\r\n * itemId\r\n */\r\n openDetail = \"mine.openDetail\",\r\n\r\n /**\r\n * 自定义埋点\r\n * logkey\r\n */\r\n reportAnalytics = \"mine.reportAnalytics\"\r\n}\r\n\r\n//返回数据类型,到时再调整\r\n// interface dataIn {\r\n// netName: TbNetName\r\n// data: any\r\n// }\r\n//返回数据类型\r\ninterface dataOut {\r\n success: boolean,\r\n data?: any\r\n code?: string,\r\n message?: string\r\n}\r\n\r\n//记录数据\r\nlet dataRecord: {\r\n [name: string]: any\r\n} = {};\r\n\r\n//云函数\r\nlet fc;\r\n\r\n/**\r\n * 发送接口\r\n * @param netName\r\n * @param parameter\r\n * @param callback\r\n * @param hideMsg\r\n */\r\nexport function sendTbNet(\r\n netName: TbNetName,\r\n parameter?: any,\r\n callback?: (success: boolean, res?: dataOut) => void,\r\n hideMsg: boolean = false\r\n): Promise<dataOut> {\r\n return new Promise((resolve, reject) => {\r\n //网络超时\r\n let waitObj;\r\n //@ts-ignore 本地开发,直接取数据\r\n if (!my) {\r\n var url = \"../../mock/miniTb/\" + netName + \".json\";\r\n fetchAsync(url)\r\n .then((data) => {\r\n //清除超时\r\n // clearWait(waitObj)\r\n //记录数据\r\n dataRecord[netName] = data;\r\n //统一错误信息提示\r\n if (!hideMsg && !data.success) showToast(data.message || \"网络异常\")\r\n //回调\r\n callback && callback(data.success, data);\r\n resolve(data)\r\n console.log(\r\n `\\n%c[ mock ]\\n`\r\n + `NAME : ${netName} \\n`\r\n + `STATE : %o \\n`\r\n + `PARAM : %o \\n`\r\n + `%cDATA : %o \\n`\r\n , `${data.success ? 'color:green' : 'color:red'}`\r\n , data.success\r\n , parameter\r\n , `${data.success ? 'color:green' : 'color:red'}`\r\n , data\r\n );\r\n }, () => {\r\n })\r\n return\r\n }\r\n\r\n\r\n let fun = function (e: { type: string, data: dataOut }) {\r\n //清除超时记录\r\n clearWait(waitObj)\r\n //移除事件\r\n GDispatcher.removeEventListener(netName, fun);\r\n\r\n var d = e.data;\r\n //记录数据\r\n dataRecord[netName] = d;\r\n //统一错误信息提示,d.data为了区分网络超时\r\n if (!hideMsg && !d.success) showToast(d.message || \"网络超时\")\r\n //执行回调\r\n callback && callback(d.success, d);\r\n resolve(d)\r\n console.log(\r\n `\\n%c[ request ]\\n`\r\n + `NAME : ${netName} \\n`\r\n + `STATE : %o \\n`\r\n + `PARAM : %o \\n`\r\n + `%cDATA : %o \\n`\r\n , `${d.success ? 'color:green' : 'color:red'}`\r\n , d.success\r\n , parameter\r\n , `${d.success ? 'color:green' : 'color:red'}`\r\n , d\r\n );\r\n }\r\n //添加事件接收接口返回信息\r\n GDispatcher.addEventListener(netName, fun);\r\n\r\n //网络超时\r\n waitObj = wait(() => {\r\n //是用户操作,不设置超时\r\n if (netName != TbNetName.favorShop &&//关注店铺用户操作\r\n netName != TbNetName.getUserAddress && // 获取地址\r\n netName != TbNetName.authorize && // 授权\r\n netName != TbNetName.getAdoptName && //领养名字获取\r\n netName != TbNetName.trackingReport && //埋点接口也不考虑超时\r\n netName != TbNetName.reportAnalytics //淘宝自定义埋点也不考虑超时\r\n ) {\r\n fun({ type: netName, data: { success: false } })\r\n }\r\n }, 10000)\r\n\r\n //用事件方式吧,派发事件发接口,,,,注意很多独有的事件名别重了,onHide,onShow,onMessage等 放到最后,因为有同步的情况\r\n GDispatcher.dispatchEvent({ type: \"onMessage\" }, { netName, parameter })\r\n })\r\n //@ts-ignore\r\n // if (!fc) fc = getApp().cloud.function;\r\n // //第一个参数视项目而定\r\n // fc.invoke(\"becheery\", parameter, netName)\r\n // .then((res: dataOut) => {\r\n // clearWait(waitObj);\r\n // //记录数据\r\n // dataRecord[netName] = res;\r\n // // console.log(\"返回数据\" + JSON.stringify(res));\r\n // //统一错误信息提示\r\n // if (!hideMsg && !res.success) showToast(codeMsg[res.code] || res.message || \"网络异常\")\r\n // //回调\r\n // callback(res.success, res);\r\n // })\r\n}\r\n\r\n/**\r\n * 获取数据\r\n * @param netName\r\n */\r\nexport function getTbData(netName: TbNetName): dataOut {\r\n return dataRecord[netName] || null;\r\n}\r\n\r\n//销毁数据\r\nexport function destroyNetData() {\r\n dataRecord = {}\r\n}\r\n\r\n//webview里调用无效,用postMessage去调\r\n// export const navigateToOutside = (url) => {\r\n// my.call(\"navigateToOutside\", {\r\n// url\r\n// }, (res) => {\r\n// // my.alert({ content: \"success - \" + JSON.stringify(res)})\r\n// });\r\n// }\r\n\r\nasync function fetchAsync(url: string) {\r\n // await response of fetch call\r\n let response = await fetch(url);\r\n // only proceed once promise is resolved\r\n let data = await response.json();\r\n // only proceed once second promise is resolved\r\n return data;\r\n}\r\n\r\n\r\n// const { cloud } = window[\"getApp\"]();\r\n// const { function: fc } = cloud;\r\n// fc.invoke(\"duiba.sign.doJoin\", { signActivityId: 1 })\r\n// .then(res => {\r\n// console.log(res);\r\n// })\r\n\r\n/**\r\n * 错误码列表,字段不设枚举了\r\n */\r\nconst codeMsg = {\r\n \"210001\": \"服务器异常\",\r\n \"210002\": \"用户不存在\",\r\n \"210003\": \"邀请已达上限\",\r\n \"210004\": \"无法邀请自己\",\r\n \"210006\": \"该活动ID无效\",\r\n \"210009\": \"该活动暂未开始\",\r\n \"210010\": \"该分享ID不存在\",\r\n \"210012\": \"该用户暂未获奖\",\r\n \"210013\": \"领取失败\",\r\n \"210015\": \"该活动已删除\",\r\n \"210016\": \"该活动已经结束\",\r\n \"210017\": \"该奖品已达领取上线\",\r\n \"210018\": \"请先分享好友\",\r\n \"210019\": \"暂有奖品未领取\",\r\n \"210020\": \"暂有奖品未完成\",\r\n \"210021\": \"请先玩一局游戏\",\r\n \"210022\": \"请先选择奖品\",\r\n \"210023\": \"领取失败,库存不足\",\r\n \"210024\": \"请先成为会员\",\r\n \"210025\": \"奖品已经过期\",\r\n \"210026\": \"不能重复助力\",\r\n \"210028\": \"请至我的奖品页重新领取\",//重新领取\r\n}\r\n","export enum G_EVENT {\r\n ON_SHOW = 'onShow', // 页面显示\r\n ON_HIDE = 'onHide', // 页面隐藏\r\n UPDATE_TASK = 'UpdateTask', // 更新任务\r\n}\r\n","import { RES } from \"../../module/RES\";\nimport resCanvasList from \"../../resCanvasList\";\nexport default class DropItem extends FYGE.Sprite {\n constructor() {\n super();\n\n this.texture = RES.getRes(\n resCanvasList[\"593e9d74-4944-496a-b6c1-8316756f8bf7\"].url\n );\n this.y = 0;\n }\n\n updatePosition() {\n this.y += 10;\n }\n}\n","import Root from \"./Root\";\nimport { getStage } from \"./stage\";\nimport DropItem from \"./DropItem\";\n\nexport default class DropsCtrl {\n _root: Root;\n _drops: DropItem[];\n constructor(root) {\n this._root = root;\n }\n\n start() {\n getStage().addEventListener(\n FYGE.Event.ENTER_FRAME,\n this.onEnterFrame,\n this\n );\n\n for (let index = 0; index < 10; index++) {\n setTimeout(() => {\n this.addDropItem();\n }, 1000 * index);\n }\n }\n\n addDropItem() {\n this._drops = this._drops || [];\n const drop = new DropItem();\n this._root.addChild(drop);\n drop.x = Math.random() * 400 + (750 - 400) / 2;\n this._drops.push(drop);\n }\n\n onEnterFrame() {\n if (this._drops) this._drops.forEach((drop) => drop.updatePosition());\n }\n\n destroy() {\n getStage().removeEventListener(\n FYGE.Event.ENTER_FRAME,\n this.onEnterFrame,\n this\n );\n }\n}\n","import { RES } from \"../../module/RES\";\nimport resCanvasList from \"../../resCanvasList\";\nimport DropsCtrl from \"./DropsCtrl\";\n\nexport default class Root extends FYGE.Container {\n constructor() {\n super();\n this.once(FYGE.Event.ADDED_TO_STAGE, this.onAddToStage, this);\n\n var bg: FYGE.Sprite = new FYGE.Sprite();\n bg.x = 0;\n bg.y = 0;\n bg.texture = RES.getRes(\n resCanvasList[\"cb54f3b5-0469-46d1-99ea-734153b92078\"].url\n );\n this.addChild(bg);\n\n console.log('fuck')\n\n const ctrl = new DropsCtrl(this);\n ctrl.start();\n\n // SvgaParser.loadSvga(\n // \"//yun.duiba.com.cn/spark/assets/open_effect.b997f18f52ca96abb0913ca32fdce6f22ad9bcf7.svga\",\n // (v:any) => {\n // console.log(v)\n // this.addChild(v)\n // },\n // () => {}\n // );\n }\n\n onAddToStage() {\n this.y = this.stage.viewRect.height / 2 - 1624 / 2;\n }\n}\n","import { Scene } from \"../../module/views/Scene\";\r\nimport { RES } from \"../../module/RES\";\r\nimport Root from \"./Root\";\r\n\r\nexport class StartScene extends Scene {\r\n initUi() {\r\n super.initUi();\r\n var canvas: FYGE.Container = new FYGE.Container();\r\n canvas.position.set(0, 0);\r\n this.addChild(canvas);\r\n }\r\n\r\n start() {\r\n this.addChild(new Root());\r\n }\r\n}\r\n","let _stage;\nexport const getStage = ():FYGE.Stage => _stage;\n\nexport const setStage = (stage) => {\n _stage = stage;\n};\n"],"sourceRoot":""}
\ No newline at end of file
import * as FYGE from "fyge-tbmini";
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(window, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/Main.ts");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./module/RES.ts":
/*!***********************!*\
!*** ./module/RES.ts ***!
\***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RES = void 0;
var RES;
(function (RES) {
var resData;
var videoEntityHash = {};
var soundHash = {};
var groupsCompleteHash = {};
var groupsPromiseHash = {};
var singleResPromiseHash = {};
function loadConfig(res) {
resData = res;
RES.resPath = res.path;
}
RES.loadConfig = loadConfig;
function loadSparkAssets(resList) {
var list = [];
for (var key in resList) {
list.push(resList[key]);
}
var p = new Promise(function (resolve, reject) {
loadResList(function (s) {
if (s) {
resolve();
}
else {
reject();
}
}, list);
});
return p;
}
RES.loadSparkAssets = loadSparkAssets;
function loadGroup(name) {
if (groupsCompleteHash[name]) {
return new Promise(function (resolve) {
resolve();
});
}
if (groupsPromiseHash[name]) {
return groupsPromiseHash[name];
}
var arr = getGroupResByName(name);
if (!arr || !arr.length) {
groupsCompleteHash[name] = true;
return new Promise(function (resolve) {
resolve();
});
}
var p = new Promise(function (resolve, reject) {
loadResList(function (s) {
delete groupsPromiseHash[name];
if (s) {
groupsCompleteHash[name] = true;
resolve();
}
else {
reject();
}
}, arr);
});
groupsPromiseHash[name] = p;
return p;
}
RES.loadGroup = loadGroup;
function getResAsync(str, comFun, thisObj) {
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
if (type == "png" || type == "jpg") {
if (FYGE.TextureCache[str]) {
comFun && comFun.call(thisObj, FYGE.TextureCache[str], str);
new Promise(function (r) {
r(FYGE.TextureCache[str]);
});
}
else {
return new Promise(function (resolve, reject) {
FYGE.GlobalLoader.loadImage(function (s, image) {
if (s) {
FYGE.Texture.addToCache(FYGE.Texture.from(image), str);
comFun && comFun.call(thisObj, FYGE.TextureCache[str], str);
resolve(FYGE.TextureCache[str]);
}
else {
comFun && comFun.call(thisObj, null, str);
reject();
}
}, str);
});
}
}
}
RES.getResAsync = getResAsync;
function getResByUrl() {
}
RES.getResByUrl = getResByUrl;
function getRes(str) {
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
if (type == "png" || type == "jpg") {
return FYGE.TextureCache[str] || null;
}
}
RES.getRes = getRes;
function hasRes(str) {
for (var i = 0; i < resData.groups.length; i++) {
var group = resData.groups[i];
var keys = group.keys;
if (keys && keys.split(",").indexOf(str) > -1) {
return group.name;
}
if (group.atlas && group.name + ".json" == str) {
return group.name;
}
}
return null;
}
function getGroupResByName(name) {
var group = getGroupByName(name);
if (!group)
return null;
if (group.atlas) {
var arr = [name + ".json"];
if (group.keys) {
arr = arr.concat(group.keys.split(",").filter(function (k) {
return k.substr(-4) != ".png";
}));
}
return arr;
}
else if (group.keys) {
return group.keys.split(",");
}
else {
return null;
}
}
function getGroupByName(name) {
var groups = resData.groups;
var group;
for (var i = 0; i < groups.length; i++) {
if (groups[i].name === name) {
group = groups[i];
break;
}
}
return group;
}
function loadResList(callback, arr) {
var count = 0;
var countAll = arr.length;
if (!countAll)
callback(true);
var mark = true;
for (var i = 0; i < countAll; i++) {
var resName = arr[i]['url'];
getResAsync(resName, function (res, str) {
if (!res)
mark = false;
if (++count == countAll)
callback(mark);
}, this);
}
}
RES.loadResList = loadResList;
function returnSingleResPromise(str, comFun, thisObj) {
singleResPromiseHash[str].then(function (r) {
comFun && comFun.call(thisObj, r, str);
}, function () {
comFun && comFun.call(thisObj, null, str);
});
return singleResPromiseHash[str];
}
var skinData;
function loadSkinConfig(skinJson) {
skinData = skinJson;
}
RES.loadSkinConfig = loadSkinConfig;
function initSkinDisplay(con, skin, root) {
var data = typeof (skin) == 'string' ? getSkinDataByName(skin) : skin;
if (!data.children || !data.children.length)
return;
for (var i = 0; i < data.children.length; i++) {
var child = data.children[i];
if (child.type == "skin")
continue;
var dis = con.addChild(getDisplayByData(child));
if (root && child.id)
root[child.id] = dis;
if (child.type == "container")
initSkinDisplay(dis, child, root);
}
}
RES.initSkinDisplay = initSkinDisplay;
function getSkinDataByName(skinName, skinNode) {
if (skinNode === void 0) { skinNode = skinData; }
if (!skinNode || !skinNode.children || !skinNode.children.length)
return null;
for (var i = 0; i < skinNode.children.length; i++) {
var child = skinNode.children[i];
if (child.name == skinName && (child.type == "container" || child.type == "skin"))
return child;
var gson = getSkinDataByName(skinName, child);
if (gson)
return gson;
}
return null;
}
RES.getSkinDataByName = getSkinDataByName;
function getSrcByUuid(resList, uuid) {
resList = resList || [];
for (var i = 0; i < resList.length; i++) {
if (resList[i].uuid == uuid) {
return resList[i].url;
}
}
return "";
}
RES.getSrcByUuid = getSrcByUuid;
function getDisplayByData(data) {
var dis;
switch (data.type) {
case "container":
dis = new FYGE.Container();
break;
case "button":
dis = new FYGE.Button(getRes(data.props.tUp), data.props.tDown ? getRes(data.props.tDown) : null, data.props.tDisable ? getRes(data.props.tDisable) : null);
break;
case "text":
dis = new FYGE.TextField();
for (var key in data.props)
dis[key] = data.props[key];
break;
case "sprite":
dis = new FYGE.Sprite(getRes(data.props.source));
break;
case "rect":
dis = new FYGE.Shape();
dis.beginFill(FYGE.string2hex(data.props.fillColor));
dis.drawRect(0, 0, data.props.width, data.props.height);
dis.endFill();
break;
}
dis.name = data.name;
dis.alpha = data.alpha || 1;
dis.position.set(data.x, data.y);
return dis;
}
function destroyRES() {
}
})(RES = exports.RES || (exports.RES = {}));
/***/ }),
/***/ "./module/ctrls/index.ts":
/*!*******************************!*\
!*** ./module/ctrls/index.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyAllCtrls = exports.removeTweens = exports.clearWait = exports.wait = exports.showAlert = exports.getCurrentScene = exports.changeScene = exports.closeCurrentPanel = exports.closeAllPanels = exports.showConfirm = exports.showPanel = exports.showToast = void 0;
var waitingCtrl_1 = __webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts");
var panelCtrl_1 = __webpack_require__(/*! ./panelCtrl */ "./module/ctrls/panelCtrl.ts");
var sceneCtrl_1 = __webpack_require__(/*! ./sceneCtrl */ "./module/ctrls/sceneCtrl.ts");
var toastCtrl_1 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
var toastCtrl_2 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
Object.defineProperty(exports, "showToast", { enumerable: true, get: function () { return toastCtrl_2.showToast; } });
__exportStar(__webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts"), exports);
exports.showPanel = function (panel, data) {
return panelCtrl_1.default.instance.show(panel, data);
};
exports.showConfirm = function (panel, data) {
var confirmPanel = panelCtrl_1.default.instance.show(panel, data);
return confirmPanel.makePromise();
};
exports.closeAllPanels = function () {
panelCtrl_1.default.instance.closeAll();
};
exports.closeCurrentPanel = function () {
panelCtrl_1.default.instance.closeCurrent();
};
exports.changeScene = function (scene, data) {
sceneCtrl_1.default.instance.change(scene, data);
};
function getCurrentScene() {
return sceneCtrl_1.default.instance.currentScene;
}
exports.getCurrentScene = getCurrentScene;
exports.showAlert = function (title, content) {
if (my) {
my.alert({
title: title || "",
content: content || ""
});
}
else {
console.log(title, content);
}
};
function wait(callback, time) {
var obj = {};
FYGE.Tween.get(obj)
.wait(time)
.call(callback);
return obj;
}
exports.wait = wait;
function clearWait(obj) {
obj && FYGE.Tween.removeTweens(obj);
}
exports.clearWait = clearWait;
function removeTweens(obj, isRecursive) {
if (isRecursive === void 0) { isRecursive = true; }
if (!obj)
return;
FYGE.Tween.removeTweens(obj);
if (!isRecursive || !obj.children || !obj.children.length)
return;
obj.children.forEach(function (child) {
removeTweens(child);
});
}
exports.removeTweens = removeTweens;
function destroyAllCtrls() {
toastCtrl_1.destroyToast();
waitingCtrl_1.destroyWaiting();
panelCtrl_1.default.instance.destroy();
sceneCtrl_1.default.instance.destroy();
}
exports.destroyAllCtrls = destroyAllCtrls;
/***/ }),
/***/ "./module/ctrls/panelCtrl.ts":
/*!***********************************!*\
!*** ./module/ctrls/panelCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var layers_1 = __webpack_require__(/*! ../views/layers */ "./module/views/layers.ts");
var waitingCtrl_1 = __webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts");
var toastCtrl_1 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
var PanelCtrl = (function () {
function PanelCtrl() {
this.stacks = [];
}
Object.defineProperty(PanelCtrl, "instance", {
get: function () {
return PanelCtrl._instance || (PanelCtrl._instance = new PanelCtrl());
},
enumerable: false,
configurable: true
});
PanelCtrl.prototype.init = function (parent) {
this._parent = parent;
var bg = new FYGE.Shape();
bg.beginFill(0);
bg.drawRect(layers_1.layers.stageOffsetX - parent.x, layers_1.layers.stageOffsetY - parent.y, layers_1.layers.stageWidth, layers_1.layers.stageHeight);
bg.endFill();
bg.hitTestByPixel = false;
bg.visible = false;
this._parent.addChild(bg);
this._bg = bg;
};
PanelCtrl.prototype.closeAll = function () {
this.stacks.forEach(function (e) { return e.hidePanel(); });
};
PanelCtrl.prototype.show = function (cls, data) {
var _this = this;
waitingCtrl_1.showWaiting();
var panel = new cls(data);
this.add(panel);
this.stacks.push(panel);
panel.onLoaded = function () {
waitingCtrl_1.hideWaiting();
_this.updateView(false);
panel.start(data);
if (panel.visible)
panel.showAni();
};
panel.onLoadError = function () {
waitingCtrl_1.hideWaiting();
toastCtrl_1.showToast("资源加载失败");
panel.removeEventListener('onDestroy', _this.onPanelHide, _this);
_this.remove(panel);
};
return panel;
};
PanelCtrl.prototype.updateView = function (showPanelAni) {
var _this = this;
if (showPanelAni === void 0) { showPanelAni = true; }
if (!this.stacks.length) {
if (this._bg.visible) {
this.bgAni = "hide";
FYGE.Tween.removeTweens(this._bg);
FYGE.Tween.get(this._bg)
.to({ alpha: 0 }, 200, FYGE.Ease.cubicOut)
.call(function () {
_this._bg.visible = false;
_this._current = null;
_this._parent.visible = false;
});
}
}
else {
this._parent.visible = true;
if (this.bgAni == "hide") {
this.bgAni = "show";
FYGE.Tween.removeTweens(this._bg);
this._bg.alpha = 0.7;
}
if (this._bg.visible === false) {
this._bg.visible = true;
this._bg.alpha = 0;
FYGE.Tween.get(this._bg).to({ alpha: 0.7 }, 200, FYGE.Ease.cubicOut);
}
}
for (var i = 0; i < this.stacks.length; i++) {
if (i < this.stacks.length - 1) {
this.stacks[i].visible = false;
}
else {
this.stacks[i].visible = true;
if (showPanelAni)
this.stacks[i].showAni();
this._current = this.stacks[i];
}
}
};
PanelCtrl.prototype.add = function (panel) {
this._parent.addChild(panel);
panel.addEventListener('onDestroy', this.onPanelHide, this);
};
PanelCtrl.prototype.remove = function (panel) {
this._parent.removeChild(panel);
this.stacks = this.stacks.filter(function (e) { return e != panel; });
};
PanelCtrl.prototype.onPanelHide = function (e) {
var panel = e.target;
panel.removeEventListener('onDestroy', this.onPanelHide, this);
this.remove(panel);
this.updateView();
};
PanelCtrl.prototype.closeCurrent = function () {
if (this._current) {
this._current.hidePanel();
}
};
PanelCtrl.prototype.destroy = function () {
PanelCtrl._instance = null;
this.stacks = null;
this._current = null;
this._parent = null;
FYGE.Tween.removeTweens(this._bg);
this._bg = null;
};
return PanelCtrl;
}());
exports.default = PanelCtrl;
/***/ }),
/***/ "./module/ctrls/sceneCtrl.ts":
/*!***********************************!*\
!*** ./module/ctrls/sceneCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var waitingCtrl_1 = __webpack_require__(/*! ./waitingCtrl */ "./module/ctrls/waitingCtrl.ts");
var toastCtrl_1 = __webpack_require__(/*! ./toastCtrl */ "./module/ctrls/toastCtrl.ts");
var SceneCtrl = (function () {
function SceneCtrl() {
}
Object.defineProperty(SceneCtrl, "instance", {
get: function () {
return SceneCtrl._instance || (SceneCtrl._instance = new SceneCtrl());
},
enumerable: false,
configurable: true
});
SceneCtrl.prototype.init = function (parent) {
this._parent = parent;
};
SceneCtrl.prototype.change = function (cls, data) {
var _this = this;
var scene = new cls(data);
scene.visible = false;
waitingCtrl_1.showWaiting();
var preScene = this._currentScene;
scene.onLoaded = function () {
waitingCtrl_1.hideWaiting();
scene.showAni(function () {
if (preScene)
preScene.destroy();
});
scene.visible = true;
scene.start(data);
};
scene.onLoadError = function () {
waitingCtrl_1.hideWaiting();
toastCtrl_1.showToast("资源加载失败");
_this._currentScene = preScene || null;
_this._parent.removeChild(scene);
};
this._currentScene = scene;
this._parent.addChild(scene);
};
Object.defineProperty(SceneCtrl.prototype, "currentScene", {
get: function () {
return this._currentScene;
},
enumerable: false,
configurable: true
});
SceneCtrl.prototype.destroy = function () {
SceneCtrl._instance = null;
this._currentScene = null;
this._parent = null;
};
return SceneCtrl;
}());
exports.default = SceneCtrl;
/***/ }),
/***/ "./module/ctrls/toastCtrl.ts":
/*!***********************************!*\
!*** ./module/ctrls/toastCtrl.ts ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyToast = exports.showToast = void 0;
var layers_1 = __webpack_require__(/*! ../views/layers */ "./module/views/layers.ts");
var RES_1 = __webpack_require__(/*! ../RES */ "./module/RES.ts");
var inited = false;
var _toast;
var _parent;
var startY;
var endY;
var initToast = function () {
if (!inited) {
inited = true;
_toast = new Toast();
_parent = layers_1.layers.toastLayer;
_toast.alpha = 0;
_toast.x = layers_1.layers.stageOffsetX - _parent.x + (layers_1.layers.stageWidth - _toast.width) / 2;
var h = _toast.height;
var y = layers_1.layers.stageOffsetY - _parent.y;
startY = y - h;
endY = y + (layers_1.layers.stageHeight - h) / 2;
}
};
exports.showToast = function (msg) {
initToast();
_toast.show(msg);
_parent.addChild(_toast);
FYGE.Tween.removeTweens(_toast);
FYGE.Tween.get(_toast)
.set({ y: startY, alpha: 1 })
.to({ y: endY }, 500, FYGE.Ease.quartOut)
.wait(800)
.to({ alpha: 0 }, 300)
.call(function () {
_parent.removeChild(_toast);
});
};
exports.destroyToast = function () {
if (inited && _toast && !_toast.destroyed) {
_toast.destroy();
_toast = null;
_parent = null;
inited = false;
}
};
var Toast = (function (_super) {
__extends(Toast, _super);
function Toast() {
var _this = _super.call(this) || this;
_this.PADDING = 40;
_this.mouseChildren = false;
_this.mouseEnable = false;
var toastBgTexture = RES_1.RES.getRes("toastBg.png");
if (toastBgTexture) {
_this.bg = new FYGE.Sprite(toastBgTexture);
_this.addChild(_this.bg);
}
_this.msg = new FYGE.TextField();
_this.msg.size = 28;
_this.msg.fillColor = "0xffffff";
_this.msg.text = "";
_this.msg.verticalAlign = FYGE.VERTICAL_ALIGN.MIDDLE;
_this.msg.textHeight = toastBgTexture ? toastBgTexture.height : 200;
_this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
_this.addChild(_this.msg);
return _this;
}
Toast.prototype.show = function (msg) {
this.msg.text = msg;
this.msg.x = ((this.bg ? this.bg.width : 0) - this.msg.textWidth) / 2;
};
Toast.prototype.destroy = function () {
_super.prototype.destroy.call(this);
this.msg = null;
this.bg = null;
};
return Toast;
}(FYGE.Container));
/***/ }),
/***/ "./module/ctrls/waitingCtrl.ts":
/*!*************************************!*\
!*** ./module/ctrls/waitingCtrl.ts ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyWaiting = exports.hideWaiting = exports.showWaiting = void 0;
var RES_1 = __webpack_require__(/*! ../RES */ "./module/RES.ts");
var layers_1 = __webpack_require__(/*! ../views/layers */ "./module/views/layers.ts");
var inited = false;
var _waiting;
var _parent;
var initWaiting = function () {
if (!inited) {
inited = true;
var waiting = new Waiting();
_parent = layers_1.layers.topLayer;
_waiting = waiting;
var offX = (layers_1.layers.stageWidth - 160) / 2;
var offY = (layers_1.layers.stageHeight - _waiting.height) / 2;
_waiting.x = layers_1.layers.stageOffsetX - _parent.x + offX;
_waiting.y = layers_1.layers.stageOffsetY - _parent.y + offY;
var bg = new FYGE.Graphics()
.beginFill(0x000000)
.drawRect(-offX, -offY, layers_1.layers.stageWidth, layers_1.layers.stageHeight)
.endFill();
bg.alpha = 0;
_waiting.addChildAt(bg, 0);
}
};
exports.showWaiting = function (msg) {
initWaiting();
_waiting.show(msg);
_parent.addChild(_waiting);
};
exports.hideWaiting = function () {
_parent.removeChild(_waiting);
};
exports.destroyWaiting = function () {
if (inited && _waiting && !_waiting.destroyed) {
_waiting.destroy();
_waiting = null;
_parent = null;
inited = false;
}
};
var Waiting = (function (_super) {
__extends(Waiting, _super);
function Waiting() {
var _this = _super.call(this) || this;
var rectBgTexture = RES_1.RES.getRes("waitingBg.png");
if (rectBgTexture) {
var rectBg = new FYGE.Sprite(rectBgTexture);
_this.addChild(rectBg);
var rotTexture = RES_1.RES.getRes("waitingRot.png");
var rot_1 = new FYGE.Sprite(rotTexture);
rot_1.x = (rectBgTexture.width - rotTexture.width) / 2;
rot_1.y = 47;
rot_1.anchorX = rotTexture.width / 2;
rot_1.anchorY = rotTexture.height / 2;
_this.addChild(rot_1);
var count_1 = 0;
rot_1.addEventListener(FYGE.Event.ENTER_FRAME, function () {
count_1++;
if (count_1 % 30 == 0)
rot_1.rotation += 45;
}, _this);
}
_this.msg = new FYGE.TextField();
_this.msg.y = 125;
_this.msg.textWidth = rectBgTexture ? rectBgTexture.width : 200;
_this.msg.textAlign = FYGE.TEXT_ALIGN.CENTER;
_this.msg.size = 26;
_this.msg.fillColor = "#ffffff";
_this.addChild(_this.msg);
return _this;
}
Waiting.prototype.show = function (msg) {
if (msg === void 0) { msg = "加载中"; }
this.msg.text = msg;
};
Waiting.prototype.destroy = function () {
_super.prototype.destroy.call(this);
this.msg = null;
};
return Waiting;
}(FYGE.Container));
/***/ }),
/***/ "./module/views/Module.ts":
/*!********************************!*\
!*** ./module/views/Module.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Module = void 0;
var RES_1 = __webpack_require__(/*! ../RES */ "./module/RES.ts");
var ctrls_1 = __webpack_require__(/*! ../ctrls */ "./module/ctrls/index.ts");
var Module = (function (_super) {
__extends(Module, _super);
function Module(data) {
var _this = _super.call(this) || this;
_this.data = data;
_this.init();
return _this;
}
Module.prototype.init = function () {
var _this = this;
this.preLoadRes().then(function () {
if (_this.skinName)
RES_1.RES.initSkinDisplay(_this, _this.skinName, _this);
_this.initUi();
_this.onLoaded && _this.onLoaded();
}, function () {
_this.onLoadError && _this.onLoadError();
});
};
Module.prototype.preLoadRes = function () {
var _this = this;
return new Promise(function (resolve, reject) {
if (_this.groupNames && _this.groupNames.length) {
var arr = [];
for (var i = 0; i < _this.groupNames.length; i++) {
arr.push(RES_1.RES.loadGroup(_this.groupNames[i]));
}
Promise.all(arr).then(resolve, reject);
}
else {
resolve();
}
});
};
Module.prototype.initUi = function () {
};
Object.defineProperty(Module.prototype, "groupNames", {
get: function () { return null; },
enumerable: false,
configurable: true
});
Object.defineProperty(Module.prototype, "skinName", {
get: function () { return null; },
enumerable: false,
configurable: true
});
;
Module.prototype.start = function (data) {
this.initEvents();
};
Module.prototype.initEvents = function () {
};
Module.prototype.removeEvents = function () {
};
Module.prototype.enableMouseEvt = function (enable) {
this.mouseEnable = enable;
this.mouseChildren = enable;
};
Module.prototype.btnDelay = function (target, delay) {
if (delay === void 0) { delay = 2000; }
target.mouseEnable = false;
target.mouseChildren = false;
setTimeout(function () {
target.mouseEnable = true;
target.mouseChildren = true;
}, delay);
};
Module.prototype.destroy = function () {
ctrls_1.removeTweens(this);
this.removeEvents();
this.dispatchEvent("onDestroy");
_super.prototype.destroy.call(this);
};
return Module;
}(FYGE.Container));
exports.Module = Module;
/***/ }),
/***/ "./module/views/Scene.ts":
/*!*******************************!*\
!*** ./module/views/Scene.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scene = void 0;
var Module_1 = __webpack_require__(/*! ./Module */ "./module/views/Module.ts");
var Scene = (function (_super) {
__extends(Scene, _super);
function Scene() {
return _super !== null && _super.apply(this, arguments) || this;
}
Scene.prototype.showAni = function (callback) {
callback();
};
Scene.prototype.updateScene = function () {
};
return Scene;
}(Module_1.Module));
exports.Scene = Scene;
/***/ }),
/***/ "./module/views/layers.ts":
/*!********************************!*\
!*** ./module/views/layers.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyLayers = exports.layers = void 0;
var panelCtrl_1 = __webpack_require__(/*! ../ctrls/panelCtrl */ "./module/ctrls/panelCtrl.ts");
var sceneCtrl_1 = __webpack_require__(/*! ../ctrls/sceneCtrl */ "./module/ctrls/sceneCtrl.ts");
var Layers = (function (_super) {
__extends(Layers, _super);
function Layers() {
return _super !== null && _super.apply(this, arguments) || this;
}
Layers.prototype.init = function (stage) {
stage.addChild(this);
var arr = [
"_bottomLayer",
"_sceneLayer",
"_popupLayer",
"_toastLayer",
"_topLayer",
"_shareLayer"
];
for (var i = 0; i < arr.length; i++) {
this[arr[i]] = new FYGE.Container();
this.addChild(this[arr[i]]);
}
this.sceneLayer.y = this.stageOffsetY;
this.shareLayer.y = -this.stageOffsetY;
sceneCtrl_1.default.instance.init(this.sceneLayer);
panelCtrl_1.default.instance.init(this.popupLayer);
};
Object.defineProperty(Layers.prototype, "bottomLayer", {
get: function () { return this._bottomLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "sceneLayer", {
get: function () { return this._sceneLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "popupLayer", {
get: function () { return this._popupLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "toastLayer", {
get: function () { return this._toastLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "topLayer", {
get: function () { return this._topLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "shareLayer", {
get: function () { return this._shareLayer; },
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageHeight", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.height;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageWidth", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.width;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageOffsetX", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.x;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Layers.prototype, "stageOffsetY", {
get: function () {
if (!this.stage)
return 0;
return this.stage.viewRect.y;
},
enumerable: false,
configurable: true
});
return Layers;
}(FYGE.Container));
exports.layers = new Layers();
function destroyLayers() {
exports.layers.removeChildren();
if (exports.layers.parent)
exports.layers.parent.removeChild(exports.layers);
}
exports.destroyLayers = destroyLayers;
/***/ }),
/***/ "./resCanvasList.js":
/*!**************************!*\
!*** ./resCanvasList.js ***!
\**************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
const resCanvasList = {
'4ee17a9c-5deb-43be-b205-16fb7593d172': {
name: 'spark',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/spark.810e94665ad6f7d7684f9b25b764e040a0cce7bf.png',
uuid: '4ee17a9c-5deb-43be-b205-16fb7593d172'
},
'cb54f3b5-0469-46d1-99ea-734153b92078': {
name: 'bg',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/bg.c4359b9ea9e843cd8d929567b2fb52ed5518e105.png',
uuid: 'cb54f3b5-0469-46d1-99ea-734153b92078'
},
'593e9d74-4944-496a-b6c1-8316756f8bf7': {
name: '宝箱2',
ext: '.png',
uuid: '593e9d74-4944-496a-b6c1-8316756f8bf7',
url: '//yun.duiba.com.cn/spark/assets/022e25a3984ff122fbf960bd0cb87bff48f8c3bf.png'
}
};
/* harmony default export */ __webpack_exports__["default"] = (resCanvasList);
/***/ }),
/***/ "./src/Main.ts":
/*!*********************!*\
!*** ./src/Main.ts ***!
\*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Main = exports.GDispatcher = void 0;
var RES_1 = __webpack_require__(/*! ../module/RES */ "./module/RES.ts");
var layers_1 = __webpack_require__(/*! ../module/views/layers */ "./module/views/layers.ts");
var G_EVENT_1 = __webpack_require__(/*! ./common/G_EVENT */ "./src/common/G_EVENT.ts");
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var StartScene_1 = __webpack_require__(/*! ./scenes/StartScene */ "./src/scenes/StartScene.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ./TaoBaoNet */ "./src/TaoBaoNet.ts");
var resCanvasList_1 = __webpack_require__(/*! ../resCanvasList */ "./resCanvasList.js");
var stage_1 = __webpack_require__(/*! ./scenes/stage */ "./src/scenes/stage.ts");
exports.GDispatcher = new FYGE.EventDispatcher();
var Main = (function () {
function Main(canvas) {
var sysInfo;
if (my) {
FYGE.initedByCanvas(canvas);
sysInfo = my.getSystemInfoSync();
}
var stage = new FYGE.Stage(canvas, 750, 1624, sysInfo && sysInfo.windowWidth || document.body.clientWidth, sysInfo && sysInfo.windowHeight || document.body.clientHeight, FYGE.RENDERER_TYPE.CANVAS);
this.stage = stage;
stage_1.setStage(stage);
stage.addEventListener(FYGE.Event.INIT_STAGE, this.onAddToStage, this);
var self = this;
loop();
function loop() {
if (!self._pause) {
FYGE.Tween.flush();
stage.flush();
}
self.requestID = FYGE.getRequestAnimationFrame()(loop);
}
}
Main.prototype.onAddToStage = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
layers_1.layers.init(this.stage);
console.log("初始化层级完成");
return [4, RES_1.RES.loadSparkAssets(resCanvasList_1.default)];
case 1:
_a.sent();
console.log("通用资源加载完成");
ctrls_1.changeScene(StartScene_1.StartScene);
return [2];
}
});
});
};
Main.prototype.run = function () {
this._pause = false;
exports.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.ON_SHOW);
};
Main.prototype.pause = function () {
exports.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.ON_HIDE);
};
Main.prototype.addGlobalEvent = function (name, fun, thisObj, once) {
if (once === void 0) { once = false; }
if (once) {
exports.GDispatcher.once(name, fun, thisObj);
}
else {
exports.GDispatcher.addEventListener(name, fun, thisObj);
}
};
Main.prototype.dispatchGlobalEvent = function (name, data) {
exports.GDispatcher.dispatchEvent(name, data);
};
Main.prototype.removeGlobalEvent = function (name, fun, thisObj) {
exports.GDispatcher.removeEventListener(name, fun, thisObj);
};
Main.prototype.destroy = function () {
FYGE.Tween.removeAllTweens();
FYGE.getCancelAnimationFrame()(this.requestID);
layers_1.destroyLayers();
ctrls_1.destroyAllCtrls();
this.stage.destroy();
exports.GDispatcher.removeAllEventListener();
TaoBaoNet_1.destroyNetData();
};
return Main;
}());
exports.Main = Main;
/***/ }),
/***/ "./src/TaoBaoNet.ts":
/*!**************************!*\
!*** ./src/TaoBaoNet.ts ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.destroyNetData = exports.getTbData = exports.sendTbNet = exports.TbNetName = void 0;
var ctrls_1 = __webpack_require__(/*! ../module/ctrls */ "./module/ctrls/index.ts");
var Main_1 = __webpack_require__(/*! ./Main */ "./src/Main.ts");
var TbNetName;
(function (TbNetName) {
TbNetName["trackingReport"] = "squirrelsAdoptRest2c.trackingReport";
TbNetName["getIndex"] = "babycare.getIndex";
TbNetName["getActivityBaseInfoById"] = "babycare.getActivityBaseInfoById";
TbNetName["getGameInfo"] = "babycare.getGameInfo";
TbNetName["consumerTools"] = "babycare.consumerTools";
TbNetName["gameOver"] = "babycare.gameOver";
TbNetName["receiveTaskRewards"] = "babycare.receiveTaskRewards";
TbNetName["exchange"] = "babycare.exchange";
TbNetName["getPrizesByLevel"] = "babycare.getPrizesByLevel";
TbNetName["queryCredits"] = "babycare.queryCredits";
TbNetName["dojoin"] = "babycare.dojoin";
TbNetName["completeTask"] = "babycare.completeTask";
TbNetName["getTaskList"] = "babycare.getTaskList";
TbNetName["authorize"] = "mine.authorize";
TbNetName["favorShop"] = "mine.favorShop";
TbNetName["getUserAddress"] = "mine.getUserAddress";
TbNetName["getAdoptName"] = "mine.getAdoptName";
TbNetName["getAppData"] = "mine.getAppData";
TbNetName["navigateToOutside"] = "mine.navigateToOutside";
TbNetName["navigateTo"] = "mine.navigateTo";
TbNetName["navigateBack"] = "mine.navigateBack";
TbNetName["showSharePanel"] = "mine.showSharePanel";
TbNetName["openDetail"] = "mine.openDetail";
TbNetName["reportAnalytics"] = "mine.reportAnalytics";
})(TbNetName = exports.TbNetName || (exports.TbNetName = {}));
var dataRecord = {};
var fc;
function sendTbNet(netName, parameter, callback, hideMsg) {
if (hideMsg === void 0) { hideMsg = false; }
return new Promise(function (resolve, reject) {
var waitObj;
if (!my) {
var url = "../../mock/miniTb/" + netName + ".json";
fetchAsync(url)
.then(function (data) {
dataRecord[netName] = data;
if (!hideMsg && !data.success)
ctrls_1.showToast(data.message || "网络异常");
callback && callback(data.success, data);
resolve(data);
console.log("\n%c[ mock ]\n"
+ ("NAME : " + netName + " \n")
+ "STATE : %o \n"
+ "PARAM : %o \n"
+ "%cDATA : %o \n", "" + (data.success ? 'color:green' : 'color:red'), data.success, parameter, "" + (data.success ? 'color:green' : 'color:red'), data);
}, function () {
});
return;
}
var fun = function (e) {
ctrls_1.clearWait(waitObj);
Main_1.GDispatcher.removeEventListener(netName, fun);
var d = e.data;
dataRecord[netName] = d;
if (!hideMsg && !d.success)
ctrls_1.showToast(d.message || "网络超时");
callback && callback(d.success, d);
resolve(d);
console.log("\n%c[ request ]\n"
+ ("NAME : " + netName + " \n")
+ "STATE : %o \n"
+ "PARAM : %o \n"
+ "%cDATA : %o \n", "" + (d.success ? 'color:green' : 'color:red'), d.success, parameter, "" + (d.success ? 'color:green' : 'color:red'), d);
};
Main_1.GDispatcher.addEventListener(netName, fun);
waitObj = ctrls_1.wait(function () {
if (netName != TbNetName.favorShop &&
netName != TbNetName.getUserAddress &&
netName != TbNetName.authorize &&
netName != TbNetName.getAdoptName &&
netName != TbNetName.trackingReport &&
netName != TbNetName.reportAnalytics) {
fun({ type: netName, data: { success: false } });
}
}, 10000);
Main_1.GDispatcher.dispatchEvent({ type: "onMessage" }, { netName: netName, parameter: parameter });
});
}
exports.sendTbNet = sendTbNet;
function getTbData(netName) {
return dataRecord[netName] || null;
}
exports.getTbData = getTbData;
function destroyNetData() {
dataRecord = {};
}
exports.destroyNetData = destroyNetData;
function fetchAsync(url) {
return __awaiter(this, void 0, void 0, function () {
var response, data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, fetch(url)];
case 1:
response = _a.sent();
return [4, response.json()];
case 2:
data = _a.sent();
return [2, data];
}
});
});
}
var codeMsg = {
"210001": "服务器异常",
"210002": "用户不存在",
"210003": "邀请已达上限",
"210004": "无法邀请自己",
"210006": "该活动ID无效",
"210009": "该活动暂未开始",
"210010": "该分享ID不存在",
"210012": "该用户暂未获奖",
"210013": "领取失败",
"210015": "该活动已删除",
"210016": "该活动已经结束",
"210017": "该奖品已达领取上线",
"210018": "请先分享好友",
"210019": "暂有奖品未领取",
"210020": "暂有奖品未完成",
"210021": "请先玩一局游戏",
"210022": "请先选择奖品",
"210023": "领取失败,库存不足",
"210024": "请先成为会员",
"210025": "奖品已经过期",
"210026": "不能重复助力",
"210028": "请至我的奖品页重新领取",
};
/***/ }),
/***/ "./src/common/G_EVENT.ts":
/*!*******************************!*\
!*** ./src/common/G_EVENT.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.G_EVENT = void 0;
var G_EVENT;
(function (G_EVENT) {
G_EVENT["ON_SHOW"] = "onShow";
G_EVENT["ON_HIDE"] = "onHide";
G_EVENT["UPDATE_TASK"] = "UpdateTask";
})(G_EVENT = exports.G_EVENT || (exports.G_EVENT = {}));
/***/ }),
/***/ "./src/scenes/DropItem.ts":
/*!********************************!*\
!*** ./src/scenes/DropItem.ts ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var DropItem = (function (_super) {
__extends(DropItem, _super);
function DropItem() {
var _this = _super.call(this) || this;
_this.texture = RES_1.RES.getRes(resCanvasList_1.default["593e9d74-4944-496a-b6c1-8316756f8bf7"].url);
_this.y = 0;
return _this;
}
DropItem.prototype.updatePosition = function () {
this.y += 10;
};
return DropItem;
}(FYGE.Sprite));
exports.default = DropItem;
/***/ }),
/***/ "./src/scenes/DropsCtrl.ts":
/*!*********************************!*\
!*** ./src/scenes/DropsCtrl.ts ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var stage_1 = __webpack_require__(/*! ./stage */ "./src/scenes/stage.ts");
var DropItem_1 = __webpack_require__(/*! ./DropItem */ "./src/scenes/DropItem.ts");
var DropsCtrl = (function () {
function DropsCtrl(root) {
this._root = root;
}
DropsCtrl.prototype.start = function () {
var _this = this;
stage_1.getStage().addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
for (var index = 0; index < 10; index++) {
setTimeout(function () {
_this.addDropItem();
}, 1000 * index);
}
};
DropsCtrl.prototype.addDropItem = function () {
this._drops = this._drops || [];
var drop = new DropItem_1.default();
this._root.addChild(drop);
drop.x = Math.random() * 400 + (750 - 400) / 2;
this._drops.push(drop);
};
DropsCtrl.prototype.onEnterFrame = function () {
if (this._drops)
this._drops.forEach(function (drop) { return drop.updatePosition(); });
};
DropsCtrl.prototype.destroy = function () {
stage_1.getStage().removeEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this);
};
return DropsCtrl;
}());
exports.default = DropsCtrl;
/***/ }),
/***/ "./src/scenes/Root.ts":
/*!****************************!*\
!*** ./src/scenes/Root.ts ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var DropsCtrl_1 = __webpack_require__(/*! ./DropsCtrl */ "./src/scenes/DropsCtrl.ts");
var Root = (function (_super) {
__extends(Root, _super);
function Root() {
var _this = _super.call(this) || this;
_this.once(FYGE.Event.ADDED_TO_STAGE, _this.onAddToStage, _this);
var bg = new FYGE.Sprite();
bg.x = 0;
bg.y = 0;
bg.texture = RES_1.RES.getRes(resCanvasList_1.default["cb54f3b5-0469-46d1-99ea-734153b92078"].url);
_this.addChild(bg);
console.log('fuck');
var ctrl = new DropsCtrl_1.default(_this);
ctrl.start();
return _this;
}
Root.prototype.onAddToStage = function () {
this.y = this.stage.viewRect.height / 2 - 1624 / 2;
};
return Root;
}(FYGE.Container));
exports.default = Root;
/***/ }),
/***/ "./src/scenes/StartScene.ts":
/*!**********************************!*\
!*** ./src/scenes/StartScene.ts ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.StartScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts");
var Root_1 = __webpack_require__(/*! ./Root */ "./src/scenes/Root.ts");
var StartScene = (function (_super) {
__extends(StartScene, _super);
function StartScene() {
return _super !== null && _super.apply(this, arguments) || this;
}
StartScene.prototype.initUi = function () {
_super.prototype.initUi.call(this);
var canvas = new FYGE.Container();
canvas.position.set(0, 0);
this.addChild(canvas);
};
StartScene.prototype.start = function () {
this.addChild(new Root_1.default());
};
return StartScene;
}(Scene_1.Scene));
exports.StartScene = StartScene;
/***/ }),
/***/ "./src/scenes/stage.ts":
/*!*****************************!*\
!*** ./src/scenes/stage.ts ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setStage = exports.getStage = void 0;
var _stage;
exports.getStage = function () { return _stage; };
exports.setStage = function (stage) {
_stage = stage;
};
/***/ })
/******/ });
});
//# sourceMappingURL=output.js.map
\ No newline at end of file
const resList = [
{
"name": "首页背景",
"ext": ".png",
"uuid": "3b3fc1da-24cc-486f-b4e8-9c709a75a999",
"url": "//yun.duiba.com.cn/spark/assets/df25ad82a96a406892ce239a2d5306debb947573.png"
},
{
"name": "one5",
"ext": ".png",
"uuid": "4c4f7e8f-fa2a-497b-ba96-14edb86f5651",
"url": "//yun.duiba.com.cn/spark/assets/4318da348b0444a64e74c641757b5372a1e34818.png"
},
{
"name": "zero5",
"ext": ".png",
"uuid": "858ff99a-c23f-4370-ac8a-d33607ea1e24",
"url": "//yun.duiba.com.cn/spark/assets/3b18448ebd9d18a18cdb0a7f3d8df89eea899c99.png"
},
{
"name": "bg5",
"ext": ".png",
"uuid": "b396aa87-69ce-483f-a903-e73af9d8a3a3",
"url": "//yun.duiba.com.cn/spark/assets/a43e6fa535f6fbc4d2e0ae08b6d259974a432f89.png"
},
{
"name": "one4",
"ext": ".png",
"uuid": "f53cfacc-068a-40d3-9de1-5438ffd8d43b",
"url": "//yun.duiba.com.cn/spark/assets/9077a33d2be2be7c622c9495bec250d034e98f87.png"
},
{
"name": "zero4",
"ext": ".png",
"uuid": "b0095834-59b6-4b49-93aa-88853b1ffdc2",
"url": "//yun.duiba.com.cn/spark/assets/2ae5c222d33792d3381f270221e6e8e825be741c.png"
},
{
"name": "bg4",
"ext": ".png",
"uuid": "aa5a04f1-ec78-4281-b189-208665ccd0c7",
"url": "//yun.duiba.com.cn/spark/assets/64a89157fd4457dfd83ad7ed656580eec59a96e1.png"
},
{
"name": "one3",
"ext": ".png",
"uuid": "3230d506-e914-4636-b11f-55f4064b4e02",
"url": "//yun.duiba.com.cn/spark/assets/d2643ae6e513b0cee10754d1f3dc2ee81b955019.png"
},
{
"name": "zero3",
"ext": ".png",
"uuid": "dd525255-e0a2-4bc1-a618-dbe509e90c83",
"url": "//yun.duiba.com.cn/spark/assets/471e2ccb36b1ccecd8361864ba8dcb1593b65597.png"
},
{
"name": "bg3",
"ext": ".png",
"uuid": "65d20d84-d74a-4ea8-a034-561446d773a4",
"url": "//yun.duiba.com.cn/spark/assets/326d3813ffeb46830514eec42e085add03e9cfcf.png"
},
{
"name": "one2",
"ext": ".png",
"uuid": "33e52b25-fc70-4472-8d00-39322ff53b14",
"url": "//yun.duiba.com.cn/spark/assets/f8cdbf36715b918aa75058887e964baddbbeb018.png"
},
{
"name": "zero2",
"ext": ".png",
"uuid": "d1eb7462-d729-4914-85d2-0d8350c75122",
"url": "//yun.duiba.com.cn/spark/assets/4d63516e9dc3b90bf5e96fe364cb8483458bfa75.png"
},
{
"name": "one1",
"ext": ".png",
"uuid": "ee65da42-9e27-443d-a192-d57eaa9c5e00",
"url": "//yun.duiba.com.cn/spark/assets/930ce9edc446d8730fd92479997e18f222983b3a.png"
},
{
"name": "zero1",
"ext": ".png",
"uuid": "6abcdace-fbf5-4e9a-a979-c003a3deae22",
"url": "//yun.duiba.com.cn/spark/assets/75559ed55f33fd1a22cfc7a1fc92a0a18edb8e5d.png"
},
{
"name": "bg1",
"ext": ".png",
"uuid": "f4d81213-1c64-4566-88e9-f0ede1c2396a",
"url": "//yun.duiba.com.cn/spark/assets/6b272bb4ef573a1468fce7ba14e9448347626d9f.png"
},
{
"name": "one",
"ext": ".png",
"uuid": "1ed0359b-b671-45b4-b2df-d8fcbeb12c78",
"url": "//yun.duiba.com.cn/spark/assets/bb71f76ba835514b85ed90c100f11b12b497fbe8.png"
},
{
"name": "zero",
"ext": ".png",
"uuid": "55707441-1e3a-4248-9e3b-2190f2b3d8eb",
"url": "//yun.duiba.com.cn/spark/assets/e6e8e7f29647f06d11b6a36395ac9053c89c7e1b.png"
},
{
"name": "bg",
"ext": ".png",
"uuid": "b76ff9aa-a410-4b12-b5e3-54aace0d2023",
"url": "//yun.duiba.com.cn/spark/assets/64db901ccc969ec061daca3566ad99d9f5b2e459.png"
},
{
"name": "召唤按钮 ",
"ext": ".png",
"uuid": "e0ac998f-f006-4b6d-abd9-d1c075ab975f",
"url": "//yun.duiba.com.cn/spark/assets/f57fadc1de5bfe126d044856c3ffef64206ae6e3.png"
},
{
"name": "召唤按钮-置灰",
"ext": ".png",
"uuid": "1348f382-511a-494c-a1ac-4e86e1877e6e",
"url": "//yun.duiba.com.cn/spark/assets/6df546392479e37233a4a3be3ff5b0edc6d487de.png"
},
{
"name": "助力明细按钮",
"ext": ".png",
"uuid": "0f40c63e-891a-4742-9a94-8061b29780f3",
"url": "//yun.duiba.com.cn/spark/assets/0e805d05cda2bca6d52344c024f62afeb1454040.png"
},
{
"name": "翻牌按钮",
"ext": ".png",
"uuid": "de107f35-fdfd-4ded-9766-e1eb2c8ca233",
"url": "//yun.duiba.com.cn/spark/assets/f149033b3a3f863425e9366f43a2bb086d435360.png"
},
{
"name": "牌",
"ext": ".png",
"uuid": "e072ea7e-6ccf-4762-9cc5-dad17dc6d5b7",
"url": "//yun.duiba.com.cn/spark/assets/873c74bf810623ff6b430de7f6ff2e15eb5b99e2.png"
},
{
"name": "翻",
"ext": ".png",
"uuid": "0226ab0f-6966-41c5-8e0d-eb90b2713cbb",
"url": "//yun.duiba.com.cn/spark/assets/50526768eeba39c808f4d05e61222ace41680f16.png"
},
{
"name": "请",
"ext": ".png",
"uuid": "0fa69229-54da-48b4-a49c-763c3f9d0bdb",
"url": "//yun.duiba.com.cn/spark/assets/5c735b72a10cbb89f056d2a98f4bed35ed11c8ed.png"
},
{
"name": "活动规则",
"ext": ".png",
"uuid": "0afdec46-69ad-4c95-83e7-cddae6f28f18",
"url": "//yun.duiba.com.cn/spark/assets/818b7cdbee52bf992ddfa274cf575c78875aa6a7.png"
},
{
"name": "奖品",
"ext": ".png",
"uuid": "8c3f9e66-6abe-4450-ad2e-f188a2236259",
"url": "//yun.duiba.com.cn/spark/assets/544aabca1336bd77ad243f81641a386c39f35757.png"
},
{
"name": "背景",
"ext": ".png",
"uuid": "cee6f836-ddbe-4ede-ab7b-3e9bec6fb07f",
"url": "//yun.duiba.com.cn/spark/assets/eb106be9a6e9940bc006fc040fdf6f495d121292.png"
},
{
"name": "邀请按钮10",
"ext": ".png",
"uuid": "4678fa12-0f31-40d7-84bb-89f323755faa",
"url": "//yun.duiba.com.cn/spark/assets/38ce6f82a9fc0522c51eef42590401340dc88368.png"
},
{
"name": "集齐书卡背景",
"ext": ".png",
"uuid": "061a32b5-a936-49c7-bf07-c6c6c086498b",
"url": "//yun.duiba.com.cn/spark/assets/38b92aad5f576993f2aa1fba5cc473d943d91bc7.png"
},
{
"name": "领取按钮",
"ext": ".png",
"uuid": "fd51b4e8-cd67-4ab2-a8dd-8470d7fda03b",
"url": "//yun.duiba.com.cn/spark/assets/de208daba893341ef41bcdda80e568fdb1275595.png"
},
{
"name": "关闭按钮",
"ext": ".png",
"uuid": "20429695-3be2-41d8-9640-d2dbc2ecf910",
"url": "//yun.duiba.com.cn/spark/assets/dfa06672b5ec93397ff9fdccf04b48850d668923.png"
},
{
"name": "被抢光背景",
"ext": ".png",
"uuid": "2b070729-c537-4b7a-a0b6-f1d539db36b9",
"url": "//yun.duiba.com.cn/spark/assets/091e5bdd4d8fb5646680b92c0f4938832ee49344.png"
},
{
"name": "知道按钮2",
"ext": ".png",
"uuid": "495892fb-4858-43f2-bc2e-6e9fe3ed892d",
"url": "//yun.duiba.com.cn/spark/assets/987ce1d4060d1ced715e9f044995d789a133ee9f.png"
},
{
"name": "继续按钮4",
"ext": ".png",
"uuid": "da32c6e4-03bf-476b-a70d-e576f10b473f",
"url": "//yun.duiba.com.cn/spark/assets/a937c15b1de3bec520368a4286f75e9d2163033d.png"
},
{
"name": "卡片背景",
"ext": ".png",
"uuid": "78eb8f94-aed7-4e8d-81d1-5d5cf18c1fb4",
"url": "//yun.duiba.com.cn/spark/assets/e2499de2fa72ef7b0f816524b3d39ac26369dc8d.png"
},
{
"name": "继续按钮3",
"ext": ".png",
"uuid": "60b0d023-0d6e-431e-b0c4-58cb29e53aa8",
"url": "//yun.duiba.com.cn/spark/assets/2d02fc74a7203c93d00dd99688fad0d9e3c84e57.png"
},
{
"name": "助力成功背景",
"ext": ".png",
"uuid": "260d0ac9-d53d-4eae-ab36-a3ecaaf8713a",
"url": "//yun.duiba.com.cn/spark/assets/2f5c62c415ced58212b46030aa446c19647f008a.png"
},
{
"name": "继续按钮2",
"ext": ".png",
"uuid": "6913c81e-4d4a-4300-8e46-a4a302f44c87",
"url": "//yun.duiba.com.cn/spark/assets/eccdf602166756d4b93f2f4a0b65e5e9c7dff1ef.png"
},
{
"name": "很遗憾背景",
"ext": ".png",
"uuid": "c401735f-d64e-464b-b23c-c927ce263d2e",
"url": "//yun.duiba.com.cn/spark/assets/2061d2c0fbbe5010de86f7524dfdc7cd59100850.png"
},
{
"name": "次数用完背景",
"ext": ".png",
"uuid": "86a3ec85-7492-40be-9305-65f90cb1651a",
"url": "//yun.duiba.com.cn/spark/assets/8e7b856b8c369dee7485abecc6a6833d3700d957.png"
},
{
"name": "邀请按钮",
"ext": ".png",
"uuid": "d2e82b07-ddab-4e2a-8d63-26eabd6bc960",
"url": "//yun.duiba.com.cn/spark/assets/29c7477b0a74115ddd5a2f4e45139c90301e2a32.png"
},
{
"name": "静态",
"ext": ".png",
"uuid": "61e345d9-f6ba-49e3-9df9-62cf04a5f10a",
"url": "//yun.duiba.com.cn/spark/assets/e2519d3f0a711d8309cc81cc239131679a39b261.png"
},
{
"name": "知道按钮",
"ext": ".png",
"uuid": "7de15c0a-a245-460f-8967-aaa786e9dccb",
"url": "//yun.duiba.com.cn/spark/assets/2b57d4ecda2faa12228dfcddfd74bc2482e09369.png"
},
{
"name": "端外助力背景",
"ext": ".png",
"uuid": "bb3fa187-b99e-4a03-9431-615e54544c46",
"url": "//yun.duiba.com.cn/spark/assets/c0ed60c826b537e236d33c53a0702971cf97b648.png"
},
{
"name": "帮他助力按钮",
"ext": ".png",
"uuid": "ac60a8a5-ab2d-4cbc-9fa4-15e764af991f",
"url": "//yun.duiba.com.cn/spark/assets/86cdb9b7e1ffa4ed5d382490042473beb3d8c5ce.png"
},
{
"name": "立即参与按钮",
"ext": ".png",
"uuid": "2a667012-b77d-44c1-aa48-da82a70b2216",
"url": "//yun.duiba.com.cn/spark/assets/5e35ad651cda5da5a32f19c3364a44853c721a03.png"
},
{
"name": "底部",
"ext": ".png",
"uuid": "4dd0bfac-44e0-480c-8456-73f0d96be646",
"url": "//yun.duiba.com.cn/spark/assets/5e3f91601c7e2eac408987627287fe18d6624bc9.png"
},
{
"name": "端内助力背景",
"ext": ".png",
"uuid": "d7ff77ed-0522-4f2b-b7e0-457d64ae2dbe",
"url": "//yun.duiba.com.cn/spark/assets/1565acc5feb57050c9893618924de67d2b12b12c.png"
},
{
"name": "助力榜",
"ext": ".png",
"uuid": "7084c2ab-1522-440f-9661-9d2f6a09abda",
"url": "//yun.duiba.com.cn/spark/assets/7e07d3f8b159d6ae22c6f5db383a3a195e1c820b.png"
},
{
"name": "活动规则背景",
"ext": ".png",
"uuid": "5a07c20f-e527-49a1-8e52-e8da89b0bba6",
"url": "//yun.duiba.com.cn/spark/assets/c84c98ea19084446dfb3580db37a480e06399998.png"
}
]
export default resList;
{
"groups": [
{
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"name": "common",
"atlas": {
"comCloseBtn.png": {
"x": 646,
"y": 60,
"w": 48,
"h": 48,
"ox": 0,
"oy": 0,
"sw": 48,
"sh": 48,
"ro": false
},
"toastBg.png": {
"x": 184,
"y": 2,
"w": 460,
"h": 130,
"ox": 0,
"oy": 0,
"sw": 460,
"sh": 130,
"ro": false
},
"waitingBg.png": {
"x": 2,
"y": 2,
"w": 160,
"h": 180,
"ox": 0,
"oy": 0,
"sw": 160,
"sh": 180,
"ro": true
},
"waitingRot.png": {
"x": 646,
"y": 2,
"w": 56,
"h": 56,
"ox": 0,
"oy": 0,
"sw": 56,
"sh": 56,
"ro": false
}
}
},
{
"keys": "map_bg1.jpg",
"name": "startScene"
}
],
"path": "./resource/"
}
\ No newline at end of file
......@@ -6,7 +6,8 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var endPath = 'D:/duibaGame/淘宝项目/babycareXiaoxiaoleTBminiTry/client/pages/index/';
var endPath = '/Users/wanghongyuan/new_taobao/project/src/pages/pagecanvas/';
var version = Math.round(new Date().getTime() / 1000);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js"));
......
const merge = require('webpack-merge');
console.log('merge',merge)
const common = require('./webpack.common.js');
const webpack = require('webpack');
const MockWebpackPlugin = require('mock-webpack-plugin');
......
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