@eva/plugin-renderer-text 1.2.7-editor.10 → 1.2.7-editor.11
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.
|
@@ -317,23 +317,21 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
317
317
|
ExecuteMode[ExecuteMode["All"] = 6] = "All";
|
|
318
318
|
})(ExecuteMode || (ExecuteMode = {}));
|
|
319
319
|
|
|
320
|
-
var Color = function () {
|
|
321
|
-
function Color() {}
|
|
322
|
-
|
|
323
|
-
Color.getProperties = function () {
|
|
324
|
-
return 'color';
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
return Color;
|
|
328
|
-
}();
|
|
329
|
-
|
|
330
320
|
var Style = function () {
|
|
331
321
|
function Style() {}
|
|
332
322
|
|
|
333
323
|
__decorate([Field({
|
|
334
|
-
type: '
|
|
335
|
-
|
|
336
|
-
|
|
324
|
+
type: 'select',
|
|
325
|
+
options: [{
|
|
326
|
+
key: 'center',
|
|
327
|
+
value: 'center'
|
|
328
|
+
}, {
|
|
329
|
+
key: 'left',
|
|
330
|
+
value: 'left'
|
|
331
|
+
}, {
|
|
332
|
+
key: 'right',
|
|
333
|
+
value: 'right'
|
|
334
|
+
}],
|
|
337
335
|
default: 'left'
|
|
338
336
|
}), __metadata("design:type", String)], Style.prototype, "align", void 0);
|
|
339
337
|
|
|
@@ -353,9 +351,8 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
353
351
|
default: 0
|
|
354
352
|
}), __metadata("design:type", Number)], Style.prototype, "dropShadowBlur", void 0);
|
|
355
353
|
|
|
356
|
-
__decorate([Field(
|
|
357
|
-
|
|
358
|
-
}, {
|
|
354
|
+
__decorate([Field({
|
|
355
|
+
type: 'color',
|
|
359
356
|
default: '#000000'
|
|
360
357
|
}), __metadata("design:type", Object)], Style.prototype, "dropShadowColor", void 0);
|
|
361
358
|
|
|
@@ -363,23 +360,22 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
363
360
|
default: 5
|
|
364
361
|
}), __metadata("design:type", Number)], Style.prototype, "dropShadowDistance", void 0);
|
|
365
362
|
|
|
366
|
-
__decorate([Field(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
363
|
+
__decorate([Field({
|
|
364
|
+
type: 'color',
|
|
365
|
+
default: ['#000000'],
|
|
366
|
+
isArray: true
|
|
370
367
|
}), __metadata("design:type", Object)], Style.prototype, "fill", void 0);
|
|
371
368
|
|
|
372
369
|
__decorate([Field({
|
|
373
|
-
type: '
|
|
374
|
-
options: {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
isArray: false
|
|
370
|
+
type: 'select',
|
|
371
|
+
options: [{
|
|
372
|
+
key: 1,
|
|
373
|
+
value: 'vertical'
|
|
374
|
+
}, {
|
|
375
|
+
key: 0,
|
|
376
|
+
value: 'horizontal'
|
|
377
|
+
}],
|
|
378
|
+
default: 1
|
|
383
379
|
}), __metadata("design:type", Number)], Style.prototype, "fillGradientType", void 0);
|
|
384
380
|
|
|
385
381
|
__decorate([Field(function () {
|
|
@@ -404,20 +400,74 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
404
400
|
}), __metadata("design:type", Object)], Style.prototype, "fontSize", void 0);
|
|
405
401
|
|
|
406
402
|
__decorate([Field({
|
|
407
|
-
type: '
|
|
408
|
-
options: [
|
|
403
|
+
type: 'select',
|
|
404
|
+
options: [{
|
|
405
|
+
key: 'normal',
|
|
406
|
+
value: 'normal'
|
|
407
|
+
}, {
|
|
408
|
+
key: 'italic',
|
|
409
|
+
value: 'italic'
|
|
410
|
+
}, {
|
|
411
|
+
key: 'oblique',
|
|
412
|
+
value: 'oblique'
|
|
413
|
+
}],
|
|
409
414
|
default: 'normal'
|
|
410
415
|
}), __metadata("design:type", String)], Style.prototype, "fontStyle", void 0);
|
|
411
416
|
|
|
412
417
|
__decorate([Field({
|
|
413
|
-
type: '
|
|
414
|
-
options: [
|
|
418
|
+
type: 'select',
|
|
419
|
+
options: [{
|
|
420
|
+
key: 'normal',
|
|
421
|
+
value: 'normal'
|
|
422
|
+
}, {
|
|
423
|
+
key: 'small-caps',
|
|
424
|
+
value: 'small-caps'
|
|
425
|
+
}],
|
|
415
426
|
default: 'normal'
|
|
416
427
|
}), __metadata("design:type", String)], Style.prototype, "fontVariant", void 0);
|
|
417
428
|
|
|
418
429
|
__decorate([Field({
|
|
419
|
-
type: '
|
|
420
|
-
options: [
|
|
430
|
+
type: 'select',
|
|
431
|
+
options: [{
|
|
432
|
+
key: 'normal',
|
|
433
|
+
value: 'normal'
|
|
434
|
+
}, {
|
|
435
|
+
key: 'bold',
|
|
436
|
+
value: 'bold'
|
|
437
|
+
}, {
|
|
438
|
+
key: 'bolder',
|
|
439
|
+
value: 'bolder'
|
|
440
|
+
}, {
|
|
441
|
+
key: 'lighter',
|
|
442
|
+
value: 'lighter'
|
|
443
|
+
}, {
|
|
444
|
+
key: '100',
|
|
445
|
+
value: '100'
|
|
446
|
+
}, {
|
|
447
|
+
key: '200',
|
|
448
|
+
value: '200'
|
|
449
|
+
}, {
|
|
450
|
+
key: '300',
|
|
451
|
+
value: '300'
|
|
452
|
+
}, {
|
|
453
|
+
key: '400',
|
|
454
|
+
value: '400'
|
|
455
|
+
}, {
|
|
456
|
+
key: '500',
|
|
457
|
+
value: '500'
|
|
458
|
+
}, {
|
|
459
|
+
key: '600',
|
|
460
|
+
value: '600'
|
|
461
|
+
}, {
|
|
462
|
+
key: '700',
|
|
463
|
+
value: '700'
|
|
464
|
+
}, {
|
|
465
|
+
key: '800',
|
|
466
|
+
value: '800'
|
|
467
|
+
}, {
|
|
468
|
+
key: '900',
|
|
469
|
+
value: '900'
|
|
470
|
+
}],
|
|
421
471
|
default: 'normal'
|
|
422
472
|
}), __metadata("design:type", String)], Style.prototype, "fontWeight", void 0);
|
|
423
473
|
|
|
@@ -430,8 +480,17 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
430
480
|
}), __metadata("design:type", Number)], Style.prototype, "lineHeight", void 0);
|
|
431
481
|
|
|
432
482
|
__decorate([Field({
|
|
433
|
-
type: '
|
|
434
|
-
options: [
|
|
483
|
+
type: 'select',
|
|
484
|
+
options: [{
|
|
485
|
+
key: 'miter',
|
|
486
|
+
value: 'miter'
|
|
487
|
+
}, {
|
|
488
|
+
key: 'round',
|
|
489
|
+
value: 'round'
|
|
490
|
+
}, {
|
|
491
|
+
key: 'bevel',
|
|
492
|
+
value: 'bevel'
|
|
493
|
+
}],
|
|
435
494
|
default: 'miter'
|
|
436
495
|
}), __metadata("design:type", String)], Style.prototype, "lineJoin", void 0);
|
|
437
496
|
|
|
@@ -443,9 +502,8 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
443
502
|
default: 0
|
|
444
503
|
}), __metadata("design:type", Number)], Style.prototype, "padding", void 0);
|
|
445
504
|
|
|
446
|
-
__decorate([Field(
|
|
447
|
-
|
|
448
|
-
}, {
|
|
505
|
+
__decorate([Field({
|
|
506
|
+
type: 'color',
|
|
449
507
|
default: '#000000'
|
|
450
508
|
}), __metadata("design:type", Object)], Style.prototype, "stroke", void 0);
|
|
451
509
|
|
|
@@ -462,8 +520,17 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
462
520
|
|
|
463
521
|
__decorate([Field({
|
|
464
522
|
default: 'pre',
|
|
465
|
-
type: '
|
|
466
|
-
options: [
|
|
523
|
+
type: 'select',
|
|
524
|
+
options: [{
|
|
525
|
+
key: 'normal',
|
|
526
|
+
value: 'normal'
|
|
527
|
+
}, {
|
|
528
|
+
key: 'pre',
|
|
529
|
+
value: 'pre'
|
|
530
|
+
}, {
|
|
531
|
+
key: 'pre-line',
|
|
532
|
+
value: 'pre-line'
|
|
533
|
+
}]
|
|
467
534
|
}), __metadata("design:type", String)], Style.prototype, "whiteSpace", void 0);
|
|
468
535
|
|
|
469
536
|
__decorate([Field(), __metadata("design:type", Boolean)], Style.prototype, "wordWrap", void 0);
|
|
@@ -511,20 +578,7 @@ var _EVA_IIFE_text = function (exports, pixi_js, eva_js, pluginRenderer, rendere
|
|
|
511
578
|
|
|
512
579
|
Text.componentName = 'Text';
|
|
513
580
|
|
|
514
|
-
__decorate([Field(
|
|
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);
|
|
581
|
+
__decorate([Field(), __metadata("design:type", String)], Text.prototype, "text", void 0);
|
|
528
582
|
|
|
529
583
|
__decorate([Field(), __metadata("design:type", Style)], Text.prototype, "style", void 0);
|
|
530
584
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign||function(
|
|
1
|
+
function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}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_text=function(e,t,n,o,r){"use strict";var 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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var p=function(){return p=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)};function l(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var p=e.length-1;p>=0;p--)(r=e[p])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function p(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,p)}l((o=o.apply(e,t||[])).next())}))}function y(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:p(0),throw:p(1),return:p(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function p(i){return function(p){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,p])}}}var d=function(e){function t(){var t=this.constructor,n=e.call(this,"Symbol keys are not supported yet!")||this;return Object.setPrototypeOf(n,t.prototype),n}return a(t,e),t}(Error);!function(e){function t(){var t=this.constructor,n=e.call(this,"getProperties is not a function!")||this;return Object.setPrototypeOf(n,t.prototype),n}a(t,e)}(Error);var c,f="IDE_PROPERTY_METADATA";function v(e,t,n,o){var r=Reflect.getMetadata("design:type",e,t),i=r===Array,a=function(e){return e===String?"string":e===Number?"number":e===Boolean?"boolean":"unknown"}(r);if("unknown"!==a&&(r=a),o){var l=o();Array.isArray(l)?(i=!0,r=l[0]):r=l}var u=Reflect.getMetadata(f,e.constructor)||{};u[t]=p({type:r,isArray:i},n),Reflect.defineMetadata(f,u,e.constructor)}function g(e,t){return function(n,o){if("symbol"==typeof o)throw new d;var r=function(e,t){return"function"==typeof e?{returnTypeFunc:e,options:t||{}}:{options:e||{}}}(e,t);v(n,o,r.options,r.returnTypeFunc)}}!function(e){e[e.Edit=2]="Edit",e[e.Game=4]="Game",e[e.All=6]="All"}(c||(c={}));var h=function(){function e(){}return l([g({type:"select",options:[{key:"center",value:"center"},{key:"left",value:"left"},{key:"right",value:"right"}],default:"left"}),u("design:type",String)],e.prototype,"align",void 0),l([g(),u("design:type",Boolean)],e.prototype,"breakWords",void 0),l([g(),u("design:type",Boolean)],e.prototype,"dropShadow",void 0),l([g({default:1}),u("design:type",Number)],e.prototype,"dropShadowAlpha",void 0),l([g({default:Math.PI/6}),u("design:type",Number)],e.prototype,"dropShadowAngle",void 0),l([g({default:0}),u("design:type",Number)],e.prototype,"dropShadowBlur",void 0),l([g({type:"color",default:"#000000"}),u("design:type",Object)],e.prototype,"dropShadowColor",void 0),l([g({default:5}),u("design:type",Number)],e.prototype,"dropShadowDistance",void 0),l([g({type:"color",default:["#000000"],isArray:!0}),u("design:type",Object)],e.prototype,"fill",void 0),l([g({type:"select",options:[{key:1,value:"vertical"},{key:0,value:"horizontal"}],default:1}),u("design:type",Number)],e.prototype,"fillGradientType",void 0),l([g((function(){return Number}),{step:.1,min:0,max:1}),u("design:type",Array)],e.prototype,"fillGradientStops",void 0),l([g((function(){return String}),{default:"Arial"}),u("design:type",Object)],e.prototype,"fontFamily",void 0),l([g((function(){return Number}),{min:5,default:26}),u("design:type",Object)],e.prototype,"fontSize",void 0),l([g({type:"select",options:[{key:"normal",value:"normal"},{key:"italic",value:"italic"},{key:"oblique",value:"oblique"}],default:"normal"}),u("design:type",String)],e.prototype,"fontStyle",void 0),l([g({type:"select",options:[{key:"normal",value:"normal"},{key:"small-caps",value:"small-caps"}],default:"normal"}),u("design:type",String)],e.prototype,"fontVariant",void 0),l([g({type:"select",options:[{key:"normal",value:"normal"},{key:"bold",value:"bold"},{key:"bolder",value:"bolder"},{key:"lighter",value:"lighter"},{key:"100",value:"100"},{key:"200",value:"200"},{key:"300",value:"300"},{key:"400",value:"400"},{key:"500",value:"500"},{key:"600",value:"600"},{key:"700",value:"700"},{key:"800",value:"800"},{key:"900",value:"900"}],default:"normal"}),u("design:type",String)],e.prototype,"fontWeight",void 0),l([g({default:0}),u("design:type",Number)],e.prototype,"letterSpacing",void 0),l([g({default:0}),u("design:type",Number)],e.prototype,"lineHeight",void 0),l([g({type:"select",options:[{key:"miter",value:"miter"},{key:"round",value:"round"},{key:"bevel",value:"bevel"}],default:"miter"}),u("design:type",String)],e.prototype,"lineJoin",void 0),l([g({default:10}),u("design:type",Number)],e.prototype,"miterLimit",void 0),l([g({default:0}),u("design:type",Number)],e.prototype,"padding",void 0),l([g({type:"color",default:"#000000"}),u("design:type",Object)],e.prototype,"stroke",void 0),l([g({default:0,min:0}),u("design:type",Number)],e.prototype,"strokeThickness",void 0),l([g({default:"alphabetic"}),u("design:type",String)],e.prototype,"textBaseline",void 0),l([g(),u("design:type",Boolean)],e.prototype,"trim",void 0),l([g({default:"pre",type:"select",options:[{key:"normal",value:"normal"},{key:"pre",value:"pre"},{key:"pre-line",value:"pre-line"}]}),u("design:type",String)],e.prototype,"whiteSpace",void 0),l([g(),u("design:type",Boolean)],e.prototype,"wordWrap",void 0),l([g({default:100}),u("design:type",Number)],e.prototype,"wordWrapWidth",void 0),l([g(),u("design:type",Number)],e.prototype,"leading",void 0),e}(),m=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.text="",t.style={},t}return a(n,e),n.prototype.init=function(e){var n=new t.TextStyle({fontSize:20}),o={};for(var r in n)0===r.indexOf("_")&&(o[r.substring(1)]=n[r]);this.style=o,e&&(this.text=e.text,_extends(this.style,e.style))},n.componentName="Text",l([g(),u("design:type",String)],n.prototype,"text",void 0),l([g(),u("design:type",h)],n.prototype,"style",void 0),n}(n.Component),b=m,w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Text",t.texts={},t}return a(t,e),t.prototype.init=function(){this.renderSystem=this.game.getSystem(o.RendererSystem),this.renderSystem.rendererManager.register(this)},t.prototype.componentChanged=function(e){return s(this,void 0,void 0,(function(){var t,o;return y(this,(function(i){return"Text"!==e.componentName||(e.type===n.OBSERVER_TYPE.ADD?(t=e.component,o=new r.Text(t.text,t.style),this.containerManager.getContainer(e.gameObject.id).addChildAt(o,0),this.texts[e.gameObject.id]={text:o,component:e.component},this.setSize(e)):e.type===n.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]}))}))},t.prototype.change=function(e){var t=this.texts[e.gameObject.id],n=t.text,o=t.component;"text"===e.prop.prop[0]?n.text=o.text:"style"===e.prop.prop[0]&&_extends(n.style,e.component.style)},t.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)},t.systemName="Text",t=l([n.decorators.componentObserver({Text:["text",{prop:["style"],deep:!0}]})],t)}(o.Renderer),x=w;return e.Text=b,e.TextSystem=x,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,EVA,EVA.plugin.renderer,EVA.rendererAdapter);window.EVA.plugin.renderer.text=window.EVA.plugin.renderer.text||_EVA_IIFE_text;
|
|
@@ -85,22 +85,17 @@ function __generator(thisArg, body) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
var Color = (function () {
|
|
89
|
-
function Color() {
|
|
90
|
-
}
|
|
91
|
-
Color.getProperties = function () {
|
|
92
|
-
return 'color';
|
|
93
|
-
};
|
|
94
|
-
return Color;
|
|
95
|
-
}());
|
|
96
88
|
var Style = (function () {
|
|
97
89
|
function Style() {
|
|
98
90
|
}
|
|
99
91
|
__decorate([
|
|
100
92
|
inspectorDecorator.Field({
|
|
101
|
-
type: '
|
|
102
|
-
|
|
103
|
-
|
|
93
|
+
type: 'select',
|
|
94
|
+
options: [
|
|
95
|
+
{ key: 'center', value: 'center' },
|
|
96
|
+
{ key: 'left', value: 'left' },
|
|
97
|
+
{ key: 'right', value: 'right' },
|
|
98
|
+
],
|
|
104
99
|
default: 'left',
|
|
105
100
|
}),
|
|
106
101
|
__metadata("design:type", String)
|
|
@@ -126,7 +121,7 @@ var Style = (function () {
|
|
|
126
121
|
__metadata("design:type", Number)
|
|
127
122
|
], Style.prototype, "dropShadowBlur", void 0);
|
|
128
123
|
__decorate([
|
|
129
|
-
inspectorDecorator.Field(
|
|
124
|
+
inspectorDecorator.Field({ type: 'color', default: '#000000' }),
|
|
130
125
|
__metadata("design:type", Object)
|
|
131
126
|
], Style.prototype, "dropShadowColor", void 0);
|
|
132
127
|
__decorate([
|
|
@@ -134,16 +129,17 @@ var Style = (function () {
|
|
|
134
129
|
__metadata("design:type", Number)
|
|
135
130
|
], Style.prototype, "dropShadowDistance", void 0);
|
|
136
131
|
__decorate([
|
|
137
|
-
inspectorDecorator.Field(
|
|
132
|
+
inspectorDecorator.Field({ type: 'color', default: ['#000000'], isArray: true }),
|
|
138
133
|
__metadata("design:type", Object)
|
|
139
134
|
], Style.prototype, "fill", void 0);
|
|
140
135
|
__decorate([
|
|
141
136
|
inspectorDecorator.Field({
|
|
142
|
-
type: '
|
|
143
|
-
options:
|
|
137
|
+
type: 'select',
|
|
138
|
+
options: [
|
|
139
|
+
{ key: 1, value: 'vertical' },
|
|
140
|
+
{ key: 0, value: 'horizontal' },
|
|
141
|
+
],
|
|
144
142
|
default: 1,
|
|
145
|
-
filter: function (val) { return Number(val); },
|
|
146
|
-
isArray: false,
|
|
147
143
|
}),
|
|
148
144
|
__metadata("design:type", Number)
|
|
149
145
|
], Style.prototype, "fillGradientType", void 0);
|
|
@@ -160,17 +156,46 @@ var Style = (function () {
|
|
|
160
156
|
__metadata("design:type", Object)
|
|
161
157
|
], Style.prototype, "fontSize", void 0);
|
|
162
158
|
__decorate([
|
|
163
|
-
inspectorDecorator.Field({
|
|
159
|
+
inspectorDecorator.Field({
|
|
160
|
+
type: 'select',
|
|
161
|
+
options: [
|
|
162
|
+
{ key: 'normal', value: 'normal' },
|
|
163
|
+
{ key: 'italic', value: 'italic' },
|
|
164
|
+
{ key: 'oblique', value: 'oblique' },
|
|
165
|
+
],
|
|
166
|
+
default: 'normal',
|
|
167
|
+
}),
|
|
164
168
|
__metadata("design:type", String)
|
|
165
169
|
], Style.prototype, "fontStyle", void 0);
|
|
166
170
|
__decorate([
|
|
167
|
-
inspectorDecorator.Field({
|
|
171
|
+
inspectorDecorator.Field({
|
|
172
|
+
type: 'select',
|
|
173
|
+
options: [
|
|
174
|
+
{ key: 'normal', value: 'normal' },
|
|
175
|
+
{ key: 'small-caps', value: 'small-caps' },
|
|
176
|
+
],
|
|
177
|
+
default: 'normal',
|
|
178
|
+
}),
|
|
168
179
|
__metadata("design:type", String)
|
|
169
180
|
], Style.prototype, "fontVariant", void 0);
|
|
170
181
|
__decorate([
|
|
171
182
|
inspectorDecorator.Field({
|
|
172
|
-
type: '
|
|
173
|
-
options: [
|
|
183
|
+
type: 'select',
|
|
184
|
+
options: [
|
|
185
|
+
{ key: 'normal', value: 'normal' },
|
|
186
|
+
{ key: 'bold', value: 'bold' },
|
|
187
|
+
{ key: 'bolder', value: 'bolder' },
|
|
188
|
+
{ key: 'lighter', value: 'lighter' },
|
|
189
|
+
{ key: '100', value: '100' },
|
|
190
|
+
{ key: '200', value: '200' },
|
|
191
|
+
{ key: '300', value: '300' },
|
|
192
|
+
{ key: '400', value: '400' },
|
|
193
|
+
{ key: '500', value: '500' },
|
|
194
|
+
{ key: '600', value: '600' },
|
|
195
|
+
{ key: '700', value: '700' },
|
|
196
|
+
{ key: '800', value: '800' },
|
|
197
|
+
{ key: '900', value: '900' },
|
|
198
|
+
],
|
|
174
199
|
default: 'normal',
|
|
175
200
|
}),
|
|
176
201
|
__metadata("design:type", String)
|
|
@@ -184,7 +209,15 @@ var Style = (function () {
|
|
|
184
209
|
__metadata("design:type", Number)
|
|
185
210
|
], Style.prototype, "lineHeight", void 0);
|
|
186
211
|
__decorate([
|
|
187
|
-
inspectorDecorator.Field({
|
|
212
|
+
inspectorDecorator.Field({
|
|
213
|
+
type: 'select',
|
|
214
|
+
options: [
|
|
215
|
+
{ key: 'miter', value: 'miter' },
|
|
216
|
+
{ key: 'round', value: 'round' },
|
|
217
|
+
{ key: 'bevel', value: 'bevel' },
|
|
218
|
+
],
|
|
219
|
+
default: 'miter',
|
|
220
|
+
}),
|
|
188
221
|
__metadata("design:type", String)
|
|
189
222
|
], Style.prototype, "lineJoin", void 0);
|
|
190
223
|
__decorate([
|
|
@@ -196,7 +229,7 @@ var Style = (function () {
|
|
|
196
229
|
__metadata("design:type", Number)
|
|
197
230
|
], Style.prototype, "padding", void 0);
|
|
198
231
|
__decorate([
|
|
199
|
-
inspectorDecorator.Field(
|
|
232
|
+
inspectorDecorator.Field({ type: 'color', default: '#000000' }),
|
|
200
233
|
__metadata("design:type", Object)
|
|
201
234
|
], Style.prototype, "stroke", void 0);
|
|
202
235
|
__decorate([
|
|
@@ -212,7 +245,15 @@ var Style = (function () {
|
|
|
212
245
|
__metadata("design:type", Boolean)
|
|
213
246
|
], Style.prototype, "trim", void 0);
|
|
214
247
|
__decorate([
|
|
215
|
-
inspectorDecorator.Field({
|
|
248
|
+
inspectorDecorator.Field({
|
|
249
|
+
default: 'pre',
|
|
250
|
+
type: 'select',
|
|
251
|
+
options: [
|
|
252
|
+
{ key: 'normal', value: 'normal' },
|
|
253
|
+
{ key: 'pre', value: 'pre' },
|
|
254
|
+
{ key: 'pre-line', value: 'pre-line' },
|
|
255
|
+
],
|
|
256
|
+
}),
|
|
216
257
|
__metadata("design:type", String)
|
|
217
258
|
], Style.prototype, "whiteSpace", void 0);
|
|
218
259
|
__decorate([
|
|
@@ -255,18 +296,7 @@ var Text$2 = (function (_super) {
|
|
|
255
296
|
};
|
|
256
297
|
Text.componentName = 'Text';
|
|
257
298
|
__decorate([
|
|
258
|
-
inspectorDecorator.Field(
|
|
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
|
-
}),
|
|
299
|
+
inspectorDecorator.Field(),
|
|
270
300
|
__metadata("design:type", String)
|
|
271
301
|
], Text.prototype, "text", void 0);
|
|
272
302
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pixi.js"),t=require("@eva/eva.js"),o=require("@eva/inspector-decorator"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pixi.js"),t=require("@eva/eva.js"),o=require("@eva/inspector-decorator"),i=require("@eva/plugin-renderer"),r=require("@eva/renderer-adapter"),n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},n(e,t)};function l(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}function p(e,t,o,i){var r,n=arguments.length,l=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var p=e.length-1;p>=0;p--)(r=e[p])&&(l=(n<3?r(l):n>3?r(t,o,l):r(t,o))||l);return n>3&&l&&Object.defineProperty(t,o,l),l}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t){var o,i,r,n,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:p(0),throw:p(1),return:p(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function p(n){return function(p){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,i=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(!(r=l.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){l=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){l.label=n[1];break}if(6===n[0]&&l.label<r[1]){l.label=r[1],r=n;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(n);break}r[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],i=0}finally{o=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,p])}}}var s=function(){function e(){}return p([o.Field({type:"select",options:[{key:"center",value:"center"},{key:"left",value:"left"},{key:"right",value:"right"}],default:"left"}),a("design:type",String)],e.prototype,"align",void 0),p([o.Field(),a("design:type",Boolean)],e.prototype,"breakWords",void 0),p([o.Field(),a("design:type",Boolean)],e.prototype,"dropShadow",void 0),p([o.Field({default:1}),a("design:type",Number)],e.prototype,"dropShadowAlpha",void 0),p([o.Field({default:Math.PI/6}),a("design:type",Number)],e.prototype,"dropShadowAngle",void 0),p([o.Field({default:0}),a("design:type",Number)],e.prototype,"dropShadowBlur",void 0),p([o.Field({type:"color",default:"#000000"}),a("design:type",Object)],e.prototype,"dropShadowColor",void 0),p([o.Field({default:5}),a("design:type",Number)],e.prototype,"dropShadowDistance",void 0),p([o.Field({type:"color",default:["#000000"],isArray:!0}),a("design:type",Object)],e.prototype,"fill",void 0),p([o.Field({type:"select",options:[{key:1,value:"vertical"},{key:0,value:"horizontal"}],default:1}),a("design:type",Number)],e.prototype,"fillGradientType",void 0),p([o.Field((function(){return Number}),{step:.1,min:0,max:1}),a("design:type",Array)],e.prototype,"fillGradientStops",void 0),p([o.Field((function(){return String}),{default:"Arial"}),a("design:type",Object)],e.prototype,"fontFamily",void 0),p([o.Field((function(){return Number}),{min:5,default:26}),a("design:type",Object)],e.prototype,"fontSize",void 0),p([o.Field({type:"select",options:[{key:"normal",value:"normal"},{key:"italic",value:"italic"},{key:"oblique",value:"oblique"}],default:"normal"}),a("design:type",String)],e.prototype,"fontStyle",void 0),p([o.Field({type:"select",options:[{key:"normal",value:"normal"},{key:"small-caps",value:"small-caps"}],default:"normal"}),a("design:type",String)],e.prototype,"fontVariant",void 0),p([o.Field({type:"select",options:[{key:"normal",value:"normal"},{key:"bold",value:"bold"},{key:"bolder",value:"bolder"},{key:"lighter",value:"lighter"},{key:"100",value:"100"},{key:"200",value:"200"},{key:"300",value:"300"},{key:"400",value:"400"},{key:"500",value:"500"},{key:"600",value:"600"},{key:"700",value:"700"},{key:"800",value:"800"},{key:"900",value:"900"}],default:"normal"}),a("design:type",String)],e.prototype,"fontWeight",void 0),p([o.Field({default:0}),a("design:type",Number)],e.prototype,"letterSpacing",void 0),p([o.Field({default:0}),a("design:type",Number)],e.prototype,"lineHeight",void 0),p([o.Field({type:"select",options:[{key:"miter",value:"miter"},{key:"round",value:"round"},{key:"bevel",value:"bevel"}],default:"miter"}),a("design:type",String)],e.prototype,"lineJoin",void 0),p([o.Field({default:10}),a("design:type",Number)],e.prototype,"miterLimit",void 0),p([o.Field({default:0}),a("design:type",Number)],e.prototype,"padding",void 0),p([o.Field({type:"color",default:"#000000"}),a("design:type",Object)],e.prototype,"stroke",void 0),p([o.Field({default:0,min:0}),a("design:type",Number)],e.prototype,"strokeThickness",void 0),p([o.Field({default:"alphabetic"}),a("design:type",String)],e.prototype,"textBaseline",void 0),p([o.Field(),a("design:type",Boolean)],e.prototype,"trim",void 0),p([o.Field({default:"pre",type:"select",options:[{key:"normal",value:"normal"},{key:"pre",value:"pre"},{key:"pre-line",value:"pre-line"}]}),a("design:type",String)],e.prototype,"whiteSpace",void 0),p([o.Field(),a("design:type",Boolean)],e.prototype,"wordWrap",void 0),p([o.Field({default:100}),a("design:type",Number)],e.prototype,"wordWrapWidth",void 0),p([o.Field(),a("design:type",Number)],e.prototype,"leading",void 0),e}(),u=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.text="",e.style={},e}return l(i,t),i.prototype.init=function(t){var o=new e.TextStyle({fontSize:20}),i={};for(var r in o)0===r.indexOf("_")&&(i[r.substring(1)]=o[r]);this.style=i,t&&(this.text=t.text,Object.assign(this.style,t.style))},i.componentName="Text",p([o.Field(),a("design:type",String)],i.prototype,"text",void 0),p([o.Field(),a("design:type",s)],i.prototype,"style",void 0),i}(t.Component),y=u,c=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Text",t.texts={},t}return l(o,e),o.prototype.init=function(){this.renderSystem=this.game.getSystem(i.RendererSystem),this.renderSystem.rendererManager.register(this)},o.prototype.componentChanged=function(e){return o=this,i=void 0,l=function(){var o,i;return d(this,(function(n){return"Text"!==e.componentName||(e.type===t.OBSERVER_TYPE.ADD?(o=e.component,i=new r.Text(o.text,o.style),this.containerManager.getContainer(e.gameObject.id).addChildAt(i,0),this.texts[e.gameObject.id]={text:i,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((n=void 0)||(n=Promise))((function(e,t){function r(e){try{a(l.next(e))}catch(e){t(e)}}function p(e){try{a(l.throw(e))}catch(e){t(e)}}function a(t){t.done?e(t.value):new n((function(e){e(t.value)})).then(r,p)}a((l=l.apply(o,i||[])).next())}));var o,i,n,l},o.prototype.change=function(e){var t=this.texts[e.gameObject.id],o=t.text,i=t.component;"text"===e.prop.prop[0]?o.text=i.text:"style"===e.prop.prop[0]&&Object.assign(o.style,e.component.style)},o.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)},o.systemName="Text",o=p([t.decorators.componentObserver({Text:["text",{prop:["style"],deep:!0}]})],o)}(i.Renderer);exports.Text=y,exports.TextSystem=c;
|
|
@@ -81,22 +81,17 @@ function __generator(thisArg, body) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
var Color = (function () {
|
|
85
|
-
function Color() {
|
|
86
|
-
}
|
|
87
|
-
Color.getProperties = function () {
|
|
88
|
-
return 'color';
|
|
89
|
-
};
|
|
90
|
-
return Color;
|
|
91
|
-
}());
|
|
92
84
|
var Style = (function () {
|
|
93
85
|
function Style() {
|
|
94
86
|
}
|
|
95
87
|
__decorate([
|
|
96
88
|
Field({
|
|
97
|
-
type: '
|
|
98
|
-
|
|
99
|
-
|
|
89
|
+
type: 'select',
|
|
90
|
+
options: [
|
|
91
|
+
{ key: 'center', value: 'center' },
|
|
92
|
+
{ key: 'left', value: 'left' },
|
|
93
|
+
{ key: 'right', value: 'right' },
|
|
94
|
+
],
|
|
100
95
|
default: 'left',
|
|
101
96
|
}),
|
|
102
97
|
__metadata("design:type", String)
|
|
@@ -122,7 +117,7 @@ var Style = (function () {
|
|
|
122
117
|
__metadata("design:type", Number)
|
|
123
118
|
], Style.prototype, "dropShadowBlur", void 0);
|
|
124
119
|
__decorate([
|
|
125
|
-
Field(
|
|
120
|
+
Field({ type: 'color', default: '#000000' }),
|
|
126
121
|
__metadata("design:type", Object)
|
|
127
122
|
], Style.prototype, "dropShadowColor", void 0);
|
|
128
123
|
__decorate([
|
|
@@ -130,16 +125,17 @@ var Style = (function () {
|
|
|
130
125
|
__metadata("design:type", Number)
|
|
131
126
|
], Style.prototype, "dropShadowDistance", void 0);
|
|
132
127
|
__decorate([
|
|
133
|
-
Field(
|
|
128
|
+
Field({ type: 'color', default: ['#000000'], isArray: true }),
|
|
134
129
|
__metadata("design:type", Object)
|
|
135
130
|
], Style.prototype, "fill", void 0);
|
|
136
131
|
__decorate([
|
|
137
132
|
Field({
|
|
138
|
-
type: '
|
|
139
|
-
options:
|
|
133
|
+
type: 'select',
|
|
134
|
+
options: [
|
|
135
|
+
{ key: 1, value: 'vertical' },
|
|
136
|
+
{ key: 0, value: 'horizontal' },
|
|
137
|
+
],
|
|
140
138
|
default: 1,
|
|
141
|
-
filter: function (val) { return Number(val); },
|
|
142
|
-
isArray: false,
|
|
143
139
|
}),
|
|
144
140
|
__metadata("design:type", Number)
|
|
145
141
|
], Style.prototype, "fillGradientType", void 0);
|
|
@@ -156,17 +152,46 @@ var Style = (function () {
|
|
|
156
152
|
__metadata("design:type", Object)
|
|
157
153
|
], Style.prototype, "fontSize", void 0);
|
|
158
154
|
__decorate([
|
|
159
|
-
Field({
|
|
155
|
+
Field({
|
|
156
|
+
type: 'select',
|
|
157
|
+
options: [
|
|
158
|
+
{ key: 'normal', value: 'normal' },
|
|
159
|
+
{ key: 'italic', value: 'italic' },
|
|
160
|
+
{ key: 'oblique', value: 'oblique' },
|
|
161
|
+
],
|
|
162
|
+
default: 'normal',
|
|
163
|
+
}),
|
|
160
164
|
__metadata("design:type", String)
|
|
161
165
|
], Style.prototype, "fontStyle", void 0);
|
|
162
166
|
__decorate([
|
|
163
|
-
Field({
|
|
167
|
+
Field({
|
|
168
|
+
type: 'select',
|
|
169
|
+
options: [
|
|
170
|
+
{ key: 'normal', value: 'normal' },
|
|
171
|
+
{ key: 'small-caps', value: 'small-caps' },
|
|
172
|
+
],
|
|
173
|
+
default: 'normal',
|
|
174
|
+
}),
|
|
164
175
|
__metadata("design:type", String)
|
|
165
176
|
], Style.prototype, "fontVariant", void 0);
|
|
166
177
|
__decorate([
|
|
167
178
|
Field({
|
|
168
|
-
type: '
|
|
169
|
-
options: [
|
|
179
|
+
type: 'select',
|
|
180
|
+
options: [
|
|
181
|
+
{ key: 'normal', value: 'normal' },
|
|
182
|
+
{ key: 'bold', value: 'bold' },
|
|
183
|
+
{ key: 'bolder', value: 'bolder' },
|
|
184
|
+
{ key: 'lighter', value: 'lighter' },
|
|
185
|
+
{ key: '100', value: '100' },
|
|
186
|
+
{ key: '200', value: '200' },
|
|
187
|
+
{ key: '300', value: '300' },
|
|
188
|
+
{ key: '400', value: '400' },
|
|
189
|
+
{ key: '500', value: '500' },
|
|
190
|
+
{ key: '600', value: '600' },
|
|
191
|
+
{ key: '700', value: '700' },
|
|
192
|
+
{ key: '800', value: '800' },
|
|
193
|
+
{ key: '900', value: '900' },
|
|
194
|
+
],
|
|
170
195
|
default: 'normal',
|
|
171
196
|
}),
|
|
172
197
|
__metadata("design:type", String)
|
|
@@ -180,7 +205,15 @@ var Style = (function () {
|
|
|
180
205
|
__metadata("design:type", Number)
|
|
181
206
|
], Style.prototype, "lineHeight", void 0);
|
|
182
207
|
__decorate([
|
|
183
|
-
Field({
|
|
208
|
+
Field({
|
|
209
|
+
type: 'select',
|
|
210
|
+
options: [
|
|
211
|
+
{ key: 'miter', value: 'miter' },
|
|
212
|
+
{ key: 'round', value: 'round' },
|
|
213
|
+
{ key: 'bevel', value: 'bevel' },
|
|
214
|
+
],
|
|
215
|
+
default: 'miter',
|
|
216
|
+
}),
|
|
184
217
|
__metadata("design:type", String)
|
|
185
218
|
], Style.prototype, "lineJoin", void 0);
|
|
186
219
|
__decorate([
|
|
@@ -192,7 +225,7 @@ var Style = (function () {
|
|
|
192
225
|
__metadata("design:type", Number)
|
|
193
226
|
], Style.prototype, "padding", void 0);
|
|
194
227
|
__decorate([
|
|
195
|
-
Field(
|
|
228
|
+
Field({ type: 'color', default: '#000000' }),
|
|
196
229
|
__metadata("design:type", Object)
|
|
197
230
|
], Style.prototype, "stroke", void 0);
|
|
198
231
|
__decorate([
|
|
@@ -208,7 +241,15 @@ var Style = (function () {
|
|
|
208
241
|
__metadata("design:type", Boolean)
|
|
209
242
|
], Style.prototype, "trim", void 0);
|
|
210
243
|
__decorate([
|
|
211
|
-
Field({
|
|
244
|
+
Field({
|
|
245
|
+
default: 'pre',
|
|
246
|
+
type: 'select',
|
|
247
|
+
options: [
|
|
248
|
+
{ key: 'normal', value: 'normal' },
|
|
249
|
+
{ key: 'pre', value: 'pre' },
|
|
250
|
+
{ key: 'pre-line', value: 'pre-line' },
|
|
251
|
+
],
|
|
252
|
+
}),
|
|
212
253
|
__metadata("design:type", String)
|
|
213
254
|
], Style.prototype, "whiteSpace", void 0);
|
|
214
255
|
__decorate([
|
|
@@ -251,18 +292,7 @@ var Text$2 = (function (_super) {
|
|
|
251
292
|
};
|
|
252
293
|
Text.componentName = 'Text';
|
|
253
294
|
__decorate([
|
|
254
|
-
Field(
|
|
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
|
-
}),
|
|
295
|
+
Field(),
|
|
266
296
|
__metadata("design:type", String)
|
|
267
297
|
], Text.prototype, "text", void 0);
|
|
268
298
|
__decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-text",
|
|
3
|
-
"version": "1.2.7-editor.
|
|
3
|
+
"version": "1.2.7-editor.11",
|
|
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.1.0-alpha.
|
|
22
|
-
"@eva/plugin-renderer": "1.2.7-editor.
|
|
23
|
-
"@eva/renderer-adapter": "1.2.7-editor.
|
|
24
|
-
"@eva/eva.js": "1.2.7-editor.
|
|
21
|
+
"@eva/inspector-decorator": "0.1.0-alpha.3",
|
|
22
|
+
"@eva/plugin-renderer": "1.2.7-editor.11",
|
|
23
|
+
"@eva/renderer-adapter": "1.2.7-editor.11",
|
|
24
|
+
"@eva/eva.js": "1.2.7-editor.11",
|
|
25
25
|
"pixi.js": "^4.8.7"
|
|
26
26
|
}
|
|
27
27
|
}
|