@eva/plugin-renderer-mesh 2.0.0-beta.10 → 2.0.0-beta.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.
@@ -7,12 +7,20 @@ var _EVA_IIFE_mesh = function (exports, eva_js, pluginRenderer, pixi_js) {
7
7
  class PerspectiveMesh extends eva_js.Component {
8
8
  constructor() {
9
9
  super(...arguments);
10
+ this.verticesX = 10;
11
+ this.verticesY = 10;
10
12
  this._forceUpdate = 0;
11
13
  }
12
14
  init(obj) {
13
15
  if (obj && obj.resource) {
14
16
  this.resource = obj.resource;
15
17
  }
18
+ if (obj && obj.verticesX) {
19
+ this.verticesX = obj.verticesX;
20
+ }
21
+ if (obj && obj.verticesY) {
22
+ this.verticesY = obj.verticesY;
23
+ }
16
24
  }
17
25
  setCorners(x0, y0, x1, y1, x2, y2, x3, y3) {
18
26
  const corners = this.corners || {};
@@ -66,7 +74,7 @@ var _EVA_IIFE_mesh = function (exports, eva_js, pluginRenderer, pixi_js) {
66
74
  let MeshSystem = class MeshSystem extends pluginRenderer.Renderer {
67
75
  constructor() {
68
76
  super(...arguments);
69
- this.name = 'PerspectiveMesh';
77
+ this.name = 'MeshSystem';
70
78
  this.meshes = {};
71
79
  }
72
80
  init() {
@@ -81,7 +89,9 @@ var _EVA_IIFE_mesh = function (exports, eva_js, pluginRenderer, pixi_js) {
81
89
  const component = changed.component;
82
90
  if (changed.type === eva_js.OBSERVER_TYPE.ADD) {
83
91
  const mesh = new pixi_js.PerspectiveMesh({
84
- texture: new pixi_js.Texture()
92
+ texture: new pixi_js.Texture(),
93
+ verticesX: component.verticesX,
94
+ verticesY: component.verticesY
85
95
  });
86
96
  this.meshes[changed.gameObject.id] = mesh;
87
97
  this.containerManager.getContainer(changed.gameObject.id).addChildAt(mesh, 0);
@@ -131,7 +141,7 @@ var _EVA_IIFE_mesh = function (exports, eva_js, pluginRenderer, pixi_js) {
131
141
  }
132
142
  }
133
143
  };
134
- MeshSystem.systemName = 'PerspectiveMesh';
144
+ MeshSystem.systemName = 'MeshSystem';
135
145
  MeshSystem = __decorate([eva_js.decorators.componentObserver({
136
146
  PerspectiveMesh: ['resource', '_forceUpdate']
137
147
  })], MeshSystem);
@@ -1 +1 @@
1
- window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_mesh=function(e,r,t,s){"use strict";class n extends r.Component{constructor(){super(...arguments),this._forceUpdate=0}init(e){e&&e.resource&&(this.resource=e.resource)}setCorners(e,r,t,s,n,o,i,c){const d=this.corners||{};d.x0=e,d.y0=r,d.x1=t,d.y1=s,d.x2=n,d.y2=o,d.x3=i,d.y3=c,this.corners=d,this._forceUpdate+=1}}function o(e,r,t,s){return new(t||(t=Promise))((function(n,o){function i(e){try{d(s.next(e))}catch(e){o(e)}}function c(e){try{d(s.throw(e))}catch(e){o(e)}}function d(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,c)}d((s=s.apply(e,r||[])).next())}))}n.componentName="PerspectiveMesh";let i=class extends t.Renderer{constructor(){super(...arguments),this.name="PerspectiveMesh",this.meshes={}}init(){this.renderSystem=this.game.getSystem(t.RendererSystem),this.renderSystem.rendererManager.register(this)}componentChanged(e){var t,n;return o(this,void 0,void 0,(function*(){if("PerspectiveMesh"===e.componentName){const o=e.gameObject.id,i=e.component;if(e.type===r.OBSERVER_TYPE.ADD){const n=new s.PerspectiveMesh({texture:new s.Texture});this.meshes[e.gameObject.id]=n,this.containerManager.getContainer(e.gameObject.id).addChildAt(n,0);const c=this.increaseAsyncId(o),d=yield r.resource.getResource(i.resource),a=null===(t=d.data)||void 0===t?void 0:t.image;if(!this.validateAsyncId(o,c))return;if(!a)return void console.error(`GameObject:${e.gameObject.name}'s Mesh resource load error`);i.corners?this.meshes[e.gameObject.id].setCorners(i.corners.x0,i.corners.y0,i.corners.x1,i.corners.y1,i.corners.x2,i.corners.y2,i.corners.x3,i.corners.y3):n.setCorners(0,0,a.width,0,a.width,a.height,0,a.height)}else if(e.type===r.OBSERVER_TYPE.CHANGE){const t=this.increaseAsyncId(o),s=yield r.resource.getResource(i.resource),c=null===(n=s.data)||void 0===n?void 0:n.image;if(!this.validateAsyncId(o,t))return;if(!c)return void console.error(`GameObject:${e.gameObject.name}'s Mesh resource load error`);this.meshes[e.gameObject.id].texture=c,i.corners&&this.meshes[e.gameObject.id].setCorners(i.corners.x0,i.corners.y0,i.corners.x1,i.corners.y1,i.corners.x2,i.corners.y2,i.corners.x3,i.corners.y3)}else if(e.type===r.OBSERVER_TYPE.REMOVE){this.increaseAsyncId(o);const r=this.meshes[e.gameObject.id];this.containerManager.getContainer(e.gameObject.id).removeChild(r),r.destroy(),delete this.meshes[e.gameObject.id]}}}))}destroy(){var e,r;for(const t in this.meshes){const s=this.meshes[t];null===(r=null===(e=this.containerManager)||void 0===e?void 0:e.getContainer(parseInt(t)))||void 0===r||r.removeChild(s),s.destroy(),delete this.meshes[t]}}};i.systemName="PerspectiveMesh",i=function(e,r,t,s){var n,o=arguments.length,i=o<3?r:null===s?s=Object.getOwnPropertyDescriptor(r,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,s);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(o<3?n(i):o>3?n(r,t,i):n(r,t))||i);return o>3&&i&&Object.defineProperty(r,t,i),i}([r.decorators.componentObserver({PerspectiveMesh:["resource","_forceUpdate"]})],i);var c=i;return e.MeshSystem=c,e.PerspectiveMesh=n,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer,PIXI);window.EVA.plugin.renderer.mesh=window.EVA.plugin.renderer.mesh||_EVA_IIFE_mesh;
1
+ window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_mesh=function(e,r,t,s){"use strict";class n extends r.Component{constructor(){super(...arguments),this.verticesX=10,this.verticesY=10,this._forceUpdate=0}init(e){e&&e.resource&&(this.resource=e.resource),e&&e.verticesX&&(this.verticesX=e.verticesX),e&&e.verticesY&&(this.verticesY=e.verticesY)}setCorners(e,r,t,s,n,i,o,c){const d=this.corners||{};d.x0=e,d.y0=r,d.x1=t,d.y1=s,d.x2=n,d.y2=i,d.x3=o,d.y3=c,this.corners=d,this._forceUpdate+=1}}function i(e,r,t,s){return new(t||(t=Promise))((function(n,i){function o(e){try{d(s.next(e))}catch(e){i(e)}}function c(e){try{d(s.throw(e))}catch(e){i(e)}}function d(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(o,c)}d((s=s.apply(e,r||[])).next())}))}n.componentName="PerspectiveMesh";let o=class extends t.Renderer{constructor(){super(...arguments),this.name="MeshSystem",this.meshes={}}init(){this.renderSystem=this.game.getSystem(t.RendererSystem),this.renderSystem.rendererManager.register(this)}componentChanged(e){var t,n;return i(this,void 0,void 0,(function*(){if("PerspectiveMesh"===e.componentName){const i=e.gameObject.id,o=e.component;if(e.type===r.OBSERVER_TYPE.ADD){const n=new s.PerspectiveMesh({texture:new s.Texture,verticesX:o.verticesX,verticesY:o.verticesY});this.meshes[e.gameObject.id]=n,this.containerManager.getContainer(e.gameObject.id).addChildAt(n,0);const c=this.increaseAsyncId(i),d=yield r.resource.getResource(o.resource),a=null===(t=d.data)||void 0===t?void 0:t.image;if(!this.validateAsyncId(i,c))return;if(!a)return void console.error(`GameObject:${e.gameObject.name}'s Mesh resource load error`);o.corners?this.meshes[e.gameObject.id].setCorners(o.corners.x0,o.corners.y0,o.corners.x1,o.corners.y1,o.corners.x2,o.corners.y2,o.corners.x3,o.corners.y3):n.setCorners(0,0,a.width,0,a.width,a.height,0,a.height)}else if(e.type===r.OBSERVER_TYPE.CHANGE){const t=this.increaseAsyncId(i),s=yield r.resource.getResource(o.resource),c=null===(n=s.data)||void 0===n?void 0:n.image;if(!this.validateAsyncId(i,t))return;if(!c)return void console.error(`GameObject:${e.gameObject.name}'s Mesh resource load error`);this.meshes[e.gameObject.id].texture=c,o.corners&&this.meshes[e.gameObject.id].setCorners(o.corners.x0,o.corners.y0,o.corners.x1,o.corners.y1,o.corners.x2,o.corners.y2,o.corners.x3,o.corners.y3)}else if(e.type===r.OBSERVER_TYPE.REMOVE){this.increaseAsyncId(i);const r=this.meshes[e.gameObject.id];this.containerManager.getContainer(e.gameObject.id).removeChild(r),r.destroy(),delete this.meshes[e.gameObject.id]}}}))}destroy(){var e,r;for(const t in this.meshes){const s=this.meshes[t];null===(r=null===(e=this.containerManager)||void 0===e?void 0:e.getContainer(parseInt(t)))||void 0===r||r.removeChild(s),s.destroy(),delete this.meshes[t]}}};o.systemName="MeshSystem",o=function(e,r,t,s){var n,i=arguments.length,o=i<3?r:null===s?s=Object.getOwnPropertyDescriptor(r,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,r,t,s);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(o=(i<3?n(o):i>3?n(r,t,o):n(r,t))||o);return i>3&&o&&Object.defineProperty(r,t,o),o}([r.decorators.componentObserver({PerspectiveMesh:["resource","_forceUpdate"]})],o);var c=o;return e.MeshSystem=c,e.PerspectiveMesh=n,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer,PIXI);window.EVA.plugin.renderer.mesh=window.EVA.plugin.renderer.mesh||_EVA_IIFE_mesh;
@@ -9,12 +9,20 @@ var pixi_js = require('pixi.js');
9
9
  class PerspectiveMesh extends eva_js.Component {
10
10
  constructor() {
11
11
  super(...arguments);
12
+ this.verticesX = 10;
13
+ this.verticesY = 10;
12
14
  this._forceUpdate = 0;
13
15
  }
14
16
  init(obj) {
15
17
  if (obj && obj.resource) {
16
18
  this.resource = obj.resource;
17
19
  }
20
+ if (obj && obj.verticesX) {
21
+ this.verticesX = obj.verticesX;
22
+ }
23
+ if (obj && obj.verticesY) {
24
+ this.verticesY = obj.verticesY;
25
+ }
18
26
  }
19
27
  setCorners(x0, y0, x1, y1, x2, y2, x3, y3) {
20
28
  const corners = this.corners || {};
@@ -66,7 +74,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
66
74
  let MeshSystem = class MeshSystem extends pluginRenderer.Renderer {
67
75
  constructor() {
68
76
  super(...arguments);
69
- this.name = 'PerspectiveMesh';
77
+ this.name = 'MeshSystem';
70
78
  this.meshes = {};
71
79
  }
72
80
  init() {
@@ -80,7 +88,11 @@ let MeshSystem = class MeshSystem extends pluginRenderer.Renderer {
80
88
  const gameObjectId = changed.gameObject.id;
81
89
  const component = changed.component;
82
90
  if (changed.type === eva_js.OBSERVER_TYPE.ADD) {
83
- const mesh = new pixi_js.PerspectiveMesh({ texture: new pixi_js.Texture() });
91
+ const mesh = new pixi_js.PerspectiveMesh({
92
+ texture: new pixi_js.Texture(),
93
+ verticesX: component.verticesX,
94
+ verticesY: component.verticesY,
95
+ });
84
96
  this.meshes[changed.gameObject.id] = mesh;
85
97
  this.containerManager.getContainer(changed.gameObject.id).addChildAt(mesh, 0);
86
98
  const asyncId = this.increaseAsyncId(gameObjectId);
@@ -134,7 +146,7 @@ let MeshSystem = class MeshSystem extends pluginRenderer.Renderer {
134
146
  }
135
147
  }
136
148
  };
137
- MeshSystem.systemName = 'PerspectiveMesh';
149
+ MeshSystem.systemName = 'MeshSystem';
138
150
  MeshSystem = __decorate([
139
151
  eva_js.decorators.componentObserver({
140
152
  PerspectiveMesh: ['resource', '_forceUpdate'],
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),r=require("@eva/plugin-renderer"),t=require("pixi.js");class s extends e.Component{constructor(){super(...arguments),this._forceUpdate=0}init(e){e&&e.resource&&(this.resource=e.resource)}setCorners(e,r,t,s,n,o,i,c){const a=this.corners||{};a.x0=e,a.y0=r,a.x1=t,a.y1=s,a.x2=n,a.y2=o,a.x3=i,a.y3=c,this.corners=a,this._forceUpdate+=1}}s.componentName="PerspectiveMesh";let n=class extends r.Renderer{constructor(){super(...arguments),this.name="PerspectiveMesh",this.meshes={}}init(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)}componentChanged(r){var s,n,o,i,c,a;return o=this,i=void 0,a=function*(){if("PerspectiveMesh"===r.componentName){const o=r.gameObject.id,i=r.component;if(r.type===e.OBSERVER_TYPE.ADD){const n=new t.PerspectiveMesh({texture:new t.Texture});this.meshes[r.gameObject.id]=n,this.containerManager.getContainer(r.gameObject.id).addChildAt(n,0);const c=this.increaseAsyncId(o),a=yield e.resource.getResource(i.resource),h=null===(s=a.data)||void 0===s?void 0:s.image;if(!this.validateAsyncId(o,c))return;if(!h)return void console.error(`GameObject:${r.gameObject.name}'s Mesh resource load error`);i.corners?this.meshes[r.gameObject.id].setCorners(i.corners.x0,i.corners.y0,i.corners.x1,i.corners.y1,i.corners.x2,i.corners.y2,i.corners.x3,i.corners.y3):n.setCorners(0,0,h.width,0,h.width,h.height,0,h.height)}else if(r.type===e.OBSERVER_TYPE.CHANGE){const t=this.increaseAsyncId(o),s=yield e.resource.getResource(i.resource),c=null===(n=s.data)||void 0===n?void 0:n.image;if(!this.validateAsyncId(o,t))return;if(!c)return void console.error(`GameObject:${r.gameObject.name}'s Mesh resource load error`);this.meshes[r.gameObject.id].texture=c,i.corners&&this.meshes[r.gameObject.id].setCorners(i.corners.x0,i.corners.y0,i.corners.x1,i.corners.y1,i.corners.x2,i.corners.y2,i.corners.x3,i.corners.y3)}else if(r.type===e.OBSERVER_TYPE.REMOVE){this.increaseAsyncId(o);const e=this.meshes[r.gameObject.id];this.containerManager.getContainer(r.gameObject.id).removeChild(e),e.destroy(),delete this.meshes[r.gameObject.id]}}},new((c=void 0)||(c=Promise))((function(e,r){function t(e){try{n(a.next(e))}catch(e){r(e)}}function s(e){try{n(a.throw(e))}catch(e){r(e)}}function n(r){r.done?e(r.value):new c((function(e){e(r.value)})).then(t,s)}n((a=a.apply(o,i||[])).next())}))}destroy(){var e,r;for(const t in this.meshes){const s=this.meshes[t];null===(r=null===(e=this.containerManager)||void 0===e?void 0:e.getContainer(parseInt(t)))||void 0===r||r.removeChild(s),s.destroy(),delete this.meshes[t]}}};n.systemName="PerspectiveMesh",n=
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@eva/eva.js"),r=require("@eva/plugin-renderer"),t=require("pixi.js");class s extends e.Component{constructor(){super(...arguments),this.verticesX=10,this.verticesY=10,this._forceUpdate=0}init(e){e&&e.resource&&(this.resource=e.resource),e&&e.verticesX&&(this.verticesX=e.verticesX),e&&e.verticesY&&(this.verticesY=e.verticesY)}setCorners(e,r,t,s,n,i,o,c){const a=this.corners||{};a.x0=e,a.y0=r,a.x1=t,a.y1=s,a.x2=n,a.y2=i,a.x3=o,a.y3=c,this.corners=a,this._forceUpdate+=1}}s.componentName="PerspectiveMesh";let n=class extends r.Renderer{constructor(){super(...arguments),this.name="MeshSystem",this.meshes={}}init(){this.renderSystem=this.game.getSystem(r.RendererSystem),this.renderSystem.rendererManager.register(this)}componentChanged(r){var s,n,i,o,c,a;return i=this,o=void 0,a=function*(){if("PerspectiveMesh"===r.componentName){const i=r.gameObject.id,o=r.component;if(r.type===e.OBSERVER_TYPE.ADD){const n=new t.PerspectiveMesh({texture:new t.Texture,verticesX:o.verticesX,verticesY:o.verticesY});this.meshes[r.gameObject.id]=n,this.containerManager.getContainer(r.gameObject.id).addChildAt(n,0);const c=this.increaseAsyncId(i),a=yield e.resource.getResource(o.resource),h=null===(s=a.data)||void 0===s?void 0:s.image;if(!this.validateAsyncId(i,c))return;if(!h)return void console.error(`GameObject:${r.gameObject.name}'s Mesh resource load error`);o.corners?this.meshes[r.gameObject.id].setCorners(o.corners.x0,o.corners.y0,o.corners.x1,o.corners.y1,o.corners.x2,o.corners.y2,o.corners.x3,o.corners.y3):n.setCorners(0,0,h.width,0,h.width,h.height,0,h.height)}else if(r.type===e.OBSERVER_TYPE.CHANGE){const t=this.increaseAsyncId(i),s=yield e.resource.getResource(o.resource),c=null===(n=s.data)||void 0===n?void 0:n.image;if(!this.validateAsyncId(i,t))return;if(!c)return void console.error(`GameObject:${r.gameObject.name}'s Mesh resource load error`);this.meshes[r.gameObject.id].texture=c,o.corners&&this.meshes[r.gameObject.id].setCorners(o.corners.x0,o.corners.y0,o.corners.x1,o.corners.y1,o.corners.x2,o.corners.y2,o.corners.x3,o.corners.y3)}else if(r.type===e.OBSERVER_TYPE.REMOVE){this.increaseAsyncId(i);const e=this.meshes[r.gameObject.id];this.containerManager.getContainer(r.gameObject.id).removeChild(e),e.destroy(),delete this.meshes[r.gameObject.id]}}},new((c=void 0)||(c=Promise))((function(e,r){function t(e){try{n(a.next(e))}catch(e){r(e)}}function s(e){try{n(a.throw(e))}catch(e){r(e)}}function n(r){r.done?e(r.value):new c((function(e){e(r.value)})).then(t,s)}n((a=a.apply(i,o||[])).next())}))}destroy(){var e,r;for(const t in this.meshes){const s=this.meshes[t];null===(r=null===(e=this.containerManager)||void 0===e?void 0:e.getContainer(parseInt(t)))||void 0===r||r.removeChild(s),s.destroy(),delete this.meshes[t]}}};n.systemName="MeshSystem",n=
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -13,4 +13,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
15
  ***************************************************************************** */
16
- function(e,r,t,s){var n,o=arguments.length,i=o<3?r:null===s?s=Object.getOwnPropertyDescriptor(r,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,s);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(o<3?n(i):o>3?n(r,t,i):n(r,t))||i);return o>3&&i&&Object.defineProperty(r,t,i),i}([e.decorators.componentObserver({PerspectiveMesh:["resource","_forceUpdate"]})],n);var o=n;exports.MeshSystem=o,exports.PerspectiveMesh=s;
16
+ function(e,r,t,s){var n,i=arguments.length,o=i<3?r:null===s?s=Object.getOwnPropertyDescriptor(r,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,r,t,s);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(o=(i<3?n(o):i>3?n(r,t,o):n(r,t))||o);return i>3&&o&&Object.defineProperty(r,t,o),o}([e.decorators.componentObserver({PerspectiveMesh:["resource","_forceUpdate"]})],n);var i=n;exports.MeshSystem=i,exports.PerspectiveMesh=s;
@@ -27,6 +27,8 @@ export declare class MeshSystem extends Renderer {
27
27
  export declare class PerspectiveMesh extends Component<PerspectiveMeshParams> {
28
28
  static componentName: string;
29
29
  resource: string;
30
+ verticesX: number;
31
+ verticesY: number;
30
32
  corners: Corners;
31
33
  _forceUpdate: number;
32
34
  init(obj?: PerspectiveMeshParams): void;
@@ -35,6 +37,8 @@ export declare class PerspectiveMesh extends Component<PerspectiveMeshParams> {
35
37
 
36
38
  declare interface PerspectiveMeshParams {
37
39
  resource: string;
40
+ verticesX?: number;
41
+ verticesY?: number;
38
42
  }
39
43
 
40
44
  export { }
@@ -5,12 +5,20 @@ import { PerspectiveMesh as PerspectiveMesh$1, Texture } from 'pixi.js';
5
5
  class PerspectiveMesh extends Component {
6
6
  constructor() {
7
7
  super(...arguments);
8
+ this.verticesX = 10;
9
+ this.verticesY = 10;
8
10
  this._forceUpdate = 0;
9
11
  }
10
12
  init(obj) {
11
13
  if (obj && obj.resource) {
12
14
  this.resource = obj.resource;
13
15
  }
16
+ if (obj && obj.verticesX) {
17
+ this.verticesX = obj.verticesX;
18
+ }
19
+ if (obj && obj.verticesY) {
20
+ this.verticesY = obj.verticesY;
21
+ }
14
22
  }
15
23
  setCorners(x0, y0, x1, y1, x2, y2, x3, y3) {
16
24
  const corners = this.corners || {};
@@ -62,7 +70,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
62
70
  let MeshSystem = class MeshSystem extends Renderer {
63
71
  constructor() {
64
72
  super(...arguments);
65
- this.name = 'PerspectiveMesh';
73
+ this.name = 'MeshSystem';
66
74
  this.meshes = {};
67
75
  }
68
76
  init() {
@@ -76,7 +84,11 @@ let MeshSystem = class MeshSystem extends Renderer {
76
84
  const gameObjectId = changed.gameObject.id;
77
85
  const component = changed.component;
78
86
  if (changed.type === OBSERVER_TYPE.ADD) {
79
- const mesh = new PerspectiveMesh$1({ texture: new Texture() });
87
+ const mesh = new PerspectiveMesh$1({
88
+ texture: new Texture(),
89
+ verticesX: component.verticesX,
90
+ verticesY: component.verticesY,
91
+ });
80
92
  this.meshes[changed.gameObject.id] = mesh;
81
93
  this.containerManager.getContainer(changed.gameObject.id).addChildAt(mesh, 0);
82
94
  const asyncId = this.increaseAsyncId(gameObjectId);
@@ -130,7 +142,7 @@ let MeshSystem = class MeshSystem extends Renderer {
130
142
  }
131
143
  }
132
144
  };
133
- MeshSystem.systemName = 'PerspectiveMesh';
145
+ MeshSystem.systemName = 'MeshSystem';
134
146
  MeshSystem = __decorate([
135
147
  decorators.componentObserver({
136
148
  PerspectiveMesh: ['resource', '_forceUpdate'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/plugin-renderer-mesh",
3
- "version": "2.0.0-beta.10",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "@eva/plugin-renderer-mesh",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-mesh.esm.js",
@@ -19,8 +19,8 @@
19
19
  "homepage": "https://eva.js.org",
20
20
  "dependencies": {
21
21
  "@eva/inspector-decorator": "^0.0.5",
22
- "@eva/plugin-renderer": "2.0.0-beta.10",
23
- "@eva/eva.js": "2.0.0-beta.10",
22
+ "@eva/plugin-renderer": "2.0.0-beta.11",
23
+ "@eva/eva.js": "2.0.0-beta.11",
24
24
  "pixi.js": "^8.6.5"
25
25
  }
26
26
  }