@eva/plugin-renderer-mask 2.0.1-beta.9 → 2.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EVA.plugin.renderer.mask.js +8 -3
- package/dist/EVA.plugin.renderer.mask.min.js +1 -1
- package/dist/plugin-renderer-mask.cjs.js +89 -17
- package/dist/plugin-renderer-mask.cjs.prod.js +1 -16
- package/dist/plugin-renderer-mask.d.ts +61 -0
- package/dist/plugin-renderer-mask.esm.js +89 -17
- package/package.json +5 -5
|
@@ -243,6 +243,7 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
243
243
|
this.setSprite(component, sprite);
|
|
244
244
|
}
|
|
245
245
|
setSprite(component, sprite) {
|
|
246
|
+
var _a, _b;
|
|
246
247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
247
248
|
let res;
|
|
248
249
|
try {
|
|
@@ -254,10 +255,14 @@ var _EVA_IIFE_mask = function (exports, eva_js, pluginRenderer, rendererAdapter)
|
|
|
254
255
|
}
|
|
255
256
|
if (component.type === MASK_TYPE.Sprite) {
|
|
256
257
|
const img = component.resource + resourceKeySplit + component.spriteName;
|
|
257
|
-
const texture = res.instance[img];
|
|
258
|
-
|
|
258
|
+
const texture = (_a = res === null || res === void 0 ? void 0 : res.instance) === null || _a === void 0 ? void 0 : _a[img];
|
|
259
|
+
if (texture) {
|
|
260
|
+
sprite.image = texture;
|
|
261
|
+
}
|
|
259
262
|
} else {
|
|
260
|
-
|
|
263
|
+
if ((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.image) {
|
|
264
|
+
sprite.image = res.data.image;
|
|
265
|
+
}
|
|
261
266
|
}
|
|
262
267
|
sprite.sprite.width = component.style.width;
|
|
263
268
|
sprite.sprite.height = component.style.height;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var
|
|
1
|
+
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends.apply(null,arguments)}globalThis.EVA=globalThis.EVA||{},globalThis.EVA.plugin=globalThis.EVA.plugin||{},globalThis.EVA.plugin.renderer=globalThis.EVA.plugin.renderer||{};var _EVA_IIFE_mask=function(e,t,r,i){"use strict";function s(e,t,r,i){var s,n=arguments.length,o=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o}function n(e,t,r,i){return new(r||(r=Promise))(function(s,n){function o(e){try{c(i.next(e))}catch(e){n(e)}}function a(e){try{c(i.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,a)}c((i=i.apply(e,t||[])).next())})}function o(e){return function(t,r){var i=function(e,t){return e.constructor.IDEProps||(e.constructor.IDEProps={}),e.constructor.IDEProps[t]||(e.constructor.IDEProps[t]={}),e.constructor.IDEProps[t]}(t,r);i.key=r,i.type=e}}e.MASK_TYPE=void 0,function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(e.MASK_TYPE||(e.MASK_TYPE={}));class a extends t.Component{constructor(){super(...arguments),this.style={},this.resource="",this.spriteName=""}init(e){_extends(this,e)}}a.componentName="Mask",s([o("string")],a.prototype,"resource",void 0),s([o("string")],a.prototype,"spriteName",void 0);const c={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},p={Circle:"circle",Ellipse:"ellipse",Rect:"rect",RoundedRect:"roundRect",Polygon:"poly"};var h;!function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(h||(h={}));let l=class extends r.Renderer{constructor(){super(...arguments),this.name="Mask",this.changedCache={},this.maskSpriteCache={}}init(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)}rendererUpdate(){this.changedCache={}}componentChanged(e){if("Mask"===e.component.name)switch(e.type){case t.OBSERVER_TYPE.ADD:this.add(e);break;case t.OBSERVER_TYPE.REMOVE:this.remove(e);break;case t.OBSERVER_TYPE.CHANGE:this.change(e)}}add(e){const t=e.component;if(!(t.type in h))throw new Error("no have Mask type: "+t.type);if(!t.style)throw new Error("no have Mask style: "+t.type);let r;switch(t.type){case h.Circle:case h.Ellipse:case h.Rect:case h.RoundedRect:case h.Polygon:r=this.createGraphics(t);break;case h.Img:case h.Sprite:r=this.createSprite(t)}if(!r)throw new Error("no have mask instance, check your mask params: "+t.type);const i=this.containerManager.getContainer(e.gameObject.id);i.mask=r,i.addChild(r)}remove(e){const t=this.containerManager.getContainer(e.gameObject.id);t.removeChild(t.mask),t.mask.destroy({children:!0}),t.mask=null,delete this.maskSpriteCache[e.gameObject.id]}change(e){if(this.changedCache[e.gameObject.id])return;const t=e.component;"type"===e.prop.prop[0]?(this.changedCache[e.gameObject.id]=!0,[h.Sprite,h.Img].indexOf(t.type)>-1||t._lastType!==t.type?(this.remove(e),this.add(e),t._lastType=t.type):this.redrawGraphics(e)):"style"===e.prop.prop[0]?[h.Sprite,h.Img].indexOf(t.type)>-1?this.changeSpriteStyle(t):this.redrawGraphics(e):("resource"===e.prop.prop[0]||"spriteName"===e.prop.prop[0])&&(this.changedCache[e.gameObject.id]=!0,this.changeSprite(t))}createGraphics(e){const t=new i.Graphics;return this.draw(t,e),t}redrawGraphics(e){const t=this.containerManager.getContainer(e.gameObject.id).mask;t.clear(),this.draw(t,e.component)}draw(e,t){const r=[];for(const e of c[t.type])r.push(t.style[e]);e[p[t.type]](...r),e.fill(0)}createSprite(e){const t=new i.Sprite(null);return this.maskSpriteCache[e.gameObject.id]=t,this.setSprite(e,t),t.sprite}changeSpriteStyle(e){const t=this.maskSpriteCache[e.gameObject.id];t.sprite.width=e.style.width,t.sprite.height=e.style.height,t.sprite.position.x=e.style.x,t.sprite.position.y=e.style.y}changeSprite(e){const t=this.maskSpriteCache[e.gameObject.id];this.setSprite(e,t)}setSprite(e,r){var i,s;return n(this,void 0,void 0,function*(){let n;try{const r=this.increaseAsyncId(e.gameObject.id);if(n=yield t.resource.getResource(e.resource),!this.validateAsyncId(e.gameObject.id,r))return}catch(e){throw new Error("mask resource load error")}if(e.type===h.Sprite){const t=e.resource+"_s|r|c_"+e.spriteName,s=null===(i=null==n?void 0:n.instance)||void 0===i?void 0:i[t];s&&(r.image=s)}else(null===(s=null==n?void 0:n.data)||void 0===s?void 0:s.image)&&(r.image=n.data.image);r.sprite.width=e.style.width,r.sprite.height=e.style.height,r.sprite.position.x=e.style.x,r.sprite.position.y=e.style.y})}};l.systemName="Mask",l=s([t.decorators.componentObserver({Mask:["type",{prop:["style"],deep:!0},"resource","spriteName"]})],l);var d=l;return e.Mask=a,e.MaskSystem=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer,EVA.rendererAdapter);globalThis.EVA.plugin.renderer.mask=globalThis.EVA.plugin.renderer.mask||_EVA_IIFE_mask;
|
|
@@ -7,19 +7,19 @@ var inspectorDecorator = require('@eva/inspector-decorator');
|
|
|
7
7
|
var pluginRenderer = require('@eva/plugin-renderer');
|
|
8
8
|
var rendererAdapter = require('@eva/renderer-adapter');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
Copyright (c) Microsoft Corporation.
|
|
12
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
13
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
14
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
/******************************************************************************
|
|
11
|
+
Copyright (c) Microsoft Corporation.
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
19
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
13
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
14
|
+
purpose with or without fee is hereby granted.
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
17
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
18
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
19
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
20
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
21
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
22
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
23
23
|
***************************************************************************** */
|
|
24
24
|
|
|
25
25
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -30,13 +30,19 @@ function __decorate(decorators, target, key, desc) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
33
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
33
34
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
34
35
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
35
36
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
36
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
37
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
37
38
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
38
39
|
});
|
|
39
|
-
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
43
|
+
var e = new Error(message);
|
|
44
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
45
|
+
};
|
|
40
46
|
|
|
41
47
|
exports.MASK_TYPE = void 0;
|
|
42
48
|
(function (MASK_TYPE) {
|
|
@@ -48,17 +54,77 @@ exports.MASK_TYPE = void 0;
|
|
|
48
54
|
MASK_TYPE["Img"] = "Img";
|
|
49
55
|
MASK_TYPE["Sprite"] = "Sprite";
|
|
50
56
|
})(exports.MASK_TYPE || (exports.MASK_TYPE = {}));
|
|
57
|
+
/**
|
|
58
|
+
* 遮罩组件
|
|
59
|
+
*
|
|
60
|
+
* Mask 组件用于裁剪游戏对象的显示区域,只显示遮罩形状内的内容。
|
|
61
|
+
* 支持多种遮罩形状(矩形、圆形、多边形、图片、精灵等),
|
|
62
|
+
* 适用于头像裁剪、窗口遮罩、特殊形状显示等场景。
|
|
63
|
+
*
|
|
64
|
+
* 遮罩类型:
|
|
65
|
+
* - Circle - 圆形遮罩
|
|
66
|
+
* - Ellipse - 椭圆形遮罩
|
|
67
|
+
* - Rect - 矩形遮罩
|
|
68
|
+
* - RoundedRect - 圆角矩形遮罩
|
|
69
|
+
* - Polygon - 多边形遮罩
|
|
70
|
+
* - Img - 图片遮罩(基于图片 alpha 通道)
|
|
71
|
+
* - Sprite - 精灵遮罩
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* // 圆形头像遮罩
|
|
76
|
+
* const avatar = new GameObject('avatar');
|
|
77
|
+
* avatar.addComponent(new Img({ resource: 'userAvatar' }));
|
|
78
|
+
* avatar.addComponent(new Mask({
|
|
79
|
+
* type: MASK_TYPE.Circle,
|
|
80
|
+
* style: {
|
|
81
|
+
* x: 50, // 圆心 x
|
|
82
|
+
* y: 50, // 圆心 y
|
|
83
|
+
* radius: 50 // 半径
|
|
84
|
+
* }
|
|
85
|
+
* }));
|
|
86
|
+
*
|
|
87
|
+
* // 矩形遮罩
|
|
88
|
+
* avatar.addComponent(new Mask({
|
|
89
|
+
* type: MASK_TYPE.Rect,
|
|
90
|
+
* style: {
|
|
91
|
+
* x: 0, y: 0,
|
|
92
|
+
* width: 100,
|
|
93
|
+
* height: 100
|
|
94
|
+
* }
|
|
95
|
+
* }));
|
|
96
|
+
*
|
|
97
|
+
* // 使用图片作为遮罩
|
|
98
|
+
* avatar.addComponent(new Mask({
|
|
99
|
+
* type: MASK_TYPE.Img,
|
|
100
|
+
* resource: 'maskImage' // alpha 通道作为遮罩
|
|
101
|
+
* }));
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
51
104
|
class Mask$2 extends eva_js.Component {
|
|
52
105
|
constructor() {
|
|
53
106
|
super(...arguments);
|
|
107
|
+
/** 遮罩样式配置 */
|
|
108
|
+
// @decorators.IDEProp 复杂编辑后续添加
|
|
54
109
|
this.style = {};
|
|
110
|
+
/** 遮罩图片资源名称(用于 Img 类型) */
|
|
55
111
|
this.resource = '';
|
|
112
|
+
/** 遮罩精灵名称(用于 Sprite 类型) */
|
|
56
113
|
this.spriteName = '';
|
|
57
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* 初始化组件
|
|
117
|
+
* @param obj - 初始化参数
|
|
118
|
+
* @param obj.type - 遮罩类型
|
|
119
|
+
* @param obj.style - 遮罩样式
|
|
120
|
+
* @param obj.resource - 遮罩资源(可选)
|
|
121
|
+
* @param obj.spriteName - 精灵名称(可选)
|
|
122
|
+
*/
|
|
58
123
|
init(obj) {
|
|
59
124
|
Object.assign(this, obj);
|
|
60
125
|
}
|
|
61
126
|
}
|
|
127
|
+
/** 组件名称 */
|
|
62
128
|
Mask$2.componentName = 'Mask';
|
|
63
129
|
__decorate([
|
|
64
130
|
inspectorDecorator.type('string')
|
|
@@ -67,7 +133,7 @@ __decorate([
|
|
|
67
133
|
inspectorDecorator.type('string')
|
|
68
134
|
], Mask$2.prototype, "spriteName", void 0);
|
|
69
135
|
|
|
70
|
-
const resourceKeySplit = '_s|r|c_';
|
|
136
|
+
const resourceKeySplit = '_s|r|c_'; // Notice: This key be created by sprite system.
|
|
71
137
|
const propertyForGraphics = {
|
|
72
138
|
Circle: ['x', 'y', 'radius'],
|
|
73
139
|
Ellipse: ['x', 'y', 'width', 'height'],
|
|
@@ -215,6 +281,7 @@ let Mask = class Mask extends pluginRenderer.Renderer {
|
|
|
215
281
|
for (const key of propertyForGraphics[component.type]) {
|
|
216
282
|
params.push(component.style[key]);
|
|
217
283
|
}
|
|
284
|
+
// @ts-ignore
|
|
218
285
|
graphics[functionForGraphics[component.type]](...params);
|
|
219
286
|
graphics.fill(0x000000);
|
|
220
287
|
}
|
|
@@ -236,6 +303,7 @@ let Mask = class Mask extends pluginRenderer.Renderer {
|
|
|
236
303
|
this.setSprite(component, sprite);
|
|
237
304
|
}
|
|
238
305
|
setSprite(component, sprite) {
|
|
306
|
+
var _a, _b;
|
|
239
307
|
return __awaiter(this, void 0, void 0, function* () {
|
|
240
308
|
let res;
|
|
241
309
|
try {
|
|
@@ -249,11 +317,15 @@ let Mask = class Mask extends pluginRenderer.Renderer {
|
|
|
249
317
|
}
|
|
250
318
|
if (component.type === MASK_TYPE.Sprite) {
|
|
251
319
|
const img = component.resource + resourceKeySplit + component.spriteName;
|
|
252
|
-
const texture = res.instance[img];
|
|
253
|
-
|
|
320
|
+
const texture = (_a = res === null || res === void 0 ? void 0 : res.instance) === null || _a === void 0 ? void 0 : _a[img];
|
|
321
|
+
if (texture) {
|
|
322
|
+
sprite.image = texture;
|
|
323
|
+
}
|
|
254
324
|
}
|
|
255
325
|
else {
|
|
256
|
-
|
|
326
|
+
if ((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.image) {
|
|
327
|
+
sprite.image = res.data.image;
|
|
328
|
+
}
|
|
257
329
|
}
|
|
258
330
|
sprite.sprite.width = component.style.width;
|
|
259
331
|
sprite.sprite.height = component.style.height;
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("@eva/inspector-decorator"),r=require("@eva/plugin-renderer"),i=require("@eva/renderer-adapter");
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
6
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
|
|
8
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
9
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
10
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
11
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
12
|
-
|
|
13
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
|
-
and limitations under the License.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
function s(e,t,r,i){var s,a=arguments.length,c=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(c=(a<3?s(c):a>3?s(t,r,c):s(t,r))||c);return a>3&&c&&Object.defineProperty(t,r,c),c}exports.MASK_TYPE=void 0,function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(exports.MASK_TYPE||(exports.MASK_TYPE={}));class a extends e.Component{constructor(){super(...arguments),this.style={},this.resource="",this.spriteName=""}init(e){Object.assign(this,e)}}a.componentName="Mask",s([t.type("string")],a.prototype,"resource",void 0),s([t.type("string")],a.prototype,"spriteName",void 0);const c={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},n={Circle:"circle",Ellipse:"ellipse",Rect:"rect",RoundedRect:"roundRect",Polygon:"poly"};var o;!function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(o||(o={}));let p=class extends r.Renderer{constructor(){super(...arguments),this.name="Mask",this.changedCache={},this.maskSpriteCache={}}init(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)}rendererUpdate(){this.changedCache={}}componentChanged(t){if("Mask"===t.component.name)switch(t.type){case e.OBSERVER_TYPE.ADD:this.add(t);break;case e.OBSERVER_TYPE.REMOVE:this.remove(t);break;case e.OBSERVER_TYPE.CHANGE:this.change(t)}}add(e){const t=e.component;if(!(t.type in o))throw new Error("no have Mask type: "+t.type);if(!t.style)throw new Error("no have Mask style: "+t.type);let r;switch(t.type){case o.Circle:case o.Ellipse:case o.Rect:case o.RoundedRect:case o.Polygon:r=this.createGraphics(t);break;case o.Img:case o.Sprite:r=this.createSprite(t)}if(!r)throw new Error("no have mask instance, check your mask params: "+t.type);const i=this.containerManager.getContainer(e.gameObject.id);i.mask=r,i.addChild(r)}remove(e){const t=this.containerManager.getContainer(e.gameObject.id);t.removeChild(t.mask),t.mask.destroy({children:!0}),t.mask=null,delete this.maskSpriteCache[e.gameObject.id]}change(e){if(this.changedCache[e.gameObject.id])return;const t=e.component;"type"===e.prop.prop[0]?(this.changedCache[e.gameObject.id]=!0,[o.Sprite,o.Img].indexOf(t.type)>-1||t._lastType!==t.type?(this.remove(e),this.add(e),t._lastType=t.type):this.redrawGraphics(e)):"style"===e.prop.prop[0]?[o.Sprite,o.Img].indexOf(t.type)>-1?this.changeSpriteStyle(t):this.redrawGraphics(e):("resource"===e.prop.prop[0]||"spriteName"===e.prop.prop[0])&&(this.changedCache[e.gameObject.id]=!0,this.changeSprite(t))}createGraphics(e){const t=new i.Graphics;return this.draw(t,e),t}redrawGraphics(e){const t=this.containerManager.getContainer(e.gameObject.id).mask;t.clear(),this.draw(t,e.component)}draw(e,t){const r=[];for(const e of c[t.type])r.push(t.style[e]);e[n[t.type]](...r),e.fill(0)}createSprite(e){const t=new i.Sprite(null);return this.maskSpriteCache[e.gameObject.id]=t,this.setSprite(e,t),t.sprite}changeSpriteStyle(e){const t=this.maskSpriteCache[e.gameObject.id];t.sprite.width=e.style.width,t.sprite.height=e.style.height,t.sprite.position.x=e.style.x,t.sprite.position.y=e.style.y}changeSprite(e){const t=this.maskSpriteCache[e.gameObject.id];this.setSprite(e,t)}setSprite(t,r){return i=this,s=void 0,c=function*(){let i;try{const r=this.increaseAsyncId(t.gameObject.id);if(i=yield e.resource.getResource(t.resource),!this.validateAsyncId(t.gameObject.id,r))return}catch(e){throw new Error("mask resource load error")}if(t.type===o.Sprite){const e=t.resource+"_s|r|c_"+t.spriteName,s=i.instance[e];r.image=s}else r.image=i.data.image;r.sprite.width=t.style.width,r.sprite.height=t.style.height,r.sprite.position.x=t.style.x,r.sprite.position.y=t.style.y},new((a=void 0)||(a=Promise))((function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){t.done?e(t.value):new a((function(e){e(t.value)})).then(r,n)}o((c=c.apply(i,s||[])).next())}));var i,s,a,c}};p.systemName="Mask",p=s([e.decorators.componentObserver({Mask:["type",{prop:["style"],deep:!0},"resource","spriteName"]})],p);var h=p;exports.Mask=a,exports.MaskSystem=h;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),t=require("@eva/inspector-decorator"),r=require("@eva/plugin-renderer"),i=require("@eva/renderer-adapter");function s(e,t,r,i){var s,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(n<3?s(a):n>3?s(t,r,a):s(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}function n(e,t,r,i){return new(r||(r=Promise))(function(s,n){function a(e){try{c(i.next(e))}catch(e){n(e)}}function o(e){try{c(i.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,o)}c((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError,exports.MASK_TYPE=void 0,function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(exports.MASK_TYPE||(exports.MASK_TYPE={}));class a extends e.Component{constructor(){super(...arguments),this.style={},this.resource="",this.spriteName=""}init(e){Object.assign(this,e)}}a.componentName="Mask",s([t.type("string")],a.prototype,"resource",void 0),s([t.type("string")],a.prototype,"spriteName",void 0);const o={Circle:["x","y","radius"],Ellipse:["x","y","width","height"],Rect:["x","y","width","height"],RoundedRect:["x","y","width","height","radius"],Polygon:["paths"]},c={Circle:"circle",Ellipse:"ellipse",Rect:"rect",RoundedRect:"roundRect",Polygon:"poly"};var p;!function(e){e.Circle="Circle",e.Ellipse="Ellipse",e.Rect="Rect",e.RoundedRect="RoundedRect",e.Polygon="Polygon",e.Img="Img",e.Sprite="Sprite"}(p||(p={}));let h=class extends r.Renderer{constructor(){super(...arguments),this.name="Mask",this.changedCache={},this.maskSpriteCache={}}init(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)}rendererUpdate(){this.changedCache={}}componentChanged(t){if("Mask"===t.component.name)switch(t.type){case e.OBSERVER_TYPE.ADD:this.add(t);break;case e.OBSERVER_TYPE.REMOVE:this.remove(t);break;case e.OBSERVER_TYPE.CHANGE:this.change(t)}}add(e){const t=e.component;if(!(t.type in p))throw new Error("no have Mask type: "+t.type);if(!t.style)throw new Error("no have Mask style: "+t.type);let r;switch(t.type){case p.Circle:case p.Ellipse:case p.Rect:case p.RoundedRect:case p.Polygon:r=this.createGraphics(t);break;case p.Img:case p.Sprite:r=this.createSprite(t)}if(!r)throw new Error("no have mask instance, check your mask params: "+t.type);const i=this.containerManager.getContainer(e.gameObject.id);i.mask=r,i.addChild(r)}remove(e){const t=this.containerManager.getContainer(e.gameObject.id);t.removeChild(t.mask),t.mask.destroy({children:!0}),t.mask=null,delete this.maskSpriteCache[e.gameObject.id]}change(e){if(this.changedCache[e.gameObject.id])return;const t=e.component;"type"===e.prop.prop[0]?(this.changedCache[e.gameObject.id]=!0,[p.Sprite,p.Img].indexOf(t.type)>-1||t._lastType!==t.type?(this.remove(e),this.add(e),t._lastType=t.type):this.redrawGraphics(e)):"style"===e.prop.prop[0]?[p.Sprite,p.Img].indexOf(t.type)>-1?this.changeSpriteStyle(t):this.redrawGraphics(e):("resource"===e.prop.prop[0]||"spriteName"===e.prop.prop[0])&&(this.changedCache[e.gameObject.id]=!0,this.changeSprite(t))}createGraphics(e){const t=new i.Graphics;return this.draw(t,e),t}redrawGraphics(e){const t=this.containerManager.getContainer(e.gameObject.id).mask;t.clear(),this.draw(t,e.component)}draw(e,t){const r=[];for(const e of o[t.type])r.push(t.style[e]);e[c[t.type]](...r),e.fill(0)}createSprite(e){const t=new i.Sprite(null);return this.maskSpriteCache[e.gameObject.id]=t,this.setSprite(e,t),t.sprite}changeSpriteStyle(e){const t=this.maskSpriteCache[e.gameObject.id];t.sprite.width=e.style.width,t.sprite.height=e.style.height,t.sprite.position.x=e.style.x,t.sprite.position.y=e.style.y}changeSprite(e){const t=this.maskSpriteCache[e.gameObject.id];this.setSprite(e,t)}setSprite(t,r){var i,s;return n(this,void 0,void 0,function*(){let n;try{const r=this.increaseAsyncId(t.gameObject.id);if(n=yield e.resource.getResource(t.resource),!this.validateAsyncId(t.gameObject.id,r))return}catch(e){throw new Error("mask resource load error")}if(t.type===p.Sprite){const e=t.resource+"_s|r|c_"+t.spriteName,s=null===(i=null==n?void 0:n.instance)||void 0===i?void 0:i[e];s&&(r.image=s)}else(null===(s=null==n?void 0:n.data)||void 0===s?void 0:s.image)&&(r.image=n.data.image);r.sprite.width=t.style.width,r.sprite.height=t.style.height,r.sprite.position.x=t.style.x,r.sprite.position.y=t.style.y})}};h.systemName="Mask",h=s([e.decorators.componentObserver({Mask:["type",{prop:["style"],deep:!0},"resource","spriteName"]})],h);var d=h;exports.Mask=a,exports.MaskSystem=d;
|
|
@@ -8,13 +8,74 @@ import { RendererSystem } from '@eva/plugin-renderer';
|
|
|
8
8
|
import { Sprite } from '@eva/renderer-adapter';
|
|
9
9
|
import type { Sprite as Sprite_2 } from 'pixi.js';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* 遮罩组件
|
|
13
|
+
*
|
|
14
|
+
* Mask 组件用于裁剪游戏对象的显示区域,只显示遮罩形状内的内容。
|
|
15
|
+
* 支持多种遮罩形状(矩形、圆形、多边形、图片、精灵等),
|
|
16
|
+
* 适用于头像裁剪、窗口遮罩、特殊形状显示等场景。
|
|
17
|
+
*
|
|
18
|
+
* 遮罩类型:
|
|
19
|
+
* - Circle - 圆形遮罩
|
|
20
|
+
* - Ellipse - 椭圆形遮罩
|
|
21
|
+
* - Rect - 矩形遮罩
|
|
22
|
+
* - RoundedRect - 圆角矩形遮罩
|
|
23
|
+
* - Polygon - 多边形遮罩
|
|
24
|
+
* - Img - 图片遮罩(基于图片 alpha 通道)
|
|
25
|
+
* - Sprite - 精灵遮罩
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // 圆形头像遮罩
|
|
30
|
+
* const avatar = new GameObject('avatar');
|
|
31
|
+
* avatar.addComponent(new Img({ resource: 'userAvatar' }));
|
|
32
|
+
* avatar.addComponent(new Mask({
|
|
33
|
+
* type: MASK_TYPE.Circle,
|
|
34
|
+
* style: {
|
|
35
|
+
* x: 50, // 圆心 x
|
|
36
|
+
* y: 50, // 圆心 y
|
|
37
|
+
* radius: 50 // 半径
|
|
38
|
+
* }
|
|
39
|
+
* }));
|
|
40
|
+
*
|
|
41
|
+
* // 矩形遮罩
|
|
42
|
+
* avatar.addComponent(new Mask({
|
|
43
|
+
* type: MASK_TYPE.Rect,
|
|
44
|
+
* style: {
|
|
45
|
+
* x: 0, y: 0,
|
|
46
|
+
* width: 100,
|
|
47
|
+
* height: 100
|
|
48
|
+
* }
|
|
49
|
+
* }));
|
|
50
|
+
*
|
|
51
|
+
* // 使用图片作为遮罩
|
|
52
|
+
* avatar.addComponent(new Mask({
|
|
53
|
+
* type: MASK_TYPE.Img,
|
|
54
|
+
* resource: 'maskImage' // alpha 通道作为遮罩
|
|
55
|
+
* }));
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
11
58
|
export declare class Mask extends Component<MaskParams> {
|
|
59
|
+
/** 组件名称 */
|
|
12
60
|
static componentName: string;
|
|
61
|
+
/** 上一次的遮罩类型 */
|
|
13
62
|
_lastType: MaskParams['type'];
|
|
63
|
+
/** 遮罩类型 */
|
|
14
64
|
type: MaskParams['type'];
|
|
65
|
+
/** 遮罩样式配置 */
|
|
15
66
|
style?: MaskParams['style'];
|
|
67
|
+
/** 遮罩图片资源名称(用于 Img 类型) */
|
|
16
68
|
resource?: string;
|
|
69
|
+
/** 遮罩精灵名称(用于 Sprite 类型) */
|
|
17
70
|
spriteName?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 初始化组件
|
|
73
|
+
* @param obj - 初始化参数
|
|
74
|
+
* @param obj.type - 遮罩类型
|
|
75
|
+
* @param obj.style - 遮罩样式
|
|
76
|
+
* @param obj.resource - 遮罩资源(可选)
|
|
77
|
+
* @param obj.spriteName - 精灵名称(可选)
|
|
78
|
+
*/
|
|
18
79
|
init(obj?: MaskParams): void;
|
|
19
80
|
}
|
|
20
81
|
|
|
@@ -3,19 +3,19 @@ import { type } from '@eva/inspector-decorator';
|
|
|
3
3
|
import { Renderer, RendererSystem } from '@eva/plugin-renderer';
|
|
4
4
|
import { Graphics, Sprite } from '@eva/renderer-adapter';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
Copyright (c) Microsoft Corporation.
|
|
8
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
9
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
10
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
Copyright (c) Microsoft Corporation.
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
15
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
+
purpose with or without fee is hereby granted.
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
14
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
16
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
17
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
19
19
|
***************************************************************************** */
|
|
20
20
|
|
|
21
21
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -26,13 +26,19 @@ function __decorate(decorators, target, key, desc) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
31
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
32
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
34
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
35
|
});
|
|
35
|
-
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
39
|
+
var e = new Error(message);
|
|
40
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
41
|
+
};
|
|
36
42
|
|
|
37
43
|
var MASK_TYPE$1;
|
|
38
44
|
(function (MASK_TYPE) {
|
|
@@ -44,17 +50,77 @@ var MASK_TYPE$1;
|
|
|
44
50
|
MASK_TYPE["Img"] = "Img";
|
|
45
51
|
MASK_TYPE["Sprite"] = "Sprite";
|
|
46
52
|
})(MASK_TYPE$1 || (MASK_TYPE$1 = {}));
|
|
53
|
+
/**
|
|
54
|
+
* 遮罩组件
|
|
55
|
+
*
|
|
56
|
+
* Mask 组件用于裁剪游戏对象的显示区域,只显示遮罩形状内的内容。
|
|
57
|
+
* 支持多种遮罩形状(矩形、圆形、多边形、图片、精灵等),
|
|
58
|
+
* 适用于头像裁剪、窗口遮罩、特殊形状显示等场景。
|
|
59
|
+
*
|
|
60
|
+
* 遮罩类型:
|
|
61
|
+
* - Circle - 圆形遮罩
|
|
62
|
+
* - Ellipse - 椭圆形遮罩
|
|
63
|
+
* - Rect - 矩形遮罩
|
|
64
|
+
* - RoundedRect - 圆角矩形遮罩
|
|
65
|
+
* - Polygon - 多边形遮罩
|
|
66
|
+
* - Img - 图片遮罩(基于图片 alpha 通道)
|
|
67
|
+
* - Sprite - 精灵遮罩
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* // 圆形头像遮罩
|
|
72
|
+
* const avatar = new GameObject('avatar');
|
|
73
|
+
* avatar.addComponent(new Img({ resource: 'userAvatar' }));
|
|
74
|
+
* avatar.addComponent(new Mask({
|
|
75
|
+
* type: MASK_TYPE.Circle,
|
|
76
|
+
* style: {
|
|
77
|
+
* x: 50, // 圆心 x
|
|
78
|
+
* y: 50, // 圆心 y
|
|
79
|
+
* radius: 50 // 半径
|
|
80
|
+
* }
|
|
81
|
+
* }));
|
|
82
|
+
*
|
|
83
|
+
* // 矩形遮罩
|
|
84
|
+
* avatar.addComponent(new Mask({
|
|
85
|
+
* type: MASK_TYPE.Rect,
|
|
86
|
+
* style: {
|
|
87
|
+
* x: 0, y: 0,
|
|
88
|
+
* width: 100,
|
|
89
|
+
* height: 100
|
|
90
|
+
* }
|
|
91
|
+
* }));
|
|
92
|
+
*
|
|
93
|
+
* // 使用图片作为遮罩
|
|
94
|
+
* avatar.addComponent(new Mask({
|
|
95
|
+
* type: MASK_TYPE.Img,
|
|
96
|
+
* resource: 'maskImage' // alpha 通道作为遮罩
|
|
97
|
+
* }));
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
47
100
|
class Mask$2 extends Component {
|
|
48
101
|
constructor() {
|
|
49
102
|
super(...arguments);
|
|
103
|
+
/** 遮罩样式配置 */
|
|
104
|
+
// @decorators.IDEProp 复杂编辑后续添加
|
|
50
105
|
this.style = {};
|
|
106
|
+
/** 遮罩图片资源名称(用于 Img 类型) */
|
|
51
107
|
this.resource = '';
|
|
108
|
+
/** 遮罩精灵名称(用于 Sprite 类型) */
|
|
52
109
|
this.spriteName = '';
|
|
53
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* 初始化组件
|
|
113
|
+
* @param obj - 初始化参数
|
|
114
|
+
* @param obj.type - 遮罩类型
|
|
115
|
+
* @param obj.style - 遮罩样式
|
|
116
|
+
* @param obj.resource - 遮罩资源(可选)
|
|
117
|
+
* @param obj.spriteName - 精灵名称(可选)
|
|
118
|
+
*/
|
|
54
119
|
init(obj) {
|
|
55
120
|
Object.assign(this, obj);
|
|
56
121
|
}
|
|
57
122
|
}
|
|
123
|
+
/** 组件名称 */
|
|
58
124
|
Mask$2.componentName = 'Mask';
|
|
59
125
|
__decorate([
|
|
60
126
|
type('string')
|
|
@@ -63,7 +129,7 @@ __decorate([
|
|
|
63
129
|
type('string')
|
|
64
130
|
], Mask$2.prototype, "spriteName", void 0);
|
|
65
131
|
|
|
66
|
-
const resourceKeySplit = '_s|r|c_';
|
|
132
|
+
const resourceKeySplit = '_s|r|c_'; // Notice: This key be created by sprite system.
|
|
67
133
|
const propertyForGraphics = {
|
|
68
134
|
Circle: ['x', 'y', 'radius'],
|
|
69
135
|
Ellipse: ['x', 'y', 'width', 'height'],
|
|
@@ -211,6 +277,7 @@ let Mask = class Mask extends Renderer {
|
|
|
211
277
|
for (const key of propertyForGraphics[component.type]) {
|
|
212
278
|
params.push(component.style[key]);
|
|
213
279
|
}
|
|
280
|
+
// @ts-ignore
|
|
214
281
|
graphics[functionForGraphics[component.type]](...params);
|
|
215
282
|
graphics.fill(0x000000);
|
|
216
283
|
}
|
|
@@ -232,6 +299,7 @@ let Mask = class Mask extends Renderer {
|
|
|
232
299
|
this.setSprite(component, sprite);
|
|
233
300
|
}
|
|
234
301
|
setSprite(component, sprite) {
|
|
302
|
+
var _a, _b;
|
|
235
303
|
return __awaiter(this, void 0, void 0, function* () {
|
|
236
304
|
let res;
|
|
237
305
|
try {
|
|
@@ -245,11 +313,15 @@ let Mask = class Mask extends Renderer {
|
|
|
245
313
|
}
|
|
246
314
|
if (component.type === MASK_TYPE.Sprite) {
|
|
247
315
|
const img = component.resource + resourceKeySplit + component.spriteName;
|
|
248
|
-
const texture = res.instance[img];
|
|
249
|
-
|
|
316
|
+
const texture = (_a = res === null || res === void 0 ? void 0 : res.instance) === null || _a === void 0 ? void 0 : _a[img];
|
|
317
|
+
if (texture) {
|
|
318
|
+
sprite.image = texture;
|
|
319
|
+
}
|
|
250
320
|
}
|
|
251
321
|
else {
|
|
252
|
-
|
|
322
|
+
if ((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.image) {
|
|
323
|
+
sprite.image = res.data.image;
|
|
324
|
+
}
|
|
253
325
|
}
|
|
254
326
|
sprite.sprite.width = component.style.width;
|
|
255
327
|
sprite.sprite.height = component.style.height;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eva/plugin-renderer-mask",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2-beta.0",
|
|
4
4
|
"description": "@eva/plugin-renderer-mask",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-renderer-mask.esm.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"homepage": "https://eva.js.org",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@eva/inspector-decorator": "^0.0.5",
|
|
22
|
-
"@eva/plugin-renderer": "2.0.
|
|
23
|
-
"@eva/renderer-adapter": "2.0.
|
|
24
|
-
"@eva/eva.js": "2.0.
|
|
25
|
-
"pixi.js": "^8.
|
|
22
|
+
"@eva/plugin-renderer": "2.0.2-beta.0",
|
|
23
|
+
"@eva/renderer-adapter": "2.0.2-beta.0",
|
|
24
|
+
"@eva/eva.js": "2.0.2-beta.0",
|
|
25
|
+
"pixi.js": "^8.17.0"
|
|
26
26
|
}
|
|
27
27
|
}
|