@eva/plugin-renderer-text 1.2.7-editor.9 → 1.2.7-fix.5
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.text.js +13 -300
- package/dist/EVA.plugin.renderer.text.js.map +1 -0
- package/dist/EVA.plugin.renderer.text.min.js +1 -1
- package/dist/miniprogram.js +128 -0
- package/dist/plugin-renderer-text.cjs.js +1 -165
- package/dist/plugin-renderer-text.cjs.js.map +1 -0
- package/dist/plugin-renderer-text.cjs.prod.js +1 -1
- package/dist/plugin-renderer-text.d.ts +32 -34
- package/dist/plugin-renderer-text.esm.js +2 -166
- package/dist/plugin-renderer-text.esm.js.map +1 -0
- package/package.json +5 -5
|
@@ -14,7 +14,7 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
14
14
|
d.__proto__ = b;
|
|
15
15
|
} || function (d, b) {
|
|
16
16
|
for (var p in b) {
|
|
17
|
-
if (
|
|
17
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -22,8 +22,6 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
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
25
|
_extendStatics(d, b);
|
|
28
26
|
|
|
29
27
|
function __() {
|
|
@@ -33,22 +31,6 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
33
31
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
32
|
}
|
|
35
33
|
|
|
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
34
|
function __decorate(decorators, target, key, desc) {
|
|
53
35
|
var c = arguments.length,
|
|
54
36
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -59,10 +41,6 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
59
41
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
42
|
}
|
|
61
43
|
|
|
62
|
-
function __metadata(metadataKey, metadataValue) {
|
|
63
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
44
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
67
45
|
function adopt(value) {
|
|
68
46
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -206,277 +184,27 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
206
184
|
}
|
|
207
185
|
}
|
|
208
186
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
function SymbolKeysNotSupportedError() {
|
|
213
|
-
var _newTarget = this.constructor;
|
|
214
|
-
|
|
215
|
-
var _this = _super.call(this, 'Symbol keys are not supported yet!') || this;
|
|
216
|
-
|
|
217
|
-
Object.setPrototypeOf(_this, _newTarget.prototype);
|
|
218
|
-
return _this;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
return SymbolKeysNotSupportedError;
|
|
222
|
-
}(Error);
|
|
223
|
-
|
|
224
|
-
(function (_super) {
|
|
225
|
-
__extends(StaticGetPropertiesIsNotAFunctionError, _super);
|
|
226
|
-
|
|
227
|
-
function StaticGetPropertiesIsNotAFunctionError() {
|
|
228
|
-
var _newTarget = this.constructor;
|
|
229
|
-
|
|
230
|
-
var _this = _super.call(this, 'getProperties is not a function!') || this;
|
|
231
|
-
|
|
232
|
-
Object.setPrototypeOf(_this, _newTarget.prototype);
|
|
233
|
-
return _this;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
return StaticGetPropertiesIsNotAFunctionError;
|
|
237
|
-
})(Error);
|
|
238
|
-
|
|
239
|
-
var IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';
|
|
240
|
-
|
|
241
|
-
function transformBasicType(type) {
|
|
242
|
-
if (type === String) {
|
|
243
|
-
return 'string';
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (type === Number) {
|
|
247
|
-
return 'number';
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
if (type === Boolean) {
|
|
251
|
-
return 'boolean';
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
return 'unknown';
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function defineTypes(target, key, options, returnTypeFunction) {
|
|
258
|
-
var type = Reflect.getMetadata('design:type', target, key);
|
|
259
|
-
var isArray = type === Array;
|
|
260
|
-
var str = transformBasicType(type);
|
|
261
|
-
|
|
262
|
-
if (str !== 'unknown') {
|
|
263
|
-
type = str;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
if (returnTypeFunction) {
|
|
267
|
-
var returnType = returnTypeFunction();
|
|
268
|
-
|
|
269
|
-
if (Array.isArray(returnType)) {
|
|
270
|
-
isArray = true;
|
|
271
|
-
type = returnType[0];
|
|
272
|
-
} else {
|
|
273
|
-
type = returnType;
|
|
274
|
-
}
|
|
187
|
+
function getIDEPropsPropertyObj(target, propertyKey) {
|
|
188
|
+
if (!target.constructor.IDEProps) {
|
|
189
|
+
target.constructor.IDEProps = {};
|
|
275
190
|
}
|
|
276
191
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
type: type,
|
|
280
|
-
isArray: isArray
|
|
281
|
-
}, options);
|
|
282
|
-
Reflect.defineMetadata(IDE_PROPERTY_METADATA, properties, target.constructor);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function getTypeDecoratorParams(returnTypeFuncOrOptions, maybeOptions) {
|
|
286
|
-
if (typeof returnTypeFuncOrOptions === 'function') {
|
|
287
|
-
return {
|
|
288
|
-
returnTypeFunc: returnTypeFuncOrOptions,
|
|
289
|
-
options: maybeOptions || {}
|
|
290
|
-
};
|
|
192
|
+
if (!target.constructor.IDEProps[propertyKey]) {
|
|
193
|
+
target.constructor.IDEProps[propertyKey] = {};
|
|
291
194
|
}
|
|
292
195
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
};
|
|
196
|
+
var propertyObj = target.constructor.IDEProps[propertyKey];
|
|
197
|
+
return propertyObj;
|
|
296
198
|
}
|
|
297
199
|
|
|
298
|
-
function
|
|
200
|
+
function type(type) {
|
|
299
201
|
return function (target, propertyKey) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
var _a = getTypeDecoratorParams(returnTypeFunction, maybeOptions),
|
|
305
|
-
options = _a.options,
|
|
306
|
-
returnTypeFunc = _a.returnTypeFunc;
|
|
307
|
-
|
|
308
|
-
defineTypes(target, propertyKey, options, returnTypeFunc);
|
|
202
|
+
var prop = getIDEPropsPropertyObj(target, propertyKey);
|
|
203
|
+
prop.key = propertyKey;
|
|
204
|
+
prop.type = type;
|
|
309
205
|
};
|
|
310
206
|
}
|
|
311
207
|
|
|
312
|
-
var ExecuteMode;
|
|
313
|
-
|
|
314
|
-
(function (ExecuteMode) {
|
|
315
|
-
ExecuteMode[ExecuteMode["Edit"] = 2] = "Edit";
|
|
316
|
-
ExecuteMode[ExecuteMode["Game"] = 4] = "Game";
|
|
317
|
-
ExecuteMode[ExecuteMode["All"] = 6] = "All";
|
|
318
|
-
})(ExecuteMode || (ExecuteMode = {}));
|
|
319
|
-
|
|
320
|
-
var Color = function () {
|
|
321
|
-
function Color() {}
|
|
322
|
-
|
|
323
|
-
Color.getProperties = function () {
|
|
324
|
-
return 'color';
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
return Color;
|
|
328
|
-
}();
|
|
329
|
-
|
|
330
|
-
var Style = function () {
|
|
331
|
-
function Style() {}
|
|
332
|
-
|
|
333
|
-
__decorate([Field({
|
|
334
|
-
type: 'selector',
|
|
335
|
-
isArray: false,
|
|
336
|
-
options: ['center', 'left', 'right'],
|
|
337
|
-
default: 'left'
|
|
338
|
-
}), __metadata("design:type", String)], Style.prototype, "align", void 0);
|
|
339
|
-
|
|
340
|
-
__decorate([Field(), __metadata("design:type", Boolean)], Style.prototype, "breakWords", void 0);
|
|
341
|
-
|
|
342
|
-
__decorate([Field(), __metadata("design:type", Boolean)], Style.prototype, "dropShadow", void 0);
|
|
343
|
-
|
|
344
|
-
__decorate([Field({
|
|
345
|
-
default: 1
|
|
346
|
-
}), __metadata("design:type", Number)], Style.prototype, "dropShadowAlpha", void 0);
|
|
347
|
-
|
|
348
|
-
__decorate([Field({
|
|
349
|
-
default: Math.PI / 6
|
|
350
|
-
}), __metadata("design:type", Number)], Style.prototype, "dropShadowAngle", void 0);
|
|
351
|
-
|
|
352
|
-
__decorate([Field({
|
|
353
|
-
default: 0
|
|
354
|
-
}), __metadata("design:type", Number)], Style.prototype, "dropShadowBlur", void 0);
|
|
355
|
-
|
|
356
|
-
__decorate([Field(function () {
|
|
357
|
-
return Color;
|
|
358
|
-
}, {
|
|
359
|
-
default: '#000000'
|
|
360
|
-
}), __metadata("design:type", Object)], Style.prototype, "dropShadowColor", void 0);
|
|
361
|
-
|
|
362
|
-
__decorate([Field({
|
|
363
|
-
default: 5
|
|
364
|
-
}), __metadata("design:type", Number)], Style.prototype, "dropShadowDistance", void 0);
|
|
365
|
-
|
|
366
|
-
__decorate([Field(function () {
|
|
367
|
-
return [Color];
|
|
368
|
-
}, {
|
|
369
|
-
default: ['#000000']
|
|
370
|
-
}), __metadata("design:type", Object)], Style.prototype, "fill", void 0);
|
|
371
|
-
|
|
372
|
-
__decorate([Field({
|
|
373
|
-
type: 'selector',
|
|
374
|
-
options: {
|
|
375
|
-
vertical: 1,
|
|
376
|
-
horizontal: 0
|
|
377
|
-
},
|
|
378
|
-
default: 1,
|
|
379
|
-
filter: function filter(val) {
|
|
380
|
-
return Number(val);
|
|
381
|
-
},
|
|
382
|
-
isArray: false
|
|
383
|
-
}), __metadata("design:type", Number)], Style.prototype, "fillGradientType", void 0);
|
|
384
|
-
|
|
385
|
-
__decorate([Field(function () {
|
|
386
|
-
return Number;
|
|
387
|
-
}, {
|
|
388
|
-
step: 0.1,
|
|
389
|
-
min: 0,
|
|
390
|
-
max: 1
|
|
391
|
-
}), __metadata("design:type", Array)], Style.prototype, "fillGradientStops", void 0);
|
|
392
|
-
|
|
393
|
-
__decorate([Field(function () {
|
|
394
|
-
return String;
|
|
395
|
-
}, {
|
|
396
|
-
default: 'Arial'
|
|
397
|
-
}), __metadata("design:type", Object)], Style.prototype, "fontFamily", void 0);
|
|
398
|
-
|
|
399
|
-
__decorate([Field(function () {
|
|
400
|
-
return Number;
|
|
401
|
-
}, {
|
|
402
|
-
min: 5,
|
|
403
|
-
default: 26
|
|
404
|
-
}), __metadata("design:type", Object)], Style.prototype, "fontSize", void 0);
|
|
405
|
-
|
|
406
|
-
__decorate([Field({
|
|
407
|
-
type: 'selector',
|
|
408
|
-
options: ['normal', 'italic', 'oblique'],
|
|
409
|
-
default: 'normal'
|
|
410
|
-
}), __metadata("design:type", String)], Style.prototype, "fontStyle", void 0);
|
|
411
|
-
|
|
412
|
-
__decorate([Field({
|
|
413
|
-
type: 'selector',
|
|
414
|
-
options: ['normal', 'small-caps'],
|
|
415
|
-
default: 'normal'
|
|
416
|
-
}), __metadata("design:type", String)], Style.prototype, "fontVariant", void 0);
|
|
417
|
-
|
|
418
|
-
__decorate([Field({
|
|
419
|
-
type: 'selector',
|
|
420
|
-
options: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
421
|
-
default: 'normal'
|
|
422
|
-
}), __metadata("design:type", String)], Style.prototype, "fontWeight", void 0);
|
|
423
|
-
|
|
424
|
-
__decorate([Field({
|
|
425
|
-
default: 0
|
|
426
|
-
}), __metadata("design:type", Number)], Style.prototype, "letterSpacing", void 0);
|
|
427
|
-
|
|
428
|
-
__decorate([Field({
|
|
429
|
-
default: 0
|
|
430
|
-
}), __metadata("design:type", Number)], Style.prototype, "lineHeight", void 0);
|
|
431
|
-
|
|
432
|
-
__decorate([Field({
|
|
433
|
-
type: 'selector',
|
|
434
|
-
options: ['miter', 'round', 'bevel'],
|
|
435
|
-
default: 'miter'
|
|
436
|
-
}), __metadata("design:type", String)], Style.prototype, "lineJoin", void 0);
|
|
437
|
-
|
|
438
|
-
__decorate([Field({
|
|
439
|
-
default: 10
|
|
440
|
-
}), __metadata("design:type", Number)], Style.prototype, "miterLimit", void 0);
|
|
441
|
-
|
|
442
|
-
__decorate([Field({
|
|
443
|
-
default: 0
|
|
444
|
-
}), __metadata("design:type", Number)], Style.prototype, "padding", void 0);
|
|
445
|
-
|
|
446
|
-
__decorate([Field(function () {
|
|
447
|
-
return Color;
|
|
448
|
-
}, {
|
|
449
|
-
default: '#000000'
|
|
450
|
-
}), __metadata("design:type", Object)], Style.prototype, "stroke", void 0);
|
|
451
|
-
|
|
452
|
-
__decorate([Field({
|
|
453
|
-
default: 0,
|
|
454
|
-
min: 0
|
|
455
|
-
}), __metadata("design:type", Number)], Style.prototype, "strokeThickness", void 0);
|
|
456
|
-
|
|
457
|
-
__decorate([Field({
|
|
458
|
-
default: 'alphabetic'
|
|
459
|
-
}), __metadata("design:type", String)], Style.prototype, "textBaseline", void 0);
|
|
460
|
-
|
|
461
|
-
__decorate([Field(), __metadata("design:type", Boolean)], Style.prototype, "trim", void 0);
|
|
462
|
-
|
|
463
|
-
__decorate([Field({
|
|
464
|
-
default: 'pre',
|
|
465
|
-
type: 'selector',
|
|
466
|
-
options: ['normal', 'pre', 'pre-line']
|
|
467
|
-
}), __metadata("design:type", String)], Style.prototype, "whiteSpace", void 0);
|
|
468
|
-
|
|
469
|
-
__decorate([Field(), __metadata("design:type", Boolean)], Style.prototype, "wordWrap", void 0);
|
|
470
|
-
|
|
471
|
-
__decorate([Field({
|
|
472
|
-
default: 100
|
|
473
|
-
}), __metadata("design:type", Number)], Style.prototype, "wordWrapWidth", void 0);
|
|
474
|
-
|
|
475
|
-
__decorate([Field(), __metadata("design:type", Number)], Style.prototype, "leading", void 0);
|
|
476
|
-
|
|
477
|
-
return Style;
|
|
478
|
-
}();
|
|
479
|
-
|
|
480
208
|
var Text$2 = function (_super) {
|
|
481
209
|
__extends(Text, _super);
|
|
482
210
|
|
|
@@ -511,22 +239,7 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
511
239
|
|
|
512
240
|
Text.componentName = 'Text';
|
|
513
241
|
|
|
514
|
-
__decorate([
|
|
515
|
-
type: 'textarea',
|
|
516
|
-
filter: function filter(text) {
|
|
517
|
-
if (typeof text !== 'string') {
|
|
518
|
-
return '';
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
if (text.length > 100) {
|
|
522
|
-
return text.slice(0, 100);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
return text;
|
|
526
|
-
}
|
|
527
|
-
}), __metadata("design:type", String)], Text.prototype, "text", void 0);
|
|
528
|
-
|
|
529
|
-
__decorate([Field(), __metadata("design:type", Style)], Text.prototype, "style", void 0);
|
|
242
|
+
__decorate([type('string')], Text.prototype, "text", void 0);
|
|
530
243
|
|
|
531
244
|
return Text;
|
|
532
245
|
}(eva_js.Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EVA.plugin.renderer.text.js","sources":["../../../node_modules/tslib/tslib.es6.js","../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 { TextStyle } from 'pixi.js';\nimport { Component, decorators } from '@eva/eva.js';\n\nexport interface TextParams {\n text: string;\n style?: {\n align?: string;\n breakWords?: boolean;\n dropShadow?: boolean;\n dropShadowAlpha?: number;\n dropShadowAngle?: number;\n dropShadowBlur?: number;\n dropShadowColor?: string | number;\n dropShadowDistance?: number;\n fill?: string | string[] | number | number[] | CanvasGradient | CanvasPattern;\n fillGradientType?: number;\n fillGradientStops?: number[];\n fontFamily?: string | string[];\n fontSize?: number | string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string;\n letterSpacing?: number;\n lineHeight?: number;\n lineJoin?: string;\n miterLimit?: number;\n padding?: number;\n stroke?: string | number;\n strokeThickness?: number;\n textBaseline?: string;\n trim?: boolean;\n whiteSpace?: string;\n wordWrap?: boolean;\n wordWrapWidth?: number;\n leading?: number;\n };\n}\n\nexport default class Text extends Component<TextParams> {\n static componentName: string = 'Text';\n @decorators.IDEProp text: string = '';\n @decorators.IDEProp style: TextParams['style'] = {};\n init(obj?: TextParams) {\n const style = new TextStyle({\n fontSize: 20,\n });\n const newStyle = {};\n for (const key in style) {\n if (key.indexOf('_') === 0) {\n newStyle[key.substring(1)] = style[key];\n }\n }\n this.style = newStyle;\n if (obj) {\n this.text = obj.text;\n Object.assign(this.style, obj.style);\n }\n }\n}\n","import { decorators, ComponentChanged, OBSERVER_TYPE } from '@eva/eva.js';\n\nimport { RendererManager, ContainerManager, RendererSystem, Renderer } from '@eva/plugin-renderer';\nimport { Text as TextEngine } from '@eva/renderer-adapter';\n\nimport TextComponent from './component';\n@decorators.componentObserver({\n Text: ['text', { prop: ['style'], deep: true }],\n})\nexport default class Text extends Renderer {\n static systemName = 'Text';\n name: string = 'Text';\n texts: {\n [propName: number]: { text: TextEngine; component: TextComponent };\n } = {};\n renderSystem: RendererSystem;\n rendererManager: RendererManager;\n containerManager: ContainerManager;\n init() {\n this.renderSystem = this.game.getSystem(RendererSystem) as RendererSystem;\n this.renderSystem.rendererManager.register(this);\n }\n async componentChanged(changed: ComponentChanged) {\n if (changed.componentName !== 'Text') return;\n if (changed.type === OBSERVER_TYPE.ADD) {\n const component = changed.component as TextComponent;\n const text = new TextEngine(component.text, component.style);\n this.containerManager.getContainer(changed.gameObject.id).addChildAt(text, 0);\n this.texts[changed.gameObject.id] = {\n text,\n component: changed.component as TextComponent,\n };\n this.setSize(changed);\n } else if (changed.type === OBSERVER_TYPE.REMOVE) {\n this.containerManager.getContainer(changed.gameObject.id).removeChild(this.texts[changed.gameObject.id].text);\n this.texts[changed.gameObject.id].text.destroy({ children: true });\n delete this.texts[changed.gameObject.id];\n } else {\n this.change(changed);\n this.setSize(changed);\n }\n }\n change(changed: ComponentChanged) {\n const { text, component } = this.texts[changed.gameObject.id];\n if (changed.prop.prop[0] === 'text') {\n text.text = component.text;\n } else if (changed.prop.prop[0] === 'style') {\n Object.assign(text.style, (changed.component as TextComponent).style);\n }\n }\n setSize(changed: ComponentChanged) {\n const { transform } = changed.gameObject;\n if (!transform) return;\n transform.size.width = this.texts[changed.gameObject.id].text.width;\n transform.size.height = this.texts[changed.gameObject.id].text.height;\n }\n}\n"],"names":["TextStyle","decorators","Component","Text","RendererSystem","OBSERVER_TYPE","TextEngine","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,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AAM,CAAC;QADR,IAAI;YAHxBJ,iBAAU,CAAC,iBAAiB,CAAC;gBAC5B,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;aAChD,CAAC;WACmB,IAAI,CA+CxB;QAAD,WAAC;KAAA,CA/CiCM,uBAAQ,GA+CzC;iBA/CoB,IAAI;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return
|
|
1
|
+
function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_text=function(t,e,n,r,o){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function s(t,e,n,r){var o,i=arguments.length,c=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(c=(i<3?o(c):i>3?o(e,n,c):o(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c}function a(t,e,n,r){return new(n||(n=Promise))((function(o,i){function c(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,s)}a((r=r.apply(t,e||[])).next())}))}function u(t,e){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){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=e.call(t,c)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function p(t){return function(e,n){var r=function(t,e){return t.constructor.IDEProps||(t.constructor.IDEProps={}),t.constructor.IDEProps[e]||(t.constructor.IDEProps[e]={}),t.constructor.IDEProps[e]}(e,n);r.key=n,r.type=t}}var l=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.text="",e.style={},e}return c(n,t),n.prototype.init=function(t){var n=new e.TextStyle({fontSize:20}),r={};for(var o in n)0===o.indexOf("_")&&(r[o.substring(1)]=n[o]);this.style=r,t&&(this.text=t.text,_extends(this.style,t.style))},n.componentName="Text",s([p("string")],n.prototype,"text",void 0),n}(n.Component),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Text",e.texts={},e}return c(e,t),e.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},e.prototype.componentChanged=function(t){return a(this,void 0,void 0,(function(){var e,r;return u(this,(function(i){return"Text"!==t.componentName||(t.type===n.OBSERVER_TYPE.ADD?(e=t.component,r=new o.Text(e.text,e.style),this.containerManager.getContainer(t.gameObject.id).addChildAt(r,0),this.texts[t.gameObject.id]={text:r,component:t.component},this.setSize(t)):t.type===n.OBSERVER_TYPE.REMOVE?(this.containerManager.getContainer(t.gameObject.id).removeChild(this.texts[t.gameObject.id].text),this.texts[t.gameObject.id].text.destroy({children:!0}),delete this.texts[t.gameObject.id]):(this.change(t),this.setSize(t))),[2]}))}))},e.prototype.change=function(t){var e=this.texts[t.gameObject.id],n=e.text,r=e.component;"text"===t.prop.prop[0]?n.text=r.text:"style"===t.prop.prop[0]&&_extends(n.style,t.component.style)},e.prototype.setSize=function(t){var e=t.gameObject.transform;e&&(e.size.width=this.texts[t.gameObject.id].text.width,e.size.height=this.texts[t.gameObject.id].text.height)},e.systemName="Text",e=s([n.decorators.componentObserver({Text:["text",{prop:["style"],deep:!0}]})],e)}(r.Renderer);return t.Text=l,t.TextSystem=f,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI,EVA,EVA.plugin.renderer,EVA.rendererAdapter);window.EVA.plugin.renderer.text=window.EVA.plugin.renderer.text||_EVA_IIFE_text;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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
|
+
|
|
3
|
+
import { __extends, __decorate, __awaiter, __generator } from 'tslib';
|
|
4
|
+
import { TextStyle } from '@eva/miniprogram-pixi';
|
|
5
|
+
import { Component, OBSERVER_TYPE, decorators } from '@eva/eva.js/dist/miniprogram';
|
|
6
|
+
import { type } from '@eva/inspector-decorator';
|
|
7
|
+
import { RendererSystem, Renderer } from '@eva/plugin-renderer/dist/miniprogram';
|
|
8
|
+
import { Text as Text$4 } from '@eva/renderer-adapter/dist/miniprogram';
|
|
9
|
+
|
|
10
|
+
var Text$2 = function (_super) {
|
|
11
|
+
__extends(Text, _super);
|
|
12
|
+
|
|
13
|
+
function Text() {
|
|
14
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
+
|
|
16
|
+
_this.text = '';
|
|
17
|
+
_this.style = {};
|
|
18
|
+
return _this;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Text.prototype.init = function (obj) {
|
|
22
|
+
var style = new TextStyle({
|
|
23
|
+
fontSize: 20
|
|
24
|
+
});
|
|
25
|
+
var newStyle = {};
|
|
26
|
+
|
|
27
|
+
for (var key in style) {
|
|
28
|
+
if (key.indexOf('_') === 0) {
|
|
29
|
+
newStyle[key.substring(1)] = style[key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
this.style = newStyle;
|
|
34
|
+
|
|
35
|
+
if (obj) {
|
|
36
|
+
this.text = obj.text;
|
|
37
|
+
|
|
38
|
+
_extends(this.style, obj.style);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
Text.componentName = 'Text';
|
|
43
|
+
|
|
44
|
+
__decorate([type('string')], Text.prototype, "text", void 0);
|
|
45
|
+
|
|
46
|
+
return Text;
|
|
47
|
+
}(Component);
|
|
48
|
+
|
|
49
|
+
var Text$3 = Text$2;
|
|
50
|
+
|
|
51
|
+
var Text = function (_super) {
|
|
52
|
+
__extends(Text, _super);
|
|
53
|
+
|
|
54
|
+
function Text() {
|
|
55
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
56
|
+
|
|
57
|
+
_this.name = 'Text';
|
|
58
|
+
_this.texts = {};
|
|
59
|
+
return _this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
Text.prototype.init = function () {
|
|
63
|
+
this.renderSystem = this.game.getSystem(RendererSystem);
|
|
64
|
+
this.renderSystem.rendererManager.register(this);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
Text.prototype.componentChanged = function (changed) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
var component, text;
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
if (changed.componentName !== 'Text') return [2];
|
|
72
|
+
|
|
73
|
+
if (changed.type === OBSERVER_TYPE.ADD) {
|
|
74
|
+
component = changed.component;
|
|
75
|
+
text = new Text$4(component.text, component.style);
|
|
76
|
+
this.containerManager.getContainer(changed.gameObject.id).addChildAt(text, 0);
|
|
77
|
+
this.texts[changed.gameObject.id] = {
|
|
78
|
+
text: text,
|
|
79
|
+
component: changed.component
|
|
80
|
+
};
|
|
81
|
+
this.setSize(changed);
|
|
82
|
+
} else if (changed.type === OBSERVER_TYPE.REMOVE) {
|
|
83
|
+
this.containerManager.getContainer(changed.gameObject.id).removeChild(this.texts[changed.gameObject.id].text);
|
|
84
|
+
this.texts[changed.gameObject.id].text.destroy({
|
|
85
|
+
children: true
|
|
86
|
+
});
|
|
87
|
+
delete this.texts[changed.gameObject.id];
|
|
88
|
+
} else {
|
|
89
|
+
this.change(changed);
|
|
90
|
+
this.setSize(changed);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return [2];
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
Text.prototype.change = function (changed) {
|
|
99
|
+
var _a = this.texts[changed.gameObject.id],
|
|
100
|
+
text = _a.text,
|
|
101
|
+
component = _a.component;
|
|
102
|
+
|
|
103
|
+
if (changed.prop.prop[0] === 'text') {
|
|
104
|
+
text.text = component.text;
|
|
105
|
+
} else if (changed.prop.prop[0] === 'style') {
|
|
106
|
+
_extends(text.style, changed.component.style);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
Text.prototype.setSize = function (changed) {
|
|
111
|
+
var transform = changed.gameObject.transform;
|
|
112
|
+
if (!transform) return;
|
|
113
|
+
transform.size.width = this.texts[changed.gameObject.id].text.width;
|
|
114
|
+
transform.size.height = this.texts[changed.gameObject.id].text.height;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
Text.systemName = 'Text';
|
|
118
|
+
Text = __decorate([decorators.componentObserver({
|
|
119
|
+
Text: ['text', {
|
|
120
|
+
prop: ['style'],
|
|
121
|
+
deep: true
|
|
122
|
+
}]
|
|
123
|
+
})], Text);
|
|
124
|
+
return Text;
|
|
125
|
+
}(Renderer);
|
|
126
|
+
|
|
127
|
+
var Text$1 = Text;
|
|
128
|
+
export { Text$3 as Text, Text$1 as TextSystem };
|
|
@@ -44,10 +44,6 @@ function __decorate(decorators, target, key, desc) {
|
|
|
44
44
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function __metadata(metadataKey, metadataValue) {
|
|
48
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
47
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
52
48
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
53
49
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -85,150 +81,6 @@ function __generator(thisArg, body) {
|
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
|
|
88
|
-
var Color = (function () {
|
|
89
|
-
function Color() {
|
|
90
|
-
}
|
|
91
|
-
Color.getProperties = function () {
|
|
92
|
-
return 'color';
|
|
93
|
-
};
|
|
94
|
-
return Color;
|
|
95
|
-
}());
|
|
96
|
-
var Style = (function () {
|
|
97
|
-
function Style() {
|
|
98
|
-
}
|
|
99
|
-
__decorate([
|
|
100
|
-
inspectorDecorator.Field({
|
|
101
|
-
type: 'selector',
|
|
102
|
-
isArray: false,
|
|
103
|
-
options: ['center', 'left', 'right'],
|
|
104
|
-
default: 'left',
|
|
105
|
-
}),
|
|
106
|
-
__metadata("design:type", String)
|
|
107
|
-
], Style.prototype, "align", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
inspectorDecorator.Field(),
|
|
110
|
-
__metadata("design:type", Boolean)
|
|
111
|
-
], Style.prototype, "breakWords", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
inspectorDecorator.Field(),
|
|
114
|
-
__metadata("design:type", Boolean)
|
|
115
|
-
], Style.prototype, "dropShadow", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
inspectorDecorator.Field({ default: 1 }),
|
|
118
|
-
__metadata("design:type", Number)
|
|
119
|
-
], Style.prototype, "dropShadowAlpha", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
inspectorDecorator.Field({ default: Math.PI / 6 }),
|
|
122
|
-
__metadata("design:type", Number)
|
|
123
|
-
], Style.prototype, "dropShadowAngle", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
inspectorDecorator.Field({ default: 0 }),
|
|
126
|
-
__metadata("design:type", Number)
|
|
127
|
-
], Style.prototype, "dropShadowBlur", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
inspectorDecorator.Field(function () { return Color; }, { default: '#000000' }),
|
|
130
|
-
__metadata("design:type", Object)
|
|
131
|
-
], Style.prototype, "dropShadowColor", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
inspectorDecorator.Field({ default: 5 }),
|
|
134
|
-
__metadata("design:type", Number)
|
|
135
|
-
], Style.prototype, "dropShadowDistance", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
inspectorDecorator.Field(function () { return [Color]; }, { default: ['#000000'] }),
|
|
138
|
-
__metadata("design:type", Object)
|
|
139
|
-
], Style.prototype, "fill", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
inspectorDecorator.Field({
|
|
142
|
-
type: 'selector',
|
|
143
|
-
options: { vertical: 1, horizontal: 0 },
|
|
144
|
-
default: 1,
|
|
145
|
-
filter: function (val) { return Number(val); },
|
|
146
|
-
isArray: false,
|
|
147
|
-
}),
|
|
148
|
-
__metadata("design:type", Number)
|
|
149
|
-
], Style.prototype, "fillGradientType", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
inspectorDecorator.Field(function () { return Number; }, { step: 0.1, min: 0, max: 1 }),
|
|
152
|
-
__metadata("design:type", Array)
|
|
153
|
-
], Style.prototype, "fillGradientStops", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
inspectorDecorator.Field(function () { return String; }, { default: 'Arial' }),
|
|
156
|
-
__metadata("design:type", Object)
|
|
157
|
-
], Style.prototype, "fontFamily", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
inspectorDecorator.Field(function () { return Number; }, { min: 5, default: 26 }),
|
|
160
|
-
__metadata("design:type", Object)
|
|
161
|
-
], Style.prototype, "fontSize", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
inspectorDecorator.Field({ type: 'selector', options: ['normal', 'italic', 'oblique'], default: 'normal' }),
|
|
164
|
-
__metadata("design:type", String)
|
|
165
|
-
], Style.prototype, "fontStyle", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
inspectorDecorator.Field({ type: 'selector', options: ['normal', 'small-caps'], default: 'normal' }),
|
|
168
|
-
__metadata("design:type", String)
|
|
169
|
-
], Style.prototype, "fontVariant", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
inspectorDecorator.Field({
|
|
172
|
-
type: 'selector',
|
|
173
|
-
options: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
174
|
-
default: 'normal',
|
|
175
|
-
}),
|
|
176
|
-
__metadata("design:type", String)
|
|
177
|
-
], Style.prototype, "fontWeight", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
inspectorDecorator.Field({ default: 0 }),
|
|
180
|
-
__metadata("design:type", Number)
|
|
181
|
-
], Style.prototype, "letterSpacing", void 0);
|
|
182
|
-
__decorate([
|
|
183
|
-
inspectorDecorator.Field({ default: 0 }),
|
|
184
|
-
__metadata("design:type", Number)
|
|
185
|
-
], Style.prototype, "lineHeight", void 0);
|
|
186
|
-
__decorate([
|
|
187
|
-
inspectorDecorator.Field({ type: 'selector', options: ['miter', 'round', 'bevel'], default: 'miter' }),
|
|
188
|
-
__metadata("design:type", String)
|
|
189
|
-
], Style.prototype, "lineJoin", void 0);
|
|
190
|
-
__decorate([
|
|
191
|
-
inspectorDecorator.Field({ default: 10 }),
|
|
192
|
-
__metadata("design:type", Number)
|
|
193
|
-
], Style.prototype, "miterLimit", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
inspectorDecorator.Field({ default: 0 }),
|
|
196
|
-
__metadata("design:type", Number)
|
|
197
|
-
], Style.prototype, "padding", void 0);
|
|
198
|
-
__decorate([
|
|
199
|
-
inspectorDecorator.Field(function () { return Color; }, { default: '#000000' }),
|
|
200
|
-
__metadata("design:type", Object)
|
|
201
|
-
], Style.prototype, "stroke", void 0);
|
|
202
|
-
__decorate([
|
|
203
|
-
inspectorDecorator.Field({ default: 0, min: 0 }),
|
|
204
|
-
__metadata("design:type", Number)
|
|
205
|
-
], Style.prototype, "strokeThickness", void 0);
|
|
206
|
-
__decorate([
|
|
207
|
-
inspectorDecorator.Field({ default: 'alphabetic' }),
|
|
208
|
-
__metadata("design:type", String)
|
|
209
|
-
], Style.prototype, "textBaseline", void 0);
|
|
210
|
-
__decorate([
|
|
211
|
-
inspectorDecorator.Field(),
|
|
212
|
-
__metadata("design:type", Boolean)
|
|
213
|
-
], Style.prototype, "trim", void 0);
|
|
214
|
-
__decorate([
|
|
215
|
-
inspectorDecorator.Field({ default: 'pre', type: 'selector', options: ['normal', 'pre', 'pre-line'] }),
|
|
216
|
-
__metadata("design:type", String)
|
|
217
|
-
], Style.prototype, "whiteSpace", void 0);
|
|
218
|
-
__decorate([
|
|
219
|
-
inspectorDecorator.Field(),
|
|
220
|
-
__metadata("design:type", Boolean)
|
|
221
|
-
], Style.prototype, "wordWrap", void 0);
|
|
222
|
-
__decorate([
|
|
223
|
-
inspectorDecorator.Field({ default: 100 }),
|
|
224
|
-
__metadata("design:type", Number)
|
|
225
|
-
], Style.prototype, "wordWrapWidth", void 0);
|
|
226
|
-
__decorate([
|
|
227
|
-
inspectorDecorator.Field(),
|
|
228
|
-
__metadata("design:type", Number)
|
|
229
|
-
], Style.prototype, "leading", void 0);
|
|
230
|
-
return Style;
|
|
231
|
-
}());
|
|
232
84
|
var Text$2 = (function (_super) {
|
|
233
85
|
__extends(Text, _super);
|
|
234
86
|
function Text() {
|
|
@@ -255,24 +107,8 @@ var Text$2 = (function (_super) {
|
|
|
255
107
|
};
|
|
256
108
|
Text.componentName = 'Text';
|
|
257
109
|
__decorate([
|
|
258
|
-
inspectorDecorator.
|
|
259
|
-
type: 'textarea',
|
|
260
|
-
filter: function (text) {
|
|
261
|
-
if (typeof text !== 'string') {
|
|
262
|
-
return '';
|
|
263
|
-
}
|
|
264
|
-
if (text.length > 100) {
|
|
265
|
-
return text.slice(0, 100);
|
|
266
|
-
}
|
|
267
|
-
return text;
|
|
268
|
-
},
|
|
269
|
-
}),
|
|
270
|
-
__metadata("design:type", String)
|
|
110
|
+
inspectorDecorator.type('string')
|
|
271
111
|
], Text.prototype, "text", void 0);
|
|
272
|
-
__decorate([
|
|
273
|
-
inspectorDecorator.Field(),
|
|
274
|
-
__metadata("design:type", Style)
|
|
275
|
-
], Text.prototype, "style", void 0);
|
|
276
112
|
return Text;
|
|
277
113
|
}(eva_js.Component));
|
|
278
114
|
var Text$3 = Text$2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-renderer-text.cjs.js","sources":["../lib/component.ts","../lib/system.ts"],"sourcesContent":["import { TextStyle } from 'pixi.js';\nimport { Component, decorators } from '@eva/eva.js';\n\nexport interface TextParams {\n text: string;\n style?: {\n align?: string;\n breakWords?: boolean;\n dropShadow?: boolean;\n dropShadowAlpha?: number;\n dropShadowAngle?: number;\n dropShadowBlur?: number;\n dropShadowColor?: string | number;\n dropShadowDistance?: number;\n fill?: string | string[] | number | number[] | CanvasGradient | CanvasPattern;\n fillGradientType?: number;\n fillGradientStops?: number[];\n fontFamily?: string | string[];\n fontSize?: number | string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string;\n letterSpacing?: number;\n lineHeight?: number;\n lineJoin?: string;\n miterLimit?: number;\n padding?: number;\n stroke?: string | number;\n strokeThickness?: number;\n textBaseline?: string;\n trim?: boolean;\n whiteSpace?: string;\n wordWrap?: boolean;\n wordWrapWidth?: number;\n leading?: number;\n };\n}\n\nexport default class Text extends Component<TextParams> {\n static componentName: string = 'Text';\n @decorators.IDEProp text: string = '';\n @decorators.IDEProp style: TextParams['style'] = {};\n init(obj?: TextParams) {\n const style = new TextStyle({\n fontSize: 20,\n });\n const newStyle = {};\n for (const key in style) {\n if (key.indexOf('_') === 0) {\n newStyle[key.substring(1)] = style[key];\n }\n }\n this.style = newStyle;\n if (obj) {\n this.text = obj.text;\n Object.assign(this.style, obj.style);\n }\n }\n}\n","import { decorators, ComponentChanged, OBSERVER_TYPE } from '@eva/eva.js';\n\nimport { RendererManager, ContainerManager, RendererSystem, Renderer } from '@eva/plugin-renderer';\nimport { Text as TextEngine } from '@eva/renderer-adapter';\n\nimport TextComponent from './component';\n@decorators.componentObserver({\n Text: ['text', { prop: ['style'], deep: true }],\n})\nexport default class Text extends Renderer {\n static systemName = 'Text';\n name: string = 'Text';\n texts: {\n [propName: number]: { text: TextEngine; component: TextComponent };\n } = {};\n renderSystem: RendererSystem;\n rendererManager: RendererManager;\n containerManager: ContainerManager;\n init() {\n this.renderSystem = this.game.getSystem(RendererSystem) as RendererSystem;\n this.renderSystem.rendererManager.register(this);\n }\n async componentChanged(changed: ComponentChanged) {\n if (changed.componentName !== 'Text') return;\n if (changed.type === OBSERVER_TYPE.ADD) {\n const component = changed.component as TextComponent;\n const text = new TextEngine(component.text, component.style);\n this.containerManager.getContainer(changed.gameObject.id).addChildAt(text, 0);\n this.texts[changed.gameObject.id] = {\n text,\n component: changed.component as TextComponent,\n };\n this.setSize(changed);\n } else if (changed.type === OBSERVER_TYPE.REMOVE) {\n this.containerManager.getContainer(changed.gameObject.id).removeChild(this.texts[changed.gameObject.id].text);\n this.texts[changed.gameObject.id].text.destroy({ children: true });\n delete this.texts[changed.gameObject.id];\n } else {\n this.change(changed);\n this.setSize(changed);\n }\n }\n change(changed: ComponentChanged) {\n const { text, component } = this.texts[changed.gameObject.id];\n if (changed.prop.prop[0] === 'text') {\n text.text = component.text;\n } else if (changed.prop.prop[0] === 'style') {\n Object.assign(text.style, (changed.component as TextComponent).style);\n }\n }\n setSize(changed: ComponentChanged) {\n const { transform } = changed.gameObject;\n if (!transform) return;\n transform.size.width = this.texts[changed.gameObject.id].text.width;\n transform.size.height = this.texts[changed.gameObject.id].text.height;\n }\n}\n"],"names":["TextStyle","decorators","Component","Text","RendererSystem","OBSERVER_TYPE","TextEngine","Renderer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;IAAkC,wBAAqB;IAAvD;QAAA,qEAoBC;QAlBqB,UAAI,GAAW,EAAE,CAAC;QAClB,WAAK,GAAwB,EAAE,CAAC;;KAiBrD;IAhBC,mBAAI,GAAJ,UAAK,GAAgB;QACnB,IAAM,KAAK,GAAG,IAAIA,iBAAS,CAAC;YAC1B,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;QACH,IAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,KAAK,IAAM,GAAG,IAAI,KAAK,EAAE;YACvB,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC1B,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;aACzC;SACF;QACD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,IAAI,GAAG,EAAE;YACP,IAAI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AAS,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QACpE,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;KACvE;IA7CM,eAAU,GAAG,MAAM,CAAC;IADR,IAAI;QAHxBJ,iBAAU,CAAC,iBAAiB,CAAC;YAC5B,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAChD,CAAC;OACmB,IAAI,CA+CxB;IAAD,WAAC;CAAA,CA/CiCM,uBAAQ,GA+CzC;aA/CoB,IAAI;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pixi.js"),t=require("@eva/eva.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pixi.js"),t=require("@eva/eva.js"),n=require("@eva/inspector-decorator"),r=require("@eva/plugin-renderer"),o=require("@eva/renderer-adapter"),i=function(e,t){return(i=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 s(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function a(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){var n,r,o,i,s={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(;s;)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 s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}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 p=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.text="",e.style={},e}return s(r,t),r.prototype.init=function(t){var n=new e.TextStyle({fontSize:20}),r={};for(var o in n)0===o.indexOf("_")&&(r[o.substring(1)]=n[o]);this.style=r,t&&(this.text=t.text,Object.assign(this.style,t.style))},r.componentName="Text",a([n.type("string")],r.prototype,"text",void 0),r}(t.Component),u=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Text",t.texts={},t}return s(n,e),n.prototype.init=function(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)},n.prototype.componentChanged=function(e){return n=this,r=void 0,s=function(){var n,r;return c(this,(function(i){return"Text"!==e.componentName||(e.type===t.OBSERVER_TYPE.ADD?(n=e.component,r=new o.Text(n.text,n.style),this.containerManager.getContainer(e.gameObject.id).addChildAt(r,0),this.texts[e.gameObject.id]={text:r,component:e.component},this.setSize(e)):e.type===t.OBSERVER_TYPE.REMOVE?(this.containerManager.getContainer(e.gameObject.id).removeChild(this.texts[e.gameObject.id].text),this.texts[e.gameObject.id].text.destroy({children:!0}),delete this.texts[e.gameObject.id]):(this.change(e),this.setSize(e))),[2]}))},new((i=void 0)||(i=Promise))((function(e,t){function o(e){try{c(s.next(e))}catch(e){t(e)}}function a(e){try{c(s.throw(e))}catch(e){t(e)}}function c(t){t.done?e(t.value):new i((function(e){e(t.value)})).then(o,a)}c((s=s.apply(n,r||[])).next())}));var n,r,i,s},n.prototype.change=function(e){var t=this.texts[e.gameObject.id],n=t.text,r=t.component;"text"===e.prop.prop[0]?n.text=r.text:"style"===e.prop.prop[0]&&Object.assign(n.style,e.component.style)},n.prototype.setSize=function(e){var t=e.gameObject.transform;t&&(t.size.width=this.texts[e.gameObject.id].text.width,t.size.height=this.texts[e.gameObject.id].text.height)},n.systemName="Text",n=a([t.decorators.componentObserver({Text:["text",{prop:["style"],deep:!0}]})],n)}(r.Renderer);exports.Text=p,exports.TextSystem=u;
|
|
@@ -6,49 +6,47 @@ import { RendererManager } from '@eva/plugin-renderer';
|
|
|
6
6
|
import { RendererSystem } from '@eva/plugin-renderer';
|
|
7
7
|
import { Text as Text_3 } from '@eva/renderer-adapter';
|
|
8
8
|
|
|
9
|
-
declare class Style {
|
|
10
|
-
align?: string;
|
|
11
|
-
breakWords?: boolean;
|
|
12
|
-
dropShadow?: boolean;
|
|
13
|
-
dropShadowAlpha?: number;
|
|
14
|
-
dropShadowAngle?: number;
|
|
15
|
-
dropShadowBlur?: number;
|
|
16
|
-
dropShadowColor?: string | number;
|
|
17
|
-
dropShadowDistance?: number;
|
|
18
|
-
fill?: string | string[] | number | number[] | CanvasGradient | CanvasPattern;
|
|
19
|
-
fillGradientType?: number;
|
|
20
|
-
fillGradientStops?: number[];
|
|
21
|
-
fontFamily?: string | string[];
|
|
22
|
-
fontSize?: number | string;
|
|
23
|
-
fontStyle?: string;
|
|
24
|
-
fontVariant?: string;
|
|
25
|
-
fontWeight?: string;
|
|
26
|
-
letterSpacing?: number;
|
|
27
|
-
lineHeight?: number;
|
|
28
|
-
lineJoin?: string;
|
|
29
|
-
miterLimit?: number;
|
|
30
|
-
padding?: number;
|
|
31
|
-
stroke?: string | number;
|
|
32
|
-
strokeThickness?: number;
|
|
33
|
-
textBaseline?: string;
|
|
34
|
-
trim?: boolean;
|
|
35
|
-
whiteSpace?: string;
|
|
36
|
-
wordWrap?: boolean;
|
|
37
|
-
wordWrapWidth?: number;
|
|
38
|
-
leading?: number;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
9
|
declare class Text_2 extends Component<TextParams> {
|
|
42
10
|
static componentName: string;
|
|
43
11
|
text: string;
|
|
44
|
-
style:
|
|
12
|
+
style: TextParams['style'];
|
|
45
13
|
init(obj?: TextParams): void;
|
|
46
14
|
}
|
|
47
15
|
export { Text_2 as Text }
|
|
48
16
|
|
|
49
17
|
export declare interface TextParams {
|
|
50
18
|
text: string;
|
|
51
|
-
style?:
|
|
19
|
+
style?: {
|
|
20
|
+
align?: string;
|
|
21
|
+
breakWords?: boolean;
|
|
22
|
+
dropShadow?: boolean;
|
|
23
|
+
dropShadowAlpha?: number;
|
|
24
|
+
dropShadowAngle?: number;
|
|
25
|
+
dropShadowBlur?: number;
|
|
26
|
+
dropShadowColor?: string | number;
|
|
27
|
+
dropShadowDistance?: number;
|
|
28
|
+
fill?: string | string[] | number | number[] | CanvasGradient | CanvasPattern;
|
|
29
|
+
fillGradientType?: number;
|
|
30
|
+
fillGradientStops?: number[];
|
|
31
|
+
fontFamily?: string | string[];
|
|
32
|
+
fontSize?: number | string;
|
|
33
|
+
fontStyle?: string;
|
|
34
|
+
fontVariant?: string;
|
|
35
|
+
fontWeight?: string;
|
|
36
|
+
letterSpacing?: number;
|
|
37
|
+
lineHeight?: number;
|
|
38
|
+
lineJoin?: string;
|
|
39
|
+
miterLimit?: number;
|
|
40
|
+
padding?: number;
|
|
41
|
+
stroke?: string | number;
|
|
42
|
+
strokeThickness?: number;
|
|
43
|
+
textBaseline?: string;
|
|
44
|
+
trim?: boolean;
|
|
45
|
+
whiteSpace?: string;
|
|
46
|
+
wordWrap?: boolean;
|
|
47
|
+
wordWrapWidth?: number;
|
|
48
|
+
leading?: number;
|
|
49
|
+
};
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
export declare class TextSystem extends Renderer {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextStyle } from 'pixi.js';
|
|
2
2
|
import { Component, decorators, OBSERVER_TYPE } from '@eva/eva.js';
|
|
3
|
-
import {
|
|
3
|
+
import { type } from '@eva/inspector-decorator';
|
|
4
4
|
import { RendererSystem, Renderer } from '@eva/plugin-renderer';
|
|
5
5
|
import { Text as Text$4 } from '@eva/renderer-adapter';
|
|
6
6
|
|
|
@@ -40,10 +40,6 @@ function __decorate(decorators, target, key, desc) {
|
|
|
40
40
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function __metadata(metadataKey, metadataValue) {
|
|
44
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
43
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
48
44
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49
45
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -81,150 +77,6 @@ function __generator(thisArg, body) {
|
|
|
81
77
|
}
|
|
82
78
|
}
|
|
83
79
|
|
|
84
|
-
var Color = (function () {
|
|
85
|
-
function Color() {
|
|
86
|
-
}
|
|
87
|
-
Color.getProperties = function () {
|
|
88
|
-
return 'color';
|
|
89
|
-
};
|
|
90
|
-
return Color;
|
|
91
|
-
}());
|
|
92
|
-
var Style = (function () {
|
|
93
|
-
function Style() {
|
|
94
|
-
}
|
|
95
|
-
__decorate([
|
|
96
|
-
Field({
|
|
97
|
-
type: 'selector',
|
|
98
|
-
isArray: false,
|
|
99
|
-
options: ['center', 'left', 'right'],
|
|
100
|
-
default: 'left',
|
|
101
|
-
}),
|
|
102
|
-
__metadata("design:type", String)
|
|
103
|
-
], Style.prototype, "align", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
Field(),
|
|
106
|
-
__metadata("design:type", Boolean)
|
|
107
|
-
], Style.prototype, "breakWords", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
Field(),
|
|
110
|
-
__metadata("design:type", Boolean)
|
|
111
|
-
], Style.prototype, "dropShadow", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
Field({ default: 1 }),
|
|
114
|
-
__metadata("design:type", Number)
|
|
115
|
-
], Style.prototype, "dropShadowAlpha", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
Field({ default: Math.PI / 6 }),
|
|
118
|
-
__metadata("design:type", Number)
|
|
119
|
-
], Style.prototype, "dropShadowAngle", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
Field({ default: 0 }),
|
|
122
|
-
__metadata("design:type", Number)
|
|
123
|
-
], Style.prototype, "dropShadowBlur", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
Field(function () { return Color; }, { default: '#000000' }),
|
|
126
|
-
__metadata("design:type", Object)
|
|
127
|
-
], Style.prototype, "dropShadowColor", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
Field({ default: 5 }),
|
|
130
|
-
__metadata("design:type", Number)
|
|
131
|
-
], Style.prototype, "dropShadowDistance", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
Field(function () { return [Color]; }, { default: ['#000000'] }),
|
|
134
|
-
__metadata("design:type", Object)
|
|
135
|
-
], Style.prototype, "fill", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
Field({
|
|
138
|
-
type: 'selector',
|
|
139
|
-
options: { vertical: 1, horizontal: 0 },
|
|
140
|
-
default: 1,
|
|
141
|
-
filter: function (val) { return Number(val); },
|
|
142
|
-
isArray: false,
|
|
143
|
-
}),
|
|
144
|
-
__metadata("design:type", Number)
|
|
145
|
-
], Style.prototype, "fillGradientType", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
Field(function () { return Number; }, { step: 0.1, min: 0, max: 1 }),
|
|
148
|
-
__metadata("design:type", Array)
|
|
149
|
-
], Style.prototype, "fillGradientStops", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
Field(function () { return String; }, { default: 'Arial' }),
|
|
152
|
-
__metadata("design:type", Object)
|
|
153
|
-
], Style.prototype, "fontFamily", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
Field(function () { return Number; }, { min: 5, default: 26 }),
|
|
156
|
-
__metadata("design:type", Object)
|
|
157
|
-
], Style.prototype, "fontSize", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
Field({ type: 'selector', options: ['normal', 'italic', 'oblique'], default: 'normal' }),
|
|
160
|
-
__metadata("design:type", String)
|
|
161
|
-
], Style.prototype, "fontStyle", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
Field({ type: 'selector', options: ['normal', 'small-caps'], default: 'normal' }),
|
|
164
|
-
__metadata("design:type", String)
|
|
165
|
-
], Style.prototype, "fontVariant", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
Field({
|
|
168
|
-
type: 'selector',
|
|
169
|
-
options: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
170
|
-
default: 'normal',
|
|
171
|
-
}),
|
|
172
|
-
__metadata("design:type", String)
|
|
173
|
-
], Style.prototype, "fontWeight", void 0);
|
|
174
|
-
__decorate([
|
|
175
|
-
Field({ default: 0 }),
|
|
176
|
-
__metadata("design:type", Number)
|
|
177
|
-
], Style.prototype, "letterSpacing", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
Field({ default: 0 }),
|
|
180
|
-
__metadata("design:type", Number)
|
|
181
|
-
], Style.prototype, "lineHeight", void 0);
|
|
182
|
-
__decorate([
|
|
183
|
-
Field({ type: 'selector', options: ['miter', 'round', 'bevel'], default: 'miter' }),
|
|
184
|
-
__metadata("design:type", String)
|
|
185
|
-
], Style.prototype, "lineJoin", void 0);
|
|
186
|
-
__decorate([
|
|
187
|
-
Field({ default: 10 }),
|
|
188
|
-
__metadata("design:type", Number)
|
|
189
|
-
], Style.prototype, "miterLimit", void 0);
|
|
190
|
-
__decorate([
|
|
191
|
-
Field({ default: 0 }),
|
|
192
|
-
__metadata("design:type", Number)
|
|
193
|
-
], Style.prototype, "padding", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
Field(function () { return Color; }, { default: '#000000' }),
|
|
196
|
-
__metadata("design:type", Object)
|
|
197
|
-
], Style.prototype, "stroke", void 0);
|
|
198
|
-
__decorate([
|
|
199
|
-
Field({ default: 0, min: 0 }),
|
|
200
|
-
__metadata("design:type", Number)
|
|
201
|
-
], Style.prototype, "strokeThickness", void 0);
|
|
202
|
-
__decorate([
|
|
203
|
-
Field({ default: 'alphabetic' }),
|
|
204
|
-
__metadata("design:type", String)
|
|
205
|
-
], Style.prototype, "textBaseline", void 0);
|
|
206
|
-
__decorate([
|
|
207
|
-
Field(),
|
|
208
|
-
__metadata("design:type", Boolean)
|
|
209
|
-
], Style.prototype, "trim", void 0);
|
|
210
|
-
__decorate([
|
|
211
|
-
Field({ default: 'pre', type: 'selector', options: ['normal', 'pre', 'pre-line'] }),
|
|
212
|
-
__metadata("design:type", String)
|
|
213
|
-
], Style.prototype, "whiteSpace", void 0);
|
|
214
|
-
__decorate([
|
|
215
|
-
Field(),
|
|
216
|
-
__metadata("design:type", Boolean)
|
|
217
|
-
], Style.prototype, "wordWrap", void 0);
|
|
218
|
-
__decorate([
|
|
219
|
-
Field({ default: 100 }),
|
|
220
|
-
__metadata("design:type", Number)
|
|
221
|
-
], Style.prototype, "wordWrapWidth", void 0);
|
|
222
|
-
__decorate([
|
|
223
|
-
Field(),
|
|
224
|
-
__metadata("design:type", Number)
|
|
225
|
-
], Style.prototype, "leading", void 0);
|
|
226
|
-
return Style;
|
|
227
|
-
}());
|
|
228
80
|
var Text$2 = (function (_super) {
|
|
229
81
|
__extends(Text, _super);
|
|
230
82
|
function Text() {
|
|
@@ -251,24 +103,8 @@ var Text$2 = (function (_super) {
|
|
|
251
103
|
};
|
|
252
104
|
Text.componentName = 'Text';
|
|
253
105
|
__decorate([
|
|
254
|
-
|
|
255
|
-
type: 'textarea',
|
|
256
|
-
filter: function (text) {
|
|
257
|
-
if (typeof text !== 'string') {
|
|
258
|
-
return '';
|
|
259
|
-
}
|
|
260
|
-
if (text.length > 100) {
|
|
261
|
-
return text.slice(0, 100);
|
|
262
|
-
}
|
|
263
|
-
return text;
|
|
264
|
-
},
|
|
265
|
-
}),
|
|
266
|
-
__metadata("design:type", String)
|
|
106
|
+
type('string')
|
|
267
107
|
], Text.prototype, "text", void 0);
|
|
268
|
-
__decorate([
|
|
269
|
-
Field(),
|
|
270
|
-
__metadata("design:type", Style)
|
|
271
|
-
], Text.prototype, "style", void 0);
|
|
272
108
|
return Text;
|
|
273
109
|
}(Component));
|
|
274
110
|
var Text$3 = Text$2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-renderer-text.esm.js","sources":["../lib/component.ts","../lib/system.ts"],"sourcesContent":["import { TextStyle } from 'pixi.js';\nimport { Component, decorators } from '@eva/eva.js';\n\nexport interface TextParams {\n text: string;\n style?: {\n align?: string;\n breakWords?: boolean;\n dropShadow?: boolean;\n dropShadowAlpha?: number;\n dropShadowAngle?: number;\n dropShadowBlur?: number;\n dropShadowColor?: string | number;\n dropShadowDistance?: number;\n fill?: string | string[] | number | number[] | CanvasGradient | CanvasPattern;\n fillGradientType?: number;\n fillGradientStops?: number[];\n fontFamily?: string | string[];\n fontSize?: number | string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string;\n letterSpacing?: number;\n lineHeight?: number;\n lineJoin?: string;\n miterLimit?: number;\n padding?: number;\n stroke?: string | number;\n strokeThickness?: number;\n textBaseline?: string;\n trim?: boolean;\n whiteSpace?: string;\n wordWrap?: boolean;\n wordWrapWidth?: number;\n leading?: number;\n };\n}\n\nexport default class Text extends Component<TextParams> {\n static componentName: string = 'Text';\n @decorators.IDEProp text: string = '';\n @decorators.IDEProp style: TextParams['style'] = {};\n init(obj?: TextParams) {\n const style = new TextStyle({\n fontSize: 20,\n });\n const newStyle = {};\n for (const key in style) {\n if (key.indexOf('_') === 0) {\n newStyle[key.substring(1)] = style[key];\n }\n }\n this.style = newStyle;\n if (obj) {\n this.text = obj.text;\n Object.assign(this.style, obj.style);\n }\n }\n}\n","import { decorators, ComponentChanged, OBSERVER_TYPE } from '@eva/eva.js';\n\nimport { RendererManager, ContainerManager, RendererSystem, Renderer } from '@eva/plugin-renderer';\nimport { Text as TextEngine } from '@eva/renderer-adapter';\n\nimport TextComponent from './component';\n@decorators.componentObserver({\n Text: ['text', { prop: ['style'], deep: true }],\n})\nexport default class Text extends Renderer {\n static systemName = 'Text';\n name: string = 'Text';\n texts: {\n [propName: number]: { text: TextEngine; component: TextComponent };\n } = {};\n renderSystem: RendererSystem;\n rendererManager: RendererManager;\n containerManager: ContainerManager;\n init() {\n this.renderSystem = this.game.getSystem(RendererSystem) as RendererSystem;\n this.renderSystem.rendererManager.register(this);\n }\n async componentChanged(changed: ComponentChanged) {\n if (changed.componentName !== 'Text') return;\n if (changed.type === OBSERVER_TYPE.ADD) {\n const component = changed.component as TextComponent;\n const text = new TextEngine(component.text, component.style);\n this.containerManager.getContainer(changed.gameObject.id).addChildAt(text, 0);\n this.texts[changed.gameObject.id] = {\n text,\n component: changed.component as TextComponent,\n };\n this.setSize(changed);\n } else if (changed.type === OBSERVER_TYPE.REMOVE) {\n this.containerManager.getContainer(changed.gameObject.id).removeChild(this.texts[changed.gameObject.id].text);\n this.texts[changed.gameObject.id].text.destroy({ children: true });\n delete this.texts[changed.gameObject.id];\n } else {\n this.change(changed);\n this.setSize(changed);\n }\n }\n change(changed: ComponentChanged) {\n const { text, component } = this.texts[changed.gameObject.id];\n if (changed.prop.prop[0] === 'text') {\n text.text = component.text;\n } else if (changed.prop.prop[0] === 'style') {\n Object.assign(text.style, (changed.component as TextComponent).style);\n }\n }\n setSize(changed: ComponentChanged) {\n const { transform } = changed.gameObject;\n if (!transform) return;\n transform.size.width = this.texts[changed.gameObject.id].text.width;\n transform.size.height = this.texts[changed.gameObject.id].text.height;\n }\n}\n"],"names":["Text","TextEngine"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;IAAkC,wBAAqB;IAAvD;QAAA,qEAoBC;QAlBqB,UAAI,GAAW,EAAE,CAAC;QAClB,WAAK,GAAwB,EAAE,CAAC;;KAiBrD;IAhBC,mBAAI,GAAJ,UAAK,GAAgB;QACnB,IAAM,KAAK,GAAG,IAAI,SAAS,CAAC;YAC1B,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;QACH,IAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,KAAK,IAAM,GAAG,IAAI,KAAK,EAAE;YACvB,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC1B,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;aACzC;SACF;QACD,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;SACtC;KACF;IAlBM,kBAAa,GAAW,MAAM,CAAC;IAClB;QAAnB,UAAU,CAAC,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AAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;KACvE;IA7CM,eAAU,GAAG,MAAM,CAAC;IADR,IAAI;QAHxB,UAAU,CAAC,iBAAiB,CAAC;YAC5B,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAChD,CAAC;OACmB,IAAI,CA+CxB;IAAD,WAAC;CAAA,CA/CiC,QAAQ,GA+CzC;aA/CoB,IAAI;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-text",
|
|
3
|
-
"version": "1.2.7-
|
|
3
|
+
"version": "1.2.7-fix.5",
|
|
4
4
|
"description": "@eva/plugin-renderer-text",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-text.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.5",
|
|
23
|
+
"@eva/renderer-adapter": "1.2.7-fix.5",
|
|
24
|
+
"@eva/eva.js": "1.2.7-fix.5",
|
|
25
25
|
"pixi.js": "^4.8.7"
|
|
26
26
|
}
|
|
27
27
|
}
|