Files
esengine/source/bin/framework.min.js

1 line
166 KiB
JavaScript
Raw Normal View History

2020-12-31 16:38:09 +08:00
window.es={},window.__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();var transform,__values=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}},__read=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s},__spread=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(__read(arguments[e]));return t};!function(t){var e=function(){return function(t,e){this.func=t,this.context=e}}();t.FuncPack=e;var n=function(){function t(){this._messageTable=new Map}return t.prototype.addObserver=function(t,n,i){var r=this._messageTable.get(t);r||(r=[],this._messageTable.set(t,r)),-1!=r.findIndex(function(t){return t.func==n})&&console.warn("您试图添加相同的观察者两次"),r.push(new e(n,i))},t.prototype.removeObserver=function(t,e){var n=this._messageTable.get(t),i=n.findIndex(function(t){return t.func==e});-1!=i&&new linq.List(n).removeAt(i)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=this._messageTable.get(t);if(i)for(var r=i.length-1;r>=0;r--)i[r].func.call(i[r].context,e)},t}();t.Emitter=n}(es||(es={})),function(t){var e=function(){function e(){}return e.emitter=new t.Emitter,e}();t.Framework=e}(es||(es={})),function(t){var e=function(){function t(){}return t.debugText=16777215,t.colliderBounds=5033164.5,t.colliderEdge=9109504,t.colliderPosition=16776960,t.colliderCenter=16711680,t.renderableBounds=16776960,t.renderableCenter=10040012,t.verletParticle=14431326,t.verletConstraintEdge=4406838,t}();t.Debug=e}(es||(es={})),function(t){var e=function(){function t(){}return t.fail=function(t){void 0===t&&(t=null);for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];null==t?console.assert(!1):console.assert(!1,StringUtils.format(t,e))},t.isTrue=function(t,e){void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t||(null==e?this.fail():this.fail(e,n))},t.isFalse=function(t,e){void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];null==e?this.isTrue(!t):this.isTrue(!t,e,n)},t.isNull=function(t,e){void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];null==e?this.isTrue(null==t):this.isTrue(null==t,e,n)},t.isNotNull=function(t,e){void 0===e&&(e=null);for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];null==e?this.isTrue(null!=t):this.isTrue(null!=t,e,n)},t.areEqual=function(t,e,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r];t!=e&&this.fail(n,i)},t.areNotEqual=function(t,e,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r];t==e&&this.fail(n,i)},t}();t.Insist=e}(es||(es={})),function(t){var e=function(){function t(){this.updateInterval=1,this._enabled=!0,this._updateOrder=0}return Object.defineProperty(t.prototype,"transform",{get:function(){return this.entity.transform},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.entity?this.entity.enabled&&this._enabled:this._enabled},set:function(t){this.setEnabled(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateOrder",{get:function(){return this._updateOrder},set:function(t){this.setUpdateOrder(t)},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){},t.prototype.onAddedToEntity=function(){},t.prototype.onRemovedFromEntity=function(){},t.prototype.onEntityTransformChanged=function(t){},t.prototype.debugRender=function(t){},t.prototype.onEnabled=