Commit 177a5a79 authored by rockyl's avatar rockyl

整理

parent 2df0ebcc
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="engine.js"></script>
<script src="test1.js"></script>
</body>
</html>
\ No newline at end of file
'use strict';
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var Test1 = (function (_super) {
__extends(Test1, _super);
function Test1() {
var _this = _super.call(this) || this;
var rect = new engine.Rect();
rect.width = 100;
rect.height = 100;
_this.addChild(rect);
return _this;
}
return Test1;
}(engine.Container));
function index (options) {
var instance = new Test1();
return instance;
}
module.exports = index;
{"version":3,"file":"test1.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/custom/test1/Test1.ts","../../src/custom/test1/index.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * Created by rockyl on 2019-11-22.\n */\n\nexport class Test1 extends engine.Container{\n\tconstructor(){\n\t\tsuper();\n\n\t\tlet rect = new engine.Rect();\n\t\trect.width = 100;\n\t\trect.height = 100;\n\t\tthis.addChild(rect);\n\t}\n}\n","/**\n * Created by rockyl on 2019-11-20.\n */\n\nimport {Test1} from \"./Test1\";\n\nexport default function(options){\n\tlet instance = new Test1();\n\n\treturn instance;\n}\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;AAgBA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IAC/B,aAAa,GAAG,MAAM,CAAC,cAAc;SAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;QAC5E,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9B,CAAC;;AAEF,AAAO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;IAC5B,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;IACvC,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;CACxF;;ACvBD;IAA2B,yBAAgB;IAC1C;QAAA,YACC,iBAAO,SAMP;QAJA,IAAI,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QAClB,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;;KACpB;IACF,YAAC;CAAA,CAT0B,MAAM,CAAC,SAAS,GAS1C;;gBCPuB,OAAO;IAC9B,IAAI,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;IAE3B,OAAO,QAAQ,CAAC;CAChB;;;;"}
\ No newline at end of file
{
"name": "Test1",
"props": {},
"assets": [
{
"url": "//yun.duiba.com.cn/aurora/af90069732223c75818c4799b3130bd0f0ad4ff8.png",
"ext": ".png"
}
],
"id": "test1",
"code": "'use strict';\n\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\nvar Test1 = (function (_super) {\n __extends(Test1, _super);\n function Test1() {\n var _this = _super.call(this) || this;\n var rect = new engine.Rect();\n rect.width = 100;\n rect.height = 100;\n _this.addChild(rect);\n return _this;\n }\n return Test1;\n}(engine.Container));\n\nfunction index (options) {\n var instance = new Test1();\n return instance;\n}\n\nmodule.exports = index;\n"
}
{
"name": "添加自定义模块",
"desc": "添加自定义模块",
"props": {
"id": {
"alias": "模块ID",
"type": "string"
},
"target": {
"type": "node",
"alias": "目标节点"
}
},
"output": [
"complete"
],
"id": "add-custom-module",
"script": "engine.addCustomModule(props.id, props.target || target);\nnext('complete');\n",
"group": "view",
"type": "builtin"
}
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"complete" "complete"
], ],
"id": "push-dialog", "id": "push-dialog",
"script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\n var gameStage = engine.gameStage;\n var viewConfig = gameStage.getViewConfigByName(props.viewName);\n if (viewConfig) {\n var view = engine.instantiate(viewConfig);\n gameStage.popupContainer.push(view, { center: props.center });\n }\n else {\n console.error('view config not exists');\n }\n next('complete');\n}\n", "script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\n var gameStage = engine.gameStage;\n var view = gameStage.instantiateView(props.viewName);\n if (view) {\n gameStage.popupContainer.push(view);\n }\n next('complete');\n}\n",
"group": "view", "group": "view",
"type": "builtin" "type": "builtin"
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"complete" "complete"
], ],
"id": "push-scene", "id": "push-scene",
"script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\n var gameStage = engine.gameStage;\n var viewConfig = gameStage.getViewConfigByName(props.viewName);\n if (viewConfig) {\n var view = engine.instantiate(viewConfig);\n gameStage.sceneContainer.push(view);\n }\n else {\n console.error('view config not exists');\n }\n next('complete');\n}\n", "script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\n var gameStage = engine.gameStage;\n var view = gameStage.instantiateView(props.viewName);\n if (view) {\n gameStage.sceneContainer.push(view);\n }\n next('complete');\n}\n",
"group": "view", "group": "view",
"type": "builtin" "type": "builtin"
} }
...@@ -30,7 +30,6 @@ function fill(src) { ...@@ -30,7 +30,6 @@ function fill(src) {
for (var key in engine.env) { for (var key in engine.env) {
result = result.replace(key, engine.env[key]); result = result.replace(key, engine.env[key]);
} }
console.log(result);
return result; return result;
} }
function log(type, data) { function log(type, data) {
......
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
} }
}, },
"id": "buried-point", "id": "buried-point",
"code": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BuriedPoint = (function (_super) {\n __extends(BuriedPoint, _super);\n function BuriedPoint() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dpm = '0.0.0.0';\n _this.dcm = '0.0.0.0';\n _this.dom = '0.0.0.0';\n return _this;\n }\n BuriedPoint.prototype.mounted = function () {\n this.dpm && fill(this.dpm);\n this.dcm && fill(this.dcm);\n this.dom && fill(this.dom);\n this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);\n };\n BuriedPoint.prototype.awake = function () {\n log('exposure', this);\n };\n BuriedPoint.prototype._onClick = function (e) {\n log('click', this);\n };\n BuriedPoint.id = 'buried-point';\n return BuriedPoint;\n}(engine.ScriptBase));\nexports.default = BuriedPoint;\nfunction fill(src) {\n var result = src;\n for (var key in engine.env) {\n result = result.replace(key, engine.env[key]);\n }\n console.log(result);\n return result;\n}\nfunction log(type, data) {\n var dpm = data.dpm, dcm = data.dcm, dom = data.dom;\n var params = {\n dpm: dpm, dcm: dcm, appID: engine.env.appID, projectID: engine.env.projectID\n };\n if (dom !== '0.0.0.0') {\n params.dom = dom;\n }\n var isExposure = type === 'exposure';\n engine.httpRequest(null, isExposure ? '//embedlog.duiba.com.cn/exposure/standard' : '/log/click', 'get', params, isExposure ? 'jsonp' : 'text');\n}\n" "code": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BuriedPoint = (function (_super) {\n __extends(BuriedPoint, _super);\n function BuriedPoint() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dpm = '0.0.0.0';\n _this.dcm = '0.0.0.0';\n _this.dom = '0.0.0.0';\n return _this;\n }\n BuriedPoint.prototype.mounted = function () {\n this.dpm && fill(this.dpm);\n this.dcm && fill(this.dcm);\n this.dom && fill(this.dom);\n this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);\n };\n BuriedPoint.prototype.awake = function () {\n log('exposure', this);\n };\n BuriedPoint.prototype._onClick = function (e) {\n log('click', this);\n };\n BuriedPoint.id = 'buried-point';\n return BuriedPoint;\n}(engine.ScriptBase));\nexports.default = BuriedPoint;\nfunction fill(src) {\n var result = src;\n for (var key in engine.env) {\n result = result.replace(key, engine.env[key]);\n }\n return result;\n}\nfunction log(type, data) {\n var dpm = data.dpm, dcm = data.dcm, dom = data.dom;\n var params = {\n dpm: dpm, dcm: dcm, appID: engine.env.appID, projectID: engine.env.projectID\n };\n if (dom !== '0.0.0.0') {\n params.dom = dom;\n }\n var isExposure = type === 'exposure';\n engine.httpRequest(null, isExposure ? '//embedlog.duiba.com.cn/exposure/standard' : '/log/click', 'get', params, isExposure ? 'jsonp' : 'text');\n}\n"
} }
declare const args: any; declare const args: any;
declare const props: any; declare const props: any;
declare const target: engine.Container; declare const target: engine.Container;
...@@ -7,93 +6,95 @@ declare const vm: engine.VM; ...@@ -7,93 +6,95 @@ declare const vm: engine.VM;
declare function next(type: string, payload?: any); declare function next(type: string, payload?: any);
declare module engine{ declare module engine {
export const VERSION = "1.0"; export const VERSION = "1.0";
export function addCustomModule(id, container: Container, options?): Container;
export const devicePixelRatio: number; export const devicePixelRatio: number;
export let StageScaleMode: { export let StageScaleMode: {
EXACT_FIT: string; EXACT_FIT: string;
NO_BORDER: string; NO_BORDER: string;
NO_SCALE: string; NO_SCALE: string;
SHOW_ALL: string; SHOW_ALL: string;
FIXED_WIDTH: string; FIXED_WIDTH: string;
FIXED_HEIGHT: string; FIXED_HEIGHT: string;
} }
export const osType: string; export const osType: string;
export function cos(angle: number): number; export function cos(angle: number): number;
export function sin(angle: number): number; export function sin(angle: number): number;
export const PI_2: number; export const PI_2: number;
export const RAD_TO_DEG: number; export const RAD_TO_DEG: number;
export const DEG_TO_RAD: number; export const DEG_TO_RAD: number;
export enum RENDERER_TYPE { export enum RENDERER_TYPE {
UNKNOWN = 0, UNKNOWN = 0,
WEBGL = 1, WEBGL = 1,
CANVAS = 2 CANVAS = 2
} }
export enum SHAPES { export enum SHAPES {
POLY = 0, POLY = 0,
RECT = 1, RECT = 1,
CIRC = 2, CIRC = 2,
ELIP = 3, ELIP = 3,
RREC = 4 RREC = 4
} }
export enum PRECISION { export enum PRECISION {
LOW = "lowp", LOW = "lowp",
MEDIUM = "mediump", MEDIUM = "mediump",
HIGH = "highp" HIGH = "highp"
} }
export enum TEXT_GRADIENT { export enum TEXT_GRADIENT {
LINEAR_VERTICAL = 0, LINEAR_VERTICAL = 0,
LINEAR_HORIZONTAL = 1 LINEAR_HORIZONTAL = 1
} }
export enum TEXT_ALIGN { export enum TEXT_ALIGN {
CENTER = "center", CENTER = "center",
LEFT = "left", LEFT = "left",
RIGHT = "right" RIGHT = "right"
} }
export enum VERTICAL_ALIGN { export enum VERTICAL_ALIGN {
MIDDLE = "middle", MIDDLE = "middle",
UP = "up", UP = "up",
DOWN = "down" DOWN = "down"
} }
export enum TEXT_lINETYPE { export enum TEXT_lINETYPE {
SINGLE = "single", SINGLE = "single",
MULTI = "multi" MULTI = "multi"
} }
export enum LINE_ALIGNMENT { export enum LINE_ALIGNMENT {
middle = 0.5, middle = 0.5,
outter = 1, outter = 1,
inner = 0 inner = 0
} }
export enum LINE_CAP { export enum LINE_CAP {
BUTT = "butt", BUTT = "butt",
ROUND = "round", ROUND = "round",
SQUARE = "square" SQUARE = "square"
} }
export enum LINE_JOIN { export enum LINE_JOIN {
MITER = "miter", MITER = "miter",
ROUND = "round", ROUND = "round",
BEVEL = "bevel" BEVEL = "bevel"
} }
export enum BLEND_MODES { export enum BLEND_MODES {
NORMAL = 0, NORMAL = 0,
ADD = 1, ADD = 1,
MULTIPLY = 2, MULTIPLY = 2,
...@@ -114,9 +115,9 @@ export enum BLEND_MODES { ...@@ -114,9 +115,9 @@ export enum BLEND_MODES {
NORMAL_NPM = 17, NORMAL_NPM = 17,
ADD_NPM = 18, ADD_NPM = 18,
SCREEN_NPM = 19 SCREEN_NPM = 19
} }
export enum DRAW_MODES { export enum DRAW_MODES {
POINTS = 0, POINTS = 0,
LINES = 1, LINES = 1,
LINE_LOOP = 2, LINE_LOOP = 2,
...@@ -124,63 +125,89 @@ export enum DRAW_MODES { ...@@ -124,63 +125,89 @@ export enum DRAW_MODES {
TRIANGLES = 4, TRIANGLES = 4,
TRIANGLE_STRIP = 5, TRIANGLE_STRIP = 5,
TRIANGLE_FAN = 6 TRIANGLE_FAN = 6
} }
export enum SCALE_MODES { export enum SCALE_MODES {
LINEAR = 0, LINEAR = 0,
NEAREST = 1 NEAREST = 1
} }
export enum WRAP_MODES { export enum WRAP_MODES {
CLAMP = 33071, CLAMP = 33071,
REPEAT = 10497, REPEAT = 10497,
MIRRORED_REPEAT = 33648 MIRRORED_REPEAT = 33648
} }
export enum GC_MODES { export enum GC_MODES {
AUTO = 0, AUTO = 0,
MANUAL = 1 MANUAL = 1
} }
export const URL_FILE_EXTENSION: any; export const URL_FILE_EXTENSION: any;
export const DATA_URI: any; export const DATA_URI: any;
export class Container extends DisplayObject { export class Container extends DisplayObject {
mouseChildren: boolean; mouseChildren: boolean;
children: any[]; children: any[];
containerUpdateTransform: any; containerUpdateTransform: any;
constructor(); constructor();
afterConstructor(): void; afterConstructor(): void;
onChildrenChange(index: any): void; onChildrenChange(index: any): void;
addChild(child: DisplayObject): DisplayObject; addChild(child: DisplayObject): DisplayObject;
addChildAt(child: DisplayObject, index: number): DisplayObject; addChildAt(child: DisplayObject, index: number): DisplayObject;
swapChildren(child1: DisplayObject, child2: DisplayObject): boolean; swapChildren(child1: DisplayObject, child2: DisplayObject): boolean;
getChildIndex(child: DisplayObject): number; getChildIndex(child: DisplayObject): number;
setChildIndex(child: DisplayObject, index: number): void; setChildIndex(child: DisplayObject, index: number): void;
getChildAt(index: number): DisplayObject; getChildAt(index: number): DisplayObject;
getChildByName(name: string | RegExp, isOnlyOne?: boolean, isRecursive?: boolean): any; getChildByName(name: string | RegExp, isOnlyOne?: boolean, isRecursive?: boolean): any;
removeChild(child: DisplayObject): DisplayObject; removeChild(child: DisplayObject): DisplayObject;
removeChildAt(index: number): DisplayObject; removeChildAt(index: number): DisplayObject;
removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]; removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[];
updateTransform(): void; updateTransform(): void;
calculateBounds(): void; calculateBounds(): void;
protected _calculateBounds(): void; protected _calculateBounds(): void;
hitTestPoint(globalPoint: Point, isMouseEvent?: boolean): any; hitTestPoint(globalPoint: Point, isMouseEvent?: boolean): any;
renderWebGL(renderer: WebglRenderer): void; renderWebGL(renderer: WebglRenderer): void;
private renderAdvancedWebGL; private renderAdvancedWebGL;
protected _renderWebGL(renderer: WebglRenderer): void; protected _renderWebGL(renderer: WebglRenderer): void;
renderCanvas(renderer: CanvasRenderer): void; renderCanvas(renderer: CanvasRenderer): void;
protected _renderCanvas(renderer: CanvasRenderer): void; protected _renderCanvas(renderer: CanvasRenderer): void;
update(deltaTime: number): void; update(deltaTime: number): void;
_onDispatchBubbledEvent(type: string): void; _onDispatchBubbledEvent(type: string): void;
destroy(): void; destroy(): void;
width: number; width: number;
height: number; height: number;
private static _getElementsByName; private static _getElementsByName;
} }
export class DisplayObject extends EventDispatcher { export class DisplayObject extends EventDispatcher {
transform: Transform; transform: Transform;
visible: boolean; visible: boolean;
renderable: boolean; renderable: boolean;
...@@ -201,28 +228,46 @@ export class DisplayObject extends EventDispatcher { ...@@ -201,28 +228,46 @@ export class DisplayObject extends EventDispatcher {
displayObjectHitTestPoint: any; displayObjectHitTestPoint: any;
protected _width: number; protected _width: number;
protected _height: number; protected _height: number;
constructor(); constructor();
private readonly _tempDisplayObjectParent; private readonly _tempDisplayObjectParent;
updateTransform(): void; updateTransform(): void;
static _bp: Point; static _bp: Point;
static _p1: Point; static _p1: Point;
static _p2: Point; static _p2: Point;
static _p3: Point; static _p3: Point;
static _p4: Point; static _p4: Point;
static temBounds: Rectangle; static temBounds: Rectangle;
hitTestPoint(point: Point, isMouseEvent?: boolean): DisplayObject; hitTestPoint(point: Point, isMouseEvent?: boolean): DisplayObject;
private _recursivePostUpdateTransform; private _recursivePostUpdateTransform;
getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle; getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle;
getLocalBounds(rect?: Rectangle): Rectangle; getLocalBounds(rect?: Rectangle): Rectangle;
calculateBounds(): void; calculateBounds(): void;
globalToLocal(point: Point, bp?: Point): Point; globalToLocal(point: Point, bp?: Point): Point;
localToGlobal(point: Point, bp?: Point): Point; localToGlobal(point: Point, bp?: Point): Point;
_onDispatchBubbledEvent(type: string): void; _onDispatchBubbledEvent(type: string): void;
renderWebGL(renderer: any): void; renderWebGL(renderer: any): void;
renderCanvas(renderer: any): void; renderCanvas(renderer: any): void;
setParent(container: any): any; setParent(container: any): any;
setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, anchorX?: number, anchorY?: number): DisplayObject; setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, anchorX?: number, anchorY?: number): DisplayObject;
destroy(): void; destroy(): void;
alpha: number; alpha: number;
x: number; x: number;
y: number; y: number;
...@@ -241,21 +286,27 @@ export class DisplayObject extends EventDispatcher { ...@@ -241,21 +286,27 @@ export class DisplayObject extends EventDispatcher {
mask: Graphics; mask: Graphics;
width: number; width: number;
height: number; height: number;
update(deltaTime: number): void; update(deltaTime: number): void;
} }
export class FloatDisplay extends DisplayObject { export class FloatDisplay extends DisplayObject {
htmlElement: any; htmlElement: any;
private _isAdded; private _isAdded;
private _transformID; private _transformID;
constructor(); constructor();
init(htmlElement: any): void; init(htmlElement: any): void;
private getStyle; private getStyle;
updateStyle(): void; updateStyle(): void;
destroy(): void; destroy(): void;
} }
export class Sprite extends Container { export class Sprite extends Container {
private _anchorTexture; private _anchorTexture;
_texture: Texture; _texture: Texture;
_width: number; _width: number;
...@@ -270,31 +321,48 @@ export class Sprite extends Container { ...@@ -270,31 +321,48 @@ export class Sprite extends Container {
uvs: Float32Array; uvs: Float32Array;
vertexData: Float32Array; vertexData: Float32Array;
vertexTrimmedData: Float32Array; vertexTrimmedData: Float32Array;
constructor(texture?: Texture); constructor(texture?: Texture);
_onTextureUpdate(): void; _onTextureUpdate(): void;
_onAnchorUpdate(): void; _onAnchorUpdate(): void;
calculateVertices(): void; calculateVertices(): void;
calculateTrimmedVertices(): void; calculateTrimmedVertices(): void;
_renderWebGL(renderer: WebglRenderer): void; _renderWebGL(renderer: WebglRenderer): void;
_renderCanvas(renderer: CanvasRenderer): void; _renderCanvas(renderer: CanvasRenderer): void;
_calculateBounds(): void; _calculateBounds(): void;
getLocalBounds(rect?: Rectangle): Rectangle; getLocalBounds(rect?: Rectangle): Rectangle;
hitTestPoint(globalPoint: Point, isMouseEvent?: boolean): any; hitTestPoint(globalPoint: Point, isMouseEvent?: boolean): any;
destroy(): void; destroy(): void;
anchorTexture: any; anchorTexture: any;
texture: Texture; texture: Texture;
static from(source: any): Sprite; static from(source: any): Sprite;
static fromFrame(frameId: string): Sprite; static fromFrame(frameId: string): Sprite;
static fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite; static fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite;
} }
export class Stage extends Container { export class Stage extends Container {
iosTouchendPreventDefault: boolean; iosTouchendPreventDefault: boolean;
isPreventDefaultEvent: boolean; isPreventDefaultEvent: boolean;
rootDiv: any; rootDiv: any;
renderObj: SystemRenderer; renderObj: SystemRenderer;
renderType: number; renderType: number;
static getStage(stageName?: string): Stage; static getStage(stageName?: string): Stage;
private static _stageList; private static _stageList;
static pause: boolean; static pause: boolean;
private static _pause; private static _pause;
...@@ -316,33 +384,49 @@ export class Stage extends Container { ...@@ -316,33 +384,49 @@ export class Stage extends Container {
private _lastDpList; private _lastDpList;
private _rid; private _rid;
private _floatDisplayList; private _floatDisplayList;
constructor(rootDivId?: string, desW?: number, desH?: number, frameRate?: number, scaleMode?: string, renderType?: number, transparent?: boolean, bgColor?: number); constructor(rootDivId?: string, desW?: number, desH?: number, frameRate?: number, scaleMode?: string, renderType?: number, transparent?: boolean, bgColor?: number);
render(): void; render(): void;
private _ml; private _ml;
private _mp; private _mp;
private _initMouseEvent; private _initMouseEvent;
private _mouseDownPoint; private _mouseDownPoint;
flush(): void; flush(): void;
setFrameRate(fps: number): void; setFrameRate(fps: number): void;
getFrameRate(): number; getFrameRate(): number;
getRootDivWH(div: HTMLDivElement): { getRootDivWH(div: HTMLDivElement): {
w: number; w: number;
h: number; h: number;
}; };
kill(): void; kill(): void;
private _mouseEventTypes; private _mouseEventTypes;
private onMouseEvent; private onMouseEvent;
private setAlign; private setAlign;
resize(): void; resize(): void;
getBounds(): Rectangle; getBounds(): Rectangle;
private static allUpdateObjList; private static allUpdateObjList;
static flushAll(): void; static flushAll(): void;
static addUpdateObj(target: any): void; static addUpdateObj(target: any): void;
static removeUpdateObj(target: any): void; static removeUpdateObj(target: any): void;
destroy(): void; destroy(): void;
} }
export class Event extends HashObject { export class Event extends HashObject {
static RESIZE: string; static RESIZE: string;
static ON_SCROLL_TO_HEAD: string; static ON_SCROLL_TO_HEAD: string;
static ON_SCROLL_STOP: string; static ON_SCROLL_STOP: string;
...@@ -364,42 +448,62 @@ export class Event extends HashObject { ...@@ -364,42 +448,62 @@ export class Event extends HashObject {
type: string; type: string;
target: any; target: any;
data: any; data: any;
constructor(type: string); constructor(type: string);
stopImmediatePropagation(): void; stopImmediatePropagation(): void;
stopPropagation(): void; stopPropagation(): void;
private _bpd; private _bpd;
private _pd; private _pd;
destroy(): void; destroy(): void;
reset(type: string, target: any): void; reset(type: string, target: any): void;
} }
export class EventDispatcher extends HashObject { export class EventDispatcher extends HashObject {
protected eventTypes: any; protected eventTypes: any;
protected eventTypes1: any; protected eventTypes1: any;
constructor(); constructor();
private static _MECO; private static _MECO;
static _totalMEC: number; static _totalMEC: number;
static getMouseEventCount(type?: string): number; static getMouseEventCount(type?: string): number;
addEventListener(type: string, listener: Function, context?: any, useCapture?: boolean): void; addEventListener(type: string, listener: Function, context?: any, useCapture?: boolean): void;
once(type: string, listener: Function, context?: any, useCapture?: boolean): void; once(type: string, listener: Function, context?: any, useCapture?: boolean): void;
private _changeMouseCount; private _changeMouseCount;
private _defaultEvent; private _defaultEvent;
dispatchEvent(event: any, data?: any, useCapture?: boolean): boolean; dispatchEvent(event: any, data?: any, useCapture?: boolean): boolean;
hasEventListener(type: string, useCapture?: boolean): boolean; hasEventListener(type: string, useCapture?: boolean): boolean;
removeEventListener(type: string, listener: Function, context?: any, useCapture?: boolean): void; removeEventListener(type: string, listener: Function, context?: any, useCapture?: boolean): void;
removeAllEventListener(): void; removeAllEventListener(): void;
destroy(): void; destroy(): void;
} }
export class GDispatcher { export class GDispatcher {
private static callbackPool; private static callbackPool;
private static thisObjPool; private static thisObjPool;
static addEvent(name: string, callback: any, thisObj: any): void; static addEvent(name: string, callback: any, thisObj: any): void;
static removeEvent(name: string, callback: any, thisObj?: any): void; static removeEvent(name: string, callback: any, thisObj?: any): void;
static dispatchEvent(name: string, ...args: any[]): void; static dispatchEvent(name: string, ...args: any[]): void;
} }
export class MouseEvent extends Event { export class MouseEvent extends Event {
static MOUSE_DOWN: string; static MOUSE_DOWN: string;
static MOUSE_UP: string; static MOUSE_UP: string;
static CLICK: string; static CLICK: string;
...@@ -414,34 +518,37 @@ export class MouseEvent extends Event { ...@@ -414,34 +518,37 @@ export class MouseEvent extends Event {
localY: number; localY: number;
currentTarget: DisplayObject; currentTarget: DisplayObject;
identifier: any; identifier: any;
constructor(type: string); constructor(type: string);
updateAfterEvent(): void; updateAfterEvent(): void;
destroy(): void; destroy(): void;
} }
export const _default: { export const _default: {
build(graphicsData: GraphicsData): void; build(graphicsData: GraphicsData): void;
triangulate(graphicsData: any, graphicsGeometry: Graphics): void; triangulate(graphicsData: any, graphicsGeometry: Graphics): void;
} }
export const _default: { export const _default: {
build(graphicsData: GraphicsData): void; build(graphicsData: GraphicsData): void;
triangulate(graphicsData: GraphicsData, graphicsGeometry: Graphics): void; triangulate(graphicsData: GraphicsData, graphicsGeometry: Graphics): void;
} }
export const _default: { export const _default: {
build(graphicsData: GraphicsData): void; build(graphicsData: GraphicsData): void;
triangulate(graphicsData: GraphicsData, graphics: Graphics): void; triangulate(graphicsData: GraphicsData, graphics: Graphics): void;
} }
export const _default: { export const _default: {
build(graphicsData: GraphicsData): void; build(graphicsData: GraphicsData): void;
triangulate(graphicsData: GraphicsData, graphicsGeometry: Graphics): void; triangulate(graphicsData: GraphicsData, graphicsGeometry: Graphics): void;
} }
export function earcut(data: any, holeIndices: any, dim: any): any[]; export function earcut(data: any, holeIndices: any, dim: any): any[];
export class Graphics extends Container { export class Graphics extends Container {
private _fillStyle; private _fillStyle;
private _lineStyle; private _lineStyle;
readonly fill: FillStyle; readonly fill: FillStyle;
...@@ -474,52 +581,89 @@ export class Graphics extends Container { ...@@ -474,52 +581,89 @@ export class Graphics extends Container {
private vertexData; private vertexData;
private shapeIndex; private shapeIndex;
private _transformID; private _transformID;
constructor(); constructor();
clone(): Graphics; clone(): Graphics;
lineStyle(lineWidth?: number, color?: number, alpha?: number, alignment?: number, native?: boolean): Graphics; lineStyle(lineWidth?: number, color?: number, alpha?: number, alignment?: number, native?: boolean): Graphics;
lineTextureStyle(width?: number, texture?: Texture, color?: number, alpha?: number, matrix?: any, alignment?: number, native?: boolean): this; lineTextureStyle(width?: number, texture?: Texture, color?: number, alpha?: number, matrix?: any, alignment?: number, native?: boolean): this;
private startPoly; private startPoly;
private finishPoly; private finishPoly;
moveTo(x: number, y: number): Graphics; moveTo(x: number, y: number): Graphics;
lineTo(x: number, y: number): Graphics; lineTo(x: number, y: number): Graphics;
private _initCurve; private _initCurve;
quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): Graphics; quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): Graphics;
bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): Graphics; bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): Graphics;
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics;
arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): Graphics; arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): Graphics;
beginFill(color?: number | string, alpha?: number): Graphics; beginFill(color?: number | string, alpha?: number): Graphics;
beginTextureFill(texture?: Texture, color?: number, alpha?: number, matrix?: Matrix): this; beginTextureFill(texture?: Texture, color?: number, alpha?: number, matrix?: Matrix): this;
endFill(): Graphics; endFill(): Graphics;
closePath(): Graphics; closePath(): Graphics;
beginHole(): this; beginHole(): this;
endHole(): this; endHole(): this;
drawRect(x: number, y: number, width: number, height: number): Graphics; drawRect(x: number, y: number, width: number, height: number): Graphics;
drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): Graphics; drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): Graphics;
drawCircle(x: number, y: number, radius: number): Graphics; drawCircle(x: number, y: number, radius: number): Graphics;
drawEllipse(x: number, y: number, width: number, height: number): Graphics; drawEllipse(x: number, y: number, width: number, height: number): Graphics;
drawPolygon(path: number[] | Point[] | Polygon): Graphics; drawPolygon(path: number[] | Point[] | Polygon): Graphics;
drawStar(x: number, y: number, points: number, radius: number, innerRadius: number, rotation?: number): Graphics; drawStar(x: number, y: number, points: number, radius: number, innerRadius: number, rotation?: number): Graphics;
private drawShape; private drawShape;
clear(): Graphics; clear(): Graphics;
isFastRect(): boolean; isFastRect(): boolean;
_renderWebGL(renderer: WebglRenderer): void; _renderWebGL(renderer: WebglRenderer): void;
private updateBatch; private updateBatch;
private calculateTints; private calculateTints;
private calculateVertices; private calculateVertices;
private transformPoints; private transformPoints;
_renderCanvas(renderer: CanvasRenderer): void; _renderCanvas(renderer: CanvasRenderer): void;
_calculateBounds(): void; _calculateBounds(): void;
hitTestPoint(point: Point, isMouseEvent?: boolean): DisplayObject; hitTestPoint(point: Point, isMouseEvent?: boolean): DisplayObject;
private hitTestPointAccuratly; private hitTestPointAccuratly;
updateLocalBoundsSelf(): void; updateLocalBoundsSelf(): void;
private generateCanvasTexture; private generateCanvasTexture;
destroy(): void; destroy(): void;
private proccessHoles; private proccessHoles;
private addUvs; private addUvs;
private adjustUvs; private adjustUvs;
} }
export class GraphicsData extends HashObject { export class GraphicsData extends HashObject {
fillStyle: FillStyle; fillStyle: FillStyle;
lineStyle: LineStyle; lineStyle: LineStyle;
matrix: Matrix; matrix: Matrix;
...@@ -527,161 +671,230 @@ export class GraphicsData extends HashObject { ...@@ -527,161 +671,230 @@ export class GraphicsData extends HashObject {
shape: any; shape: any;
type: number; type: number;
points: number[]; points: number[];
constructor(shape: Circle | Rectangle | Ellipse | Polygon | RoundedRectangle, fillStyle?: FillStyle, lineStyle?: LineStyle, matrix?: Matrix); constructor(shape: Circle | Rectangle | Ellipse | Polygon | RoundedRectangle, fillStyle?: FillStyle, lineStyle?: LineStyle, matrix?: Matrix);
clone(): GraphicsData; clone(): GraphicsData;
destroy(): void; destroy(): void;
} }
export class Shape extends Sprite { export class Shape extends Sprite {
canvas: HTMLCanvasElement; canvas: HTMLCanvasElement;
context: CanvasRenderingContext2D; context: CanvasRenderingContext2D;
dirty: boolean; dirty: boolean;
offsetX: number; offsetX: number;
offsetY: number; offsetY: number;
constructor(); constructor();
private _command; private _command;
private _isBitmapStroke; private _isBitmapStroke;
private _isBitmapFill; private _isBitmapFill;
hitTestByPixel: boolean; hitTestByPixel: boolean;
drawRoundRect(x: number, y: number, w: number, h: number, rTL?: number, rTR?: number, rBL?: number, rBR?: number): void; drawRoundRect(x: number, y: number, w: number, h: number, rTL?: number, rTR?: number, rBL?: number, rBR?: number): void;
moveTo(x: number, y: number): void; moveTo(x: number, y: number): void;
lineTo(x: number, y: number): void; lineTo(x: number, y: number): void;
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
quadraticCurveTo(cpX: number, cpY: number, x: number, y: number): void; quadraticCurveTo(cpX: number, cpY: number, x: number, y: number): void;
bezierCurveTo(cp1X: number, cp1Y: number, cp2X: number, cp2Y: number, x: number, y: number): void; bezierCurveTo(cp1X: number, cp1Y: number, cp2X: number, cp2Y: number, x: number, y: number): void;
closePath(): void; closePath(): void;
drawRect(x: number, y: number, w: number, h: number): void; drawRect(x: number, y: number, w: number, h: number): void;
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
drawCircle(x: number, y: number, radius: number, counterclockwise?: boolean): void; drawCircle(x: number, y: number, radius: number, counterclockwise?: boolean): void;
drawEllipse(x: number, y: number, w: number, h: number): void; drawEllipse(x: number, y: number, w: number, h: number): void;
clear(): void; clear(): void;
beginFill(color: number, alpha?: number): void; beginFill(color: number, alpha?: number): void;
beginLinearGradientFill(points: any, colors: any): void; beginLinearGradientFill(points: any, colors: any): void;
beginRadialGradientFill: (points: any, colors: any) => void; beginRadialGradientFill: (points: any, colors: any) => void;
beginBitmapFill(image: any, matrix: Array<number>): void; beginBitmapFill(image: any, matrix: Array<number>): void;
private _fill; private _fill;
beginStroke(color: number, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number, alpha?: number): void; beginStroke(color: number, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number, alpha?: number): void;
beginLinearGradientStroke(points: Array<number>, colors: any, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number): void; beginLinearGradientStroke(points: Array<number>, colors: any, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number): void;
beginRadialGradientStroke(points: Array<number>, colors: any, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number): void; beginRadialGradientStroke(points: Array<number>, colors: any, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number): void;
beginBitmapStroke(image: any, matrix: Array<number>, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number): void; beginBitmapStroke(image: any, matrix: Array<number>, lineWidth?: number, cap?: LINE_CAP, join?: LINE_JOIN, miter?: number): void;
private _stroke; private _stroke;
endFill(): void; endFill(): void;
endStroke(): void; endStroke(): void;
updateShape(): void; updateShape(): void;
private _drawShape; private _drawShape;
hitTestPoint(globalPoint: Point, isMouseEvent?: boolean): DisplayObject; hitTestPoint(globalPoint: Point, isMouseEvent?: boolean): DisplayObject;
changeColor(infoObj: any): void; changeColor(infoObj: any): void;
updateTexture(): void; updateTexture(): void;
_renderCanvas(renderer: any): void; _renderCanvas(renderer: any): void;
_renderWebGL(renderer: any): void; _renderWebGL(renderer: any): void;
destroy(): void; destroy(): void;
} }
export class Circle { export class Circle {
x: number; x: number;
y: number; y: number;
radius: number; radius: number;
type: number; type: number;
constructor(x?: number, y?: number, radius?: number); constructor(x?: number, y?: number, radius?: number);
clone(): Circle; clone(): Circle;
isPointIn(point: Point): boolean; isPointIn(point: Point): boolean;
getBounds(): Rectangle; getBounds(): Rectangle;
} }
export class Ellipse { export class Ellipse {
x: number; x: number;
y: number; y: number;
width: number; width: number;
height: number; height: number;
type: number; type: number;
constructor(x?: number, y?: number, width?: number, height?: number); constructor(x?: number, y?: number, width?: number, height?: number);
clone(): Ellipse; clone(): Ellipse;
isPointIn(point: Point): boolean; isPointIn(point: Point): boolean;
getBounds(): Rectangle; getBounds(): Rectangle;
} }
export class Polygon { export class Polygon {
closed: boolean; closed: boolean;
points: number[]; points: number[];
type: number; type: number;
constructor(...points: any[]); constructor(...points: any[]);
clone(): Polygon; clone(): Polygon;
close(): void; close(): void;
isPointIn(point: Point): boolean; isPointIn(point: Point): boolean;
} }
export class RoundedRectangle { export class RoundedRectangle {
x: number; x: number;
y: number; y: number;
width: number; width: number;
height: number; height: number;
radius: number; radius: number;
type: number; type: number;
constructor(x?: number, y?: number, width?: number, height?: number, radius?: number); constructor(x?: number, y?: number, width?: number, height?: number, radius?: number);
clone(): RoundedRectangle; clone(): RoundedRectangle;
isPointIn(point: Point): boolean; isPointIn(point: Point): boolean;
} }
export class FillStyle { export class FillStyle {
color: number; color: number;
alpha: number; alpha: number;
texture: Texture; texture: Texture;
matrix: Matrix; matrix: Matrix;
visible: boolean; visible: boolean;
alphaBlock: boolean; alphaBlock: boolean;
constructor(); constructor();
clone(): FillStyle; clone(): FillStyle;
reset(): void; reset(): void;
destroy(): void; destroy(): void;
} }
export class LineStyle extends FillStyle { export class LineStyle extends FillStyle {
native: boolean; native: boolean;
width: number; width: number;
alignment: LINE_ALIGNMENT; alignment: LINE_ALIGNMENT;
clone(): LineStyle; clone(): LineStyle;
reset(): void; reset(): void;
} }
export function bezierCurveControlPoint(points: any): { export function bezierCurveControlPoint(points: any): {
A: any[]; A: any[];
B: any[]; B: any[];
} }
export const GRAPHICS_CURVES: { export const GRAPHICS_CURVES: {
adaptive: boolean; adaptive: boolean;
maxLength: number; maxLength: number;
minSegments: number; minSegments: number;
maxSegments: number; maxSegments: number;
segmentsCount: Function; segmentsCount: Function;
} }
export abstract class HashObject { export abstract class HashObject {
protected _instanceId: number; protected _instanceId: number;
protected _instanceType: string; protected _instanceType: string;
protected static _object_id: number; protected static _object_id: number;
constructor(); constructor();
readonly instanceId: number; readonly instanceId: number;
readonly instanceType: string; readonly instanceType: string;
abstract destroy(): void; abstract destroy(): void;
} }
export class Loader extends EventDispatcher { export class Loader extends EventDispatcher {
caches: {}; caches: {};
_req: XMLHttpRequest; _req: XMLHttpRequest;
constructor(); constructor();
loadSheet(callback: Function, url: string): void; loadSheet(callback: Function, url: string): void;
loadRaw(callback: Function, url: string, type: 'text' | 'json'): void; loadRaw(callback: Function, url: string, type: 'text' | 'json'): void;
loadJson(callback: Function, url: string): void; loadJson(callback: Function, url: string): void;
loadText(callback: Function, url: string): void; loadText(callback: Function, url: string): void;
loadTexture(callback: Function, url: string): void; loadTexture(callback: Function, url: string): void;
loadImage(callback: Function, url: string, crossOrigin?: boolean): HTMLImageElement; loadImage(callback: Function, url: string, crossOrigin?: boolean): HTMLImageElement;
cache(name: string, data: any): void; cache(name: string, data: any): void;
} }
export const globalLoader: Loader; export const globalLoader: Loader;
export const GroupD8: { export const GroupD8: {
E: number; E: number;
SE: number; SE: number;
S: number; S: number;
...@@ -703,9 +916,9 @@ export const GroupD8: { ...@@ -703,9 +916,9 @@ export const GroupD8: {
isVertical: (rotation: any) => boolean; isVertical: (rotation: any) => boolean;
byDirection: (dx: any, dy: any) => number; byDirection: (dx: any, dy: any) => number;
matrixAppendRotationInv: (matrix: any, rotation: any, tx?: number, ty?: number) => void; matrixAppendRotationInv: (matrix: any, rotation: any, tx?: number, ty?: number) => void;
} }
export class Matrix extends HashObject { export class Matrix extends HashObject {
a: number; a: number;
b: number; b: number;
c: number; c: number;
...@@ -713,58 +926,93 @@ export class Matrix extends HashObject { ...@@ -713,58 +926,93 @@ export class Matrix extends HashObject {
tx: number; tx: number;
ty: number; ty: number;
array: any; array: any;
constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number); constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
clone(): Matrix; clone(): Matrix;
copy(matrix: Matrix | any): this; copy(matrix: Matrix | any): this;
transformPoint(x: number, y: number, bp?: Point): Point; transformPoint(x: number, y: number, bp?: Point): Point;
transformPointInverse(x: number, y: number, bp?: Point): Point; transformPointInverse(x: number, y: number, bp?: Point): Point;
setFrom(mtx: Matrix): void; setFrom(mtx: Matrix): void;
identity(): void; identity(): void;
invert(): Matrix; invert(): Matrix;
createBox(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, ax: number, ay: number): void; createBox(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, ax: number, ay: number): void;
prepend: (mtx: Matrix) => void; prepend: (mtx: Matrix) => void;
append(matrix: Matrix): void; append(matrix: Matrix): void;
static isEqual(m1: Matrix, m2: Matrix): boolean; static isEqual(m1: Matrix, m2: Matrix): boolean;
concat(mtx: Matrix): void; concat(mtx: Matrix): void;
rotate(angle: number): void; rotate(angle: number): void;
scale(sx: number, sy: number): void; scale(sx: number, sy: number): void;
translate(dx: number, dy: number): void; translate(dx: number, dy: number): void;
set(a: any, b: any, c: any, d: any, tx: any, ty: any): this; set(a: any, b: any, c: any, d: any, tx: any, ty: any): this;
getRotation(): number; getRotation(): number;
toArray(transpose?: boolean, out?: any): any; toArray(transpose?: boolean, out?: any): any;
static readonly IDENTITY: Matrix; static readonly IDENTITY: Matrix;
static readonly TEMP_MATRIX: Matrix; static readonly TEMP_MATRIX: Matrix;
destroy(): void; destroy(): void;
} }
export class ObservablePoint extends HashObject { export class ObservablePoint extends HashObject {
_x: number; _x: number;
_y: number; _y: number;
cb: any; cb: any;
scope: any; scope: any;
constructor(cb: Function, scope: any, x?: number, y?: number); constructor(cb: Function, scope: any, x?: number, y?: number);
set(x?: number, y?: number): void; set(x?: number, y?: number): void;
copy(point: Point | ObservablePoint): void; copy(point: Point | ObservablePoint): void;
x: number; x: number;
y: number; y: number;
destroy(): void; destroy(): void;
} }
export class Point extends HashObject { export class Point extends HashObject {
destroy(): void; destroy(): void;
constructor(x?: number, y?: number); constructor(x?: number, y?: number);
x: number; x: number;
y: number; y: number;
static distance(...args: any[]): number; static distance(...args: any[]): number;
set(x: number, y: number): void; set(x: number, y: number): void;
} }
export class Rectangle extends HashObject { export class Rectangle extends HashObject {
type: number; type: number;
constructor(x?: number, y?: number, width?: number, height?: number); constructor(x?: number, y?: number, width?: number, height?: number);
clear(): void; clear(): void;
copy(rect: Rectangle): this; copy(rect: Rectangle): this;
clone(): Rectangle; clone(): Rectangle;
x: number; x: number;
y: number; y: number;
width: number; width: number;
...@@ -773,17 +1021,25 @@ export class Rectangle extends HashObject { ...@@ -773,17 +1021,25 @@ export class Rectangle extends HashObject {
readonly right: number; readonly right: number;
readonly top: number; readonly top: number;
readonly bottom: number; readonly bottom: number;
isPointIn(point: Point): boolean; isPointIn(point: Point): boolean;
fit(rectangle: Rectangle): void; fit(rectangle: Rectangle): void;
static createFromRects(...arg: Rectangle[]): Rectangle; static createFromRects(...arg: Rectangle[]): Rectangle;
static createFromPoints(rect: Rectangle, ...arg: Point[]): Rectangle; static createFromPoints(rect: Rectangle, ...arg: Point[]): Rectangle;
static createFromVertexData(rect: Rectangle, vertexData: Float32Array): Rectangle; static createFromVertexData(rect: Rectangle, vertexData: Float32Array): Rectangle;
static createRectfrom2Point(rect: Rectangle, p1: Point, p2: Point): Rectangle; static createRectfrom2Point(rect: Rectangle, p1: Point, p2: Point): Rectangle;
static testRectCross(ra: Rectangle, rb: Rectangle): boolean; static testRectCross(ra: Rectangle, rb: Rectangle): boolean;
destroy(): void; destroy(): void;
} }
export class Transform extends HashObject { export class Transform extends HashObject {
worldMatrix: Matrix; worldMatrix: Matrix;
localMatrix: Matrix; localMatrix: Matrix;
_worldID: number; _worldID: number;
...@@ -799,22 +1055,29 @@ export class Transform extends HashObject { ...@@ -799,22 +1055,29 @@ export class Transform extends HashObject {
_sy: number; _sy: number;
_localID: number; _localID: number;
_currentLocalID: number; _currentLocalID: number;
constructor(); constructor();
onChange(): void; onChange(): void;
updateSkew(): void; updateSkew(): void;
updateLocalMatrix(): void; updateLocalMatrix(): void;
updateWorldMatrix(parentTransform: Transform): void; updateWorldMatrix(parentTransform: Transform): void;
rotation: number; rotation: number;
destroy(): void; destroy(): void;
} }
export function httpRequest(callback: Function, url: string, method?: string, params?: any, type?: 'text' | 'json' | 'jsonp'): void; export function httpRequest(callback: Function, url: string, method?: string, params?: any, type?: 'text' | 'json' | 'jsonp'): void;
export function jsonp(callback: any, url: any, params: any): void; export function jsonp(callback: any, url: any, params: any): void;
export function urlJoin(url: any, query: any): any; export function urlJoin(url: any, query: any): any;
export class CanvasRenderer extends SystemRenderer { export class CanvasRenderer extends SystemRenderer {
rootContext: CanvasRenderingContext2D; rootContext: CanvasRenderingContext2D;
context: CanvasRenderingContext2D; context: CanvasRenderingContext2D;
maskManager: CanvasMaskManager; maskManager: CanvasMaskManager;
...@@ -824,34 +1087,49 @@ export class CanvasRenderer extends SystemRenderer { ...@@ -824,34 +1087,49 @@ export class CanvasRenderer extends SystemRenderer {
graphics: CanvasGraphicsRenderer; graphics: CanvasGraphicsRenderer;
}; };
renderingToScreen: boolean; renderingToScreen: boolean;
constructor(options: RendererOptions); constructor(options: RendererOptions);
render(displayObject: DisplayObject, renderTexture?: any, transform?: Matrix): void; render(displayObject: DisplayObject, renderTexture?: any, transform?: Matrix): void;
clear(clearColor: string): void; clear(clearColor: string): void;
destroy(): void; destroy(): void;
resize(screenWidth: number, screenHeight: number): void; resize(screenWidth: number, screenHeight: number): void;
destroyPlugins(): void; destroyPlugins(): void;
} }
export class BatchManager { export class BatchManager {
renderer: WebglRenderer; renderer: WebglRenderer;
emptyRenderer: ObjectRenderer; emptyRenderer: ObjectRenderer;
currentRenderer: ObjectRenderer; currentRenderer: ObjectRenderer;
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
setObjectRenderer(objectRenderer: ObjectRenderer): void; setObjectRenderer(objectRenderer: ObjectRenderer): void;
flush(): void; flush(): void;
reset(): void; reset(): void;
} }
export class CanvasMaskManager extends HashObject { export class CanvasMaskManager extends HashObject {
renderer: any; renderer: any;
constructor(renderer: CanvasRenderer); constructor(renderer: CanvasRenderer);
pushMask(maskData: Graphics): void; pushMask(maskData: Graphics): void;
renderGraphicsShape(graphics: Graphics): void; renderGraphicsShape(graphics: Graphics): void;
popMask(renderer: CanvasRenderer): void; popMask(renderer: CanvasRenderer): void;
destroy(): void; destroy(): void;
} }
export class MaskManager { export class MaskManager {
renderer: WebglRenderer; renderer: WebglRenderer;
scissor: boolean; scissor: boolean;
scissorData: any; scissorData: any;
...@@ -859,42 +1137,61 @@ export class MaskManager { ...@@ -859,42 +1137,61 @@ export class MaskManager {
enableScissor: boolean; enableScissor: boolean;
alphaMaskPool: any[]; alphaMaskPool: any[];
alphaMaskIndex: number; alphaMaskIndex: number;
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
pushMask(target: any, maskData: any): void; pushMask(target: any, maskData: any): void;
popMask(target: any, maskData: any): void; popMask(target: any, maskData: any): void;
pushStencilMask(maskData: Graphics): void; pushStencilMask(maskData: Graphics): void;
popStencilMask(): void; popStencilMask(): void;
pushScissorMask(target: any, maskData: Graphics): void; pushScissorMask(target: any, maskData: Graphics): void;
popScissorMask(): void; popScissorMask(): void;
destroy(): void; destroy(): void;
} }
export class StencilManager { export class StencilManager {
renderer: WebglRenderer; renderer: WebglRenderer;
stencilMaskStack: Graphics[]; stencilMaskStack: Graphics[];
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
setMaskStack(stencilMaskStack: Graphics[]): void; setMaskStack(stencilMaskStack: Graphics[]): void;
pushStencil(graphics: Graphics): void; pushStencil(graphics: Graphics): void;
popStencil(): void; popStencil(): void;
_useCurrent(): void; _useCurrent(): void;
_getBitwiseMask(): number; _getBitwiseMask(): number;
destroy(): void; destroy(): void;
} }
export class TextureGarbageCollector { export class TextureGarbageCollector {
renderer: WebglRenderer; renderer: WebglRenderer;
count: number; count: number;
checkCount: number; checkCount: number;
maxIdle: number; maxIdle: number;
checkCountMax: number; checkCountMax: number;
mode: number; mode: number;
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
update(): void; update(): void;
run(): void; run(): void;
unload(displayObject: any): void; unload(displayObject: any): void;
} }
export class TextureManager { export class TextureManager {
boundTextures: any; boundTextures: any;
renderer: WebglRenderer; renderer: WebglRenderer;
emptyTextures: any; emptyTextures: any;
...@@ -902,18 +1199,27 @@ export class TextureManager { ...@@ -902,18 +1199,27 @@ export class TextureManager {
currentLocation: number; currentLocation: number;
gl: WebGLRenderingContext; gl: WebGLRenderingContext;
_managedTextures: Array<any>; _managedTextures: Array<any>;
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
onContextChange(): void; onContextChange(): void;
bindTexture(texture: any, location?: number, forceLocation?: boolean): number; bindTexture(texture: any, location?: number, forceLocation?: boolean): number;
getTexture(): void; getTexture(): void;
updateTexture(texture: any, location?: number): GLTexture; updateTexture(texture: any, location?: number): GLTexture;
unbindTexture(texture: any): void; unbindTexture(texture: any): void;
destroyTexture(texture: any, skipRemove: any): void; destroyTexture(texture: any, skipRemove: any): void;
removeAll(): void; removeAll(): void;
destroy(): void; destroy(): void;
} }
export class BatchRenderer extends ObjectRenderer { export class BatchRenderer extends ObjectRenderer {
vertSize: number; vertSize: number;
vertByteSize: number; vertByteSize: number;
size: number; size: number;
...@@ -931,58 +1237,80 @@ export class BatchRenderer extends ObjectRenderer { ...@@ -931,58 +1237,80 @@ export class BatchRenderer extends ObjectRenderer {
MAX_TEXTURES: number; MAX_TEXTURES: number;
vertexBuffers: GLBuffer[]; vertexBuffers: GLBuffer[];
indexBuffers: GLBuffer[]; indexBuffers: GLBuffer[];
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
onContextChange(): void; onContextChange(): void;
onPreRender(): void; onPreRender(): void;
render(element: any): void; render(element: any): void;
getIndexBuffer(size: any): any; getIndexBuffer(size: any): any;
getAttributeBuffer(size: number): any; getAttributeBuffer(size: number): any;
flush(): void; flush(): void;
packGeometry(element: any, float32View: any, uint32View: any, indexBuffer: any, index: any, indexCount: any): void; packGeometry(element: any, float32View: any, uint32View: any, indexBuffer: any, index: any, indexCount: any): void;
start(): void; start(): void;
stop(): void; stop(): void;
destroy(): void; destroy(): void;
} }
export class CanvasGraphicsRenderer { export class CanvasGraphicsRenderer {
renderer: CanvasRenderer; renderer: CanvasRenderer;
constructor(renderer: CanvasRenderer); constructor(renderer: CanvasRenderer);
render(graphics: Graphics): void; render(graphics: Graphics): void;
destroy(): void; destroy(): void;
} }
export function holePath(graphicsData: GraphicsData, context: CanvasRenderingContext2D, ccw?: boolean): void; export function holePath(graphicsData: GraphicsData, context: CanvasRenderingContext2D, ccw?: boolean): void;
export function judgeCcw(points: number[]): boolean; export function judgeCcw(points: number[]): boolean;
export class CanvasSpriteRenderer { export class CanvasSpriteRenderer {
renderer: CanvasRenderer; renderer: CanvasRenderer;
constructor(renderer: CanvasRenderer); constructor(renderer: CanvasRenderer);
render(sprite: any): void; render(sprite: any): void;
destroy(): void; destroy(): void;
} }
export interface RendererOptions { export interface RendererOptions {
htmlElement?: HTMLCanvasElement; htmlElement?: HTMLCanvasElement;
transparent?: boolean; transparent?: boolean;
antialias?: boolean; antialias?: boolean;
preserveDrawingBuffer?: boolean; preserveDrawingBuffer?: boolean;
backgroundColor?: number; backgroundColor?: number;
roundPixels?: boolean; roundPixels?: boolean;
} }
export class CanvasRenderTarget { export class CanvasRenderTarget {
canvas: HTMLCanvasElement; canvas: HTMLCanvasElement;
context: CanvasRenderingContext2D; context: CanvasRenderingContext2D;
constructor(width: number, height: number); constructor(width: number, height: number);
clear(): void; clear(): void;
resize(width: number, height: number): void; resize(width: number, height: number): void;
destroy(): void; destroy(): void;
width: number; width: number;
height: number; height: number;
} }
export class RenderTarget { export class RenderTarget {
gl: WebGLRenderingContext; gl: WebGLRenderingContext;
frameBuffer: GLFramebuffer; frameBuffer: GLFramebuffer;
texture: GLTexture; texture: GLTexture;
...@@ -998,17 +1326,25 @@ export class RenderTarget { ...@@ -998,17 +1326,25 @@ export class RenderTarget {
stencilMaskStack: Graphics[]; stencilMaskStack: Graphics[];
scaleMode: number; scaleMode: number;
root: boolean; root: boolean;
constructor(gl: WebGLRenderingContext, width?: number, height?: number, scaleMode?: number, root?: boolean); constructor(gl: WebGLRenderingContext, width?: number, height?: number, scaleMode?: number, root?: boolean);
clear(clearColor?: number[]): void; clear(clearColor?: number[]): void;
attachStencilBuffer(): void; attachStencilBuffer(): void;
setFrame(destinationFrame?: Rectangle, sourceFrame?: Rectangle): void; setFrame(destinationFrame?: Rectangle, sourceFrame?: Rectangle): void;
activate(): void; activate(): void;
calculateProjection(destinationFrame: Rectangle, sourceFrame?: Rectangle): void; calculateProjection(destinationFrame: Rectangle, sourceFrame?: Rectangle): void;
resize(width: number, height: number): void; resize(width: number, height: number): void;
destroy(): void; destroy(): void;
} }
export class SystemRenderer extends EventDispatcher { export class SystemRenderer extends EventDispatcher {
options: RendererOptions; options: RendererOptions;
type: number; type: number;
htmlElement: HTMLCanvasElement; htmlElement: HTMLCanvasElement;
...@@ -1019,49 +1355,64 @@ export class SystemRenderer extends EventDispatcher { ...@@ -1019,49 +1355,64 @@ export class SystemRenderer extends EventDispatcher {
_backgroundColorString: string; _backgroundColorString: string;
_tempDisplayObjectParent: Container; _tempDisplayObjectParent: Container;
_lastObjectRendered: DisplayObject; _lastObjectRendered: DisplayObject;
constructor(options: RendererOptions); constructor(options: RendererOptions);
resize(width: number, height: number): void; resize(width: number, height: number): void;
render(displayObject: any, renderTexture?: any, transform?: any): void; render(displayObject: any, renderTexture?: any, transform?: any): void;
destroy(): void; destroy(): void;
backgroundColor: number; backgroundColor: number;
} }
export class BatchBuffer { export class BatchBuffer {
vertices: ArrayBuffer; vertices: ArrayBuffer;
float32View: Float32Array; float32View: Float32Array;
uint32View: Uint32Array; uint32View: Uint32Array;
positions: any; positions: any;
uvs: any; uvs: any;
colors: any; colors: any;
constructor(size: number); constructor(size: number);
destroy(): void; destroy(): void;
} }
export class BatchDrawCall { export class BatchDrawCall {
textures: BaseTexture[]; textures: BaseTexture[];
textureCount: number; textureCount: number;
start: number; start: number;
size: number; size: number;
type: number; type: number;
constructor(); constructor();
} }
export function createIndicesForQuads(size: number): Uint16Array; export function createIndicesForQuads(size: number): Uint16Array;
export function generateMultiTextureShader(gl: any, maxTextures: any): GLShader; export function generateMultiTextureShader(gl: any, maxTextures: any): GLShader;
export class ObjectRenderer { export class ObjectRenderer {
renderer: WebglRenderer; renderer: WebglRenderer;
constructor(renderer: WebglRenderer); constructor(renderer: WebglRenderer);
onContextChange(): void; onContextChange(): void;
start(): void; start(): void;
stop(): void; stop(): void;
flush(): void; flush(): void;
render(object: DisplayObject): void; render(object: DisplayObject): void;
destroy(): void; destroy(): void;
} }
export class WebGLState { export class WebGLState {
blendModes: any; blendModes: any;
activeState: Uint8Array; activeState: Uint8Array;
defaultState: Uint8Array; defaultState: Uint8Array;
...@@ -1072,19 +1423,29 @@ export class WebGLState { ...@@ -1072,19 +1423,29 @@ export class WebGLState {
attribState: any[]; attribState: any[];
}; };
nativeVaoExtension: any; nativeVaoExtension: any;
constructor(gl: WebGLRenderingContext); constructor(gl: WebGLRenderingContext);
setState(state: any): void; setState(state: any): void;
setBlend(value: any): void; setBlend(value: any): void;
setBlendMode(value: any): void; setBlendMode(value: any): void;
setDepthTest(value: any): void; setDepthTest(value: any): void;
setCullFace(value: any): void; setCullFace(value: any): void;
setFrontFace(value: any): void; setFrontFace(value: any): void;
resetAttributes(): void; resetAttributes(): void;
resetToDefault(): void; resetToDefault(): void;
resetTo3D(): void; resetTo3D(): void;
} }
export class WebglRenderer extends SystemRenderer { export class WebglRenderer extends SystemRenderer {
plugins: {}; plugins: {};
gl: WebGLRenderingContext; gl: WebGLRenderingContext;
CONTEXT_UID: number; CONTEXT_UID: number;
...@@ -1099,47 +1460,69 @@ export class WebglRenderer extends SystemRenderer { ...@@ -1099,47 +1460,69 @@ export class WebglRenderer extends SystemRenderer {
_activeVao: VertexArrayObject; _activeVao: VertexArrayObject;
_activeRenderTarget: RenderTarget; _activeRenderTarget: RenderTarget;
rootRenderTarget: RenderTarget; rootRenderTarget: RenderTarget;
constructor(options: RendererOptions); constructor(options: RendererOptions);
_initContext(): void; _initContext(): void;
render(displayObject: DisplayObject, renderTexture?: any, transform?: any): void; render(displayObject: DisplayObject, renderTexture?: any, transform?: any): void;
clear(clearColor: number[]): void; clear(clearColor: number[]): void;
setTransform(matrix: Matrix): void; setTransform(matrix: Matrix): void;
clearRenderTexture(renderTexture: any, clearColor: any): this; clearRenderTexture(renderTexture: any, clearColor: any): this;
bindShader(shader: GLShader, autoProject?: boolean): WebglRenderer; bindShader(shader: GLShader, autoProject?: boolean): WebglRenderer;
createVao(): VertexArrayObject; createVao(): VertexArrayObject;
bindVao(vao: VertexArrayObject): WebglRenderer; bindVao(vao: VertexArrayObject): WebglRenderer;
reset(): WebglRenderer; reset(): WebglRenderer;
bindRenderTexture(renderTexture: any, transform?: Matrix): WebglRenderer; bindRenderTexture(renderTexture: any, transform?: Matrix): WebglRenderer;
bindRenderTarget(renderTarget: RenderTarget): WebglRenderer; bindRenderTarget(renderTarget: RenderTarget): WebglRenderer;
resize(screenWidth: any, screenHeight: any): void; resize(screenWidth: any, screenHeight: any): void;
destroy(): void; destroy(): void;
handleContextRestored(): void; handleContextRestored(): void;
handleContextLost(event: WebGLContextEvent): void; handleContextLost(event: WebGLContextEvent): void;
initPlugins(staticMap: any): void; initPlugins(staticMap: any): void;
destroyPlugins(): void; destroyPlugins(): void;
static __plugins: any; static __plugins: any;
static registerPlugin(pluginName: string, ctor: Function): void; static registerPlugin(pluginName: string, ctor: Function): void;
} }
export class BezierPath { export class BezierPath {
_d: any; _d: any;
_transform: any; _transform: any;
_styles: any; _styles: any;
_shape: any; _shape: any;
constructor(d?: any, transform?: any, styles?: any); constructor(d?: any, transform?: any, styles?: any);
} }
export class EllipsePath extends BezierPath { export class EllipsePath extends BezierPath {
_x: any; _x: any;
_y: any; _y: any;
_radiusX: any; _radiusX: any;
_radiusY: any; _radiusY: any;
_transform: any; _transform: any;
_styles: any; _styles: any;
constructor(x: any, y: any, radiusX: any, radiusY: any, transform: any, styles: any); constructor(x: any, y: any, radiusX: any, radiusY: any, transform: any, styles: any);
} }
export class FrameEntity { export class FrameEntity {
alpha: number; alpha: number;
transform: { transform: {
a: number; a: number;
...@@ -1159,13 +1542,15 @@ export class FrameEntity { ...@@ -1159,13 +1542,15 @@ export class FrameEntity {
ny: number; ny: number;
maskPath: any; maskPath: any;
shapes: any[]; shapes: any[];
constructor(spec: any); constructor(spec: any);
static lastShapes: any; static lastShapes: any;
} }
export const _default: (data: any, cb: any, failure: any) => void; export const _default: (data: any, cb: any, failure: any) => void;
export class MovieClip extends Container { export class MovieClip extends Container {
lockStep: boolean; lockStep: boolean;
readonly currentFrame: number; readonly currentFrame: number;
private _curFrame; private _curFrame;
...@@ -1179,43 +1564,61 @@ export class MovieClip extends Container { ...@@ -1179,43 +1564,61 @@ export class MovieClip extends Container {
private timeInterval; private timeInterval;
private deltaFrame; private deltaFrame;
private frameCount; private frameCount;
constructor(mv?: VideoEntity); constructor(mv?: VideoEntity);
init(mv: VideoEntity): void; init(mv: VideoEntity): void;
private initChildren; private initChildren;
private resetTransform; private resetTransform;
resetTransformAll(frameIndex: number): void; resetTransformAll(frameIndex: number): void;
setImage(imagekey: any, imageUrl: string): void; setImage(imagekey: any, imageUrl: string): void;
stop(): void; stop(): void;
nextFrame(): void; nextFrame(): void;
prevFrame(): void; prevFrame(): void;
gotoAndStop(frameIndex: number): void; gotoAndStop(frameIndex: number): void;
play(isFront?: boolean): void; play(isFront?: boolean): void;
private _lastFrame; private _lastFrame;
readonly isInTimeFrame: boolean; readonly isInTimeFrame: boolean;
gotoAndPlay(frameIndex: number, isFront?: boolean): void; gotoAndPlay(frameIndex: number, isFront?: boolean): void;
startAniRange(beginFrame?: number, endFrame?: number, loops?: number, callback?: Function): void; startAniRange(beginFrame?: number, endFrame?: number, loops?: number, callback?: Function): void;
private startTime; private startTime;
private startFrame; private startFrame;
private lastDeltaFrame; private lastDeltaFrame;
private _endMark; private _endMark;
commonDeltaTime: number; commonDeltaTime: number;
updateFrame(): void; updateFrame(): void;
private getCurFrameWhenLockStep; private getCurFrameWhenLockStep;
update(deltaTime: number): void; update(deltaTime: number): void;
destroy(): void; destroy(): void;
} }
export function inflate(input: any, options: any): any; export function inflate(input: any, options: any): any;
export const _default: { export const _default: {
inflate: typeof inflate; inflate: typeof inflate;
} }
export function assign(obj: any, objO: any): any; export function assign(obj: any, objO: any): any;
export function shrinkBuf(buf: any, size: any): any; export function shrinkBuf(buf: any, size: any): any;
export const utils: { export const utils: {
assign: typeof assign; assign: typeof assign;
shrinkBuf: typeof shrinkBuf; shrinkBuf: typeof shrinkBuf;
Buf8: any; Buf8: any;
...@@ -1223,33 +1626,33 @@ export const utils: { ...@@ -1223,33 +1626,33 @@ export const utils: {
Buf32: any; Buf32: any;
arraySet: any; arraySet: any;
flattenChunks: any; flattenChunks: any;
} }
export {}; export {};
export function string2buf(str: any): any; export function string2buf(str: any): any;
export function buf2binstring(buf: any, len?: any): any; export function buf2binstring(buf: any, len?: any): any;
export function binstring2buf(str: any): any; export function binstring2buf(str: any): any;
export function buf2string(buf: any, max: any): any; export function buf2string(buf: any, max: any): any;
export function utf8border(buf: any, max: any): any; export function utf8border(buf: any, max: any): any;
export const strings: { export const strings: {
utf8border: typeof utf8border; utf8border: typeof utf8border;
buf2string: typeof buf2string; buf2string: typeof buf2string;
binstring2buf: typeof binstring2buf; binstring2buf: typeof binstring2buf;
buf2binstring: typeof buf2binstring; buf2binstring: typeof buf2binstring;
string2buf: typeof string2buf; string2buf: typeof string2buf;
} }
export {}; export {};
export function adler32(adler: any, buf: any, len: any, pos: any): number; export function adler32(adler: any, buf: any, len: any, pos: any): number;
export const _default: { export const _default: {
Z_NO_FLUSH: number; Z_NO_FLUSH: number;
Z_PARTIAL_FLUSH: number; Z_PARTIAL_FLUSH: number;
Z_SYNC_FLUSH: number; Z_SYNC_FLUSH: number;
...@@ -1277,27 +1680,27 @@ export const _default: { ...@@ -1277,27 +1680,27 @@ export const _default: {
Z_TEXT: number; Z_TEXT: number;
Z_UNKNOWN: number; Z_UNKNOWN: number;
Z_DEFLATED: number; Z_DEFLATED: number;
} }
export function crc32(crc: any, buf: any, len: any, pos: any): number; export function crc32(crc: any, buf: any, len: any, pos: any): number;
export function deflateResetKeep(strm: any): any; export function deflateResetKeep(strm: any): any;
export function deflateReset(strm: any): any; export function deflateReset(strm: any): any;
export function deflateSetHeader(strm: any, head: any): number; export function deflateSetHeader(strm: any, head: any): number;
export function deflateInit2(strm: any, level: any, method: any, windowBits: any, memLevel: any, strategy: any): any; export function deflateInit2(strm: any, level: any, method: any, windowBits: any, memLevel: any, strategy: any): any;
export function deflateInit(strm: any, level: any): any; export function deflateInit(strm: any, level: any): any;
export function deflate(strm: any, flush: any): any; export function deflate(strm: any, flush: any): any;
export function deflateEnd(strm: any): any; export function deflateEnd(strm: any): any;
export function deflateSetDictionary(strm: any, dictionary: any): number; export function deflateSetDictionary(strm: any, dictionary: any): number;
export const _default: { export const _default: {
deflateInit: typeof deflateInit; deflateInit: typeof deflateInit;
deflateInit2: typeof deflateInit2; deflateInit2: typeof deflateInit2;
deflateReset: typeof deflateReset; deflateReset: typeof deflateReset;
...@@ -1307,29 +1710,29 @@ export const _default: { ...@@ -1307,29 +1710,29 @@ export const _default: {
deflateEnd: typeof deflateEnd; deflateEnd: typeof deflateEnd;
deflateSetDictionary: typeof deflateSetDictionary; deflateSetDictionary: typeof deflateSetDictionary;
deflateInfo: string; deflateInfo: string;
} }
export function GZheader(): void; export function GZheader(): void;
export function inflateResetKeep(strm: any): number; export function inflateResetKeep(strm: any): number;
export function inflateReset(strm: any): number; export function inflateReset(strm: any): number;
export function inflateReset2(strm: any, windowBits: any): number; export function inflateReset2(strm: any, windowBits: any): number;
export function inflateInit2(strm: any, windowBits: any): any; export function inflateInit2(strm: any, windowBits: any): any;
export function inflateInit(strm: any): any; export function inflateInit(strm: any): any;
export function inflate(strm: any, flush: any): any; export function inflate(strm: any, flush: any): any;
export function inflateEnd(strm: any): number; export function inflateEnd(strm: any): number;
export function inflateGetHeader(strm: any, head: any): number; export function inflateGetHeader(strm: any, head: any): number;
export function inflateSetDictionary(strm: any, dictionary: any): number; export function inflateSetDictionary(strm: any, dictionary: any): number;
export const _default: { export const _default: {
inflateReset: typeof inflateReset; inflateReset: typeof inflateReset;
inflateReset2: typeof inflateReset2; inflateReset2: typeof inflateReset2;
inflateResetKeep: typeof inflateResetKeep; inflateResetKeep: typeof inflateResetKeep;
...@@ -1340,9 +1743,9 @@ export const _default: { ...@@ -1340,9 +1743,9 @@ export const _default: {
inflateGetHeader: typeof inflateGetHeader; inflateGetHeader: typeof inflateGetHeader;
inflateSetDictionary: typeof inflateSetDictionary; inflateSetDictionary: typeof inflateSetDictionary;
inflateInfo: string; inflateInfo: string;
} }
export const _default: { export const _default: {
2: string; 2: string;
1: string; 1: string;
0: string; 0: string;
...@@ -1352,38 +1755,39 @@ export const _default: { ...@@ -1352,38 +1755,39 @@ export const _default: {
'-4': string; '-4': string;
'-5': string; '-5': string;
'-6': string; '-6': string;
} }
export function _tr_init(s: any): void; export function _tr_init(s: any): void;
export function _tr_stored_block(s: any, buf: any, stored_len: any, last: any): void; export function _tr_stored_block(s: any, buf: any, stored_len: any, last: any): void;
export function _tr_align(s: any): void; export function _tr_align(s: any): void;
export function _tr_flush_block(s: any, buf: any, stored_len: any, last: any): void; export function _tr_flush_block(s: any, buf: any, stored_len: any, last: any): void;
export function _tr_tally(s: any, dist: any, lc: any): boolean; export function _tr_tally(s: any, dist: any, lc: any): boolean;
export const _default: { export const _default: {
_tr_init: typeof _tr_init; _tr_init: typeof _tr_init;
_tr_stored_block: typeof _tr_stored_block; _tr_stored_block: typeof _tr_stored_block;
_tr_flush_block: typeof _tr_flush_block; _tr_flush_block: typeof _tr_flush_block;
_tr_tally: typeof _tr_tally; _tr_tally: typeof _tr_tally;
_tr_align: typeof _tr_align; _tr_align: typeof _tr_align;
} }
export function ZStream(): void; export function ZStream(): void;
export class Parser { export class Parser {
load(url: any, success: any, failure: any): void; load(url: any, success: any, failure: any): void;
loadViaWorker(url: any, success: any, failure: any): void; loadViaWorker(url: any, success: any, failure: any): void;
} }
export const proto: protobuf.Root; export const proto: protobuf.Root;
export const ProtoMovieEntity: protobuf.Type; export const ProtoMovieEntity: protobuf.Type;
export class RectPath extends BezierPath { export class RectPath extends BezierPath {
_x: any; _x: any;
_y: any; _y: any;
_width: any; _width: any;
...@@ -1391,17 +1795,19 @@ export class RectPath extends BezierPath { ...@@ -1391,17 +1795,19 @@ export class RectPath extends BezierPath {
_cornerRadius: any; _cornerRadius: any;
_transform: any; _transform: any;
_styles: any; _styles: any;
constructor(x: any, y: any, width: any, height: any, cornerRadius: any, transform: any, styles: any); constructor(x: any, y: any, width: any, height: any, cornerRadius: any, transform: any, styles: any);
} }
export class SpriteEntity { export class SpriteEntity {
matteKey: any; matteKey: any;
imageKey: any; imageKey: any;
frames: any[]; frames: any[];
constructor(spec: any); constructor(spec: any);
} }
export class VideoEntity extends HashObject { export class VideoEntity extends HashObject {
version: string; version: string;
videoSize: { videoSize: {
width: number; width: number;
...@@ -1413,12 +1819,15 @@ export class VideoEntity extends HashObject { ...@@ -1413,12 +1819,15 @@ export class VideoEntity extends HashObject {
hasBeenCached: boolean; hasBeenCached: boolean;
sprites: SpriteEntity[]; sprites: SpriteEntity[];
audios: any[]; audios: any[];
constructor(spec: any, images: any); constructor(spec: any, images: any);
resetSprites(spec: any): void; resetSprites(spec: any): void;
destroy(): void; destroy(): void;
} }
export class EditableText extends TextField { export class EditableText extends TextField {
htmlElement: any; htmlElement: any;
private _prompt; private _prompt;
prompt: string; prompt: string;
...@@ -1426,17 +1835,22 @@ export class EditableText extends TextField { ...@@ -1426,17 +1835,22 @@ export class EditableText extends TextField {
promptColor: string; promptColor: string;
private _textColor; private _textColor;
textColor: string; textColor: string;
constructor(); constructor();
} }
export class InputText extends FloatDisplay { export class InputText extends FloatDisplay {
private _view; private _view;
inputType: number; inputType: number;
isAutoDownKeyBoard: boolean; isAutoDownKeyBoard: boolean;
private static _inputTypeList; private static _inputTypeList;
constructor(inputType?: number); constructor(inputType?: number);
init(htmlElement: any): void; init(htmlElement: any): void;
initInfo(text: string, color: string, align: string, size: number, font: string, showBorder: boolean, lineSpacing: number, textWidth: number): void; initInfo(text: string, color: string, align: string, size: number, font: string, showBorder: boolean, lineSpacing: number, textWidth: number): void;
lineSpacing: number; lineSpacing: number;
bold: boolean; bold: boolean;
italic: boolean; italic: boolean;
...@@ -1446,16 +1860,19 @@ export class InputText extends FloatDisplay { ...@@ -1446,16 +1860,19 @@ export class InputText extends FloatDisplay {
border: boolean; border: boolean;
text: string; text: string;
maxCharacters: number; maxCharacters: number;
convertToTextField(textField?: TextField): TextField; convertToTextField(textField?: TextField): TextField;
} }
export class TextField extends Sprite { export class TextField extends Sprite {
canvas: HTMLCanvasElement; canvas: HTMLCanvasElement;
context: CanvasRenderingContext2D; context: CanvasRenderingContext2D;
dirty: boolean; dirty: boolean;
offsetX: number; offsetX: number;
offsetY: number; offsetY: number;
constructor(); constructor();
textAlpha: number; textAlpha: number;
private _textAlpha; private _textAlpha;
textAlign: TEXT_ALIGN; textAlign: TEXT_ALIGN;
...@@ -1469,7 +1886,9 @@ export class TextField extends Sprite { ...@@ -1469,7 +1886,9 @@ export class TextField extends Sprite {
lineType: TEXT_lINETYPE; lineType: TEXT_lINETYPE;
private _lineType; private _lineType;
text: string; text: string;
protected _setText(value: any): void; protected _setText(value: any): void;
private _text; private _text;
font: string; font: string;
private _font; private _font;
...@@ -1488,27 +1907,37 @@ export class TextField extends Sprite { ...@@ -1488,27 +1907,37 @@ export class TextField extends Sprite {
border: boolean; border: boolean;
private _border; private _border;
private _prepContext; private _prepContext;
getTextWidth(lineIndex?: number): number; getTextWidth(lineIndex?: number): number;
readonly lines: number; readonly lines: number;
private _getMeasuredWidth; private _getMeasuredWidth;
private realLines; private realLines;
updateText(): void; updateText(): void;
updateTexture(): void; updateTexture(): void;
_renderCanvas(renderer: any): void; _renderCanvas(renderer: any): void;
_renderWebGL(renderer: any): void; _renderWebGL(renderer: any): void;
destroy(): void; destroy(): void;
} }
export class BaseRenderTexture extends BaseTexture { export class BaseRenderTexture extends BaseTexture {
_glRenderTargets: {}; _glRenderTargets: {};
_canvasRenderTarget: any; _canvasRenderTarget: any;
valid: boolean; valid: boolean;
constructor(width?: number, height?: number, scaleMode?: number); constructor(width?: number, height?: number, scaleMode?: number);
resize(width: number, height: number): void; resize(width: number, height: number): void;
destroy(): void; destroy(): void;
} }
export class BaseTexture extends EventDispatcher { export class BaseTexture extends EventDispatcher {
touched: number; touched: number;
width: number; width: number;
height: number; height: number;
...@@ -1526,30 +1955,44 @@ export class BaseTexture extends EventDispatcher { ...@@ -1526,30 +1955,44 @@ export class BaseTexture extends EventDispatcher {
_enabled: number; _enabled: number;
_destroyed: boolean; _destroyed: boolean;
textureCacheIds: string[]; textureCacheIds: string[];
constructor(source?: HTMLImageElement | HTMLCanvasElement, scaleMode?: number); constructor(source?: HTMLImageElement | HTMLCanvasElement, scaleMode?: number);
update(): void; update(): void;
loadSource(source: any): void; loadSource(source: any): void;
private _updateImageType; private _updateImageType;
private _sourceLoaded; private _sourceLoaded;
destroy(): void; destroy(): void;
dispose(): void; dispose(): void;
updateSourceImage(newSrc: string): void; updateSourceImage(newSrc: string): void;
static fromImage(imageUrl: string, crossorigin?: any, scaleMode?: number): BaseTexture; static fromImage(imageUrl: string, crossorigin?: any, scaleMode?: number): BaseTexture;
static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): BaseTexture; static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): BaseTexture;
static from(source: any, scaleMode?: number): BaseTexture; static from(source: any, scaleMode?: number): BaseTexture;
static addToCache(baseTexture: BaseTexture, id: string): void; static addToCache(baseTexture: BaseTexture, id: string): void;
static removeFromCache(baseTexture: string | BaseTexture): BaseTexture | null; static removeFromCache(baseTexture: string | BaseTexture): BaseTexture | null;
} }
export function getTexture(str: string): any; export function getTexture(str: string): any;
export class RenderTexture extends Texture { export class RenderTexture extends Texture {
constructor(baseRenderTexture: BaseRenderTexture, frame?: Rectangle); constructor(baseRenderTexture: BaseRenderTexture, frame?: Rectangle);
resize(width: number, height: number, doNotResizeBaseTexture?: boolean): void; resize(width: number, height: number, doNotResizeBaseTexture?: boolean): void;
static create(width: number, height: number, scaleMode?: number): RenderTexture; static create(width: number, height: number, scaleMode?: number): RenderTexture;
} }
export class Texture extends EventDispatcher { export class Texture extends EventDispatcher {
noFrame: boolean; noFrame: boolean;
baseTexture: BaseTexture; baseTexture: BaseTexture;
_frame: Rectangle; _frame: Rectangle;
...@@ -1564,26 +2007,40 @@ export class Texture extends EventDispatcher { ...@@ -1564,26 +2007,40 @@ export class Texture extends EventDispatcher {
textureCacheIds: string[]; textureCacheIds: string[];
static EMPTY: Texture; static EMPTY: Texture;
static WHITE: Texture; static WHITE: Texture;
constructor(baseTexture: BaseTexture | Texture, frame?: Rectangle, orig?: Rectangle, trim?: Rectangle, rotate?: number, anchor?: Point); constructor(baseTexture: BaseTexture | Texture, frame?: Rectangle, orig?: Rectangle, trim?: Rectangle, rotate?: number, anchor?: Point);
update(): void; update(): void;
onBaseTextureLoaded(e: Event): void; onBaseTextureLoaded(e: Event): void;
onBaseTextureUpdated(e: Event): void; onBaseTextureUpdated(e: Event): void;
destroy(): void; destroy(): void;
clone(): Texture; clone(): Texture;
_updateUvs(): void; _updateUvs(): void;
frame: Rectangle; frame: Rectangle;
rotate: number; rotate: number;
readonly width: number; readonly width: number;
readonly height: number; readonly height: number;
static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: number): Texture; static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: number): Texture;
static fromFrame(frameId: string): Texture; static fromFrame(frameId: string): Texture;
static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): Texture; static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): Texture;
static from(source: any): Texture; static from(source: any): Texture;
static addToCache(texture: Texture, id: string): void; static addToCache(texture: Texture, id: string): void;
static removeFromCache(texture: any): Texture; static removeFromCache(texture: any): Texture;
} }
export class TextureSheet { export class TextureSheet {
baseTexture: BaseTexture; baseTexture: BaseTexture;
textures: {}; textures: {};
animations: {}; animations: {};
...@@ -1591,15 +2048,21 @@ export class TextureSheet { ...@@ -1591,15 +2048,21 @@ export class TextureSheet {
_frames: any; _frames: any;
_frameKeys: string[]; _frameKeys: string[];
_callback: Function; _callback: Function;
constructor(baseTexture: BaseTexture, data: any); constructor(baseTexture: BaseTexture, data: any);
parse(callback: Function): void; parse(callback: Function): void;
_processFrames(initialFrameIndex: number): void; _processFrames(initialFrameIndex: number): void;
_processAnimations(): void; _processAnimations(): void;
_parseComplete(): void; _parseComplete(): void;
destroy(destroyBase?: boolean): void; destroy(destroyBase?: boolean): void;
} }
export class TextureUvs { export class TextureUvs {
x0: number; x0: number;
y0: number; y0: number;
x1: number; x1: number;
...@@ -1610,16 +2073,23 @@ export class TextureUvs { ...@@ -1610,16 +2073,23 @@ export class TextureUvs {
y3: number; y3: number;
uvsUint32: Uint32Array; uvsUint32: Uint32Array;
uvsFloat32: Float32Array; uvsFloat32: Float32Array;
constructor(); constructor();
set(frame: Rectangle, baseFrame: Rectangle | BaseTexture, rotate: number): void; set(frame: Rectangle, baseFrame: Rectangle | BaseTexture, rotate: number): void;
} }
export class Ease { export class Ease {
constructor(); constructor();
static get(amount: number): (t: number) => number; static get(amount: number): (t: number) => number;
static getPowIn(pow: number): (t: number) => number; static getPowIn(pow: number): (t: number) => number;
static getPowOut(pow: number): (t: number) => number; static getPowOut(pow: number): (t: number) => number;
static getPowInOut(pow: number): (t: number) => number; static getPowInOut(pow: number): (t: number) => number;
static quadIn: (t: number) => number; static quadIn: (t: number) => number;
static quadOut: (t: number) => number; static quadOut: (t: number) => number;
static quadInOut: (t: number) => number; static quadInOut: (t: number) => number;
...@@ -1632,30 +2102,51 @@ export class Ease { ...@@ -1632,30 +2102,51 @@ export class Ease {
static quintIn: (t: number) => number; static quintIn: (t: number) => number;
static quintOut: (t: number) => number; static quintOut: (t: number) => number;
static quintInOut: (t: number) => number; static quintInOut: (t: number) => number;
static sineIn(t: number): number; static sineIn(t: number): number;
static sineOut(t: number): number; static sineOut(t: number): number;
static sineInOut(t: number): number; static sineInOut(t: number): number;
static getBackIn(amount: number): (t: number) => number; static getBackIn(amount: number): (t: number) => number;
static backIn: (t: number) => number; static backIn: (t: number) => number;
static getBackOut(amount: number): (t: any) => number; static getBackOut(amount: number): (t: any) => number;
static backOut: (t: any) => number; static backOut: (t: any) => number;
static getBackInOut(amount: number): (t: number) => number; static getBackInOut(amount: number): (t: number) => number;
static backInOut: (t: number) => number; static backInOut: (t: number) => number;
static circIn(t: number): number; static circIn(t: number): number;
static circOut(t: number): number; static circOut(t: number): number;
static circInOut(t: number): number; static circInOut(t: number): number;
static bounceIn(t: number): number; static bounceIn(t: number): number;
static bounceOut(t: number): number; static bounceOut(t: number): number;
static bounceInOut(t: number): number; static bounceInOut(t: number): number;
static getElasticIn(amplitude: number, period: number): (t: number) => number; static getElasticIn(amplitude: number, period: number): (t: number) => number;
static elasticIn: (t: number) => number; static elasticIn: (t: number) => number;
static getElasticOut(amplitude: number, period: number): (t: number) => number; static getElasticOut(amplitude: number, period: number): (t: number) => number;
static elasticOut: (t: number) => number; static elasticOut: (t: number) => number;
static getElasticInOut(amplitude: number, period: number): (t: number) => number; static getElasticInOut(amplitude: number, period: number): (t: number) => number;
static elasticInOut: (t: number) => number; static elasticInOut: (t: number) => number;
} }
export class Tween { export class Tween {
private static NONE; private static NONE;
private static LOOP; private static LOOP;
private static REVERSE; private static REVERSE;
...@@ -1678,73 +2169,103 @@ export class Tween { ...@@ -1678,73 +2169,103 @@ export class Tween {
private _prevPosition; private _prevPosition;
private _stepPosition; private _stepPosition;
private passive; private passive;
static get(target: any, props?: { static get(target: any, props?: {
loop?: boolean; loop?: boolean;
onChange?: Function; onChange?: Function;
onChangeObj?: any; onChangeObj?: any;
}, pluginData?: any, override?: boolean): Tween; }, pluginData?: any, override?: boolean): Tween;
static removeTweens(target: any): void; static removeTweens(target: any): void;
static pauseTweens(target: any): void; static pauseTweens(target: any): void;
static resumeTweens(target: any): void; static resumeTweens(target: any): void;
private static tick; private static tick;
static flush(): void; static flush(): void;
private static _lastTime; private static _lastTime;
private static _register; private static _register;
static removeAllTweens(): void; static removeAllTweens(): void;
constructor(target: any, props: any, pluginData: any); constructor(target: any, props: any, pluginData: any);
onChange: Function; onChange: Function;
private initialize; private initialize;
setPosition(value: number, actionsMode?: number): boolean; setPosition(value: number, actionsMode?: number): boolean;
private _runAction; private _runAction;
private _updateTargetProps; private _updateTargetProps;
setPaused(value: boolean): Tween; setPaused(value: boolean): Tween;
private _cloneProps; private _cloneProps;
private _addStep; private _addStep;
private _appendQueueProps; private _appendQueueProps;
private _addAction; private _addAction;
private _set; private _set;
wait(duration: number, passive?: boolean): Tween; wait(duration: number, passive?: boolean): Tween;
to(props: any, duration?: number, ease?: Function): Tween; to(props: any, duration?: number, ease?: Function): Tween;
call(callback: Function, thisObj?: any, params?: any[]): Tween; call(callback: Function, thisObj?: any, params?: any[]): Tween;
set(props: any, target?: any): Tween; set(props: any, target?: any): Tween;
play(tween?: Tween): Tween; play(tween?: Tween): Tween;
pause(tween?: Tween): Tween; pause(tween?: Tween): Tween;
$tick(delta: number): void; $tick(delta: number): void;
} }
export class BitmapNumber extends Sprite { export class BitmapNumber extends Sprite {
resName: string; resName: string;
private textures; private textures;
private _num; private _num;
num: number; num: number;
constructor(textures: Texture[]); constructor(textures: Texture[]);
reset(textures: Texture[]): void; reset(textures: Texture[]): void;
} }
export class BitmapNumbers extends Container { export class BitmapNumbers extends Container {
textures: Texture[]; textures: Texture[];
align: TEXT_ALIGN; align: TEXT_ALIGN;
singleWidth: number; singleWidth: number;
private _num; private _num;
num: number; num: number;
constructor(textures: Texture[]); constructor(textures: Texture[]);
adaptate(): void; adaptate(): void;
} }
export class Button extends Sprite { export class Button extends Sprite {
textureUp: any; textureUp: any;
textureDown: any; textureDown: any;
textureDisable: any; textureDisable: any;
constructor(tUp: Texture, tDown?: Texture, tDisable?: Texture); constructor(tUp: Texture, tDown?: Texture, tDisable?: Texture);
private _mouseEvent; private _mouseEvent;
initButton(): void; initButton(): void;
clicked: boolean; clicked: boolean;
private _clicked; private _clicked;
textureStatusEnable: boolean; textureStatusEnable: boolean;
destroy(): void; destroy(): void;
} }
export class FrameAni extends Sprite { export class FrameAni extends Sprite {
texturesAll: Texture[]; texturesAll: Texture[];
currentFrame: number; currentFrame: number;
totalFrames: number; totalFrames: number;
...@@ -1754,21 +2275,28 @@ export class FrameAni extends Sprite { ...@@ -1754,21 +2275,28 @@ export class FrameAni extends Sprite {
callback: Function; callback: Function;
_frameRate: number; _frameRate: number;
frameRate: number; frameRate: number;
constructor(texturesAll: Texture[]); constructor(texturesAll: Texture[]);
private count; private count;
onEnterFrame(): void; onEnterFrame(): void;
play(callback: any): void; play(callback: any): void;
reset(): void; reset(): void;
private changeTexture; private changeTexture;
} }
export interface IScrollListItem extends DisplayObject { export interface IScrollListItem extends DisplayObject {
initData(id: number, data: any): void; initData(id: number, data: any): void;
id: number; id: number;
data: number; data: number;
} }
export class ScrollList extends ScrollPage { export class ScrollList extends ScrollPage {
private _items; private _items;
private _itemW; private _itemW;
private _itemH; private _itemH;
...@@ -1783,16 +2311,23 @@ export class ScrollList extends ScrollPage { ...@@ -1783,16 +2311,23 @@ export class ScrollList extends ScrollPage {
private _disParam; private _disParam;
private _lastFirstId; private _lastFirstId;
readonly loadingView: DisplayObject; readonly loadingView: DisplayObject;
constructor(itemClassName: any, itemWidth: number, itemHeight: number, vW: number, vH: number, isVertical?: boolean, cols?: number); constructor(itemClassName: any, itemWidth: number, itemHeight: number, vW: number, vH: number, isVertical?: boolean, cols?: number);
updateData(data: Array<any>, isReset?: boolean): void; updateData(data: Array<any>, isReset?: boolean): void;
private flushData; private flushData;
setViewRect(w: number, h: number, isVertical: boolean): void; setViewRect(w: number, h: number, isVertical: boolean): void;
private _updateViewRect; private _updateViewRect;
setLoading(downLoading: DisplayObject): void; setLoading(downLoading: DisplayObject): void;
destroy(): void; destroy(): void;
} }
export class ScrollPage extends Container { export class ScrollPage extends Container {
protected isVertical: boolean; protected isVertical: boolean;
private viewWidth; private viewWidth;
private viewHeight; private viewHeight;
...@@ -1812,167 +2347,192 @@ export class ScrollPage extends Container { ...@@ -1812,167 +2347,192 @@ export class ScrollPage extends Container {
private isMouseDownState; private isMouseDownState;
private autoScroll; private autoScroll;
isSpringBack: boolean; isSpringBack: boolean;
constructor(vW: number, vH: number, maxDistance: number, isVertical?: boolean, isFull?: boolean); constructor(vW: number, vH: number, maxDistance: number, isVertical?: boolean, isFull?: boolean);
setViewRect(w: number, h: number, isVertical: boolean): void; setViewRect(w: number, h: number, isVertical: boolean): void;
private onMouseEvent; private onMouseEvent;
scrollTo(dis: number, time?: number): void; scrollTo(dis: number, time?: number): void;
destroy(): void; destroy(): void;
} }
export class ShowWord extends TextField { export class ShowWord extends TextField {
playWords(text: string, deltaTime?: number, callback?: Function): void; playWords(text: string, deltaTime?: number, callback?: Function): void;
} }
export function DrawAllToCanvas(images: any, callback: any): void; export function DrawAllToCanvas(images: any, callback: any): void;
export function uid(): number; export function uid(): number;
export const backupCanvas: HTMLCanvasElement; export const backupCanvas: HTMLCanvasElement;
export function getGradientColor(points: any, colors: any): any; export function getGradientColor(points: any, colors: any): any;
export function getCanvasBitmapStyle(image: any): any; export function getCanvasBitmapStyle(image: any): any;
export function hex2rgb(hex: number, out?: number[] | Float32Array): number[] | Float32Array; export function hex2rgb(hex: number, out?: number[] | Float32Array): number[] | Float32Array;
export function hex2string(hex: any): string; export function hex2string(hex: any): string;
export function string2hex(string: string): number; export function string2hex(string: string): number;
export function rgb2hex(rgb: number[]): number; export function rgb2hex(rgb: number[]): number;
export function getRGBA(color: string, alpha: number): string; export function getRGBA(color: string, alpha: number): string;
export function inputFeildIosEnable(): void; export function inputFeildIosEnable(): void;
export function decomposeDataUri(dataUri: any): { export function decomposeDataUri(dataUri: any): {
mediaType: any; mediaType: any;
subType: any; subType: any;
charset: any; charset: any;
encoding: any; encoding: any;
data: any; data: any;
} }
export function getUrlFileExtension(url: any): any; export function getUrlFileExtension(url: any): any;
export function sign(n: number): number; export function sign(n: number): number;
export function premultiplyTint(tint: number, alpha: number): number; export function premultiplyTint(tint: number, alpha: number): number;
export const TextureCache: any; export const TextureCache: any;
export const BaseTextureCache: any; export const BaseTextureCache: any;
export const TextureSheetCache: any; export const TextureSheetCache: any;
export function destroyTextureCache(): void; export function destroyTextureCache(): void;
export function clearTextureCache(): void; export function clearTextureCache(): void;
export const GlobalPro: { export const GlobalPro: {
stageRenderType: RENDERER_TYPE; stageRenderType: RENDERER_TYPE;
dpi: number; dpi: number;
padding: number; padding: number;
startTime: number; startTime: number;
} }
export function isWebGLSupported(): boolean; export function isWebGLSupported(): boolean;
export function removeItems(arr: Array<any>, startIdx: number, removeCount: number): void; export function removeItems(arr: Array<any>, startIdx: number, removeCount: number): void;
export function mapWebGLBlendModesToPixi(gl: any, array?: any[]): any[]; export function mapWebGLBlendModesToPixi(gl: any, array?: any[]): any[];
export const INT_BITS1 = 32; export const INT_BITS1 = 32;
export const INT_MAX = 2147483647; export const INT_MAX = 2147483647;
export const INT_MIN: number; export const INT_MIN: number;
export function abs(v: any): number; export function abs(v: any): number;
export function min(x: any, y: any): number; export function min(x: any, y: any): number;
export function max(x: any, y: any): number; export function max(x: any, y: any): number;
export function isPow2(v: any): boolean; export function isPow2(v: any): boolean;
export function log2(v: any): number; export function log2(v: any): number;
export function log10(v: any): 1 | 4 | 3 | 2 | 9 | 8 | 7 | 6 | 5 | 0; export function log10(v: any): 1 | 4 | 3 | 2 | 9 | 8 | 7 | 6 | 5 | 0;
export function popCount(v: any): number; export function popCount(v: any): number;
export function countTrailingZeros(v: any): number; export function countTrailingZeros(v: any): number;
export function nextPow2(v: any): any; export function nextPow2(v: any): any;
export function prevPow2(v: any): number; export function prevPow2(v: any): number;
export function parity(v: any): number; export function parity(v: any): number;
export function reverse(v: any): number; export function reverse(v: any): number;
export function interleave2(x: any, y: any): number; export function interleave2(x: any, y: any): number;
export function deinterleave2(v: any, n: any): number; export function deinterleave2(v: any, n: any): number;
export function interleave3(x: any, y: any, z: any): number; export function interleave3(x: any, y: any, z: any): number;
export function deinterleave3(v: any, n: any): number; export function deinterleave3(v: any, n: any): number;
export function nextCombination(v: any): number; export function nextCombination(v: any): number;
export function checkMaxIfStatementsInShader(maxIfs: number, gl: WebGLRenderingContext): number; export function checkMaxIfStatementsInShader(maxIfs: number, gl: WebGLRenderingContext): number;
export function createContext(canvas: HTMLCanvasElement, options?: any): WebGLRenderingContext; export function createContext(canvas: HTMLCanvasElement, options?: any): WebGLRenderingContext;
export class GLBuffer { export class GLBuffer {
gl: any; gl: any;
buffer: any; buffer: any;
type: any; type: any;
drawType: any; drawType: any;
data: any; data: any;
_updateID: number; _updateID: number;
constructor(gl: any, type?: any, data?: any, drawType?: any); constructor(gl: any, type?: any, data?: any, drawType?: any);
upload(data: any, offset?: number, dontBind?: boolean): void; upload(data: any, offset?: number, dontBind?: boolean): void;
bind(): void; bind(): void;
destroy: () => void; destroy: () => void;
static createVertexBuffer(gl: any, data?: any, drawType?: any): GLBuffer; static createVertexBuffer(gl: any, data?: any, drawType?: any): GLBuffer;
static createIndexBuffer(gl: any, data?: any, drawType?: any): GLBuffer; static createIndexBuffer(gl: any, data?: any, drawType?: any): GLBuffer;
static create(gl: any, type: any, data: any, drawType: any): GLBuffer; static create(gl: any, type: any, data: any, drawType: any): GLBuffer;
} }
export class GLFramebuffer { export class GLFramebuffer {
gl: any; gl: any;
framebuffer: any; framebuffer: any;
stencil: any; stencil: any;
texture: any; texture: any;
width: any; width: any;
height: any; height: any;
constructor(gl: any, width: any, height: any); constructor(gl: any, width: any, height: any);
enableTexture(texture: any): void; enableTexture(texture: any): void;
enableStencil(): void; enableStencil(): void;
clear(r: any, g: any, b: any, a: any): void; clear(r: any, g: any, b: any, a: any): void;
bind(): void; bind(): void;
unbind(): void; unbind(): void;
resize(width: any, height: any): void; resize(width: any, height: any): void;
destroy(): void; destroy(): void;
static createRGBA(gl: any, width: any, height: any, data?: any): GLFramebuffer; static createRGBA(gl: any, width: any, height: any, data?: any): GLFramebuffer;
static createFloat32(gl: any, width: any, height: any, data: any): GLFramebuffer; static createFloat32(gl: any, width: any, height: any, data: any): GLFramebuffer;
} }
export class GLShader { export class GLShader {
gl: WebGLRenderingContext; gl: WebGLRenderingContext;
program: WebGLProgram; program: WebGLProgram;
attributes: any; attributes: any;
uniformData: any; uniformData: any;
uniforms: any; uniforms: any;
constructor(gl: WebGLRenderingContext, vertexSrc: string, fragmentSrc: string, precision?: string, attributeLocations?: any); constructor(gl: WebGLRenderingContext, vertexSrc: string, fragmentSrc: string, precision?: string, attributeLocations?: any);
bind(): this; bind(): this;
destroy(): void; destroy(): void;
} }
export class GLTexture { export class GLTexture {
gl: WebGLRenderingContext; gl: WebGLRenderingContext;
texture: WebGLTexture; texture: WebGLTexture;
mipmap: boolean; mipmap: boolean;
...@@ -1981,45 +2541,61 @@ export class GLTexture { ...@@ -1981,45 +2541,61 @@ export class GLTexture {
height: number; height: number;
format: any; format: any;
type: any; type: any;
constructor(gl: WebGLRenderingContext, width?: number, height?: number, format?: any, type?: any); constructor(gl: WebGLRenderingContext, width?: number, height?: number, format?: any, type?: any);
upload(source: any): void; upload(source: any): void;
uploadData: (data: any, width: any, height: any) => void; uploadData: (data: any, width: any, height: any) => void;
bind(location?: number): void; bind(location?: number): void;
unbind(): void; unbind(): void;
minFilter(linear: boolean): void; minFilter(linear: boolean): void;
magFilter(linear: boolean): void; magFilter(linear: boolean): void;
enableMipmap(): void; enableMipmap(): void;
enableLinearScaling(): void; enableLinearScaling(): void;
enableNearestScaling(): void; enableNearestScaling(): void;
enableWrapClamp(): void; enableWrapClamp(): void;
enableWrapRepeat(): void; enableWrapRepeat(): void;
enableWrapMirrorRepeat(): void; enableWrapMirrorRepeat(): void;
destroy(): void; destroy(): void;
static fromSource(gl: WebGLRenderingContext, source: HTMLImageElement | ImageData, premultiplyAlpha?: boolean): GLTexture; static fromSource(gl: WebGLRenderingContext, source: HTMLImageElement | ImageData, premultiplyAlpha?: boolean): GLTexture;
static fromData(gl: any, data: any, width: any, height: any): GLTexture; static fromData(gl: any, data: any, width: any, height: any): GLTexture;
} }
export function setVertexAttribArrays(gl: any, attribs: any, state?: any): void; export function setVertexAttribArrays(gl: any, attribs: any, state?: any): void;
export function compileProgram(gl: WebGLRenderingContext, vertexSrc: string, fragmentSrc: string, attributeLocations?: any): WebGLProgram; export function compileProgram(gl: WebGLRenderingContext, vertexSrc: string, fragmentSrc: string, attributeLocations?: any): WebGLProgram;
export function defaultValue(type: string, size: number): false | any[] | 0 | Float32Array; export function defaultValue(type: string, size: number): false | any[] | 0 | Float32Array;
export function extractAttributes(gl: WebGLRenderingContext, program: WebGLProgram): {}; export function extractAttributes(gl: WebGLRenderingContext, program: WebGLProgram): {};
export function extractUniforms(gl: WebGLRenderingContext, program: WebGLProgram): {}; export function extractUniforms(gl: WebGLRenderingContext, program: WebGLProgram): {};
export function generateUniformAccessObject(gl: WebGLRenderingContext, uniformData: any): { export function generateUniformAccessObject(gl: WebGLRenderingContext, uniformData: any): {
data: {}; data: {};
} }
export function mapSize(type: string): number; export function mapSize(type: string): number;
export function mapType(gl: any, type: any): any; export function mapType(gl: any, type: any): any;
export function setPrecision(src: string, precision: string): string; export function setPrecision(src: string, precision: string): string;
export class VertexArrayObject { export class VertexArrayObject {
nativeVaoExtension: any; nativeVaoExtension: any;
nativeState: any; nativeState: any;
nativeVao: any; nativeVao: any;
...@@ -2027,26 +2603,37 @@ export class VertexArrayObject { ...@@ -2027,26 +2603,37 @@ export class VertexArrayObject {
attributes: any[]; attributes: any[];
indexBuffer: any; indexBuffer: any;
dirty: boolean; dirty: boolean;
constructor(gl: WebGLRenderingContext, state: any); constructor(gl: WebGLRenderingContext, state: any);
bind(): this; bind(): this;
unbind(): this; unbind(): this;
activate(): this; activate(): this;
addAttribute(buffer: any, attribute: any, type?: any, normalized?: any, stride?: any, start?: any): this; addAttribute(buffer: any, attribute: any, type?: any, normalized?: any, stride?: any, start?: any): this;
addIndex(buffer: any): this; addIndex(buffer: any): this;
clear(): this; clear(): this;
draw(type: any, size?: any, start?: any): this; draw(type: any, size?: any, start?: any): this;
destroy(): void; destroy(): void;
getSize(): number; getSize(): number;
static FORCE_NATIVE: boolean; static FORCE_NATIVE: boolean;
} }
export function setProcessMetaLibs(...metaContexts: any[]): void; export function setProcessMetaLibs(...metaContexts: any[]): void;
export function setGlobalContext(context: any): void; export function setGlobalContext(context: any): void;
export function executeBehavior(sequence: any, subEntry: string, target: any, args?: any): void; export function executeBehavior(sequence: any, subEntry: string, target: any, args?: any): void;
export class Process { export class Process {
private _config; private _config;
private _parent; private _parent;
private _vm; private _vm;
...@@ -2054,126 +2641,166 @@ export class Process { ...@@ -2054,126 +2641,166 @@ export class Process {
private _meta; private _meta;
private _target; private _target;
private _originProps; private _originProps;
constructor(); constructor();
readonly processConfig: any; readonly processConfig: any;
readonly parent: Process; readonly parent: Process;
readonly sequence: any; readonly sequence: any;
init(context: any): void; init(context: any): void;
execute(args: any): Promise<any>; execute(args: any): Promise<any>;
_executeMetaScript(type: any, payload: any, meta: any): Promise<{ _executeMetaScript(type: any, payload: any, meta: any): Promise<{
type: any; type: any;
payload: any; payload: any;
}>; }>;
_executeSubProcess(type: any, payload: any): Promise<{ _executeSubProcess(type: any, payload: any): Promise<{
type: any; type: any;
payload: any; payload: any;
}>; }>;
_executeNextProcess(type: any, payload: any): Promise<{ _executeNextProcess(type: any, payload: any): Promise<{
type: any; type: any;
payload: any; payload: any;
}>; }>;
getProcessMeta(id: any): any; getProcessMeta(id: any): any;
getProps(key?: any): any; getProps(key?: any): any;
updateProps(args: any): void; updateProps(args: any): void;
resolveLinkedProp(data: any, key: any): any; resolveLinkedProp(data: any, key: any): any;
} }
export class VM { export class VM {
_processMetaLibs: any; _processMetaLibs: any;
_globalContext: any; _globalContext: any;
_target: any; _target: any;
_id: any; _id: any;
setup(context: any): void; setup(context: any): void;
executeProcess(sequence: any, id: any, parentProcess: any, args: any): Promise<any>; executeProcess(sequence: any, id: any, parentProcess: any, args: any): Promise<any>;
getMeta(id: any): any; getMeta(id: any): any;
readonly globalContext: any; readonly globalContext: any;
readonly id: any; readonly id: any;
} }
export function fieldChanged(onModify: any): (target: any, key: string) => void; export function fieldChanged(onModify: any): (target: any, key: string) => void;
export const dirtyFieldDetector: (target: any, key: string) => void; export const dirtyFieldDetector: (target: any, key: string) => void;
export const deepDirtyFieldDetector: (target: any, key: string) => void; export const deepDirtyFieldDetector: (target: any, key: string) => void;
export const dirtyFieldTrigger: (target: any, key: string) => void; export const dirtyFieldTrigger: (target: any, key: string) => void;
export const deepDirtyFieldTrigger: (target: any, key: string) => void; export const deepDirtyFieldTrigger: (target: any, key: string) => void;
export function afterConstructor(ctor: Function): void; export function afterConstructor(ctor: Function): void;
export function applyAutoAdjust(ctor: Function): void; export function applyAutoAdjust(ctor: Function): void;
export const globalEvent: EventDispatcher; export const globalEvent: EventDispatcher;
export const DATA_CENTER_EVENT: string; export const DATA_CENTER_EVENT: string;
export function applyEvents(ctor: Function): void; export function applyEvents(ctor: Function): void;
export function applyScript(ctor: Function): void; export function applyScript(ctor: Function): void;
export class ScriptBase { export class ScriptBase {
private _host; private _host;
disabled: boolean; disabled: boolean;
readonly host: Container; readonly host: Container;
mounted(): void; mounted(): void;
destroy(): void; destroy(): void;
update(t: number): void; update(t: number): void;
awake(): void; awake(): void;
sleep(): void; sleep(): void;
} }
export function registerScriptDef(id: any, def: any): void; export function registerScriptDef(id: any, def: any): void;
export function registerScripts(scripts: any): void; export function registerScripts(scripts: any): void;
export function loadAssets(config: any, onProgress?: any, onComplete?: any): Promise<never>; export function loadAssets(config: any, onProgress?: any, onComplete?: any): Promise<never>;
export function getAssetByUUID(uuid: any): any; export function getAssetByUUID(uuid: any): any;
export function getAssetByName(name: any): any; export function getAssetByName(name: any): any;
export class DataCenter extends EventDispatcher { export class DataCenter extends EventDispatcher {
store: {}; store: {};
watchers: any[]; watchers: any[];
constructor(); constructor();
registerGroup(name: any, origin?: any): void; registerGroup(name: any, origin?: any): void;
unregisterGroup(name: any): void; unregisterGroup(name: any): void;
getGroup(name: any): any; getGroup(name: any): any;
getDataByPath(path: any, throwException?: any): any; getDataByPath(path: any, throwException?: any): any;
getDataByName(name: any, throwException?: any): any; getDataByName(name: any, throwException?: any): any;
formatString(str: any, escapes: any): any; formatString(str: any, escapes: any): any;
mutate(name: any, data?: any, path?: any, dispatch?: boolean): void; mutate(name: any, data?: any, path?: any, dispatch?: boolean): void;
watch(name: any, path: any): void; watch(name: any, path: any): void;
getWatcher(name: any): any; getWatcher(name: any): any;
registerDataMapping(dataMapping: any): void; registerDataMapping(dataMapping: any): void;
} }
export const dataCenter: DataCenter; export const dataCenter: DataCenter;
export let env: any; export let env: any;
export function injectEnv(data: any): void; export function injectEnv(data: any): void;
export class GameStage extends Container { export class GameStage extends Container {
private _sceneContainer; private _sceneContainer;
private _popupContainer; private _popupContainer;
private _blackLayer; private _blackLayer;
private _stage; private _stage;
private _dataCenter; private _dataCenter;
private _config; private _config;
constructor(stage: Stage); constructor(stage: Stage);
readonly sceneContainer: StackContainer; readonly sceneContainer: StackContainer;
readonly popupContainer: StackContainer; readonly popupContainer: StackContainer;
readonly dataCenter: DataCenter; readonly dataCenter: DataCenter;
launch(config: any, onAssetsProgress: any, onAssetsComplete: any): void; launch(config: any, onAssetsProgress: any, onAssetsComplete: any): void;
start(): void; start(): void;
getViewConfigByName(name: any): any; getViewConfigByName(name: any): any;
instantiateView(name, cache = true):any;
setBlackLayerVisible(visible: any): void; setBlackLayerVisible(visible: any): void;
onPopupContainerChange(e: any): void; onPopupContainerChange(e: any): void;
} }
export class Image extends Sprite { export class Image extends Sprite {
private _originText; private _originText;
private _escapes; private _escapes;
private _registeredEvents; private _registeredEvents;
...@@ -2184,77 +2811,88 @@ export class Image extends Sprite { ...@@ -2184,77 +2811,88 @@ export class Image extends Sprite {
private _setSource; private _setSource;
private unregisterEvents; private unregisterEvents;
private onDataMutated; private onDataMutated;
} }
export class Label extends TextField { export class Label extends TextField {
private _originText; private _originText;
private _escapes; private _escapes;
private _registeredEvents; private _registeredEvents;
protected _setText(value: any): void; protected _setText(value: any): void;
private unregisterEvents; private unregisterEvents;
private onDataMutated; private onDataMutated;
} }
export class ShapeBase extends Shape { export class ShapeBase extends Shape {
protected __fieldDirty: boolean; protected __fieldDirty: boolean;
fillColor: any; fillColor: any;
strokeColor: any; strokeColor: any;
strokeWidth: number; strokeWidth: number;
constructor(); constructor();
private onResize; private onResize;
private onEnterFrame; private onEnterFrame;
protected redraw(): void; protected redraw(): void;
} }
export class Rect extends ShapeBase { export class Rect extends ShapeBase {
borderRadius: number; borderRadius: number;
protected redraw(): void; protected redraw(): void;
} }
export class Circle extends ShapeBase { export class Circle extends ShapeBase {
protected redraw(): void; protected redraw(): void;
} }
export {}; export {};
export class StackContainer extends Container { export class StackContainer extends Container {
private _mutex; private _mutex;
constructor(mutex?: boolean); constructor(mutex?: boolean);
push(view: DisplayObject, options?: any, dispatch?: boolean): void; push(view: DisplayObject, options?: any, dispatch?: boolean): void;
replace(view: DisplayObject, options?: any): void; replace(view: DisplayObject, options?: any): void;
pop(): boolean; pop(): boolean;
popAll(view?: DisplayObject, options?: any): void; popAll(view?: DisplayObject, options?: any): void;
} }
export function instantiate(config: any): any; export function instantiate(config: any): any;
export { instantiate }; export {instantiate};
export let gameStage: any; export let gameStage: any;
export function launch(url: any, onAssetsProgress: any, onAssetsComplete: any): Promise<{}>; export function launch(url: any, onAssetsProgress: any, onAssetsComplete: any): Promise<{}>;
export function launchWithConfig(config: any, onAssetsProgress: any, onAssetsComplete: any): Promise<{}>; export function launchWithConfig(config: any, onAssetsProgress: any, onAssetsComplete: any): Promise<{}>;
export function findNodeByUUID(node: any, uuid: any): any; export function findNodeByUUID(node: any, uuid: any): any;
export const ESCAPE_REG_EXP: RegExp; export const ESCAPE_REG_EXP: RegExp;
export const linkedFlag = "$_linked_$"; export const linkedFlag = "$_linked_$";
export const nodeScheme = "node://"; export const nodeScheme = "node://";
export function arrayFind(arr: any, callback: any): any; export function arrayFind(arr: any, callback: any): any;
export function objClone(obj: any): any; export function objClone(obj: any): any;
export function propertyParse(key: any, node: any, properties: any): void; export function propertyParse(key: any, node: any, properties: any): void;
export function getDataByPath(scope: any, path: any, throwException?: any): any; export function getDataByPath(scope: any, path: any, throwException?: any): any;
export function injectProp(target: any, data?: any, callback?: Function, ignoreMethod?: boolean, ignoreNull?: boolean): boolean; export function injectProp(target: any, data?: any, callback?: Function, ignoreMethod?: boolean, ignoreNull?: boolean): boolean;
export function copyProp(target: any, data: any, config?: any): void; export function copyProp(target: any, data: any, config?: any): void;
export function obj2query(obj: any): string; export function obj2query(obj: any): string;
} }
...@@ -5,13 +5,21 @@ ...@@ -5,13 +5,21 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build-process": "node scripts/compiler-process", "build-process": "node scripts/compiler-process",
"build-script": "node scripts/compiler-script" "build-script": "node scripts/compiler-script",
"build-custom": "node scripts/compiler-custom"
}, },
"devDependencies": { "devDependencies": {
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-progress": "^1.1.1",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-uglify": "^6.0.3",
"tslib": "^1.10.0",
"typescript": "^3.7.2" "typescript": "^3.7.2"
}, },
"dependencies": { "dependencies": {
"glob": "^7.1.6" "glob": "^7.1.6",
"rollup": "^1.27.4"
} }
} }
/**
* Created by rockyl on 2018/11/16.
*/
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const progress = require('rollup-plugin-progress');
const typescript = require('rollup-plugin-typescript');
const {uglify} = require('rollup-plugin-uglify');
export default {
input: 'src/custom/test1/index.ts',
output: [
{
file: `dist/customs/test1.js`,
format: 'cjs',
name: 'test1',
sourcemap: true,
}
],
plugins: [
progress(),
resolve({
//only: [/^\.{0,2}\//],
}),
typescript({
//useTsconfigDeclarationDir: true,
}),
commonjs(),
//uglify({}),
]
};
/**
* Created by rockyl on 2019-11-17.
*/
const {compile} = require('./rollup-compiler');
const fs = require('fs-extra');
const path = require('path');
const glob = require('glob');
const tsconfig = fs.readJsonSync('tsconfig.json');
//tsconfig.compilerOptions.module = 'umd';
//prepare(tsconfig, process.cwd());
const [_, __, sourcePath, outputPath = 'dist/customs'] = process.argv;
(async function(){
if (sourcePath) {
await compileProcess(sourcePath, outputPath);
} else {
const files = glob.sync('*', {cwd: process.cwd() + '/src/custom'});
for (let file of files) {
await compileProcess(file, outputPath);
}
}
console.log('complete!');
})();
async function compileProcess(sourcePath, output) {
const id = sourcePath;
const meta = fs.readJsonSync(path.join('src/custom/' + sourcePath, 'meta.json'));
const {code} = await compile('src/custom/' + sourcePath + '/index.ts');
meta.id = id;
meta.code = code;
const outputPath = path.join(output, sourcePath);
fs.ensureDirSync(path.dirname(outputPath));
fs.writeJsonSync(outputPath + '.json', meta, {spaces: ' '});
fs.writeFileSync(outputPath + '.js', code);
/*fs.writeJsonSync(outputPath + '-req.json', {
data: JSON.stringify(meta)
});*/
console.log(`compile custom [${sourcePath}] successfully!`);
}
...@@ -16,7 +16,7 @@ const isBuiltin = builtin ? builtin === 'builtin' : true; ...@@ -16,7 +16,7 @@ const isBuiltin = builtin ? builtin === 'builtin' : true;
if (sourcePath) { if (sourcePath) {
compileProcess(sourcePath, outputPath, isBuiltin); compileProcess(sourcePath, outputPath, isBuiltin);
} else { } else {
const files = glob.sync('*/*', {cwd: process.cwd() + '/process'}); const files = glob.sync('*/*', {cwd: process.cwd() + '/src/process'});
for (let file of files) { for (let file of files) {
compileProcess(file, outputPath, isBuiltin); compileProcess(file, outputPath, isBuiltin);
} }
...@@ -28,8 +28,8 @@ function compileProcess(sourcePath, output, isBuiltin) { ...@@ -28,8 +28,8 @@ function compileProcess(sourcePath, output, isBuiltin) {
const arr = sourcePath.split('/'); const arr = sourcePath.split('/');
const group = arr[0]; const group = arr[0];
const id = arr[1]; const id = arr[1];
const meta = fs.readJsonSync(path.join('process/' + sourcePath, 'meta.json')); const meta = fs.readJsonSync(path.join('src/process/' + sourcePath, 'meta.json'));
const {code} = compile('process/' + sourcePath); const {code} = compile('src/process/' + sourcePath);
meta.id = id; meta.id = id;
meta.script = code; meta.script = code;
meta.group = group; meta.group = group;
......
...@@ -15,7 +15,7 @@ const [_, __, sourcePath, outputPath = 'dist/scripts'] = process.argv; ...@@ -15,7 +15,7 @@ const [_, __, sourcePath, outputPath = 'dist/scripts'] = process.argv;
if (sourcePath) { if (sourcePath) {
compileProcess(sourcePath, outputPath); compileProcess(sourcePath, outputPath);
} else { } else {
const files = glob.sync('*', {cwd: process.cwd() + '/script'}); const files = glob.sync('*', {cwd: process.cwd() + '/src/script'});
for (let file of files) { for (let file of files) {
compileProcess(file, outputPath); compileProcess(file, outputPath);
} }
...@@ -25,8 +25,8 @@ console.log('complete!'); ...@@ -25,8 +25,8 @@ console.log('complete!');
function compileProcess(sourcePath, output) { function compileProcess(sourcePath, output) {
const id = sourcePath; const id = sourcePath;
const meta = fs.readJsonSync(path.join('script/' + sourcePath, 'meta.json')); const meta = fs.readJsonSync(path.join('src/script/' + sourcePath, 'meta.json'));
const {code} = compile('script/' + sourcePath); const {code} = compile('src/script/' + sourcePath);
meta.id = id; meta.id = id;
meta.code = code; meta.code = code;
...@@ -38,5 +38,5 @@ function compileProcess(sourcePath, output) { ...@@ -38,5 +38,5 @@ function compileProcess(sourcePath, output) {
data: JSON.stringify(meta) data: JSON.stringify(meta)
});*/ });*/
console.log(`compile process [${sourcePath}] successfully!`); console.log(`compile script [${sourcePath}] successfully!`);
} }
/**
* Created by rockyl on 2019-11-22.
*/
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const progress = require('rollup-plugin-progress');
const typescript = require('rollup-plugin-typescript');
const {uglify} = require('rollup-plugin-uglify');
const rollup = require('rollup');
const fs = require('fs');
const tslib = fs.readFileSync(__dirname + '/tslib.es6.js', 'utf-8');
exports.compile = async function(file){
let plugins = [
progress(),
resolve({
//only: [/^\.{0,2}\//],
}),
typescript({
tslib,
//useTsconfigDeclarationDir: true,
}),
commonjs(),
//uglify({}),
];
let writeConfig = {
format: 'cjs',
};
const bundle = await rollup.rollup({
input: file,
plugins,
onwarn: warning => {
console.log(warning);
}
});
const {output: [result]} = await bundle.generate(writeConfig);
return result;
};
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
export function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
export var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
export function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
export function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
export function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
export function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
export function __awaiter(thisArg, _arguments, P, generator) {
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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
export function __generator(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 };
}
}
export function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
export function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
export function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
export function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
export function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
export function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
export function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
export function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
export function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
export function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
export function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
export function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
/**
* Created by rockyl on 2019-11-22.
*/
export class Test1 extends engine.Container{
constructor(){
super();
let rect = new engine.Rect();
rect.width = 100;
rect.height = 100;
this.addChild(rect);
}
}
/**
* Created by rockyl on 2019-11-20.
*/
import {Test1} from "./Test1";
export default function(options){
let instance = new Test1();
return instance;
}
{
"name": "Test1",
"props": {
},
"assets": [
{
"url": "//yun.duiba.com.cn/aurora/af90069732223c75818c4799b3130bd0f0ad4ff8.png",
"ext": ".png"
}
]
}
\ No newline at end of file
/**
* Created by rockyl on 2019-11-16.
*/
engine.addCustomModule(props.id, props.target || target);
next('complete');
{
"name": "添加自定义模块",
"desc": "添加自定义模块",
"props": {
"id": {
"alias": "模块ID",
"type": "string"
},
"target": {
"type": "node",
"alias": "目标节点"
}
},
"output": [
"complete"
]
}
\ No newline at end of file
...@@ -7,12 +7,9 @@ if (!props.viewName) { ...@@ -7,12 +7,9 @@ if (!props.viewName) {
next('exception', '没有设置视图名'); next('exception', '没有设置视图名');
}else{ }else{
let gameStage = engine.gameStage; let gameStage = engine.gameStage;
let viewConfig = gameStage.getViewConfigByName(props.viewName); let view = gameStage.instantiateView(props.viewName);
if (viewConfig) { if (view) {
let view = engine.instantiate(viewConfig); gameStage.popupContainer.push(view);
gameStage.popupContainer.push(view, {center: props.center});
} else {
console.error('view config not exists');
} }
next('complete'); next('complete');
......
...@@ -7,12 +7,9 @@ if (!props.viewName) { ...@@ -7,12 +7,9 @@ if (!props.viewName) {
next('exception', '没有设置视图名'); next('exception', '没有设置视图名');
}else{ }else{
let gameStage = engine.gameStage; let gameStage = engine.gameStage;
let viewConfig = gameStage.getViewConfigByName(props.viewName); let view = gameStage.instantiateView(props.viewName);
if (viewConfig) { if (view) {
let view = engine.instantiate(viewConfig);
gameStage.sceneContainer.push(view); gameStage.sceneContainer.push(view);
} else {
console.error('view config not exists');
} }
next('complete'); next('complete');
......
...@@ -31,7 +31,6 @@ function fill(src) { ...@@ -31,7 +31,6 @@ function fill(src) {
for (let key in engine.env) { for (let key in engine.env) {
result = result.replace(key, engine.env[key]); result = result.replace(key, engine.env[key]);
} }
console.log(result);
return result; return result;
} }
......
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
}, },
"include": [ "include": [
"libs", "libs",
"process", "src"
"script"
], ],
"exclude": [ "exclude": [
"node_modules" "node_modules"
......
...@@ -2,6 +2,51 @@ ...@@ -2,6 +2,51 @@
# yarn lockfile v1 # yarn lockfile v1
"@babel/code-frame@^7.0.0":
version "7.5.5"
resolved "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d"
integrity sha1-vAeC9tafe31JUxIZaZuYj2aaj50=
dependencies:
"@babel/highlight" "^7.0.0"
"@babel/highlight@^7.0.0":
version "7.5.0"
resolved "https://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540"
integrity sha1-VtETEr2SSPphlZHQJHK+boyzJUA=
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^4.0.0"
"@types/estree@*", "@types/estree@0.0.39":
version "0.0.39"
resolved "https://registry.npm.taobao.org/@types/estree/download/@types/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
integrity sha1-4Xfmme4bjCLSMXTKqnQiZEOJUJ8=
"@types/node@*":
version "12.12.11"
resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-12.12.11.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-12.12.11.tgz#bec2961975888d964196bf0016a2f984d793d3ce"
integrity sha1-vsKWGXWIjZZBlr8AFqL5hNeT084=
"@types/resolve@0.0.8":
version "0.0.8"
resolved "https://registry.npm.taobao.org/@types/resolve/download/@types/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194"
integrity sha1-8mB00jjgJlnjI84aE9BB7uKA4ZQ=
dependencies:
"@types/node" "*"
acorn@^7.1.0:
version "7.1.0"
resolved "https://registry.npm.taobao.org/acorn/download/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
integrity sha1-lJ028sKSU12mAig1hsJHfFfrLWw=
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1573557628456&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=
dependencies:
color-convert "^1.9.0"
balanced-match@^1.0.0: balanced-match@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
...@@ -15,11 +60,57 @@ brace-expansion@^1.1.7: ...@@ -15,11 +60,57 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0" balanced-match "^1.0.0"
concat-map "0.0.1" concat-map "0.0.1"
builtin-modules@^3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/builtin-modules/download/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484"
integrity sha1-qtl8FRMet2tltQ7yCOdYTNdqdIQ=
chalk@^2.0.0, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=
dependencies:
color-name "1.1.3"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
commander@~2.20.3:
version "2.20.3"
resolved "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1573464045808&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=
concat-map@0.0.1: concat-map@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
estree-walker@^0.6.1:
version "0.6.1"
resolved "https://registry.npm.taobao.org/estree-walker/download/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
integrity sha1-UwSRQ/QMbrkYsjZx0f4yGfOhs2I=
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=
fs-extra@^8.1.0: fs-extra@^8.1.0:
version "8.1.0" version "8.1.0"
resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
...@@ -51,6 +142,11 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: ...@@ -51,6 +142,11 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0:
resolved "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" resolved "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
integrity sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM= integrity sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM=
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
inflight@^1.0.4: inflight@^1.0.4:
version "1.0.6" version "1.0.6"
resolved "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" resolved "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
...@@ -64,6 +160,31 @@ inherits@2: ...@@ -64,6 +160,31 @@ inherits@2:
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finherits%2Fdownload%2Finherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finherits%2Fdownload%2Finherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w= integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=
is-module@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/is-module/download/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=
is-reference@^1.1.2:
version "1.1.4"
resolved "https://registry.npm.taobao.org/is-reference/download/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427"
integrity sha1-P5WEmIbdtwJWo+bQYrGmjBPFFCc=
dependencies:
"@types/estree" "0.0.39"
jest-worker@^24.0.0:
version "24.9.0"
resolved "https://registry.npm.taobao.org/jest-worker/download/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5"
integrity sha1-Xb/bWy0yLphWeJgjipaXvM5ns+U=
dependencies:
merge-stream "^2.0.0"
supports-color "^6.1.0"
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha1-GSA/tZmR35jjoocFDUZHzerzJJk=
jsonfile@^4.0.0: jsonfile@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" resolved "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
...@@ -71,6 +192,18 @@ jsonfile@^4.0.0: ...@@ -71,6 +192,18 @@ jsonfile@^4.0.0:
optionalDependencies: optionalDependencies:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
magic-string@^0.25.2:
version "0.25.4"
resolved "https://registry.npm.taobao.org/magic-string/download/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143"
integrity sha1-MluKCnn8Qj2xCbd/1aGRg7e6UUM=
dependencies:
sourcemap-codec "^1.4.4"
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=
minimatch@^3.0.4: minimatch@^3.0.4:
version "3.0.4" version "3.0.4"
resolved "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimatch%2Fdownload%2Fminimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" resolved "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimatch%2Fdownload%2Fminimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
...@@ -90,11 +223,128 @@ path-is-absolute@^1.0.0: ...@@ -90,11 +223,128 @@ path-is-absolute@^1.0.0:
resolved "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" resolved "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=
resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1:
version "1.12.1"
resolved "https://registry.npm.taobao.org/resolve/download/resolve-1.12.1.tgz#a17d6368ffafb9dd14b584cac7940f9219ac55bb"
integrity sha1-oX1jaP+vud0UtYTKx5QPkhmsVbs=
dependencies:
path-parse "^1.0.6"
rollup-plugin-commonjs@^10.1.0:
version "10.1.0"
resolved "https://registry.npm.taobao.org/rollup-plugin-commonjs/download/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb"
integrity sha1-QXrztUUDh44ITRJ6300cr4vrhvs=
dependencies:
estree-walker "^0.6.1"
is-reference "^1.1.2"
magic-string "^0.25.2"
resolve "^1.11.0"
rollup-pluginutils "^2.8.1"
rollup-plugin-node-resolve@^5.2.0:
version "5.2.0"
resolved "https://registry.npm.taobao.org/rollup-plugin-node-resolve/download/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523"
integrity sha1-cw+T0Q7SAkc7H7VKWZen24xthSM=
dependencies:
"@types/resolve" "0.0.8"
builtin-modules "^3.1.0"
is-module "^1.0.0"
resolve "^1.11.1"
rollup-pluginutils "^2.8.1"
rollup-plugin-progress@^1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/rollup-plugin-progress/download/rollup-plugin-progress-1.1.1.tgz#fcce2f915d545014ac89ea0927ee97cb48052f60"
integrity sha1-/M4vkV1UUBSsieoJJ+6Xy0gFL2A=
dependencies:
chalk "^2.4.2"
rollup-plugin-typescript@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/rollup-plugin-typescript/download/rollup-plugin-typescript-1.0.1.tgz#86565033b714c3d1f3aba510aad3dc519f7091e9"
integrity sha1-hlZQM7cUw9Hzq6UQqtPcUZ9wkek=
dependencies:
resolve "^1.10.0"
rollup-pluginutils "^2.5.0"
rollup-plugin-uglify@^6.0.3:
version "6.0.3"
resolved "https://registry.npm.taobao.org/rollup-plugin-uglify/download/rollup-plugin-uglify-6.0.3.tgz#e3f776171344b580bec6c6ab8888622b67099457"
integrity sha1-4/d2FxNEtYC+xsariIhiK2cJlFc=
dependencies:
"@babel/code-frame" "^7.0.0"
jest-worker "^24.0.0"
serialize-javascript "^1.9.0"
uglify-js "^3.4.9"
rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1:
version "2.8.2"
resolved "https://registry.npm.taobao.org/rollup-pluginutils/download/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha1-cvKvB0i1kjZNvTOJ5gDlqURKNR4=
dependencies:
estree-walker "^0.6.1"
rollup@^1.27.4:
version "1.27.4"
resolved "https://registry.npm.taobao.org/rollup/download/rollup-1.27.4.tgz?cache=0&sync_timestamp=1574409829143&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frollup%2Fdownload%2Frollup-1.27.4.tgz#5bca607a10c99c034288de9f9c756f9fe1a08431"
integrity sha1-W8pgehDJnANCiN6fnHVvn+GghDE=
dependencies:
"@types/estree" "*"
"@types/node" "*"
acorn "^7.1.0"
serialize-javascript@^1.9.0:
version "1.9.1"
resolved "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb"
integrity sha1-z8IArvd7YAxH2pu4FJyUPnmML9s=
source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM=
sourcemap-codec@^1.4.4:
version "1.4.6"
resolved "https://registry.npm.taobao.org/sourcemap-codec/download/sourcemap-codec-1.4.6.tgz#e30a74f0402bad09807640d39e971090a08ce1e9"
integrity sha1-4wp08EArrQmAdkDTnpcQkKCM4ek=
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=
dependencies:
has-flag "^3.0.0"
supports-color@^6.1.0:
version "6.1.0"
resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
integrity sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=
dependencies:
has-flag "^3.0.0"
tslib@^1.10.0:
version "1.10.0"
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo=
typescript@^3.7.2: typescript@^3.7.2:
version "3.7.2" version "3.7.2"
resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb" resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb"
integrity sha1-J+SJuV+lkJRF6f717kjYFpetGPs= integrity sha1-J+SJuV+lkJRF6f717kjYFpetGPs=
uglify-js@^3.4.9:
version "3.6.9"
resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.6.9.tgz?cache=0&sync_timestamp=1573593881633&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.6.9.tgz#85d353edb6ddfb62a9d798f36e91792249320611"
integrity sha1-hdNT7bbd+2Kp15jzbpF5IkkyBhE=
dependencies:
commander "~2.20.3"
source-map "~0.6.1"
universalify@^0.1.0: universalify@^0.1.0:
version "0.1.2" version "0.1.2"
resolved "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" resolved "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
......
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