gl-draw 0.7.0 → 0.7.1
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/dist/core/Composer.d.ts +3 -4
- package/dist/effect/index.d.ts +0 -1
- package/dist/effect/index.js +4 -4
- package/dist/effect/index.module.js +13 -13
- package/dist/index.js +1 -1
- package/dist/index.module.js +1 -1
- package/package.json +1 -1
- package/dist/effect/bloom.d.ts +0 -14
package/dist/core/Composer.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ export default class {
|
|
|
30
30
|
camera: THREE.Camera;
|
|
31
31
|
finalComposer: EffectComposer;
|
|
32
32
|
copyPass: CopyPass;
|
|
33
|
-
fxaaPass
|
|
34
|
-
bloomPass
|
|
35
|
-
bloomEffect
|
|
33
|
+
fxaaPass?: EffectPass;
|
|
34
|
+
bloomPass?: EffectPass;
|
|
35
|
+
bloomEffect?: SelectiveBloomEffect;
|
|
36
36
|
options: Options;
|
|
37
37
|
active: boolean;
|
|
38
38
|
constructor(options: Options);
|
|
@@ -44,7 +44,6 @@ export default class {
|
|
|
44
44
|
getSize(): THREE.Vector2;
|
|
45
45
|
enable(): void;
|
|
46
46
|
disable(): void;
|
|
47
|
-
checkCopyPass(): void;
|
|
48
47
|
setSize(width: number, height: number): void;
|
|
49
48
|
render(): void;
|
|
50
49
|
dispose(): void;
|
package/dist/effect/index.d.ts
CHANGED
package/dist/effect/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){var Q={666:function(y){var b=function(h){"use strict";var U=Object.prototype,x=U.hasOwnProperty,C,L=typeof Symbol=="function"?Symbol:{},N=L.iterator||"@@iterator",F=L.asyncIterator||"@@asyncIterator",I=L.toStringTag||"@@toStringTag";function M(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{M({},"")}catch(t){M=function(e,n,a){return e[n]=a}}function q(t,e,n,a){var l=e&&e.prototype instanceof r?e:r,v=Object.create(l.prototype),_=new D(a||[]);return v._invoke=w(t,n,_),v}h.wrap=q;function R(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(a){return{type:"throw",arg:a}}}var B="suspendedStart",m="suspendedYield",s="executing",f="completed",o={};function r(){}function i(){}function d(){}var u={};M(u,N,function(){return this});var c=Object.getPrototypeOf,p=c&&c(c(T([])));p&&p!==U&&x.call(p,N)&&(u=p);var W=d.prototype=r.prototype=Object.create(u);i.prototype=d,M(W,"constructor",d),M(d,"constructor",i),i.displayName=M(d,I,"GeneratorFunction");function g(t){["next","throw","return"].forEach(function(e){M(t,e,function(n){return this._invoke(e,n)})})}h.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return e?e===i||(e.displayName||e.name)==="GeneratorFunction":!1},h.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,M(t,I,"GeneratorFunction")),t.prototype=Object.create(W),t},h.awrap=function(t){return{__await:t}};function O(t,e){function n(v,_,P,j){var S=R(t[v],t,_);if(S.type==="throw")j(S.arg);else{var $=S.arg,H=$.value;return H&&typeof H=="object"&&x.call(H,"__await")?e.resolve(H.__await).then(function(A){n("next",A,P,j)},function(A){n("throw",A,P,j)}):e.resolve(H).then(function(A){$.value=A,P($)},function(A){return n("throw",A,P,j)})}}var a;function l(v,_){function P(){return new e(function(j,S){n(v,_,j,S)})}return a=a?a.then(P,P):P()}this._invoke=l}g(O.prototype),M(O.prototype,F,function(){return this}),h.AsyncIterator=O,h.async=function(t,e,n,a,l){l===void 0&&(l=Promise);var v=new O(q(t,e,n,a),l);return h.isGeneratorFunction(e)?v:v.next().then(function(_){return _.done?_.value:v.next()})};function w(t,e,n){var a=B;return function(v,_){if(a===s)throw new Error("Generator is already running");if(a===f){if(v==="throw")throw _;return E()}for(n.method=v,n.arg=_;;){var P=n.delegate;if(P){var j=V(P,n);if(j){if(j===o)continue;return j}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(a===B)throw a=f,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);a=s;var S=R(t,e,n);if(S.type==="normal"){if(a=n.done?f:m,S.arg===o)continue;return{value:S.arg,done:n.done}}else S.type==="throw"&&(a=f,n.method="throw",n.arg=S.arg)}}}function V(t,e){var n=t.iterator[e.method];if(n===C){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=C,V(t,e),e.method==="throw"))return o;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return o}var a=R(n,t.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,o;var l=a.arg;if(!l)return e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,o;if(l.done)e[t.resultName]=l.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=C);else return l;return e.delegate=null,o}g(W),M(W,I,"Generator"),M(W,N,function(){return this}),M(W,"toString",function(){return"[object Generator]"});function G(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}h.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function a(){for(;e.length;){var l=e.pop();if(l in t)return a.value=l,a.done=!1,a}return a.done=!0,a}};function T(t){if(t){var e=t[N];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var n=-1,a=function l(){for(;++n<t.length;)if(x.call(t,n))return l.value=t[n],l.done=!1,l;return l.value=C,l.done=!0,l};return a.next=a}}return{next:E}}h.values=T;function E(){return{value:C,done:!0}}return D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=C,this.done=!1,this.delegate=null,this.method="next",this.arg=C,this.tryEntries.forEach(k),!t)for(var e in this)e.charAt(0)==="t"&&x.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=C)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(j,S){return v.type="throw",v.arg=t,e.next=j,S&&(e.method="next",e.arg=C),!!S}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],v=l.completion;if(l.tryLoc==="root")return n("end");if(l.tryLoc<=this.prev){var _=x.call(l,"catchLoc"),P=x.call(l,"finallyLoc");if(_&&P){if(this.prev<l.catchLoc)return n(l.catchLoc,!0);if(this.prev<l.finallyLoc)return n(l.finallyLoc)}else if(_){if(this.prev<l.catchLoc)return n(l.catchLoc,!0)}else if(P){if(this.prev<l.finallyLoc)return n(l.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&x.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var l=a;break}}l&&(t==="break"||t==="continue")&&l.tryLoc<=e&&e<=l.finallyLoc&&(l=null);var v=l?l.completion:{};return v.type=t,v.arg=e,l?(this.method="next",this.next=l.finallyLoc,o):this.complete(v)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),o},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),o}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var a=n.completion;if(a.type==="throw"){var l=a.arg;k(n)}return l}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},this.method==="next"&&(this.arg=C),o}},h}(y.exports);try{regeneratorRuntime=b}catch(h){typeof globalThis=="object"?globalThis.regeneratorRuntime=b:Function("r","regeneratorRuntime = r")(b)}}},J={};function z(y){var b=J[y];if(b!==void 0)return b.exports;var h=J[y]={exports:{}};return Q[y](h,h.exports,z),h.exports}(function(){z.n=function(y){var b=y&&y.__esModule?function(){return y.default}:function(){return y};return z.d(b,{a:b}),b}})(),function(){z.d=function(y,b){for(var h in b)z.o(b,h)&&!z.o(y,h)&&Object.defineProperty(y,h,{enumerable:!0,get:b[h]})}}(),function(){z.o=function(y,b){return Object.prototype.hasOwnProperty.call(y,b)}}(),function(){z.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})}}();var Y={};(function(){"use strict";z.r(Y),z.d(Y,{Bloom:function(){return B},Scan:function(){return q},Scan2:function(){return R}});function y(m,s,f,o,r,i,d){try{var u=m[i](d),c=u.value}catch(p){f(p);return}u.done?s(c):Promise.resolve(c).then(o,r)}function b(m){return function(){var s=this,f=arguments;return new Promise(function(o,r){var i=m.apply(s,f);function d(c){y(i,o,r,d,u,"next",c)}function u(c){y(i,o,r,d,u,"throw",c)}d(void 0)})}}function h(m,s){if(!(m instanceof s))throw new TypeError("Cannot call a class as a function")}function U(m,s,f){return s in m?Object.defineProperty(m,s,{value:f,enumerable:!0,configurable:!0,writable:!0}):m[s]=f,m}function x(m){for(var s=1;s<arguments.length;s++){var f=arguments[s]!=null?arguments[s]:{},o=Object.keys(f);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(f).filter(function(r){return Object.getOwnPropertyDescriptor(f,r).enumerable}))),o.forEach(function(r){U(m,r,f[r])})}return m}var C=z(666),L=z.n(C),N=require("three"),F=require("popmotion");function I(m){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.then(function(f){return x({err:null,res:f},s)}).catch(function(f){return x({err:f,res:void 0},s)})}function M(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f={};return f.promise=new Promise(function(o,r){f.resolve=o,f.reject=r}),m&&(f.promise=I(f.promise,s)),f}var q=function(){"use strict";function m(f){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};h(this,m),this.object=f,this.options=x({},{color:16777215,opacity:1,lineNum:10,lineWidth:1,lineHieght:10,fade:!1,fadeType:2,radius:0,range:new N.Vector2(0,1),vertical:!1,step:0,pos:"bottom",duration:5e3,yoyo:!1,repeat:0},o)}var s=m.prototype;return s.initMaterial=function(){var o=this,r=this.options,i=r.color,d=r.lineNum,u=r.lineWidth,c=r.lineHieght,p=r.fade,W=r.fadeType,g=r.radius,O=r.range,w=r.vertical,V=r.step,G=r.opacity,k=r.exclude,D={field:{value:new N.Vector4(0,0,0,0)},color:{value:new N.Color(i)},opacity:{value:G},lineNum:{value:d},lineWidth:{value:u},lineHieght:{value:c},sizeNum:{value:new N.Vector3(g,g,g)},objPos:{value:new N.Vector3(0,0,0)},fade:{value:p},fadeType:{value:W},range:{value:O},angle:{value:0},stepNum:{value:V}};if(!g){var T=this.object.getSize().size;D.sizeNum.value.copy(T)}this.uniforms=D,this.object.object3d.traverse(function(E){var t=E;!t.material||k&&k.includes(t)||(t.userData.materialO?t.material=t.userData.materialO.clone():t.userData.materialO=Array.isArray(t.material)?t.material.map(function(e){return e.clone()}):t.material.clone(),Array.isArray(t.material)?t.material.forEach(function(e){w?o.setVerticalMaterial(e):o.setMaterial(e)}):w?o.setVerticalMaterial(t.material):o.setMaterial(t.material))})},s.setMaterial=function(o){var r=this.uniforms;o.onBeforeCompile=function(i){i.uniforms.field=r.field,i.uniforms.fieldColor=r.color,i.uniforms.fieldOpacity=r.opacity,i.uniforms.lineNum=r.lineNum,i.uniforms.lineWidth=r.lineWidth,i.uniforms.sizeNum=r.sizeNum,i.uniforms.fade=r.fade,i.uniforms.fadeType=r.fadeType,i.uniforms.range=r.range,i.uniforms.stepNum=r.stepNum,i.vertexShader=`
|
|
1
|
+
(function(){var Q={666:function(w){var b=function(g){"use strict";var F=Object.prototype,M=F.hasOwnProperty,z,E=typeof Symbol=="function"?Symbol:{},x=E.iterator||"@@iterator",q=E.asyncIterator||"@@asyncIterator",I=E.toStringTag||"@@toStringTag";function W(r,e,n){return Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{W({},"")}catch(r){W=function(e,n,f){return e[n]=f}}function B(r,e,n,f){var o=e&&e.prototype instanceof i?e:i,y=Object.create(o.prototype),P=new T(f||[]);return y._invoke=H(r,n,P),y}g.wrap=B;function R(r,e,n){try{return{type:"normal",arg:r.call(e,n)}}catch(f){return{type:"throw",arg:f}}}var m="suspendedStart",s="suspendedYield",l="executing",a="completed",t={};function i(){}function p(){}function u(){}var c={};W(c,x,function(){return this});var d=Object.getPrototypeOf,O=d&&d(d(L([])));O&&O!==F&&M.call(O,x)&&(c=O);var v=u.prototype=i.prototype=Object.create(c);p.prototype=u,W(v,"constructor",u),W(u,"constructor",p),p.displayName=W(u,I,"GeneratorFunction");function D(r){["next","throw","return"].forEach(function(e){W(r,e,function(n){return this._invoke(e,n)})})}g.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return e?e===p||(e.displayName||e.name)==="GeneratorFunction":!1},g.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,u):(r.__proto__=u,W(r,I,"GeneratorFunction")),r.prototype=Object.create(v),r},g.awrap=function(r){return{__await:r}};function h(r,e){function n(y,P,N,C){var S=R(r[y],r,P);if(S.type==="throw")C(S.arg);else{var $=S.arg,U=$.value;return U&&typeof U=="object"&&M.call(U,"__await")?e.resolve(U.__await).then(function(V){n("next",V,N,C)},function(V){n("throw",V,N,C)}):e.resolve(U).then(function(V){$.value=V,N($)},function(V){return n("throw",V,N,C)})}}var f;function o(y,P){function N(){return new e(function(C,S){n(y,P,C,S)})}return f=f?f.then(N,N):N()}this._invoke=o}D(h.prototype),W(h.prototype,q,function(){return this}),g.AsyncIterator=h,g.async=function(r,e,n,f,o){o===void 0&&(o=Promise);var y=new h(B(r,e,n,f),o);return g.isGeneratorFunction(e)?y:y.next().then(function(P){return P.done?P.value:y.next()})};function H(r,e,n){var f=m;return function(y,P){if(f===l)throw new Error("Generator is already running");if(f===a){if(y==="throw")throw P;return _()}for(n.method=y,n.arg=P;;){var N=n.delegate;if(N){var C=G(N,n);if(C){if(C===t)continue;return C}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(f===m)throw f=a,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);f=l;var S=R(r,e,n);if(S.type==="normal"){if(f=n.done?a:s,S.arg===t)continue;return{value:S.arg,done:n.done}}else S.type==="throw"&&(f=a,n.method="throw",n.arg=S.arg)}}}function G(r,e){var n=r.iterator[e.method];if(n===z){if(e.delegate=null,e.method==="throw"){if(r.iterator.return&&(e.method="return",e.arg=z,G(r,e),e.method==="throw"))return t;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return t}var f=R(n,r.iterator,e.arg);if(f.type==="throw")return e.method="throw",e.arg=f.arg,e.delegate=null,t;var o=f.arg;if(!o)return e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,t;if(o.done)e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=z);else return o;return e.delegate=null,t}D(v),W(v,I,"Generator"),W(v,x,function(){return this}),W(v,"toString",function(){return"[object Generator]"});function A(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function k(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function T(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(A,this),this.reset(!0)}g.keys=function(r){var e=[];for(var n in r)e.push(n);return e.reverse(),function f(){for(;e.length;){var o=e.pop();if(o in r)return f.value=o,f.done=!1,f}return f.done=!0,f}};function L(r){if(r){var e=r[x];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var n=-1,f=function o(){for(;++n<r.length;)if(M.call(r,n))return o.value=r[n],o.done=!1,o;return o.value=z,o.done=!0,o};return f.next=f}}return{next:_}}g.values=L;function _(){return{value:z,done:!0}}return T.prototype={constructor:T,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=z,this.done=!1,this.delegate=null,this.method="next",this.arg=z,this.tryEntries.forEach(k),!r)for(var e in this)e.charAt(0)==="t"&&M.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=z)},stop:function(){this.done=!0;var r=this.tryEntries[0],e=r.completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(C,S){return y.type="throw",y.arg=r,e.next=C,S&&(e.method="next",e.arg=z),!!S}for(var f=this.tryEntries.length-1;f>=0;--f){var o=this.tryEntries[f],y=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var P=M.call(o,"catchLoc"),N=M.call(o,"finallyLoc");if(P&&N){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(P){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else if(N){if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(r,e){for(var n=this.tryEntries.length-1;n>=0;--n){var f=this.tryEntries[n];if(f.tryLoc<=this.prev&&M.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var o=f;break}}o&&(r==="break"||r==="continue")&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var y=o?o.completion:{};return y.type=r,y.arg=e,o?(this.method="next",this.next=o.finallyLoc,t):this.complete(y)},complete:function(r,e){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&e&&(this.next=e),t},finish:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===r)return this.complete(n.completion,n.afterLoc),k(n),t}},catch:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===r){var f=n.completion;if(f.type==="throw"){var o=f.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:L(r),resultName:e,nextLoc:n},this.method==="next"&&(this.arg=z),t}},g}(w.exports);try{regeneratorRuntime=b}catch(g){typeof globalThis=="object"?globalThis.regeneratorRuntime=b:Function("r","regeneratorRuntime = r")(b)}}},J={};function j(w){var b=J[w];if(b!==void 0)return b.exports;var g=J[w]={exports:{}};return Q[w](g,g.exports,j),g.exports}(function(){j.n=function(w){var b=w&&w.__esModule?function(){return w.default}:function(){return w};return j.d(b,{a:b}),b}})(),function(){j.d=function(w,b){for(var g in b)j.o(b,g)&&!j.o(w,g)&&Object.defineProperty(w,g,{enumerable:!0,get:b[g]})}}(),function(){j.o=function(w,b){return Object.prototype.hasOwnProperty.call(w,b)}}(),function(){j.r=function(w){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})}}();var Y={};(function(){"use strict";j.r(Y),j.d(Y,{Scan:function(){return B},Scan2:function(){return R}});function w(m,s,l,a,t,i,p){try{var u=m[i](p),c=u.value}catch(d){l(d);return}u.done?s(c):Promise.resolve(c).then(a,t)}function b(m){return function(){var s=this,l=arguments;return new Promise(function(a,t){var i=m.apply(s,l);function p(c){w(i,a,t,p,u,"next",c)}function u(c){w(i,a,t,p,u,"throw",c)}p(void 0)})}}function g(m,s){if(!(m instanceof s))throw new TypeError("Cannot call a class as a function")}function F(m,s,l){return s in m?Object.defineProperty(m,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):m[s]=l,m}function M(m){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{},a=Object.keys(l);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(l).filter(function(t){return Object.getOwnPropertyDescriptor(l,t).enumerable}))),a.forEach(function(t){F(m,t,l[t])})}return m}var z=j(666),E=j.n(z),x=require("three"),q=require("popmotion");function I(m){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.then(function(l){return M({err:null,res:l},s)}).catch(function(l){return M({err:l,res:void 0},s)})}function W(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l={};return l.promise=new Promise(function(a,t){l.resolve=a,l.reject=t}),m&&(l.promise=I(l.promise,s)),l}var B=function(){"use strict";function m(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};g(this,m),this.object=l,this.options=M({},{color:16777215,opacity:1,lineNum:10,lineWidth:1,lineHieght:10,fade:!1,fadeType:2,radius:0,range:new x.Vector2(0,1),vertical:!1,step:0,pos:"bottom",duration:5e3,yoyo:!1,repeat:0},a)}var s=m.prototype;return s.initMaterial=function(){var a=this,t=this.options,i=t.color,p=t.lineNum,u=t.lineWidth,c=t.lineHieght,d=t.fade,O=t.fadeType,v=t.radius,D=t.range,h=t.vertical,H=t.step,G=t.opacity,A=t.exclude,k={field:{value:new x.Vector4(0,0,0,0)},color:{value:new x.Color(i)},opacity:{value:G},lineNum:{value:p},lineWidth:{value:u},lineHieght:{value:c},sizeNum:{value:new x.Vector3(v,v,v)},objPos:{value:new x.Vector3(0,0,0)},fade:{value:d},fadeType:{value:O},range:{value:D},angle:{value:0},stepNum:{value:H}};if(!v){var T=this.object.getSize().size;k.sizeNum.value.copy(T)}this.uniforms=k,this.object.object3d.traverse(function(L){var _=L;!_.material||A&&A.includes(_)||(_.userData.materialO?_.material=_.userData.materialO.clone():_.userData.materialO=Array.isArray(_.material)?_.material.map(function(r){return r.clone()}):_.material.clone(),Array.isArray(_.material)?_.material.forEach(function(r){h?a.setVerticalMaterial(r):a.setMaterial(r)}):h?a.setVerticalMaterial(_.material):a.setMaterial(_.material))})},s.setMaterial=function(a){var t=this.uniforms;a.onBeforeCompile=function(i){i.uniforms.field=t.field,i.uniforms.fieldColor=t.color,i.uniforms.fieldOpacity=t.opacity,i.uniforms.lineNum=t.lineNum,i.uniforms.lineWidth=t.lineWidth,i.uniforms.sizeNum=t.sizeNum,i.uniforms.fade=t.fade,i.uniforms.fadeType=t.fadeType,i.uniforms.range=t.range,i.uniforms.stepNum=t.stepNum,i.vertexShader=`
|
|
2
2
|
varying vec4 vWorldPos;
|
|
3
3
|
`.concat(i.vertexShader,`
|
|
4
4
|
`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
`)},
|
|
57
|
+
`)},a.needsUpdate=!0},s.setVerticalMaterial=function(a){var t=this.uniforms;a.onBeforeCompile=function(i){i.uniforms.field=t.field,i.uniforms.fieldColor=t.color,i.uniforms.fieldOpacity=t.opacity,i.uniforms.lineNum=t.lineNum,i.uniforms.lineWidth=t.lineWidth,i.uniforms.lineHieght=t.lineHieght,i.uniforms.sizeNum=t.sizeNum,i.uniforms.fade=t.fade,i.uniforms.range=t.range,i.uniforms.angle=t.angle,i.uniforms.objPos=t.objPos,i.vertexShader=`
|
|
58
58
|
varying vec4 vWorldPos;
|
|
59
59
|
`.concat(i.vertexShader,`
|
|
60
60
|
`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
`)},
|
|
128
|
+
`)},a.needsUpdate=!0},s.resetMaterial=function(){this.object.object3d.traverse(function(a){var t=a;t.material&&t.userData.materialO&&(t.material=t.userData.materialO.clone(),t.userData.materialO=void 0)})},s.play=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=this;this.stop();var i=W(!0),p=this,u=p.object,c=p.uniforms,d=M({},this.options,a),O=d.lineNum,v=d.step,D=d.lineWidth,h=d.pos,H=d.duration,G=u.getSize(),A=G.min,k=G.max,T=G.size,L=O,_=D;v>0&&(L=1,_=T.y/v);var r=c.sizeNum.value.y*(L>1?2:1);return this.tween=(0,q.animate)({from:0,to:1,duration:H,onPlay:function(){var e,n=new x.Vector3;h==="bottom"?n.set(A.x-.001,A.y-.001,A.z-.001):h==="top"&&n.set(k.x+.001,k.y+.001,k.z+.001);var f=((e=u.pencil.control)===null||e===void 0?void 0:e.getAzimuthalAngle())||0,o=t.object.object3d.position.clone();if(f){var y=Math.sqrt(Math.pow(T.x,2)+Math.pow(T.z,2))/2;n.x=o.x+y,n.z=o.z+y;var P=new x.Vector3().subVectors(n,o),N=new x.Vector3(0,1,0);P.applyAxisAngle(N,f),n.addVectors(o,P)}c.objPos.value.copy(o),c.field.value.set(n.x,n.y,n.z,0),c.angle.value=f,c.lineNum.value=L,c.lineWidth.value=_},onUpdate:function(e){v>0?c.field.value.w=Math.floor(e*v)/v*r:c.field.value.w=e*r},onStop:function(){c.field.value.w=0,i.reject("stop")},onComplete:function(){i.resolve()}}),i.promise},s.checkRepeat=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=this;return b(E().mark(function i(){var p,u,c,d,O,v;return E().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return p=M({},t.options,a),u=p.yoyo,c=p.repeat,d=p.pos,c===t.options.repeat&&t.initMaterial(),h.next=4,t.play(a);case 4:if(O=h.sent.err,!O){h.next=8;break}return t.resetMaterial(),h.abrupt("return");case 8:if(!c){h.next=15;break}return v=d,u&&(v=v==="bottom"?"top":"bottom"),h.next=13,t.checkRepeat({pos:v,repeat:c===1/0?-1:c-1});case 13:h.next=16;break;case 15:t.resetMaterial();case 16:case"end":return h.stop()}},i)}))()},s.start=function(){return this.checkRepeat()},s.stop=function(){this.tween&&this.tween.stop()},m}(),R=function(){"use strict";function m(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};g(this,m),this.object=l,this.options=M({},{color:16777215,lineWidth:2,opacity:.5,fade:!1,position:new x.Vector3(0,0,0),duration:5e3,repeat:0},a)}var s=m.prototype;return s.initMaterial=function(){var a=this,t=this.options.exclude,i={field:{value:new x.Vector4(0,0,0,1e-4)},color:{value:new x.Color(this.options.color)},opacity:{value:this.options.opacity},lineWidth:{value:this.options.lineWidth}};this.uniforms=i,this.object.object3d.traverse(function(p){var u=p;!u.material||t&&t.includes(u)||(u.userData.materialO?u.material=u.userData.materialO:u.userData.materialO=Array.isArray(u.material)?u.material.map(function(c){return c.clone()}):u.material.clone(),Array.isArray(u.material)?u.material.forEach(function(c){a.setMaterial(c)}):a.setMaterial(u.material))})},s.setMaterial=function(a){var t=this.uniforms;a.onBeforeCompile=function(i){i.uniforms.field=t.field,i.uniforms.fieldColor=t.color,i.uniforms.fieldOpacity=t.opacity,i.uniforms.lineWidth=t.lineWidth,i.vertexShader=`
|
|
129
129
|
varying vec4 vWorldPos;
|
|
130
130
|
`.concat(i.vertexShader,`
|
|
131
131
|
`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
@@ -157,4 +157,4 @@
|
|
|
157
157
|
}
|
|
158
158
|
gl_FragColor.rgb = mix(gl_FragColor.rgb, fieldColor, fadeout);
|
|
159
159
|
|
|
160
|
-
`)},
|
|
160
|
+
`)},a.needsUpdate=!0},s.resetMaterial=function(){this.object.object3d.traverse(function(a){var t=a;t.material&&t.userData.materialO&&(t.material=t.userData.materialO.clone(),t.userData.materialO=void 0)})},s.play=function(){var a=this;this.stop();var t=W(!0),i=this,p=i.object,u=i.uniforms,c=this.options,d=c.position,O=c.duration,v=this.options.radius;if(!v){var D=p.getSize().size;v=Math.max(D.x,D.y,D.z)}return this.tween=(0,q.animate)({from:1e-4,to:1,duration:O,onPlay:function(){u.field.value.set(d.x,d.y,d.z,1e-4),a.options.fade&&(u.opacity.value=a.options.opacity)},onUpdate:function(h){u.field.value.w=h*v,a.options.fade&&(u.opacity.value=(1-h)*a.options.opacity)},onStop:function(){u.field.value.w=0,t.reject("stop")},onComplete:function(){t.resolve()}}),t.promise},s.checkRepeat=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=this;return b(E().mark(function i(){var p,u;return E().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return p=M({},t.options,a).repeat,p===t.options.repeat&&t.initMaterial(),d.next=4,t.play();case 4:if(u=d.sent.err,!u){d.next=8;break}return t.resetMaterial(),d.abrupt("return");case 8:if(!p){d.next=13;break}return d.next=11,t.checkRepeat({repeat:p===1/0?-1:p-1});case 11:d.next=14;break;case 13:t.resetMaterial();case 14:case"end":return d.stop()}},i)}))()},s.start=function(){return this.checkRepeat()},s.stop=function(){this.tween&&this.tween.stop()},m}()})(),module.exports=Y})();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import*as q from"three";import*as K from"popmotion";var Q={666:function(P){var x=function(h){"use strict";var U=Object.prototype,W=U.hasOwnProperty,S,E=typeof Symbol=="function"?Symbol:{},G=E.iterator||"@@iterator",X=E.asyncIterator||"@@asyncIterator",M=E.toStringTag||"@@toStringTag";function j(r,e,n){return Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{j({},"")}catch(r){j=function(e,n,f){return e[n]=f}}function $(r,e,n,f){var i=e&&e.prototype instanceof c?e:c,v=Object.create(i.prototype),b=new y(f||[]);return v._invoke=m(r,n,b),v}h.wrap=$;function V(r,e,n){try{return{type:"normal",arg:r.call(e,n)}}catch(f){return{type:"throw",arg:f}}}var B="suspendedStart",H="suspendedYield",F="executing",I="completed",O={};function c(){}function s(){}function l(){}var a={};j(a,G,function(){return this});var t=Object.getPrototypeOf,o=t&&t(t(A([])));o&&o!==U&&W.call(o,G)&&(a=o);var d=l.prototype=c.prototype=Object.create(a);s.prototype=l,j(d,"constructor",l),j(l,"constructor",s),s.displayName=j(l,M,"GeneratorFunction");function u(r){["next","throw","return"].forEach(function(e){j(r,e,function(n){return this._invoke(e,n)})})}h.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return e?e===s||(e.displayName||e.name)==="GeneratorFunction":!1},h.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,l):(r.__proto__=l,j(r,M,"GeneratorFunction")),r.prototype=Object.create(d),r},h.awrap=function(r){return{__await:r}};function p(r,e){function n(v,b,g,N){var _=V(r[v],r,b);if(_.type==="throw")N(_.arg);else{var R=_.arg,T=R.value;return T&&typeof T=="object"&&W.call(T,"__await")?e.resolve(T.__await).then(function(D){n("next",D,g,N)},function(D){n("throw",D,g,N)}):e.resolve(T).then(function(D){R.value=D,g(R)},function(D){return n("throw",D,g,N)})}}var f;function i(v,b){function g(){return new e(function(N,_){n(v,b,N,_)})}return f=f?f.then(g,g):g()}this._invoke=i}u(p.prototype),j(p.prototype,X,function(){return this}),h.AsyncIterator=p,h.async=function(r,e,n,f,i){i===void 0&&(i=Promise);var v=new p($(r,e,n,f),i);return h.isGeneratorFunction(e)?v:v.next().then(function(b){return b.done?b.value:v.next()})};function m(r,e,n){var f=B;return function(v,b){if(f===F)throw new Error("Generator is already running");if(f===I){if(v==="throw")throw b;return L()}for(n.method=v,n.arg=b;;){var g=n.delegate;if(g){var N=k(g,n);if(N){if(N===O)continue;return N}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(f===B)throw f=I,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);f=F;var _=V(r,e,n);if(_.type==="normal"){if(f=n.done?I:H,_.arg===O)continue;return{value:_.arg,done:n.done}}else _.type==="throw"&&(f=I,n.method="throw",n.arg=_.arg)}}}function k(r,e){var n=r.iterator[e.method];if(n===S){if(e.delegate=null,e.method==="throw"){if(r.iterator.return&&(e.method="return",e.arg=S,k(r,e),e.method==="throw"))return O;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return O}var f=V(n,r.iterator,e.arg);if(f.type==="throw")return e.method="throw",e.arg=f.arg,e.delegate=null,O;var i=f.arg;if(!i)return e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,O;if(i.done)e[r.resultName]=i.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=S);else return i;return e.delegate=null,O}u(d),j(d,M,"Generator"),j(d,G,function(){return this}),j(d,"toString",function(){return"[object Generator]"});function w(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function C(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function y(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(w,this),this.reset(!0)}h.keys=function(r){var e=[];for(var n in r)e.push(n);return e.reverse(),function f(){for(;e.length;){var i=e.pop();if(i in r)return f.value=i,f.done=!1,f}return f.done=!0,f}};function A(r){if(r){var e=r[G];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var n=-1,f=function i(){for(;++n<r.length;)if(W.call(r,n))return i.value=r[n],i.done=!1,i;return i.value=S,i.done=!0,i};return f.next=f}}return{next:L}}h.values=A;function L(){return{value:S,done:!0}}return y.prototype={constructor:y,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=S,this.done=!1,this.delegate=null,this.method="next",this.arg=S,this.tryEntries.forEach(C),!r)for(var e in this)e.charAt(0)==="t"&&W.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=S)},stop:function(){this.done=!0;var r=this.tryEntries[0],e=r.completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(N,_){return v.type="throw",v.arg=r,e.next=N,_&&(e.method="next",e.arg=S),!!_}for(var f=this.tryEntries.length-1;f>=0;--f){var i=this.tryEntries[f],v=i.completion;if(i.tryLoc==="root")return n("end");if(i.tryLoc<=this.prev){var b=W.call(i,"catchLoc"),g=W.call(i,"finallyLoc");if(b&&g){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(b){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else if(g){if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(r,e){for(var n=this.tryEntries.length-1;n>=0;--n){var f=this.tryEntries[n];if(f.tryLoc<=this.prev&&W.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var i=f;break}}i&&(r==="break"||r==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var v=i?i.completion:{};return v.type=r,v.arg=e,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(v)},complete:function(r,e){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&e&&(this.next=e),O},finish:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===r)return this.complete(n.completion,n.afterLoc),C(n),O}},catch:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===r){var f=n.completion;if(f.type==="throw"){var i=f.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:A(r),resultName:e,nextLoc:n},this.method==="next"&&(this.arg=S),O}},h}(P.exports);try{regeneratorRuntime=x}catch(h){typeof globalThis=="object"?globalThis.regeneratorRuntime=x:Function("r","regeneratorRuntime = r")(x)}}},J={};function z(P){var x=J[P];if(x!==void 0)return x.exports;var h=J[P]={exports:{}};return Q[P](h,h.exports,z),h.exports}(function(){z.n=function(P){var x=P&&P.__esModule?function(){return P.default}:function(){return P};return z.d(x,{a:x}),x}})(),function(){z.d=function(P,x){for(var h in x)z.o(x,h)&&!z.o(P,h)&&Object.defineProperty(P,h,{enumerable:!0,get:x[h]})}}(),function(){z.o=function(P,x){return Object.prototype.hasOwnProperty.call(P,x)}}();var Y={};(function(){z.d(Y,{dp:function(){return O},hC:function(){return F},WU:function(){return I}});function P(c,s,l,a,t,o,d){try{var u=c[o](d),p=u.value}catch(m){l(m);return}u.done?s(p):Promise.resolve(p).then(a,t)}function x(c){return function(){var s=this,l=arguments;return new Promise(function(a,t){var o=c.apply(s,l);function d(p){P(o,a,t,d,u,"next",p)}function u(p){P(o,a,t,d,u,"throw",p)}d(void 0)})}}function h(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}function U(c,s,l){return s in c?Object.defineProperty(c,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):c[s]=l,c}function W(c){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{},a=Object.keys(l);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(l).filter(function(t){return Object.getOwnPropertyDescriptor(l,t).enumerable}))),a.forEach(function(t){U(c,t,l[t])})}return c}var S=z(666),E=z.n(S),G=c=>{var s={};return z.d(s,c),s},X=c=>()=>c,M=G({Color:()=>q.Color,Vector2:()=>q.Vector2,Vector3:()=>q.Vector3,Vector4:()=>q.Vector4}),j=c=>{var s={};return z.d(s,c),s},$=c=>()=>c,V=j({animate:()=>K.animate});function B(c){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return c.then(function(l){return W({err:null,res:l},s)}).catch(function(l){return W({err:l,res:void 0},s)})}function H(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l={};return l.promise=new Promise(function(a,t){l.resolve=a,l.reject=t}),c&&(l.promise=B(l.promise,s)),l}var F=function(){"use strict";function c(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};h(this,c),this.object=l,this.options=W({},{color:16777215,opacity:1,lineNum:10,lineWidth:1,lineHieght:10,fade:!1,fadeType:2,radius:0,range:new M.Vector2(0,1),vertical:!1,step:0,pos:"bottom",duration:5e3,yoyo:!1,repeat:0},a)}var s=c.prototype;return s.initMaterial=function(){var a=this,t=this.options,o=t.color,d=t.lineNum,u=t.lineWidth,p=t.lineHieght,m=t.fade,k=t.fadeType,w=t.radius,C=t.range,y=t.vertical,A=t.step,L=t.opacity,r=t.exclude,e={field:{value:new M.Vector4(0,0,0,0)},color:{value:new M.Color(o)},opacity:{value:L},lineNum:{value:d},lineWidth:{value:u},lineHieght:{value:p},sizeNum:{value:new M.Vector3(w,w,w)},objPos:{value:new M.Vector3(0,0,0)},fade:{value:m},fadeType:{value:k},range:{value:C},angle:{value:0},stepNum:{value:A}};if(!w){var n=this.object.getSize().size;e.sizeNum.value.copy(n)}this.uniforms=e,this.object.object3d.traverse(function(f){var i=f;!i.material||r&&r.includes(i)||(i.userData.materialO?i.material=i.userData.materialO.clone():i.userData.materialO=Array.isArray(i.material)?i.material.map(function(v){return v.clone()}):i.material.clone(),Array.isArray(i.material)?i.material.forEach(function(v){y?a.setVerticalMaterial(v):a.setMaterial(v)}):y?a.setVerticalMaterial(i.material):a.setMaterial(i.material))})},s.setMaterial=function(a){var t=this.uniforms;a.onBeforeCompile=function(o){o.uniforms.field=t.field,o.uniforms.fieldColor=t.color,o.uniforms.fieldOpacity=t.opacity,o.uniforms.lineNum=t.lineNum,o.uniforms.lineWidth=t.lineWidth,o.uniforms.sizeNum=t.sizeNum,o.uniforms.fade=t.fade,o.uniforms.fadeType=t.fadeType,o.uniforms.range=t.range,o.uniforms.stepNum=t.stepNum,o.vertexShader=`
|
|
1
|
+
import*as q from"three";import*as K from"popmotion";var Q={666:function(b){var _=function(g){"use strict";var U=Object.prototype,P=U.hasOwnProperty,S,E=typeof Symbol=="function"?Symbol:{},G=E.iterator||"@@iterator",X=E.asyncIterator||"@@asyncIterator",M=E.toStringTag||"@@toStringTag";function O(r,e,n){return Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{O({},"")}catch(r){O=function(e,n,o){return e[n]=o}}function Y(r,e,n,o){var a=e&&e.prototype instanceof l?e:l,v=Object.create(a.prototype),h=new L(o||[]);return v._invoke=z(r,n,h),v}g.wrap=Y;function V(r,e,n){try{return{type:"normal",arg:r.call(e,n)}}catch(o){return{type:"throw",arg:o}}}var H="suspendedStart",F="suspendedYield",B="executing",I="completed",u={};function l(){}function s(){}function f(){}var t={};O(t,G,function(){return this});var i=Object.getPrototypeOf,m=i&&i(i(D([])));m&&m!==U&&P.call(m,G)&&(t=m);var c=f.prototype=l.prototype=Object.create(t);s.prototype=f,O(c,"constructor",f),O(f,"constructor",s),s.displayName=O(f,M,"GeneratorFunction");function p(r){["next","throw","return"].forEach(function(e){O(r,e,function(n){return this._invoke(e,n)})})}g.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return e?e===s||(e.displayName||e.name)==="GeneratorFunction":!1},g.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,f):(r.__proto__=f,O(r,M,"GeneratorFunction")),r.prototype=Object.create(c),r},g.awrap=function(r){return{__await:r}};function d(r,e){function n(v,h,x,W){var N=V(r[v],r,h);if(N.type==="throw")W(N.arg);else{var R=N.arg,T=R.value;return T&&typeof T=="object"&&P.call(T,"__await")?e.resolve(T.__await).then(function(A){n("next",A,x,W)},function(A){n("throw",A,x,W)}):e.resolve(T).then(function(A){R.value=A,x(R)},function(A){return n("throw",A,x,W)})}}var o;function a(v,h){function x(){return new e(function(W,N){n(v,h,W,N)})}return o=o?o.then(x,x):x()}this._invoke=a}p(d.prototype),O(d.prototype,X,function(){return this}),g.AsyncIterator=d,g.async=function(r,e,n,o,a){a===void 0&&(a=Promise);var v=new d(Y(r,e,n,o),a);return g.isGeneratorFunction(e)?v:v.next().then(function(h){return h.done?h.value:v.next()})};function z(r,e,n){var o=H;return function(v,h){if(o===B)throw new Error("Generator is already running");if(o===I){if(v==="throw")throw h;return k()}for(n.method=v,n.arg=h;;){var x=n.delegate;if(x){var W=w(x,n);if(W){if(W===u)continue;return W}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(o===H)throw o=I,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);o=B;var N=V(r,e,n);if(N.type==="normal"){if(o=n.done?I:F,N.arg===u)continue;return{value:N.arg,done:n.done}}else N.type==="throw"&&(o=I,n.method="throw",n.arg=N.arg)}}}function w(r,e){var n=r.iterator[e.method];if(n===S){if(e.delegate=null,e.method==="throw"){if(r.iterator.return&&(e.method="return",e.arg=S,w(r,e),e.method==="throw"))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=V(n,r.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,u;var a=o.arg;if(!a)return e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u;if(a.done)e[r.resultName]=a.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=S);else return a;return e.delegate=null,u}p(c),O(c,M,"Generator"),O(c,G,function(){return this}),O(c,"toString",function(){return"[object Generator]"});function C(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function y(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function L(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(C,this),this.reset(!0)}g.keys=function(r){var e=[];for(var n in r)e.push(n);return e.reverse(),function o(){for(;e.length;){var a=e.pop();if(a in r)return o.value=a,o.done=!1,o}return o.done=!0,o}};function D(r){if(r){var e=r[G];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var n=-1,o=function a(){for(;++n<r.length;)if(P.call(r,n))return a.value=r[n],a.done=!1,a;return a.value=S,a.done=!0,a};return o.next=o}}return{next:k}}g.values=D;function k(){return{value:S,done:!0}}return L.prototype={constructor:L,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=S,this.done=!1,this.delegate=null,this.method="next",this.arg=S,this.tryEntries.forEach(y),!r)for(var e in this)e.charAt(0)==="t"&&P.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=S)},stop:function(){this.done=!0;var r=this.tryEntries[0],e=r.completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(W,N){return v.type="throw",v.arg=r,e.next=W,N&&(e.method="next",e.arg=S),!!N}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],v=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var h=P.call(a,"catchLoc"),x=P.call(a,"finallyLoc");if(h&&x){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(h){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else if(x){if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(r,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&P.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(r==="break"||r==="continue")&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var v=a?a.completion:{};return v.type=r,v.arg=e,a?(this.method="next",this.next=a.finallyLoc,u):this.complete(v)},complete:function(r,e){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&e&&(this.next=e),u},finish:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===r)return this.complete(n.completion,n.afterLoc),y(n),u}},catch:function(r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===r){var o=n.completion;if(o.type==="throw"){var a=o.arg;y(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:D(r),resultName:e,nextLoc:n},this.method==="next"&&(this.arg=S),u}},g}(b.exports);try{regeneratorRuntime=_}catch(g){typeof globalThis=="object"?globalThis.regeneratorRuntime=_:Function("r","regeneratorRuntime = r")(_)}}},J={};function j(b){var _=J[b];if(_!==void 0)return _.exports;var g=J[b]={exports:{}};return Q[b](g,g.exports,j),g.exports}(function(){j.n=function(b){var _=b&&b.__esModule?function(){return b.default}:function(){return b};return j.d(_,{a:_}),_}})(),function(){j.d=function(b,_){for(var g in _)j.o(_,g)&&!j.o(b,g)&&Object.defineProperty(b,g,{enumerable:!0,get:_[g]})}}(),function(){j.o=function(b,_){return Object.prototype.hasOwnProperty.call(b,_)}}();var $={};(function(){j.d($,{h:function(){return B},W:function(){return I}});function b(u,l,s,f,t,i,m){try{var c=u[i](m),p=c.value}catch(d){s(d);return}c.done?l(p):Promise.resolve(p).then(f,t)}function _(u){return function(){var l=this,s=arguments;return new Promise(function(f,t){var i=u.apply(l,s);function m(p){b(i,f,t,m,c,"next",p)}function c(p){b(i,f,t,m,c,"throw",p)}m(void 0)})}}function g(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function U(u,l,s){return l in u?Object.defineProperty(u,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):u[l]=s,u}function P(u){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{},f=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(f=f.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),f.forEach(function(t){U(u,t,s[t])})}return u}var S=j(666),E=j.n(S),G=u=>{var l={};return j.d(l,u),l},X=u=>()=>u,M=G({Color:()=>q.Color,Vector2:()=>q.Vector2,Vector3:()=>q.Vector3,Vector4:()=>q.Vector4}),O=u=>{var l={};return j.d(l,u),l},Y=u=>()=>u,V=O({animate:()=>K.animate});function H(u){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u.then(function(s){return P({err:null,res:s},l)}).catch(function(s){return P({err:s,res:void 0},l)})}function F(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s={};return s.promise=new Promise(function(f,t){s.resolve=f,s.reject=t}),u&&(s.promise=H(s.promise,l)),s}var B=function(){"use strict";function u(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};g(this,u),this.object=s,this.options=P({},{color:16777215,opacity:1,lineNum:10,lineWidth:1,lineHieght:10,fade:!1,fadeType:2,radius:0,range:new M.Vector2(0,1),vertical:!1,step:0,pos:"bottom",duration:5e3,yoyo:!1,repeat:0},f)}var l=u.prototype;return l.initMaterial=function(){var f=this,t=this.options,i=t.color,m=t.lineNum,c=t.lineWidth,p=t.lineHieght,d=t.fade,z=t.fadeType,w=t.radius,C=t.range,y=t.vertical,L=t.step,D=t.opacity,k=t.exclude,r={field:{value:new M.Vector4(0,0,0,0)},color:{value:new M.Color(i)},opacity:{value:D},lineNum:{value:m},lineWidth:{value:c},lineHieght:{value:p},sizeNum:{value:new M.Vector3(w,w,w)},objPos:{value:new M.Vector3(0,0,0)},fade:{value:d},fadeType:{value:z},range:{value:C},angle:{value:0},stepNum:{value:L}};if(!w){var e=this.object.getSize().size;r.sizeNum.value.copy(e)}this.uniforms=r,this.object.object3d.traverse(function(n){var o=n;!o.material||k&&k.includes(o)||(o.userData.materialO?o.material=o.userData.materialO.clone():o.userData.materialO=Array.isArray(o.material)?o.material.map(function(a){return a.clone()}):o.material.clone(),Array.isArray(o.material)?o.material.forEach(function(a){y?f.setVerticalMaterial(a):f.setMaterial(a)}):y?f.setVerticalMaterial(o.material):f.setMaterial(o.material))})},l.setMaterial=function(f){var t=this.uniforms;f.onBeforeCompile=function(i){i.uniforms.field=t.field,i.uniforms.fieldColor=t.color,i.uniforms.fieldOpacity=t.opacity,i.uniforms.lineNum=t.lineNum,i.uniforms.lineWidth=t.lineWidth,i.uniforms.sizeNum=t.sizeNum,i.uniforms.fade=t.fade,i.uniforms.fadeType=t.fadeType,i.uniforms.range=t.range,i.uniforms.stepNum=t.stepNum,i.vertexShader=`
|
|
2
2
|
varying vec4 vWorldPos;
|
|
3
|
-
`.concat(
|
|
3
|
+
`.concat(i.vertexShader,`
|
|
4
4
|
`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
5
5
|
vWorldPos = vec4( transformed, 1.0 );
|
|
6
6
|
#ifdef USE_INSTANCING
|
|
7
7
|
vWorldPos = instanceMatrix * vWorldPos;
|
|
8
8
|
#endif
|
|
9
9
|
vWorldPos = modelMatrix * vWorldPos;
|
|
10
|
-
`),
|
|
10
|
+
`),i.fragmentShader=`
|
|
11
11
|
uniform vec4 field;
|
|
12
12
|
uniform vec3 fieldColor;
|
|
13
13
|
uniform float fieldOpacity;
|
|
@@ -19,7 +19,7 @@ import*as q from"three";import*as K from"popmotion";var Q={666:function(P){var x
|
|
|
19
19
|
uniform vec2 range;
|
|
20
20
|
uniform int stepNum;
|
|
21
21
|
varying vec4 vWorldPos;
|
|
22
|
-
`.concat(
|
|
22
|
+
`.concat(i.fragmentShader,`
|
|
23
23
|
`).replace("#include <dithering_fragment>",`#include <dithering_fragment>
|
|
24
24
|
float height = sizeNum.y;
|
|
25
25
|
bool isTop = field.y > vWorldPos.y;
|
|
@@ -54,16 +54,16 @@ import*as q from"three";import*as K from"popmotion";var Q={666:function(P){var x
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
`)},
|
|
57
|
+
`)},f.needsUpdate=!0},l.setVerticalMaterial=function(f){var t=this.uniforms;f.onBeforeCompile=function(i){i.uniforms.field=t.field,i.uniforms.fieldColor=t.color,i.uniforms.fieldOpacity=t.opacity,i.uniforms.lineNum=t.lineNum,i.uniforms.lineWidth=t.lineWidth,i.uniforms.lineHieght=t.lineHieght,i.uniforms.sizeNum=t.sizeNum,i.uniforms.fade=t.fade,i.uniforms.range=t.range,i.uniforms.angle=t.angle,i.uniforms.objPos=t.objPos,i.vertexShader=`
|
|
58
58
|
varying vec4 vWorldPos;
|
|
59
|
-
`.concat(
|
|
59
|
+
`.concat(i.vertexShader,`
|
|
60
60
|
`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
61
61
|
vWorldPos = vec4( transformed, 1.0 );
|
|
62
62
|
#ifdef USE_INSTANCING
|
|
63
63
|
vWorldPos = instanceMatrix * vWorldPos;
|
|
64
64
|
#endif
|
|
65
65
|
vWorldPos = modelMatrix * vWorldPos;
|
|
66
|
-
`),
|
|
66
|
+
`),i.fragmentShader=`
|
|
67
67
|
uniform vec4 field;
|
|
68
68
|
uniform vec3 fieldColor;
|
|
69
69
|
uniform float fieldOpacity;
|
|
@@ -81,7 +81,7 @@ import*as q from"three";import*as K from"popmotion";var Q={666:function(P){var x
|
|
|
81
81
|
return(x - objPos.x)*cos(a) - (z - objPos.z)*sin(a) + objPos.x ;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
`.concat(
|
|
84
|
+
`.concat(i.fragmentShader,`
|
|
85
85
|
`).replace("#include <dithering_fragment>",`#include <dithering_fragment>
|
|
86
86
|
|
|
87
87
|
float worldDist = distance(field.y, vWorldPos.y);
|
|
@@ -125,23 +125,23 @@ import*as q from"three";import*as K from"popmotion";var Q={666:function(P){var x
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
`)},
|
|
128
|
+
`)},f.needsUpdate=!0},l.resetMaterial=function(){this.object.object3d.traverse(function(f){var t=f;t.material&&t.userData.materialO&&(t.material=t.userData.materialO.clone(),t.userData.materialO=void 0)})},l.play=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=this;this.stop();var i=F(!0),m=this,c=m.object,p=m.uniforms,d=P({},this.options,f),z=d.lineNum,w=d.step,C=d.lineWidth,y=d.pos,L=d.duration,D=c.getSize(),k=D.min,r=D.max,e=D.size,n=z,o=C;w>0&&(n=1,o=e.y/w);var a=p.sizeNum.value.y*(n>1?2:1);return this.tween=(0,V.animate)({from:0,to:1,duration:L,onPlay:function(){var v,h=new M.Vector3;y==="bottom"?h.set(k.x-.001,k.y-.001,k.z-.001):y==="top"&&h.set(r.x+.001,r.y+.001,r.z+.001);var x=((v=c.pencil.control)===null||v===void 0?void 0:v.getAzimuthalAngle())||0,W=t.object.object3d.position.clone();if(x){var N=Math.sqrt(Math.pow(e.x,2)+Math.pow(e.z,2))/2;h.x=W.x+N,h.z=W.z+N;var R=new M.Vector3().subVectors(h,W),T=new M.Vector3(0,1,0);R.applyAxisAngle(T,x),h.addVectors(W,R)}p.objPos.value.copy(W),p.field.value.set(h.x,h.y,h.z,0),p.angle.value=x,p.lineNum.value=n,p.lineWidth.value=o},onUpdate:function(v){w>0?p.field.value.w=Math.floor(v*w)/w*a:p.field.value.w=v*a},onStop:function(){p.field.value.w=0,i.reject("stop")},onComplete:function(){i.resolve()}}),i.promise},l.checkRepeat=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=this;return _(E().mark(function i(){var m,c,p,d,z,w;return E().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return m=P({},t.options,f),c=m.yoyo,p=m.repeat,d=m.pos,p===t.options.repeat&&t.initMaterial(),y.next=4,t.play(f);case 4:if(z=y.sent.err,!z){y.next=8;break}return t.resetMaterial(),y.abrupt("return");case 8:if(!p){y.next=15;break}return w=d,c&&(w=w==="bottom"?"top":"bottom"),y.next=13,t.checkRepeat({pos:w,repeat:p===1/0?-1:p-1});case 13:y.next=16;break;case 15:t.resetMaterial();case 16:case"end":return y.stop()}},i)}))()},l.start=function(){return this.checkRepeat()},l.stop=function(){this.tween&&this.tween.stop()},u}(),I=function(){"use strict";function u(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};g(this,u),this.object=s,this.options=P({},{color:16777215,lineWidth:2,opacity:.5,fade:!1,position:new M.Vector3(0,0,0),duration:5e3,repeat:0},f)}var l=u.prototype;return l.initMaterial=function(){var f=this,t=this.options.exclude,i={field:{value:new M.Vector4(0,0,0,1e-4)},color:{value:new M.Color(this.options.color)},opacity:{value:this.options.opacity},lineWidth:{value:this.options.lineWidth}};this.uniforms=i,this.object.object3d.traverse(function(m){var c=m;!c.material||t&&t.includes(c)||(c.userData.materialO?c.material=c.userData.materialO:c.userData.materialO=Array.isArray(c.material)?c.material.map(function(p){return p.clone()}):c.material.clone(),Array.isArray(c.material)?c.material.forEach(function(p){f.setMaterial(p)}):f.setMaterial(c.material))})},l.setMaterial=function(f){var t=this.uniforms;f.onBeforeCompile=function(i){i.uniforms.field=t.field,i.uniforms.fieldColor=t.color,i.uniforms.fieldOpacity=t.opacity,i.uniforms.lineWidth=t.lineWidth,i.vertexShader=`
|
|
129
129
|
varying vec4 vWorldPos;
|
|
130
|
-
`.concat(
|
|
130
|
+
`.concat(i.vertexShader,`
|
|
131
131
|
`).replace("#include <worldpos_vertex>",`#include <worldpos_vertex>
|
|
132
132
|
vWorldPos = vec4( transformed, 1.0 );
|
|
133
133
|
#ifdef USE_INSTANCING
|
|
134
134
|
vWorldPos = instanceMatrix * vWorldPos;
|
|
135
135
|
#endif
|
|
136
136
|
vWorldPos = modelMatrix * vWorldPos;
|
|
137
|
-
`),
|
|
137
|
+
`),i.fragmentShader=`
|
|
138
138
|
uniform vec4 field;
|
|
139
139
|
uniform vec3 fieldColor;
|
|
140
140
|
uniform float fieldOpacity;
|
|
141
141
|
uniform float lineWidth;
|
|
142
142
|
|
|
143
143
|
varying vec4 vWorldPos;
|
|
144
|
-
`.concat(
|
|
144
|
+
`.concat(i.fragmentShader,`
|
|
145
145
|
`).replace("#include <dithering_fragment>",`#include <dithering_fragment>
|
|
146
146
|
|
|
147
147
|
float worldDist = distance(field.xyz, vWorldPos.xyz);
|
|
@@ -157,4 +157,4 @@ import*as q from"three";import*as K from"popmotion";var Q={666:function(P){var x
|
|
|
157
157
|
}
|
|
158
158
|
gl_FragColor.rgb = mix(gl_FragColor.rgb, fieldColor, fadeout);
|
|
159
159
|
|
|
160
|
-
`)},
|
|
160
|
+
`)},f.needsUpdate=!0},l.resetMaterial=function(){this.object.object3d.traverse(function(f){var t=f;t.material&&t.userData.materialO&&(t.material=t.userData.materialO.clone(),t.userData.materialO=void 0)})},l.play=function(){var f=this;this.stop();var t=F(!0),i=this,m=i.object,c=i.uniforms,p=this.options,d=p.position,z=p.duration,w=this.options.radius;if(!w){var C=m.getSize().size;w=Math.max(C.x,C.y,C.z)}return this.tween=(0,V.animate)({from:1e-4,to:1,duration:z,onPlay:function(){c.field.value.set(d.x,d.y,d.z,1e-4),f.options.fade&&(c.opacity.value=f.options.opacity)},onUpdate:function(y){c.field.value.w=y*w,f.options.fade&&(c.opacity.value=(1-y)*f.options.opacity)},onStop:function(){c.field.value.w=0,t.reject("stop")},onComplete:function(){t.resolve()}}),t.promise},l.checkRepeat=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=this;return _(E().mark(function i(){var m,c;return E().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return m=P({},t.options,f).repeat,m===t.options.repeat&&t.initMaterial(),d.next=4,t.play();case 4:if(c=d.sent.err,!c){d.next=8;break}return t.resetMaterial(),d.abrupt("return");case 8:if(!m){d.next=13;break}return d.next=11,t.checkRepeat({repeat:m===1/0?-1:m-1});case 11:d.next=14;break;case 13:t.resetMaterial();case 14:case"end":return d.stop()}},i)}))()},l.start=function(){return this.checkRepeat()},l.stop=function(){this.tween&&this.tween.stop()},u}()})();var Z=$.h,ee=$.W;export{Z as Scan,ee as Scan2};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){var xe={187:function(R){"use strict";var j=typeof Reflect=="object"?Reflect:null,_=j&&typeof j.apply=="function"?j.apply:function(o,l,d){return Function.prototype.apply.call(o,l,d)},T;j&&typeof j.ownKeys=="function"?T=j.ownKeys:Object.getOwnPropertySymbols?T=function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:T=function(o){return Object.getOwnPropertyNames(o)};function A(a){console&&console.warn&&console.warn(a)}var L=Number.isNaN||function(o){return o!==o};function h(){h.init.call(this)}R.exports=h,R.exports.once=K,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var G=10;function k(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return G},set:function(a){if(typeof a!="number"||a<0||L(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");G=a}}),h.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},h.prototype.setMaxListeners=function(o){if(typeof o!="number"||o<0||L(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this};function B(a){return a._maxListeners===void 0?h.defaultMaxListeners:a._maxListeners}h.prototype.getMaxListeners=function(){return B(this)},h.prototype.emit=function(o){for(var l=[],d=1;d<arguments.length;d++)l.push(arguments[d]);var m=o==="error",E=this._events;if(E!==void 0)m=m&&E.error===void 0;else if(!m)return!1;if(m){var w;if(l.length>0&&(w=l[0]),w instanceof Error)throw w;var q=new Error("Unhandled error."+(w?" ("+w.message+")":""));throw q.context=w,q}var oe=E[o];if(oe===void 0)return!1;if(typeof oe=="function")_(oe,this,l);else for(var F=oe.length,X=ie(oe,F),d=0;d<F;++d)_(X[d],this,l);return!0};function P(a,o,l,d){var m,E,w;if(k(l),E=a._events,E===void 0?(E=a._events=Object.create(null),a._eventsCount=0):(E.newListener!==void 0&&(a.emit("newListener",o,l.listener?l.listener:l),E=a._events),w=E[o]),w===void 0)w=E[o]=l,++a._eventsCount;else if(typeof w=="function"?w=E[o]=d?[l,w]:[w,l]:d?w.unshift(l):w.push(l),m=B(a),m>0&&w.length>m&&!w.warned){w.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+w.length+" "+String(o)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=a,q.type=o,q.count=w.length,A(q)}return a}h.prototype.addListener=function(o,l){return P(this,o,l,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(o,l){return P(this,o,l,!0)};function V(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(a,o,l){var d={fired:!1,wrapFn:void 0,target:a,type:o,listener:l},m=V.bind(d);return m.listener=l,d.wrapFn=m,m}h.prototype.once=function(o,l){return k(l),this.on(o,b(this,o,l)),this},h.prototype.prependOnceListener=function(o,l){return k(l),this.prependListener(o,b(this,o,l)),this},h.prototype.removeListener=function(o,l){var d,m,E,w,q;if(k(l),m=this._events,m===void 0)return this;if(d=m[o],d===void 0)return this;if(d===l||d.listener===l)--this._eventsCount===0?this._events=Object.create(null):(delete m[o],m.removeListener&&this.emit("removeListener",o,d.listener||l));else if(typeof d!="function"){for(E=-1,w=d.length-1;w>=0;w--)if(d[w]===l||d[w].listener===l){q=d[w].listener,E=w;break}if(E<0)return this;E===0?d.shift():re(d,E),d.length===1&&(m[o]=d[0]),m.removeListener!==void 0&&this.emit("removeListener",o,q||l)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(o){var l,d,m;if(d=this._events,d===void 0)return this;if(d.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):d[o]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete d[o]),this;if(arguments.length===0){var E=Object.keys(d),w;for(m=0;m<E.length;++m)w=E[m],w!=="removeListener"&&this.removeAllListeners(w);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(l=d[o],typeof l=="function")this.removeListener(o,l);else if(l!==void 0)for(m=l.length-1;m>=0;m--)this.removeListener(o,l[m]);return this};function W(a,o,l){var d=a._events;if(d===void 0)return[];var m=d[o];return m===void 0?[]:typeof m=="function"?l?[m.listener||m]:[m]:l?U(m):ie(m,m.length)}h.prototype.listeners=function(o){return W(this,o,!0)},h.prototype.rawListeners=function(o){return W(this,o,!1)},h.listenerCount=function(a,o){return typeof a.listenerCount=="function"?a.listenerCount(o):ee.call(a,o)},h.prototype.listenerCount=ee;function ee(a){var o=this._events;if(o!==void 0){var l=o[a];if(typeof l=="function")return 1;if(l!==void 0)return l.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?T(this._events):[]};function ie(a,o){for(var l=new Array(o),d=0;d<o;++d)l[d]=a[d];return l}function re(a,o){for(;o+1<a.length;o++)a[o]=a[o+1];a.pop()}function U(a){for(var o=new Array(a.length),l=0;l<o.length;++l)o[l]=a[l].listener||a[l];return o}function K(a,o){return new Promise(function(l,d){function m(w){a.removeListener(o,E),d(w)}function E(){typeof a.removeListener=="function"&&a.removeListener("error",m),l([].slice.call(arguments))}x(a,o,E,{once:!0}),o!=="error"&&$(a,m,{once:!0})})}function $(a,o,l){typeof a.on=="function"&&x(a,"error",o,l)}function x(a,o,l,d){if(typeof a.on=="function")d.once?a.once(o,l):a.on(o,l);else if(typeof a.addEventListener=="function")a.addEventListener(o,function m(E){d.once&&a.removeEventListener(o,m),l(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}},666:function(R){var j=function(_){"use strict";var T=Object.prototype,A=T.hasOwnProperty,L,h=typeof Symbol=="function"?Symbol:{},G=h.iterator||"@@iterator",k=h.asyncIterator||"@@asyncIterator",B=h.toStringTag||"@@toStringTag";function P(f,s,v){return Object.defineProperty(f,s,{value:v,enumerable:!0,configurable:!0,writable:!0}),f[s]}try{P({},"")}catch(f){P=function(s,v,O){return s[v]=O}}function V(f,s,v,O){var C=s&&s.prototype instanceof K?s:K,J=Object.create(C.prototype),ae=new X(O||[]);return J._invoke=w(f,v,ae),J}_.wrap=V;function b(f,s,v){try{return{type:"normal",arg:f.call(s,v)}}catch(O){return{type:"throw",arg:O}}}var W="suspendedStart",ee="suspendedYield",ie="executing",re="completed",U={};function K(){}function $(){}function x(){}var a={};P(a,G,function(){return this});var o=Object.getPrototypeOf,l=o&&o(o(ne([])));l&&l!==T&&A.call(l,G)&&(a=l);var d=x.prototype=K.prototype=Object.create(a);$.prototype=x,P(d,"constructor",x),P(x,"constructor",$),$.displayName=P(x,B,"GeneratorFunction");function m(f){["next","throw","return"].forEach(function(s){P(f,s,function(v){return this._invoke(s,v)})})}_.isGeneratorFunction=function(f){var s=typeof f=="function"&&f.constructor;return s?s===$||(s.displayName||s.name)==="GeneratorFunction":!1},_.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,x):(f.__proto__=x,P(f,B,"GeneratorFunction")),f.prototype=Object.create(d),f},_.awrap=function(f){return{__await:f}};function E(f,s){function v(J,ae,Y,ue){var se=b(f[J],f,ae);if(se.type==="throw")ue(se.arg);else{var me=se.arg,pe=me.value;return pe&&typeof pe=="object"&&A.call(pe,"__await")?s.resolve(pe.__await).then(function(ce){v("next",ce,Y,ue)},function(ce){v("throw",ce,Y,ue)}):s.resolve(pe).then(function(ce){me.value=ce,Y(me)},function(ce){return v("throw",ce,Y,ue)})}}var O;function C(J,ae){function Y(){return new s(function(ue,se){v(J,ae,ue,se)})}return O=O?O.then(Y,Y):Y()}this._invoke=C}m(E.prototype),P(E.prototype,k,function(){return this}),_.AsyncIterator=E,_.async=function(f,s,v,O,C){C===void 0&&(C=Promise);var J=new E(V(f,s,v,O),C);return _.isGeneratorFunction(s)?J:J.next().then(function(ae){return ae.done?ae.value:J.next()})};function w(f,s,v){var O=W;return function(J,ae){if(O===ie)throw new Error("Generator is already running");if(O===re){if(J==="throw")throw ae;return le()}for(v.method=J,v.arg=ae;;){var Y=v.delegate;if(Y){var ue=q(Y,v);if(ue){if(ue===U)continue;return ue}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(O===W)throw O=re,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);O=ie;var se=b(f,s,v);if(se.type==="normal"){if(O=v.done?re:ee,se.arg===U)continue;return{value:se.arg,done:v.done}}else se.type==="throw"&&(O=re,v.method="throw",v.arg=se.arg)}}}function q(f,s){var v=f.iterator[s.method];if(v===L){if(s.delegate=null,s.method==="throw"){if(f.iterator.return&&(s.method="return",s.arg=L,q(f,s),s.method==="throw"))return U;s.method="throw",s.arg=new TypeError("The iterator does not provide a 'throw' method")}return U}var O=b(v,f.iterator,s.arg);if(O.type==="throw")return s.method="throw",s.arg=O.arg,s.delegate=null,U;var C=O.arg;if(!C)return s.method="throw",s.arg=new TypeError("iterator result is not an object"),s.delegate=null,U;if(C.done)s[f.resultName]=C.value,s.next=f.nextLoc,s.method!=="return"&&(s.method="next",s.arg=L);else return C;return s.delegate=null,U}m(d),P(d,B,"Generator"),P(d,G,function(){return this}),P(d,"toString",function(){return"[object Generator]"});function oe(f){var s={tryLoc:f[0]};1 in f&&(s.catchLoc=f[1]),2 in f&&(s.finallyLoc=f[2],s.afterLoc=f[3]),this.tryEntries.push(s)}function F(f){var s=f.completion||{};s.type="normal",delete s.arg,f.completion=s}function X(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(oe,this),this.reset(!0)}_.keys=function(f){var s=[];for(var v in f)s.push(v);return s.reverse(),function O(){for(;s.length;){var C=s.pop();if(C in f)return O.value=C,O.done=!1,O}return O.done=!0,O}};function ne(f){if(f){var s=f[G];if(s)return s.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var v=-1,O=function C(){for(;++v<f.length;)if(A.call(f,v))return C.value=f[v],C.done=!1,C;return C.value=L,C.done=!0,C};return O.next=O}}return{next:le}}_.values=ne;function le(){return{value:L,done:!0}}return X.prototype={constructor:X,reset:function(f){if(this.prev=0,this.next=0,this.sent=this._sent=L,this.done=!1,this.delegate=null,this.method="next",this.arg=L,this.tryEntries.forEach(F),!f)for(var s in this)s.charAt(0)==="t"&&A.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=L)},stop:function(){this.done=!0;var f=this.tryEntries[0],s=f.completion;if(s.type==="throw")throw s.arg;return this.rval},dispatchException:function(f){if(this.done)throw f;var s=this;function v(ue,se){return J.type="throw",J.arg=f,s.next=ue,se&&(s.method="next",s.arg=L),!!se}for(var O=this.tryEntries.length-1;O>=0;--O){var C=this.tryEntries[O],J=C.completion;if(C.tryLoc==="root")return v("end");if(C.tryLoc<=this.prev){var ae=A.call(C,"catchLoc"),Y=A.call(C,"finallyLoc");if(ae&&Y){if(this.prev<C.catchLoc)return v(C.catchLoc,!0);if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else if(ae){if(this.prev<C.catchLoc)return v(C.catchLoc,!0)}else if(Y){if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(f,s){for(var v=this.tryEntries.length-1;v>=0;--v){var O=this.tryEntries[v];if(O.tryLoc<=this.prev&&A.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var C=O;break}}C&&(f==="break"||f==="continue")&&C.tryLoc<=s&&s<=C.finallyLoc&&(C=null);var J=C?C.completion:{};return J.type=f,J.arg=s,C?(this.method="next",this.next=C.finallyLoc,U):this.complete(J)},complete:function(f,s){if(f.type==="throw")throw f.arg;return f.type==="break"||f.type==="continue"?this.next=f.arg:f.type==="return"?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):f.type==="normal"&&s&&(this.next=s),U},finish:function(f){for(var s=this.tryEntries.length-1;s>=0;--s){var v=this.tryEntries[s];if(v.finallyLoc===f)return this.complete(v.completion,v.afterLoc),F(v),U}},catch:function(f){for(var s=this.tryEntries.length-1;s>=0;--s){var v=this.tryEntries[s];if(v.tryLoc===f){var O=v.completion;if(O.type==="throw"){var C=O.arg;F(v)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(f,s,v){return this.delegate={iterator:ne(f),resultName:s,nextLoc:v},this.method==="next"&&(this.arg=L),U}},_}(R.exports);try{regeneratorRuntime=j}catch(_){typeof globalThis=="object"?globalThis.regeneratorRuntime=j:Function("r","regeneratorRuntime = r")(j)}},695:function(R,j,_){"use strict";_.d(j,{Z:function(){return T}});function T(A){if(A.geometry&&A.geometry.dispose(),A.material){var L=Array.isArray(A.material)?A.material:[A.material];L.forEach(function(h){var G,k,B,P,V,b,W,ee,ie,re,U,K,$;(G=h.map)===null||G===void 0||G.dispose(),(k=h.lightMap)===null||k===void 0||k.dispose(),(B=h.bumpMap)===null||B===void 0||B.dispose(),(P=h.normalMap)===null||P===void 0||P.dispose(),(V=h.specularMap)===null||V===void 0||V.dispose(),(b=h.envMap)===null||b===void 0||b.dispose(),(W=h.alphaMap)===null||W===void 0||W.dispose(),(ee=h.aoMap)===null||ee===void 0||ee.dispose(),(ie=h.displacementMap)===null||ie===void 0||ie.dispose(),(re=h.emissiveMap)===null||re===void 0||re.dispose(),(U=h.gradientMap)===null||U===void 0||U.dispose(),(K=h.metalnessMap)===null||K===void 0||K.dispose(),($=h.roughnessMap)===null||$===void 0||$.dispose(),h.dispose()})}}},584:function(R,j,_){"use strict";_.d(j,{disposeMesh:function(){return h.Z},isPlainObject:function(){return B.Z}});var T=_(666),A=_.n(T),L=null,h=_(695),G=_(644);function k(K){if(K.material){var $=Array.isArray(K.material)?K.material:[K.material];$.forEach(function(x){var a,o;(a=x.color)===null||a===void 0||a.convertSRGBToLinear(),(o=x.emissive)===null||o===void 0||o.convertSRGBToLinear(),x.map&&(x.map.encoding=THREE.sRGBEncoding),x.emissiveMap&&(x.emissiveMap.encoding=THREE.sRGBEncoding)})}}var B=_(738),P=_(568),V=_(924),b=_(360),W=_(484),ee=null,ie=null,re=function(){var K=(0,P.Z)(A().mark(function $(x,a){var o,l,d,m,E,w,q,oe,F;return A().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return o=a.type,l=o===void 0?"blob":o,d=a.version,m=d===void 0?"1":d,ne.next=4,(0,b.get)(x);case 4:if(w=ne.sent,!(w&&w[m])){ne.next=9;break}E=w[m],ne.next=15;break;case 9:return ne.next=11,(0,W.Z)(fetch(x).then(function(le){if(le.ok)return le[l]();throw new Error}));case 11:q=ne.sent,oe=q.res,F=q.err,F||(E=oe,(0,b.set)(x,(0,V.Z)({},m,oe)));case 15:return ne.abrupt("return",E?{url:l==="json"?x:URL.createObjectURL(E),store:E}:{url:x});case 16:case"end":return ne.stop()}},$)}));return function(x,a){return K.apply(this,arguments)}}(),U=_(705)},738:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});function T(L){return Object.prototype.toString.call(L)==="[object Object]"}function A(L){if(T(L)===!1)return!1;var h=L.constructor;if(h===void 0)return!0;var G=h.prototype;return!(T(G)===!1||G.hasOwnProperty("isPrototypeOf")===!1)}},484:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});var T=_(42);function A(L){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return L.then(function(G){return(0,T.Z)({err:null,res:G},h)}).catch(function(G){return(0,T.Z)({err:G,res:void 0},h)})}},705:function(R,j,_){"use strict";var T=_(644),A=_.n(T),L=new Map,h=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(B,P,V,b,W){var ee=P[V*3],ie=P[V*3+1],re=P[b*3],U=P[b*3+1],K=P[W*3],$=P[W*3+1],x;if(L.has(B))x=L.get(B);else{var a=k.box3||new THREE.Box3;if(!k.box3){var o=B.parameters.shapes.getPoints();a.setFromArray(o.map(function(w){return[w.x,w.y,0]}).flat())}var l=a.getSize(new THREE.Vector3);k.split&&(l.y/=k.split),x={box:a,size:l},L.set(B,x)}var d=x.box,m=x.size,E=k.split?1-k.split:0;return[new THREE.Vector2((ee-d.min.x)/m.x,(ie-d.min.y)/m.y+E),new THREE.Vector2((re-d.min.x)/m.x,(U-d.min.y)/m.y+E),new THREE.Vector2((K-d.min.x)/m.x,($-d.min.y)/m.y+E)]},generateSideWallUV:function(B,P,V,b,W,ee){var ie=P[V*3],re=P[V*3+1],U=P[V*3+2],K=P[b*3],$=P[b*3+1],x=P[b*3+2],a=P[W*3],o=P[W*3+1],l=P[W*3+2],d=P[ee*3],m=P[ee*3+1],E=P[ee*3+2],w;if(L.has(P))w=L.get(P);else{var q=new THREE.Box3;q.setFromArray(P);var oe=q.getSize(new THREE.Vector3);k.split&&(oe.z/=1-k.split),w={box:q,size:oe},L.set(P,w)}var F=w.box,X=w.size;return Math.abs(re-$)<Math.abs(ie-K)?[new THREE.Vector2((ie-F.min.x)/X.x,(U-F.min.z)/X.z),new THREE.Vector2((K-F.min.x)/X.x,(x-F.min.z)/X.z),new THREE.Vector2((a-F.min.x)/X.x,(l-F.min.z)/X.z),new THREE.Vector2((d-F.min.x)/X.x,(E-F.min.z)/X.z)]:[new THREE.Vector2((re-F.min.y)/X.y,(U-F.min.z)/X.z),new THREE.Vector2(($-F.min.y)/X.y,(x-F.min.z)/X.z),new THREE.Vector2((o-F.min.y)/X.y,(l-F.min.z)/X.z),new THREE.Vector2((m-F.min.y)/X.y,(E-F.min.z)/X.z)]}}},G=function(){L.clear()}},360:function(R){"use strict";R.exports=require("idb-keyval")},644:function(R){"use strict";R.exports=require("three")},568:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});function T(L,h,G,k,B,P,V){try{var b=L[P](V),W=b.value}catch(ee){G(ee);return}b.done?h(W):Promise.resolve(W).then(k,B)}function A(L){return function(){var h=this,G=arguments;return new Promise(function(k,B){var P=L.apply(h,G);function V(W){T(P,k,B,V,b,"next",W)}function b(W){T(P,k,B,V,b,"throw",W)}V(void 0)})}}},924:function(R,j,_){"use strict";_.d(j,{Z:function(){return T}});function T(A,L,h){return L in A?Object.defineProperty(A,L,{value:h,enumerable:!0,configurable:!0,writable:!0}):A[L]=h,A}},42:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});var T=_(924);function A(L){for(var h=1;h<arguments.length;h++){var G=arguments[h]!=null?arguments[h]:{},k=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(k=k.concat(Object.getOwnPropertySymbols(G).filter(function(B){return Object.getOwnPropertyDescriptor(G,B).enumerable}))),k.forEach(function(B){(0,T.Z)(L,B,G[B])})}return L}}},we={};function te(R){var j=we[R];if(j!==void 0)return j.exports;var _=we[R]={exports:{}};return xe[R](_,_.exports,te),_.exports}(function(){te.n=function(R){var j=R&&R.__esModule?function(){return R.default}:function(){return R};return te.d(j,{a:j}),j}})(),function(){te.d=function(R,j){for(var _ in j)te.o(j,_)&&!te.o(R,_)&&Object.defineProperty(R,_,{enumerable:!0,get:j[_]})}}(),function(){te.o=function(R,j){return Object.prototype.hasOwnProperty.call(R,j)}}(),function(){te.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})}}();var ye={};(function(){"use strict";te.r(ye),te.d(ye,{BaseObject:function(){return Me},GUIObject:function(){return x},Pencil:function(){return be},default:function(){return be}});function R(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function j(u,i){for(var t=0;t<i.length;t++){var e=i[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(u,e.key,e)}}function _(u,i,t){return i&&j(u.prototype,i),t&&j(u,t),u}var T=te(42);function A(u,i){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(u);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable})),t.push.apply(t,e)}return t}function L(u,i){return i=i!=null?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach(function(t){Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(i,t))}),u}function h(u,i){(i==null||i>u.length)&&(i=u.length);for(var t=0,e=new Array(i);t<i;t++)e[t]=u[t];return e}function G(u){if(Array.isArray(u))return h(u)}function k(u){if(typeof Symbol!="undefined"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)}function B(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(u,i){if(!!u){if(typeof u=="string")return h(u,i);var t=Object.prototype.toString.call(u).slice(8,-1);if(t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return h(u,i)}}function V(u){return G(u)||k(u)||P(u)||B()}var b=te(644),W=te(187),ee=require("deepmerge"),ie=te.n(ee),re=require("three/examples/jsm/libs/stats.module"),U=te.n(re),K=require("lil-gui"),$=te.n(K),x=function(){"use strict";function u(t){R(this,u),this.guiParams={},t&&(this.guiParams=t)}var i=u.prototype;return i.showGui=function(e){var r=this;!e||Object.keys(this.guiParams).forEach(function(n){var c=e.addFolder(n),p=r.guiParams[n];Object.keys(p).forEach(function(y){var g=p[y],N=g.min,z=g.max,D=g.step,S=g.name,M=g.paramMap,H=g.items,Q=g.value,Z=g.target,fe=y.toLowerCase().indexOf("color")>-1,I,de=typeof Q=="undefined"&&Z,he=de?Z():p[y],ve=de?y:"value";H?I=c.add(he,ve,H):fe?I=c.addColor(he,ve):I=c.add(he,ve),I=I.name(S||y),typeof N!="undefined"&&(I=I.min(N)),typeof z!="undefined"&&(I=I.max(z)),typeof D!="undefined"&&(I=I.step(D)),I=I.onChange(function(){r.setTargetValue(n,y,he[ve],M)}),de&&I.listen()})})},i.setTargetValue=function(e,r,n,c){var p=this.guiParams[e][r],y=p.onChange,g=p.target,N=p.value,z=r.toLowerCase().indexOf("color")>-1,D=typeof N=="undefined"&&g;if(g&&!D){var S=g();Array.isArray(S)||(S=[S]),S.forEach(function(M){if(!!M)if(z)try{M[c||r].set(n)}catch(H){r!=="color"&&!c&&console.warn("".concat(r," is not a color,set paramMap"))}else M[c||r]=n})}y&&y(n)},i.setTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(r){Object.keys(e.guiParams[r]).forEach(function(n){var c=e.guiParams[r][n];typeof c.value!="undefined"&&e.setTargetValue(r,n,c.value,c.paramMap)})})},u}(),a={None:b.NoToneMapping,Linear:b.LinearToneMapping,Reinhard:b.ReinhardToneMapping,Cineon:b.CineonToneMapping,ACESFilmic:b.ACESFilmicToneMapping},o={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:b.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1,context:null,stencil:!1,depth:!1,physicallyCorrectLights:!1},l=function(){"use strict";function u(t){R(this,u),this.options=t;var e=t.width,r=t.height,n=t.rendererParams,c=n.context,p=n.alpha,y=n.devicePixelRatio,g=n.antialias,N=n.powerPreference,z=n.toneMapping,D=n.toneMappingExposure,S=n.outputEncoding,M=n.logarithmicDepthBuffer,H=n.preserveDrawingBuffer,Q=n.stencil,Z=n.depth,fe=n.physicallyCorrectLights,I=new b.WebGLRenderer({context:c,alpha:p,antialias:g,powerPreference:N,logarithmicDepthBuffer:M,preserveDrawingBuffer:H,stencil:Q,depth:Z});I.setSize(e,r),I.setPixelRatio(y),I.toneMapping=a[z],I.toneMappingExposure=D,I.outputEncoding=S,I.physicallyCorrectLights=fe,this.renderer=I}var i=u.prototype;return i.setSize=function(e,r){this.renderer.setSize(e,r)},i.render=function(){var e=this.options,r=e.scene,n=e.camera;this.renderer.render(r,n)},i.setGui=function(e){var r=this,n=new x({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:a,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}});n.showGui(e)},i.dispose=function(){var e,r,n;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(n=this.renderer)===null||n===void 0||n.renderLists.dispose()},u}(),d={fov:45,near:1,far:1e3},m=function(){"use strict";function u(t){R(this,u),this.oldCameraPosition=new b.Vector3,this.oldCameraRotation=new b.Euler,this.customCamera=!1,this.options=t;var e=t.width,r=t.height,n=t.cameraParams;if(n instanceof b.Camera)this.camera=n,this.customCamera=!0;else{var c=n.fov,p=n.far,y=n.near,g=new b.PerspectiveCamera(c,e/r,y,p);g.position.set(0,0,400),g.lookAt(0,0,0),this.camera=g}}var i=u.prototype;return i.checkCameraChange=function(){var e=this.camera,r=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!r},i.setSize=function(e,r){this.camera instanceof b.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},i.setGui=function(e){var r=this,n=new x({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}}}});this.camera instanceof b.PerspectiveCamera&&(n.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}}),n.showGui(e)},u}(),E=te(584),w={background:null},q=function(){"use strict";function u(t){R(this,u),this.options=t;var e=t.camera,r=t.sceneParams,n=r.background,c=new b.Scene;n&&(c.background=n),c.add(e),this.scene=c}var i=u.prototype;return i.addAxesHelper=function(){var e,r=new b.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},i.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,E.disposeMesh)(r)})},u}(),oe=require("three/examples/jsm/controls/OrbitControls"),F={},X=function(){"use strict";function u(t){R(this,u),this.options=t;var e=t.camera,r=t.controlParams,n=t.mapControl,c=r.domElement,p=n?new oe.MapControls(e,c):new oe.OrbitControls(e,c);p.minPolarAngle=Math.PI*.15,p.maxPolarAngle=Math.PI*.85,p.enableDamping=!0,p.dampingFactor=.063,p.autoRotate=!1,p.autoRotateSpeed=-60,p.enableZoom=!0,p.zoomSpeed=.2,this.control=p}var i=u.prototype;return i.limitPan=function(e){var r=e.maxX,n=r===void 0?1/0:r,c=e.minX,p=c===void 0?-1/0:c,y=e.maxZ,g=y===void 0?1/0:y,N=e.minZ,z=N===void 0?-1/0:N,D=e.maxY,S=D===void 0?1/0:D,M=e.minY,H=M===void 0?-1/0:M,Q=this.limitPanV||new b.Vector3,Z=this.control,fe=this.options.camera,I=new b.Vector3(p,H,z),de=new b.Vector3(n,S,g);this.limitPanV=Q,Q.copy(Z.target),Z.target.clamp(I,de),Q.sub(Z.target),fe.position.sub(Q)},i.update=function(){this.control.update()},i.dispose=function(){this.control.dispose()},u}(),ne=require("three/examples/jsm/renderers/CSS3DRenderer"),le=new b.Vector3,f=new b.Matrix4,s=new b.Matrix4,v=new b.Vector3,O=new b.Vector3,C=function u(){"use strict";var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};R(this,u);var t=function(M,H){return v.setFromMatrixPosition(M.matrixWorld),O.setFromMatrixPosition(H.matrixWorld),v.distanceToSquared(O)},e=function(M){var H=[];return M.traverse(function(Q){Q.isCSS2DObject&&H.push(Q)}),H},r=function(M){for(var H=e(M).sort(function(de,he){if(de.renderOrder!==he.renderOrder)return he.renderOrder-de.renderOrder;var ve=N.objects.get(de).distanceToCameraSquared,ze=N.objects.get(he).distanceToCameraSquared;return ve-ze}),Q=H.length,Z=0,fe=H.length;Z<fe;Z++){var I=H[Z].userData.zIndexFix||0;H[Z].element.style.zIndex=Q-Z+I}},n=this,c,p,y,g,N={objects:new WeakMap},z=i.element!==void 0?i.element:document.createElement("div");z.style.overflow="hidden",this.domElement=z,this.getSize=function(){return{width:c,height:p}},this.render=function(S,M){+b.REVISION<144?(S.autoUpdate===!0&&S.updateMatrixWorld(),M.parent===null&&M.updateMatrixWorld()):(S.matrixWorldAutoUpdate===!0&&S.updateMatrixWorld(),M.parent===null&&M.matrixWorldAutoUpdate===!0&&M.updateMatrixWorld()),f.copy(M.matrixWorldInverse),s.multiplyMatrices(M.projectionMatrix,f),D(S,S,M),r(S)},this.setSize=function(S,M){c=S,p=M,y=c/2,g=p/2,z.style.width="".concat(S,"px"),z.style.height="".concat(M,"px")};function D(S,M,H){if(S.isCSS2DObject){le.setFromMatrixPosition(S.matrixWorld),le.applyMatrix4(s);var Q=S.visible===!0&&le.z>=-1&&le.z<=1&&S.layers.test(H.layers)===!0;if(S.element.style.display=Q===!0?"":"none",Q===!0){S.onBeforeRender(n,M,H);var Z=S.element;Z.style.transform="translate(-50%,-50%) translate(".concat(le.x*y+y,"px,").concat(-le.y*g+g,"px)"),Z.parentNode!==z&&z.appendChild(Z),S.onAfterRender(n,M,H)}var fe={distanceToCameraSquared:t(H,S)};N.objects.set(S,fe)}for(var I=0,de=S.children.length;I<de;I++)D(S.children[I],M,H)}},J={zIndex:"auto"},ae=function(){"use strict";function u(t){R(this,u),this.container=t}var i=u.prototype;return i.addRenderer=function(e,r){var n=this.container,c=n.offsetWidth,p=n.offsetHeight,y=e==="css2d"?new C:new ne.CSS3DRenderer;y.domElement.style.position="absolute",y.domElement.style.top="0",y.domElement.style.pointerEvents="none",y.domElement.style.zIndex=r.zIndex,y.setSize(c,p),n.appendChild(y.domElement),e==="css2d"?this.css2Drenderer=y:e==="css3d"&&(this.css3Drenderer=y)},i.setSize=function(e,r){var n,c;(n=this.css2Drenderer)===null||n===void 0||n.setSize(e,r),(c=this.css3Drenderer)===null||c===void 0||c.setSize(e,r)},i.render=function(e,r){var n,c;(n=this.css2Drenderer)===null||n===void 0||n.render(e,r),(c=this.css3Drenderer)===null||c===void 0||c.render(e,r)},i.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},u}(),Y=require("postprocessing"),ue={luminanceThreshold:.1,luminanceSmoothing:.3,mipmapBlur:!0,intensity:4},se=function(){"use strict";function u(t){R(this,u),this.active=!0,this.options=t;var e=t.renderer,r=t.scene,n=t.camera,c=t.composerParams,p=c.multisampling,y=e.capabilities.maxSamples,g=new Y.EffectComposer(e,{multisampling:Math.min(p,y)});g.addPass(new Y.RenderPass(r,n)),this.finalComposer=g,this.renderer=e,this.scene=r,this.camera=n}var i=u.prototype;return i.addCopyPass=function(){var e=new Y.CopyPass;this.finalComposer.addPass(e),this.copyPass=e},i.addFXAAPass=function(){var e=this.camera,r=new Y.FXAAEffect({blendFunction:Y.BlendFunction.NORMAL}),n=new Y.EffectPass(e,r);this.finalComposer.addPass(n),this.fxaaPass=n},i.addBloomPass=function(e){var r=this,n=r.camera,c=r.scene,p=new Y.SelectiveBloomEffect(c,n,(0,T.Z)({},e));p.inverted=!0;var y=new Y.EffectPass(n,p);this.finalComposer.addPass(y),this.bloomPass=y,this.bloomEffect=p},i.addBloomGui=function(e){var r=this,n=new x({bloom:{intensity:{min:0,max:10,step:.01,target:function(){return r.bloomEffect}}},bloomLuminanceFilter:{enabled:{value:this.bloomEffect.luminancePass.enabled,onChange:function(c){r.bloomEffect.luminancePass.enabled=c}},threshold:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}},smoothing:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}}}});n.showGui(e)},i.toggleBloomSelection=function(e){this.bloomEffect.selection.toggle(e)},i.getSize=function(){var e=this.options.renderer;return e.getSize(new b.Vector2)},i.enable=function(){this.active||(this.active=!0)},i.disable=function(){!this.active||(this.active=!1)},i.checkCopyPass=function(){var e=this.finalComposer.passes.some(function(r){return r instanceof Y.RenderPass||r instanceof Y.CopyPass?!1:r.enabled});e&&this.copyPass?this.copyPass.enabled=!1:!e&&this.copyPass?this.copyPass.enabled=!0:!e&&!this.copyPass&&this.addCopyPass()},i.setSize=function(e,r){this.finalComposer.setSize(e,r)},i.render=function(){!this.active||this.finalComposer.render()},i.dispose=function(){this.finalComposer.dispose()},u}(),me=function(){try{var u=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&u.getContext("webgl2"))}catch(i){return!1}},pe=0,ce=!1,Pe=me()!==!1,be=function(){"use strict";function u(t){R(this,u),this.raycaster=new b.Raycaster,this.installPlugins=new Map,this.event=new W.EventEmitter,this.clock=new b.Clock,this.options=ie()(u.options,t,{isMergeableObject:E.isPlainObject});var e=this.options,r=e.container,n=e.stats,c=e.gui,p=e.resizeObserver;if(c){var y=new($());y.open(!1),this.gui=y}if(n){var g=new(U());g.showPanel(0),g.dom.style.position="absolute",r.appendChild(g.dom),this.stats=g}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),p&&this.initResizeObserver(),this.clock.getDelta(),this.clock.getElapsedTime()}var i=u.prototype;return i.use=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),c=1;c<r;c++)n[c-1]=arguments[c];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var p;(p=e).install.apply(p,[this].concat(V(n))),this.installPlugins.set(e,!0)}},i.init=function(){var e=this.options,r=e.container,n=e.isdev,c=e.axesHelper,p=e.renderer,y=e.scene,g=e.camera,N=this.getSize(),z=N.width,D=N.height,S=new m({isdev:n,width:z,height:D,cameraParams:g});this.gui&&S.setGui(this.gui);var M=S.camera,H=new q({camera:M,sceneParams:y}),Q=H.scene,Z=new l({width:z,height:D,scene:Q,camera:M,isdev:n,rendererParams:L((0,T.Z)({},p),{antialias:!1})});this.gui&&Z.setGui(this.gui);var fe=Z.renderer;c&&H.addAxesHelper(),this.sceneController=H,this.rendererController=Z,this.cameraController=S,r.appendChild(fe.domElement)},i.initComposer=function(){var e=this.options,r=e.bloom,n=e.bloomParams,c=e.renderer,p=e.multisampling,y=c.antialias;y==="msaa"&&!Pe&&(y=!1,console.warn("MSAA is not supported on this browser"));var g=new se({renderer:this.renderer,scene:this.scene,camera:this.camera,composerParams:{multisampling:y==="msaa"?p:0,type:b.UnsignedByteType,encoding:c.outputEncoding}});this.composerController=g,r&&(g.addBloomPass(n),this.gui&&g.addBloomGui(this.gui)),y==="fxaa"&&g.addFXAAPass(),g.checkCopyPass(),this.event.on("passcheck",function(){g.checkCopyPass()})},i.initCSSRenderer=function(){var e=this.options,r=e.container,n=e.css2DRenderer,c=e.css3DRenderer,p=e.css2DRendererParams,y=e.css3DRendererParams;if(n||c){var g=new ae(r);n&&g.addRenderer("css2d",p),c&&g.addRenderer("css3d",y),this.cssRendererController=g}},i.initControl=function(){var e=this.options,r=e.control,n=e.mapControl,c=e.controlParams;if(r){var p=new X({camera:this.camera,controlParams:{domElement:(c==null?void 0:c.domElement)||this.renderer.domElement},mapControl:n});this.controlController=p}},i.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},i.initResizeObserver=function(){var e=this,r=this.options.container;if(!this.resizeObserver){var n=new ResizeObserver(function(c){var p=!0,y=!1,g=void 0;try{for(var N=c[Symbol.iterator](),z;!(p=(z=N.next()).done);p=!0){var D=z.value,S=D.contentRect;e.handeleResize(S.width,S.height),e.render()}}catch(M){y=!0,g=M}finally{try{!p&&N.return!=null&&N.return()}finally{if(y)throw g}}});n.observe(r),this.resizeObserver=n}},i.handeleResize=function(e,r){var n=this,c=n.rendererController,p=n.cameraController,y=n.composerController,g=n.cssRendererController;p==null||p.setSize(e,r),c==null||c.setSize(e,r),y==null||y.setSize(e,r),g==null||g.setSize(e,r),this.installPlugins.forEach(function(N,z){var D;(D=z.resize)===null||D===void 0||D.call(z,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},i.pick=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=this,p=c.raycaster,y=c.options,g=y.container,N=new b.Vector2,z=g.getBoundingClientRect();if(N.x=(e.clientX-z.left)/(z.right-z.left)*2-1,N.y=-((e.clientY-z.top)/(z.bottom-z.top))*2+1,this.camera&&this.scene){p.setFromCamera(N,this.camera);var D=p.intersectObjects(r||this.scene.children,n);if(D.length)return{object:D[0].object,intersects:D}}},i.render=function(){var e,r,n,c,p=this,y=p.renderer,g=p.scene,N=p.camera,z=p.clock;if(!(!y||!g||!N||this.options.staticRender&&!this.cameraController.checkCameraChange())){var D=z.getDelta(),S=z.getElapsedTime();if((e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(H,Q){var Z;(Z=Q.update)===null||Z===void 0||Z.call(Q,D,S)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var M;(M=this.rendererController)===null||M===void 0||M.render()}(n=this.cssRendererController)===null||n===void 0||n.render(g,N),(c=this.stats)===null||c===void 0||c.update(),this.event.emit("render",{delta:D,elapsed:S})}},i.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},i.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},i.dispose=function(){var e,r,n,c,p,y,g;this.stop(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(N,z){var D;(D=z.dispose)===null||D===void 0||D.call(z)}),(r=this.controlController)===null||r===void 0||r.dispose(),(n=this.cssRendererController)===null||n===void 0||n.dispose(),(c=this.sceneController)===null||c===void 0||c.dispose(),(p=this.composerController)===null||p===void 0||p.dispose(),(y=this.rendererController)===null||y===void 0||y.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(g=this.gui)===null||g===void 0||g.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},_(u,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),u}();be.options={isdev:ce,stats:ce,gui:ce,axesHelper:ce,control:ce,resizeObserver:!0,renderer:L((0,T.Z)({},o),{antialias:Pe?"msaa":"fxaa"}),staticRender:!1,multisampling:4,scene:w,camera:d,bloom:!1,bloomParams:ue,css2DRenderer:!1,css2DRendererParams:(0,T.Z)({},J),css3DRenderer:!1,css3DRendererParams:(0,T.Z)({},J)};function _e(u,i){return _e=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},_e(u,i)}function Oe(u,i){return _e(u,i)}function Se(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}function ge(u,i,t){return Se()?ge=Reflect.construct:ge=function(r,n,c){var p=[null];p.push.apply(p,n);var y=Function.bind.apply(r,p),g=new y;return c&&Oe(g,c.prototype),g},ge.apply(null,arguments)}function Ce(u,i,t){return ge.apply(null,arguments)}var Le=te(484);function Re(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t={};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),u&&(t.promise=(0,Le.Z)(t.promise,i)),t}var je=require("three/examples/jsm/renderers/CSS2DRenderer"),Ee=function(u){u&&((0,E.disposeMesh)(u),u.children.forEach(function(i){i.userData.BaseObject_||Ee(i)}))},Me=function(){"use strict";function u(){R(this,u),this.objecttype__="BaseObject",this.userData={},this.pm=Re(),this.visible=!1}var i=u.prototype;return i.init=function(){},i.create=function(){},i.render=function(){},i.update=function(e,r){},i.resize=function(e,r){},i.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},i.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},i.isVisible=function(){return this.visible},i.createMesh=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.object3d=Ce(b.Mesh,V(r)),this},i.createGroup=function(){return this.object3d=new b.Group,this},i.createPoints=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.object3d=Ce(b.Points,V(r)),this},i.createCSS2DObject=function(e){return this.object3d=new je.CSS2DObject(e),this},i.createCSS3DObject=function(e){return this.object3d=new ne.CSS3DObject(e),this},i.createCSS3DSprite=function(e){return this.object3d=new ne.CSS3DSprite(e),this},i.createSprite=function(e){return this.object3d=new b.Sprite(e),this},i.add=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var c;return(c=this.object3d).add.apply(c,V(r)),this},i.remove=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var c;return(c=this.object3d).remove.apply(c,V(r)),this},i.getSize=function(){var e=new b.Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new b.Vector3)}},i.traverse=function(e){e(this),this.children.forEach(function(r){r.traverse(e)})},i.dispose=function(){Ee(this.object3d)},_(u,[{key:"parent",get:function(){var e=this.object3d.parent;return(e==null?void 0:e.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(e){return e.userData.BaseObject_}).filter(function(e){return!!e})}}]),u}()})(),module.exports=ye})();
|
|
1
|
+
(function(){var xe={187:function(R){"use strict";var j=typeof Reflect=="object"?Reflect:null,_=j&&typeof j.apply=="function"?j.apply:function(o,l,d){return Function.prototype.apply.call(o,l,d)},T;j&&typeof j.ownKeys=="function"?T=j.ownKeys:Object.getOwnPropertySymbols?T=function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:T=function(o){return Object.getOwnPropertyNames(o)};function A(a){console&&console.warn&&console.warn(a)}var L=Number.isNaN||function(o){return o!==o};function h(){h.init.call(this)}R.exports=h,R.exports.once=Y,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var G=10;function B(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return G},set:function(a){if(typeof a!="number"||a<0||L(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");G=a}}),h.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},h.prototype.setMaxListeners=function(o){if(typeof o!="number"||o<0||L(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this};function k(a){return a._maxListeners===void 0?h.defaultMaxListeners:a._maxListeners}h.prototype.getMaxListeners=function(){return k(this)},h.prototype.emit=function(o){for(var l=[],d=1;d<arguments.length;d++)l.push(arguments[d]);var m=o==="error",E=this._events;if(E!==void 0)m=m&&E.error===void 0;else if(!m)return!1;if(m){var w;if(l.length>0&&(w=l[0]),w instanceof Error)throw w;var K=new Error("Unhandled error."+(w?" ("+w.message+")":""));throw K.context=w,K}var oe=E[o];if(oe===void 0)return!1;if(typeof oe=="function")_(oe,this,l);else for(var F=oe.length,X=ie(oe,F),d=0;d<F;++d)_(X[d],this,l);return!0};function P(a,o,l,d){var m,E,w;if(B(l),E=a._events,E===void 0?(E=a._events=Object.create(null),a._eventsCount=0):(E.newListener!==void 0&&(a.emit("newListener",o,l.listener?l.listener:l),E=a._events),w=E[o]),w===void 0)w=E[o]=l,++a._eventsCount;else if(typeof w=="function"?w=E[o]=d?[l,w]:[w,l]:d?w.unshift(l):w.push(l),m=k(a),m>0&&w.length>m&&!w.warned){w.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+w.length+" "+String(o)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=a,K.type=o,K.count=w.length,A(K)}return a}h.prototype.addListener=function(o,l){return P(this,o,l,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(o,l){return P(this,o,l,!0)};function V(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(a,o,l){var d={fired:!1,wrapFn:void 0,target:a,type:o,listener:l},m=V.bind(d);return m.listener=l,d.wrapFn=m,m}h.prototype.once=function(o,l){return B(l),this.on(o,b(this,o,l)),this},h.prototype.prependOnceListener=function(o,l){return B(l),this.prependListener(o,b(this,o,l)),this},h.prototype.removeListener=function(o,l){var d,m,E,w,K;if(B(l),m=this._events,m===void 0)return this;if(d=m[o],d===void 0)return this;if(d===l||d.listener===l)--this._eventsCount===0?this._events=Object.create(null):(delete m[o],m.removeListener&&this.emit("removeListener",o,d.listener||l));else if(typeof d!="function"){for(E=-1,w=d.length-1;w>=0;w--)if(d[w]===l||d[w].listener===l){K=d[w].listener,E=w;break}if(E<0)return this;E===0?d.shift():re(d,E),d.length===1&&(m[o]=d[0]),m.removeListener!==void 0&&this.emit("removeListener",o,K||l)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(o){var l,d,m;if(d=this._events,d===void 0)return this;if(d.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):d[o]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete d[o]),this;if(arguments.length===0){var E=Object.keys(d),w;for(m=0;m<E.length;++m)w=E[m],w!=="removeListener"&&this.removeAllListeners(w);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(l=d[o],typeof l=="function")this.removeListener(o,l);else if(l!==void 0)for(m=l.length-1;m>=0;m--)this.removeListener(o,l[m]);return this};function W(a,o,l){var d=a._events;if(d===void 0)return[];var m=d[o];return m===void 0?[]:typeof m=="function"?l?[m.listener||m]:[m]:l?U(m):ie(m,m.length)}h.prototype.listeners=function(o){return W(this,o,!0)},h.prototype.rawListeners=function(o){return W(this,o,!1)},h.listenerCount=function(a,o){return typeof a.listenerCount=="function"?a.listenerCount(o):ee.call(a,o)},h.prototype.listenerCount=ee;function ee(a){var o=this._events;if(o!==void 0){var l=o[a];if(typeof l=="function")return 1;if(l!==void 0)return l.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?T(this._events):[]};function ie(a,o){for(var l=new Array(o),d=0;d<o;++d)l[d]=a[d];return l}function re(a,o){for(;o+1<a.length;o++)a[o]=a[o+1];a.pop()}function U(a){for(var o=new Array(a.length),l=0;l<o.length;++l)o[l]=a[l].listener||a[l];return o}function Y(a,o){return new Promise(function(l,d){function m(w){a.removeListener(o,E),d(w)}function E(){typeof a.removeListener=="function"&&a.removeListener("error",m),l([].slice.call(arguments))}x(a,o,E,{once:!0}),o!=="error"&&q(a,m,{once:!0})})}function q(a,o,l){typeof a.on=="function"&&x(a,"error",o,l)}function x(a,o,l,d){if(typeof a.on=="function")d.once?a.once(o,l):a.on(o,l);else if(typeof a.addEventListener=="function")a.addEventListener(o,function m(E){d.once&&a.removeEventListener(o,m),l(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a)}},666:function(R){var j=function(_){"use strict";var T=Object.prototype,A=T.hasOwnProperty,L,h=typeof Symbol=="function"?Symbol:{},G=h.iterator||"@@iterator",B=h.asyncIterator||"@@asyncIterator",k=h.toStringTag||"@@toStringTag";function P(f,s,v){return Object.defineProperty(f,s,{value:v,enumerable:!0,configurable:!0,writable:!0}),f[s]}try{P({},"")}catch(f){P=function(s,v,O){return s[v]=O}}function V(f,s,v,O){var C=s&&s.prototype instanceof Y?s:Y,$=Object.create(C.prototype),ae=new X(O||[]);return $._invoke=w(f,v,ae),$}_.wrap=V;function b(f,s,v){try{return{type:"normal",arg:f.call(s,v)}}catch(O){return{type:"throw",arg:O}}}var W="suspendedStart",ee="suspendedYield",ie="executing",re="completed",U={};function Y(){}function q(){}function x(){}var a={};P(a,G,function(){return this});var o=Object.getPrototypeOf,l=o&&o(o(ne([])));l&&l!==T&&A.call(l,G)&&(a=l);var d=x.prototype=Y.prototype=Object.create(a);q.prototype=x,P(d,"constructor",x),P(x,"constructor",q),q.displayName=P(x,k,"GeneratorFunction");function m(f){["next","throw","return"].forEach(function(s){P(f,s,function(v){return this._invoke(s,v)})})}_.isGeneratorFunction=function(f){var s=typeof f=="function"&&f.constructor;return s?s===q||(s.displayName||s.name)==="GeneratorFunction":!1},_.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,x):(f.__proto__=x,P(f,k,"GeneratorFunction")),f.prototype=Object.create(d),f},_.awrap=function(f){return{__await:f}};function E(f,s){function v($,ae,J,ue){var se=b(f[$],f,ae);if(se.type==="throw")ue(se.arg);else{var me=se.arg,pe=me.value;return pe&&typeof pe=="object"&&A.call(pe,"__await")?s.resolve(pe.__await).then(function(ce){v("next",ce,J,ue)},function(ce){v("throw",ce,J,ue)}):s.resolve(pe).then(function(ce){me.value=ce,J(me)},function(ce){return v("throw",ce,J,ue)})}}var O;function C($,ae){function J(){return new s(function(ue,se){v($,ae,ue,se)})}return O=O?O.then(J,J):J()}this._invoke=C}m(E.prototype),P(E.prototype,B,function(){return this}),_.AsyncIterator=E,_.async=function(f,s,v,O,C){C===void 0&&(C=Promise);var $=new E(V(f,s,v,O),C);return _.isGeneratorFunction(s)?$:$.next().then(function(ae){return ae.done?ae.value:$.next()})};function w(f,s,v){var O=W;return function($,ae){if(O===ie)throw new Error("Generator is already running");if(O===re){if($==="throw")throw ae;return le()}for(v.method=$,v.arg=ae;;){var J=v.delegate;if(J){var ue=K(J,v);if(ue){if(ue===U)continue;return ue}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(O===W)throw O=re,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);O=ie;var se=b(f,s,v);if(se.type==="normal"){if(O=v.done?re:ee,se.arg===U)continue;return{value:se.arg,done:v.done}}else se.type==="throw"&&(O=re,v.method="throw",v.arg=se.arg)}}}function K(f,s){var v=f.iterator[s.method];if(v===L){if(s.delegate=null,s.method==="throw"){if(f.iterator.return&&(s.method="return",s.arg=L,K(f,s),s.method==="throw"))return U;s.method="throw",s.arg=new TypeError("The iterator does not provide a 'throw' method")}return U}var O=b(v,f.iterator,s.arg);if(O.type==="throw")return s.method="throw",s.arg=O.arg,s.delegate=null,U;var C=O.arg;if(!C)return s.method="throw",s.arg=new TypeError("iterator result is not an object"),s.delegate=null,U;if(C.done)s[f.resultName]=C.value,s.next=f.nextLoc,s.method!=="return"&&(s.method="next",s.arg=L);else return C;return s.delegate=null,U}m(d),P(d,k,"Generator"),P(d,G,function(){return this}),P(d,"toString",function(){return"[object Generator]"});function oe(f){var s={tryLoc:f[0]};1 in f&&(s.catchLoc=f[1]),2 in f&&(s.finallyLoc=f[2],s.afterLoc=f[3]),this.tryEntries.push(s)}function F(f){var s=f.completion||{};s.type="normal",delete s.arg,f.completion=s}function X(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(oe,this),this.reset(!0)}_.keys=function(f){var s=[];for(var v in f)s.push(v);return s.reverse(),function O(){for(;s.length;){var C=s.pop();if(C in f)return O.value=C,O.done=!1,O}return O.done=!0,O}};function ne(f){if(f){var s=f[G];if(s)return s.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var v=-1,O=function C(){for(;++v<f.length;)if(A.call(f,v))return C.value=f[v],C.done=!1,C;return C.value=L,C.done=!0,C};return O.next=O}}return{next:le}}_.values=ne;function le(){return{value:L,done:!0}}return X.prototype={constructor:X,reset:function(f){if(this.prev=0,this.next=0,this.sent=this._sent=L,this.done=!1,this.delegate=null,this.method="next",this.arg=L,this.tryEntries.forEach(F),!f)for(var s in this)s.charAt(0)==="t"&&A.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=L)},stop:function(){this.done=!0;var f=this.tryEntries[0],s=f.completion;if(s.type==="throw")throw s.arg;return this.rval},dispatchException:function(f){if(this.done)throw f;var s=this;function v(ue,se){return $.type="throw",$.arg=f,s.next=ue,se&&(s.method="next",s.arg=L),!!se}for(var O=this.tryEntries.length-1;O>=0;--O){var C=this.tryEntries[O],$=C.completion;if(C.tryLoc==="root")return v("end");if(C.tryLoc<=this.prev){var ae=A.call(C,"catchLoc"),J=A.call(C,"finallyLoc");if(ae&&J){if(this.prev<C.catchLoc)return v(C.catchLoc,!0);if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else if(ae){if(this.prev<C.catchLoc)return v(C.catchLoc,!0)}else if(J){if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(f,s){for(var v=this.tryEntries.length-1;v>=0;--v){var O=this.tryEntries[v];if(O.tryLoc<=this.prev&&A.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var C=O;break}}C&&(f==="break"||f==="continue")&&C.tryLoc<=s&&s<=C.finallyLoc&&(C=null);var $=C?C.completion:{};return $.type=f,$.arg=s,C?(this.method="next",this.next=C.finallyLoc,U):this.complete($)},complete:function(f,s){if(f.type==="throw")throw f.arg;return f.type==="break"||f.type==="continue"?this.next=f.arg:f.type==="return"?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):f.type==="normal"&&s&&(this.next=s),U},finish:function(f){for(var s=this.tryEntries.length-1;s>=0;--s){var v=this.tryEntries[s];if(v.finallyLoc===f)return this.complete(v.completion,v.afterLoc),F(v),U}},catch:function(f){for(var s=this.tryEntries.length-1;s>=0;--s){var v=this.tryEntries[s];if(v.tryLoc===f){var O=v.completion;if(O.type==="throw"){var C=O.arg;F(v)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(f,s,v){return this.delegate={iterator:ne(f),resultName:s,nextLoc:v},this.method==="next"&&(this.arg=L),U}},_}(R.exports);try{regeneratorRuntime=j}catch(_){typeof globalThis=="object"?globalThis.regeneratorRuntime=j:Function("r","regeneratorRuntime = r")(j)}},695:function(R,j,_){"use strict";_.d(j,{Z:function(){return T}});function T(A){if(A.geometry&&A.geometry.dispose(),A.material){var L=Array.isArray(A.material)?A.material:[A.material];L.forEach(function(h){var G,B,k,P,V,b,W,ee,ie,re,U,Y,q;(G=h.map)===null||G===void 0||G.dispose(),(B=h.lightMap)===null||B===void 0||B.dispose(),(k=h.bumpMap)===null||k===void 0||k.dispose(),(P=h.normalMap)===null||P===void 0||P.dispose(),(V=h.specularMap)===null||V===void 0||V.dispose(),(b=h.envMap)===null||b===void 0||b.dispose(),(W=h.alphaMap)===null||W===void 0||W.dispose(),(ee=h.aoMap)===null||ee===void 0||ee.dispose(),(ie=h.displacementMap)===null||ie===void 0||ie.dispose(),(re=h.emissiveMap)===null||re===void 0||re.dispose(),(U=h.gradientMap)===null||U===void 0||U.dispose(),(Y=h.metalnessMap)===null||Y===void 0||Y.dispose(),(q=h.roughnessMap)===null||q===void 0||q.dispose(),h.dispose()})}}},584:function(R,j,_){"use strict";_.d(j,{disposeMesh:function(){return h.Z},isPlainObject:function(){return k.Z}});var T=_(666),A=_.n(T),L=null,h=_(695),G=_(644);function B(Y){if(Y.material){var q=Array.isArray(Y.material)?Y.material:[Y.material];q.forEach(function(x){var a,o;(a=x.color)===null||a===void 0||a.convertSRGBToLinear(),(o=x.emissive)===null||o===void 0||o.convertSRGBToLinear(),x.map&&(x.map.encoding=THREE.sRGBEncoding),x.emissiveMap&&(x.emissiveMap.encoding=THREE.sRGBEncoding)})}}var k=_(738),P=_(568),V=_(924),b=_(360),W=_(484),ee=null,ie=null,re=function(){var Y=(0,P.Z)(A().mark(function q(x,a){var o,l,d,m,E,w,K,oe,F;return A().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return o=a.type,l=o===void 0?"blob":o,d=a.version,m=d===void 0?"1":d,ne.next=4,(0,b.get)(x);case 4:if(w=ne.sent,!(w&&w[m])){ne.next=9;break}E=w[m],ne.next=15;break;case 9:return ne.next=11,(0,W.Z)(fetch(x).then(function(le){if(le.ok)return le[l]();throw new Error}));case 11:K=ne.sent,oe=K.res,F=K.err,F||(E=oe,(0,b.set)(x,(0,V.Z)({},m,oe)));case 15:return ne.abrupt("return",E?{url:l==="json"?x:URL.createObjectURL(E),store:E}:{url:x});case 16:case"end":return ne.stop()}},q)}));return function(x,a){return Y.apply(this,arguments)}}(),U=_(705)},738:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});function T(L){return Object.prototype.toString.call(L)==="[object Object]"}function A(L){if(T(L)===!1)return!1;var h=L.constructor;if(h===void 0)return!0;var G=h.prototype;return!(T(G)===!1||G.hasOwnProperty("isPrototypeOf")===!1)}},484:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});var T=_(42);function A(L){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return L.then(function(G){return(0,T.Z)({err:null,res:G},h)}).catch(function(G){return(0,T.Z)({err:G,res:void 0},h)})}},705:function(R,j,_){"use strict";var T=_(644),A=_.n(T),L=new Map,h=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(k,P,V,b,W){var ee=P[V*3],ie=P[V*3+1],re=P[b*3],U=P[b*3+1],Y=P[W*3],q=P[W*3+1],x;if(L.has(k))x=L.get(k);else{var a=B.box3||new THREE.Box3;if(!B.box3){var o=k.parameters.shapes.getPoints();a.setFromArray(o.map(function(w){return[w.x,w.y,0]}).flat())}var l=a.getSize(new THREE.Vector3);B.split&&(l.y/=B.split),x={box:a,size:l},L.set(k,x)}var d=x.box,m=x.size,E=B.split?1-B.split:0;return[new THREE.Vector2((ee-d.min.x)/m.x,(ie-d.min.y)/m.y+E),new THREE.Vector2((re-d.min.x)/m.x,(U-d.min.y)/m.y+E),new THREE.Vector2((Y-d.min.x)/m.x,(q-d.min.y)/m.y+E)]},generateSideWallUV:function(k,P,V,b,W,ee){var ie=P[V*3],re=P[V*3+1],U=P[V*3+2],Y=P[b*3],q=P[b*3+1],x=P[b*3+2],a=P[W*3],o=P[W*3+1],l=P[W*3+2],d=P[ee*3],m=P[ee*3+1],E=P[ee*3+2],w;if(L.has(P))w=L.get(P);else{var K=new THREE.Box3;K.setFromArray(P);var oe=K.getSize(new THREE.Vector3);B.split&&(oe.z/=1-B.split),w={box:K,size:oe},L.set(P,w)}var F=w.box,X=w.size;return Math.abs(re-q)<Math.abs(ie-Y)?[new THREE.Vector2((ie-F.min.x)/X.x,(U-F.min.z)/X.z),new THREE.Vector2((Y-F.min.x)/X.x,(x-F.min.z)/X.z),new THREE.Vector2((a-F.min.x)/X.x,(l-F.min.z)/X.z),new THREE.Vector2((d-F.min.x)/X.x,(E-F.min.z)/X.z)]:[new THREE.Vector2((re-F.min.y)/X.y,(U-F.min.z)/X.z),new THREE.Vector2((q-F.min.y)/X.y,(x-F.min.z)/X.z),new THREE.Vector2((o-F.min.y)/X.y,(l-F.min.z)/X.z),new THREE.Vector2((m-F.min.y)/X.y,(E-F.min.z)/X.z)]}}},G=function(){L.clear()}},360:function(R){"use strict";R.exports=require("idb-keyval")},644:function(R){"use strict";R.exports=require("three")},568:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});function T(L,h,G,B,k,P,V){try{var b=L[P](V),W=b.value}catch(ee){G(ee);return}b.done?h(W):Promise.resolve(W).then(B,k)}function A(L){return function(){var h=this,G=arguments;return new Promise(function(B,k){var P=L.apply(h,G);function V(W){T(P,B,k,V,b,"next",W)}function b(W){T(P,B,k,V,b,"throw",W)}V(void 0)})}}},924:function(R,j,_){"use strict";_.d(j,{Z:function(){return T}});function T(A,L,h){return L in A?Object.defineProperty(A,L,{value:h,enumerable:!0,configurable:!0,writable:!0}):A[L]=h,A}},42:function(R,j,_){"use strict";_.d(j,{Z:function(){return A}});var T=_(924);function A(L){for(var h=1;h<arguments.length;h++){var G=arguments[h]!=null?arguments[h]:{},B=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(B=B.concat(Object.getOwnPropertySymbols(G).filter(function(k){return Object.getOwnPropertyDescriptor(G,k).enumerable}))),B.forEach(function(k){(0,T.Z)(L,k,G[k])})}return L}}},we={};function te(R){var j=we[R];if(j!==void 0)return j.exports;var _=we[R]={exports:{}};return xe[R](_,_.exports,te),_.exports}(function(){te.n=function(R){var j=R&&R.__esModule?function(){return R.default}:function(){return R};return te.d(j,{a:j}),j}})(),function(){te.d=function(R,j){for(var _ in j)te.o(j,_)&&!te.o(R,_)&&Object.defineProperty(R,_,{enumerable:!0,get:j[_]})}}(),function(){te.o=function(R,j){return Object.prototype.hasOwnProperty.call(R,j)}}(),function(){te.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})}}();var ye={};(function(){"use strict";te.r(ye),te.d(ye,{BaseObject:function(){return Me},GUIObject:function(){return x},Pencil:function(){return be},default:function(){return be}});function R(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function j(u,i){for(var t=0;t<i.length;t++){var e=i[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(u,e.key,e)}}function _(u,i,t){return i&&j(u.prototype,i),t&&j(u,t),u}var T=te(42);function A(u,i){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(u);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable})),t.push.apply(t,e)}return t}function L(u,i){return i=i!=null?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach(function(t){Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(i,t))}),u}function h(u,i){(i==null||i>u.length)&&(i=u.length);for(var t=0,e=new Array(i);t<i;t++)e[t]=u[t];return e}function G(u){if(Array.isArray(u))return h(u)}function B(u){if(typeof Symbol!="undefined"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)}function k(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(u,i){if(!!u){if(typeof u=="string")return h(u,i);var t=Object.prototype.toString.call(u).slice(8,-1);if(t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return h(u,i)}}function V(u){return G(u)||B(u)||P(u)||k()}var b=te(644),W=te(187),ee=require("deepmerge"),ie=te.n(ee),re=require("three/examples/jsm/libs/stats.module"),U=te.n(re),Y=require("lil-gui"),q=te.n(Y),x=function(){"use strict";function u(t){R(this,u),this.guiParams={},t&&(this.guiParams=t)}var i=u.prototype;return i.showGui=function(e){var r=this;!e||Object.keys(this.guiParams).forEach(function(n){var c=e.addFolder(n),p=r.guiParams[n];Object.keys(p).forEach(function(g){var y=p[g],N=y.min,z=y.max,D=y.step,S=y.name,M=y.paramMap,H=y.items,Q=y.value,Z=y.target,fe=g.toLowerCase().indexOf("color")>-1,I,de=typeof Q=="undefined"&&Z,he=de?Z():p[g],ve=de?g:"value";H?I=c.add(he,ve,H):fe?I=c.addColor(he,ve):I=c.add(he,ve),I=I.name(S||g),typeof N!="undefined"&&(I=I.min(N)),typeof z!="undefined"&&(I=I.max(z)),typeof D!="undefined"&&(I=I.step(D)),I=I.onChange(function(){r.setTargetValue(n,g,he[ve],M)}),de&&I.listen()})})},i.setTargetValue=function(e,r,n,c){var p=this.guiParams[e][r],g=p.onChange,y=p.target,N=p.value,z=r.toLowerCase().indexOf("color")>-1,D=typeof N=="undefined"&&y;if(y&&!D){var S=y();Array.isArray(S)||(S=[S]),S.forEach(function(M){if(!!M)if(z)try{M[c||r].set(n)}catch(H){r!=="color"&&!c&&console.warn("".concat(r," is not a color,set paramMap"))}else M[c||r]=n})}g&&g(n)},i.setTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(r){Object.keys(e.guiParams[r]).forEach(function(n){var c=e.guiParams[r][n];typeof c.value!="undefined"&&e.setTargetValue(r,n,c.value,c.paramMap)})})},u}(),a={None:b.NoToneMapping,Linear:b.LinearToneMapping,Reinhard:b.ReinhardToneMapping,Cineon:b.CineonToneMapping,ACESFilmic:b.ACESFilmicToneMapping},o={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:b.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1,context:null,stencil:!1,depth:!1,physicallyCorrectLights:!1},l=function(){"use strict";function u(t){R(this,u),this.options=t;var e=t.width,r=t.height,n=t.rendererParams,c=n.context,p=n.alpha,g=n.devicePixelRatio,y=n.antialias,N=n.powerPreference,z=n.toneMapping,D=n.toneMappingExposure,S=n.outputEncoding,M=n.logarithmicDepthBuffer,H=n.preserveDrawingBuffer,Q=n.stencil,Z=n.depth,fe=n.physicallyCorrectLights,I=new b.WebGLRenderer({context:c,alpha:p,antialias:y,powerPreference:N,logarithmicDepthBuffer:M,preserveDrawingBuffer:H,stencil:Q,depth:Z});I.setSize(e,r),I.setPixelRatio(g),I.toneMapping=a[z],I.toneMappingExposure=D,I.outputEncoding=S,I.physicallyCorrectLights=fe,this.renderer=I}var i=u.prototype;return i.setSize=function(e,r){this.renderer.setSize(e,r)},i.render=function(){var e=this.options,r=e.scene,n=e.camera;this.renderer.render(r,n)},i.setGui=function(e){var r=this,n=new x({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:a,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}});n.showGui(e)},i.dispose=function(){var e,r,n;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(n=this.renderer)===null||n===void 0||n.renderLists.dispose()},u}(),d={fov:45,near:1,far:1e3},m=function(){"use strict";function u(t){R(this,u),this.oldCameraPosition=new b.Vector3,this.oldCameraRotation=new b.Euler,this.customCamera=!1,this.options=t;var e=t.width,r=t.height,n=t.cameraParams;if(n instanceof b.Camera)this.camera=n,this.customCamera=!0;else{var c=n.fov,p=n.far,g=n.near,y=new b.PerspectiveCamera(c,e/r,g,p);y.position.set(0,0,400),y.lookAt(0,0,0),this.camera=y}}var i=u.prototype;return i.checkCameraChange=function(){var e=this.camera,r=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!r},i.setSize=function(e,r){this.camera instanceof b.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},i.setGui=function(e){var r=this,n=new x({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}}}});this.camera instanceof b.PerspectiveCamera&&(n.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(c){r.camera.updateProjectionMatrix()}}),n.showGui(e)},u}(),E=te(584),w={background:null},K=function(){"use strict";function u(t){R(this,u),this.options=t;var e=t.camera,r=t.sceneParams,n=r.background,c=new b.Scene;n&&(c.background=n),c.add(e),this.scene=c}var i=u.prototype;return i.addAxesHelper=function(){var e,r=new b.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},i.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,E.disposeMesh)(r)})},u}(),oe=require("three/examples/jsm/controls/OrbitControls"),F={},X=function(){"use strict";function u(t){R(this,u),this.options=t;var e=t.camera,r=t.controlParams,n=t.mapControl,c=r.domElement,p=n?new oe.MapControls(e,c):new oe.OrbitControls(e,c);p.minPolarAngle=Math.PI*.15,p.maxPolarAngle=Math.PI*.85,p.enableDamping=!0,p.dampingFactor=.063,p.autoRotate=!1,p.autoRotateSpeed=-60,p.enableZoom=!0,p.zoomSpeed=.2,this.control=p}var i=u.prototype;return i.limitPan=function(e){var r=e.maxX,n=r===void 0?1/0:r,c=e.minX,p=c===void 0?-1/0:c,g=e.maxZ,y=g===void 0?1/0:g,N=e.minZ,z=N===void 0?-1/0:N,D=e.maxY,S=D===void 0?1/0:D,M=e.minY,H=M===void 0?-1/0:M,Q=this.limitPanV||new b.Vector3,Z=this.control,fe=this.options.camera,I=new b.Vector3(p,H,z),de=new b.Vector3(n,S,y);this.limitPanV=Q,Q.copy(Z.target),Z.target.clamp(I,de),Q.sub(Z.target),fe.position.sub(Q)},i.update=function(){this.control.update()},i.dispose=function(){this.control.dispose()},u}(),ne=require("three/examples/jsm/renderers/CSS3DRenderer"),le=new b.Vector3,f=new b.Matrix4,s=new b.Matrix4,v=new b.Vector3,O=new b.Vector3,C=function u(){"use strict";var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};R(this,u);var t=function(M,H){return v.setFromMatrixPosition(M.matrixWorld),O.setFromMatrixPosition(H.matrixWorld),v.distanceToSquared(O)},e=function(M){var H=[];return M.traverse(function(Q){Q.isCSS2DObject&&H.push(Q)}),H},r=function(M){for(var H=e(M).sort(function(de,he){if(de.renderOrder!==he.renderOrder)return he.renderOrder-de.renderOrder;var ve=N.objects.get(de).distanceToCameraSquared,ze=N.objects.get(he).distanceToCameraSquared;return ve-ze}),Q=H.length,Z=0,fe=H.length;Z<fe;Z++){var I=H[Z].userData.zIndexFix||0;H[Z].element.style.zIndex=Q-Z+I}},n=this,c,p,g,y,N={objects:new WeakMap},z=i.element!==void 0?i.element:document.createElement("div");z.style.overflow="hidden",this.domElement=z,this.getSize=function(){return{width:c,height:p}},this.render=function(S,M){+b.REVISION<144?(S.autoUpdate===!0&&S.updateMatrixWorld(),M.parent===null&&M.updateMatrixWorld()):(S.matrixWorldAutoUpdate===!0&&S.updateMatrixWorld(),M.parent===null&&M.matrixWorldAutoUpdate===!0&&M.updateMatrixWorld()),f.copy(M.matrixWorldInverse),s.multiplyMatrices(M.projectionMatrix,f),D(S,S,M),r(S)},this.setSize=function(S,M){c=S,p=M,g=c/2,y=p/2,z.style.width="".concat(S,"px"),z.style.height="".concat(M,"px")};function D(S,M,H){if(S.isCSS2DObject){le.setFromMatrixPosition(S.matrixWorld),le.applyMatrix4(s);var Q=S.visible===!0&&le.z>=-1&&le.z<=1&&S.layers.test(H.layers)===!0;if(S.element.style.display=Q===!0?"":"none",Q===!0){S.onBeforeRender(n,M,H);var Z=S.element;Z.style.transform="translate(-50%,-50%) translate(".concat(le.x*g+g,"px,").concat(-le.y*y+y,"px)"),Z.parentNode!==z&&z.appendChild(Z),S.onAfterRender(n,M,H)}var fe={distanceToCameraSquared:t(H,S)};N.objects.set(S,fe)}for(var I=0,de=S.children.length;I<de;I++)D(S.children[I],M,H)}},$={zIndex:"auto"},ae=function(){"use strict";function u(t){R(this,u),this.container=t}var i=u.prototype;return i.addRenderer=function(e,r){var n=this.container,c=n.offsetWidth,p=n.offsetHeight,g=e==="css2d"?new C:new ne.CSS3DRenderer;g.domElement.style.position="absolute",g.domElement.style.top="0",g.domElement.style.pointerEvents="none",g.domElement.style.zIndex=r.zIndex,g.setSize(c,p),n.appendChild(g.domElement),e==="css2d"?this.css2Drenderer=g:e==="css3d"&&(this.css3Drenderer=g)},i.setSize=function(e,r){var n,c;(n=this.css2Drenderer)===null||n===void 0||n.setSize(e,r),(c=this.css3Drenderer)===null||c===void 0||c.setSize(e,r)},i.render=function(e,r){var n,c;(n=this.css2Drenderer)===null||n===void 0||n.render(e,r),(c=this.css3Drenderer)===null||c===void 0||c.render(e,r)},i.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},u}(),J=require("postprocessing"),ue={luminanceThreshold:.1,luminanceSmoothing:.3,mipmapBlur:!0,intensity:4},se=function(){"use strict";function u(t){R(this,u),this.active=!0,this.options=t;var e=t.renderer,r=t.scene,n=t.camera,c=t.composerParams,p=c.multisampling,g=e.capabilities.maxSamples,y=new J.EffectComposer(e,{multisampling:Math.min(p,g)});y.addPass(new J.RenderPass(r,n)),this.finalComposer=y,this.renderer=e,this.scene=r,this.camera=n}var i=u.prototype;return i.addCopyPass=function(){var e=new J.CopyPass;e.renderToScreen=!0,this.finalComposer.addPass(e),this.copyPass=e},i.addFXAAPass=function(){var e=this.camera,r=new J.FXAAEffect({blendFunction:J.BlendFunction.NORMAL}),n=new J.EffectPass(e,r);this.finalComposer.addPass(n),this.fxaaPass=n},i.addBloomPass=function(e){var r=this,n=r.camera,c=r.scene,p=new J.SelectiveBloomEffect(c,n,(0,T.Z)({},e)),g=new J.EffectPass(n,p);g.enabled=!1,this.finalComposer.addPass(g),this.bloomPass=g,this.bloomEffect=p},i.addBloomGui=function(e){var r=this;if(!!this.bloomEffect){var n=new x({bloom:{intensity:{min:0,max:10,step:.01,target:function(){return r.bloomEffect}}},bloomLuminanceFilter:{enabled:{value:this.bloomEffect.luminancePass.enabled,onChange:function(c){r.bloomEffect.luminancePass.enabled=c}},threshold:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}},smoothing:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}}}});n.showGui(e)}},i.toggleBloomSelection=function(e){if(!this.bloomEffect||!this.bloomPass){console.warn("err:pencil.options.bloom");return}this.bloomEffect.selection.toggle(e),this.bloomPass.enabled=!!this.bloomEffect.selection.size},i.getSize=function(){var e=this.options.renderer;return e.getSize(new b.Vector2)},i.enable=function(){this.active||(this.active=!0)},i.disable=function(){!this.active||(this.active=!1)},i.setSize=function(e,r){this.finalComposer.setSize(e,r)},i.render=function(){!this.active||this.finalComposer.render()},i.dispose=function(){this.finalComposer.dispose()},u}(),me=function(){try{var u=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&u.getContext("webgl2"))}catch(i){return!1}},pe=0,ce=!1,Pe=me()!==!1,be=function(){"use strict";function u(t){R(this,u),this.raycaster=new b.Raycaster,this.installPlugins=new Map,this.event=new W.EventEmitter,this.clock=new b.Clock,this.options=ie()(u.options,t,{isMergeableObject:E.isPlainObject});var e=this.options,r=e.container,n=e.stats,c=e.gui,p=e.resizeObserver;if(c){var g=new(q());g.open(!1),this.gui=g}if(n){var y=new(U());y.showPanel(0),y.dom.style.position="absolute",r.appendChild(y.dom),this.stats=y}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),p&&this.initResizeObserver(),this.clock.getDelta(),this.clock.getElapsedTime()}var i=u.prototype;return i.use=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),c=1;c<r;c++)n[c-1]=arguments[c];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var p;(p=e).install.apply(p,[this].concat(V(n))),this.installPlugins.set(e,!0)}},i.init=function(){var e=this.options,r=e.container,n=e.isdev,c=e.axesHelper,p=e.renderer,g=e.scene,y=e.camera,N=this.getSize(),z=N.width,D=N.height,S=new m({isdev:n,width:z,height:D,cameraParams:y});this.gui&&S.setGui(this.gui);var M=S.camera,H=new K({camera:M,sceneParams:g}),Q=H.scene,Z=new l({width:z,height:D,scene:Q,camera:M,isdev:n,rendererParams:L((0,T.Z)({},p),{antialias:!1})});this.gui&&Z.setGui(this.gui);var fe=Z.renderer;c&&H.addAxesHelper(),this.sceneController=H,this.rendererController=Z,this.cameraController=S,r.appendChild(fe.domElement)},i.initComposer=function(){var e=this.options,r=e.bloom,n=e.bloomParams,c=e.renderer,p=e.multisampling,g=c.antialias;g==="msaa"&&!Pe&&(g=!1,console.warn("MSAA is not supported on this browser"));var y=new se({renderer:this.renderer,scene:this.scene,camera:this.camera,composerParams:{multisampling:g==="msaa"?p:0,type:b.UnsignedByteType,encoding:c.outputEncoding}});this.composerController=y,r&&(y.addBloomPass(n),this.gui&&y.addBloomGui(this.gui)),g==="fxaa"&&y.addFXAAPass(),y.addCopyPass()},i.initCSSRenderer=function(){var e=this.options,r=e.container,n=e.css2DRenderer,c=e.css3DRenderer,p=e.css2DRendererParams,g=e.css3DRendererParams;if(n||c){var y=new ae(r);n&&y.addRenderer("css2d",p),c&&y.addRenderer("css3d",g),this.cssRendererController=y}},i.initControl=function(){var e=this.options,r=e.control,n=e.mapControl,c=e.controlParams;if(r){var p=new X({camera:this.camera,controlParams:{domElement:(c==null?void 0:c.domElement)||this.renderer.domElement},mapControl:n});this.controlController=p}},i.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},i.initResizeObserver=function(){var e=this,r=this.options.container;if(!this.resizeObserver){var n=new ResizeObserver(function(c){var p=!0,g=!1,y=void 0;try{for(var N=c[Symbol.iterator](),z;!(p=(z=N.next()).done);p=!0){var D=z.value,S=D.contentRect;e.handeleResize(S.width,S.height),e.render()}}catch(M){g=!0,y=M}finally{try{!p&&N.return!=null&&N.return()}finally{if(g)throw y}}});n.observe(r),this.resizeObserver=n}},i.handeleResize=function(e,r){var n=this,c=n.rendererController,p=n.cameraController,g=n.composerController,y=n.cssRendererController;p==null||p.setSize(e,r),c==null||c.setSize(e,r),g==null||g.setSize(e,r),y==null||y.setSize(e,r),this.installPlugins.forEach(function(N,z){var D;(D=z.resize)===null||D===void 0||D.call(z,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},i.pick=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=this,p=c.raycaster,g=c.options,y=g.container,N=new b.Vector2,z=y.getBoundingClientRect();if(N.x=(e.clientX-z.left)/(z.right-z.left)*2-1,N.y=-((e.clientY-z.top)/(z.bottom-z.top))*2+1,this.camera&&this.scene){p.setFromCamera(N,this.camera);var D=p.intersectObjects(r||this.scene.children,n);if(D.length)return{object:D[0].object,intersects:D}}},i.render=function(){var e,r,n,c,p=this,g=p.renderer,y=p.scene,N=p.camera,z=p.clock;if(!(!g||!y||!N||this.options.staticRender&&!this.cameraController.checkCameraChange())){var D=z.getDelta(),S=z.getElapsedTime();if((e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(H,Q){var Z;(Z=Q.update)===null||Z===void 0||Z.call(Q,D,S)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var M;(M=this.rendererController)===null||M===void 0||M.render()}(n=this.cssRendererController)===null||n===void 0||n.render(y,N),(c=this.stats)===null||c===void 0||c.update(),this.event.emit("render",{delta:D,elapsed:S})}},i.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},i.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},i.dispose=function(){var e,r,n,c,p,g,y;this.stop(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(N,z){var D;(D=z.dispose)===null||D===void 0||D.call(z)}),(r=this.controlController)===null||r===void 0||r.dispose(),(n=this.cssRendererController)===null||n===void 0||n.dispose(),(c=this.sceneController)===null||c===void 0||c.dispose(),(p=this.composerController)===null||p===void 0||p.dispose(),(g=this.rendererController)===null||g===void 0||g.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(y=this.gui)===null||y===void 0||y.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},_(u,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),u}();be.options={isdev:ce,stats:ce,gui:ce,axesHelper:ce,control:ce,resizeObserver:!0,renderer:L((0,T.Z)({},o),{antialias:Pe?"msaa":"fxaa"}),staticRender:!1,multisampling:4,scene:w,camera:d,bloom:!1,bloomParams:ue,css2DRenderer:!1,css2DRendererParams:(0,T.Z)({},$),css3DRenderer:!1,css3DRendererParams:(0,T.Z)({},$)};function _e(u,i){return _e=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},_e(u,i)}function Oe(u,i){return _e(u,i)}function Se(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}function ge(u,i,t){return Se()?ge=Reflect.construct:ge=function(r,n,c){var p=[null];p.push.apply(p,n);var g=Function.bind.apply(r,p),y=new g;return c&&Oe(y,c.prototype),y},ge.apply(null,arguments)}function Ce(u,i,t){return ge.apply(null,arguments)}var Le=te(484);function Re(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t={};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),u&&(t.promise=(0,Le.Z)(t.promise,i)),t}var je=require("three/examples/jsm/renderers/CSS2DRenderer"),Ee=function(u){u&&((0,E.disposeMesh)(u),u.children.forEach(function(i){i.userData.BaseObject_||Ee(i)}))},Me=function(){"use strict";function u(){R(this,u),this.objecttype__="BaseObject",this.userData={},this.pm=Re(),this.visible=!1}var i=u.prototype;return i.init=function(){},i.create=function(){},i.render=function(){},i.update=function(e,r){},i.resize=function(e,r){},i.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},i.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},i.isVisible=function(){return this.visible},i.createMesh=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.object3d=Ce(b.Mesh,V(r)),this},i.createGroup=function(){return this.object3d=new b.Group,this},i.createPoints=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.object3d=Ce(b.Points,V(r)),this},i.createCSS2DObject=function(e){return this.object3d=new je.CSS2DObject(e),this},i.createCSS3DObject=function(e){return this.object3d=new ne.CSS3DObject(e),this},i.createCSS3DSprite=function(e){return this.object3d=new ne.CSS3DSprite(e),this},i.createSprite=function(e){return this.object3d=new b.Sprite(e),this},i.add=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var c;return(c=this.object3d).add.apply(c,V(r)),this},i.remove=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var c;return(c=this.object3d).remove.apply(c,V(r)),this},i.getSize=function(){var e=new b.Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new b.Vector3)}},i.traverse=function(e){e(this),this.children.forEach(function(r){r.traverse(e)})},i.dispose=function(){Ee(this.object3d)},_(u,[{key:"parent",get:function(){var e=this.object3d.parent;return(e==null?void 0:e.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(e){return e.userData.BaseObject_}).filter(function(e){return!!e})}}]),u}()})(),module.exports=ye})();
|
package/dist/index.module.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as Re from"idb-keyval";import*as $ from"three";import*as Ue from"deepmerge";import*as Ze from"three/examples/jsm/libs/stats.module";import*as Xe from"lil-gui";import*as Me from"three/examples/jsm/controls/OrbitControls";import*as xe from"three/examples/jsm/renderers/CSS3DRenderer";import*as me from"postprocessing";import*as Ke from"three/examples/jsm/renderers/CSS2DRenderer";var Ye={187:function(j){var R=typeof Reflect=="object"?Reflect:null,b=R&&typeof R.apply=="function"?R.apply:function(a,c,h){return Function.prototype.apply.call(a,c,h)},z;R&&typeof R.ownKeys=="function"?z=R.ownKeys:Object.getOwnPropertySymbols?z=function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:z=function(a){return Object.getOwnPropertyNames(a)};function L(s){console&&console.warn&&console.warn(s)}var S=Number.isNaN||function(a){return a!==a};function d(){d.init.call(this)}j.exports=d,j.exports.once=J,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var T=10;function W(s){if(typeof s!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof s)}Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(s){if(typeof s!="number"||s<0||S(s))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+s+".");T=s}}),d.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},d.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||S(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this};function E(s){return s._maxListeners===void 0?d.defaultMaxListeners:s._maxListeners}d.prototype.getMaxListeners=function(){return E(this)},d.prototype.emit=function(a){for(var c=[],h=1;h<arguments.length;h++)c.push(arguments[h]);var y=a==="error",w=this._events;if(w!==void 0)y=y&&w.error===void 0;else if(!y)return!1;if(y){var P;if(c.length>0&&(P=c[0]),P instanceof Error)throw P;var Q=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw Q.context=P,Q}var G=w[a];if(G===void 0)return!1;if(typeof G=="function")b(G,this,c);else for(var F=G.length,he=ae(G,F),h=0;h<F;++h)b(he[h],this,c);return!0};function B(s,a,c,h){var y,w,P;if(W(c),w=s._events,w===void 0?(w=s._events=Object.create(null),s._eventsCount=0):(w.newListener!==void 0&&(s.emit("newListener",a,c.listener?c.listener:c),w=s._events),P=w[a]),P===void 0)P=w[a]=c,++s._eventsCount;else if(typeof P=="function"?P=w[a]=h?[c,P]:[P,c]:h?P.unshift(c):P.push(c),y=E(s),y>0&&P.length>y&&!P.warned){P.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=s,Q.type=a,Q.count=P.length,L(Q)}return s}d.prototype.addListener=function(a,c){return B(this,a,c,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(a,c){return B(this,a,c,!0)};function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(s,a,c){var h={fired:!1,wrapFn:void 0,target:s,type:a,listener:c},y=I.bind(h);return y.listener=c,h.wrapFn=y,y}d.prototype.once=function(a,c){return W(c),this.on(a,_(this,a,c)),this},d.prototype.prependOnceListener=function(a,c){return W(c),this.prependListener(a,_(this,a,c)),this},d.prototype.removeListener=function(a,c){var h,y,w,P,Q;if(W(c),y=this._events,y===void 0)return this;if(h=y[a],h===void 0)return this;if(h===c||h.listener===c)--this._eventsCount===0?this._events=Object.create(null):(delete y[a],y.removeListener&&this.emit("removeListener",a,h.listener||c));else if(typeof h!="function"){for(w=-1,P=h.length-1;P>=0;P--)if(h[P]===c||h[P].listener===c){Q=h[P].listener,w=P;break}if(w<0)return this;w===0?h.shift():ne(h,w),h.length===1&&(y[a]=h[0]),y.removeListener!==void 0&&this.emit("removeListener",a,Q||c)}return this},d.prototype.off=d.prototype.removeListener,d.prototype.removeAllListeners=function(a){var c,h,y;if(h=this._events,h===void 0)return this;if(h.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):h[a]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete h[a]),this;if(arguments.length===0){var w=Object.keys(h),P;for(y=0;y<w.length;++y)P=w[y],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(c=h[a],typeof c=="function")this.removeListener(a,c);else if(c!==void 0)for(y=c.length-1;y>=0;y--)this.removeListener(a,c[y]);return this};function Z(s,a,c){var h=s._events;if(h===void 0)return[];var y=h[a];return y===void 0?[]:typeof y=="function"?c?[y.listener||y]:[y]:c?K(y):ae(y,y.length)}d.prototype.listeners=function(a){return Z(this,a,!0)},d.prototype.rawListeners=function(a){return Z(this,a,!1)},d.listenerCount=function(s,a){return typeof s.listenerCount=="function"?s.listenerCount(a):re.call(s,a)},d.prototype.listenerCount=re;function re(s){var a=this._events;if(a!==void 0){var c=a[s];if(typeof c=="function")return 1;if(c!==void 0)return c.length}return 0}d.prototype.eventNames=function(){return this._eventsCount>0?z(this._events):[]};function ae(s,a){for(var c=new Array(a),h=0;h<a;++h)c[h]=s[h];return c}function ne(s,a){for(;a+1<s.length;a++)s[a]=s[a+1];s.pop()}function K(s){for(var a=new Array(s.length),c=0;c<a.length;++c)a[c]=s[c].listener||s[c];return a}function J(s,a){return new Promise(function(c,h){function y(P){s.removeListener(a,w),h(P)}function w(){typeof s.removeListener=="function"&&s.removeListener("error",y),c([].slice.call(arguments))}M(s,a,w,{once:!0}),a!=="error"&&U(s,y,{once:!0})})}function U(s,a,c){typeof s.on=="function"&&M(s,"error",a,c)}function M(s,a,c,h){if(typeof s.on=="function")h.once?s.once(a,c):s.on(a,c);else if(typeof s.addEventListener=="function")s.addEventListener(a,function y(w){h.once&&s.removeEventListener(a,y),c(w)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof s)}},666:function(j){var R=function(b){"use strict";var z=Object.prototype,L=z.hasOwnProperty,S,d=typeof Symbol=="function"?Symbol:{},T=d.iterator||"@@iterator",W=d.asyncIterator||"@@asyncIterator",E=d.toStringTag||"@@toStringTag";function B(f,u,v){return Object.defineProperty(f,u,{value:v,enumerable:!0,configurable:!0,writable:!0}),f[u]}try{B({},"")}catch(f){B=function(u,v,O){return u[v]=O}}function I(f,u,v,O){var C=u&&u.prototype instanceof J?u:J,Y=Object.create(C.prototype),q=new he(O||[]);return Y._invoke=P(f,v,q),Y}b.wrap=I;function _(f,u,v){try{return{type:"normal",arg:f.call(u,v)}}catch(O){return{type:"throw",arg:O}}}var Z="suspendedStart",re="suspendedYield",ae="executing",ne="completed",K={};function J(){}function U(){}function M(){}var s={};B(s,T,function(){return this});var a=Object.getPrototypeOf,c=a&&a(a(se([])));c&&c!==z&&L.call(c,T)&&(s=c);var h=M.prototype=J.prototype=Object.create(s);U.prototype=M,B(h,"constructor",M),B(M,"constructor",U),U.displayName=B(M,E,"GeneratorFunction");function y(f){["next","throw","return"].forEach(function(u){B(f,u,function(v){return this._invoke(u,v)})})}b.isGeneratorFunction=function(f){var u=typeof f=="function"&&f.constructor;return u?u===U||(u.displayName||u.name)==="GeneratorFunction":!1},b.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,M):(f.__proto__=M,B(f,E,"GeneratorFunction")),f.prototype=Object.create(h),f},b.awrap=function(f){return{__await:f}};function w(f,u){function v(Y,q,ie,ue){var oe=_(f[Y],f,q);if(oe.type==="throw")ue(oe.arg);else{var _e=oe.arg,ve=_e.value;return ve&&typeof ve=="object"&&L.call(ve,"__await")?u.resolve(ve.__await).then(function(fe){v("next",fe,ie,ue)},function(fe){v("throw",fe,ie,ue)}):u.resolve(ve).then(function(fe){_e.value=fe,ie(_e)},function(fe){return v("throw",fe,ie,ue)})}}var O;function C(Y,q){function ie(){return new u(function(ue,oe){v(Y,q,ue,oe)})}return O=O?O.then(ie,ie):ie()}this._invoke=C}y(w.prototype),B(w.prototype,W,function(){return this}),b.AsyncIterator=w,b.async=function(f,u,v,O,C){C===void 0&&(C=Promise);var Y=new w(I(f,u,v,O),C);return b.isGeneratorFunction(u)?Y:Y.next().then(function(q){return q.done?q.value:Y.next()})};function P(f,u,v){var O=Z;return function(Y,q){if(O===ae)throw new Error("Generator is already running");if(O===ne){if(Y==="throw")throw q;return ge()}for(v.method=Y,v.arg=q;;){var ie=v.delegate;if(ie){var ue=Q(ie,v);if(ue){if(ue===K)continue;return ue}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(O===Z)throw O=ne,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);O=ae;var oe=_(f,u,v);if(oe.type==="normal"){if(O=v.done?ne:re,oe.arg===K)continue;return{value:oe.arg,done:v.done}}else oe.type==="throw"&&(O=ne,v.method="throw",v.arg=oe.arg)}}}function Q(f,u){var v=f.iterator[u.method];if(v===S){if(u.delegate=null,u.method==="throw"){if(f.iterator.return&&(u.method="return",u.arg=S,Q(f,u),u.method==="throw"))return K;u.method="throw",u.arg=new TypeError("The iterator does not provide a 'throw' method")}return K}var O=_(v,f.iterator,u.arg);if(O.type==="throw")return u.method="throw",u.arg=O.arg,u.delegate=null,K;var C=O.arg;if(!C)return u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,K;if(C.done)u[f.resultName]=C.value,u.next=f.nextLoc,u.method!=="return"&&(u.method="next",u.arg=S);else return C;return u.delegate=null,K}y(h),B(h,E,"Generator"),B(h,T,function(){return this}),B(h,"toString",function(){return"[object Generator]"});function G(f){var u={tryLoc:f[0]};1 in f&&(u.catchLoc=f[1]),2 in f&&(u.finallyLoc=f[2],u.afterLoc=f[3]),this.tryEntries.push(u)}function F(f){var u=f.completion||{};u.type="normal",delete u.arg,f.completion=u}function he(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(G,this),this.reset(!0)}b.keys=function(f){var u=[];for(var v in f)u.push(v);return u.reverse(),function O(){for(;u.length;){var C=u.pop();if(C in f)return O.value=C,O.done=!1,O}return O.done=!0,O}};function se(f){if(f){var u=f[T];if(u)return u.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var v=-1,O=function C(){for(;++v<f.length;)if(L.call(f,v))return C.value=f[v],C.done=!1,C;return C.value=S,C.done=!0,C};return O.next=O}}return{next:ge}}b.values=se;function ge(){return{value:S,done:!0}}return he.prototype={constructor:he,reset:function(f){if(this.prev=0,this.next=0,this.sent=this._sent=S,this.done=!1,this.delegate=null,this.method="next",this.arg=S,this.tryEntries.forEach(F),!f)for(var u in this)u.charAt(0)==="t"&&L.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=S)},stop:function(){this.done=!0;var f=this.tryEntries[0],u=f.completion;if(u.type==="throw")throw u.arg;return this.rval},dispatchException:function(f){if(this.done)throw f;var u=this;function v(ue,oe){return Y.type="throw",Y.arg=f,u.next=ue,oe&&(u.method="next",u.arg=S),!!oe}for(var O=this.tryEntries.length-1;O>=0;--O){var C=this.tryEntries[O],Y=C.completion;if(C.tryLoc==="root")return v("end");if(C.tryLoc<=this.prev){var q=L.call(C,"catchLoc"),ie=L.call(C,"finallyLoc");if(q&&ie){if(this.prev<C.catchLoc)return v(C.catchLoc,!0);if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else if(q){if(this.prev<C.catchLoc)return v(C.catchLoc,!0)}else if(ie){if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(f,u){for(var v=this.tryEntries.length-1;v>=0;--v){var O=this.tryEntries[v];if(O.tryLoc<=this.prev&&L.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var C=O;break}}C&&(f==="break"||f==="continue")&&C.tryLoc<=u&&u<=C.finallyLoc&&(C=null);var Y=C?C.completion:{};return Y.type=f,Y.arg=u,C?(this.method="next",this.next=C.finallyLoc,K):this.complete(Y)},complete:function(f,u){if(f.type==="throw")throw f.arg;return f.type==="break"||f.type==="continue"?this.next=f.arg:f.type==="return"?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):f.type==="normal"&&u&&(this.next=u),K},finish:function(f){for(var u=this.tryEntries.length-1;u>=0;--u){var v=this.tryEntries[u];if(v.finallyLoc===f)return this.complete(v.completion,v.afterLoc),F(v),K}},catch:function(f){for(var u=this.tryEntries.length-1;u>=0;--u){var v=this.tryEntries[u];if(v.tryLoc===f){var O=v.completion;if(O.type==="throw"){var C=O.arg;F(v)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(f,u,v){return this.delegate={iterator:se(f),resultName:u,nextLoc:v},this.method==="next"&&(this.arg=S),K}},b}(j.exports);try{regeneratorRuntime=R}catch(b){typeof globalThis=="object"?globalThis.regeneratorRuntime=R:Function("r","regeneratorRuntime = r")(R)}},695:function(j,R,b){b.d(R,{Z:function(){return z}});function z(L){if(L.geometry&&L.geometry.dispose(),L.material){var S=Array.isArray(L.material)?L.material:[L.material];S.forEach(function(d){var T,W,E,B,I,_,Z,re,ae,ne,K,J,U;(T=d.map)===null||T===void 0||T.dispose(),(W=d.lightMap)===null||W===void 0||W.dispose(),(E=d.bumpMap)===null||E===void 0||E.dispose(),(B=d.normalMap)===null||B===void 0||B.dispose(),(I=d.specularMap)===null||I===void 0||I.dispose(),(_=d.envMap)===null||_===void 0||_.dispose(),(Z=d.alphaMap)===null||Z===void 0||Z.dispose(),(re=d.aoMap)===null||re===void 0||re.dispose(),(ae=d.displacementMap)===null||ae===void 0||ae.dispose(),(ne=d.emissiveMap)===null||ne===void 0||ne.dispose(),(K=d.gradientMap)===null||K===void 0||K.dispose(),(J=d.metalnessMap)===null||J===void 0||J.dispose(),(U=d.roughnessMap)===null||U===void 0||U.dispose(),d.dispose()})}}},584:function(j,R,b){b.d(R,{wf:function(){return d.Z},PO:function(){return E.Z}});var z=b(666),L=b.n(z),S=null,d=b(695),T=b(949);function W(J){if(J.material){var U=Array.isArray(J.material)?J.material:[J.material];U.forEach(function(M){var s,a;(s=M.color)===null||s===void 0||s.convertSRGBToLinear(),(a=M.emissive)===null||a===void 0||a.convertSRGBToLinear(),M.map&&(M.map.encoding=THREE.sRGBEncoding),M.emissiveMap&&(M.emissiveMap.encoding=THREE.sRGBEncoding)})}}var E=b(738),B=b(568),I=b(924),_=b(77),Z=b(484),re=null,ae=null,ne=function(){var J=(0,B.Z)(L().mark(function U(M,s){var a,c,h,y,w,P,Q,G,F;return L().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return a=s.type,c=a===void 0?"blob":a,h=s.version,y=h===void 0?"1":h,se.next=4,(0,_.get)(M);case 4:if(P=se.sent,!(P&&P[y])){se.next=9;break}w=P[y],se.next=15;break;case 9:return se.next=11,(0,Z.Z)(fetch(M).then(function(ge){if(ge.ok)return ge[c]();throw new Error}));case 11:Q=se.sent,G=Q.res,F=Q.err,F||(w=G,(0,_.set)(M,(0,I.Z)({},y,G)));case 15:return se.abrupt("return",w?{url:c==="json"?M:URL.createObjectURL(w),store:w}:{url:M});case 16:case"end":return se.stop()}},U)}));return function(M,s){return J.apply(this,arguments)}}(),K=b(705)},738:function(j,R,b){b.d(R,{Z:function(){return L}});function z(S){return Object.prototype.toString.call(S)==="[object Object]"}function L(S){if(z(S)===!1)return!1;var d=S.constructor;if(d===void 0)return!0;var T=d.prototype;return!(z(T)===!1||T.hasOwnProperty("isPrototypeOf")===!1)}},484:function(j,R,b){b.d(R,{Z:function(){return L}});var z=b(42);function L(S){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S.then(function(T){return(0,z.Z)({err:null,res:T},d)}).catch(function(T){return(0,z.Z)({err:T,res:void 0},d)})}},705:function(j,R,b){var z=b(949),L=new Map,S=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(W,E,B,I,_){var Z=E[B*3],re=E[B*3+1],ae=E[I*3],ne=E[I*3+1],K=E[_*3],J=E[_*3+1],U;if(L.has(W))U=L.get(W);else{var M=T.box3||new THREE.Box3;if(!T.box3){var s=W.parameters.shapes.getPoints();M.setFromArray(s.map(function(w){return[w.x,w.y,0]}).flat())}var a=M.getSize(new THREE.Vector3);T.split&&(a.y/=T.split),U={box:M,size:a},L.set(W,U)}var c=U.box,h=U.size,y=T.split?1-T.split:0;return[new THREE.Vector2((Z-c.min.x)/h.x,(re-c.min.y)/h.y+y),new THREE.Vector2((ae-c.min.x)/h.x,(ne-c.min.y)/h.y+y),new THREE.Vector2((K-c.min.x)/h.x,(J-c.min.y)/h.y+y)]},generateSideWallUV:function(W,E,B,I,_,Z){var re=E[B*3],ae=E[B*3+1],ne=E[B*3+2],K=E[I*3],J=E[I*3+1],U=E[I*3+2],M=E[_*3],s=E[_*3+1],a=E[_*3+2],c=E[Z*3],h=E[Z*3+1],y=E[Z*3+2],w;if(L.has(E))w=L.get(E);else{var P=new THREE.Box3;P.setFromArray(E);var Q=P.getSize(new THREE.Vector3);T.split&&(Q.z/=1-T.split),w={box:P,size:Q},L.set(E,w)}var G=w.box,F=w.size;return Math.abs(ae-J)<Math.abs(re-K)?[new THREE.Vector2((re-G.min.x)/F.x,(ne-G.min.z)/F.z),new THREE.Vector2((K-G.min.x)/F.x,(U-G.min.z)/F.z),new THREE.Vector2((M-G.min.x)/F.x,(a-G.min.z)/F.z),new THREE.Vector2((c-G.min.x)/F.x,(y-G.min.z)/F.z)]:[new THREE.Vector2((ae-G.min.y)/F.y,(ne-G.min.z)/F.z),new THREE.Vector2((J-G.min.y)/F.y,(U-G.min.z)/F.z),new THREE.Vector2((s-G.min.y)/F.y,(a-G.min.z)/F.z),new THREE.Vector2((h-G.min.y)/F.y,(y-G.min.z)/F.z)]}}},d=function(){L.clear()}},77:function(j,R,b){var z=S=>{var d={};return b.d(d,S),d},L=S=>()=>S;j.exports=z({get:()=>Re.get,set:()=>Re.set})},949:function(j,R,b){var z=S=>{var d={};return b.d(d,S),d},L=S=>()=>S;j.exports=z({ACESFilmicToneMapping:()=>$.ACESFilmicToneMapping,AxesHelper:()=>$.AxesHelper,Box3:()=>$.Box3,Camera:()=>$.Camera,CineonToneMapping:()=>$.CineonToneMapping,Clock:()=>$.Clock,Euler:()=>$.Euler,Group:()=>$.Group,LinearEncoding:()=>$.LinearEncoding,LinearToneMapping:()=>$.LinearToneMapping,Matrix4:()=>$.Matrix4,Mesh:()=>$.Mesh,NoToneMapping:()=>$.NoToneMapping,PerspectiveCamera:()=>$.PerspectiveCamera,Points:()=>$.Points,REVISION:()=>$.REVISION,Raycaster:()=>$.Raycaster,ReinhardToneMapping:()=>$.ReinhardToneMapping,Scene:()=>$.Scene,Sprite:()=>$.Sprite,UnsignedByteType:()=>$.UnsignedByteType,Vector2:()=>$.Vector2,Vector3:()=>$.Vector3,WebGLRenderer:()=>$.WebGLRenderer})},568:function(j,R,b){b.d(R,{Z:function(){return L}});function z(S,d,T,W,E,B,I){try{var _=S[B](I),Z=_.value}catch(re){T(re);return}_.done?d(Z):Promise.resolve(Z).then(W,E)}function L(S){return function(){var d=this,T=arguments;return new Promise(function(W,E){var B=S.apply(d,T);function I(Z){z(B,W,E,I,_,"next",Z)}function _(Z){z(B,W,E,I,_,"throw",Z)}I(void 0)})}}},924:function(j,R,b){b.d(R,{Z:function(){return z}});function z(L,S,d){return S in L?Object.defineProperty(L,S,{value:d,enumerable:!0,configurable:!0,writable:!0}):L[S]=d,L}},42:function(j,R,b){b.d(R,{Z:function(){return L}});var z=b(924);function L(S){for(var d=1;d<arguments.length;d++){var T=arguments[d]!=null?arguments[d]:{},W=Object.keys(T);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(T).filter(function(E){return Object.getOwnPropertyDescriptor(T,E).enumerable}))),W.forEach(function(E){(0,z.Z)(S,E,T[E])})}return S}}},je={};function te(j){var R=je[j];if(R!==void 0)return R.exports;var b=je[j]={exports:{}};return Ye[j](b,b.exports,te),b.exports}(function(){te.n=function(j){var R=j&&j.__esModule?function(){return j.default}:function(){return j};return te.d(R,{a:R}),R}})(),function(){te.d=function(j,R){for(var b in R)te.o(R,b)&&!te.o(j,b)&&Object.defineProperty(j,b,{enumerable:!0,get:R[b]})}}(),function(){te.o=function(j,R){return Object.prototype.hasOwnProperty.call(j,R)}}();var we={};(function(){te.d(we,{L6:function(){return Fe},sb:function(){return c},z:function(){return Ee},ZP:function(){return Ee}});function j(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function R(o,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}function b(o,n,t){return n&&R(o.prototype,n),t&&R(o,t),o}var z=te(42);function L(o,n){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(o);n&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,e)}return t}function S(o,n){return n=n!=null?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))}),o}function d(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,e=new Array(n);t<n;t++)e[t]=o[t];return e}function T(o){if(Array.isArray(o))return d(o)}function W(o){if(typeof Symbol!="undefined"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(o,n){if(!!o){if(typeof o=="string")return d(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(o,n)}}function I(o){return T(o)||W(o)||B(o)||E()}var _=te(949),Z=te(187),re=o=>{var n={};return te.d(n,o),n},ae=o=>()=>o,ne=re({default:()=>Ue.default}),K=o=>{var n={};return te.d(n,o),n},J=o=>()=>o,U=K({default:()=>Ze.default}),M=o=>{var n={};return te.d(n,o),n},s=o=>()=>o,a=M({default:()=>Xe.default}),c=function(){"use strict";function o(t){j(this,o),this.guiParams={},t&&(this.guiParams=t)}var n=o.prototype;return n.showGui=function(e){var r=this;!e||Object.keys(this.guiParams).forEach(function(i){var l=e.addFolder(i),p=r.guiParams[i];Object.keys(p).forEach(function(g){var m=p[g],V=m.min,D=m.max,k=m.step,x=m.name,A=m.paramMap,H=m.items,ee=m.value,X=m.target,ce=g.toLowerCase().indexOf("color")>-1,N,le=typeof ee=="undefined"&&X,pe=le?X():p[g],ye=le?g:"value";H?N=l.add(pe,ye,H):ce?N=l.addColor(pe,ye):N=l.add(pe,ye),N=N.name(x||g),typeof V!="undefined"&&(N=N.min(V)),typeof D!="undefined"&&(N=N.max(D)),typeof k!="undefined"&&(N=N.step(k)),N=N.onChange(function(){r.setTargetValue(i,g,pe[ye],A)}),le&&N.listen()})})},n.setTargetValue=function(e,r,i,l){var p=this.guiParams[e][r],g=p.onChange,m=p.target,V=p.value,D=r.toLowerCase().indexOf("color")>-1,k=typeof V=="undefined"&&m;if(m&&!k){var x=m();Array.isArray(x)||(x=[x]),x.forEach(function(A){if(!!A)if(D)try{A[l||r].set(i)}catch(H){r!=="color"&&!l&&console.warn("".concat(r," is not a color,set paramMap"))}else A[l||r]=i})}g&&g(i)},n.setTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(r){Object.keys(e.guiParams[r]).forEach(function(i){var l=e.guiParams[r][i];typeof l.value!="undefined"&&e.setTargetValue(r,i,l.value,l.paramMap)})})},o}(),h={None:_.NoToneMapping,Linear:_.LinearToneMapping,Reinhard:_.ReinhardToneMapping,Cineon:_.CineonToneMapping,ACESFilmic:_.ACESFilmicToneMapping},y={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:_.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1,context:null,stencil:!1,depth:!1,physicallyCorrectLights:!1},w=function(){"use strict";function o(t){j(this,o),this.options=t;var e=t.width,r=t.height,i=t.rendererParams,l=i.context,p=i.alpha,g=i.devicePixelRatio,m=i.antialias,V=i.powerPreference,D=i.toneMapping,k=i.toneMappingExposure,x=i.outputEncoding,A=i.logarithmicDepthBuffer,H=i.preserveDrawingBuffer,ee=i.stencil,X=i.depth,ce=i.physicallyCorrectLights,N=new _.WebGLRenderer({context:l,alpha:p,antialias:m,powerPreference:V,logarithmicDepthBuffer:A,preserveDrawingBuffer:H,stencil:ee,depth:X});N.setSize(e,r),N.setPixelRatio(g),N.toneMapping=h[D],N.toneMappingExposure=k,N.outputEncoding=x,N.physicallyCorrectLights=ce,this.renderer=N}var n=o.prototype;return n.setSize=function(e,r){this.renderer.setSize(e,r)},n.render=function(){var e=this.options,r=e.scene,i=e.camera;this.renderer.render(r,i)},n.setGui=function(e){var r=this,i=new c({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:h,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}});i.showGui(e)},n.dispose=function(){var e,r,i;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(i=this.renderer)===null||i===void 0||i.renderLists.dispose()},o}(),P={fov:45,near:1,far:1e3},Q=function(){"use strict";function o(t){j(this,o),this.oldCameraPosition=new _.Vector3,this.oldCameraRotation=new _.Euler,this.customCamera=!1,this.options=t;var e=t.width,r=t.height,i=t.cameraParams;if(i instanceof _.Camera)this.camera=i,this.customCamera=!0;else{var l=i.fov,p=i.far,g=i.near,m=new _.PerspectiveCamera(l,e/r,g,p);m.position.set(0,0,400),m.lookAt(0,0,0),this.camera=m}}var n=o.prototype;return n.checkCameraChange=function(){var e=this.camera,r=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!r},n.setSize=function(e,r){this.camera instanceof _.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},n.setGui=function(e){var r=this,i=new c({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return r.camera},onChange:function(l){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(l){r.camera.updateProjectionMatrix()}}}});this.camera instanceof _.PerspectiveCamera&&(i.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(l){r.camera.updateProjectionMatrix()}}),i.showGui(e)},o}(),G=te(584),F={background:null},he=function(){"use strict";function o(t){j(this,o),this.options=t;var e=t.camera,r=t.sceneParams,i=r.background,l=new _.Scene;i&&(l.background=i),l.add(e),this.scene=l}var n=o.prototype;return n.addAxesHelper=function(){var e,r=new _.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},n.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,G.wf)(r)})},o}(),se=o=>{var n={};return te.d(n,o),n},ge=o=>()=>o,f=se({MapControls:()=>Me.MapControls,OrbitControls:()=>Me.OrbitControls}),u={},v=function(){"use strict";function o(t){j(this,o),this.options=t;var e=t.camera,r=t.controlParams,i=t.mapControl,l=r.domElement,p=i?new f.MapControls(e,l):new f.OrbitControls(e,l);p.minPolarAngle=Math.PI*.15,p.maxPolarAngle=Math.PI*.85,p.enableDamping=!0,p.dampingFactor=.063,p.autoRotate=!1,p.autoRotateSpeed=-60,p.enableZoom=!0,p.zoomSpeed=.2,this.control=p}var n=o.prototype;return n.limitPan=function(e){var r=e.maxX,i=r===void 0?1/0:r,l=e.minX,p=l===void 0?-1/0:l,g=e.maxZ,m=g===void 0?1/0:g,V=e.minZ,D=V===void 0?-1/0:V,k=e.maxY,x=k===void 0?1/0:k,A=e.minY,H=A===void 0?-1/0:A,ee=this.limitPanV||new _.Vector3,X=this.control,ce=this.options.camera,N=new _.Vector3(p,H,D),le=new _.Vector3(i,x,m);this.limitPanV=ee,ee.copy(X.target),X.target.clamp(N,le),ee.sub(X.target),ce.position.sub(ee)},n.update=function(){this.control.update()},n.dispose=function(){this.control.dispose()},o}(),O=o=>{var n={};return te.d(n,o),n},C=o=>()=>o,Y=O({CSS3DObject:()=>xe.CSS3DObject,CSS3DRenderer:()=>xe.CSS3DRenderer,CSS3DSprite:()=>xe.CSS3DSprite}),q=new _.Vector3,ie=new _.Matrix4,ue=new _.Matrix4,oe=new _.Vector3,_e=new _.Vector3,ve=function o(){"use strict";var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};j(this,o);var t=function(A,H){return oe.setFromMatrixPosition(A.matrixWorld),_e.setFromMatrixPosition(H.matrixWorld),oe.distanceToSquared(_e)},e=function(A){var H=[];return A.traverse(function(ee){ee.isCSS2DObject&&H.push(ee)}),H},r=function(A){for(var H=e(A).sort(function(le,pe){if(le.renderOrder!==pe.renderOrder)return pe.renderOrder-le.renderOrder;var ye=V.objects.get(le).distanceToCameraSquared,He=V.objects.get(pe).distanceToCameraSquared;return ye-He}),ee=H.length,X=0,ce=H.length;X<ce;X++){var N=H[X].userData.zIndexFix||0;H[X].element.style.zIndex=ee-X+N}},i=this,l,p,g,m,V={objects:new WeakMap},D=n.element!==void 0?n.element:document.createElement("div");D.style.overflow="hidden",this.domElement=D,this.getSize=function(){return{width:l,height:p}},this.render=function(x,A){+_.REVISION<144?(x.autoUpdate===!0&&x.updateMatrixWorld(),A.parent===null&&A.updateMatrixWorld()):(x.matrixWorldAutoUpdate===!0&&x.updateMatrixWorld(),A.parent===null&&A.matrixWorldAutoUpdate===!0&&A.updateMatrixWorld()),ie.copy(A.matrixWorldInverse),ue.multiplyMatrices(A.projectionMatrix,ie),k(x,x,A),r(x)},this.setSize=function(x,A){l=x,p=A,g=l/2,m=p/2,D.style.width="".concat(x,"px"),D.style.height="".concat(A,"px")};function k(x,A,H){if(x.isCSS2DObject){q.setFromMatrixPosition(x.matrixWorld),q.applyMatrix4(ue);var ee=x.visible===!0&&q.z>=-1&&q.z<=1&&x.layers.test(H.layers)===!0;if(x.element.style.display=ee===!0?"":"none",ee===!0){x.onBeforeRender(i,A,H);var X=x.element;X.style.transform="translate(-50%,-50%) translate(".concat(q.x*g+g,"px,").concat(-q.y*m+m,"px)"),X.parentNode!==D&&D.appendChild(X),x.onAfterRender(i,A,H)}var ce={distanceToCameraSquared:t(H,x)};V.objects.set(x,ce)}for(var N=0,le=x.children.length;N<le;N++)k(x.children[N],A,H)}},fe={zIndex:"auto"},Ae=function(){"use strict";function o(t){j(this,o),this.container=t}var n=o.prototype;return n.addRenderer=function(e,r){var i=this.container,l=i.offsetWidth,p=i.offsetHeight,g=e==="css2d"?new ve:new Y.CSS3DRenderer;g.domElement.style.position="absolute",g.domElement.style.top="0",g.domElement.style.pointerEvents="none",g.domElement.style.zIndex=r.zIndex,g.setSize(l,p),i.appendChild(g.domElement),e==="css2d"?this.css2Drenderer=g:e==="css3d"&&(this.css3Drenderer=g)},n.setSize=function(e,r){var i,l;(i=this.css2Drenderer)===null||i===void 0||i.setSize(e,r),(l=this.css3Drenderer)===null||l===void 0||l.setSize(e,r)},n.render=function(e,r){var i,l;(i=this.css2Drenderer)===null||i===void 0||i.render(e,r),(l=this.css3Drenderer)===null||l===void 0||l.render(e,r)},n.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},o}(),Te=o=>{var n={};return te.d(n,o),n},et=o=>()=>o,de=Te({BlendFunction:()=>me.BlendFunction,CopyPass:()=>me.CopyPass,EffectComposer:()=>me.EffectComposer,EffectPass:()=>me.EffectPass,FXAAEffect:()=>me.FXAAEffect,RenderPass:()=>me.RenderPass,SelectiveBloomEffect:()=>me.SelectiveBloomEffect}),De={luminanceThreshold:.1,luminanceSmoothing:.3,mipmapBlur:!0,intensity:4},ze=function(){"use strict";function o(t){j(this,o),this.active=!0,this.options=t;var e=t.renderer,r=t.scene,i=t.camera,l=t.composerParams,p=l.multisampling,g=e.capabilities.maxSamples,m=new de.EffectComposer(e,{multisampling:Math.min(p,g)});m.addPass(new de.RenderPass(r,i)),this.finalComposer=m,this.renderer=e,this.scene=r,this.camera=i}var n=o.prototype;return n.addCopyPass=function(){var e=new de.CopyPass;this.finalComposer.addPass(e),this.copyPass=e},n.addFXAAPass=function(){var e=this.camera,r=new de.FXAAEffect({blendFunction:de.BlendFunction.NORMAL}),i=new de.EffectPass(e,r);this.finalComposer.addPass(i),this.fxaaPass=i},n.addBloomPass=function(e){var r=this,i=r.camera,l=r.scene,p=new de.SelectiveBloomEffect(l,i,(0,z.Z)({},e));p.inverted=!0;var g=new de.EffectPass(i,p);this.finalComposer.addPass(g),this.bloomPass=g,this.bloomEffect=p},n.addBloomGui=function(e){var r=this,i=new c({bloom:{intensity:{min:0,max:10,step:.01,target:function(){return r.bloomEffect}}},bloomLuminanceFilter:{enabled:{value:this.bloomEffect.luminancePass.enabled,onChange:function(l){r.bloomEffect.luminancePass.enabled=l}},threshold:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}},smoothing:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}}}});i.showGui(e)},n.toggleBloomSelection=function(e){this.bloomEffect.selection.toggle(e)},n.getSize=function(){var e=this.options.renderer;return e.getSize(new _.Vector2)},n.enable=function(){this.active||(this.active=!0)},n.disable=function(){!this.active||(this.active=!1)},n.checkCopyPass=function(){var e=this.finalComposer.passes.some(function(r){return r instanceof de.RenderPass||r instanceof de.CopyPass?!1:r.enabled});e&&this.copyPass?this.copyPass.enabled=!1:!e&&this.copyPass?this.copyPass.enabled=!0:!e&&!this.copyPass&&this.addCopyPass()},n.setSize=function(e,r){this.finalComposer.setSize(e,r)},n.render=function(){!this.active||this.finalComposer.render()},n.dispose=function(){this.finalComposer.dispose()},o}(),Be=function(){try{var o=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&o.getContext("webgl2"))}catch(n){return!1}},tt=0,be=!1,Se=Be()!==!1,Ee=function(){"use strict";function o(t){j(this,o),this.raycaster=new _.Raycaster,this.installPlugins=new Map,this.event=new Z.EventEmitter,this.clock=new _.Clock,this.options=(0,ne.default)(o.options,t,{isMergeableObject:G.PO});var e=this.options,r=e.container,i=e.stats,l=e.gui,p=e.resizeObserver;if(l){var g=new a.default;g.open(!1),this.gui=g}if(i){var m=new U.default;m.showPanel(0),m.dom.style.position="absolute",r.appendChild(m.dom),this.stats=m}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),p&&this.initResizeObserver(),this.clock.getDelta(),this.clock.getElapsedTime()}var n=o.prototype;return n.use=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var p;(p=e).install.apply(p,[this].concat(I(i))),this.installPlugins.set(e,!0)}},n.init=function(){var e=this.options,r=e.container,i=e.isdev,l=e.axesHelper,p=e.renderer,g=e.scene,m=e.camera,V=this.getSize(),D=V.width,k=V.height,x=new Q({isdev:i,width:D,height:k,cameraParams:m});this.gui&&x.setGui(this.gui);var A=x.camera,H=new he({camera:A,sceneParams:g}),ee=H.scene,X=new w({width:D,height:k,scene:ee,camera:A,isdev:i,rendererParams:S((0,z.Z)({},p),{antialias:!1})});this.gui&&X.setGui(this.gui);var ce=X.renderer;l&&H.addAxesHelper(),this.sceneController=H,this.rendererController=X,this.cameraController=x,r.appendChild(ce.domElement)},n.initComposer=function(){var e=this.options,r=e.bloom,i=e.bloomParams,l=e.renderer,p=e.multisampling,g=l.antialias;g==="msaa"&&!Se&&(g=!1,console.warn("MSAA is not supported on this browser"));var m=new ze({renderer:this.renderer,scene:this.scene,camera:this.camera,composerParams:{multisampling:g==="msaa"?p:0,type:_.UnsignedByteType,encoding:l.outputEncoding}});this.composerController=m,r&&(m.addBloomPass(i),this.gui&&m.addBloomGui(this.gui)),g==="fxaa"&&m.addFXAAPass(),m.checkCopyPass(),this.event.on("passcheck",function(){m.checkCopyPass()})},n.initCSSRenderer=function(){var e=this.options,r=e.container,i=e.css2DRenderer,l=e.css3DRenderer,p=e.css2DRendererParams,g=e.css3DRendererParams;if(i||l){var m=new Ae(r);i&&m.addRenderer("css2d",p),l&&m.addRenderer("css3d",g),this.cssRendererController=m}},n.initControl=function(){var e=this.options,r=e.control,i=e.mapControl,l=e.controlParams;if(r){var p=new v({camera:this.camera,controlParams:{domElement:(l==null?void 0:l.domElement)||this.renderer.domElement},mapControl:i});this.controlController=p}},n.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},n.initResizeObserver=function(){var e=this,r=this.options.container;if(!this.resizeObserver){var i=new ResizeObserver(function(l){var p=!0,g=!1,m=void 0;try{for(var V=l[Symbol.iterator](),D;!(p=(D=V.next()).done);p=!0){var k=D.value,x=k.contentRect;e.handeleResize(x.width,x.height),e.render()}}catch(A){g=!0,m=A}finally{try{!p&&V.return!=null&&V.return()}finally{if(g)throw m}}});i.observe(r),this.resizeObserver=i}},n.handeleResize=function(e,r){var i=this,l=i.rendererController,p=i.cameraController,g=i.composerController,m=i.cssRendererController;p==null||p.setSize(e,r),l==null||l.setSize(e,r),g==null||g.setSize(e,r),m==null||m.setSize(e,r),this.installPlugins.forEach(function(V,D){var k;(k=D.resize)===null||k===void 0||k.call(D,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},n.pick=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,l=this,p=l.raycaster,g=l.options,m=g.container,V=new _.Vector2,D=m.getBoundingClientRect();if(V.x=(e.clientX-D.left)/(D.right-D.left)*2-1,V.y=-((e.clientY-D.top)/(D.bottom-D.top))*2+1,this.camera&&this.scene){p.setFromCamera(V,this.camera);var k=p.intersectObjects(r||this.scene.children,i);if(k.length)return{object:k[0].object,intersects:k}}},n.render=function(){var e,r,i,l,p=this,g=p.renderer,m=p.scene,V=p.camera,D=p.clock;if(!(!g||!m||!V||this.options.staticRender&&!this.cameraController.checkCameraChange())){var k=D.getDelta(),x=D.getElapsedTime();if((e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(H,ee){var X;(X=ee.update)===null||X===void 0||X.call(ee,k,x)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var A;(A=this.rendererController)===null||A===void 0||A.render()}(i=this.cssRendererController)===null||i===void 0||i.render(m,V),(l=this.stats)===null||l===void 0||l.update(),this.event.emit("render",{delta:k,elapsed:x})}},n.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},n.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},n.dispose=function(){var e,r,i,l,p,g,m;this.stop(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(V,D){var k;(k=D.dispose)===null||k===void 0||k.call(D)}),(r=this.controlController)===null||r===void 0||r.dispose(),(i=this.cssRendererController)===null||i===void 0||i.dispose(),(l=this.sceneController)===null||l===void 0||l.dispose(),(p=this.composerController)===null||p===void 0||p.dispose(),(g=this.rendererController)===null||g===void 0||g.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(m=this.gui)===null||m===void 0||m.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},b(o,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),o}();Ee.options={isdev:be,stats:be,gui:be,axesHelper:be,control:be,resizeObserver:!0,renderer:S((0,z.Z)({},y),{antialias:Se?"msaa":"fxaa"}),staticRender:!1,multisampling:4,scene:F,camera:P,bloom:!1,bloomParams:De,css2DRenderer:!1,css2DRendererParams:(0,z.Z)({},fe),css3DRenderer:!1,css3DRendererParams:(0,z.Z)({},fe)};function Pe(o,n){return Pe=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},Pe(o,n)}function Ge(o,n){return Pe(o,n)}function ke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}function Ce(o,n,t){return ke()?Ce=Reflect.construct:Ce=function(r,i,l){var p=[null];p.push.apply(p,i);var g=Function.bind.apply(r,p),m=new g;return l&&Ge(m,l.prototype),m},Ce.apply(null,arguments)}function Oe(o,n,t){return Ce.apply(null,arguments)}var Ne=te(484);function Ie(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t={};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),o&&(t.promise=(0,Ne.Z)(t.promise,n)),t}var Ve=o=>{var n={};return te.d(n,o),n},rt=o=>()=>o,We=Ve({CSS2DObject:()=>Ke.CSS2DObject}),Le=function(o){o&&((0,G.wf)(o),o.children.forEach(function(n){n.userData.BaseObject_||Le(n)}))},Fe=function(){"use strict";function o(){j(this,o),this.objecttype__="BaseObject",this.userData={},this.pm=Ie(),this.visible=!1}var n=o.prototype;return n.init=function(){},n.create=function(){},n.render=function(){},n.update=function(e,r){},n.resize=function(e,r){},n.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},n.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},n.isVisible=function(){return this.visible},n.createMesh=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.object3d=Oe(_.Mesh,I(r)),this},n.createGroup=function(){return this.object3d=new _.Group,this},n.createPoints=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.object3d=Oe(_.Points,I(r)),this},n.createCSS2DObject=function(e){return this.object3d=new We.CSS2DObject(e),this},n.createCSS3DObject=function(e){return this.object3d=new Y.CSS3DObject(e),this},n.createCSS3DSprite=function(e){return this.object3d=new Y.CSS3DSprite(e),this},n.createSprite=function(e){return this.object3d=new _.Sprite(e),this},n.add=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var l;return(l=this.object3d).add.apply(l,I(r)),this},n.remove=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var l;return(l=this.object3d).remove.apply(l,I(r)),this},n.getSize=function(){var e=new _.Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new _.Vector3)}},n.traverse=function(e){e(this),this.children.forEach(function(r){r.traverse(e)})},n.dispose=function(){Le(this.object3d)},b(o,[{key:"parent",get:function(){var e=this.object3d.parent;return(e==null?void 0:e.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(e){return e.userData.BaseObject_}).filter(function(e){return!!e})}}]),o}()})();var $e=we.L6,Je=we.sb,Qe=we.z,qe=we.ZP;export{$e as BaseObject,Je as GUIObject,Qe as Pencil,qe as default};
|
|
1
|
+
import*as Re from"idb-keyval";import*as $ from"three";import*as Ue from"deepmerge";import*as Ze from"three/examples/jsm/libs/stats.module";import*as Xe from"lil-gui";import*as Me from"three/examples/jsm/controls/OrbitControls";import*as xe from"three/examples/jsm/renderers/CSS3DRenderer";import*as me from"postprocessing";import*as Ke from"three/examples/jsm/renderers/CSS2DRenderer";var Ye={187:function(j){var R=typeof Reflect=="object"?Reflect:null,b=R&&typeof R.apply=="function"?R.apply:function(a,c,h){return Function.prototype.apply.call(a,c,h)},D;R&&typeof R.ownKeys=="function"?D=R.ownKeys:Object.getOwnPropertySymbols?D=function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:D=function(a){return Object.getOwnPropertyNames(a)};function L(s){console&&console.warn&&console.warn(s)}var S=Number.isNaN||function(a){return a!==a};function d(){d.init.call(this)}j.exports=d,j.exports.once=J,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var T=10;function W(s){if(typeof s!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof s)}Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(s){if(typeof s!="number"||s<0||S(s))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+s+".");T=s}}),d.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},d.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||S(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this};function E(s){return s._maxListeners===void 0?d.defaultMaxListeners:s._maxListeners}d.prototype.getMaxListeners=function(){return E(this)},d.prototype.emit=function(a){for(var c=[],h=1;h<arguments.length;h++)c.push(arguments[h]);var y=a==="error",w=this._events;if(w!==void 0)y=y&&w.error===void 0;else if(!y)return!1;if(y){var P;if(c.length>0&&(P=c[0]),P instanceof Error)throw P;var Q=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw Q.context=P,Q}var G=w[a];if(G===void 0)return!1;if(typeof G=="function")b(G,this,c);else for(var F=G.length,de=ae(G,F),h=0;h<F;++h)b(de[h],this,c);return!0};function B(s,a,c,h){var y,w,P;if(W(c),w=s._events,w===void 0?(w=s._events=Object.create(null),s._eventsCount=0):(w.newListener!==void 0&&(s.emit("newListener",a,c.listener?c.listener:c),w=s._events),P=w[a]),P===void 0)P=w[a]=c,++s._eventsCount;else if(typeof P=="function"?P=w[a]=h?[c,P]:[P,c]:h?P.unshift(c):P.push(c),y=E(s),y>0&&P.length>y&&!P.warned){P.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=s,Q.type=a,Q.count=P.length,L(Q)}return s}d.prototype.addListener=function(a,c){return B(this,a,c,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(a,c){return B(this,a,c,!0)};function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(s,a,c){var h={fired:!1,wrapFn:void 0,target:s,type:a,listener:c},y=I.bind(h);return y.listener=c,h.wrapFn=y,y}d.prototype.once=function(a,c){return W(c),this.on(a,_(this,a,c)),this},d.prototype.prependOnceListener=function(a,c){return W(c),this.prependListener(a,_(this,a,c)),this},d.prototype.removeListener=function(a,c){var h,y,w,P,Q;if(W(c),y=this._events,y===void 0)return this;if(h=y[a],h===void 0)return this;if(h===c||h.listener===c)--this._eventsCount===0?this._events=Object.create(null):(delete y[a],y.removeListener&&this.emit("removeListener",a,h.listener||c));else if(typeof h!="function"){for(w=-1,P=h.length-1;P>=0;P--)if(h[P]===c||h[P].listener===c){Q=h[P].listener,w=P;break}if(w<0)return this;w===0?h.shift():ne(h,w),h.length===1&&(y[a]=h[0]),y.removeListener!==void 0&&this.emit("removeListener",a,Q||c)}return this},d.prototype.off=d.prototype.removeListener,d.prototype.removeAllListeners=function(a){var c,h,y;if(h=this._events,h===void 0)return this;if(h.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):h[a]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete h[a]),this;if(arguments.length===0){var w=Object.keys(h),P;for(y=0;y<w.length;++y)P=w[y],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(c=h[a],typeof c=="function")this.removeListener(a,c);else if(c!==void 0)for(y=c.length-1;y>=0;y--)this.removeListener(a,c[y]);return this};function Z(s,a,c){var h=s._events;if(h===void 0)return[];var y=h[a];return y===void 0?[]:typeof y=="function"?c?[y.listener||y]:[y]:c?K(y):ae(y,y.length)}d.prototype.listeners=function(a){return Z(this,a,!0)},d.prototype.rawListeners=function(a){return Z(this,a,!1)},d.listenerCount=function(s,a){return typeof s.listenerCount=="function"?s.listenerCount(a):re.call(s,a)},d.prototype.listenerCount=re;function re(s){var a=this._events;if(a!==void 0){var c=a[s];if(typeof c=="function")return 1;if(c!==void 0)return c.length}return 0}d.prototype.eventNames=function(){return this._eventsCount>0?D(this._events):[]};function ae(s,a){for(var c=new Array(a),h=0;h<a;++h)c[h]=s[h];return c}function ne(s,a){for(;a+1<s.length;a++)s[a]=s[a+1];s.pop()}function K(s){for(var a=new Array(s.length),c=0;c<a.length;++c)a[c]=s[c].listener||s[c];return a}function J(s,a){return new Promise(function(c,h){function y(P){s.removeListener(a,w),h(P)}function w(){typeof s.removeListener=="function"&&s.removeListener("error",y),c([].slice.call(arguments))}M(s,a,w,{once:!0}),a!=="error"&&U(s,y,{once:!0})})}function U(s,a,c){typeof s.on=="function"&&M(s,"error",a,c)}function M(s,a,c,h){if(typeof s.on=="function")h.once?s.once(a,c):s.on(a,c);else if(typeof s.addEventListener=="function")s.addEventListener(a,function y(w){h.once&&s.removeEventListener(a,y),c(w)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof s)}},666:function(j){var R=function(b){"use strict";var D=Object.prototype,L=D.hasOwnProperty,S,d=typeof Symbol=="function"?Symbol:{},T=d.iterator||"@@iterator",W=d.asyncIterator||"@@asyncIterator",E=d.toStringTag||"@@toStringTag";function B(f,u,v){return Object.defineProperty(f,u,{value:v,enumerable:!0,configurable:!0,writable:!0}),f[u]}try{B({},"")}catch(f){B=function(u,v,O){return u[v]=O}}function I(f,u,v,O){var C=u&&u.prototype instanceof J?u:J,Y=Object.create(C.prototype),q=new de(O||[]);return Y._invoke=P(f,v,q),Y}b.wrap=I;function _(f,u,v){try{return{type:"normal",arg:f.call(u,v)}}catch(O){return{type:"throw",arg:O}}}var Z="suspendedStart",re="suspendedYield",ae="executing",ne="completed",K={};function J(){}function U(){}function M(){}var s={};B(s,T,function(){return this});var a=Object.getPrototypeOf,c=a&&a(a(se([])));c&&c!==D&&L.call(c,T)&&(s=c);var h=M.prototype=J.prototype=Object.create(s);U.prototype=M,B(h,"constructor",M),B(M,"constructor",U),U.displayName=B(M,E,"GeneratorFunction");function y(f){["next","throw","return"].forEach(function(u){B(f,u,function(v){return this._invoke(u,v)})})}b.isGeneratorFunction=function(f){var u=typeof f=="function"&&f.constructor;return u?u===U||(u.displayName||u.name)==="GeneratorFunction":!1},b.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,M):(f.__proto__=M,B(f,E,"GeneratorFunction")),f.prototype=Object.create(h),f},b.awrap=function(f){return{__await:f}};function w(f,u){function v(Y,q,ie,ue){var oe=_(f[Y],f,q);if(oe.type==="throw")ue(oe.arg);else{var _e=oe.arg,ve=_e.value;return ve&&typeof ve=="object"&&L.call(ve,"__await")?u.resolve(ve.__await).then(function(fe){v("next",fe,ie,ue)},function(fe){v("throw",fe,ie,ue)}):u.resolve(ve).then(function(fe){_e.value=fe,ie(_e)},function(fe){return v("throw",fe,ie,ue)})}}var O;function C(Y,q){function ie(){return new u(function(ue,oe){v(Y,q,ue,oe)})}return O=O?O.then(ie,ie):ie()}this._invoke=C}y(w.prototype),B(w.prototype,W,function(){return this}),b.AsyncIterator=w,b.async=function(f,u,v,O,C){C===void 0&&(C=Promise);var Y=new w(I(f,u,v,O),C);return b.isGeneratorFunction(u)?Y:Y.next().then(function(q){return q.done?q.value:Y.next()})};function P(f,u,v){var O=Z;return function(Y,q){if(O===ae)throw new Error("Generator is already running");if(O===ne){if(Y==="throw")throw q;return ge()}for(v.method=Y,v.arg=q;;){var ie=v.delegate;if(ie){var ue=Q(ie,v);if(ue){if(ue===K)continue;return ue}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(O===Z)throw O=ne,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);O=ae;var oe=_(f,u,v);if(oe.type==="normal"){if(O=v.done?ne:re,oe.arg===K)continue;return{value:oe.arg,done:v.done}}else oe.type==="throw"&&(O=ne,v.method="throw",v.arg=oe.arg)}}}function Q(f,u){var v=f.iterator[u.method];if(v===S){if(u.delegate=null,u.method==="throw"){if(f.iterator.return&&(u.method="return",u.arg=S,Q(f,u),u.method==="throw"))return K;u.method="throw",u.arg=new TypeError("The iterator does not provide a 'throw' method")}return K}var O=_(v,f.iterator,u.arg);if(O.type==="throw")return u.method="throw",u.arg=O.arg,u.delegate=null,K;var C=O.arg;if(!C)return u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,K;if(C.done)u[f.resultName]=C.value,u.next=f.nextLoc,u.method!=="return"&&(u.method="next",u.arg=S);else return C;return u.delegate=null,K}y(h),B(h,E,"Generator"),B(h,T,function(){return this}),B(h,"toString",function(){return"[object Generator]"});function G(f){var u={tryLoc:f[0]};1 in f&&(u.catchLoc=f[1]),2 in f&&(u.finallyLoc=f[2],u.afterLoc=f[3]),this.tryEntries.push(u)}function F(f){var u=f.completion||{};u.type="normal",delete u.arg,f.completion=u}function de(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(G,this),this.reset(!0)}b.keys=function(f){var u=[];for(var v in f)u.push(v);return u.reverse(),function O(){for(;u.length;){var C=u.pop();if(C in f)return O.value=C,O.done=!1,O}return O.done=!0,O}};function se(f){if(f){var u=f[T];if(u)return u.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var v=-1,O=function C(){for(;++v<f.length;)if(L.call(f,v))return C.value=f[v],C.done=!1,C;return C.value=S,C.done=!0,C};return O.next=O}}return{next:ge}}b.values=se;function ge(){return{value:S,done:!0}}return de.prototype={constructor:de,reset:function(f){if(this.prev=0,this.next=0,this.sent=this._sent=S,this.done=!1,this.delegate=null,this.method="next",this.arg=S,this.tryEntries.forEach(F),!f)for(var u in this)u.charAt(0)==="t"&&L.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=S)},stop:function(){this.done=!0;var f=this.tryEntries[0],u=f.completion;if(u.type==="throw")throw u.arg;return this.rval},dispatchException:function(f){if(this.done)throw f;var u=this;function v(ue,oe){return Y.type="throw",Y.arg=f,u.next=ue,oe&&(u.method="next",u.arg=S),!!oe}for(var O=this.tryEntries.length-1;O>=0;--O){var C=this.tryEntries[O],Y=C.completion;if(C.tryLoc==="root")return v("end");if(C.tryLoc<=this.prev){var q=L.call(C,"catchLoc"),ie=L.call(C,"finallyLoc");if(q&&ie){if(this.prev<C.catchLoc)return v(C.catchLoc,!0);if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else if(q){if(this.prev<C.catchLoc)return v(C.catchLoc,!0)}else if(ie){if(this.prev<C.finallyLoc)return v(C.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(f,u){for(var v=this.tryEntries.length-1;v>=0;--v){var O=this.tryEntries[v];if(O.tryLoc<=this.prev&&L.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var C=O;break}}C&&(f==="break"||f==="continue")&&C.tryLoc<=u&&u<=C.finallyLoc&&(C=null);var Y=C?C.completion:{};return Y.type=f,Y.arg=u,C?(this.method="next",this.next=C.finallyLoc,K):this.complete(Y)},complete:function(f,u){if(f.type==="throw")throw f.arg;return f.type==="break"||f.type==="continue"?this.next=f.arg:f.type==="return"?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):f.type==="normal"&&u&&(this.next=u),K},finish:function(f){for(var u=this.tryEntries.length-1;u>=0;--u){var v=this.tryEntries[u];if(v.finallyLoc===f)return this.complete(v.completion,v.afterLoc),F(v),K}},catch:function(f){for(var u=this.tryEntries.length-1;u>=0;--u){var v=this.tryEntries[u];if(v.tryLoc===f){var O=v.completion;if(O.type==="throw"){var C=O.arg;F(v)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(f,u,v){return this.delegate={iterator:se(f),resultName:u,nextLoc:v},this.method==="next"&&(this.arg=S),K}},b}(j.exports);try{regeneratorRuntime=R}catch(b){typeof globalThis=="object"?globalThis.regeneratorRuntime=R:Function("r","regeneratorRuntime = r")(R)}},695:function(j,R,b){b.d(R,{Z:function(){return D}});function D(L){if(L.geometry&&L.geometry.dispose(),L.material){var S=Array.isArray(L.material)?L.material:[L.material];S.forEach(function(d){var T,W,E,B,I,_,Z,re,ae,ne,K,J,U;(T=d.map)===null||T===void 0||T.dispose(),(W=d.lightMap)===null||W===void 0||W.dispose(),(E=d.bumpMap)===null||E===void 0||E.dispose(),(B=d.normalMap)===null||B===void 0||B.dispose(),(I=d.specularMap)===null||I===void 0||I.dispose(),(_=d.envMap)===null||_===void 0||_.dispose(),(Z=d.alphaMap)===null||Z===void 0||Z.dispose(),(re=d.aoMap)===null||re===void 0||re.dispose(),(ae=d.displacementMap)===null||ae===void 0||ae.dispose(),(ne=d.emissiveMap)===null||ne===void 0||ne.dispose(),(K=d.gradientMap)===null||K===void 0||K.dispose(),(J=d.metalnessMap)===null||J===void 0||J.dispose(),(U=d.roughnessMap)===null||U===void 0||U.dispose(),d.dispose()})}}},584:function(j,R,b){b.d(R,{wf:function(){return d.Z},PO:function(){return E.Z}});var D=b(666),L=b.n(D),S=null,d=b(695),T=b(949);function W(J){if(J.material){var U=Array.isArray(J.material)?J.material:[J.material];U.forEach(function(M){var s,a;(s=M.color)===null||s===void 0||s.convertSRGBToLinear(),(a=M.emissive)===null||a===void 0||a.convertSRGBToLinear(),M.map&&(M.map.encoding=THREE.sRGBEncoding),M.emissiveMap&&(M.emissiveMap.encoding=THREE.sRGBEncoding)})}}var E=b(738),B=b(568),I=b(924),_=b(77),Z=b(484),re=null,ae=null,ne=function(){var J=(0,B.Z)(L().mark(function U(M,s){var a,c,h,y,w,P,Q,G,F;return L().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return a=s.type,c=a===void 0?"blob":a,h=s.version,y=h===void 0?"1":h,se.next=4,(0,_.get)(M);case 4:if(P=se.sent,!(P&&P[y])){se.next=9;break}w=P[y],se.next=15;break;case 9:return se.next=11,(0,Z.Z)(fetch(M).then(function(ge){if(ge.ok)return ge[c]();throw new Error}));case 11:Q=se.sent,G=Q.res,F=Q.err,F||(w=G,(0,_.set)(M,(0,I.Z)({},y,G)));case 15:return se.abrupt("return",w?{url:c==="json"?M:URL.createObjectURL(w),store:w}:{url:M});case 16:case"end":return se.stop()}},U)}));return function(M,s){return J.apply(this,arguments)}}(),K=b(705)},738:function(j,R,b){b.d(R,{Z:function(){return L}});function D(S){return Object.prototype.toString.call(S)==="[object Object]"}function L(S){if(D(S)===!1)return!1;var d=S.constructor;if(d===void 0)return!0;var T=d.prototype;return!(D(T)===!1||T.hasOwnProperty("isPrototypeOf")===!1)}},484:function(j,R,b){b.d(R,{Z:function(){return L}});var D=b(42);function L(S){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return S.then(function(T){return(0,D.Z)({err:null,res:T},d)}).catch(function(T){return(0,D.Z)({err:T,res:void 0},d)})}},705:function(j,R,b){var D=b(949),L=new Map,S=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(W,E,B,I,_){var Z=E[B*3],re=E[B*3+1],ae=E[I*3],ne=E[I*3+1],K=E[_*3],J=E[_*3+1],U;if(L.has(W))U=L.get(W);else{var M=T.box3||new THREE.Box3;if(!T.box3){var s=W.parameters.shapes.getPoints();M.setFromArray(s.map(function(w){return[w.x,w.y,0]}).flat())}var a=M.getSize(new THREE.Vector3);T.split&&(a.y/=T.split),U={box:M,size:a},L.set(W,U)}var c=U.box,h=U.size,y=T.split?1-T.split:0;return[new THREE.Vector2((Z-c.min.x)/h.x,(re-c.min.y)/h.y+y),new THREE.Vector2((ae-c.min.x)/h.x,(ne-c.min.y)/h.y+y),new THREE.Vector2((K-c.min.x)/h.x,(J-c.min.y)/h.y+y)]},generateSideWallUV:function(W,E,B,I,_,Z){var re=E[B*3],ae=E[B*3+1],ne=E[B*3+2],K=E[I*3],J=E[I*3+1],U=E[I*3+2],M=E[_*3],s=E[_*3+1],a=E[_*3+2],c=E[Z*3],h=E[Z*3+1],y=E[Z*3+2],w;if(L.has(E))w=L.get(E);else{var P=new THREE.Box3;P.setFromArray(E);var Q=P.getSize(new THREE.Vector3);T.split&&(Q.z/=1-T.split),w={box:P,size:Q},L.set(E,w)}var G=w.box,F=w.size;return Math.abs(ae-J)<Math.abs(re-K)?[new THREE.Vector2((re-G.min.x)/F.x,(ne-G.min.z)/F.z),new THREE.Vector2((K-G.min.x)/F.x,(U-G.min.z)/F.z),new THREE.Vector2((M-G.min.x)/F.x,(a-G.min.z)/F.z),new THREE.Vector2((c-G.min.x)/F.x,(y-G.min.z)/F.z)]:[new THREE.Vector2((ae-G.min.y)/F.y,(ne-G.min.z)/F.z),new THREE.Vector2((J-G.min.y)/F.y,(U-G.min.z)/F.z),new THREE.Vector2((s-G.min.y)/F.y,(a-G.min.z)/F.z),new THREE.Vector2((h-G.min.y)/F.y,(y-G.min.z)/F.z)]}}},d=function(){L.clear()}},77:function(j,R,b){var D=S=>{var d={};return b.d(d,S),d},L=S=>()=>S;j.exports=D({get:()=>Re.get,set:()=>Re.set})},949:function(j,R,b){var D=S=>{var d={};return b.d(d,S),d},L=S=>()=>S;j.exports=D({ACESFilmicToneMapping:()=>$.ACESFilmicToneMapping,AxesHelper:()=>$.AxesHelper,Box3:()=>$.Box3,Camera:()=>$.Camera,CineonToneMapping:()=>$.CineonToneMapping,Clock:()=>$.Clock,Euler:()=>$.Euler,Group:()=>$.Group,LinearEncoding:()=>$.LinearEncoding,LinearToneMapping:()=>$.LinearToneMapping,Matrix4:()=>$.Matrix4,Mesh:()=>$.Mesh,NoToneMapping:()=>$.NoToneMapping,PerspectiveCamera:()=>$.PerspectiveCamera,Points:()=>$.Points,REVISION:()=>$.REVISION,Raycaster:()=>$.Raycaster,ReinhardToneMapping:()=>$.ReinhardToneMapping,Scene:()=>$.Scene,Sprite:()=>$.Sprite,UnsignedByteType:()=>$.UnsignedByteType,Vector2:()=>$.Vector2,Vector3:()=>$.Vector3,WebGLRenderer:()=>$.WebGLRenderer})},568:function(j,R,b){b.d(R,{Z:function(){return L}});function D(S,d,T,W,E,B,I){try{var _=S[B](I),Z=_.value}catch(re){T(re);return}_.done?d(Z):Promise.resolve(Z).then(W,E)}function L(S){return function(){var d=this,T=arguments;return new Promise(function(W,E){var B=S.apply(d,T);function I(Z){D(B,W,E,I,_,"next",Z)}function _(Z){D(B,W,E,I,_,"throw",Z)}I(void 0)})}}},924:function(j,R,b){b.d(R,{Z:function(){return D}});function D(L,S,d){return S in L?Object.defineProperty(L,S,{value:d,enumerable:!0,configurable:!0,writable:!0}):L[S]=d,L}},42:function(j,R,b){b.d(R,{Z:function(){return L}});var D=b(924);function L(S){for(var d=1;d<arguments.length;d++){var T=arguments[d]!=null?arguments[d]:{},W=Object.keys(T);typeof Object.getOwnPropertySymbols=="function"&&(W=W.concat(Object.getOwnPropertySymbols(T).filter(function(E){return Object.getOwnPropertyDescriptor(T,E).enumerable}))),W.forEach(function(E){(0,D.Z)(S,E,T[E])})}return S}}},je={};function te(j){var R=je[j];if(R!==void 0)return R.exports;var b=je[j]={exports:{}};return Ye[j](b,b.exports,te),b.exports}(function(){te.n=function(j){var R=j&&j.__esModule?function(){return j.default}:function(){return j};return te.d(R,{a:R}),R}})(),function(){te.d=function(j,R){for(var b in R)te.o(R,b)&&!te.o(j,b)&&Object.defineProperty(j,b,{enumerable:!0,get:R[b]})}}(),function(){te.o=function(j,R){return Object.prototype.hasOwnProperty.call(j,R)}}();var we={};(function(){te.d(we,{L6:function(){return Fe},sb:function(){return c},z:function(){return Ee},ZP:function(){return Ee}});function j(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function R(o,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}function b(o,n,t){return n&&R(o.prototype,n),t&&R(o,t),o}var D=te(42);function L(o,n){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(o);n&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,e)}return t}function S(o,n){return n=n!=null?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))}),o}function d(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,e=new Array(n);t<n;t++)e[t]=o[t];return e}function T(o){if(Array.isArray(o))return d(o)}function W(o){if(typeof Symbol!="undefined"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(o,n){if(!!o){if(typeof o=="string")return d(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(o,n)}}function I(o){return T(o)||W(o)||B(o)||E()}var _=te(949),Z=te(187),re=o=>{var n={};return te.d(n,o),n},ae=o=>()=>o,ne=re({default:()=>Ue.default}),K=o=>{var n={};return te.d(n,o),n},J=o=>()=>o,U=K({default:()=>Ze.default}),M=o=>{var n={};return te.d(n,o),n},s=o=>()=>o,a=M({default:()=>Xe.default}),c=function(){"use strict";function o(t){j(this,o),this.guiParams={},t&&(this.guiParams=t)}var n=o.prototype;return n.showGui=function(e){var r=this;!e||Object.keys(this.guiParams).forEach(function(i){var l=e.addFolder(i),p=r.guiParams[i];Object.keys(p).forEach(function(m){var g=p[m],V=g.min,z=g.max,k=g.step,x=g.name,A=g.paramMap,H=g.items,ee=g.value,X=g.target,ce=m.toLowerCase().indexOf("color")>-1,N,le=typeof ee=="undefined"&&X,pe=le?X():p[m],ye=le?m:"value";H?N=l.add(pe,ye,H):ce?N=l.addColor(pe,ye):N=l.add(pe,ye),N=N.name(x||m),typeof V!="undefined"&&(N=N.min(V)),typeof z!="undefined"&&(N=N.max(z)),typeof k!="undefined"&&(N=N.step(k)),N=N.onChange(function(){r.setTargetValue(i,m,pe[ye],A)}),le&&N.listen()})})},n.setTargetValue=function(e,r,i,l){var p=this.guiParams[e][r],m=p.onChange,g=p.target,V=p.value,z=r.toLowerCase().indexOf("color")>-1,k=typeof V=="undefined"&&g;if(g&&!k){var x=g();Array.isArray(x)||(x=[x]),x.forEach(function(A){if(!!A)if(z)try{A[l||r].set(i)}catch(H){r!=="color"&&!l&&console.warn("".concat(r," is not a color,set paramMap"))}else A[l||r]=i})}m&&m(i)},n.setTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(r){Object.keys(e.guiParams[r]).forEach(function(i){var l=e.guiParams[r][i];typeof l.value!="undefined"&&e.setTargetValue(r,i,l.value,l.paramMap)})})},o}(),h={None:_.NoToneMapping,Linear:_.LinearToneMapping,Reinhard:_.ReinhardToneMapping,Cineon:_.CineonToneMapping,ACESFilmic:_.ACESFilmicToneMapping},y={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:_.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1,context:null,stencil:!1,depth:!1,physicallyCorrectLights:!1},w=function(){"use strict";function o(t){j(this,o),this.options=t;var e=t.width,r=t.height,i=t.rendererParams,l=i.context,p=i.alpha,m=i.devicePixelRatio,g=i.antialias,V=i.powerPreference,z=i.toneMapping,k=i.toneMappingExposure,x=i.outputEncoding,A=i.logarithmicDepthBuffer,H=i.preserveDrawingBuffer,ee=i.stencil,X=i.depth,ce=i.physicallyCorrectLights,N=new _.WebGLRenderer({context:l,alpha:p,antialias:g,powerPreference:V,logarithmicDepthBuffer:A,preserveDrawingBuffer:H,stencil:ee,depth:X});N.setSize(e,r),N.setPixelRatio(m),N.toneMapping=h[z],N.toneMappingExposure=k,N.outputEncoding=x,N.physicallyCorrectLights=ce,this.renderer=N}var n=o.prototype;return n.setSize=function(e,r){this.renderer.setSize(e,r)},n.render=function(){var e=this.options,r=e.scene,i=e.camera;this.renderer.render(r,i)},n.setGui=function(e){var r=this,i=new c({renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:h,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}});i.showGui(e)},n.dispose=function(){var e,r,i;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(i=this.renderer)===null||i===void 0||i.renderLists.dispose()},o}(),P={fov:45,near:1,far:1e3},Q=function(){"use strict";function o(t){j(this,o),this.oldCameraPosition=new _.Vector3,this.oldCameraRotation=new _.Euler,this.customCamera=!1,this.options=t;var e=t.width,r=t.height,i=t.cameraParams;if(i instanceof _.Camera)this.camera=i,this.customCamera=!0;else{var l=i.fov,p=i.far,m=i.near,g=new _.PerspectiveCamera(l,e/r,m,p);g.position.set(0,0,400),g.lookAt(0,0,0),this.camera=g}}var n=o.prototype;return n.checkCameraChange=function(){var e=this.camera,r=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!r},n.setSize=function(e,r){this.camera instanceof _.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},n.setGui=function(e){var r=this,i=new c({camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return r.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return r.camera},onChange:function(l){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(l){r.camera.updateProjectionMatrix()}}}});this.camera instanceof _.PerspectiveCamera&&(i.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(l){r.camera.updateProjectionMatrix()}}),i.showGui(e)},o}(),G=te(584),F={background:null},de=function(){"use strict";function o(t){j(this,o),this.options=t;var e=t.camera,r=t.sceneParams,i=r.background,l=new _.Scene;i&&(l.background=i),l.add(e),this.scene=l}var n=o.prototype;return n.addAxesHelper=function(){var e,r=new _.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},n.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,G.wf)(r)})},o}(),se=o=>{var n={};return te.d(n,o),n},ge=o=>()=>o,f=se({MapControls:()=>Me.MapControls,OrbitControls:()=>Me.OrbitControls}),u={},v=function(){"use strict";function o(t){j(this,o),this.options=t;var e=t.camera,r=t.controlParams,i=t.mapControl,l=r.domElement,p=i?new f.MapControls(e,l):new f.OrbitControls(e,l);p.minPolarAngle=Math.PI*.15,p.maxPolarAngle=Math.PI*.85,p.enableDamping=!0,p.dampingFactor=.063,p.autoRotate=!1,p.autoRotateSpeed=-60,p.enableZoom=!0,p.zoomSpeed=.2,this.control=p}var n=o.prototype;return n.limitPan=function(e){var r=e.maxX,i=r===void 0?1/0:r,l=e.minX,p=l===void 0?-1/0:l,m=e.maxZ,g=m===void 0?1/0:m,V=e.minZ,z=V===void 0?-1/0:V,k=e.maxY,x=k===void 0?1/0:k,A=e.minY,H=A===void 0?-1/0:A,ee=this.limitPanV||new _.Vector3,X=this.control,ce=this.options.camera,N=new _.Vector3(p,H,z),le=new _.Vector3(i,x,g);this.limitPanV=ee,ee.copy(X.target),X.target.clamp(N,le),ee.sub(X.target),ce.position.sub(ee)},n.update=function(){this.control.update()},n.dispose=function(){this.control.dispose()},o}(),O=o=>{var n={};return te.d(n,o),n},C=o=>()=>o,Y=O({CSS3DObject:()=>xe.CSS3DObject,CSS3DRenderer:()=>xe.CSS3DRenderer,CSS3DSprite:()=>xe.CSS3DSprite}),q=new _.Vector3,ie=new _.Matrix4,ue=new _.Matrix4,oe=new _.Vector3,_e=new _.Vector3,ve=function o(){"use strict";var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};j(this,o);var t=function(A,H){return oe.setFromMatrixPosition(A.matrixWorld),_e.setFromMatrixPosition(H.matrixWorld),oe.distanceToSquared(_e)},e=function(A){var H=[];return A.traverse(function(ee){ee.isCSS2DObject&&H.push(ee)}),H},r=function(A){for(var H=e(A).sort(function(le,pe){if(le.renderOrder!==pe.renderOrder)return pe.renderOrder-le.renderOrder;var ye=V.objects.get(le).distanceToCameraSquared,He=V.objects.get(pe).distanceToCameraSquared;return ye-He}),ee=H.length,X=0,ce=H.length;X<ce;X++){var N=H[X].userData.zIndexFix||0;H[X].element.style.zIndex=ee-X+N}},i=this,l,p,m,g,V={objects:new WeakMap},z=n.element!==void 0?n.element:document.createElement("div");z.style.overflow="hidden",this.domElement=z,this.getSize=function(){return{width:l,height:p}},this.render=function(x,A){+_.REVISION<144?(x.autoUpdate===!0&&x.updateMatrixWorld(),A.parent===null&&A.updateMatrixWorld()):(x.matrixWorldAutoUpdate===!0&&x.updateMatrixWorld(),A.parent===null&&A.matrixWorldAutoUpdate===!0&&A.updateMatrixWorld()),ie.copy(A.matrixWorldInverse),ue.multiplyMatrices(A.projectionMatrix,ie),k(x,x,A),r(x)},this.setSize=function(x,A){l=x,p=A,m=l/2,g=p/2,z.style.width="".concat(x,"px"),z.style.height="".concat(A,"px")};function k(x,A,H){if(x.isCSS2DObject){q.setFromMatrixPosition(x.matrixWorld),q.applyMatrix4(ue);var ee=x.visible===!0&&q.z>=-1&&q.z<=1&&x.layers.test(H.layers)===!0;if(x.element.style.display=ee===!0?"":"none",ee===!0){x.onBeforeRender(i,A,H);var X=x.element;X.style.transform="translate(-50%,-50%) translate(".concat(q.x*m+m,"px,").concat(-q.y*g+g,"px)"),X.parentNode!==z&&z.appendChild(X),x.onAfterRender(i,A,H)}var ce={distanceToCameraSquared:t(H,x)};V.objects.set(x,ce)}for(var N=0,le=x.children.length;N<le;N++)k(x.children[N],A,H)}},fe={zIndex:"auto"},Ae=function(){"use strict";function o(t){j(this,o),this.container=t}var n=o.prototype;return n.addRenderer=function(e,r){var i=this.container,l=i.offsetWidth,p=i.offsetHeight,m=e==="css2d"?new ve:new Y.CSS3DRenderer;m.domElement.style.position="absolute",m.domElement.style.top="0",m.domElement.style.pointerEvents="none",m.domElement.style.zIndex=r.zIndex,m.setSize(l,p),i.appendChild(m.domElement),e==="css2d"?this.css2Drenderer=m:e==="css3d"&&(this.css3Drenderer=m)},n.setSize=function(e,r){var i,l;(i=this.css2Drenderer)===null||i===void 0||i.setSize(e,r),(l=this.css3Drenderer)===null||l===void 0||l.setSize(e,r)},n.render=function(e,r){var i,l;(i=this.css2Drenderer)===null||i===void 0||i.render(e,r),(l=this.css3Drenderer)===null||l===void 0||l.render(e,r)},n.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},o}(),Te=o=>{var n={};return te.d(n,o),n},et=o=>()=>o,he=Te({BlendFunction:()=>me.BlendFunction,CopyPass:()=>me.CopyPass,EffectComposer:()=>me.EffectComposer,EffectPass:()=>me.EffectPass,FXAAEffect:()=>me.FXAAEffect,RenderPass:()=>me.RenderPass,SelectiveBloomEffect:()=>me.SelectiveBloomEffect}),ze={luminanceThreshold:.1,luminanceSmoothing:.3,mipmapBlur:!0,intensity:4},De=function(){"use strict";function o(t){j(this,o),this.active=!0,this.options=t;var e=t.renderer,r=t.scene,i=t.camera,l=t.composerParams,p=l.multisampling,m=e.capabilities.maxSamples,g=new he.EffectComposer(e,{multisampling:Math.min(p,m)});g.addPass(new he.RenderPass(r,i)),this.finalComposer=g,this.renderer=e,this.scene=r,this.camera=i}var n=o.prototype;return n.addCopyPass=function(){var e=new he.CopyPass;e.renderToScreen=!0,this.finalComposer.addPass(e),this.copyPass=e},n.addFXAAPass=function(){var e=this.camera,r=new he.FXAAEffect({blendFunction:he.BlendFunction.NORMAL}),i=new he.EffectPass(e,r);this.finalComposer.addPass(i),this.fxaaPass=i},n.addBloomPass=function(e){var r=this,i=r.camera,l=r.scene,p=new he.SelectiveBloomEffect(l,i,(0,D.Z)({},e)),m=new he.EffectPass(i,p);m.enabled=!1,this.finalComposer.addPass(m),this.bloomPass=m,this.bloomEffect=p},n.addBloomGui=function(e){var r=this;if(!!this.bloomEffect){var i=new c({bloom:{intensity:{min:0,max:10,step:.01,target:function(){return r.bloomEffect}}},bloomLuminanceFilter:{enabled:{value:this.bloomEffect.luminancePass.enabled,onChange:function(l){r.bloomEffect.luminancePass.enabled=l}},threshold:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}},smoothing:{min:0,max:1,step:.01,target:function(){return r.bloomEffect.luminanceMaterial}}}});i.showGui(e)}},n.toggleBloomSelection=function(e){if(!this.bloomEffect||!this.bloomPass){console.warn("err:pencil.options.bloom");return}this.bloomEffect.selection.toggle(e),this.bloomPass.enabled=!!this.bloomEffect.selection.size},n.getSize=function(){var e=this.options.renderer;return e.getSize(new _.Vector2)},n.enable=function(){this.active||(this.active=!0)},n.disable=function(){!this.active||(this.active=!1)},n.setSize=function(e,r){this.finalComposer.setSize(e,r)},n.render=function(){!this.active||this.finalComposer.render()},n.dispose=function(){this.finalComposer.dispose()},o}(),Be=function(){try{var o=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&o.getContext("webgl2"))}catch(n){return!1}},tt=0,be=!1,Se=Be()!==!1,Ee=function(){"use strict";function o(t){j(this,o),this.raycaster=new _.Raycaster,this.installPlugins=new Map,this.event=new Z.EventEmitter,this.clock=new _.Clock,this.options=(0,ne.default)(o.options,t,{isMergeableObject:G.PO});var e=this.options,r=e.container,i=e.stats,l=e.gui,p=e.resizeObserver;if(l){var m=new a.default;m.open(!1),this.gui=m}if(i){var g=new U.default;g.showPanel(0),g.dom.style.position="absolute",r.appendChild(g.dom),this.stats=g}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),p&&this.initResizeObserver(),this.clock.getDelta(),this.clock.getElapsedTime()}var n=o.prototype;return n.use=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var p;(p=e).install.apply(p,[this].concat(I(i))),this.installPlugins.set(e,!0)}},n.init=function(){var e=this.options,r=e.container,i=e.isdev,l=e.axesHelper,p=e.renderer,m=e.scene,g=e.camera,V=this.getSize(),z=V.width,k=V.height,x=new Q({isdev:i,width:z,height:k,cameraParams:g});this.gui&&x.setGui(this.gui);var A=x.camera,H=new de({camera:A,sceneParams:m}),ee=H.scene,X=new w({width:z,height:k,scene:ee,camera:A,isdev:i,rendererParams:S((0,D.Z)({},p),{antialias:!1})});this.gui&&X.setGui(this.gui);var ce=X.renderer;l&&H.addAxesHelper(),this.sceneController=H,this.rendererController=X,this.cameraController=x,r.appendChild(ce.domElement)},n.initComposer=function(){var e=this.options,r=e.bloom,i=e.bloomParams,l=e.renderer,p=e.multisampling,m=l.antialias;m==="msaa"&&!Se&&(m=!1,console.warn("MSAA is not supported on this browser"));var g=new De({renderer:this.renderer,scene:this.scene,camera:this.camera,composerParams:{multisampling:m==="msaa"?p:0,type:_.UnsignedByteType,encoding:l.outputEncoding}});this.composerController=g,r&&(g.addBloomPass(i),this.gui&&g.addBloomGui(this.gui)),m==="fxaa"&&g.addFXAAPass(),g.addCopyPass()},n.initCSSRenderer=function(){var e=this.options,r=e.container,i=e.css2DRenderer,l=e.css3DRenderer,p=e.css2DRendererParams,m=e.css3DRendererParams;if(i||l){var g=new Ae(r);i&&g.addRenderer("css2d",p),l&&g.addRenderer("css3d",m),this.cssRendererController=g}},n.initControl=function(){var e=this.options,r=e.control,i=e.mapControl,l=e.controlParams;if(r){var p=new v({camera:this.camera,controlParams:{domElement:(l==null?void 0:l.domElement)||this.renderer.domElement},mapControl:i});this.controlController=p}},n.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},n.initResizeObserver=function(){var e=this,r=this.options.container;if(!this.resizeObserver){var i=new ResizeObserver(function(l){var p=!0,m=!1,g=void 0;try{for(var V=l[Symbol.iterator](),z;!(p=(z=V.next()).done);p=!0){var k=z.value,x=k.contentRect;e.handeleResize(x.width,x.height),e.render()}}catch(A){m=!0,g=A}finally{try{!p&&V.return!=null&&V.return()}finally{if(m)throw g}}});i.observe(r),this.resizeObserver=i}},n.handeleResize=function(e,r){var i=this,l=i.rendererController,p=i.cameraController,m=i.composerController,g=i.cssRendererController;p==null||p.setSize(e,r),l==null||l.setSize(e,r),m==null||m.setSize(e,r),g==null||g.setSize(e,r),this.installPlugins.forEach(function(V,z){var k;(k=z.resize)===null||k===void 0||k.call(z,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},n.pick=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,l=this,p=l.raycaster,m=l.options,g=m.container,V=new _.Vector2,z=g.getBoundingClientRect();if(V.x=(e.clientX-z.left)/(z.right-z.left)*2-1,V.y=-((e.clientY-z.top)/(z.bottom-z.top))*2+1,this.camera&&this.scene){p.setFromCamera(V,this.camera);var k=p.intersectObjects(r||this.scene.children,i);if(k.length)return{object:k[0].object,intersects:k}}},n.render=function(){var e,r,i,l,p=this,m=p.renderer,g=p.scene,V=p.camera,z=p.clock;if(!(!m||!g||!V||this.options.staticRender&&!this.cameraController.checkCameraChange())){var k=z.getDelta(),x=z.getElapsedTime();if((e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(H,ee){var X;(X=ee.update)===null||X===void 0||X.call(ee,k,x)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var A;(A=this.rendererController)===null||A===void 0||A.render()}(i=this.cssRendererController)===null||i===void 0||i.render(g,V),(l=this.stats)===null||l===void 0||l.update(),this.event.emit("render",{delta:k,elapsed:x})}},n.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},n.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},n.dispose=function(){var e,r,i,l,p,m,g;this.stop(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.installPlugins.forEach(function(V,z){var k;(k=z.dispose)===null||k===void 0||k.call(z)}),(r=this.controlController)===null||r===void 0||r.dispose(),(i=this.cssRendererController)===null||i===void 0||i.dispose(),(l=this.sceneController)===null||l===void 0||l.dispose(),(p=this.composerController)===null||p===void 0||p.dispose(),(m=this.rendererController)===null||m===void 0||m.dispose(),this.controlController=void 0,this.cssRendererController=void 0,(g=this.gui)===null||g===void 0||g.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},b(o,[{key:"renderer",get:function(){return this.rendererController.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){return this.cameraController.camera}},{key:"scene",get:function(){return this.sceneController.scene}}]),o}();Ee.options={isdev:be,stats:be,gui:be,axesHelper:be,control:be,resizeObserver:!0,renderer:S((0,D.Z)({},y),{antialias:Se?"msaa":"fxaa"}),staticRender:!1,multisampling:4,scene:F,camera:P,bloom:!1,bloomParams:ze,css2DRenderer:!1,css2DRendererParams:(0,D.Z)({},fe),css3DRenderer:!1,css3DRendererParams:(0,D.Z)({},fe)};function Pe(o,n){return Pe=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},Pe(o,n)}function Ge(o,n){return Pe(o,n)}function ke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}function Ce(o,n,t){return ke()?Ce=Reflect.construct:Ce=function(r,i,l){var p=[null];p.push.apply(p,i);var m=Function.bind.apply(r,p),g=new m;return l&&Ge(g,l.prototype),g},Ce.apply(null,arguments)}function Oe(o,n,t){return Ce.apply(null,arguments)}var Ne=te(484);function Ie(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t={};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),o&&(t.promise=(0,Ne.Z)(t.promise,n)),t}var Ve=o=>{var n={};return te.d(n,o),n},rt=o=>()=>o,We=Ve({CSS2DObject:()=>Ke.CSS2DObject}),Le=function(o){o&&((0,G.wf)(o),o.children.forEach(function(n){n.userData.BaseObject_||Le(n)}))},Fe=function(){"use strict";function o(){j(this,o),this.objecttype__="BaseObject",this.userData={},this.pm=Ie(),this.visible=!1}var n=o.prototype;return n.init=function(){},n.create=function(){},n.render=function(){},n.update=function(e,r){},n.resize=function(e,r){},n.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},n.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},n.isVisible=function(){return this.visible},n.createMesh=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.object3d=Oe(_.Mesh,I(r)),this},n.createGroup=function(){return this.object3d=new _.Group,this},n.createPoints=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.object3d=Oe(_.Points,I(r)),this},n.createCSS2DObject=function(e){return this.object3d=new We.CSS2DObject(e),this},n.createCSS3DObject=function(e){return this.object3d=new Y.CSS3DObject(e),this},n.createCSS3DSprite=function(e){return this.object3d=new Y.CSS3DSprite(e),this},n.createSprite=function(e){return this.object3d=new _.Sprite(e),this},n.add=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var l;return(l=this.object3d).add.apply(l,I(r)),this},n.remove=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var l;return(l=this.object3d).remove.apply(l,I(r)),this},n.getSize=function(){var e=new _.Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new _.Vector3)}},n.traverse=function(e){e(this),this.children.forEach(function(r){r.traverse(e)})},n.dispose=function(){Le(this.object3d)},b(o,[{key:"parent",get:function(){var e=this.object3d.parent;return(e==null?void 0:e.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(e){return e.userData.BaseObject_}).filter(function(e){return!!e})}}]),o}()})();var $e=we.L6,Je=we.sb,Qe=we.z,qe=we.ZP;export{$e as BaseObject,Je as GUIObject,Qe as Pencil,qe as default};
|
package/package.json
CHANGED
package/dist/effect/bloom.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IBaseObject } from '../core/BaseObject';
|
|
2
|
-
interface Options {
|
|
3
|
-
exclude?: THREE.Mesh[];
|
|
4
|
-
include?: THREE.Mesh[];
|
|
5
|
-
}
|
|
6
|
-
export default class {
|
|
7
|
-
object: IBaseObject;
|
|
8
|
-
options: Options;
|
|
9
|
-
constructor(object: IBaseObject, options?: Options);
|
|
10
|
-
private check;
|
|
11
|
-
enable(): void;
|
|
12
|
-
disable(): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|