hilo3d 1.15.17 → 1.16.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.
package/build/polyfill.js CHANGED
@@ -1,6 +1,6 @@
1
- window.Hilo3d=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=111)}({100:function(t,e,n){"use strict";t.exports=function(t){return Object.keys(t).map((function(e){return t[e]}))}},101:function(t,e,n){"use strict";t.exports="function"==typeof Promise?Promise:n(105)},104:function(t,e,n){"use strict";n.r(e);var r=n(98),o=n.n(r),i=n(99),c=n.n(i),u=n(100),a=n.n(u),s=n(101),f=n.n(s);Object.assign||(Object.assign=o.a),Object.keys||(Object.keys=c.a),Object.values||(Object.values=a.a),"undefined"==typeof Promise&&(window.Promise=f.a),[Int8Array,Uint8Array,Int16Array,Uint16Array,Uint32Array,Float32Array].forEach((function(t){t.prototype.slice||Object.defineProperty(t.prototype,"slice",{value:function(e,n){return new t(Array.prototype.slice.call(this,e,n))}})}))},105:function(t,e,n){"use strict";(function(e,n){var r,o=function(){},i=void 0!==e&&void 0!==e.process&&"function"==typeof e.process.emit,c=void 0===n?setTimeout:n,u=[];function a(){for(var t=0;t<u.length;t++)u[t][0](u[t][1]);u=[],r=!1}function s(t,e){u.push([t,e]),r||(r=!0,c(a,0))}function f(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n="fulfilled";try{r=o(r)}catch(t){h(i,t)}}l(i,r)||("fulfilled"===n&&d(i,r),"rejected"===n&&h(i,r))}function l(t,e){var n;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var r=e.then;if("function"==typeof r)return r.call(e,(function(r){n||(n=!0,e===r?p(t,r):d(t,r))}),(function(e){n||(n=!0,h(t,e))})),!0}}catch(e){return n||h(t,e),!0}return!1}function d(t,e){t!==e&&l(t,e)||p(t,e)}function p(t,e){"pending"===t._state&&(t._state="settled",t._data=e,s(y,t))}function h(t,e){"pending"===t._state&&(t._state="settled",t._data=e,s(v,t))}function m(t){t._then=t._then.forEach(f)}function y(t){t._state="fulfilled",m(t)}function v(t){t._state="rejected",m(t),!t._handled&&i&&e.process.emit("unhandledRejection",t._data,t)}function b(t){e.process.emit("rejectionHandled",t)}function g(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof g==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(t,e){function n(t){h(e,t)}try{t((function(t){d(e,t)}),n)}catch(t){n(t)}}(t,this)}g.prototype={constructor:g,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(o),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,"rejected"===this._state&&i&&s(b,this)),"fulfilled"===this._state||"rejected"===this._state?s(f,n):this._then.push(n),n.then},catch:function(t){return this.then(null,t)}},g.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new g((function(e,n){var r=[],o=0;function i(t){return o++,function(n){r[t]=n,--o||e(r)}}for(var c,u=0;u<t.length;u++)(c=t[u])&&"function"==typeof c.then?c.then(i(u),n):r[u]=c;o||e(r)}))},g.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new g((function(e,n){for(var r,o=0;o<t.length;o++)(r=t[o])&&"function"==typeof r.then?r.then(e,n):e(r)}))},g.resolve=function(t){return t&&"object"==typeof t&&t.constructor===g?t:new g((function(e){e(t)}))},g.reject=function(t){return new g((function(e,n){n(t)}))},t.exports=g}).call(this,n(36),n(106).setImmediate)},106:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(107),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(36))},107:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o,i,c,u,a=1,s={},f=!1,l=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){h(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(c="setImmediate$"+Math.random()+"$",u=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(c)&&h(+e.data.slice(c.length))},t.addEventListener?t.addEventListener("message",u,!1):t.attachEvent("onmessage",u),r=function(e){t.postMessage(c+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return s[a]=o,r(a),a++},d.clearImmediate=p}function p(t){delete s[t]}function h(t){if(f)setTimeout(h,0,t);else{var e=s[t];if(e){f=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),f=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(36),n(108))},108:function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(t){r=c}}();var a,s=[],f=!1,l=-1;function d(){f&&a&&(f=!1,a.length?s=a.concat(s):l=-1,s.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=s.length;e;){for(a=s,s=[];++l<e;)a&&a[l].run();l=-1,e=s.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new h(t,e)),1!==s.length||f||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},111:function(t,e,n){t.exports=n(104)},36:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},98:function(t,e,n){"use strict";
1
+ window.Hilo3d=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=107)}({100:function(t,e,n){"use strict";n.r(e);var r=n(95),o=n.n(r),i=n(96),c=n.n(i),u=n(97),a=n.n(u),s=n(98),f=n.n(s);Object.assign||(Object.assign=o.a),Object.keys||(Object.keys=c.a),Object.values||(Object.values=a.a),"undefined"==typeof Promise&&(window.Promise=f.a),[Int8Array,Uint8Array,Int16Array,Uint16Array,Uint32Array,Float32Array].forEach((function(t){t.prototype.slice||Object.defineProperty(t.prototype,"slice",{value:function(e,n){return new t(Array.prototype.slice.call(this,e,n))}})}))},101:function(t,e,n){"use strict";(function(e,n){var r,o=function(){},i=void 0!==e&&void 0!==e.process&&"function"==typeof e.process.emit,c=void 0===n?setTimeout:n,u=[];function a(){for(var t=0;t<u.length;t++)u[t][0](u[t][1]);u=[],r=!1}function s(t,e){u.push([t,e]),r||(r=!0,c(a,0))}function f(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n="fulfilled";try{r=o(r)}catch(t){h(i,t)}}l(i,r)||("fulfilled"===n&&d(i,r),"rejected"===n&&h(i,r))}function l(t,e){var n;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var r=e.then;if("function"==typeof r)return r.call(e,(function(r){n||(n=!0,e===r?p(t,r):d(t,r))}),(function(e){n||(n=!0,h(t,e))})),!0}}catch(e){return n||h(t,e),!0}return!1}function d(t,e){t!==e&&l(t,e)||p(t,e)}function p(t,e){"pending"===t._state&&(t._state="settled",t._data=e,s(y,t))}function h(t,e){"pending"===t._state&&(t._state="settled",t._data=e,s(v,t))}function m(t){t._then=t._then.forEach(f)}function y(t){t._state="fulfilled",m(t)}function v(t){t._state="rejected",m(t),!t._handled&&i&&e.process.emit("unhandledRejection",t._data,t)}function b(t){e.process.emit("rejectionHandled",t)}function g(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof g==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(t,e){function n(t){h(e,t)}try{t((function(t){d(e,t)}),n)}catch(t){n(t)}}(t,this)}g.prototype={constructor:g,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(o),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,"rejected"===this._state&&i&&s(b,this)),"fulfilled"===this._state||"rejected"===this._state?s(f,n):this._then.push(n),n.then},catch:function(t){return this.then(null,t)}},g.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new g((function(e,n){var r=[],o=0;function i(t){return o++,function(n){r[t]=n,--o||e(r)}}for(var c,u=0;u<t.length;u++)(c=t[u])&&"function"==typeof c.then?c.then(i(u),n):r[u]=c;o||e(r)}))},g.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new g((function(e,n){for(var r,o=0;o<t.length;o++)(r=t[o])&&"function"==typeof r.then?r.then(e,n):e(r)}))},g.resolve=function(t){return t&&"object"==typeof t&&t.constructor===g?t:new g((function(e){e(t)}))},g.reject=function(t){return new g((function(e,n){n(t)}))},t.exports=g}).call(this,n(35),n(102).setImmediate)},102:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(103),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(35))},103:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o,i,c,u,a=1,s={},f=!1,l=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){h(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(t){i.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(c="setImmediate$"+Math.random()+"$",u=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(c)&&h(+e.data.slice(c.length))},t.addEventListener?t.addEventListener("message",u,!1):t.attachEvent("onmessage",u),r=function(e){t.postMessage(c+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return s[a]=o,r(a),a++},d.clearImmediate=p}function p(t){delete s[t]}function h(t){if(f)setTimeout(h,0,t);else{var e=s[t];if(e){f=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),f=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(35),n(104))},104:function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(t){r=c}}();var a,s=[],f=!1,l=-1;function d(){f&&a&&(f=!1,a.length?s=a.concat(s):l=-1,s.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=s.length;e;){for(a=s,s=[];++l<e;)a&&a[l].run();l=-1,e=s.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new h(t,e)),1!==s.length||f||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},107:function(t,e,n){t.exports=n(100)},35:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},95:function(t,e,n){"use strict";
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
- */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,a=c(t),s=1;s<arguments.length;s++){for(var f in n=Object(arguments[s]))o.call(n,f)&&(a[f]=n[f]);if(r){u=r(n);for(var l=0;l<u.length;l++)i.call(n,u[l])&&(a[u[l]]=n[u[l]])}}return a}},99:function(t,e,n){"use strict";var r,o,i,c;Object.keys||(Object.keys=(r=Object.prototype.hasOwnProperty,o=!{toString:null}.propertyIsEnumerable("toString"),c=(i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(t){if("object"!=typeof t&&("function"!=typeof t||null===t))throw new TypeError("Object.keys called on non-object");var e,n,u=[];for(e in t)r.call(t,e)&&u.push(e);if(o)for(n=0;n<c;n++)r.call(t,i[n])&&u.push(i[n]);return u}))}});
6
+ */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,a=c(t),s=1;s<arguments.length;s++){for(var f in n=Object(arguments[s]))o.call(n,f)&&(a[f]=n[f]);if(r){u=r(n);for(var l=0;l<u.length;l++)i.call(n,u[l])&&(a[u[l]]=n[u[l]])}}return a}},96:function(t,e,n){"use strict";var r,o,i,c;Object.keys||(Object.keys=(r=Object.prototype.hasOwnProperty,o=!{toString:null}.propertyIsEnumerable("toString"),c=(i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(t){if("object"!=typeof t&&("function"!=typeof t||null===t))throw new TypeError("Object.keys called on non-object");var e,n,u=[];for(e in t)r.call(t,e)&&u.push(e);if(o)for(n=0;n<c;n++)r.call(t,i[n])&&u.push(i[n]);return u}))},97:function(t,e,n){"use strict";t.exports=function(t){return Object.keys(t).map((function(e){return t[e]}))}},98:function(t,e,n){"use strict";t.exports="function"==typeof Promise?Promise:n(101)}});
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hilo3d",
3
- "version": "1.15.17",
3
+ "version": "1.16.0",
4
4
  "description": "Hilo3d, a WebGL 3d engine.",
5
5
  "main": "build/Hilo3d.js",
6
6
  "types": "types/index.d.ts",
@@ -50,7 +50,7 @@
50
50
  "eslint": "^5.6.0",
51
51
  "eslint-config-airbnb-base": "^13.1.0",
52
52
  "eslint-loader": "^2.1.1",
53
- "eslint-plugin-import": "^2.9.0",
53
+ "eslint-plugin-import": "~2.22.0",
54
54
  "glslify": "^6.0.1",
55
55
  "glslify-import-loader": "^0.1.2",
56
56
  "glslify-loader": "^1.0.2",
@@ -73,7 +73,6 @@
73
73
  "amc": "^1.0.6",
74
74
  "gl-matrix": "^2.4.0",
75
75
  "glsl-transpose": "^1.0.0",
76
- "hilojs": "^2.0.0",
77
76
  "object-assign": "^4.1.1",
78
77
  "object-values": "^2.0.0",
79
78
  "object.keys": "^0.1.0",
package/types/index.d.ts CHANGED
@@ -590,6 +590,9 @@ type NodeGetChildByCallback = (node: Node) => boolean;
590
590
  * @property [onStart]
591
591
  * @property [onComplete]
592
592
  * @property [onUpdate]
593
+ * @property [loop = false]
594
+ * @property [reverse = false]
595
+ * @property [repeat = 0]
593
596
  */
594
597
  interface TweenParams {
595
598
  duration: number;
@@ -598,6 +601,9 @@ interface TweenParams {
598
601
  onStart?: (...params: any[]) => any;
599
602
  onComplete?: (...params: any[]) => any;
600
603
  onUpdate?: (...params: any[]) => any;
604
+ loop?: boolean;
605
+ reverse?: boolean;
606
+ repeat?: number;
601
607
  }
602
608
 
603
609
  /**
@@ -611,6 +617,13 @@ interface TweenEaseObject {
611
617
  EaseInOut: (...params: any[]) => any;
612
618
  }
613
619
 
620
+ /**
621
+ * @property EaseNone
622
+ */
623
+ interface TweenEaseNoneObject {
624
+ EaseNone: (...params: any[]) => any;
625
+ }
626
+
614
627
  /**
615
628
  * @param attribute
616
629
  * @param index
@@ -789,6 +802,8 @@ namespace semantic {
789
802
  var CAMERATYPE: semanticObject;
790
803
  var COLOR_0: semanticObject;
791
804
  var SKININDICES: semanticObject;
805
+ var JOINT: semanticObject;
806
+ var WEIGHT: semanticObject;
792
807
  var SKINWEIGHTS: semanticObject;
793
808
  var RENDERERSIZE: semanticObject;
794
809
  var LOCAL: semanticObject;
@@ -1347,9 +1362,9 @@ namespace util {
1347
1362
  function getRelativePath(basePath: string, path: string): string;
1348
1363
  /**
1349
1364
  * @param array
1350
- * @param isUTF8
1365
+ * @param [isUTF8 = false]
1351
1366
  */
1352
- function convertUint8ArrayToString(array: Uint8Array | number[], isUTF8: boolean): string;
1367
+ function convertUint8ArrayToString(array: Uint8Array | number[], isUTF8?: boolean): string;
1353
1368
  /**
1354
1369
  * @param url
1355
1370
  */
@@ -1436,11 +1451,14 @@ namespace util {
1436
1451
  */
1437
1452
  class Ticker {
1438
1453
  constructor(fps?: number);
1454
+ /**
1455
+ * 定时器的目标帧率
1456
+ */
1457
+ targetFPS: number;
1439
1458
  /**
1440
1459
  * 启动定时器。
1441
- * @param [userRAF = true] - 是否使用requestAnimationFrame,默认为true。
1442
1460
  */
1443
- start(userRAF?: boolean): void;
1461
+ start(): void;
1444
1462
  /**
1445
1463
  * 停止定时器。
1446
1464
  */
@@ -1757,6 +1775,9 @@ class Texture {
1757
1775
  clone(): Texture;
1758
1776
  }
1759
1777
 
1778
+ interface LazyTexture extends EventMixin {
1779
+ }
1780
+
1760
1781
  /**
1761
1782
  * 懒加载纹理
1762
1783
  * @example
@@ -1773,7 +1794,7 @@ class Texture {
1773
1794
  * @param [params.src] - 图片地址
1774
1795
  * @param params.[value:string] - 其它属性
1775
1796
  */
1776
- class LazyTexture extends Texture {
1797
+ class LazyTexture extends Texture implements EventMixin {
1777
1798
  constructor(params?: {
1778
1799
  crossOrigin?: boolean;
1779
1800
  placeHolder?: HTMLImageElement;
@@ -2822,6 +2843,14 @@ class Framebuffer {
2822
2843
  * texture magFilter
2823
2844
  */
2824
2845
  magFilter: GLenum;
2846
+ /**
2847
+ * texture wrapS
2848
+ */
2849
+ wrapS: GLenum;
2850
+ /**
2851
+ * texture wrapS
2852
+ */
2853
+ wrapT: GLenum;
2825
2854
  /**
2826
2855
  * texture data
2827
2856
  */
@@ -5250,7 +5279,7 @@ class PBRMaterial extends Material {
5250
5279
  /**
5251
5280
  * 光照类型,只能为 PBR 或 NONE
5252
5281
  */
5253
- readonly lightType: string;
5282
+ lightType: 'PBR' | 'NONE';
5254
5283
  /**
5255
5284
  * gammaCorrection
5256
5285
  */
@@ -5656,7 +5685,7 @@ class GeometryMaterial extends BasicMaterial {
5656
5685
  /**
5657
5686
  * 光照类型,支持: NONE, PHONG, BLINN-PHONG, LAMBERT
5658
5687
  */
5659
- lightType: string;
5688
+ lightType: 'NONE' | 'PHONG' | 'BLINN-PHONG' | 'LAMBERT';
5660
5689
  }
5661
5690
 
5662
5691
  /**
@@ -5699,7 +5728,7 @@ class BasicMaterial extends Material {
5699
5728
  /**
5700
5729
  * 光照类型,支持: NONE, PHONG, BLINN-PHONG, LAMBERT
5701
5730
  */
5702
- lightType: string;
5731
+ lightType: 'NONE' | 'PHONG' | 'BLINN-PHONG' | 'LAMBERT';
5703
5732
  /**
5704
5733
  * 漫反射贴图,或颜色
5705
5734
  */
@@ -6549,6 +6578,10 @@ class CameraHelper extends Mesh {
6549
6578
  color: Color;
6550
6579
  geometry: Geometry;
6551
6580
  material: Material;
6581
+ /**
6582
+ * update 回调
6583
+ */
6584
+ onUpdate: (...params: any[]) => any;
6552
6585
  }
6553
6586
 
6554
6587
  /**
@@ -7250,19 +7283,24 @@ class Tween {
7250
7283
  * 更新所有Tween实例。
7251
7284
  * @returns Tween
7252
7285
  */
7253
- static tick(): any;
7286
+ static tick(): Tween;
7254
7287
  /**
7255
- * @returns Tween
7288
+ * 添加Tween实例。
7289
+ * @param tween - 要添加的Tween对象。
7290
+ * @returns Tween。
7256
7291
  */
7257
- static add(): any;
7292
+ static add(tween: Tween): Tween;
7258
7293
  /**
7259
- * @returns Tween
7294
+ * 删除Tween实例。
7295
+ * @param tweenOrTarget - 要删除的Tween对象或target对象或要删除的一组对象。
7296
+ * @returns Tween。
7260
7297
  */
7261
- static remove(): any;
7298
+ static remove(tweenOrTarget: Tween | any | any[]): Tween;
7262
7299
  /**
7263
- * @returns Tween
7300
+ * 删除所有Tween实例。
7301
+ * @returns Tween。
7264
7302
  */
7265
- static removeAll(): any;
7303
+ static removeAll(): Tween;
7266
7304
  /**
7267
7305
  * 创建一个缓动动画,让目标对象从开始属性变换到目标属性。
7268
7306
  * @param target - 缓动目标对象或缓动目标数组。
@@ -7290,30 +7328,63 @@ class Tween {
7290
7328
  static from(target: any | any[], fromProps: any, params: TweenParams): Tween | any[];
7291
7329
  /**
7292
7330
  * Ease类包含为Tween类提供各种缓动功能的函数。
7293
- * @property Back
7294
- * @property Bounce
7295
- * @property Circ
7296
- * @property Cubic
7297
- * @property Elastic
7298
- * @property Expo
7299
- * @property Linear
7300
- * @property Quad
7301
- * @property Quart
7302
- * @property Quint
7303
- * @property Sine
7331
+ * @property Linear - 线性匀速缓动函数
7332
+ * @property Quad - 二次缓动函数
7333
+ * @property Cubic - 三次缓动函数。
7334
+ * @property Quart - 四次缓动函数。
7335
+ * @property Quint - 五次缓动函数。
7336
+ * @property Sine - 正弦缓动函数。
7337
+ * @property Expo - 指数缓动函数。
7338
+ * @property Circ - 圆形缓动函数。
7339
+ * @property Elastic - 弹性缓动函数。
7340
+ * @property Back - 向后缓动函数。
7341
+ * @property Bounce - 弹跳缓动函数。
7304
7342
  */
7305
7343
  static Ease: {
7306
- Back: TweenEaseObject;
7307
- Bounce: TweenEaseObject;
7308
- Circ: TweenEaseObject;
7309
- Cubic: TweenEaseObject;
7310
- Elastic: TweenEaseObject;
7311
- Expo: TweenEaseObject;
7312
- Linear: TweenEaseObject;
7344
+ /**
7345
+ * 线性匀速缓动函数
7346
+ */
7347
+ Linear: TweenEaseNoneObject;
7348
+ /**
7349
+ * 二次缓动函数
7350
+ */
7313
7351
  Quad: TweenEaseObject;
7352
+ /**
7353
+ * 三次缓动函数。
7354
+ */
7355
+ Cubic: TweenEaseObject;
7356
+ /**
7357
+ * 四次缓动函数。
7358
+ */
7314
7359
  Quart: TweenEaseObject;
7360
+ /**
7361
+ * 五次缓动函数。
7362
+ */
7315
7363
  Quint: TweenEaseObject;
7364
+ /**
7365
+ * 正弦缓动函数。
7366
+ */
7316
7367
  Sine: TweenEaseObject;
7368
+ /**
7369
+ * 指数缓动函数。
7370
+ */
7371
+ Expo: TweenEaseObject;
7372
+ /**
7373
+ * 圆形缓动函数。
7374
+ */
7375
+ Circ: TweenEaseObject;
7376
+ /**
7377
+ * 弹性缓动函数。
7378
+ */
7379
+ Elastic: TweenEaseObject;
7380
+ /**
7381
+ * 向后缓动函数。
7382
+ */
7383
+ Back: TweenEaseObject;
7384
+ /**
7385
+ * 弹跳缓动函数。
7386
+ */
7387
+ Bounce: TweenEaseObject;
7317
7388
  };
7318
7389
  /**
7319
7390
  * 缓动目标。只读属性。
@@ -7440,6 +7511,14 @@ class Stage extends Node {
7440
7511
  * 偏移值
7441
7512
  */
7442
7513
  offsetY: number;
7514
+ /**
7515
+ * 舞台宽度
7516
+ */
7517
+ width: number;
7518
+ /**
7519
+ * 舞台高度
7520
+ */
7521
+ height: number;
7443
7522
  /**
7444
7523
  * canvas
7445
7524
  */
@@ -7577,7 +7656,7 @@ class Skeleton {
7577
7656
  */
7578
7657
  id: string;
7579
7658
  jointNodeList: Node[];
7580
- jointNames: String[];
7659
+ jointNames: string[];
7581
7660
  inverseBindMatrices: Matrix4[];
7582
7661
  /**
7583
7662
  * 关节数量
@@ -7692,6 +7771,10 @@ class Node implements EventMixin {
7692
7771
  * 用户数据
7693
7772
  */
7694
7773
  userData: any;
7774
+ /**
7775
+ * update 回调
7776
+ */
7777
+ onUpdate: (...params: any[]) => any;
7695
7778
  id: string;
7696
7779
  /**
7697
7780
  * 元素的up向量
@@ -7850,13 +7933,13 @@ class Node implements EventMixin {
7850
7933
  */
7851
7934
  getChildrenByBaseClassName(className: string): Node[];
7852
7935
  /**
7853
- * 设置元素的缩放比例
7936
+ * 设置元素的缩放比例,如果只有一个参数三个轴等比缩放
7854
7937
  * @param x - X缩放比例
7855
- * @param y - Y缩放比例
7856
- * @param z - Z缩放比例
7938
+ * @param [y] - Y缩放比例
7939
+ * @param [z] - Z缩放比例
7857
7940
  * @returns this
7858
7941
  */
7859
- setScale(x: number, y: number, z: number): Node;
7942
+ setScale(x: number, y?: number, z?: number): Node;
7860
7943
  /**
7861
7944
  * 设置元素的位置
7862
7945
  * @param x - X方向位置
@@ -7966,6 +8049,10 @@ class Node implements EventMixin {
7966
8049
  * 四元数角度
7967
8050
  */
7968
8051
  quaternion: Quaternion;
8052
+ /**
8053
+ * 矩阵 version,每次改变会加一
8054
+ */
8055
+ readonly matrixVersion: number;
7969
8056
  /**
7970
8057
  * 获取元素的包围盒信息
7971
8058
  * @param [parent] - 元素相对于哪个祖先元素的包围盒,不传表示世界