Commit baa75fdb authored by wildfirecode13's avatar wildfirecode13

1

parent a1c9e0bf
...@@ -1509,146 +1509,6 @@ var G_EVENT; ...@@ -1509,146 +1509,6 @@ var G_EVENT;
})(G_EVENT = exports.G_EVENT || (exports.G_EVENT = {})); })(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":
...@@ -1676,7 +1536,6 @@ var __extends = (this && this.__extends) || (function () { ...@@ -1676,7 +1536,6 @@ var __extends = (this && this.__extends) || (function () {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.StartScene = void 0; exports.StartScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts"); 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) { var StartScene = (function (_super) {
__extends(StartScene, _super); __extends(StartScene, _super);
function StartScene() { function StartScene() {
...@@ -1689,7 +1548,11 @@ var StartScene = (function (_super) { ...@@ -1689,7 +1548,11 @@ var StartScene = (function (_super) {
this.addChild(canvas); this.addChild(canvas);
}; };
StartScene.prototype.start = function () { StartScene.prototype.start = function () {
this.addChild(new Root_1.default()); var sp = new FYGE.Graphics;
sp.beginFill(0xff0000, 1);
sp.drawRect(0, 0, 100, 100);
sp.endFill();
this.addChild(sp);
}; };
return StartScene; return StartScene;
}(Scene_1.Scene)); }(Scene_1.Scene));
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1510,146 +1510,6 @@ var G_EVENT; ...@@ -1510,146 +1510,6 @@ var G_EVENT;
})(G_EVENT = exports.G_EVENT || (exports.G_EVENT = {})); })(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":
...@@ -1677,7 +1537,6 @@ var __extends = (this && this.__extends) || (function () { ...@@ -1677,7 +1537,6 @@ var __extends = (this && this.__extends) || (function () {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.StartScene = void 0; exports.StartScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts"); 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) { var StartScene = (function (_super) {
__extends(StartScene, _super); __extends(StartScene, _super);
function StartScene() { function StartScene() {
...@@ -1690,7 +1549,11 @@ var StartScene = (function (_super) { ...@@ -1690,7 +1549,11 @@ var StartScene = (function (_super) {
this.addChild(canvas); this.addChild(canvas);
}; };
StartScene.prototype.start = function () { StartScene.prototype.start = function () {
this.addChild(new Root_1.default()); var sp = new FYGE.Graphics;
sp.beginFill(0xff0000, 1);
sp.drawRect(0, 0, 100, 100);
sp.endFill();
this.addChild(sp);
}; };
return StartScene; return StartScene;
}(Scene_1.Scene)); }(Scene_1.Scene));
......
...@@ -6,7 +6,9 @@ var fs = require("fs"); ...@@ -6,7 +6,9 @@ var fs = require("fs");
// fs.readFileSync("./output.js") // fs.readFileSync("./output.js")
// ) // )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/'; // var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var endPath = '/Users/wanghongyuan/hello_canvas/project/src/pages/pagecanvas/'; // var endPath = '/Users/wanghongyuan/hello_canvas/project/src/pages/pagecanvas/';
var endPath = '/Users/wanghongyuan/hello_canvas/taobao_mini/client/pages/pagecanvas/';
var version = Math.round(new Date().getTime() / 1000); var version = Math.round(new Date().getTime() / 1000);
// fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js")); // fs.writeFileSync(endPath + "output." + version + ".js", fs.readFileSync("./released/output.js"));
fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js")); fs.writeFileSync(endPath + "output.js", fs.readFileSync("./released/output.js"));
......
...@@ -55,5 +55,5 @@ export const ResJson = { ...@@ -55,5 +55,5 @@ export const ResJson = {
"name": "startScene" "name": "startScene"
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1600243346/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1600656850/resource/"
} }
\ No newline at end of file
...@@ -11,6 +11,11 @@ export class StartScene extends Scene { ...@@ -11,6 +11,11 @@ export class StartScene extends Scene {
} }
start() { start() {
this.addChild(new Root()); // this.addChild(new Root());
const sp = new FYGE.Graphics;
sp.beginFill(0xff0000,1);
sp.drawRect(0,0,100,100);
sp.endFill();
this.addChild(sp)
} }
} }
...@@ -1510,146 +1510,6 @@ var G_EVENT; ...@@ -1510,146 +1510,6 @@ var G_EVENT;
})(G_EVENT = exports.G_EVENT || (exports.G_EVENT = {})); })(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":
...@@ -1677,7 +1537,6 @@ var __extends = (this && this.__extends) || (function () { ...@@ -1677,7 +1537,6 @@ var __extends = (this && this.__extends) || (function () {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.StartScene = void 0; exports.StartScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts"); 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) { var StartScene = (function (_super) {
__extends(StartScene, _super); __extends(StartScene, _super);
function StartScene() { function StartScene() {
...@@ -1690,7 +1549,11 @@ var StartScene = (function (_super) { ...@@ -1690,7 +1549,11 @@ var StartScene = (function (_super) {
this.addChild(canvas); this.addChild(canvas);
}; };
StartScene.prototype.start = function () { StartScene.prototype.start = function () {
this.addChild(new Root_1.default()); var sp = new FYGE.Graphics;
sp.beginFill(0xff0000, 1);
sp.drawRect(0, 0, 100, 100);
sp.endFill();
this.addChild(sp);
}; };
return StartScene; return StartScene;
}(Scene_1.Scene)); }(Scene_1.Scene));
......
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