Socket
Socket
Sign inDemoInstall

@eva/plugin-renderer-render

Package Overview
Dependencies
Maintainers
6
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eva/plugin-renderer-render - npm Package Compare versions

Comparing version 1.2.7-fix.4 to 1.2.7-fix.5

dist/EVA.plugin.renderer.render.js.map

61

dist/EVA.plugin.renderer.render.js

@@ -1,5 +0,7 @@

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); }
function _extends() { _extends = Object.assign || 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); }
window.EVA = window.EVA || {};
window.EVA.plugin = window.EVA.plugin || {};
window.EVA.plugin.renderer = window.EVA.plugin.renderer || {};
var _EVA_IIFE_render = function (exports, eva_js, pluginRenderer) {

@@ -18,15 +20,20 @@ 'use strict';

};
return _extendStatics(d, b);
};
function __extends(d, b) {
_extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length,
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
d;
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {

@@ -37,2 +44,3 @@ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;

}
function __read(o, n) {

@@ -42,5 +50,6 @@ var m = typeof Symbol === "function" && o[Symbol.iterator];

var i = m.call(o),
r,
ar = [],
e;
r,
ar = [],
e;
try {

@@ -61,4 +70,6 @@ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {

}
return ar;
}
function __spread() {

@@ -68,4 +79,6 @@ for (var ar = [], i = 0; i < arguments.length; i++) {

}
return ar;
}
function getIDEPropsPropertyObj(target, propertyKey) {

@@ -75,8 +88,11 @@ if (!target.constructor.IDEProps) {

}
if (!target.constructor.IDEProps[propertyKey]) {
target.constructor.IDEProps[propertyKey] = {};
}
var propertyObj = target.constructor.IDEProps[propertyKey];
return propertyObj;
}
function type(type) {

@@ -89,2 +105,3 @@ return function (target, propertyKey) {

}
function step(step) {

@@ -96,6 +113,9 @@ return function (target, propertyKey) {

}
var Render$2 = function (_super) {
__extends(Render, _super);
function Render() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.sortDirty = false;

@@ -108,20 +128,32 @@ _this.visible = true;

}
Render.prototype.init = function (obj) {
obj && _extends(this, obj);
};
Render.componentName = 'Render';
__decorate([type('boolean')], Render.prototype, "visible", void 0);
__decorate([type('number'), step(0.1)], Render.prototype, "alpha", void 0);
__decorate([type('number'), step(1)], Render.prototype, "zIndex", void 0);
__decorate([type('boolean')], Render.prototype, "sortableChildren", void 0);
return Render;
}(eva_js.Component);
var Render$3 = Render$2;
var Render = function (_super) {
__extends(Render, _super);
function Render() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.name = 'Render';
return _this;
}
Render.prototype.init = function () {

@@ -131,4 +163,6 @@ this.renderSystem = this.game.getSystem(pluginRenderer.RendererSystem);

};
Render.prototype.rendererUpdate = function (gameObject) {
var _this = this;
var component = gameObject.getComponent('Render');

@@ -138,2 +172,3 @@ var container = this.containerManager.getContainer(gameObject.id);

container.visible = component.visible;
if (component.sortDirty && component.sortableChildren) {

@@ -147,8 +182,11 @@ var gameObjects = gameObject.transform.children.map(function (_a) {

var bRender = b.getComponent('Render');
if (!aRender) {
return -1;
}
if (!bRender) {
return 1;
}
return aRender.zIndex - bRender.zIndex;

@@ -167,2 +205,3 @@ }).map(function (gameObject) {

};
Render.prototype.componentChanged = function (changed) {

@@ -172,5 +211,7 @@ if (changed.type === eva_js.OBSERVER_TYPE.ADD || changed.type === eva_js.OBSERVER_TYPE.REMOVE) {

}
if (changed.type === eva_js.OBSERVER_TYPE.CHANGE) {
this.change(changed);
}
if (changed.type === eva_js.OBSERVER_TYPE.REMOVE) {

@@ -180,2 +221,3 @@ this.remove(changed);

};
Render.prototype.add = function (changed) {

@@ -186,2 +228,3 @@ if (changed.component.name === 'Render') {

};
Render.prototype.change = function (changed) {

@@ -192,2 +235,3 @@ if (changed.component.name === 'Render' && changed.prop.prop[0] === 'zIndex') {

};
Render.prototype.remove = function (changed) {

@@ -199,4 +243,6 @@ if (changed.component.name === 'Render') {

};
Render.prototype.setDirty = function (changed) {
var parentRender = changed.gameObject.parent && changed.gameObject.parent.getComponent('Render');
if (parentRender) {

@@ -206,2 +252,3 @@ parentRender.sortDirty = true;

};
Render.systemName = 'Render';

@@ -213,2 +260,3 @@ Render = __decorate([eva_js.decorators.componentObserver({

}(pluginRenderer.Renderer);
var Render$1 = Render;

@@ -222,2 +270,3 @@ exports.Render = Render$3;

}({}, EVA, EVA.plugin.renderer);
window.EVA.plugin.renderer.render = window.EVA.plugin.renderer.render || _EVA_IIFE_render;

2

dist/EVA.plugin.renderer.render.min.js

@@ -1,1 +0,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;
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;

@@ -1,2 +0,3 @@

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); }
function _extends() { _extends = Object.assign || 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); }
import { __extends, __decorate, __spread } from 'tslib';

@@ -6,6 +7,9 @@ import { Component, OBSERVER_TYPE, decorators } from '@eva/eva.js/dist/miniprogram';

import { RendererSystem, Renderer } from '@eva/plugin-renderer/dist/miniprogram';
var Render$2 = function (_super) {
__extends(Render, _super);
function Render() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.sortDirty = false;

@@ -18,20 +22,32 @@ _this.visible = true;

}
Render.prototype.init = function (obj) {
obj && _extends(this, obj);
};
Render.componentName = 'Render';
__decorate([type('boolean')], Render.prototype, "visible", void 0);
__decorate([type('number'), step(0.1)], Render.prototype, "alpha", void 0);
__decorate([type('number'), step(1)], Render.prototype, "zIndex", void 0);
__decorate([type('boolean')], Render.prototype, "sortableChildren", void 0);
return Render;
}(Component);
var Render$3 = Render$2;
var Render = function (_super) {
__extends(Render, _super);
function Render() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.name = 'Render';
return _this;
}
Render.prototype.init = function () {

@@ -41,4 +57,6 @@ this.renderSystem = this.game.getSystem(RendererSystem);

};
Render.prototype.rendererUpdate = function (gameObject) {
var _this = this;
var component = gameObject.getComponent('Render');

@@ -48,2 +66,3 @@ var container = this.containerManager.getContainer(gameObject.id);

container.visible = component.visible;
if (component.sortDirty && component.sortableChildren) {

@@ -57,8 +76,11 @@ var gameObjects = gameObject.transform.children.map(function (_a) {

var bRender = b.getComponent('Render');
if (!aRender) {
return -1;
}
if (!bRender) {
return 1;
}
return aRender.zIndex - bRender.zIndex;

@@ -77,2 +99,3 @@ }).map(function (gameObject) {

};
Render.prototype.componentChanged = function (changed) {

@@ -82,5 +105,7 @@ if (changed.type === OBSERVER_TYPE.ADD || changed.type === OBSERVER_TYPE.REMOVE) {

}
if (changed.type === OBSERVER_TYPE.CHANGE) {
this.change(changed);
}
if (changed.type === OBSERVER_TYPE.REMOVE) {

@@ -90,2 +115,3 @@ this.remove(changed);

};
Render.prototype.add = function (changed) {

@@ -96,2 +122,3 @@ if (changed.component.name === 'Render') {

};
Render.prototype.change = function (changed) {

@@ -102,2 +129,3 @@ if (changed.component.name === 'Render' && changed.prop.prop[0] === 'zIndex') {

};
Render.prototype.remove = function (changed) {

@@ -109,4 +137,6 @@ if (changed.component.name === 'Render') {

};
Render.prototype.setDirty = function (changed) {
var parentRender = changed.gameObject.parent && changed.gameObject.parent.getComponent('Render');
if (parentRender) {

@@ -116,2 +146,3 @@ parentRender.sortDirty = true;

};
Render.systemName = 'Render';

@@ -123,3 +154,4 @@ Render = __decorate([decorators.componentObserver({

}(Renderer);
var Render$1 = Render;
export { Render$3 as Render, Render$1 as RenderSystem };

@@ -1,1 +0,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;
"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])})(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=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=p,exports.RenderSystem=c;
{
"name": "@eva/plugin-renderer-render",
"version": "1.2.7-fix.4",
"version": "1.2.7-fix.5",
"description": "@eva/plugin-renderer-render",

@@ -22,7 +22,7 @@ "main": "index.js",

"@eva/inspector-decorator": "^0.0.5",
"@eva/plugin-renderer": "1.2.7-fix.4",
"@eva/renderer-adapter": "1.2.7-fix.4",
"@eva/eva.js": "1.2.7-fix.4",
"@eva/plugin-renderer": "1.2.7-fix.5",
"@eva/renderer-adapter": "1.2.7-fix.5",
"@eva/eva.js": "1.2.7-fix.5",
"pixi.js": "^4.8.7"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc