@eva/plugin-renderer-mask 1.2.7-editor.8 → 1.2.7-fix.4
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.mask.js +34 -298
- package/dist/EVA.plugin.renderer.mask.min.js +1 -1
- package/dist/miniprogram.js +257 -0
- package/dist/plugin-renderer-mask.cjs.js +4 -54
- package/dist/plugin-renderer-mask.cjs.prod.js +1 -1
- package/dist/plugin-renderer-mask.d.ts +0 -2
- package/dist/plugin-renderer-mask.esm.js +5 -55
- package/package.json +5 -5
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
window.EVA = window.EVA || {};
|
|
4
3
|
window.EVA.plugin = window.EVA.plugin || {};
|
|
5
4
|
window.EVA.plugin.renderer = window.EVA.plugin.renderer || {};
|
|
6
|
-
|
|
7
5
|
var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter) {
|
|
8
6
|
'use strict';
|
|
9
7
|
|
|
@@ -14,62 +12,33 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
14
12
|
d.__proto__ = b;
|
|
15
13
|
} || function (d, b) {
|
|
16
14
|
for (var p in b) {
|
|
17
|
-
if (
|
|
15
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
18
16
|
}
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
return _extendStatics(d, b);
|
|
22
19
|
};
|
|
23
|
-
|
|
24
20
|
function __extends(d, b) {
|
|
25
|
-
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
26
|
-
|
|
27
21
|
_extendStatics(d, b);
|
|
28
|
-
|
|
29
22
|
function __() {
|
|
30
23
|
this.constructor = d;
|
|
31
24
|
}
|
|
32
|
-
|
|
33
25
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
var _assign = function __assign() {
|
|
37
|
-
_assign = Object.assign || function __assign(t) {
|
|
38
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
-
s = arguments[i];
|
|
40
|
-
|
|
41
|
-
for (var p in s) {
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return t;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return _assign.apply(this, arguments);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
27
|
function __decorate(decorators, target, key, desc) {
|
|
53
28
|
var c = arguments.length,
|
|
54
|
-
|
|
55
|
-
|
|
29
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
30
|
+
d;
|
|
56
31
|
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--) {
|
|
57
32
|
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
58
33
|
}
|
|
59
34
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
35
|
}
|
|
61
|
-
|
|
62
|
-
function __metadata(metadataKey, metadataValue) {
|
|
63
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
36
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
67
37
|
function adopt(value) {
|
|
68
38
|
return value instanceof P ? value : new P(function (resolve) {
|
|
69
39
|
resolve(value);
|
|
70
40
|
});
|
|
71
41
|
}
|
|
72
|
-
|
|
73
42
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
74
43
|
function fulfilled(value) {
|
|
75
44
|
try {
|
|
@@ -78,7 +47,6 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
78
47
|
reject(e);
|
|
79
48
|
}
|
|
80
49
|
}
|
|
81
|
-
|
|
82
50
|
function rejected(value) {
|
|
83
51
|
try {
|
|
84
52
|
step(generator["throw"](value));
|
|
@@ -86,29 +54,26 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
86
54
|
reject(e);
|
|
87
55
|
}
|
|
88
56
|
}
|
|
89
|
-
|
|
90
57
|
function step(result) {
|
|
91
58
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
92
59
|
}
|
|
93
|
-
|
|
94
60
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
95
61
|
});
|
|
96
62
|
}
|
|
97
|
-
|
|
98
63
|
function __generator(thisArg, body) {
|
|
99
64
|
var _ = {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
65
|
+
label: 0,
|
|
66
|
+
sent: function sent() {
|
|
67
|
+
if (t[0] & 1) throw t[1];
|
|
68
|
+
return t[1];
|
|
69
|
+
},
|
|
70
|
+
trys: [],
|
|
71
|
+
ops: []
|
|
104
72
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
y,
|
|
110
|
-
t,
|
|
111
|
-
g;
|
|
73
|
+
f,
|
|
74
|
+
y,
|
|
75
|
+
t,
|
|
76
|
+
g;
|
|
112
77
|
return g = {
|
|
113
78
|
next: verb(0),
|
|
114
79
|
"throw": verb(1),
|
|
@@ -116,79 +81,60 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
116
81
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
117
82
|
return this;
|
|
118
83
|
}), g;
|
|
119
|
-
|
|
120
84
|
function verb(n) {
|
|
121
85
|
return function (v) {
|
|
122
86
|
return step([n, v]);
|
|
123
87
|
};
|
|
124
88
|
}
|
|
125
|
-
|
|
126
89
|
function step(op) {
|
|
127
90
|
if (f) throw new TypeError("Generator is already executing.");
|
|
128
|
-
|
|
129
91
|
while (_) {
|
|
130
92
|
try {
|
|
131
93
|
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;
|
|
132
94
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
133
|
-
|
|
134
95
|
switch (op[0]) {
|
|
135
96
|
case 0:
|
|
136
97
|
case 1:
|
|
137
98
|
t = op;
|
|
138
99
|
break;
|
|
139
|
-
|
|
140
100
|
case 4:
|
|
141
101
|
_.label++;
|
|
142
102
|
return {
|
|
143
103
|
value: op[1],
|
|
144
104
|
done: false
|
|
145
105
|
};
|
|
146
|
-
|
|
147
106
|
case 5:
|
|
148
107
|
_.label++;
|
|
149
108
|
y = op[1];
|
|
150
109
|
op = [0];
|
|
151
110
|
continue;
|
|
152
|
-
|
|
153
111
|
case 7:
|
|
154
112
|
op = _.ops.pop();
|
|
155
|
-
|
|
156
113
|
_.trys.pop();
|
|
157
|
-
|
|
158
114
|
continue;
|
|
159
|
-
|
|
160
115
|
default:
|
|
161
116
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
162
117
|
_ = 0;
|
|
163
118
|
continue;
|
|
164
119
|
}
|
|
165
|
-
|
|
166
120
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
167
121
|
_.label = op[1];
|
|
168
122
|
break;
|
|
169
123
|
}
|
|
170
|
-
|
|
171
124
|
if (op[0] === 6 && _.label < t[1]) {
|
|
172
125
|
_.label = t[1];
|
|
173
126
|
t = op;
|
|
174
127
|
break;
|
|
175
128
|
}
|
|
176
|
-
|
|
177
129
|
if (t && _.label < t[2]) {
|
|
178
130
|
_.label = t[2];
|
|
179
|
-
|
|
180
131
|
_.ops.push(op);
|
|
181
|
-
|
|
182
132
|
break;
|
|
183
133
|
}
|
|
184
|
-
|
|
185
134
|
if (t[2]) _.ops.pop();
|
|
186
|
-
|
|
187
135
|
_.trys.pop();
|
|
188
|
-
|
|
189
136
|
continue;
|
|
190
137
|
}
|
|
191
|
-
|
|
192
138
|
op = body.call(thisArg, _);
|
|
193
139
|
} catch (e) {
|
|
194
140
|
op = [6, e];
|
|
@@ -197,7 +143,6 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
197
143
|
f = t = 0;
|
|
198
144
|
}
|
|
199
145
|
}
|
|
200
|
-
|
|
201
146
|
if (op[0] & 5) throw op[1];
|
|
202
147
|
return {
|
|
203
148
|
value: op[0] ? op[1] : void 0,
|
|
@@ -205,11 +150,10 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
205
150
|
};
|
|
206
151
|
}
|
|
207
152
|
}
|
|
208
|
-
|
|
209
153
|
function __values(o) {
|
|
210
154
|
var s = typeof Symbol === "function" && Symbol.iterator,
|
|
211
|
-
|
|
212
|
-
|
|
155
|
+
m = s && o[s],
|
|
156
|
+
i = 0;
|
|
213
157
|
if (m) return m.call(o);
|
|
214
158
|
if (o && typeof o.length === "number") return {
|
|
215
159
|
next: function next() {
|
|
@@ -222,15 +166,13 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
222
166
|
};
|
|
223
167
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
224
168
|
}
|
|
225
|
-
|
|
226
169
|
function __read(o, n) {
|
|
227
170
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
228
171
|
if (!m) return o;
|
|
229
172
|
var i = m.call(o),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
173
|
+
r,
|
|
174
|
+
ar = [],
|
|
175
|
+
e;
|
|
234
176
|
try {
|
|
235
177
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
236
178
|
ar.push(r.value);
|
|
@@ -246,133 +188,32 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
246
188
|
if (e) throw e.error;
|
|
247
189
|
}
|
|
248
190
|
}
|
|
249
|
-
|
|
250
191
|
return ar;
|
|
251
192
|
}
|
|
252
|
-
|
|
253
193
|
function __spread() {
|
|
254
194
|
for (var ar = [], i = 0; i < arguments.length; i++) {
|
|
255
195
|
ar = ar.concat(__read(arguments[i]));
|
|
256
196
|
}
|
|
257
|
-
|
|
258
197
|
return ar;
|
|
259
198
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
function SymbolKeysNotSupportedError() {
|
|
265
|
-
var _newTarget = this.constructor;
|
|
266
|
-
|
|
267
|
-
var _this = _super.call(this, 'Symbol keys are not supported yet!') || this;
|
|
268
|
-
|
|
269
|
-
Object.setPrototypeOf(_this, _newTarget.prototype);
|
|
270
|
-
return _this;
|
|
199
|
+
function getIDEPropsPropertyObj(target, propertyKey) {
|
|
200
|
+
if (!target.constructor.IDEProps) {
|
|
201
|
+
target.constructor.IDEProps = {};
|
|
271
202
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}(Error);
|
|
275
|
-
|
|
276
|
-
(function (_super) {
|
|
277
|
-
__extends(StaticGetPropertiesIsNotAFunctionError, _super);
|
|
278
|
-
|
|
279
|
-
function StaticGetPropertiesIsNotAFunctionError() {
|
|
280
|
-
var _newTarget = this.constructor;
|
|
281
|
-
|
|
282
|
-
var _this = _super.call(this, 'getProperties is not a function!') || this;
|
|
283
|
-
|
|
284
|
-
Object.setPrototypeOf(_this, _newTarget.prototype);
|
|
285
|
-
return _this;
|
|
203
|
+
if (!target.constructor.IDEProps[propertyKey]) {
|
|
204
|
+
target.constructor.IDEProps[propertyKey] = {};
|
|
286
205
|
}
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
})(Error);
|
|
290
|
-
|
|
291
|
-
var IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';
|
|
292
|
-
|
|
293
|
-
function transformBasicType(type) {
|
|
294
|
-
if (type === String) {
|
|
295
|
-
return 'string';
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
if (type === Number) {
|
|
299
|
-
return 'number';
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
if (type === Boolean) {
|
|
303
|
-
return 'boolean';
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
return 'unknown';
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
function defineTypes(target, key, options, returnTypeFunction) {
|
|
310
|
-
var type = Reflect.getMetadata('design:type', target, key);
|
|
311
|
-
var isArray = type === Array;
|
|
312
|
-
var str = transformBasicType(type);
|
|
313
|
-
|
|
314
|
-
if (str !== 'unknown') {
|
|
315
|
-
type = str;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
if (returnTypeFunction) {
|
|
319
|
-
var returnType = returnTypeFunction();
|
|
320
|
-
|
|
321
|
-
if (Array.isArray(returnType)) {
|
|
322
|
-
isArray = true;
|
|
323
|
-
type = returnType[0];
|
|
324
|
-
} else {
|
|
325
|
-
type = returnType;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
var properties = Reflect.getMetadata(IDE_PROPERTY_METADATA, target.constructor) || {};
|
|
330
|
-
properties[key] = _assign({
|
|
331
|
-
type: type,
|
|
332
|
-
isArray: isArray
|
|
333
|
-
}, options);
|
|
334
|
-
Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);
|
|
206
|
+
var propertyObj = target.constructor.IDEProps[propertyKey];
|
|
207
|
+
return propertyObj;
|
|
335
208
|
}
|
|
336
|
-
|
|
337
|
-
function getTypeDecoratorParams(returnTypeFuncOrOptions, maybeOptions) {
|
|
338
|
-
if (typeof returnTypeFuncOrOptions === 'function') {
|
|
339
|
-
return {
|
|
340
|
-
returnTypeFunc: returnTypeFuncOrOptions,
|
|
341
|
-
options: maybeOptions || {}
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return {
|
|
346
|
-
options: returnTypeFuncOrOptions || {}
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
function Field(returnTypeFunction, maybeOptions) {
|
|
209
|
+
function type(type) {
|
|
351
210
|
return function (target, propertyKey) {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
var _a = getTypeDecoratorParams(returnTypeFunction, maybeOptions),
|
|
357
|
-
options = _a.options,
|
|
358
|
-
returnTypeFunc = _a.returnTypeFunc;
|
|
359
|
-
|
|
360
|
-
defineTypes(target, propertyKey, options, returnTypeFunc);
|
|
211
|
+
var prop = getIDEPropsPropertyObj(target, propertyKey);
|
|
212
|
+
prop.key = propertyKey;
|
|
213
|
+
prop.type = type;
|
|
361
214
|
};
|
|
362
215
|
}
|
|
363
|
-
|
|
364
|
-
var ExecuteMode;
|
|
365
|
-
|
|
366
|
-
(function (ExecuteMode) {
|
|
367
|
-
ExecuteMode[ExecuteMode["Edit"] = 2] = "Edit";
|
|
368
|
-
ExecuteMode[ExecuteMode["Game"] = 4] = "Game";
|
|
369
|
-
ExecuteMode[ExecuteMode["All"] = 6] = "All";
|
|
370
|
-
})(ExecuteMode || (ExecuteMode = {}));
|
|
371
|
-
|
|
372
|
-
var _a;
|
|
373
|
-
|
|
374
216
|
exports.MASK_TYPE = void 0;
|
|
375
|
-
|
|
376
217
|
(function (MASK_TYPE) {
|
|
377
218
|
MASK_TYPE["Circle"] = "Circle";
|
|
378
219
|
MASK_TYPE["Ellipse"] = "Ellipse";
|
|
@@ -382,81 +223,23 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
382
223
|
MASK_TYPE["Img"] = "Img";
|
|
383
224
|
MASK_TYPE["Sprite"] = "Sprite";
|
|
384
225
|
})(exports.MASK_TYPE || (exports.MASK_TYPE = {}));
|
|
385
|
-
|
|
386
|
-
var MaskStyle = function () {
|
|
387
|
-
function MaskStyle() {}
|
|
388
|
-
|
|
389
|
-
__decorate([Field({
|
|
390
|
-
step: 1
|
|
391
|
-
}), __metadata("design:type", Number)], MaskStyle.prototype, "x", void 0);
|
|
392
|
-
|
|
393
|
-
__decorate([Field({
|
|
394
|
-
step: 1
|
|
395
|
-
}), __metadata("design:type", Number)], MaskStyle.prototype, "y", void 0);
|
|
396
|
-
|
|
397
|
-
__decorate([Field({
|
|
398
|
-
step: 0.1,
|
|
399
|
-
if: function _if(mask) {
|
|
400
|
-
return mask.type === exports.MASK_TYPE.Circle || mask.type === exports.MASK_TYPE.RoundedRect;
|
|
401
|
-
}
|
|
402
|
-
}), __metadata("design:type", Number)], MaskStyle.prototype, "radius", void 0);
|
|
403
|
-
|
|
404
|
-
__decorate([Field({
|
|
405
|
-
step: 1,
|
|
406
|
-
if: function _if(mask) {
|
|
407
|
-
return mask.type !== exports.MASK_TYPE.Circle;
|
|
408
|
-
}
|
|
409
|
-
}), __metadata("design:type", Number)], MaskStyle.prototype, "width", void 0);
|
|
410
|
-
|
|
411
|
-
__decorate([Field({
|
|
412
|
-
step: 1,
|
|
413
|
-
if: function _if(mask) {
|
|
414
|
-
return mask.type !== exports.MASK_TYPE.Circle;
|
|
415
|
-
}
|
|
416
|
-
}), __metadata("design:type", Number)], MaskStyle.prototype, "height", void 0);
|
|
417
|
-
|
|
418
|
-
return MaskStyle;
|
|
419
|
-
}();
|
|
420
|
-
|
|
421
226
|
var Mask$2 = function (_super) {
|
|
422
227
|
__extends(Mask, _super);
|
|
423
|
-
|
|
424
228
|
function Mask() {
|
|
425
229
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
426
|
-
|
|
427
230
|
_this.style = {};
|
|
428
231
|
_this.resource = '';
|
|
429
232
|
_this.spriteName = '';
|
|
430
233
|
return _this;
|
|
431
234
|
}
|
|
432
|
-
|
|
433
235
|
Mask.prototype.init = function (obj) {
|
|
434
236
|
_extends(this, obj);
|
|
435
237
|
};
|
|
436
|
-
|
|
437
238
|
Mask.componentName = 'Mask';
|
|
438
|
-
|
|
439
|
-
__decorate([
|
|
440
|
-
type: 'selector',
|
|
441
|
-
options: (_a = {}, _a[exports.MASK_TYPE.Circle] = exports.MASK_TYPE.Circle, _a[exports.MASK_TYPE.Ellipse] = exports.MASK_TYPE.Ellipse, _a[exports.MASK_TYPE.Img] = exports.MASK_TYPE.Img, _a[exports.MASK_TYPE.Rect] = exports.MASK_TYPE.Rect, _a[exports.MASK_TYPE.RoundedRect] = exports.MASK_TYPE.RoundedRect, _a),
|
|
442
|
-
alias: 'type',
|
|
443
|
-
default: exports.MASK_TYPE.Circle
|
|
444
|
-
}), __metadata("design:type", String)], Mask.prototype, "mask_type", void 0);
|
|
445
|
-
|
|
446
|
-
__decorate([Field(function () {
|
|
447
|
-
return MaskStyle;
|
|
448
|
-
}), __metadata("design:type", Object)], Mask.prototype, "style", void 0);
|
|
449
|
-
|
|
450
|
-
__decorate([Field({
|
|
451
|
-
type: 'resource',
|
|
452
|
-
if: function _if(mask) {
|
|
453
|
-
return mask.type === exports.MASK_TYPE.Img || exports.MASK_TYPE.Sprite;
|
|
454
|
-
}
|
|
455
|
-
}), __metadata("design:type", String)], Mask.prototype, "resource", void 0);
|
|
456
|
-
|
|
239
|
+
__decorate([type('string')], Mask.prototype, "resource", void 0);
|
|
240
|
+
__decorate([type('string')], Mask.prototype, "spriteName", void 0);
|
|
457
241
|
return Mask;
|
|
458
242
|
}(eva_js.Component);
|
|
459
|
-
|
|
460
243
|
var Mask$3 = Mask$2;
|
|
461
244
|
var resourceKeySplit = '_s|r|c_';
|
|
462
245
|
var propertyForGraphics = {
|
|
@@ -474,7 +257,6 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
474
257
|
Polygon: 'drawPolygon'
|
|
475
258
|
};
|
|
476
259
|
var MASK_TYPE;
|
|
477
|
-
|
|
478
260
|
(function (MASK_TYPE) {
|
|
479
261
|
MASK_TYPE["Circle"] = "Circle";
|
|
480
262
|
MASK_TYPE["Ellipse"] = "Ellipse";
|
|
@@ -484,98 +266,75 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
484
266
|
MASK_TYPE["Img"] = "Img";
|
|
485
267
|
MASK_TYPE["Sprite"] = "Sprite";
|
|
486
268
|
})(MASK_TYPE || (MASK_TYPE = {}));
|
|
487
|
-
|
|
488
269
|
var Mask = function (_super) {
|
|
489
270
|
__extends(Mask, _super);
|
|
490
|
-
|
|
491
271
|
function Mask() {
|
|
492
272
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
493
|
-
|
|
494
273
|
_this.name = 'Mask';
|
|
495
274
|
_this.changedCache = {};
|
|
496
275
|
_this.maskSpriteCache = {};
|
|
497
276
|
return _this;
|
|
498
277
|
}
|
|
499
|
-
|
|
500
278
|
Mask.prototype.init = function () {
|
|
501
279
|
this.renderSystem = this.game.getSystem(pluginRenderer.RendererSystem);
|
|
502
280
|
this.renderSystem.rendererManager.register(this);
|
|
503
281
|
};
|
|
504
|
-
|
|
505
282
|
Mask.prototype.rendererUpdate = function () {
|
|
506
283
|
this.changedCache = {};
|
|
507
284
|
};
|
|
508
|
-
|
|
509
285
|
Mask.prototype.componentChanged = function (changed) {
|
|
510
286
|
if (changed.component.name !== 'Mask') return;
|
|
511
|
-
|
|
512
287
|
switch (changed.type) {
|
|
513
288
|
case eva_js.OBSERVER_TYPE.ADD:
|
|
514
289
|
this.add(changed);
|
|
515
290
|
break;
|
|
516
|
-
|
|
517
291
|
case eva_js.OBSERVER_TYPE.REMOVE:
|
|
518
292
|
this.remove(changed);
|
|
519
293
|
break;
|
|
520
|
-
|
|
521
294
|
case eva_js.OBSERVER_TYPE.CHANGE:
|
|
522
295
|
this.change(changed);
|
|
523
296
|
break;
|
|
524
297
|
}
|
|
525
298
|
};
|
|
526
|
-
|
|
527
299
|
Mask.prototype.add = function (changed) {
|
|
528
300
|
var component = changed.component;
|
|
529
|
-
|
|
530
301
|
if (!(component.type in MASK_TYPE)) {
|
|
531
302
|
throw new Error('no have Mask type: ' + component.type);
|
|
532
303
|
}
|
|
533
|
-
|
|
534
304
|
if (!component.style) {
|
|
535
305
|
throw new Error('no have Mask style: ' + component.type);
|
|
536
306
|
}
|
|
537
|
-
|
|
538
307
|
var mask;
|
|
539
|
-
|
|
540
308
|
switch (component.type) {
|
|
541
309
|
case MASK_TYPE.Circle:
|
|
542
310
|
mask = this.createGraphics(component);
|
|
543
311
|
break;
|
|
544
|
-
|
|
545
312
|
case MASK_TYPE.Ellipse:
|
|
546
313
|
mask = this.createGraphics(component);
|
|
547
314
|
break;
|
|
548
|
-
|
|
549
315
|
case MASK_TYPE.Rect:
|
|
550
316
|
mask = this.createGraphics(component);
|
|
551
317
|
break;
|
|
552
|
-
|
|
553
318
|
case MASK_TYPE.RoundedRect:
|
|
554
319
|
mask = this.createGraphics(component);
|
|
555
320
|
break;
|
|
556
|
-
|
|
557
321
|
case MASK_TYPE.Polygon:
|
|
558
322
|
mask = this.createGraphics(component);
|
|
559
323
|
break;
|
|
560
|
-
|
|
561
324
|
case MASK_TYPE.Img:
|
|
562
325
|
mask = this.createSprite(component);
|
|
563
326
|
break;
|
|
564
|
-
|
|
565
327
|
case MASK_TYPE.Sprite:
|
|
566
328
|
mask = this.createSprite(component);
|
|
567
329
|
break;
|
|
568
330
|
}
|
|
569
|
-
|
|
570
331
|
if (!mask) {
|
|
571
332
|
throw new Error('no have mask instance, check your mask params: ' + component.type);
|
|
572
333
|
}
|
|
573
|
-
|
|
574
334
|
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
575
335
|
container.mask = mask;
|
|
576
336
|
container.addChild(mask);
|
|
577
337
|
};
|
|
578
|
-
|
|
579
338
|
Mask.prototype.remove = function (changed) {
|
|
580
339
|
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
581
340
|
container.removeChild(container.mask);
|
|
@@ -585,18 +344,14 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
585
344
|
container.mask = null;
|
|
586
345
|
delete this.maskSpriteCache[changed.gameObject.id];
|
|
587
346
|
};
|
|
588
|
-
|
|
589
347
|
Mask.prototype.change = function (changed) {
|
|
590
348
|
if (this.changedCache[changed.gameObject.id]) return;
|
|
591
349
|
var component = changed.component;
|
|
592
|
-
|
|
593
350
|
if (changed.prop.prop[0] === 'type') {
|
|
594
351
|
this.changedCache[changed.gameObject.id] = true;
|
|
595
|
-
|
|
596
|
-
if ([MASK_TYPE.Sprite, MASK_TYPE.Img].indexOf(component.type) > -1 || component._lastType !== component.type) {
|
|
352
|
+
if ([MASK_TYPE.Sprite, MASK_TYPE.Img].indexOf(component.type) > -1) {
|
|
597
353
|
this.remove(changed);
|
|
598
354
|
this.add(changed);
|
|
599
|
-
component._lastType = component.type;
|
|
600
355
|
} else {
|
|
601
356
|
this.redrawGraphics(changed);
|
|
602
357
|
}
|
|
@@ -614,25 +369,20 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
614
369
|
this.changeSprite(component);
|
|
615
370
|
}
|
|
616
371
|
};
|
|
617
|
-
|
|
618
372
|
Mask.prototype.createGraphics = function (component) {
|
|
619
373
|
var graphics = new rendererAdapter.Graphics();
|
|
620
374
|
this.draw(graphics, component);
|
|
621
375
|
return graphics;
|
|
622
376
|
};
|
|
623
|
-
|
|
624
377
|
Mask.prototype.redrawGraphics = function (changed) {
|
|
625
378
|
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
626
379
|
var graphics = container.mask;
|
|
627
380
|
graphics.clear();
|
|
628
381
|
this.draw(graphics, changed.component);
|
|
629
382
|
};
|
|
630
|
-
|
|
631
383
|
Mask.prototype.draw = function (graphics, component) {
|
|
632
384
|
var e_1, _a;
|
|
633
|
-
|
|
634
385
|
var params = [];
|
|
635
|
-
|
|
636
386
|
try {
|
|
637
387
|
for (var _b = __values(propertyForGraphics[component.type]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
638
388
|
var key = _c.value;
|
|
@@ -649,19 +399,16 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
649
399
|
if (e_1) throw e_1.error;
|
|
650
400
|
}
|
|
651
401
|
}
|
|
652
|
-
|
|
653
402
|
graphics.beginFill(0x000000, 1);
|
|
654
403
|
graphics[functionForGraphics[component.type]].apply(graphics, __spread(params));
|
|
655
404
|
graphics.endFill();
|
|
656
405
|
};
|
|
657
|
-
|
|
658
406
|
Mask.prototype.createSprite = function (component) {
|
|
659
407
|
var sprite = new rendererAdapter.Sprite(null);
|
|
660
408
|
this.maskSpriteCache[component.gameObject.id] = sprite;
|
|
661
409
|
this.setSprite(component, sprite);
|
|
662
410
|
return sprite.sprite;
|
|
663
411
|
};
|
|
664
|
-
|
|
665
412
|
Mask.prototype.changeSpriteStyle = function (component) {
|
|
666
413
|
var sprite = this.maskSpriteCache[component.gameObject.id];
|
|
667
414
|
sprite.sprite.width = component.style.width;
|
|
@@ -669,12 +416,10 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
669
416
|
sprite.sprite.position.x = component.style.x;
|
|
670
417
|
sprite.sprite.position.y = component.style.y;
|
|
671
418
|
};
|
|
672
|
-
|
|
673
419
|
Mask.prototype.changeSprite = function (component) {
|
|
674
420
|
var sprite = this.maskSpriteCache[component.gameObject.id];
|
|
675
421
|
this.setSprite(component, sprite);
|
|
676
422
|
};
|
|
677
|
-
|
|
678
423
|
Mask.prototype.setSprite = function (component, sprite) {
|
|
679
424
|
return __awaiter(this, void 0, void 0, function () {
|
|
680
425
|
var res, asyncId, img, texture;
|
|
@@ -682,20 +427,15 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
682
427
|
switch (_a.label) {
|
|
683
428
|
case 0:
|
|
684
429
|
_a.trys.push([0, 2,, 3]);
|
|
685
|
-
|
|
686
430
|
asyncId = this.increaseAsyncId(component.gameObject.id);
|
|
687
431
|
return [4, eva_js.resource.getResource(component.resource)];
|
|
688
|
-
|
|
689
432
|
case 1:
|
|
690
433
|
res = _a.sent();
|
|
691
434
|
if (!this.validateAsyncId(component.gameObject.id, asyncId)) return [2];
|
|
692
435
|
return [3, 3];
|
|
693
|
-
|
|
694
436
|
case 2:
|
|
695
437
|
_a.sent();
|
|
696
|
-
|
|
697
438
|
throw new Error('mask resource load error');
|
|
698
|
-
|
|
699
439
|
case 3:
|
|
700
440
|
if (component.type === MASK_TYPE.Sprite) {
|
|
701
441
|
img = component.resource + resourceKeySplit + component.spriteName;
|
|
@@ -704,7 +444,6 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
704
444
|
} else {
|
|
705
445
|
sprite.image = res.data.image;
|
|
706
446
|
}
|
|
707
|
-
|
|
708
447
|
sprite.sprite.width = component.style.width;
|
|
709
448
|
sprite.sprite.height = component.style.height;
|
|
710
449
|
sprite.sprite.position.x = component.style.x;
|
|
@@ -714,7 +453,6 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
714
453
|
});
|
|
715
454
|
});
|
|
716
455
|
};
|
|
717
|
-
|
|
718
456
|
Mask.systemName = 'Mask';
|
|
719
457
|
Mask = __decorate([eva_js.decorators.componentObserver({
|
|
720
458
|
Mask: ['type', {
|
|
@@ -724,7 +462,6 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
724
462
|
})], Mask);
|
|
725
463
|
return Mask;
|
|
726
464
|
}(pluginRenderer.Renderer);
|
|
727
|
-
|
|
728
465
|
var Mask$1 = Mask;
|
|
729
466
|
exports.Mask = Mask$3;
|
|
730
467
|
exports.MaskSystem = Mask$1;
|
|
@@ -733,5 +470,4 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
733
470
|
});
|
|
734
471
|
return exports;
|
|
735
472
|
}({}, EVA, EVA.plugin.renderer, EVA.rendererAdapter);
|
|
736
|
-
|
|
737
473
|
window.EVA.plugin.renderer.mask = window.EVA.plugin.renderer.mask || _EVA_IIFE_mask;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(this,arguments)}window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_mask=function(e,t,r,n){"use strict";var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}s((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}var y=function(e){function t(){var t=this.constructor,r=e.call(this,"Symbol keys are not supported yet!")||this;return Object.setPrototypeOf(r,t.prototype),r}return i(t,e),t}(Error);!function(e){function t(){var t=this.constructor,r=e.call(this,"getProperties is not a function!")||this;return Object.setPrototypeOf(r,t.prototype),r}i(t,e)}(Error);var d,f,h="IDE_PROPERTY_METADATA";function g(e,t,r,n){var o=Reflect.getMetadata("design:type",e,t),i=o===Array,c=function(e){return e===String?"string":e===Number?"number":e===Boolean?"boolean":"unknown"}(o);if("unknown"!==c&&(o=c),n){var s=n();Array.isArray(s)?(i=!0,o=s[0]):o=s}var p=Reflect.getMetadata(h,e.constructor)||{};p[t]=a({type:o,isArray:i},r),Reflect.defineMetadata(h,p,e.constructor)}function m(e,t){return function(r,n){if("symbol"==typeof n)throw new y;var o=function(e,t){return"function"==typeof e?{returnTypeFunc:e,options:t||{}}:{options:e||{}}}(e,t);g(r,n,o.options,o.returnTypeFunc)}}!function(e){e[e.Edit=2]="Edit",e[e.Game=4]="Game",e[e.All=6]="All"}(d||(d={})),e.MASK_TYPE=void 0,function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(e.MASK_TYPE||(e.MASK_TYPE={}));var v,w=function(){function t(){}return c([m({step:1}),s("design:type",Number)],t.prototype,"x",void 0),c([m({step:1}),s("design:type",Number)],t.prototype,"y",void 0),c([m({step:.1,if:function(t){return t.type===e.MASK_TYPE.Circle||t.type===e.MASK_TYPE.RoundedRect}}),s("design:type",Number)],t.prototype,"radius",void 0),c([m({step:1,if:function(t){return t.type!==e.MASK_TYPE.Circle}}),s("design:type",Number)],t.prototype,"width",void 0),c([m({step:1,if:function(t){return t.type!==e.MASK_TYPE.Circle}}),s("design:type",Number)],t.prototype,"height",void 0),t}(),E=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.style={},e.resource="",e.spriteName="",e}return i(r,t),r.prototype.init=function(e){_extends(this,e)},r.componentName="Mask",c([m({type:"selector",options:(f={},f[e.MASK_TYPE.Circle]=e.MASK_TYPE.Circle,f[e.MASK_TYPE.Ellipse]=e.MASK_TYPE.Ellipse,f[e.MASK_TYPE.Img]=e.MASK_TYPE.Img,f[e.MASK_TYPE.Rect]=e.MASK_TYPE.Rect,f[e.MASK_TYPE.RoundedRect]=e.MASK_TYPE.RoundedRect,f),alias:"type",default:e.MASK_TYPE.Circle}),s("design:type",String)],r.prototype,"mask_type",void 0),c([m((function(){return w})),s("design:type",Object)],r.prototype,"style",void 0),c([m({type:"resource",if:function(t){return t.type===e.MASK_TYPE.Img||e.MASK_TYPE.Sprite}}),s("design:type",String)],r.prototype,"resource",void 0),r}(t.Component),S=E,b={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},R={Circle:"drawCircle",Ellipse:"drawEllipse",Rect:"drawRect",RoundedRect:"drawRoundedRect",Polygon:"drawPolygon"};!function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(v||(v={}));var _=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Mask",t.changedCache={},t.maskSpriteCache={},t}return i(o,e),o.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},o.prototype.rendererUpdate=function(){this.changedCache={}},o.prototype.componentChanged=function(e){if("Mask"===e.component.name)switch(e.type){case t.OBSERVER_TYPE.ADD:this.add(e);break;case t.OBSERVER_TYPE.REMOVE:this.remove(e);break;case t.OBSERVER_TYPE.CHANGE:this.change(e)}},o.prototype.add=function(e){var t,r=e.component;if(!(r.type in v))throw new Error("no have Mask type: "+r.type);if(!r.style)throw new Error("no have Mask style: "+r.type);switch(r.type){case v.Circle:case v.Ellipse:case v.Rect:case v.RoundedRect:case v.Polygon:t=this.createGraphics(r);break;case v.Img:case v.Sprite:t=this.createSprite(r)}if(!t)throw new Error("no have mask instance, check your mask params: "+r.type);var n=this.containerManager.getContainer(e.gameObject.id);n.mask=t,n.addChild(t)},o.prototype.remove=function(e){var t=this.containerManager.getContainer(e.gameObject.id);t.removeChild(t.mask),t.mask.destroy({children:!0}),t.mask=null,delete this.maskSpriteCache[e.gameObject.id]},o.prototype.change=function(e){if(!this.changedCache[e.gameObject.id]){var t=e.component;"type"===e.prop.prop[0]?(this.changedCache[e.gameObject.id]=!0,[v.Sprite,v.Img].indexOf(t.type)>-1||t._lastType!==t.type?(this.remove(e),this.add(e),t._lastType=t.type):this.redrawGraphics(e)):"style"===e.prop.prop[0]?[v.Sprite,v.Img].indexOf(t.type)>-1?this.changeSpriteStyle(t):this.redrawGraphics(e):("resource"===e.prop.prop[0]||"spriteName"===e.prop.prop[0])&&(this.changedCache[e.gameObject.id]=!0,this.changeSprite(t))}},o.prototype.createGraphics=function(e){var t=new n.Graphics;return this.draw(t,e),t},o.prototype.redrawGraphics=function(e){var t=this.containerManager.getContainer(e.gameObject.id).mask;t.clear(),this.draw(t,e.component)},o.prototype.draw=function(e,t){var r,n,o=[];try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(b[t.type]),a=i.next();!a.done;a=i.next()){var c=a.value;o.push(t.style[c])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.beginFill(0,1),e[R[t.type]].apply(e,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}(o)),e.endFill()},o.prototype.createSprite=function(e){var t=new n.Sprite(null);return this.maskSpriteCache[e.gameObject.id]=t,this.setSprite(e,t),t.sprite},o.prototype.changeSpriteStyle=function(e){var t=this.maskSpriteCache[e.gameObject.id];t.sprite.width=e.style.width,t.sprite.height=e.style.height,t.sprite.position.x=e.style.x,t.sprite.position.y=e.style.y},o.prototype.changeSprite=function(e){var t=this.maskSpriteCache[e.gameObject.id];this.setSprite(e,t)},o.prototype.setSprite=function(e,r){return p(this,void 0,void 0,(function(){var n,o,i,a;return u(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),o=this.increaseAsyncId(e.gameObject.id),[4,t.resource.getResource(e.resource)];case 1:return n=c.sent(),this.validateAsyncId(e.gameObject.id,o)?[3,3]:[2];case 2:throw c.sent(),new Error("mask resource load error");case 3:return e.type===v.Sprite?(i=e.resource+"_s|r|c_"+e.spriteName,a=n.instance[i],r.image=a):r.image=n.data.image,r.sprite.width=e.style.width,r.sprite.height=e.style.height,r.sprite.position.x=e.style.x,r.sprite.position.y=e.style.y,[2]}}))}))},o.systemName="Mask",o=c([t.decorators.componentObserver({Mask:["type",{prop:["style"],deep:!0},"resource","spriteName"]})],o)}(r.Renderer),A=_;return e.Mask=S,e.MaskSystem=A,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer,EVA.rendererAdapter);window.EVA.plugin.renderer.mask=window.EVA.plugin.renderer.mask||_EVA_IIFE_mask;
|
|
1
|
+
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(this,arguments)}window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_mask=function(e,t,r,n){"use strict";var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},o(e,t)};function i(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function a(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}s((n=n.apply(e,t||[])).next())}))}function s(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function l(e){return function(t,r){var n=function(e,t){return e.constructor.IDEProps||(e.constructor.IDEProps={}),e.constructor.IDEProps[t]||(e.constructor.IDEProps[t]={}),e.constructor.IDEProps[t]}(t,r);n.key=r,n.type=e}}e.MASK_TYPE=void 0,function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(e.MASK_TYPE||(e.MASK_TYPE={}));var u,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style={},t.resource="",t.spriteName="",t}return i(t,e),t.prototype.init=function(e){_extends(this,e)},t.componentName="Mask",a([l("string")],t.prototype,"resource",void 0),a([l("string")],t.prototype,"spriteName",void 0),t}(t.Component),d=h,y={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},f={Circle:"drawCircle",Ellipse:"drawEllipse",Rect:"drawRect",RoundedRect:"drawRoundedRect",Polygon:"drawPolygon"};!function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(u||(u={}));var g=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Mask",t.changedCache={},t.maskSpriteCache={},t}return i(o,e),o.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},o.prototype.rendererUpdate=function(){this.changedCache={}},o.prototype.componentChanged=function(e){if("Mask"===e.component.name)switch(e.type){case t.OBSERVER_TYPE.ADD:this.add(e);break;case t.OBSERVER_TYPE.REMOVE:this.remove(e);break;case t.OBSERVER_TYPE.CHANGE:this.change(e)}},o.prototype.add=function(e){var t,r=e.component;if(!(r.type in u))throw new Error("no have Mask type: "+r.type);if(!r.style)throw new Error("no have Mask style: "+r.type);switch(r.type){case u.Circle:case u.Ellipse:case u.Rect:case u.RoundedRect:case u.Polygon:t=this.createGraphics(r);break;case u.Img:case u.Sprite:t=this.createSprite(r)}if(!t)throw new Error("no have mask instance, check your mask params: "+r.type);var n=this.containerManager.getContainer(e.gameObject.id);n.mask=t,n.addChild(t)},o.prototype.remove=function(e){var t=this.containerManager.getContainer(e.gameObject.id);t.removeChild(t.mask),t.mask.destroy({children:!0}),t.mask=null,delete this.maskSpriteCache[e.gameObject.id]},o.prototype.change=function(e){if(!this.changedCache[e.gameObject.id]){var t=e.component;"type"===e.prop.prop[0]?(this.changedCache[e.gameObject.id]=!0,[u.Sprite,u.Img].indexOf(t.type)>-1?(this.remove(e),this.add(e)):this.redrawGraphics(e)):"style"===e.prop.prop[0]?[u.Sprite,u.Img].indexOf(t.type)>-1?this.changeSpriteStyle(t):this.redrawGraphics(e):("resource"===e.prop.prop[0]||"spriteName"===e.prop.prop[0])&&(this.changedCache[e.gameObject.id]=!0,this.changeSprite(t))}},o.prototype.createGraphics=function(e){var t=new n.Graphics;return this.draw(t,e),t},o.prototype.redrawGraphics=function(e){var t=this.containerManager.getContainer(e.gameObject.id).mask;t.clear(),this.draw(t,e.component)},o.prototype.draw=function(e,t){var r,n,o=[];try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(y[t.type]),a=i.next();!a.done;a=i.next()){var c=a.value;o.push(t.style[c])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.beginFill(0,1),e[f[t.type]].apply(e,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}(o)),e.endFill()},o.prototype.createSprite=function(e){var t=new n.Sprite(null);return this.maskSpriteCache[e.gameObject.id]=t,this.setSprite(e,t),t.sprite},o.prototype.changeSpriteStyle=function(e){var t=this.maskSpriteCache[e.gameObject.id];t.sprite.width=e.style.width,t.sprite.height=e.style.height,t.sprite.position.x=e.style.x,t.sprite.position.y=e.style.y},o.prototype.changeSprite=function(e){var t=this.maskSpriteCache[e.gameObject.id];this.setSprite(e,t)},o.prototype.setSprite=function(e,r){return c(this,void 0,void 0,(function(){var n,o,i,a;return s(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),o=this.increaseAsyncId(e.gameObject.id),[4,t.resource.getResource(e.resource)];case 1:return n=c.sent(),this.validateAsyncId(e.gameObject.id,o)?[3,3]:[2];case 2:throw c.sent(),new Error("mask resource load error");case 3:return e.type===u.Sprite?(i=e.resource+"_s|r|c_"+e.spriteName,a=n.instance[i],r.image=a):r.image=n.data.image,r.sprite.width=e.style.width,r.sprite.height=e.style.height,r.sprite.position.x=e.style.x,r.sprite.position.y=e.style.y,[2]}}))}))},o.systemName="Mask",o=a([t.decorators.componentObserver({Mask:["type",{prop:["style"],deep:!0},"resource","spriteName"]})],o)}(r.Renderer),m=g;return e.Mask=d,e.MaskSystem=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer,EVA.rendererAdapter);window.EVA.plugin.renderer.mask=window.EVA.plugin.renderer.mask||_EVA_IIFE_mask;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import { __extends, __decorate, __values, __spread, __awaiter, __generator } from 'tslib';
|
|
3
|
+
import { Component, OBSERVER_TYPE, resource, decorators } from '@eva/eva.js/dist/miniprogram';
|
|
4
|
+
import { type } from '@eva/inspector-decorator';
|
|
5
|
+
import { RendererSystem, Renderer } from '@eva/plugin-renderer/dist/miniprogram';
|
|
6
|
+
import { Graphics, Sprite } from '@eva/renderer-adapter/dist/miniprogram';
|
|
7
|
+
var MASK_TYPE$1;
|
|
8
|
+
(function (MASK_TYPE) {
|
|
9
|
+
MASK_TYPE["Circle"] = "Circle";
|
|
10
|
+
MASK_TYPE["Ellipse"] = "Ellipse";
|
|
11
|
+
MASK_TYPE["Rect"] = "Rect";
|
|
12
|
+
MASK_TYPE["RoundedRect"] = "RoundedRect";
|
|
13
|
+
MASK_TYPE["Polygon"] = "Polygon";
|
|
14
|
+
MASK_TYPE["Img"] = "Img";
|
|
15
|
+
MASK_TYPE["Sprite"] = "Sprite";
|
|
16
|
+
})(MASK_TYPE$1 || (MASK_TYPE$1 = {}));
|
|
17
|
+
var Mask$2 = function (_super) {
|
|
18
|
+
__extends(Mask, _super);
|
|
19
|
+
function Mask() {
|
|
20
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
_this.style = {};
|
|
22
|
+
_this.resource = '';
|
|
23
|
+
_this.spriteName = '';
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
Mask.prototype.init = function (obj) {
|
|
27
|
+
_extends(this, obj);
|
|
28
|
+
};
|
|
29
|
+
Mask.componentName = 'Mask';
|
|
30
|
+
__decorate([type('string')], Mask.prototype, "resource", void 0);
|
|
31
|
+
__decorate([type('string')], Mask.prototype, "spriteName", void 0);
|
|
32
|
+
return Mask;
|
|
33
|
+
}(Component);
|
|
34
|
+
var Mask$3 = Mask$2;
|
|
35
|
+
var resourceKeySplit = '_s|r|c_';
|
|
36
|
+
var propertyForGraphics = {
|
|
37
|
+
Circle: ['x', 'y', 'radius'],
|
|
38
|
+
Ellipse: ['x', 'y', 'width', 'height'],
|
|
39
|
+
Rect: ['x', 'y', 'width', 'height'],
|
|
40
|
+
RoundedRect: ['x', 'y', 'width', 'height', 'radius'],
|
|
41
|
+
Polygon: ['paths']
|
|
42
|
+
};
|
|
43
|
+
var functionForGraphics = {
|
|
44
|
+
Circle: 'drawCircle',
|
|
45
|
+
Ellipse: 'drawEllipse',
|
|
46
|
+
Rect: 'drawRect',
|
|
47
|
+
RoundedRect: 'drawRoundedRect',
|
|
48
|
+
Polygon: 'drawPolygon'
|
|
49
|
+
};
|
|
50
|
+
var MASK_TYPE;
|
|
51
|
+
(function (MASK_TYPE) {
|
|
52
|
+
MASK_TYPE["Circle"] = "Circle";
|
|
53
|
+
MASK_TYPE["Ellipse"] = "Ellipse";
|
|
54
|
+
MASK_TYPE["Rect"] = "Rect";
|
|
55
|
+
MASK_TYPE["RoundedRect"] = "RoundedRect";
|
|
56
|
+
MASK_TYPE["Polygon"] = "Polygon";
|
|
57
|
+
MASK_TYPE["Img"] = "Img";
|
|
58
|
+
MASK_TYPE["Sprite"] = "Sprite";
|
|
59
|
+
})(MASK_TYPE || (MASK_TYPE = {}));
|
|
60
|
+
var Mask = function (_super) {
|
|
61
|
+
__extends(Mask, _super);
|
|
62
|
+
function Mask() {
|
|
63
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
64
|
+
_this.name = 'Mask';
|
|
65
|
+
_this.changedCache = {};
|
|
66
|
+
_this.maskSpriteCache = {};
|
|
67
|
+
return _this;
|
|
68
|
+
}
|
|
69
|
+
Mask.prototype.init = function () {
|
|
70
|
+
this.renderSystem = this.game.getSystem(RendererSystem);
|
|
71
|
+
this.renderSystem.rendererManager.register(this);
|
|
72
|
+
};
|
|
73
|
+
Mask.prototype.rendererUpdate = function () {
|
|
74
|
+
this.changedCache = {};
|
|
75
|
+
};
|
|
76
|
+
Mask.prototype.componentChanged = function (changed) {
|
|
77
|
+
if (changed.component.name !== 'Mask') return;
|
|
78
|
+
switch (changed.type) {
|
|
79
|
+
case OBSERVER_TYPE.ADD:
|
|
80
|
+
this.add(changed);
|
|
81
|
+
break;
|
|
82
|
+
case OBSERVER_TYPE.REMOVE:
|
|
83
|
+
this.remove(changed);
|
|
84
|
+
break;
|
|
85
|
+
case OBSERVER_TYPE.CHANGE:
|
|
86
|
+
this.change(changed);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
Mask.prototype.add = function (changed) {
|
|
91
|
+
var component = changed.component;
|
|
92
|
+
if (!(component.type in MASK_TYPE)) {
|
|
93
|
+
throw new Error('no have Mask type: ' + component.type);
|
|
94
|
+
}
|
|
95
|
+
if (!component.style) {
|
|
96
|
+
throw new Error('no have Mask style: ' + component.type);
|
|
97
|
+
}
|
|
98
|
+
var mask;
|
|
99
|
+
switch (component.type) {
|
|
100
|
+
case MASK_TYPE.Circle:
|
|
101
|
+
mask = this.createGraphics(component);
|
|
102
|
+
break;
|
|
103
|
+
case MASK_TYPE.Ellipse:
|
|
104
|
+
mask = this.createGraphics(component);
|
|
105
|
+
break;
|
|
106
|
+
case MASK_TYPE.Rect:
|
|
107
|
+
mask = this.createGraphics(component);
|
|
108
|
+
break;
|
|
109
|
+
case MASK_TYPE.RoundedRect:
|
|
110
|
+
mask = this.createGraphics(component);
|
|
111
|
+
break;
|
|
112
|
+
case MASK_TYPE.Polygon:
|
|
113
|
+
mask = this.createGraphics(component);
|
|
114
|
+
break;
|
|
115
|
+
case MASK_TYPE.Img:
|
|
116
|
+
mask = this.createSprite(component);
|
|
117
|
+
break;
|
|
118
|
+
case MASK_TYPE.Sprite:
|
|
119
|
+
mask = this.createSprite(component);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
if (!mask) {
|
|
123
|
+
throw new Error('no have mask instance, check your mask params: ' + component.type);
|
|
124
|
+
}
|
|
125
|
+
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
126
|
+
container.mask = mask;
|
|
127
|
+
container.addChild(mask);
|
|
128
|
+
};
|
|
129
|
+
Mask.prototype.remove = function (changed) {
|
|
130
|
+
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
131
|
+
container.removeChild(container.mask);
|
|
132
|
+
container.mask.destroy({
|
|
133
|
+
children: true
|
|
134
|
+
});
|
|
135
|
+
container.mask = null;
|
|
136
|
+
delete this.maskSpriteCache[changed.gameObject.id];
|
|
137
|
+
};
|
|
138
|
+
Mask.prototype.change = function (changed) {
|
|
139
|
+
if (this.changedCache[changed.gameObject.id]) return;
|
|
140
|
+
var component = changed.component;
|
|
141
|
+
if (changed.prop.prop[0] === 'type') {
|
|
142
|
+
this.changedCache[changed.gameObject.id] = true;
|
|
143
|
+
if ([MASK_TYPE.Sprite, MASK_TYPE.Img].indexOf(component.type) > -1) {
|
|
144
|
+
this.remove(changed);
|
|
145
|
+
this.add(changed);
|
|
146
|
+
} else {
|
|
147
|
+
this.redrawGraphics(changed);
|
|
148
|
+
}
|
|
149
|
+
} else if (changed.prop.prop[0] === 'style') {
|
|
150
|
+
if ([MASK_TYPE.Sprite, MASK_TYPE.Img].indexOf(component.type) > -1) {
|
|
151
|
+
this.changeSpriteStyle(component);
|
|
152
|
+
} else {
|
|
153
|
+
this.redrawGraphics(changed);
|
|
154
|
+
}
|
|
155
|
+
} else if (changed.prop.prop[0] === 'resource') {
|
|
156
|
+
this.changedCache[changed.gameObject.id] = true;
|
|
157
|
+
this.changeSprite(component);
|
|
158
|
+
} else if (changed.prop.prop[0] === 'spriteName') {
|
|
159
|
+
this.changedCache[changed.gameObject.id] = true;
|
|
160
|
+
this.changeSprite(component);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
Mask.prototype.createGraphics = function (component) {
|
|
164
|
+
var graphics = new Graphics();
|
|
165
|
+
this.draw(graphics, component);
|
|
166
|
+
return graphics;
|
|
167
|
+
};
|
|
168
|
+
Mask.prototype.redrawGraphics = function (changed) {
|
|
169
|
+
var container = this.containerManager.getContainer(changed.gameObject.id);
|
|
170
|
+
var graphics = container.mask;
|
|
171
|
+
graphics.clear();
|
|
172
|
+
this.draw(graphics, changed.component);
|
|
173
|
+
};
|
|
174
|
+
Mask.prototype.draw = function (graphics, component) {
|
|
175
|
+
var e_1, _a;
|
|
176
|
+
var params = [];
|
|
177
|
+
try {
|
|
178
|
+
for (var _b = __values(propertyForGraphics[component.type]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
179
|
+
var key = _c.value;
|
|
180
|
+
params.push(component.style[key]);
|
|
181
|
+
}
|
|
182
|
+
} catch (e_1_1) {
|
|
183
|
+
e_1 = {
|
|
184
|
+
error: e_1_1
|
|
185
|
+
};
|
|
186
|
+
} finally {
|
|
187
|
+
try {
|
|
188
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
189
|
+
} finally {
|
|
190
|
+
if (e_1) throw e_1.error;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
graphics.beginFill(0x000000, 1);
|
|
194
|
+
graphics[functionForGraphics[component.type]].apply(graphics, __spread(params));
|
|
195
|
+
graphics.endFill();
|
|
196
|
+
};
|
|
197
|
+
Mask.prototype.createSprite = function (component) {
|
|
198
|
+
var sprite = new Sprite(null);
|
|
199
|
+
this.maskSpriteCache[component.gameObject.id] = sprite;
|
|
200
|
+
this.setSprite(component, sprite);
|
|
201
|
+
return sprite.sprite;
|
|
202
|
+
};
|
|
203
|
+
Mask.prototype.changeSpriteStyle = function (component) {
|
|
204
|
+
var sprite = this.maskSpriteCache[component.gameObject.id];
|
|
205
|
+
sprite.sprite.width = component.style.width;
|
|
206
|
+
sprite.sprite.height = component.style.height;
|
|
207
|
+
sprite.sprite.position.x = component.style.x;
|
|
208
|
+
sprite.sprite.position.y = component.style.y;
|
|
209
|
+
};
|
|
210
|
+
Mask.prototype.changeSprite = function (component) {
|
|
211
|
+
var sprite = this.maskSpriteCache[component.gameObject.id];
|
|
212
|
+
this.setSprite(component, sprite);
|
|
213
|
+
};
|
|
214
|
+
Mask.prototype.setSprite = function (component, sprite) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
216
|
+
var res, asyncId, img, texture;
|
|
217
|
+
return __generator(this, function (_a) {
|
|
218
|
+
switch (_a.label) {
|
|
219
|
+
case 0:
|
|
220
|
+
_a.trys.push([0, 2,, 3]);
|
|
221
|
+
asyncId = this.increaseAsyncId(component.gameObject.id);
|
|
222
|
+
return [4, resource.getResource(component.resource)];
|
|
223
|
+
case 1:
|
|
224
|
+
res = _a.sent();
|
|
225
|
+
if (!this.validateAsyncId(component.gameObject.id, asyncId)) return [2];
|
|
226
|
+
return [3, 3];
|
|
227
|
+
case 2:
|
|
228
|
+
_a.sent();
|
|
229
|
+
throw new Error('mask resource load error');
|
|
230
|
+
case 3:
|
|
231
|
+
if (component.type === MASK_TYPE.Sprite) {
|
|
232
|
+
img = component.resource + resourceKeySplit + component.spriteName;
|
|
233
|
+
texture = res.instance[img];
|
|
234
|
+
sprite.image = texture;
|
|
235
|
+
} else {
|
|
236
|
+
sprite.image = res.data.image;
|
|
237
|
+
}
|
|
238
|
+
sprite.sprite.width = component.style.width;
|
|
239
|
+
sprite.sprite.height = component.style.height;
|
|
240
|
+
sprite.sprite.position.x = component.style.x;
|
|
241
|
+
sprite.sprite.position.y = component.style.y;
|
|
242
|
+
return [2];
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
Mask.systemName = 'Mask';
|
|
248
|
+
Mask = __decorate([decorators.componentObserver({
|
|
249
|
+
Mask: ['type', {
|
|
250
|
+
prop: ['style'],
|
|
251
|
+
deep: true
|
|
252
|
+
}, 'resource', 'spriteName']
|
|
253
|
+
})], Mask);
|
|
254
|
+
return Mask;
|
|
255
|
+
}(Renderer);
|
|
256
|
+
var Mask$1 = Mask;
|
|
257
|
+
export { MASK_TYPE$1 as MASK_TYPE, Mask$3 as Mask, Mask$1 as MaskSystem };
|
|
@@ -43,10 +43,6 @@ function __decorate(decorators, target, key, desc) {
|
|
|
43
43
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function __metadata(metadataKey, metadataValue) {
|
|
47
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
46
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
51
47
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
52
48
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -118,7 +114,6 @@ function __spread() {
|
|
|
118
114
|
return ar;
|
|
119
115
|
}
|
|
120
116
|
|
|
121
|
-
var _a;
|
|
122
117
|
exports.MASK_TYPE = void 0;
|
|
123
118
|
(function (MASK_TYPE) {
|
|
124
119
|
MASK_TYPE["Circle"] = "Circle";
|
|
@@ -129,31 +124,6 @@ exports.MASK_TYPE = void 0;
|
|
|
129
124
|
MASK_TYPE["Img"] = "Img";
|
|
130
125
|
MASK_TYPE["Sprite"] = "Sprite";
|
|
131
126
|
})(exports.MASK_TYPE || (exports.MASK_TYPE = {}));
|
|
132
|
-
var MaskStyle = (function () {
|
|
133
|
-
function MaskStyle() {
|
|
134
|
-
}
|
|
135
|
-
__decorate([
|
|
136
|
-
inspectorDecorator.Field({ step: 1 }),
|
|
137
|
-
__metadata("design:type", Number)
|
|
138
|
-
], MaskStyle.prototype, "x", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
inspectorDecorator.Field({ step: 1 }),
|
|
141
|
-
__metadata("design:type", Number)
|
|
142
|
-
], MaskStyle.prototype, "y", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
inspectorDecorator.Field({ step: 0.1, if: function (mask) { return mask.type === exports.MASK_TYPE.Circle || mask.type === exports.MASK_TYPE.RoundedRect; } }),
|
|
145
|
-
__metadata("design:type", Number)
|
|
146
|
-
], MaskStyle.prototype, "radius", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
inspectorDecorator.Field({ step: 1, if: function (mask) { return mask.type !== exports.MASK_TYPE.Circle; } }),
|
|
149
|
-
__metadata("design:type", Number)
|
|
150
|
-
], MaskStyle.prototype, "width", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
inspectorDecorator.Field({ step: 1, if: function (mask) { return mask.type !== exports.MASK_TYPE.Circle; } }),
|
|
153
|
-
__metadata("design:type", Number)
|
|
154
|
-
], MaskStyle.prototype, "height", void 0);
|
|
155
|
-
return MaskStyle;
|
|
156
|
-
}());
|
|
157
127
|
var Mask$2 = (function (_super) {
|
|
158
128
|
__extends(Mask, _super);
|
|
159
129
|
function Mask() {
|
|
@@ -168,31 +138,11 @@ var Mask$2 = (function (_super) {
|
|
|
168
138
|
};
|
|
169
139
|
Mask.componentName = 'Mask';
|
|
170
140
|
__decorate([
|
|
171
|
-
inspectorDecorator.
|
|
172
|
-
type: 'selector',
|
|
173
|
-
options: (_a = {},
|
|
174
|
-
_a[exports.MASK_TYPE.Circle] = exports.MASK_TYPE.Circle,
|
|
175
|
-
_a[exports.MASK_TYPE.Ellipse] = exports.MASK_TYPE.Ellipse,
|
|
176
|
-
_a[exports.MASK_TYPE.Img] = exports.MASK_TYPE.Img,
|
|
177
|
-
_a[exports.MASK_TYPE.Rect] = exports.MASK_TYPE.Rect,
|
|
178
|
-
_a[exports.MASK_TYPE.RoundedRect] = exports.MASK_TYPE.RoundedRect,
|
|
179
|
-
_a),
|
|
180
|
-
alias: 'type',
|
|
181
|
-
default: exports.MASK_TYPE.Circle,
|
|
182
|
-
}),
|
|
183
|
-
__metadata("design:type", String)
|
|
184
|
-
], Mask.prototype, "mask_type", void 0);
|
|
185
|
-
__decorate([
|
|
186
|
-
inspectorDecorator.Field(function () { return MaskStyle; }),
|
|
187
|
-
__metadata("design:type", Object)
|
|
188
|
-
], Mask.prototype, "style", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
inspectorDecorator.Field({
|
|
191
|
-
type: 'resource',
|
|
192
|
-
if: function (mask) { return mask.type === exports.MASK_TYPE.Img || exports.MASK_TYPE.Sprite; },
|
|
193
|
-
}),
|
|
194
|
-
__metadata("design:type", String)
|
|
141
|
+
inspectorDecorator.type('string')
|
|
195
142
|
], Mask.prototype, "resource", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
inspectorDecorator.type('string')
|
|
145
|
+
], Mask.prototype, "spriteName", void 0);
|
|
196
146
|
return Mask;
|
|
197
147
|
}(eva_js.Component));
|
|
198
148
|
var Mask$3 = Mask$2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("@eva/inspector-decorator"),r=require("@eva/plugin-renderer"),n=require("@eva/renderer-adapter"),o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},o(e,t)};function i(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function a(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function s(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}exports.MASK_TYPE=void 0,function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(exports.MASK_TYPE||(exports.MASK_TYPE={}));var p,l=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.style={},t.resource="",t.spriteName="",t}return i(r,e),r.prototype.init=function(e){Object.assign(this,e)},r.componentName="Mask",a([t.type("string")],r.prototype,"resource",void 0),a([t.type("string")],r.prototype,"spriteName",void 0),r}(e.Component),h=l,u={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},y={Circle:"drawCircle",Ellipse:"drawEllipse",Rect:"drawRect",RoundedRect:"drawRoundedRect",Polygon:"drawPolygon"};!function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(p||(p={}));var d=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Mask",e.changedCache={},e.maskSpriteCache={},e}return i(o,t),o.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},o.prototype.rendererUpdate=function(){this.changedCache={}},o.prototype.componentChanged=function(t){if("Mask"===t.component.name)switch(t.type){case e.OBSERVER_TYPE.ADD:this.add(t);break;case e.OBSERVER_TYPE.REMOVE:this.remove(t);break;case e.OBSERVER_TYPE.CHANGE:this.change(t)}},o.prototype.add=function(e){var t,r=e.component;if(!(r.type in p))throw new Error("no have Mask type: "+r.type);if(!r.style)throw new Error("no have Mask style: "+r.type);switch(r.type){case p.Circle:case p.Ellipse:case p.Rect:case p.RoundedRect:case p.Polygon:t=this.createGraphics(r);break;case p.Img:case p.Sprite:t=this.createSprite(r)}if(!t)throw new Error("no have mask instance, check your mask params: "+r.type);var n=this.containerManager.getContainer(e.gameObject.id);n.mask=t,n.addChild(t)},o.prototype.remove=function(e){var t=this.containerManager.getContainer(e.gameObject.id);t.removeChild(t.mask),t.mask.destroy({children:!0}),t.mask=null,delete this.maskSpriteCache[e.gameObject.id]},o.prototype.change=function(e){if(!this.changedCache[e.gameObject.id]){var t=e.component;"type"===e.prop.prop[0]?(this.changedCache[e.gameObject.id]=!0,[p.Sprite,p.Img].indexOf(t.type)>-1?(this.remove(e),this.add(e)):this.redrawGraphics(e)):"style"===e.prop.prop[0]?[p.Sprite,p.Img].indexOf(t.type)>-1?this.changeSpriteStyle(t):this.redrawGraphics(e):("resource"===e.prop.prop[0]||"spriteName"===e.prop.prop[0])&&(this.changedCache[e.gameObject.id]=!0,this.changeSprite(t))}},o.prototype.createGraphics=function(e){var t=new n.Graphics;return this.draw(t,e),t},o.prototype.redrawGraphics=function(e){var t=this.containerManager.getContainer(e.gameObject.id).mask;t.clear(),this.draw(t,e.component)},o.prototype.draw=function(e,t){var r,n,o=[];try{for(var i=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(u[t.type]),a=i.next();!a.done;a=i.next()){var c=a.value;o.push(t.style[c])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.beginFill(0,1),e[y[t.type]].apply(e,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}(o)),e.endFill()},o.prototype.createSprite=function(e){var t=new n.Sprite(null);return this.maskSpriteCache[e.gameObject.id]=t,this.setSprite(e,t),t.sprite},o.prototype.changeSpriteStyle=function(e){var t=this.maskSpriteCache[e.gameObject.id];t.sprite.width=e.style.width,t.sprite.height=e.style.height,t.sprite.position.x=e.style.x,t.sprite.position.y=e.style.y},o.prototype.changeSprite=function(e){var t=this.maskSpriteCache[e.gameObject.id];this.setSprite(e,t)},o.prototype.setSprite=function(t,r){return n=this,o=void 0,a=function(){var n,o,i,a;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),o=this.increaseAsyncId(t.gameObject.id),[4,e.resource.getResource(t.resource)];case 1:return n=c.sent(),this.validateAsyncId(t.gameObject.id,o)?[3,3]:[2];case 2:throw c.sent(),new Error("mask resource load error");case 3:return t.type===p.Sprite?(i=t.resource+"_s|r|c_"+t.spriteName,a=n.instance[i],r.image=a):r.image=n.data.image,r.sprite.width=t.style.width,r.sprite.height=t.style.height,r.sprite.position.x=t.style.x,r.sprite.position.y=t.style.y,[2]}}))},new((i=void 0)||(i=Promise))((function(e,t){function r(e){try{s(a.next(e))}catch(e){t(e)}}function c(e){try{s(a.throw(e))}catch(e){t(e)}}function s(t){t.done?e(t.value):new i((function(e){e(t.value)})).then(r,c)}s((a=a.apply(n,o||[])).next())}));var n,o,i,a},o.systemName="Mask",o=a([e.decorators.componentObserver({Mask:["type",{prop:["style"],deep:!0},"resource","spriteName"]})],o)}(r.Renderer);exports.Mask=h,exports.MaskSystem=d;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="pixi.js" />
|
|
2
|
-
|
|
3
2
|
import { Component } from '@eva/eva.js';
|
|
4
3
|
import { ComponentChanged } from '@eva/eva.js';
|
|
5
4
|
import { ContainerManager } from '@eva/plugin-renderer';
|
|
@@ -12,7 +11,6 @@ import { Sprite } from '@eva/renderer-adapter';
|
|
|
12
11
|
export declare class Mask extends Component<MaskParams> {
|
|
13
12
|
static componentName: string;
|
|
14
13
|
_lastType: MaskParams['type'];
|
|
15
|
-
mask_type: string;
|
|
16
14
|
type: MaskParams['type'];
|
|
17
15
|
style?: MaskParams['style'];
|
|
18
16
|
resource?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, OBSERVER_TYPE, decorators, resource } from '@eva/eva.js';
|
|
2
|
-
import {
|
|
2
|
+
import { type } from '@eva/inspector-decorator';
|
|
3
3
|
import { RendererSystem, Renderer } from '@eva/plugin-renderer';
|
|
4
4
|
import { Graphics, Sprite } from '@eva/renderer-adapter';
|
|
5
5
|
|
|
@@ -39,10 +39,6 @@ function __decorate(decorators, target, key, desc) {
|
|
|
39
39
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function __metadata(metadataKey, metadataValue) {
|
|
43
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
42
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
47
43
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
48
44
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -114,7 +110,6 @@ function __spread() {
|
|
|
114
110
|
return ar;
|
|
115
111
|
}
|
|
116
112
|
|
|
117
|
-
var _a;
|
|
118
113
|
var MASK_TYPE$1;
|
|
119
114
|
(function (MASK_TYPE) {
|
|
120
115
|
MASK_TYPE["Circle"] = "Circle";
|
|
@@ -125,31 +120,6 @@ var MASK_TYPE$1;
|
|
|
125
120
|
MASK_TYPE["Img"] = "Img";
|
|
126
121
|
MASK_TYPE["Sprite"] = "Sprite";
|
|
127
122
|
})(MASK_TYPE$1 || (MASK_TYPE$1 = {}));
|
|
128
|
-
var MaskStyle = (function () {
|
|
129
|
-
function MaskStyle() {
|
|
130
|
-
}
|
|
131
|
-
__decorate([
|
|
132
|
-
Field({ step: 1 }),
|
|
133
|
-
__metadata("design:type", Number)
|
|
134
|
-
], MaskStyle.prototype, "x", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
Field({ step: 1 }),
|
|
137
|
-
__metadata("design:type", Number)
|
|
138
|
-
], MaskStyle.prototype, "y", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
Field({ step: 0.1, if: function (mask) { return mask.type === MASK_TYPE$1.Circle || mask.type === MASK_TYPE$1.RoundedRect; } }),
|
|
141
|
-
__metadata("design:type", Number)
|
|
142
|
-
], MaskStyle.prototype, "radius", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
Field({ step: 1, if: function (mask) { return mask.type !== MASK_TYPE$1.Circle; } }),
|
|
145
|
-
__metadata("design:type", Number)
|
|
146
|
-
], MaskStyle.prototype, "width", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
Field({ step: 1, if: function (mask) { return mask.type !== MASK_TYPE$1.Circle; } }),
|
|
149
|
-
__metadata("design:type", Number)
|
|
150
|
-
], MaskStyle.prototype, "height", void 0);
|
|
151
|
-
return MaskStyle;
|
|
152
|
-
}());
|
|
153
123
|
var Mask$2 = (function (_super) {
|
|
154
124
|
__extends(Mask, _super);
|
|
155
125
|
function Mask() {
|
|
@@ -164,31 +134,11 @@ var Mask$2 = (function (_super) {
|
|
|
164
134
|
};
|
|
165
135
|
Mask.componentName = 'Mask';
|
|
166
136
|
__decorate([
|
|
167
|
-
|
|
168
|
-
type: 'selector',
|
|
169
|
-
options: (_a = {},
|
|
170
|
-
_a[MASK_TYPE$1.Circle] = MASK_TYPE$1.Circle,
|
|
171
|
-
_a[MASK_TYPE$1.Ellipse] = MASK_TYPE$1.Ellipse,
|
|
172
|
-
_a[MASK_TYPE$1.Img] = MASK_TYPE$1.Img,
|
|
173
|
-
_a[MASK_TYPE$1.Rect] = MASK_TYPE$1.Rect,
|
|
174
|
-
_a[MASK_TYPE$1.RoundedRect] = MASK_TYPE$1.RoundedRect,
|
|
175
|
-
_a),
|
|
176
|
-
alias: 'type',
|
|
177
|
-
default: MASK_TYPE$1.Circle,
|
|
178
|
-
}),
|
|
179
|
-
__metadata("design:type", String)
|
|
180
|
-
], Mask.prototype, "mask_type", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
Field(function () { return MaskStyle; }),
|
|
183
|
-
__metadata("design:type", Object)
|
|
184
|
-
], Mask.prototype, "style", void 0);
|
|
185
|
-
__decorate([
|
|
186
|
-
Field({
|
|
187
|
-
type: 'resource',
|
|
188
|
-
if: function (mask) { return mask.type === MASK_TYPE$1.Img || MASK_TYPE$1.Sprite; },
|
|
189
|
-
}),
|
|
190
|
-
__metadata("design:type", String)
|
|
137
|
+
type('string')
|
|
191
138
|
], Mask.prototype, "resource", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
type('string')
|
|
141
|
+
], Mask.prototype, "spriteName", void 0);
|
|
192
142
|
return Mask;
|
|
193
143
|
}(Component));
|
|
194
144
|
var Mask$3 = Mask$2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-mask",
|
|
3
|
-
"version": "1.2.7-
|
|
3
|
+
"version": "1.2.7-fix.4",
|
|
4
4
|
"description": "@eva/plugin-renderer-mask",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-mask.esm.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"homepage": "https://eva.js.org",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eva/inspector-decorator": "0.
|
|
22
|
-
"@eva/plugin-renderer": "1.2.7-
|
|
23
|
-
"@eva/renderer-adapter": "1.2.7-
|
|
24
|
-
"@eva/eva.js": "1.2.7-
|
|
21
|
+
"@eva/inspector-decorator": "^0.0.5",
|
|
22
|
+
"@eva/plugin-renderer": "1.2.7-fix.4",
|
|
23
|
+
"@eva/renderer-adapter": "1.2.7-fix.4",
|
|
24
|
+
"@eva/eva.js": "1.2.7-fix.4",
|
|
25
25
|
"pixi.js": "^4.8.7"
|
|
26
26
|
}
|
|
27
27
|
}
|