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