@eva/plugin-renderer-render 1.2.5 → 1.2.7

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.
@@ -1 +1 @@
1
- function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _EVA_IIFE_render=function(e,t,n){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(o=e[p])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(e,t){return e.constructor.IDEProps||(e.constructor.IDEProps={}),e.constructor.IDEProps[t]||(e.constructor.IDEProps[t]={}),e.constructor.IDEProps[t]}function c(e){return function(t,n){var r=p(t,n);r.key=n,r.type=e}}function s(e){return function(t,n){p(t,n).step=e}}var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sortDirty=!1,t.visible=!0,t.alpha=1,t.zIndex=0,t.sortableChildren=!1,t}return o(t,e),t.prototype.init=function(e){e&&_extends(this,e)},t.componentName="Render",i([c("boolean")],t.prototype,"visible",void 0),i([c("number"),s(.1)],t.prototype,"alpha",void 0),i([c("number"),s(1)],t.prototype,"zIndex",void 0),i([c("boolean")],t.prototype,"sortableChildren",void 0),t}(t.Component),d=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Render",t}return o(r,e),r.prototype.init=function(){this.renderSystem=this.game.getSystem(n.RendererSystem),this.renderSystem.rendererManager.register(this)},r.prototype.rendererUpdate=function(e){var t=this,n=e.getComponent("Render"),r=this.containerManager.getContainer(e.id);if(r.alpha=n.alpha,r.visible=n.visible,n.sortDirty&&n.sortableChildren){var o=e.transform.children.map((function(e){return e.gameObject})).sort((function(e,t){var n=e.getComponent("Render"),r=t.getComponent("Render");return n?r?n.zIndex-r.zIndex:1:-1})).map((function(e){return t.containerManager.getContainer(e.id)})),i=this.containerManager.getContainer(n.gameObject.id).children,p=i.filter((function(e){return-1===o.indexOf(e)}));i.length=0,i.push.apply(i,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}(p,o)),n.sortDirty=!1}},r.prototype.componentChanged=function(e){e.type!==t.OBSERVER_TYPE.ADD&&e.type!==t.OBSERVER_TYPE.REMOVE||this.add(e),e.type===t.OBSERVER_TYPE.CHANGE&&this.change(e),e.type===t.OBSERVER_TYPE.REMOVE&&this.remove(e)},r.prototype.add=function(e){"Render"===e.component.name&&this.setDirty(e)},r.prototype.change=function(e){"Render"===e.component.name&&"zIndex"===e.prop.prop[0]&&this.setDirty(e)},r.prototype.remove=function(e){"Render"===e.component.name&&(this.containerManager.getContainer(e.gameObject.id).alpha=1)},r.prototype.setDirty=function(e){var t=e.gameObject.parent&&e.gameObject.parent.getComponent("Render");t&&(t.sortDirty=!0)},r.systemName="Render",r=i([t.decorators.componentObserver({Render:["zIndex"]})],r)}(n.Renderer);return e.Render=u,e.RenderSystem=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer);
1
+ function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{},window.EVA.plugin.renderer=window.EVA.plugin.renderer||{};var _EVA_IIFE_render=function(e,t,n){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var p=e.length-1;p>=0;p--)(o=e[p])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(e,t){return e.constructor.IDEProps||(e.constructor.IDEProps={}),e.constructor.IDEProps[t]||(e.constructor.IDEProps[t]={}),e.constructor.IDEProps[t]}function c(e){return function(t,n){var r=p(t,n);r.key=n,r.type=e}}function u(e){return function(t,n){p(t,n).step=e}}var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sortDirty=!1,t.visible=!0,t.alpha=1,t.zIndex=0,t.sortableChildren=!1,t}return o(t,e),t.prototype.init=function(e){e&&_extends(this,e)},t.componentName="Render",i([c("boolean")],t.prototype,"visible",void 0),i([c("number"),u(.1)],t.prototype,"alpha",void 0),i([c("number"),u(1)],t.prototype,"zIndex",void 0),i([c("boolean")],t.prototype,"sortableChildren",void 0),t}(t.Component),s=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Render",t}return o(r,e),r.prototype.init=function(){this.renderSystem=this.game.getSystem(n.RendererSystem),this.renderSystem.rendererManager.register(this)},r.prototype.rendererUpdate=function(e){var t=this,n=e.getComponent("Render"),r=this.containerManager.getContainer(e.id);if(r.alpha=n.alpha,r.visible=n.visible,n.sortDirty&&n.sortableChildren){var o=e.transform.children.map((function(e){return e.gameObject})).sort((function(e,t){var n=e.getComponent("Render"),r=t.getComponent("Render");return n?r?n.zIndex-r.zIndex:1:-1})).map((function(e){return t.containerManager.getContainer(e.id)})),i=this.containerManager.getContainer(n.gameObject.id).children,p=i.filter((function(e){return-1===o.indexOf(e)}));i.length=0,i.push.apply(i,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}(p,o)),n.sortDirty=!1}},r.prototype.componentChanged=function(e){e.type!==t.OBSERVER_TYPE.ADD&&e.type!==t.OBSERVER_TYPE.REMOVE||this.add(e),e.type===t.OBSERVER_TYPE.CHANGE&&this.change(e),e.type===t.OBSERVER_TYPE.REMOVE&&this.remove(e)},r.prototype.add=function(e){"Render"===e.component.name&&this.setDirty(e)},r.prototype.change=function(e){"Render"===e.component.name&&"zIndex"===e.prop.prop[0]&&this.setDirty(e)},r.prototype.remove=function(e){"Render"===e.component.name&&(this.containerManager.getContainer(e.gameObject.id).alpha=1)},r.prototype.setDirty=function(e){var t=e.gameObject.parent&&e.gameObject.parent.getComponent("Render");t&&(t.sortDirty=!0)},r.systemName="Render",r=i([t.decorators.componentObserver({Render:["zIndex"]})],r)}(n.Renderer);return e.Render=d,e.RenderSystem=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({},EVA,EVA.plugin.renderer);window.EVA.plugin.renderer.render=window.EVA.plugin.renderer.render||_EVA_IIFE_render;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eva/plugin-renderer-render",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "@eva/plugin-renderer-render",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-renderer-render.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": "1.2.5",
23
- "@eva/renderer-adapter": "1.2.5",
24
- "@eva/eva.js": "1.2.5",
22
+ "@eva/plugin-renderer": "1.2.7",
23
+ "@eva/renderer-adapter": "1.2.7",
24
+ "@eva/eva.js": "1.2.7",
25
25
  "pixi.js": "^4.8.7"
26
26
  }
27
27
  }