@eva/plugin-renderer-graphics 1.2.7-fix.4 → 1.2.7-fix.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EVA.plugin.renderer.graphics.js +64 -13
- package/dist/EVA.plugin.renderer.graphics.js.map +1 -0
- package/dist/EVA.plugin.renderer.graphics.min.js +1 -1
- package/dist/miniprogram.js +14 -0
- package/dist/plugin-renderer-graphics.cjs.js.map +1 -0
- package/dist/plugin-renderer-graphics.cjs.prod.js +1 -1
- package/dist/plugin-renderer-graphics.esm.js.map +1 -0
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
window.EVA = window.EVA || {};
|
|
2
2
|
window.EVA.plugin = window.EVA.plugin || {};
|
|
3
3
|
window.EVA.plugin.renderer = window.EVA.plugin.renderer || {};
|
|
4
|
+
|
|
4
5
|
var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
5
6
|
'use strict';
|
|
6
7
|
|
|
@@ -14,30 +15,37 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
14
15
|
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
15
16
|
}
|
|
16
17
|
};
|
|
18
|
+
|
|
17
19
|
return _extendStatics(d, b);
|
|
18
20
|
};
|
|
21
|
+
|
|
19
22
|
function __extends(d, b) {
|
|
20
23
|
_extendStatics(d, b);
|
|
24
|
+
|
|
21
25
|
function __() {
|
|
22
26
|
this.constructor = d;
|
|
23
27
|
}
|
|
28
|
+
|
|
24
29
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
25
30
|
}
|
|
31
|
+
|
|
26
32
|
function __decorate(decorators, target, key, desc) {
|
|
27
33
|
var c = arguments.length,
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
35
|
+
d;
|
|
30
36
|
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--) {
|
|
31
37
|
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
32
38
|
}
|
|
33
39
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
34
40
|
}
|
|
41
|
+
|
|
35
42
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
36
43
|
function adopt(value) {
|
|
37
44
|
return value instanceof P ? value : new P(function (resolve) {
|
|
38
45
|
resolve(value);
|
|
39
46
|
});
|
|
40
47
|
}
|
|
48
|
+
|
|
41
49
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
50
|
function fulfilled(value) {
|
|
43
51
|
try {
|
|
@@ -46,6 +54,7 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
46
54
|
reject(e);
|
|
47
55
|
}
|
|
48
56
|
}
|
|
57
|
+
|
|
49
58
|
function rejected(value) {
|
|
50
59
|
try {
|
|
51
60
|
step(generator["throw"](value));
|
|
@@ -53,26 +62,29 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
53
62
|
reject(e);
|
|
54
63
|
}
|
|
55
64
|
}
|
|
65
|
+
|
|
56
66
|
function step(result) {
|
|
57
67
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
58
68
|
}
|
|
69
|
+
|
|
59
70
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
60
71
|
});
|
|
61
72
|
}
|
|
73
|
+
|
|
62
74
|
function __generator(thisArg, body) {
|
|
63
75
|
var _ = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
trys: [],
|
|
70
|
-
ops: []
|
|
76
|
+
label: 0,
|
|
77
|
+
sent: function sent() {
|
|
78
|
+
if (t[0] & 1) throw t[1];
|
|
79
|
+
return t[1];
|
|
71
80
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
trys: [],
|
|
82
|
+
ops: []
|
|
83
|
+
},
|
|
84
|
+
f,
|
|
85
|
+
y,
|
|
86
|
+
t,
|
|
87
|
+
g;
|
|
76
88
|
return g = {
|
|
77
89
|
next: verb(0),
|
|
78
90
|
"throw": verb(1),
|
|
@@ -80,60 +92,79 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
80
92
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
81
93
|
return this;
|
|
82
94
|
}), g;
|
|
95
|
+
|
|
83
96
|
function verb(n) {
|
|
84
97
|
return function (v) {
|
|
85
98
|
return step([n, v]);
|
|
86
99
|
};
|
|
87
100
|
}
|
|
101
|
+
|
|
88
102
|
function step(op) {
|
|
89
103
|
if (f) throw new TypeError("Generator is already executing.");
|
|
104
|
+
|
|
90
105
|
while (_) {
|
|
91
106
|
try {
|
|
92
107
|
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;
|
|
93
108
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
109
|
+
|
|
94
110
|
switch (op[0]) {
|
|
95
111
|
case 0:
|
|
96
112
|
case 1:
|
|
97
113
|
t = op;
|
|
98
114
|
break;
|
|
115
|
+
|
|
99
116
|
case 4:
|
|
100
117
|
_.label++;
|
|
101
118
|
return {
|
|
102
119
|
value: op[1],
|
|
103
120
|
done: false
|
|
104
121
|
};
|
|
122
|
+
|
|
105
123
|
case 5:
|
|
106
124
|
_.label++;
|
|
107
125
|
y = op[1];
|
|
108
126
|
op = [0];
|
|
109
127
|
continue;
|
|
128
|
+
|
|
110
129
|
case 7:
|
|
111
130
|
op = _.ops.pop();
|
|
131
|
+
|
|
112
132
|
_.trys.pop();
|
|
133
|
+
|
|
113
134
|
continue;
|
|
135
|
+
|
|
114
136
|
default:
|
|
115
137
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
116
138
|
_ = 0;
|
|
117
139
|
continue;
|
|
118
140
|
}
|
|
141
|
+
|
|
119
142
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
120
143
|
_.label = op[1];
|
|
121
144
|
break;
|
|
122
145
|
}
|
|
146
|
+
|
|
123
147
|
if (op[0] === 6 && _.label < t[1]) {
|
|
124
148
|
_.label = t[1];
|
|
125
149
|
t = op;
|
|
126
150
|
break;
|
|
127
151
|
}
|
|
152
|
+
|
|
128
153
|
if (t && _.label < t[2]) {
|
|
129
154
|
_.label = t[2];
|
|
155
|
+
|
|
130
156
|
_.ops.push(op);
|
|
157
|
+
|
|
131
158
|
break;
|
|
132
159
|
}
|
|
160
|
+
|
|
133
161
|
if (t[2]) _.ops.pop();
|
|
162
|
+
|
|
134
163
|
_.trys.pop();
|
|
164
|
+
|
|
135
165
|
continue;
|
|
136
166
|
}
|
|
167
|
+
|
|
137
168
|
op = body.call(thisArg, _);
|
|
138
169
|
} catch (e) {
|
|
139
170
|
op = [6, e];
|
|
@@ -142,6 +173,7 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
142
173
|
f = t = 0;
|
|
143
174
|
}
|
|
144
175
|
}
|
|
176
|
+
|
|
145
177
|
if (op[0] & 5) throw op[1];
|
|
146
178
|
return {
|
|
147
179
|
value: op[0] ? op[1] : void 0,
|
|
@@ -149,39 +181,54 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
149
181
|
};
|
|
150
182
|
}
|
|
151
183
|
}
|
|
184
|
+
|
|
152
185
|
var Graphics$4 = function (_super) {
|
|
153
186
|
__extends(Graphics, _super);
|
|
187
|
+
|
|
154
188
|
function Graphics() {
|
|
155
189
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
156
190
|
}
|
|
191
|
+
|
|
157
192
|
return Graphics;
|
|
158
193
|
}(pixi_js.Graphics);
|
|
194
|
+
|
|
159
195
|
var GraphicsEngine = Graphics$4;
|
|
196
|
+
|
|
160
197
|
var Graphics$2 = function (_super) {
|
|
161
198
|
__extends(Graphics, _super);
|
|
199
|
+
|
|
162
200
|
function Graphics() {
|
|
163
201
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
202
|
+
|
|
164
203
|
_this.graphics = null;
|
|
165
204
|
return _this;
|
|
166
205
|
}
|
|
206
|
+
|
|
167
207
|
Graphics.prototype.init = function () {
|
|
168
208
|
this.graphics = new GraphicsEngine();
|
|
169
209
|
};
|
|
210
|
+
|
|
170
211
|
Graphics.componentName = 'Graphics';
|
|
171
212
|
return Graphics;
|
|
172
213
|
}(eva_js.Component);
|
|
214
|
+
|
|
173
215
|
var Graphics$3 = Graphics$2;
|
|
216
|
+
|
|
174
217
|
var Graphics = function (_super) {
|
|
175
218
|
__extends(Graphics, _super);
|
|
219
|
+
|
|
176
220
|
function Graphics() {
|
|
177
221
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
222
|
+
|
|
178
223
|
_this.name = 'Graphics';
|
|
179
224
|
return _this;
|
|
180
225
|
}
|
|
226
|
+
|
|
181
227
|
Graphics.prototype.init = function () {
|
|
182
228
|
this.renderSystem = this.game.getSystem(pluginRenderer.RendererSystem);
|
|
183
229
|
this.renderSystem.rendererManager.register(this);
|
|
184
230
|
};
|
|
231
|
+
|
|
185
232
|
Graphics.prototype.componentChanged = function (changed) {
|
|
186
233
|
return __awaiter(this, void 0, void 0, function () {
|
|
187
234
|
return __generator(this, function (_a) {
|
|
@@ -193,16 +240,19 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
193
240
|
children: true
|
|
194
241
|
});
|
|
195
242
|
}
|
|
243
|
+
|
|
196
244
|
return [2];
|
|
197
245
|
});
|
|
198
246
|
});
|
|
199
247
|
};
|
|
248
|
+
|
|
200
249
|
Graphics.systemName = 'Graphics';
|
|
201
250
|
Graphics = __decorate([eva_js.decorators.componentObserver({
|
|
202
251
|
Graphics: ['graphics']
|
|
203
252
|
})], Graphics);
|
|
204
253
|
return Graphics;
|
|
205
254
|
}(pluginRenderer.Renderer);
|
|
255
|
+
|
|
206
256
|
var Graphics$1 = Graphics;
|
|
207
257
|
exports.Graphics = Graphics$3;
|
|
208
258
|
exports.GraphicsSystem = Graphics$1;
|
|
@@ -211,4 +261,5 @@ var _EVA_IIFE_graphics = function (exports, eva_js, pixi_js, pluginRenderer) {
|
|
|
211
261
|
});
|
|
212
262
|
return exports;
|
|
213
263
|
}({}, EVA, PIXI, EVA.plugin.renderer);
|
|
264
|
+
|
|
214
265
|
window.EVA.plugin.renderer.graphics = window.EVA.plugin.renderer.graphics || _EVA_IIFE_graphics;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EVA.plugin.renderer.graphics.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../renderer-adapter/lib/Graphics.ts","../lib/component.ts","../lib/system.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\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 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\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) : adopt(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 __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") 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 throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\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\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Graphics as PIXIGraphics } from 'pixi.js';\nexport default class Graphics extends PIXIGraphics {\n [propName: string]: any;\n}\n","import { Component } from '@eva/eva.js';\nimport { Graphics as GraphicsEngine } from '@eva/renderer-adapter';\n\nexport default class Graphics extends Component {\n static componentName: string = 'Graphics';\n graphics: GraphicsEngine = null;\n init() {\n this.graphics = new GraphicsEngine();\n }\n}\n","import { Renderer, RendererSystem, RendererManager, ContainerManager } from '@eva/plugin-renderer';\nimport { decorators, ComponentChanged, OBSERVER_TYPE } from '@eva/eva.js';\nimport GraphicsComponent from './component';\n\n@decorators.componentObserver({\n Graphics: ['graphics'],\n})\nexport default class Graphics extends Renderer {\n static systemName = 'Graphics';\n\n name = 'Graphics';\n renderSystem: RendererSystem;\n rendererManager: RendererManager;\n containerManager: ContainerManager;\n\n init() {\n this.renderSystem = this.game.getSystem(RendererSystem) as RendererSystem;\n this.renderSystem.rendererManager.register(this);\n }\n\n async componentChanged(changed: ComponentChanged) {\n if (changed.type === OBSERVER_TYPE.ADD) {\n this.containerManager\n .getContainer(changed.gameObject.id)\n .addChildAt((changed.component as GraphicsComponent).graphics, 0);\n } else if (changed.type === OBSERVER_TYPE.REMOVE) {\n this.containerManager\n .getContainer(changed.gameObject.id)\n .removeChild((changed.component as GraphicsComponent).graphics);\n (changed.component as GraphicsComponent).graphics.destroy({ children: true });\n }\n }\n}\n"],"names":["PIXIGraphics","Component","Graphics","RendererSystem","OBSERVER_TYPE","decorators","Renderer"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,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;IACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;AACF;IACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;IAChC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;IAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI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5BC,iBAAU,CAAC,iBAAiB,CAAC;gBAC5B,QAAQ,EAAE,CAAC,UAAU,CAAC;aACvB,CAAC;WACmB,QAAQ,CAyB5B;QAAD,eAAC;KAAA,CAzBqCC,uBAAQ,GAyB7C;qBAzBoB,QAAQ;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_graphics=function(e,n,t,r){"use strict";var o=function(e,n){return
|
|
1
|
+
window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_graphics=function(e,n,t,r){"use strict";var o=function(e,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function i(e,n){function t(){this.constructor=e}o(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}function c(e,n,t,r){return new(t||(t=Promise))((function(o,i){function c(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(c,a)}u((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;c;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=n.call(e,c)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var u=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n}(t.Graphics),p=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.graphics=null,n}return i(n,e),n.prototype.init=function(){this.graphics=new u},n.componentName="Graphics",n}(n.Component),s=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.name="Graphics",n}return i(t,e),t.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},t.prototype.componentChanged=function(e){return c(this,void 0,void 0,(function(){return a(this,(function(t){return e.type===n.OBSERVER_TYPE.ADD?this.containerManager.getContainer(e.gameObject.id).addChildAt(e.component.graphics,0):e.type===n.OBSERVER_TYPE.REMOVE&&(this.containerManager.getContainer(e.gameObject.id).removeChild(e.component.graphics),e.component.graphics.destroy({children:!0})),[2]}))}))},t.systemName="Graphics",t=function(e,n,t,r){var o,i=arguments.length,c=i<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,t,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(n,t,c):o(n,t))||c);return i>3&&c&&Object.defineProperty(n,t,c),c}([n.decorators.componentObserver({Graphics:["graphics"]})],t)}(r.Renderer);return e.Graphics=p,e.GraphicsSystem=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,PIXI,EVA.plugin.renderer);window.EVA.plugin.renderer.graphics=window.EVA.plugin.renderer.graphics||_EVA_IIFE_graphics;
|
package/dist/miniprogram.js
CHANGED
|
@@ -2,31 +2,42 @@ import { __extends, __awaiter, __generator, __decorate } from 'tslib';
|
|
|
2
2
|
import { Component, OBSERVER_TYPE, decorators } from '@eva/eva.js/dist/miniprogram';
|
|
3
3
|
import { Graphics as Graphics$4 } from '@eva/renderer-adapter/dist/miniprogram';
|
|
4
4
|
import { RendererSystem, Renderer } from '@eva/plugin-renderer/dist/miniprogram';
|
|
5
|
+
|
|
5
6
|
var Graphics$2 = function (_super) {
|
|
6
7
|
__extends(Graphics, _super);
|
|
8
|
+
|
|
7
9
|
function Graphics() {
|
|
8
10
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
|
|
9
12
|
_this.graphics = null;
|
|
10
13
|
return _this;
|
|
11
14
|
}
|
|
15
|
+
|
|
12
16
|
Graphics.prototype.init = function () {
|
|
13
17
|
this.graphics = new Graphics$4();
|
|
14
18
|
};
|
|
19
|
+
|
|
15
20
|
Graphics.componentName = 'Graphics';
|
|
16
21
|
return Graphics;
|
|
17
22
|
}(Component);
|
|
23
|
+
|
|
18
24
|
var Graphics$3 = Graphics$2;
|
|
25
|
+
|
|
19
26
|
var Graphics = function (_super) {
|
|
20
27
|
__extends(Graphics, _super);
|
|
28
|
+
|
|
21
29
|
function Graphics() {
|
|
22
30
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
+
|
|
23
32
|
_this.name = 'Graphics';
|
|
24
33
|
return _this;
|
|
25
34
|
}
|
|
35
|
+
|
|
26
36
|
Graphics.prototype.init = function () {
|
|
27
37
|
this.renderSystem = this.game.getSystem(RendererSystem);
|
|
28
38
|
this.renderSystem.rendererManager.register(this);
|
|
29
39
|
};
|
|
40
|
+
|
|
30
41
|
Graphics.prototype.componentChanged = function (changed) {
|
|
31
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
32
43
|
return __generator(this, function (_a) {
|
|
@@ -38,15 +49,18 @@ var Graphics = function (_super) {
|
|
|
38
49
|
children: true
|
|
39
50
|
});
|
|
40
51
|
}
|
|
52
|
+
|
|
41
53
|
return [2];
|
|
42
54
|
});
|
|
43
55
|
});
|
|
44
56
|
};
|
|
57
|
+
|
|
45
58
|
Graphics.systemName = 'Graphics';
|
|
46
59
|
Graphics = __decorate([decorators.componentObserver({
|
|
47
60
|
Graphics: ['graphics']
|
|
48
61
|
})], Graphics);
|
|
49
62
|
return Graphics;
|
|
50
63
|
}(Renderer);
|
|
64
|
+
|
|
51
65
|
var Graphics$1 = Graphics;
|
|
52
66
|
export { Graphics$3 as Graphics, Graphics$1 as GraphicsSystem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-renderer-graphics.cjs.js","sources":["../../renderer-adapter/lib/Graphics.ts","../lib/component.ts","../lib/system.ts"],"sourcesContent":["import { Graphics as PIXIGraphics } from 'pixi.js';\nexport default class Graphics extends PIXIGraphics {\n [propName: string]: any;\n}\n","import { Component } from '@eva/eva.js';\nimport { Graphics as GraphicsEngine } from '@eva/renderer-adapter';\n\nexport default class Graphics extends Component {\n static componentName: string = 'Graphics';\n graphics: GraphicsEngine = null;\n init() {\n this.graphics = new GraphicsEngine();\n }\n}\n","import { Renderer, RendererSystem, RendererManager, ContainerManager } from '@eva/plugin-renderer';\nimport { decorators, ComponentChanged, OBSERVER_TYPE } from '@eva/eva.js';\nimport GraphicsComponent from './component';\n\n@decorators.componentObserver({\n Graphics: ['graphics'],\n})\nexport default class Graphics extends Renderer {\n static systemName = 'Graphics';\n\n name = 'Graphics';\n renderSystem: RendererSystem;\n rendererManager: RendererManager;\n containerManager: ContainerManager;\n\n init() {\n this.renderSystem = this.game.getSystem(RendererSystem) as RendererSystem;\n this.renderSystem.rendererManager.register(this);\n }\n\n async componentChanged(changed: ComponentChanged) {\n if (changed.type === OBSERVER_TYPE.ADD) {\n this.containerManager\n .getContainer(changed.gameObject.id)\n .addChildAt((changed.component as GraphicsComponent).graphics, 0);\n } else if (changed.type === OBSERVER_TYPE.REMOVE) {\n this.containerManager\n .getContainer(changed.gameObject.id)\n .removeChild((changed.component as GraphicsComponent).graphics);\n (changed.component as GraphicsComponent).graphics.destroy({ children: true });\n }\n }\n}\n"],"names":["PIXIGraphics","Component","Graphics","RendererSystem","OBSERVER_TYPE","decorators","Renderer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;IAAsC,4BAAY;IAAlD;;KAEC;IAAD,eAAC;AAAD,CAFA,CAAsCA,gBAAY,GAEjD;;;ACAD;IAAsC,4BAAS;IAA/C;QAAA,qEAMC;QAJC,cAAQ,GAAmB,IAAI,CAAC;;KAIjC;IAHC,uBAAI,GAAJ;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;KACtC;IAJM,sBAAa,GAAW,UAAU,CAAC;IAK5C,eAAC;CAAA,CANqCC,gBAAS,GAM9C;iBANoBC,UAAQ;;ACI7B;IAAsC,4BAAQ;IAA9C;QAAA,qEAyBC;QAtBC,UAAI,GAAG,UAAU,CAAC;;KAsBnB;IAjBC,uBAAI,GAAJ;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAACC,6BAAc,CAAmB,CAAC;QAC1E,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KAClD;IAEK,mCAAgB,GAAtB,UAAuB,OAAyB;;;gBAC9C,IAAI,OAAO,CAAC,IAAI,KAAKC,oBAAa,CAAC,GAAG,EAAE;oBACtC,IAAI,CAAC,gBAAgB;yBAClB,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;yBACnC,UAAU,CAAE,OAAO,CAAC,SAA+B,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;iBACrE;qBAAM,IAAI,OAAO,CAAC,IAAI,KAAKA,oBAAa,CAAC,MAAM,EAAE;oBAChD,IAAI,CAAC,gBAAgB;yBAClB,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;yBACnC,WAAW,CAAE,OAAO,CAAC,SAA+B,CAAC,QAAQ,CAAC,CAAC;oBACjE,OAAO,CAAC,SAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;iBAC/E;;;;KACF;IAvBM,mBAAU,GAAG,UAAU,CAAC;IADZ,QAAQ;QAH5BC,iBAAU,CAAC,iBAAiB,CAAC;YAC5B,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB,CAAC;OACmB,QAAQ,CAyB5B;IAAD,eAAC;CAAA,CAzBqCC,uBAAQ,GAyB7C;iBAzBoB,QAAQ;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("pixi.js"),n=require("@eva/plugin-renderer"),r=function(e,t){return
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("pixi.js"),n=require("@eva/plugin-renderer"),r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t.Graphics),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.graphics=null,t}return o(t,e),t.prototype.init=function(){this.graphics=new c},t.componentName="Graphics",t}(e.Component),u=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Graphics",e}return o(r,t),r.prototype.init=function(){this.renderSystem=this.game.getSystem(n.RendererSystem),this.renderSystem.rendererManager.register(this)},r.prototype.componentChanged=function(t){return n=this,r=void 0,c=function(){return i(this,(function(n){return t.type===e.OBSERVER_TYPE.ADD?this.containerManager.getContainer(t.gameObject.id).addChildAt(t.component.graphics,0):t.type===e.OBSERVER_TYPE.REMOVE&&(this.containerManager.getContainer(t.gameObject.id).removeChild(t.component.graphics),t.component.graphics.destroy({children:!0})),[2]}))},new((o=void 0)||(o=Promise))((function(e,t){function i(e){try{u(c.next(e))}catch(e){t(e)}}function a(e){try{u(c.throw(e))}catch(e){t(e)}}function u(t){t.done?e(t.value):new o((function(e){e(t.value)})).then(i,a)}u((c=c.apply(n,r||[])).next())}));var n,r,o,c},r.systemName="Graphics",r=function(e,t,n,r){var o,i=arguments.length,c=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(t,n,c):o(t,n))||c);return i>3&&c&&Object.defineProperty(t,n,c),c}([e.decorators.componentObserver({Graphics:["graphics"]})],r)}(n.Renderer);exports.Graphics=a,exports.GraphicsSystem=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-renderer-graphics.esm.js","sources":["../../renderer-adapter/lib/Graphics.ts","../lib/component.ts","../lib/system.ts"],"sourcesContent":["import { Graphics as PIXIGraphics } from 'pixi.js';\nexport default class Graphics extends PIXIGraphics {\n [propName: string]: any;\n}\n","import { Component } from '@eva/eva.js';\nimport { Graphics as GraphicsEngine } from '@eva/renderer-adapter';\n\nexport default class Graphics extends Component {\n static componentName: string = 'Graphics';\n graphics: GraphicsEngine = null;\n init() {\n this.graphics = new GraphicsEngine();\n }\n}\n","import { Renderer, RendererSystem, RendererManager, ContainerManager } from '@eva/plugin-renderer';\nimport { decorators, ComponentChanged, OBSERVER_TYPE } from '@eva/eva.js';\nimport GraphicsComponent from './component';\n\n@decorators.componentObserver({\n Graphics: ['graphics'],\n})\nexport default class Graphics extends Renderer {\n static systemName = 'Graphics';\n\n name = 'Graphics';\n renderSystem: RendererSystem;\n rendererManager: RendererManager;\n containerManager: ContainerManager;\n\n init() {\n this.renderSystem = this.game.getSystem(RendererSystem) as RendererSystem;\n this.renderSystem.rendererManager.register(this);\n }\n\n async componentChanged(changed: ComponentChanged) {\n if (changed.type === OBSERVER_TYPE.ADD) {\n this.containerManager\n .getContainer(changed.gameObject.id)\n .addChildAt((changed.component as GraphicsComponent).graphics, 0);\n } else if (changed.type === OBSERVER_TYPE.REMOVE) {\n this.containerManager\n .getContainer(changed.gameObject.id)\n .removeChild((changed.component as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C,SAA+B,CAAC,QAAQ,CAAC,CAAC;oBACjE,OAAO,CAAC,SAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;iBAC/E;;;;KACF;IAvBM,mBAAU,GAAG,UAAU,CAAC;IADZ,QAAQ;QAH5B,UAAU,CAAC,iBAAiB,CAAC;YAC5B,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB,CAAC;OACmB,QAAQ,CAyB5B;IAAD,eAAC;CAAA,CAzBqC,QAAQ,GAyB7C;iBAzBoB,QAAQ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-graphics",
|
|
3
|
-
"version": "1.2.7-fix.
|
|
3
|
+
"version": "1.2.7-fix.6",
|
|
4
4
|
"description": "@eva/plugin-renderer-graphics",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-graphics.esm.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"homepage": "https://eva.js.org",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eva/plugin-renderer": "1.2.7-fix.
|
|
22
|
-
"@eva/eva.js": "1.2.7-fix.
|
|
21
|
+
"@eva/plugin-renderer": "1.2.7-fix.6",
|
|
22
|
+
"@eva/eva.js": "1.2.7-fix.6"
|
|
23
23
|
}
|
|
24
24
|
}
|