gl-draw 0.0.4 → 0.0.5

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/index.js CHANGED
@@ -1,1486 +1,4 @@
1
- (function(){var Bt={187:function(R){"use strict";var D=typeof Reflect=="object"?Reflect:null,C=D&&typeof D.apply=="function"?D.apply:function(p,b,w){return Function.prototype.apply.call(p,b,w)},G;D&&typeof D.ownKeys=="function"?G=D.ownKeys:Object.getOwnPropertySymbols?G=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:G=function(p){return Object.getOwnPropertyNames(p)};function j(g){console&&console.warn&&console.warn(g)}var X=Number.isNaN||function(p){return p!==p};function S(){S.init.call(this)}R.exports=S,R.exports.once=ie,S.EventEmitter=S,S.prototype._events=void 0,S.prototype._eventsCount=0,S.prototype._maxListeners=void 0;var H=10;function ee(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}Object.defineProperty(S,"defaultMaxListeners",{enumerable:!0,get:function(){return H},set:function(g){if(typeof g!="number"||g<0||X(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");H=g}}),S.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},S.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||X(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function J(g){return g._maxListeners===void 0?S.defaultMaxListeners:g._maxListeners}S.prototype.getMaxListeners=function(){return J(this)},S.prototype.emit=function(p){for(var b=[],w=1;w<arguments.length;w++)b.push(arguments[w]);var M=p==="error",z=this._events;if(z!==void 0)M=M&&z.error===void 0;else if(!M)return!1;if(M){var U;if(b.length>0&&(U=b[0]),U instanceof Error)throw U;var k=new Error("Unhandled error."+(U?" ("+U.message+")":""));throw k.context=U,k}var xe=z[p];if(xe===void 0)return!1;if(typeof xe=="function")C(xe,this,b);else for(var Ce=xe.length,Ne=ve(xe,Ce),w=0;w<Ce;++w)C(Ne[w],this,b);return!0};function Z(g,p,b,w){var M,z,U;if(ee(b),z=g._events,z===void 0?(z=g._events=Object.create(null),g._eventsCount=0):(z.newListener!==void 0&&(g.emit("newListener",p,b.listener?b.listener:b),z=g._events),U=z[p]),U===void 0)U=z[p]=b,++g._eventsCount;else if(typeof U=="function"?U=z[p]=w?[b,U]:[U,b]:w?U.unshift(b):U.push(b),M=J(g),M>0&&U.length>M&&!U.warned){U.warned=!0;var k=new Error("Possible EventEmitter memory leak detected. "+U.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");k.name="MaxListenersExceededWarning",k.emitter=g,k.type=p,k.count=U.length,j(k)}return g}S.prototype.addListener=function(p,b){return Z(this,p,b,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(p,b){return Z(this,p,b,!0)};function te(){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 re(g,p,b){var w={fired:!1,wrapFn:void 0,target:g,type:p,listener:b},M=te.bind(w);return M.listener=b,w.wrapFn=M,M}S.prototype.once=function(p,b){return ee(b),this.on(p,re(this,p,b)),this},S.prototype.prependOnceListener=function(p,b){return ee(b),this.prependListener(p,re(this,p,b)),this},S.prototype.removeListener=function(p,b){var w,M,z,U,k;if(ee(b),M=this._events,M===void 0)return this;if(w=M[p],w===void 0)return this;if(w===b||w.listener===b)--this._eventsCount===0?this._events=Object.create(null):(delete M[p],M.removeListener&&this.emit("removeListener",p,w.listener||b));else if(typeof w!="function"){for(z=-1,U=w.length-1;U>=0;U--)if(w[U]===b||w[U].listener===b){k=w[U].listener,z=U;break}if(z<0)return this;z===0?w.shift():me(w,z),w.length===1&&(M[p]=w[0]),M.removeListener!==void 0&&this.emit("removeListener",p,k||b)}return this},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(p){var b,w,M;if(w=this._events,w===void 0)return this;if(w.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):w[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete w[p]),this;if(arguments.length===0){var z=Object.keys(w),U;for(M=0;M<z.length;++M)U=z[M],U!=="removeListener"&&this.removeAllListeners(U);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(b=w[p],typeof b=="function")this.removeListener(p,b);else if(b!==void 0)for(M=b.length-1;M>=0;M--)this.removeListener(p,b[M]);return this};function ae(g,p,b){var w=g._events;if(w===void 0)return[];var M=w[p];return M===void 0?[]:typeof M=="function"?b?[M.listener||M]:[M]:b?q(M):ve(M,M.length)}S.prototype.listeners=function(p){return ae(this,p,!0)},S.prototype.rawListeners=function(p){return ae(this,p,!1)},S.listenerCount=function(g,p){return typeof g.listenerCount=="function"?g.listenerCount(p):n.call(g,p)},S.prototype.listenerCount=n;function n(g){var p=this._events;if(p!==void 0){var b=p[g];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}S.prototype.eventNames=function(){return this._eventsCount>0?G(this._events):[]};function ve(g,p){for(var b=new Array(p),w=0;w<p;++w)b[w]=g[w];return b}function me(g,p){for(;p+1<g.length;p++)g[p]=g[p+1];g.pop()}function q(g){for(var p=new Array(g.length),b=0;b<p.length;++b)p[b]=g[b].listener||g[b];return p}function ie(g,p){return new Promise(function(b,w){function M(U){g.removeListener(p,z),w(U)}function z(){typeof g.removeListener=="function"&&g.removeListener("error",M),b([].slice.call(arguments))}K(g,p,z,{once:!0}),p!=="error"&&Y(g,M,{once:!0})})}function Y(g,p,b){typeof g.on=="function"&&K(g,"error",p,b)}function K(g,p,b,w){if(typeof g.on=="function")w.once?g.once(p,b):g.on(p,b);else if(typeof g.addEventListener=="function")g.addEventListener(p,function M(z){w.once&&g.removeEventListener(p,M),b(z)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof g)}},666:function(R){var D=function(C){"use strict";var G=Object.prototype,j=G.hasOwnProperty,X,S=typeof Symbol=="function"?Symbol:{},H=S.iterator||"@@iterator",ee=S.asyncIterator||"@@asyncIterator",J=S.toStringTag||"@@toStringTag";function Z(T,x,F){return Object.defineProperty(T,x,{value:F,enumerable:!0,configurable:!0,writable:!0}),T[x]}try{Z({},"")}catch(T){Z=function(x,F,O){return x[F]=O}}function te(T,x,F,O){var E=x&&x.prototype instanceof ie?x:ie,V=Object.create(E.prototype),le=new Ne(O||[]);return V._invoke=U(T,F,le),V}C.wrap=te;function re(T,x,F){try{return{type:"normal",arg:T.call(x,F)}}catch(O){return{type:"throw",arg:O}}}var ae="suspendedStart",n="suspendedYield",ve="executing",me="completed",q={};function ie(){}function Y(){}function K(){}var g={};Z(g,H,function(){return this});var p=Object.getPrototypeOf,b=p&&p(p(De([])));b&&b!==G&&j.call(b,H)&&(g=b);var w=K.prototype=ie.prototype=Object.create(g);Y.prototype=K,Z(w,"constructor",K),Z(K,"constructor",Y),Y.displayName=Z(K,J,"GeneratorFunction");function M(T){["next","throw","return"].forEach(function(x){Z(T,x,function(F){return this._invoke(x,F)})})}C.isGeneratorFunction=function(T){var x=typeof T=="function"&&T.constructor;return x?x===Y||(x.displayName||x.name)==="GeneratorFunction":!1},C.mark=function(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,K):(T.__proto__=K,Z(T,J,"GeneratorFunction")),T.prototype=Object.create(w),T},C.awrap=function(T){return{__await:T}};function z(T,x){function F(V,le,ue,ce){var fe=re(T[V],T,le);if(fe.type==="throw")ce(fe.arg);else{var je=fe.arg,Oe=je.value;return Oe&&typeof Oe=="object"&&j.call(Oe,"__await")?x.resolve(Oe.__await).then(function(Fe){F("next",Fe,ue,ce)},function(Fe){F("throw",Fe,ue,ce)}):x.resolve(Oe).then(function(Fe){je.value=Fe,ue(je)},function(Fe){return F("throw",Fe,ue,ce)})}}var O;function E(V,le){function ue(){return new x(function(ce,fe){F(V,le,ce,fe)})}return O=O?O.then(ue,ue):ue()}this._invoke=E}M(z.prototype),Z(z.prototype,ee,function(){return this}),C.AsyncIterator=z,C.async=function(T,x,F,O,E){E===void 0&&(E=Promise);var V=new z(te(T,x,F,O),E);return C.isGeneratorFunction(x)?V:V.next().then(function(le){return le.done?le.value:V.next()})};function U(T,x,F){var O=ae;return function(V,le){if(O===ve)throw new Error("Generator is already running");if(O===me){if(V==="throw")throw le;return Ye()}for(F.method=V,F.arg=le;;){var ue=F.delegate;if(ue){var ce=k(ue,F);if(ce){if(ce===q)continue;return ce}}if(F.method==="next")F.sent=F._sent=F.arg;else if(F.method==="throw"){if(O===ae)throw O=me,F.arg;F.dispatchException(F.arg)}else F.method==="return"&&F.abrupt("return",F.arg);O=ve;var fe=re(T,x,F);if(fe.type==="normal"){if(O=F.done?me:n,fe.arg===q)continue;return{value:fe.arg,done:F.done}}else fe.type==="throw"&&(O=me,F.method="throw",F.arg=fe.arg)}}}function k(T,x){var F=T.iterator[x.method];if(F===X){if(x.delegate=null,x.method==="throw"){if(T.iterator.return&&(x.method="return",x.arg=X,k(T,x),x.method==="throw"))return q;x.method="throw",x.arg=new TypeError("The iterator does not provide a 'throw' method")}return q}var O=re(F,T.iterator,x.arg);if(O.type==="throw")return x.method="throw",x.arg=O.arg,x.delegate=null,q;var E=O.arg;if(!E)return x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,q;if(E.done)x[T.resultName]=E.value,x.next=T.nextLoc,x.method!=="return"&&(x.method="next",x.arg=X);else return E;return x.delegate=null,q}M(w),Z(w,J,"Generator"),Z(w,H,function(){return this}),Z(w,"toString",function(){return"[object Generator]"});function xe(T){var x={tryLoc:T[0]};1 in T&&(x.catchLoc=T[1]),2 in T&&(x.finallyLoc=T[2],x.afterLoc=T[3]),this.tryEntries.push(x)}function Ce(T){var x=T.completion||{};x.type="normal",delete x.arg,T.completion=x}function Ne(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(xe,this),this.reset(!0)}C.keys=function(T){var x=[];for(var F in T)x.push(F);return x.reverse(),function O(){for(;x.length;){var E=x.pop();if(E in T)return O.value=E,O.done=!1,O}return O.done=!0,O}};function De(T){if(T){var x=T[H];if(x)return x.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var F=-1,O=function E(){for(;++F<T.length;)if(j.call(T,F))return E.value=T[F],E.done=!1,E;return E.value=X,E.done=!0,E};return O.next=O}}return{next:Ye}}C.values=De;function Ye(){return{value:X,done:!0}}return Ne.prototype={constructor:Ne,reset:function(T){if(this.prev=0,this.next=0,this.sent=this._sent=X,this.done=!1,this.delegate=null,this.method="next",this.arg=X,this.tryEntries.forEach(Ce),!T)for(var x in this)x.charAt(0)==="t"&&j.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=X)},stop:function(){this.done=!0;var T=this.tryEntries[0],x=T.completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(T){if(this.done)throw T;var x=this;function F(ce,fe){return V.type="throw",V.arg=T,x.next=ce,fe&&(x.method="next",x.arg=X),!!fe}for(var O=this.tryEntries.length-1;O>=0;--O){var E=this.tryEntries[O],V=E.completion;if(E.tryLoc==="root")return F("end");if(E.tryLoc<=this.prev){var le=j.call(E,"catchLoc"),ue=j.call(E,"finallyLoc");if(le&&ue){if(this.prev<E.catchLoc)return F(E.catchLoc,!0);if(this.prev<E.finallyLoc)return F(E.finallyLoc)}else if(le){if(this.prev<E.catchLoc)return F(E.catchLoc,!0)}else if(ue){if(this.prev<E.finallyLoc)return F(E.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(T,x){for(var F=this.tryEntries.length-1;F>=0;--F){var O=this.tryEntries[F];if(O.tryLoc<=this.prev&&j.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var E=O;break}}E&&(T==="break"||T==="continue")&&E.tryLoc<=x&&x<=E.finallyLoc&&(E=null);var V=E?E.completion:{};return V.type=T,V.arg=x,E?(this.method="next",this.next=E.finallyLoc,q):this.complete(V)},complete:function(T,x){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"&&x&&(this.next=x),q},finish:function(T){for(var x=this.tryEntries.length-1;x>=0;--x){var F=this.tryEntries[x];if(F.finallyLoc===T)return this.complete(F.completion,F.afterLoc),Ce(F),q}},catch:function(T){for(var x=this.tryEntries.length-1;x>=0;--x){var F=this.tryEntries[x];if(F.tryLoc===T){var O=F.completion;if(O.type==="throw"){var E=O.arg;Ce(F)}return E}}throw new Error("illegal catch attempt")},delegateYield:function(T,x,F){return this.delegate={iterator:De(T),resultName:x,nextLoc:F},this.method==="next"&&(this.arg=X),q}},C}(R.exports);try{regeneratorRuntime=D}catch(C){typeof globalThis=="object"?globalThis.regeneratorRuntime=D:Function("r","regeneratorRuntime = r")(D)}},695:function(R,D,C){"use strict";C.d(D,{Z:function(){return G}});function G(j){if(j.geometry&&j.geometry.dispose(),j.material){var X=Array.isArray(j.material)?j.material:[j.material];X.forEach(function(S){var H,ee,J,Z,te,re,ae,n,ve,me,q,ie,Y;(H=S.map)===null||H===void 0||H.dispose(),(ee=S.lightMap)===null||ee===void 0||ee.dispose(),(J=S.bumpMap)===null||J===void 0||J.dispose(),(Z=S.normalMap)===null||Z===void 0||Z.dispose(),(te=S.specularMap)===null||te===void 0||te.dispose(),(re=S.envMap)===null||re===void 0||re.dispose(),(ae=S.alphaMap)===null||ae===void 0||ae.dispose(),(n=S.aoMap)===null||n===void 0||n.dispose(),(ve=S.displacementMap)===null||ve===void 0||ve.dispose(),(me=S.emissiveMap)===null||me===void 0||me.dispose(),(q=S.gradientMap)===null||q===void 0||q.dispose(),(ie=S.metalnessMap)===null||ie===void 0||ie.dispose(),(Y=S.roughnessMap)===null||Y===void 0||Y.dispose(),S.dispose()})}}},519:function(R,D,C){"use strict";C.d(D,{disposeMesh:function(){return S.Z},isPlainObject:function(){return J.Z}});var G=C(666),j=C.n(G),X=null,S=C(695),H=C(644);function ee(q){if(q.material){var ie=Array.isArray(q.material)?q.material:[q.material];ie.forEach(function(Y){var K,g;(K=Y.color)===null||K===void 0||K.convertSRGBToLinear(),(g=Y.emissive)===null||g===void 0||g.convertSRGBToLinear(),Y.map&&(Y.map.encoding=THREE.sRGBEncoding),Y.emissiveMap&&(Y.emissiveMap.encoding=THREE.sRGBEncoding)})}}var J=C(738),Z=C(568),te=C(924),re=require("idb-keyval"),ae=C(484),n=null,ve=null,me=function(){var q=(0,Z.Z)(j().mark(function ie(Y,K){var g,p,b,w,M,z;return j().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return g=K.version,k.next=4,(0,re.get)(Y);case 4:if(b=k.sent,!(b&&b[g])){k.next=9;break}p=b[g],k.next=15;break;case 9:return k.next=11,(0,ae.Z)(fetch(Y).then(function(xe){if(xe.ok)return xe.blob();throw new Error}));case 11:w=k.sent,M=w.res,z=w.err,z||(p=M,(0,re.set)(Y,(0,te.Z)({},g,M)));case 15:return k.abrupt("return",p?{url:URL.createObjectURL(p)}:{url:Y});case 16:case"end":return k.stop()}},ie)}));return function(Y,K){return q.apply(this,arguments)}}()},738:function(R,D,C){"use strict";C.d(D,{Z:function(){return j}});function G(X){return Object.prototype.toString.call(X)==="[object Object]"}function j(X){if(G(X)===!1)return!1;var S=X.constructor;if(S===void 0)return!0;var H=S.prototype;return!(G(H)===!1||H.hasOwnProperty("isPrototypeOf")===!1)}},484:function(R,D,C){"use strict";C.d(D,{Z:function(){return j}});var G=C(42);function j(X){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return X.then(function(H){return(0,G.Z)({err:null,res:H},S)}).catch(function(H){return(0,G.Z)({err:H,res:void 0},S)})}},644:function(R){"use strict";R.exports=require("three")},568:function(R,D,C){"use strict";C.d(D,{Z:function(){return j}});function G(X,S,H,ee,J,Z,te){try{var re=X[Z](te),ae=re.value}catch(n){H(n);return}re.done?S(ae):Promise.resolve(ae).then(ee,J)}function j(X){return function(){var S=this,H=arguments;return new Promise(function(ee,J){var Z=X.apply(S,H);function te(ae){G(Z,ee,J,te,re,"next",ae)}function re(ae){G(Z,ee,J,te,re,"throw",ae)}te(void 0)})}}},924:function(R,D,C){"use strict";C.d(D,{Z:function(){return G}});function G(j,X,S){return X in j?Object.defineProperty(j,X,{value:S,enumerable:!0,configurable:!0,writable:!0}):j[X]=S,j}},42:function(R,D,C){"use strict";C.d(D,{Z:function(){return j}});var G=C(924);function j(X){for(var S=1;S<arguments.length;S++){var H=arguments[S]!=null?arguments[S]:{},ee=Object.keys(H);typeof Object.getOwnPropertySymbols=="function"&&(ee=ee.concat(Object.getOwnPropertySymbols(H).filter(function(J){return Object.getOwnPropertyDescriptor(H,J).enumerable}))),ee.forEach(function(J){(0,G.Z)(X,J,H[J])})}return X}}},ct={};function se(R){var D=ct[R];if(D!==void 0)return D.exports;var C=ct[R]={exports:{}};return Bt[R](C,C.exports,se),C.exports}(function(){se.n=function(R){var D=R&&R.__esModule?function(){return R.default}:function(){return R};return se.d(D,{a:D}),D}})(),function(){se.d=function(R,D){for(var C in D)se.o(D,C)&&!se.o(R,C)&&Object.defineProperty(R,C,{enumerable:!0,get:D[C]})}}(),function(){se.o=function(R,D){return Object.prototype.hasOwnProperty.call(R,D)}}(),function(){se.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})}}();var $e={};(function(){"use strict";se.r($e),se.d($e,{BaseObject:function(){return Pa},Pencil:function(){return ot},default:function(){return ot}});function R(f,t){if(!(f instanceof t))throw new TypeError("Cannot call a class as a function")}function D(f,t){for(var i=0;i<t.length;i++){var e=t[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(f,e.key,e)}}function C(f,t,i){return t&&D(f.prototype,t),i&&D(f,i),f}var G=se(42);function j(f,t){var i=Object.keys(f);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(f);t&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(f,a).enumerable})),i.push.apply(i,e)}return i}function X(f,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach(function(i){Object.defineProperty(f,i,Object.getOwnPropertyDescriptor(t,i))}),f}function S(f,t){(t==null||t>f.length)&&(t=f.length);for(var i=0,e=new Array(t);i<t;i++)e[i]=f[i];return e}function H(f){if(Array.isArray(f))return S(f)}function ee(f){if(typeof Symbol!="undefined"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f)}function J(){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 Z(f,t){if(!!f){if(typeof f=="string")return S(f,t);var i=Object.prototype.toString.call(f).slice(8,-1);if(i==="Object"&&f.constructor&&(i=f.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return S(f,t)}}function te(f){return H(f)||ee(f)||Z(f)||J()}var re=require("@tweenjs/tween.js"),ae=se.n(re),n=se(644),ve=se(187),me=require("deepmerge"),q=se.n(me),ie=function(){var f=0,t=document.createElement("div");t.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",t.addEventListener("click",function(u){u.preventDefault(),e(++f%t.children.length)},!1);function i(u){return t.appendChild(u.dom),u}function e(u){for(var m=0;m<t.children.length;m++)t.children[m].style.display=m===u?"block":"none";f=u}var a=(performance||Date).now(),r=a,s=0,l=i(new ie.Panel("FPS","#0ff","#002")),o=i(new ie.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=i(new ie.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:t,addPanel:i,showPanel:e,begin:function(){a=(performance||Date).now()},end:function(){s++;var u=(performance||Date).now();if(o.update(u-a,200),u>=r+1e3&&(l.update(s*1e3/(u-r),100),r=u,s=0,c)){var m=performance.memory;c.update(m.usedJSHeapSize/1048576,m.jsHeapSizeLimit/1048576)}return u},update:function(){a=this.end()},domElement:t,setMode:e}};ie.Panel=function(f,t,i){var e=1/0,a=0,r=Math.round,s=r(window.devicePixelRatio||1),l=80*s,o=48*s,c=3*s,u=2*s,m=3*s,P=15*s,A=74*s,v=30*s,h=document.createElement("canvas");h.width=l,h.height=o,h.style.cssText="width:80px;height:48px";var y=h.getContext("2d");return y.font="bold "+9*s+"px Helvetica,Arial,sans-serif",y.textBaseline="top",y.fillStyle=i,y.fillRect(0,0,l,o),y.fillStyle=t,y.fillText(f,c,u),y.fillRect(m,P,A,v),y.fillStyle=i,y.globalAlpha=.9,y.fillRect(m,P,A,v),{dom:h,update:function(_,I){e=Math.min(e,_),a=Math.max(a,_),y.fillStyle=i,y.globalAlpha=1,y.fillRect(0,0,l,P),y.fillStyle=t,y.fillText(r(_)+" "+f+" ("+r(e)+"-"+r(a)+")",c,u),y.drawImage(h,m+s,P,A-s,v,m,P,A-s,v),y.fillRect(m+A-s,P,s,v),y.fillStyle=i,y.globalAlpha=.9,y.fillRect(m+A-s,P,s,r((1-_/I)*v))}}};var Y=ie,K=require("lil-gui"),g=se.n(K),p=function(){"use strict";function f(){R(this,f),this.guiParams={}}var t=f.prototype;return t.showGuiParams=function(e){var a=this;!e||Object.keys(this.guiParams).forEach(function(r){var s=e.addFolder(r),l=a.guiParams[r];Object.keys(l).forEach(function(o){var c=l[o],u=c.min,m=c.max,P=c.step,A=c.name,v=c.to,h=c.paramMap,y=c.items,_=c.value,I=c.target,Q=o.toLowerCase().indexOf("color")>-1,B,L=typeof _=="undefined"&&I,ne=L?I():l[o],Te=L?o:"value";y?B=s.add(ne,Te,y):Q?B=s.addColor(ne,Te):B=s.add(ne,Te),B=B.name(A||o),typeof u!="undefined"&&(B=B.min(u)),typeof m!="undefined"&&(B=B.max(m)),typeof P!="undefined"&&(B=B.step(P)),B=B.onChange(function(){a.setGuiTargetValue(r,o,ne[Te],h)}),(v||L)&&B.listen()})})},t.setGuiTargetValue=function(e,a,r,s){var l=this.guiParams[e][a],o=l.onChange,c=l.target,u=l.value,m=a.toLowerCase().indexOf("color")>-1,P=typeof u=="undefined"&&c;if(c&&!P){var A=c();Array.isArray(A)||(A=[A]),A.forEach(function(v){if(!!v)if(m)try{v[s||a].set(r)}catch(h){a!=="color"&&!s&&console.warn("".concat(a," is not a color,set paramMap"))}else v[s||a]=r})}o&&o(r)},t.setGuiTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(a){Object.keys(e.guiParams[a]).forEach(function(r){var s=e.guiParams[a][r];typeof s.value!="undefined"&&e.setGuiTargetValue(a,r,s.value,s.paramMap)})})},t.guiParamTween=function(e,a,r){var s=r.duration,l=s===void 0?0:s,o=this,c=this.guiParams[e][a],u=c.to,m=c.paramMap,P=m===void 0?"":m;return new(ae()).Tween(this.guiParams[e][a]).to({value:u},l).onUpdate(function(A){o.setGuiTargetValue(e,a,A.value,P)})},f}(),b={None:n.NoToneMapping,Linear:n.LinearToneMapping,Reinhard:n.ReinhardToneMapping,Cineon:n.CineonToneMapping,ACESFilmic:n.ACESFilmicToneMapping},w={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:n.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1},M=function(){"use strict";function f(i){R(this,f),this.options=i;var e=i.width,a=i.height,r=i.rendererParams,s=r.alpha,l=r.devicePixelRatio,o=r.antialias,c=r.powerPreference,u=r.toneMapping,m=r.toneMappingExposure,P=r.outputEncoding,A=r.logarithmicDepthBuffer,v=r.preserveDrawingBuffer,h=new n.WebGLRenderer({alpha:s,antialias:o,powerPreference:c,logarithmicDepthBuffer:A,preserveDrawingBuffer:v});h.setSize(e,a),h.setPixelRatio(l),h.autoClear=!1,h.sortObjects=!1,h.toneMapping=b[u],h.toneMappingExposure=m,h.outputEncoding=P,this.renderer=h}var t=f.prototype;return t.setSize=function(e,a){this.renderer.setSize(e,a)},t.render=function(){var e=this.options,a=e.scene,r=e.camera;this.renderer.render(a,r)},t.setGui=function(e){var a=this,r=new p;r.guiParams={renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:b,target:function(){return a.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return a.renderer}}}},r.showGuiParams(e)},t.dispose=function(){var e,a,r;(e=this.renderer)===null||e===void 0||e.clear(),(a=this.renderer)===null||a===void 0||a.dispose(),(r=this.renderer)===null||r===void 0||r.renderLists.dispose(),this.renderer=void 0},f}(),z={fov:45,near:1,far:1e3},U=function(){"use strict";function f(i){R(this,f),this.oldCameraPosition=new n.Vector3,this.oldCameraRotation=new n.Euler,this.customCamera=!1,this.options=i;var e=i.isdev,a=i.width,r=i.height,s=i.cameraParams;if(s instanceof n.Camera)this.camera=s,this.customCamera=!0;else{var l=s.fov,o=s.far,c=s.near,u=new n.PerspectiveCamera(l,a/r,c,o);(!l||!o)&&e&&(console.warn("camera.fov \u9ED8\u8BA4\u503C\u4E3A 45\uFF0C\u65E7\u7248\u672C\u4E3A 12"),console.warn("camera.far \u9ED8\u8BA4\u503C\u4E3A 1000\uFF0C\u65E7\u7248\u672C\u4E3A 20000")),u.position.set(0,0,400),u.lookAt(0,0,0),this.camera=u}}var t=f.prototype;return t.checkCameraChange=function(){var e=this.camera,a=this.oldCameraPosition.equals(e.position)&&this.oldCameraRotation.equals(e.rotation);return this.oldCameraPosition=e.position.clone(),this.oldCameraRotation=e.rotation.clone(),!a},t.setSize=function(e,a){this.camera instanceof n.PerspectiveCamera&&(this.camera.aspect=e/a),this.camera.updateProjectionMatrix()},t.dispose=function(){this.camera=void 0},t.setGui=function(e){var a=this,r=new p;r.guiParams={camera:{x:{min:-1e4,max:1e4,step:1,target:function(){return a.camera.position}},y:{min:-1e4,max:1e4,step:1,target:function(){return a.camera.position}},z:{min:-1e4,max:1e4,step:1,target:function(){return a.camera.position}},near:{min:0,max:1e3,step:1,target:function(){return a.camera},onChange:function(s){a.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return a.camera},onChange:function(s){a.camera.updateProjectionMatrix()}}}},this.camera instanceof n.PerspectiveCamera&&(r.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return a.camera},onChange:function(s){a.camera.updateProjectionMatrix()}}),r.showGuiParams(e)},f}(),k=se(519),xe={background:null},Ce=function(){"use strict";function f(i){R(this,f),this.options=i;var e=i.camera,a=i.sceneParams,r=a.background,s=new n.Scene;r&&(s.background=r),s.add(e),this.scene=s}var t=f.prototype;return t.addAxesHelper=function(){var e,a=new n.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(a)},t.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(a){(0,k.disposeMesh)(a)}),this.scene=void 0},f}();const Ne={type:"change"},De={type:"start"},Ye={type:"end"};class T extends n.EventDispatcher{constructor(t,i){super(),i===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),i===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=t,this.domElement=i,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new n.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:n.MOUSE.ROTATE,MIDDLE:n.MOUSE.DOLLY,RIGHT:n.MOUSE.PAN},this.touches={ONE:n.TOUCH.ROTATE,TWO:n.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(d){d.addEventListener("keydown",_t),this._domElementKeyEvents=d},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(Ne),e.update(),r=a.NONE},this.update=function(){const d=new n.Vector3,N=new n.Quaternion().setFromUnitVectors(t.up,new n.Vector3(0,1,0)),oe=N.clone().invert(),de=new n.Vector3,Pe=new n.Quaternion,ze=2*Math.PI;return function(){const Xt=e.object.position;d.copy(Xt).sub(e.target),d.applyQuaternion(N),l.setFromVector3(d),e.autoRotate&&r===a.NONE&&$(Te()),e.enableDamping?(l.theta+=o.theta*e.dampingFactor,l.phi+=o.phi*e.dampingFactor):(l.theta+=o.theta,l.phi+=o.phi);let Ee=e.minAzimuthAngle,Le=e.maxAzimuthAngle;return isFinite(Ee)&&isFinite(Le)&&(Ee<-Math.PI?Ee+=ze:Ee>Math.PI&&(Ee-=ze),Le<-Math.PI?Le+=ze:Le>Math.PI&&(Le-=ze),Ee<=Le?l.theta=Math.max(Ee,Math.min(Le,l.theta)):l.theta=l.theta>(Ee+Le)/2?Math.max(Ee,l.theta):Math.min(Le,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),l.radius*=c,l.radius=Math.max(e.minDistance,Math.min(e.maxDistance,l.radius)),e.enableDamping===!0?e.target.addScaledVector(u,e.dampingFactor):e.target.add(u),d.setFromSpherical(l),d.applyQuaternion(oe),Xt.copy(e.target).add(d),e.object.lookAt(e.target),e.enableDamping===!0?(o.theta*=1-e.dampingFactor,o.phi*=1-e.dampingFactor,u.multiplyScalar(1-e.dampingFactor)):(o.set(0,0,0),u.set(0,0,0)),c=1,m||de.distanceToSquared(e.object.position)>s||8*(1-Pe.dot(e.object.quaternion))>s?(e.dispatchEvent(Ne),de.copy(e.object.position),Pe.copy(e.object.quaternion),m=!1,!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",Dt),e.domElement.removeEventListener("pointerdown",Nt),e.domElement.removeEventListener("pointercancel",Ot),e.domElement.removeEventListener("wheel",Rt),e.domElement.removeEventListener("pointermove",ut),e.domElement.removeEventListener("pointerup",ft),e._domElementKeyEvents!==null&&e._domElementKeyEvents.removeEventListener("keydown",_t)};const e=this,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let r=a.NONE;const s=1e-6,l=new n.Spherical,o=new n.Spherical;let c=1;const u=new n.Vector3;let m=!1;const P=new n.Vector2,A=new n.Vector2,v=new n.Vector2,h=new n.Vector2,y=new n.Vector2,_=new n.Vector2,I=new n.Vector2,Q=new n.Vector2,B=new n.Vector2,L=[],ne={};function Te(){return 2*Math.PI/60/60*e.autoRotateSpeed}function he(){return Math.pow(.95,e.zoomSpeed)}function $(d){o.theta-=d}function Xe(d){o.phi-=d}const Be=function(){const d=new n.Vector3;return function(oe,de){d.setFromMatrixColumn(de,0),d.multiplyScalar(-oe),u.add(d)}}(),W=function(){const d=new n.Vector3;return function(oe,de){e.screenSpacePanning===!0?d.setFromMatrixColumn(de,1):(d.setFromMatrixColumn(de,0),d.crossVectors(e.object.up,d)),d.multiplyScalar(oe),u.add(d)}}(),Se=function(){const d=new n.Vector3;return function(oe,de){const Pe=e.domElement;if(e.object.isPerspectiveCamera){const ze=e.object.position;d.copy(ze).sub(e.target);let Je=d.length();Je*=Math.tan(e.object.fov/2*Math.PI/180),Be(2*oe*Je/Pe.clientHeight,e.object.matrix),W(2*de*Je/Pe.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(Be(oe*(e.object.right-e.object.left)/e.object.zoom/Pe.clientWidth,e.object.matrix),W(de*(e.object.top-e.object.bottom)/e.object.zoom/Pe.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function pe(d){e.object.isPerspectiveCamera?c/=d:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom*d)),e.object.updateProjectionMatrix(),m=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Ve(d){e.object.isPerspectiveCamera?c*=d:e.object.isOrthographicCamera?(e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/d)),e.object.updateProjectionMatrix(),m=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Ze(d){P.set(d.clientX,d.clientY)}function lt(d){I.set(d.clientX,d.clientY)}function qe(d){h.set(d.clientX,d.clientY)}function Ke(d){A.set(d.clientX,d.clientY),v.subVectors(A,P).multiplyScalar(e.rotateSpeed);const N=e.domElement;$(2*Math.PI*v.x/N.clientHeight),Xe(2*Math.PI*v.y/N.clientHeight),P.copy(A),e.update()}function ba(d){Q.set(d.clientX,d.clientY),B.subVectors(Q,I),B.y>0?pe(he()):B.y<0&&Ve(he()),I.copy(Q),e.update()}function ya(d){y.set(d.clientX,d.clientY),_.subVectors(y,h).multiplyScalar(e.panSpeed),Se(_.x,_.y),h.copy(y),e.update()}function Sa(d){d.deltaY<0?Ve(he()):d.deltaY>0&&pe(he()),e.update()}function Fa(d){let N=!1;switch(d.code){case e.keys.UP:Se(0,e.keyPanSpeed),N=!0;break;case e.keys.BOTTOM:Se(0,-e.keyPanSpeed),N=!0;break;case e.keys.LEFT:Se(e.keyPanSpeed,0),N=!0;break;case e.keys.RIGHT:Se(-e.keyPanSpeed,0),N=!0;break}N&&(d.preventDefault(),e.update())}function Ft(){if(L.length===1)P.set(L[0].pageX,L[0].pageY);else{const d=.5*(L[0].pageX+L[1].pageX),N=.5*(L[0].pageY+L[1].pageY);P.set(d,N)}}function wt(){if(L.length===1)h.set(L[0].pageX,L[0].pageY);else{const d=.5*(L[0].pageX+L[1].pageX),N=.5*(L[0].pageY+L[1].pageY);h.set(d,N)}}function Mt(){const d=L[0].pageX-L[1].pageX,N=L[0].pageY-L[1].pageY,oe=Math.sqrt(d*d+N*N);I.set(0,oe)}function wa(){e.enableZoom&&Mt(),e.enablePan&&wt()}function Ma(){e.enableZoom&&Mt(),e.enableRotate&&Ft()}function Et(d){if(L.length==1)A.set(d.pageX,d.pageY);else{const oe=dt(d),de=.5*(d.pageX+oe.x),Pe=.5*(d.pageY+oe.y);A.set(de,Pe)}v.subVectors(A,P).multiplyScalar(e.rotateSpeed);const N=e.domElement;$(2*Math.PI*v.x/N.clientHeight),Xe(2*Math.PI*v.y/N.clientHeight),P.copy(A)}function Lt(d){if(L.length===1)y.set(d.pageX,d.pageY);else{const N=dt(d),oe=.5*(d.pageX+N.x),de=.5*(d.pageY+N.y);y.set(oe,de)}_.subVectors(y,h).multiplyScalar(e.panSpeed),Se(_.x,_.y),h.copy(y)}function Ct(d){const N=dt(d),oe=d.pageX-N.x,de=d.pageY-N.y,Pe=Math.sqrt(oe*oe+de*de);Q.set(0,Pe),B.set(0,Math.pow(Q.y/I.y,e.zoomSpeed)),pe(B.y),I.copy(Q)}function Ea(d){e.enableZoom&&Ct(d),e.enablePan&&Lt(d)}function La(d){e.enableZoom&&Ct(d),e.enableRotate&&Et(d)}function Nt(d){e.enabled!==!1&&(L.length===0&&(e.domElement.setPointerCapture(d.pointerId),e.domElement.addEventListener("pointermove",ut),e.domElement.addEventListener("pointerup",ft)),_a(d),d.pointerType==="touch"?Oa(d):Ca(d))}function ut(d){e.enabled!==!1&&(d.pointerType==="touch"?Ra(d):Na(d))}function ft(d){Ut(d),L.length===0&&(e.domElement.releasePointerCapture(d.pointerId),e.domElement.removeEventListener("pointermove",ut),e.domElement.removeEventListener("pointerup",ft)),e.dispatchEvent(Ye),r=a.NONE}function Ot(d){Ut(d)}function Ca(d){let N;switch(d.button){case 0:N=e.mouseButtons.LEFT;break;case 1:N=e.mouseButtons.MIDDLE;break;case 2:N=e.mouseButtons.RIGHT;break;default:N=-1}switch(N){case n.MOUSE.DOLLY:if(e.enableZoom===!1)return;lt(d),r=a.DOLLY;break;case n.MOUSE.ROTATE:if(d.ctrlKey||d.metaKey||d.shiftKey){if(e.enablePan===!1)return;qe(d),r=a.PAN}else{if(e.enableRotate===!1)return;Ze(d),r=a.ROTATE}break;case n.MOUSE.PAN:if(d.ctrlKey||d.metaKey||d.shiftKey){if(e.enableRotate===!1)return;Ze(d),r=a.ROTATE}else{if(e.enablePan===!1)return;qe(d),r=a.PAN}break;default:r=a.NONE}r!==a.NONE&&e.dispatchEvent(De)}function Na(d){if(e.enabled!==!1)switch(r){case a.ROTATE:if(e.enableRotate===!1)return;Ke(d);break;case a.DOLLY:if(e.enableZoom===!1)return;ba(d);break;case a.PAN:if(e.enablePan===!1)return;ya(d);break}}function Rt(d){e.enabled===!1||e.enableZoom===!1||r!==a.NONE||(d.preventDefault(),e.dispatchEvent(De),Sa(d),e.dispatchEvent(Ye))}function _t(d){e.enabled===!1||e.enablePan===!1||Fa(d)}function Oa(d){switch(It(d),L.length){case 1:switch(e.touches.ONE){case n.TOUCH.ROTATE:if(e.enableRotate===!1)return;Ft(),r=a.TOUCH_ROTATE;break;case n.TOUCH.PAN:if(e.enablePan===!1)return;wt(),r=a.TOUCH_PAN;break;default:r=a.NONE}break;case 2:switch(e.touches.TWO){case n.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;wa(),r=a.TOUCH_DOLLY_PAN;break;case n.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ma(),r=a.TOUCH_DOLLY_ROTATE;break;default:r=a.NONE}break;default:r=a.NONE}r!==a.NONE&&e.dispatchEvent(De)}function Ra(d){switch(It(d),r){case a.TOUCH_ROTATE:if(e.enableRotate===!1)return;Et(d),e.update();break;case a.TOUCH_PAN:if(e.enablePan===!1)return;Lt(d),e.update();break;case a.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Ea(d),e.update();break;case a.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;La(d),e.update();break;default:r=a.NONE}}function Dt(d){e.enabled!==!1&&d.preventDefault()}function _a(d){L.push(d)}function Ut(d){delete ne[d.pointerId];for(let N=0;N<L.length;N++)if(L[N].pointerId==d.pointerId){L.splice(N,1);return}}function It(d){let N=ne[d.pointerId];N===void 0&&(N=new n.Vector2,ne[d.pointerId]=N),N.set(d.pageX,d.pageY)}function dt(d){const N=d.pointerId===L[0].pointerId?L[1]:L[0];return ne[N.pointerId]}e.domElement.addEventListener("contextmenu",Dt),e.domElement.addEventListener("pointerdown",Nt),e.domElement.addEventListener("pointercancel",Ot),e.domElement.addEventListener("wheel",Rt,{passive:!1}),this.update()}}class x extends T{constructor(t,i){super(t,i),this.screenSpacePanning=!1,this.mouseButtons.LEFT=n.MOUSE.PAN,this.mouseButtons.RIGHT=n.MOUSE.ROTATE,this.touches.ONE=n.TOUCH.PAN,this.touches.TWO=n.TOUCH.DOLLY_ROTATE}}var F={},O=function(){"use strict";function f(i){R(this,f),this.options=i;var e=i.camera,a=i.controlParams,r=i.mapControl,s=a.domElement,l=r?new x(e,s):new T(e,s);l.minPolarAngle=Math.PI*.15,l.maxPolarAngle=Math.PI*.85,l.enableDamping=!0,l.dampingFactor=.063,l.autoRotate=!1,l.autoRotateSpeed=-60,l.enableZoom=!0,l.zoomSpeed=.2,this.control=l}var t=f.prototype;return t.limitPan=function(e){var a=e.maxX,r=a===void 0?1/0:a,s=e.minX,l=s===void 0?-1/0:s,o=e.maxZ,c=o===void 0?1/0:o,u=e.minZ,m=u===void 0?-1/0:u,P=e.maxY,A=P===void 0?1/0:P,v=e.minY,h=v===void 0?-1/0:v,y=this.limitPanV||new n.Vector3,_=this.control,I=this.options.camera,Q=new n.Vector3(l,h,m),B=new n.Vector3(r,A,c);this.limitPanV=y,y.copy(_.target),_.target.clamp(Q,B),y.sub(_.target),I.position.sub(y)},t.update=function(){var e;(e=this.control)===null||e===void 0||e.update()},t.dispose=function(){var e;(e=this.control)===null||e===void 0||e.dispose(),this.control=void 0},f}();class E extends n.Object3D{constructor(t=document.createElement("div")){super(),this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(i){i.element instanceof Element&&i.element.parentNode!==null&&i.element.parentNode.removeChild(i.element)})})}copy(t,i){return super.copy(t,i),this.element=t.element.cloneNode(!0),this}}E.prototype.isCSS2DObject=!0;const V=new n.Vector3,le=new n.Matrix4,ue=new n.Matrix4,ce=new n.Vector3,fe=new n.Vector3;class je{constructor(t={}){const i=this;let e,a,r,s;const l={objects:new WeakMap},o=t.element!==void 0?t.element:document.createElement("div");o.style.overflow="hidden",this.domElement=o,this.getSize=function(){return{width:e,height:a}},this.render=function(A,v){A.autoUpdate===!0&&A.updateMatrixWorld(),v.parent===null&&v.updateMatrixWorld(),le.copy(v.matrixWorldInverse),ue.multiplyMatrices(v.projectionMatrix,le),c(A,A,v),P(A)},this.setSize=function(A,v){e=A,a=v,r=e/2,s=a/2,o.style.width=A+"px",o.style.height=v+"px"};function c(A,v,h){if(A.isCSS2DObject){A.onBeforeRender(i,v,h),V.setFromMatrixPosition(A.matrixWorld),V.applyMatrix4(ue);const y=A.element;/apple/i.test(navigator.vendor)?y.style.transform="translate(-50%,-50%) translate("+Math.round(V.x*r+r)+"px,"+Math.round(-V.y*s+s)+"px)":y.style.transform="translate(-50%,-50%) translate("+(V.x*r+r)+"px,"+(-V.y*s+s)+"px)",y.style.display=A.visible&&V.z>=-1&&V.z<=1?"":"none";const _={distanceToCameraSquared:u(h,A)};l.objects.set(A,_),y.parentNode!==o&&o.appendChild(y),A.onAfterRender(i,v,h)}for(let y=0,_=A.children.length;y<_;y++)c(A.children[y],v,h)}function u(A,v){return ce.setFromMatrixPosition(A.matrixWorld),fe.setFromMatrixPosition(v.matrixWorld),ce.distanceToSquared(fe)}function m(A){const v=[];return A.traverse(function(h){h.isCSS2DObject&&v.push(h)}),v}function P(A){const v=m(A).sort(function(y,_){const I=l.objects.get(y).distanceToCameraSquared,Q=l.objects.get(_).distanceToCameraSquared;return I-Q}),h=v.length;for(let y=0,_=v.length;y<_;y++)v[y].element.style.zIndex=h-y}}}const Oe=new n.Vector3,Fe=new n.Quaternion,ht=new n.Vector3;class et extends n.Object3D{constructor(t=document.createElement("div")){super(),this.element=t,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(i){i.element instanceof Element&&i.element.parentNode!==null&&i.element.parentNode.removeChild(i.element)})})}copy(t,i){return super.copy(t,i),this.element=t.element.cloneNode(!0),this}}et.prototype.isCSS3DObject=!0;class pt extends et{constructor(t){super(t),this.rotation2D=0}copy(t,i){return super.copy(t,i),this.rotation2D=t.rotation2D,this}}pt.prototype.isCSS3DSprite=!0;const be=new n.Matrix4,zt=new n.Matrix4;class Yt{constructor(t={}){const i=this;let e,a,r,s;const l={camera:{fov:0,style:""},objects:new WeakMap},o=t.element!==void 0?t.element:document.createElement("div");o.style.overflow="hidden",this.domElement=o;const c=document.createElement("div");c.style.transformStyle="preserve-3d",c.style.pointerEvents="none",o.appendChild(c),this.getSize=function(){return{width:e,height:a}},this.render=function(v,h){const y=h.projectionMatrix.elements[5]*s;l.camera.fov!==y&&(o.style.perspective=h.isPerspectiveCamera?y+"px":"",l.camera.fov=y),v.autoUpdate===!0&&v.updateMatrixWorld(),h.parent===null&&h.updateMatrixWorld();let _,I;h.isOrthographicCamera&&(_=-(h.right+h.left)/2,I=(h.top+h.bottom)/2);const Q=h.isOrthographicCamera?"scale("+y+")translate("+u(_)+"px,"+u(I)+"px)"+m(h.matrixWorldInverse):"translateZ("+y+"px)"+m(h.matrixWorldInverse),B=Q+"translate("+r+"px,"+s+"px)";l.camera.style!==B&&(c.style.transform=B,l.camera.style=B),A(v,v,h,Q)},this.setSize=function(v,h){e=v,a=h,r=e/2,s=a/2,o.style.width=v+"px",o.style.height=h+"px",c.style.width=v+"px",c.style.height=h+"px"};function u(v){return Math.abs(v)<1e-10?0:v}function m(v){const h=v.elements;return"matrix3d("+u(h[0])+","+u(-h[1])+","+u(h[2])+","+u(h[3])+","+u(h[4])+","+u(-h[5])+","+u(h[6])+","+u(h[7])+","+u(h[8])+","+u(-h[9])+","+u(h[10])+","+u(h[11])+","+u(h[12])+","+u(-h[13])+","+u(h[14])+","+u(h[15])+")"}function P(v){const h=v.elements,y="matrix3d("+u(h[0])+","+u(h[1])+","+u(h[2])+","+u(h[3])+","+u(-h[4])+","+u(-h[5])+","+u(-h[6])+","+u(-h[7])+","+u(h[8])+","+u(h[9])+","+u(h[10])+","+u(h[11])+","+u(h[12])+","+u(h[13])+","+u(h[14])+","+u(h[15])+")";return"translate(-50%,-50%)"+y}function A(v,h,y,_){if(v.isCSS3DObject){v.onBeforeRender(i,h,y);let I;v.isCSS3DSprite?(be.copy(y.matrixWorldInverse),be.transpose(),v.rotation2D!==0&&be.multiply(zt.makeRotationZ(v.rotation2D)),v.matrixWorld.decompose(Oe,Fe,ht),be.setPosition(Oe),be.scale(ht),be.elements[3]=0,be.elements[7]=0,be.elements[11]=0,be.elements[15]=1,I=P(be)):I=P(v.matrixWorld);const Q=v.element,B=l.objects.get(v);if(B===void 0||B.style!==I){Q.style.transform=I;const L={style:I};l.objects.set(v,L)}Q.style.display=v.visible?"":"none",Q.parentNode!==c&&c.appendChild(Q),v.onAfterRender(i,h,y)}for(let I=0,Q=v.children.length;I<Q;I++)A(v.children[I],h,y,_)}}}var mt={zIndex:"auto"},jt=function(){"use strict";function f(i){R(this,f),this.container=i}var t=f.prototype;return t.addRenderer=function(e,a){var r=this.container,s=r.offsetWidth,l=r.offsetHeight,o=e==="css2d"?new je:new Yt;o.domElement.style.position="absolute",o.domElement.style.top="0",o.domElement.style.pointerEvents="none",o.domElement.style.zIndex=a.zIndex,o.setSize(s,l),r.appendChild(o.domElement),e==="css2d"?this.css2Drenderer=o:e==="css3d"&&(this.css3Drenderer=o)},t.setSize=function(e,a){var r,s;(r=this.css2Drenderer)===null||r===void 0||r.setSize(e,a),(s=this.css3Drenderer)===null||s===void 0||s.setSize(e,a)},t.render=function(e,a){var r,s;(r=this.css2Drenderer)===null||r===void 0||r.render(e,a),(s=this.css3Drenderer)===null||s===void 0||s.render(e,a)},t.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},f}(),ge={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
2
-
3
- varying vec2 vUv;
4
-
5
- void main() {
6
-
7
- vUv = uv;
8
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
9
-
10
- }`,fragmentShader:`
11
-
12
- uniform float opacity;
13
-
14
- uniform sampler2D tDiffuse;
15
-
16
- varying vec2 vUv;
17
-
18
- void main() {
19
-
20
- vec4 texel = texture2D( tDiffuse, vUv );
21
- gl_FragColor = opacity * texel;
22
-
23
- }`};class we{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const Qt=new n.OrthographicCamera(-1,1,1,-1,0,1),tt=new n.BufferGeometry;tt.setAttribute("position",new n.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),tt.setAttribute("uv",new n.Float32BufferAttribute([0,2,0,0,2,0],2));class Ue{constructor(t){this._mesh=new n.Mesh(tt,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Qt)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class Ie extends we{constructor(t,i){super(),this.textureID=i!==void 0?i:"tDiffuse",t instanceof n.ShaderMaterial?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=n.UniformsUtils.clone(t.uniforms),this.material=new n.ShaderMaterial({defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new Ue(this.material)}render(t,i,e){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=e.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(i),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}}class vt extends we{constructor(t,i){super(),this.scene=t,this.camera=i,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,i,e){const a=t.getContext(),r=t.state;r.buffers.color.setMask(!1),r.buffers.depth.setMask(!1),r.buffers.color.setLocked(!0),r.buffers.depth.setLocked(!0);let s,l;this.inverse?(s=0,l=1):(s=1,l=0),r.buffers.stencil.setTest(!0),r.buffers.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),r.buffers.stencil.setFunc(a.ALWAYS,s,4294967295),r.buffers.stencil.setClear(l),r.buffers.stencil.setLocked(!0),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(i),this.clear&&t.clear(),t.render(this.scene,this.camera),r.buffers.color.setLocked(!1),r.buffers.depth.setLocked(!1),r.buffers.stencil.setLocked(!1),r.buffers.stencil.setFunc(a.EQUAL,1,4294967295),r.buffers.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),r.buffers.stencil.setLocked(!0)}}class Gt extends we{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class xt{constructor(t,i){if(this.renderer=t,i===void 0){const e={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat},a=t.getSize(new n.Vector2);this._pixelRatio=t.getPixelRatio(),this._width=a.width,this._height=a.height,i=new n.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,e),i.texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=i.width,this._height=i.height;this.renderTarget1=i,this.renderTarget2=i.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],ge===void 0&&console.error("THREE.EffectComposer relies on CopyShader"),Ie===void 0&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new Ie(ge),this.clock=new n.Clock}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,i){this.passes.splice(i,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const i=this.passes.indexOf(t);i!==-1&&this.passes.splice(i,1)}isLastEnabledPass(t){for(let i=t+1;i<this.passes.length;i++)if(this.passes[i].enabled)return!1;return!0}render(t){t===void 0&&(t=this.clock.getDelta());const i=this.renderer.getRenderTarget();let e=!1;for(let a=0,r=this.passes.length;a<r;a++){const s=this.passes[a];if(s.enabled!==!1){if(s.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(a),s.render(this.renderer,this.writeBuffer,this.readBuffer,t,e),s.needsSwap){if(e){const l=this.renderer.getContext(),o=this.renderer.state.buffers.stencil;o.setFunc(l.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,t),o.setFunc(l.EQUAL,1,4294967295)}this.swapBuffers()}vt!==void 0&&(s instanceof vt?e=!0:s instanceof Gt&&(e=!1))}}this.renderer.setRenderTarget(i)}reset(t){if(t===void 0){const i=this.renderer.getSize(new n.Vector2);this._pixelRatio=this.renderer.getPixelRatio(),this._width=i.width,this._height=i.height,t=this.renderTarget1.clone(),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(t,i){this._width=t,this._height=i;const e=this._width*this._pixelRatio,a=this._height*this._pixelRatio;this.renderTarget1.setSize(e,a),this.renderTarget2.setSize(e,a);for(let r=0;r<this.passes.length;r++)this.passes[r].setSize(e,a)}setPixelRatio(t){this._pixelRatio=t,this.setSize(this._width,this._height)}}class Da{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const Wt=new n.OrthographicCamera(-1,1,1,-1,0,1),at=new n.BufferGeometry;at.setAttribute("position",new n.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),at.setAttribute("uv",new n.Float32BufferAttribute([0,2,0,0,2,0],2));class Ua{constructor(t){this._mesh=new Mesh(at,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Wt)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class Ht extends we{constructor(t,i,e,a,r){super(),this.scene=t,this.camera=i,this.overrideMaterial=e,this.clearColor=a,this.clearAlpha=r!==void 0?r:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new n.Color}render(t,i,e){const a=t.autoClear;t.autoClear=!1;let r,s;this.overrideMaterial!==void 0&&(s=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(t.getClearColor(this._oldClearColor),r=t.getClearAlpha(),t.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&t.clearDepth(),t.setRenderTarget(this.renderToScreen?null:e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),t.render(this.scene,this.camera),this.clearColor&&t.setClearColor(this._oldClearColor,r),this.overrideMaterial!==void 0&&(this.scene.overrideMaterial=s),t.autoClear=a}}const kt={uniforms:{tDiffuse:{value:null}},vertexShader:`
24
-
25
- varying vec2 vUv;
26
-
27
- void main() {
28
-
29
- vUv = uv;
30
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
31
-
32
- }`,fragmentShader:`
33
-
34
- uniform sampler2D tDiffuse;
35
-
36
- varying vec2 vUv;
37
-
38
- void main() {
39
-
40
- vec4 tex = texture2D( tDiffuse, vUv );
41
-
42
- gl_FragColor = LinearTosRGB( tex );
43
-
44
- }`},Qe={defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new n.Vector2(1/1024,1/512)}},vertexShader:`
45
-
46
- uniform vec2 resolution;
47
-
48
- varying vec2 vUv;
49
- varying vec4 vOffset[ 3 ];
50
-
51
- void SMAAEdgeDetectionVS( vec2 texcoord ) {
52
- vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component
53
- vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
54
- vOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 ); // WebGL port note: Changed sign in W component
55
- }
56
-
57
- void main() {
58
-
59
- vUv = uv;
60
-
61
- SMAAEdgeDetectionVS( vUv );
62
-
63
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
64
-
65
- }`,fragmentShader:`
66
-
67
- uniform sampler2D tDiffuse;
68
-
69
- varying vec2 vUv;
70
- varying vec4 vOffset[ 3 ];
71
-
72
- vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {
73
- vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );
74
-
75
- // Calculate color deltas:
76
- vec4 delta;
77
- vec3 C = texture2D( colorTex, texcoord ).rgb;
78
-
79
- vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;
80
- vec3 t = abs( C - Cleft );
81
- delta.x = max( max( t.r, t.g ), t.b );
82
-
83
- vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;
84
- t = abs( C - Ctop );
85
- delta.y = max( max( t.r, t.g ), t.b );
86
-
87
- // We do the usual threshold:
88
- vec2 edges = step( threshold, delta.xy );
89
-
90
- // Then discard if there is no edge:
91
- if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )
92
- discard;
93
-
94
- // Calculate right and bottom deltas:
95
- vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;
96
- t = abs( C - Cright );
97
- delta.z = max( max( t.r, t.g ), t.b );
98
-
99
- vec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;
100
- t = abs( C - Cbottom );
101
- delta.w = max( max( t.r, t.g ), t.b );
102
-
103
- // Calculate the maximum delta in the direct neighborhood:
104
- float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );
105
-
106
- // Calculate left-left and top-top deltas:
107
- vec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;
108
- t = abs( C - Cleftleft );
109
- delta.z = max( max( t.r, t.g ), t.b );
110
-
111
- vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;
112
- t = abs( C - Ctoptop );
113
- delta.w = max( max( t.r, t.g ), t.b );
114
-
115
- // Calculate the final maximum delta:
116
- maxDelta = max( max( maxDelta, delta.z ), delta.w );
117
-
118
- // Local contrast adaptation in action:
119
- edges.xy *= step( 0.5 * maxDelta, delta.xy );
120
-
121
- return vec4( edges, 0.0, 0.0 );
122
- }
123
-
124
- void main() {
125
-
126
- gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );
127
-
128
- }`},Ge={defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new n.Vector2(1/1024,1/512)}},vertexShader:`
129
-
130
- uniform vec2 resolution;
131
-
132
- varying vec2 vUv;
133
- varying vec4 vOffset[ 3 ];
134
- varying vec2 vPixcoord;
135
-
136
- void SMAABlendingWeightCalculationVS( vec2 texcoord ) {
137
- vPixcoord = texcoord / resolution;
138
-
139
- // We will use these offsets for the searches later on (see @PSEUDO_GATHER4):
140
- vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components
141
- vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components
142
-
143
- // And these for the searches, they indicate the ends of the loops:
144
- vOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );
145
-
146
- }
147
-
148
- void main() {
149
-
150
- vUv = uv;
151
-
152
- SMAABlendingWeightCalculationVS( vUv );
153
-
154
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
155
-
156
- }`,fragmentShader:`
157
-
158
- #define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )
159
-
160
- uniform sampler2D tDiffuse;
161
- uniform sampler2D tArea;
162
- uniform sampler2D tSearch;
163
- uniform vec2 resolution;
164
-
165
- varying vec2 vUv;
166
- varying vec4 vOffset[3];
167
- varying vec2 vPixcoord;
168
-
169
- #if __VERSION__ == 100
170
- vec2 round( vec2 x ) {
171
- return sign( x ) * floor( abs( x ) + 0.5 );
172
- }
173
- #endif
174
-
175
- float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {
176
- // Not required if searchTex accesses are set to point:
177
- // float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);
178
- // e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +
179
- // e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;
180
- e.r = bias + e.r * scale;
181
- return 255.0 * texture2D( searchTex, e, 0.0 ).r;
182
- }
183
-
184
- float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
185
- /**
186
- * @PSEUDO_GATHER4
187
- * This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
188
- * sample between edge, thus fetching four edges in a row.
189
- * Sampling with different offsets in each direction allows to disambiguate
190
- * which edges are active from the four fetched ones.
191
- */
192
- vec2 e = vec2( 0.0, 1.0 );
193
-
194
- for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
195
- e = texture2D( edgesTex, texcoord, 0.0 ).rg;
196
- texcoord -= vec2( 2.0, 0.0 ) * resolution;
197
- if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;
198
- }
199
-
200
- // We correct the previous (-0.25, -0.125) offset we applied:
201
- texcoord.x += 0.25 * resolution.x;
202
-
203
- // The searches are bias by 1, so adjust the coords accordingly:
204
- texcoord.x += resolution.x;
205
-
206
- // Disambiguate the length added by the last step:
207
- texcoord.x += 2.0 * resolution.x; // Undo last step
208
- texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);
209
-
210
- return texcoord.x;
211
- }
212
-
213
- float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
214
- vec2 e = vec2( 0.0, 1.0 );
215
-
216
- for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
217
- e = texture2D( edgesTex, texcoord, 0.0 ).rg;
218
- texcoord += vec2( 2.0, 0.0 ) * resolution;
219
- if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;
220
- }
221
-
222
- texcoord.x -= 0.25 * resolution.x;
223
- texcoord.x -= resolution.x;
224
- texcoord.x -= 2.0 * resolution.x;
225
- texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );
226
-
227
- return texcoord.x;
228
- }
229
-
230
- float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
231
- vec2 e = vec2( 1.0, 0.0 );
232
-
233
- for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
234
- e = texture2D( edgesTex, texcoord, 0.0 ).rg;
235
- texcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
236
- if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;
237
- }
238
-
239
- texcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign
240
- texcoord.y -= resolution.y; // WebGL port note: Changed sign
241
- texcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign
242
- texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign
243
-
244
- return texcoord.y;
245
- }
246
-
247
- float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
248
- vec2 e = vec2( 1.0, 0.0 );
249
-
250
- for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
251
- e = texture2D( edgesTex, texcoord, 0.0 ).rg;
252
- texcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
253
- if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;
254
- }
255
-
256
- texcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign
257
- texcoord.y += resolution.y; // WebGL port note: Changed sign
258
- texcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign
259
- texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign
260
-
261
- return texcoord.y;
262
- }
263
-
264
- vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {
265
- // Rounding prevents precision errors of bilinear filtering:
266
- vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;
267
-
268
- // We do a scale and bias for mapping to texel space:
269
- texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );
270
-
271
- // Move to proper place, according to the subpixel offset:
272
- texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;
273
-
274
- return texture2D( areaTex, texcoord, 0.0 ).rg;
275
- }
276
-
277
- vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {
278
- vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );
279
-
280
- vec2 e = texture2D( edgesTex, texcoord ).rg;
281
-
282
- if ( e.g > 0.0 ) { // Edge at north
283
- vec2 d;
284
-
285
- // Find the distance to the left:
286
- vec2 coords;
287
- coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );
288
- coords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET)
289
- d.x = coords.x;
290
-
291
- // Now fetch the left crossing edges, two at a time using bilinear
292
- // filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to
293
- // discern what value each edge has:
294
- float e1 = texture2D( edgesTex, coords, 0.0 ).r;
295
-
296
- // Find the distance to the right:
297
- coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );
298
- d.y = coords.x;
299
-
300
- // We want the distances to be in pixel units (doing this here allow to
301
- // better interleave arithmetic and memory accesses):
302
- d = d / resolution.x - pixcoord.x;
303
-
304
- // SMAAArea below needs a sqrt, as the areas texture is compressed
305
- // quadratically:
306
- vec2 sqrt_d = sqrt( abs( d ) );
307
-
308
- // Fetch the right crossing edges:
309
- coords.y -= 1.0 * resolution.y; // WebGL port note: Added
310
- float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;
311
-
312
- // Ok, we know how this pattern looks like, now it is time for getting
313
- // the actual area:
314
- weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );
315
- }
316
-
317
- if ( e.r > 0.0 ) { // Edge at west
318
- vec2 d;
319
-
320
- // Find the distance to the top:
321
- vec2 coords;
322
-
323
- coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );
324
- coords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x;
325
- d.x = coords.y;
326
-
327
- // Fetch the top crossing edges:
328
- float e1 = texture2D( edgesTex, coords, 0.0 ).g;
329
-
330
- // Find the distance to the bottom:
331
- coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );
332
- d.y = coords.y;
333
-
334
- // We want the distances to be in pixel units:
335
- d = d / resolution.y - pixcoord.y;
336
-
337
- // SMAAArea below needs a sqrt, as the areas texture is compressed
338
- // quadratically:
339
- vec2 sqrt_d = sqrt( abs( d ) );
340
-
341
- // Fetch the bottom crossing edges:
342
- coords.y -= 1.0 * resolution.y; // WebGL port note: Added
343
- float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;
344
-
345
- // Get the area for this direction:
346
- weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );
347
- }
348
-
349
- return weights;
350
- }
351
-
352
- void main() {
353
-
354
- gl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );
355
-
356
- }`},rt={uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new n.Vector2(1/1024,1/512)}},vertexShader:`
357
-
358
- uniform vec2 resolution;
359
-
360
- varying vec2 vUv;
361
- varying vec4 vOffset[ 2 ];
362
-
363
- void SMAANeighborhoodBlendingVS( vec2 texcoord ) {
364
- vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component
365
- vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
366
- }
367
-
368
- void main() {
369
-
370
- vUv = uv;
371
-
372
- SMAANeighborhoodBlendingVS( vUv );
373
-
374
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
375
-
376
- }`,fragmentShader:`
377
-
378
- uniform sampler2D tDiffuse;
379
- uniform sampler2D tColor;
380
- uniform vec2 resolution;
381
-
382
- varying vec2 vUv;
383
- varying vec4 vOffset[ 2 ];
384
-
385
- vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {
386
- // Fetch the blending weights for current pixel:
387
- vec4 a;
388
- a.xz = texture2D( blendTex, texcoord ).xz;
389
- a.y = texture2D( blendTex, offset[ 1 ].zw ).g;
390
- a.w = texture2D( blendTex, offset[ 1 ].xy ).a;
391
-
392
- // Is there any blending weight with a value greater than 0.0?
393
- if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {
394
- return texture2D( colorTex, texcoord, 0.0 );
395
- } else {
396
- // Up to 4 lines can be crossing a pixel (one through each edge). We
397
- // favor blending by choosing the line with the maximum weight for each
398
- // direction:
399
- vec2 offset;
400
- offset.x = a.a > a.b ? a.a : -a.b; // left vs. right
401
- offset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs
402
-
403
- // Then we go in the direction that has the maximum weight:
404
- if ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical
405
- offset.y = 0.0;
406
- } else {
407
- offset.x = 0.0;
408
- }
409
-
410
- // Fetch the opposite color and lerp by hand:
411
- vec4 C = texture2D( colorTex, texcoord, 0.0 );
412
- texcoord += sign( offset ) * resolution;
413
- vec4 Cop = texture2D( colorTex, texcoord, 0.0 );
414
- float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );
415
-
416
- // WebGL port note: Added gamma correction
417
- C.xyz = pow(C.xyz, vec3(2.2));
418
- Cop.xyz = pow(Cop.xyz, vec3(2.2));
419
- vec4 mixed = mix(C, Cop, s);
420
- mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));
421
-
422
- return mixed;
423
- }
424
- }
425
-
426
- void main() {
427
-
428
- gl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );
429
-
430
- }`};class Vt extends we{constructor(t,i){super(),this.edgesRT=new n.WebGLRenderTarget(t,i,{depthBuffer:!1,generateMipmaps:!1,minFilter:n.LinearFilter,format:n.RGBFormat}),this.edgesRT.texture.name="SMAAPass.edges",this.weightsRT=new n.WebGLRenderTarget(t,i,{depthBuffer:!1,generateMipmaps:!1,minFilter:n.LinearFilter,format:n.RGBAFormat}),this.weightsRT.texture.name="SMAAPass.weights";const e=this,a=new Image;a.src=this.getAreaTexture(),a.onload=function(){e.areaTexture.needsUpdate=!0},this.areaTexture=new n.Texture,this.areaTexture.name="SMAAPass.area",this.areaTexture.image=a,this.areaTexture.format=n.RGBFormat,this.areaTexture.minFilter=n.LinearFilter,this.areaTexture.generateMipmaps=!1,this.areaTexture.flipY=!1;const r=new Image;r.src=this.getSearchTexture(),r.onload=function(){e.searchTexture.needsUpdate=!0},this.searchTexture=new n.Texture,this.searchTexture.name="SMAAPass.search",this.searchTexture.image=r,this.searchTexture.magFilter=n.NearestFilter,this.searchTexture.minFilter=n.NearestFilter,this.searchTexture.generateMipmaps=!1,this.searchTexture.flipY=!1,Qe===void 0&&console.error("THREE.SMAAPass relies on SMAAShader"),this.uniformsEdges=n.UniformsUtils.clone(Qe.uniforms),this.uniformsEdges.resolution.value.set(1/t,1/i),this.materialEdges=new n.ShaderMaterial({defines:Object.assign({},Qe.defines),uniforms:this.uniformsEdges,vertexShader:Qe.vertexShader,fragmentShader:Qe.fragmentShader}),this.uniformsWeights=n.UniformsUtils.clone(Ge.uniforms),this.uniformsWeights.resolution.value.set(1/t,1/i),this.uniformsWeights.tDiffuse.value=this.edgesRT.texture,this.uniformsWeights.tArea.value=this.areaTexture,this.uniformsWeights.tSearch.value=this.searchTexture,this.materialWeights=new n.ShaderMaterial({defines:Object.assign({},Ge.defines),uniforms:this.uniformsWeights,vertexShader:Ge.vertexShader,fragmentShader:Ge.fragmentShader}),this.uniformsBlend=n.UniformsUtils.clone(rt.uniforms),this.uniformsBlend.resolution.value.set(1/t,1/i),this.uniformsBlend.tDiffuse.value=this.weightsRT.texture,this.materialBlend=new n.ShaderMaterial({uniforms:this.uniformsBlend,vertexShader:rt.vertexShader,fragmentShader:rt.fragmentShader}),this.needsSwap=!1,this.fsQuad=new Ue(null)}render(t,i,e){this.uniformsEdges.tDiffuse.value=e.texture,this.fsQuad.material=this.materialEdges,t.setRenderTarget(this.edgesRT),this.clear&&t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.materialWeights,t.setRenderTarget(this.weightsRT),this.clear&&t.clear(),this.fsQuad.render(t),this.uniformsBlend.tColor.value=e.texture,this.fsQuad.material=this.materialBlend,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(i),this.clear&&t.clear(),this.fsQuad.render(t))}setSize(t,i){this.edgesRT.setSize(t,i),this.weightsRT.setSize(t,i),this.materialEdges.uniforms.resolution.value.set(1/t,1/i),this.materialWeights.uniforms.resolution.value.set(1/t,1/i),this.materialBlend.uniforms.resolution.value.set(1/t,1/i)}getAreaTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK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T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="}getSearchTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}}class Zt extends we{constructor(t,i,e,a){super(),this.scene=t,this.camera=i,this.sampleLevel=4,this.unbiased=!0,this.clearColor=e!==void 0?e:0,this.clearAlpha=a!==void 0?a:0,this._oldClearColor=new n.Color,ge===void 0&&console.error("THREE.SSAARenderPass relies on CopyShader");const r=ge;this.copyUniforms=n.UniformsUtils.clone(r.uniforms),this.copyMaterial=new n.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,premultipliedAlpha:!0,transparent:!0,blending:n.AdditiveBlending,depthTest:!1,depthWrite:!1}),this.fsQuad=new Ue(this.copyMaterial)}dispose(){this.sampleRenderTarget&&(this.sampleRenderTarget.dispose(),this.sampleRenderTarget=null)}setSize(t,i){this.sampleRenderTarget&&this.sampleRenderTarget.setSize(t,i)}render(t,i,e){this.sampleRenderTarget||(this.sampleRenderTarget=new n.WebGLRenderTarget(e.width,e.height,{minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat}),this.sampleRenderTarget.texture.name="SSAARenderPass.sample");const a=qt[Math.max(0,Math.min(this.sampleLevel,5))],r=t.autoClear;t.autoClear=!1,t.getClearColor(this._oldClearColor);const s=t.getClearAlpha(),l=1/a.length,o=1/32;this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture;const c={fullWidth:e.width,fullHeight:e.height,offsetX:0,offsetY:0,width:e.width,height:e.height},u=Object.assign({},this.camera.view);u.enabled&&Object.assign(c,u);for(let m=0;m<a.length;m++){const P=a[m];this.camera.setViewOffset&&this.camera.setViewOffset(c.fullWidth,c.fullHeight,c.offsetX+P[0]*.0625,c.offsetY+P[1]*.0625,c.width,c.height);let A=l;if(this.unbiased){const v=-.5+(m+.5)/a.length;A+=o*v}this.copyUniforms.opacity.value=A,t.setClearColor(this.clearColor,this.clearAlpha),t.setRenderTarget(this.sampleRenderTarget),t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(this.renderToScreen?null:i),m===0&&(t.setClearColor(0,0),t.clear()),this.fsQuad.render(t)}this.camera.setViewOffset&&u.enabled?this.camera.setViewOffset(u.fullWidth,u.fullHeight,u.offsetX,u.offsetY,u.width,u.height):this.camera.clearViewOffset&&this.camera.clearViewOffset(),t.autoClear=r,t.setClearColor(this._oldClearColor,s)}}const qt=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]],Kt={uniforms:{tDiffuse:{value:null},resolution:{value:new n.Vector2(1/1024,1/512)}},vertexShader:`
431
-
432
- varying vec2 vUv;
433
-
434
- void main() {
435
-
436
- vUv = uv;
437
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
438
-
439
- }`,fragmentShader:`
440
-
441
- precision highp float;
442
-
443
- uniform sampler2D tDiffuse;
444
-
445
- uniform vec2 resolution;
446
-
447
- varying vec2 vUv;
448
-
449
- #define FXAA_PC 1
450
- #define FXAA_GLSL_100 1
451
- #define FXAA_QUALITY_PRESET 12
452
-
453
- #define FXAA_GREEN_AS_LUMA 1
454
-
455
- /*--------------------------------------------------------------------------*/
456
- #ifndef FXAA_PC_CONSOLE
457
- //
458
- // The console algorithm for PC is included
459
- // for developers targeting really low spec machines.
460
- // Likely better to just run FXAA_PC, and use a really low preset.
461
- //
462
- #define FXAA_PC_CONSOLE 0
463
- #endif
464
- /*--------------------------------------------------------------------------*/
465
- #ifndef FXAA_GLSL_120
466
- #define FXAA_GLSL_120 0
467
- #endif
468
- /*--------------------------------------------------------------------------*/
469
- #ifndef FXAA_GLSL_130
470
- #define FXAA_GLSL_130 0
471
- #endif
472
- /*--------------------------------------------------------------------------*/
473
- #ifndef FXAA_HLSL_3
474
- #define FXAA_HLSL_3 0
475
- #endif
476
- /*--------------------------------------------------------------------------*/
477
- #ifndef FXAA_HLSL_4
478
- #define FXAA_HLSL_4 0
479
- #endif
480
- /*--------------------------------------------------------------------------*/
481
- #ifndef FXAA_HLSL_5
482
- #define FXAA_HLSL_5 0
483
- #endif
484
- /*==========================================================================*/
485
- #ifndef FXAA_GREEN_AS_LUMA
486
- //
487
- // For those using non-linear color,
488
- // and either not able to get luma in alpha, or not wanting to,
489
- // this enables FXAA to run using green as a proxy for luma.
490
- // So with this enabled, no need to pack luma in alpha.
491
- //
492
- // This will turn off AA on anything which lacks some amount of green.
493
- // Pure red and blue or combination of only R and B, will get no AA.
494
- //
495
- // Might want to lower the settings for both,
496
- // fxaaConsoleEdgeThresholdMin
497
- // fxaaQualityEdgeThresholdMin
498
- // In order to insure AA does not get turned off on colors
499
- // which contain a minor amount of green.
500
- //
501
- // 1 = On.
502
- // 0 = Off.
503
- //
504
- #define FXAA_GREEN_AS_LUMA 0
505
- #endif
506
- /*--------------------------------------------------------------------------*/
507
- #ifndef FXAA_EARLY_EXIT
508
- //
509
- // Controls algorithm's early exit path.
510
- // On PS3 turning this ON adds 2 cycles to the shader.
511
- // On 360 turning this OFF adds 10ths of a millisecond to the shader.
512
- // Turning this off on console will result in a more blurry image.
513
- // So this defaults to on.
514
- //
515
- // 1 = On.
516
- // 0 = Off.
517
- //
518
- #define FXAA_EARLY_EXIT 1
519
- #endif
520
- /*--------------------------------------------------------------------------*/
521
- #ifndef FXAA_DISCARD
522
- //
523
- // Only valid for PC OpenGL currently.
524
- // Probably will not work when FXAA_GREEN_AS_LUMA = 1.
525
- //
526
- // 1 = Use discard on pixels which don't need AA.
527
- // For APIs which enable concurrent TEX+ROP from same surface.
528
- // 0 = Return unchanged color on pixels which don't need AA.
529
- //
530
- #define FXAA_DISCARD 0
531
- #endif
532
- /*--------------------------------------------------------------------------*/
533
- #ifndef FXAA_FAST_PIXEL_OFFSET
534
- //
535
- // Used for GLSL 120 only.
536
- //
537
- // 1 = GL API supports fast pixel offsets
538
- // 0 = do not use fast pixel offsets
539
- //
540
- #ifdef GL_EXT_gpu_shader4
541
- #define FXAA_FAST_PIXEL_OFFSET 1
542
- #endif
543
- #ifdef GL_NV_gpu_shader5
544
- #define FXAA_FAST_PIXEL_OFFSET 1
545
- #endif
546
- #ifdef GL_ARB_gpu_shader5
547
- #define FXAA_FAST_PIXEL_OFFSET 1
548
- #endif
549
- #ifndef FXAA_FAST_PIXEL_OFFSET
550
- #define FXAA_FAST_PIXEL_OFFSET 0
551
- #endif
552
- #endif
553
- /*--------------------------------------------------------------------------*/
554
- #ifndef FXAA_GATHER4_ALPHA
555
- //
556
- // 1 = API supports gather4 on alpha channel.
557
- // 0 = API does not support gather4 on alpha channel.
558
- //
559
- #if (FXAA_HLSL_5 == 1)
560
- #define FXAA_GATHER4_ALPHA 1
561
- #endif
562
- #ifdef GL_ARB_gpu_shader5
563
- #define FXAA_GATHER4_ALPHA 1
564
- #endif
565
- #ifdef GL_NV_gpu_shader5
566
- #define FXAA_GATHER4_ALPHA 1
567
- #endif
568
- #ifndef FXAA_GATHER4_ALPHA
569
- #define FXAA_GATHER4_ALPHA 0
570
- #endif
571
- #endif
572
-
573
-
574
- /*============================================================================
575
- FXAA QUALITY - TUNING KNOBS
576
- ------------------------------------------------------------------------------
577
- NOTE the other tuning knobs are now in the shader function inputs!
578
- ============================================================================*/
579
- #ifndef FXAA_QUALITY_PRESET
580
- //
581
- // Choose the quality preset.
582
- // This needs to be compiled into the shader as it effects code.
583
- // Best option to include multiple presets is to
584
- // in each shader define the preset, then include this file.
585
- //
586
- // OPTIONS
587
- // -----------------------------------------------------------------------
588
- // 10 to 15 - default medium dither (10=fastest, 15=highest quality)
589
- // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
590
- // 39 - no dither, very expensive
591
- //
592
- // NOTES
593
- // -----------------------------------------------------------------------
594
- // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
595
- // 13 = about same speed as FXAA 3.9 and better than 12
596
- // 23 = closest to FXAA 3.9 visually and performance wise
597
- // _ = the lowest digit is directly related to performance
598
- // _ = the highest digit is directly related to style
599
- //
600
- #define FXAA_QUALITY_PRESET 12
601
- #endif
602
-
603
-
604
- /*============================================================================
605
-
606
- FXAA QUALITY - PRESETS
607
-
608
- ============================================================================*/
609
-
610
- /*============================================================================
611
- FXAA QUALITY - MEDIUM DITHER PRESETS
612
- ============================================================================*/
613
- #if (FXAA_QUALITY_PRESET == 10)
614
- #define FXAA_QUALITY_PS 3
615
- #define FXAA_QUALITY_P0 1.5
616
- #define FXAA_QUALITY_P1 3.0
617
- #define FXAA_QUALITY_P2 12.0
618
- #endif
619
- /*--------------------------------------------------------------------------*/
620
- #if (FXAA_QUALITY_PRESET == 11)
621
- #define FXAA_QUALITY_PS 4
622
- #define FXAA_QUALITY_P0 1.0
623
- #define FXAA_QUALITY_P1 1.5
624
- #define FXAA_QUALITY_P2 3.0
625
- #define FXAA_QUALITY_P3 12.0
626
- #endif
627
- /*--------------------------------------------------------------------------*/
628
- #if (FXAA_QUALITY_PRESET == 12)
629
- #define FXAA_QUALITY_PS 5
630
- #define FXAA_QUALITY_P0 1.0
631
- #define FXAA_QUALITY_P1 1.5
632
- #define FXAA_QUALITY_P2 2.0
633
- #define FXAA_QUALITY_P3 4.0
634
- #define FXAA_QUALITY_P4 12.0
635
- #endif
636
- /*--------------------------------------------------------------------------*/
637
- #if (FXAA_QUALITY_PRESET == 13)
638
- #define FXAA_QUALITY_PS 6
639
- #define FXAA_QUALITY_P0 1.0
640
- #define FXAA_QUALITY_P1 1.5
641
- #define FXAA_QUALITY_P2 2.0
642
- #define FXAA_QUALITY_P3 2.0
643
- #define FXAA_QUALITY_P4 4.0
644
- #define FXAA_QUALITY_P5 12.0
645
- #endif
646
- /*--------------------------------------------------------------------------*/
647
- #if (FXAA_QUALITY_PRESET == 14)
648
- #define FXAA_QUALITY_PS 7
649
- #define FXAA_QUALITY_P0 1.0
650
- #define FXAA_QUALITY_P1 1.5
651
- #define FXAA_QUALITY_P2 2.0
652
- #define FXAA_QUALITY_P3 2.0
653
- #define FXAA_QUALITY_P4 2.0
654
- #define FXAA_QUALITY_P5 4.0
655
- #define FXAA_QUALITY_P6 12.0
656
- #endif
657
- /*--------------------------------------------------------------------------*/
658
- #if (FXAA_QUALITY_PRESET == 15)
659
- #define FXAA_QUALITY_PS 8
660
- #define FXAA_QUALITY_P0 1.0
661
- #define FXAA_QUALITY_P1 1.5
662
- #define FXAA_QUALITY_P2 2.0
663
- #define FXAA_QUALITY_P3 2.0
664
- #define FXAA_QUALITY_P4 2.0
665
- #define FXAA_QUALITY_P5 2.0
666
- #define FXAA_QUALITY_P6 4.0
667
- #define FXAA_QUALITY_P7 12.0
668
- #endif
669
-
670
- /*============================================================================
671
- FXAA QUALITY - LOW DITHER PRESETS
672
- ============================================================================*/
673
- #if (FXAA_QUALITY_PRESET == 20)
674
- #define FXAA_QUALITY_PS 3
675
- #define FXAA_QUALITY_P0 1.5
676
- #define FXAA_QUALITY_P1 2.0
677
- #define FXAA_QUALITY_P2 8.0
678
- #endif
679
- /*--------------------------------------------------------------------------*/
680
- #if (FXAA_QUALITY_PRESET == 21)
681
- #define FXAA_QUALITY_PS 4
682
- #define FXAA_QUALITY_P0 1.0
683
- #define FXAA_QUALITY_P1 1.5
684
- #define FXAA_QUALITY_P2 2.0
685
- #define FXAA_QUALITY_P3 8.0
686
- #endif
687
- /*--------------------------------------------------------------------------*/
688
- #if (FXAA_QUALITY_PRESET == 22)
689
- #define FXAA_QUALITY_PS 5
690
- #define FXAA_QUALITY_P0 1.0
691
- #define FXAA_QUALITY_P1 1.5
692
- #define FXAA_QUALITY_P2 2.0
693
- #define FXAA_QUALITY_P3 2.0
694
- #define FXAA_QUALITY_P4 8.0
695
- #endif
696
- /*--------------------------------------------------------------------------*/
697
- #if (FXAA_QUALITY_PRESET == 23)
698
- #define FXAA_QUALITY_PS 6
699
- #define FXAA_QUALITY_P0 1.0
700
- #define FXAA_QUALITY_P1 1.5
701
- #define FXAA_QUALITY_P2 2.0
702
- #define FXAA_QUALITY_P3 2.0
703
- #define FXAA_QUALITY_P4 2.0
704
- #define FXAA_QUALITY_P5 8.0
705
- #endif
706
- /*--------------------------------------------------------------------------*/
707
- #if (FXAA_QUALITY_PRESET == 24)
708
- #define FXAA_QUALITY_PS 7
709
- #define FXAA_QUALITY_P0 1.0
710
- #define FXAA_QUALITY_P1 1.5
711
- #define FXAA_QUALITY_P2 2.0
712
- #define FXAA_QUALITY_P3 2.0
713
- #define FXAA_QUALITY_P4 2.0
714
- #define FXAA_QUALITY_P5 3.0
715
- #define FXAA_QUALITY_P6 8.0
716
- #endif
717
- /*--------------------------------------------------------------------------*/
718
- #if (FXAA_QUALITY_PRESET == 25)
719
- #define FXAA_QUALITY_PS 8
720
- #define FXAA_QUALITY_P0 1.0
721
- #define FXAA_QUALITY_P1 1.5
722
- #define FXAA_QUALITY_P2 2.0
723
- #define FXAA_QUALITY_P3 2.0
724
- #define FXAA_QUALITY_P4 2.0
725
- #define FXAA_QUALITY_P5 2.0
726
- #define FXAA_QUALITY_P6 4.0
727
- #define FXAA_QUALITY_P7 8.0
728
- #endif
729
- /*--------------------------------------------------------------------------*/
730
- #if (FXAA_QUALITY_PRESET == 26)
731
- #define FXAA_QUALITY_PS 9
732
- #define FXAA_QUALITY_P0 1.0
733
- #define FXAA_QUALITY_P1 1.5
734
- #define FXAA_QUALITY_P2 2.0
735
- #define FXAA_QUALITY_P3 2.0
736
- #define FXAA_QUALITY_P4 2.0
737
- #define FXAA_QUALITY_P5 2.0
738
- #define FXAA_QUALITY_P6 2.0
739
- #define FXAA_QUALITY_P7 4.0
740
- #define FXAA_QUALITY_P8 8.0
741
- #endif
742
- /*--------------------------------------------------------------------------*/
743
- #if (FXAA_QUALITY_PRESET == 27)
744
- #define FXAA_QUALITY_PS 10
745
- #define FXAA_QUALITY_P0 1.0
746
- #define FXAA_QUALITY_P1 1.5
747
- #define FXAA_QUALITY_P2 2.0
748
- #define FXAA_QUALITY_P3 2.0
749
- #define FXAA_QUALITY_P4 2.0
750
- #define FXAA_QUALITY_P5 2.0
751
- #define FXAA_QUALITY_P6 2.0
752
- #define FXAA_QUALITY_P7 2.0
753
- #define FXAA_QUALITY_P8 4.0
754
- #define FXAA_QUALITY_P9 8.0
755
- #endif
756
- /*--------------------------------------------------------------------------*/
757
- #if (FXAA_QUALITY_PRESET == 28)
758
- #define FXAA_QUALITY_PS 11
759
- #define FXAA_QUALITY_P0 1.0
760
- #define FXAA_QUALITY_P1 1.5
761
- #define FXAA_QUALITY_P2 2.0
762
- #define FXAA_QUALITY_P3 2.0
763
- #define FXAA_QUALITY_P4 2.0
764
- #define FXAA_QUALITY_P5 2.0
765
- #define FXAA_QUALITY_P6 2.0
766
- #define FXAA_QUALITY_P7 2.0
767
- #define FXAA_QUALITY_P8 2.0
768
- #define FXAA_QUALITY_P9 4.0
769
- #define FXAA_QUALITY_P10 8.0
770
- #endif
771
- /*--------------------------------------------------------------------------*/
772
- #if (FXAA_QUALITY_PRESET == 29)
773
- #define FXAA_QUALITY_PS 12
774
- #define FXAA_QUALITY_P0 1.0
775
- #define FXAA_QUALITY_P1 1.5
776
- #define FXAA_QUALITY_P2 2.0
777
- #define FXAA_QUALITY_P3 2.0
778
- #define FXAA_QUALITY_P4 2.0
779
- #define FXAA_QUALITY_P5 2.0
780
- #define FXAA_QUALITY_P6 2.0
781
- #define FXAA_QUALITY_P7 2.0
782
- #define FXAA_QUALITY_P8 2.0
783
- #define FXAA_QUALITY_P9 2.0
784
- #define FXAA_QUALITY_P10 4.0
785
- #define FXAA_QUALITY_P11 8.0
786
- #endif
787
-
788
- /*============================================================================
789
- FXAA QUALITY - EXTREME QUALITY
790
- ============================================================================*/
791
- #if (FXAA_QUALITY_PRESET == 39)
792
- #define FXAA_QUALITY_PS 12
793
- #define FXAA_QUALITY_P0 1.0
794
- #define FXAA_QUALITY_P1 1.0
795
- #define FXAA_QUALITY_P2 1.0
796
- #define FXAA_QUALITY_P3 1.0
797
- #define FXAA_QUALITY_P4 1.0
798
- #define FXAA_QUALITY_P5 1.5
799
- #define FXAA_QUALITY_P6 2.0
800
- #define FXAA_QUALITY_P7 2.0
801
- #define FXAA_QUALITY_P8 2.0
802
- #define FXAA_QUALITY_P9 2.0
803
- #define FXAA_QUALITY_P10 4.0
804
- #define FXAA_QUALITY_P11 8.0
805
- #endif
806
-
807
-
808
-
809
- /*============================================================================
810
-
811
- API PORTING
812
-
813
- ============================================================================*/
814
- #if (FXAA_GLSL_100 == 1) || (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)
815
- #define FxaaBool bool
816
- #define FxaaDiscard discard
817
- #define FxaaFloat float
818
- #define FxaaFloat2 vec2
819
- #define FxaaFloat3 vec3
820
- #define FxaaFloat4 vec4
821
- #define FxaaHalf float
822
- #define FxaaHalf2 vec2
823
- #define FxaaHalf3 vec3
824
- #define FxaaHalf4 vec4
825
- #define FxaaInt2 ivec2
826
- #define FxaaSat(x) clamp(x, 0.0, 1.0)
827
- #define FxaaTex sampler2D
828
- #else
829
- #define FxaaBool bool
830
- #define FxaaDiscard clip(-1)
831
- #define FxaaFloat float
832
- #define FxaaFloat2 float2
833
- #define FxaaFloat3 float3
834
- #define FxaaFloat4 float4
835
- #define FxaaHalf half
836
- #define FxaaHalf2 half2
837
- #define FxaaHalf3 half3
838
- #define FxaaHalf4 half4
839
- #define FxaaSat(x) saturate(x)
840
- #endif
841
- /*--------------------------------------------------------------------------*/
842
- #if (FXAA_GLSL_100 == 1)
843
- #define FxaaTexTop(t, p) texture2D(t, p, 0.0)
844
- #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), 0.0)
845
- #endif
846
- /*--------------------------------------------------------------------------*/
847
- #if (FXAA_GLSL_120 == 1)
848
- // Requires,
849
- // #version 120
850
- // And at least,
851
- // #extension GL_EXT_gpu_shader4 : enable
852
- // (or set FXAA_FAST_PIXEL_OFFSET 1 to work like DX9)
853
- #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
854
- #if (FXAA_FAST_PIXEL_OFFSET == 1)
855
- #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o)
856
- #else
857
- #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
858
- #endif
859
- #if (FXAA_GATHER4_ALPHA == 1)
860
- // use #extension GL_ARB_gpu_shader5 : enable
861
- #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)
862
- #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)
863
- #define FxaaTexGreen4(t, p) textureGather(t, p, 1)
864
- #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)
865
- #endif
866
- #endif
867
- /*--------------------------------------------------------------------------*/
868
- #if (FXAA_GLSL_130 == 1)
869
- // Requires "#version 130" or better
870
- #define FxaaTexTop(t, p) textureLod(t, p, 0.0)
871
- #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)
872
- #if (FXAA_GATHER4_ALPHA == 1)
873
- // use #extension GL_ARB_gpu_shader5 : enable
874
- #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)
875
- #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)
876
- #define FxaaTexGreen4(t, p) textureGather(t, p, 1)
877
- #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)
878
- #endif
879
- #endif
880
- /*--------------------------------------------------------------------------*/
881
- #if (FXAA_HLSL_3 == 1)
882
- #define FxaaInt2 float2
883
- #define FxaaTex sampler2D
884
- #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))
885
- #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))
886
- #endif
887
- /*--------------------------------------------------------------------------*/
888
- #if (FXAA_HLSL_4 == 1)
889
- #define FxaaInt2 int2
890
- struct FxaaTex { SamplerState smpl; Texture2D tex; };
891
- #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)
892
- #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)
893
- #endif
894
- /*--------------------------------------------------------------------------*/
895
- #if (FXAA_HLSL_5 == 1)
896
- #define FxaaInt2 int2
897
- struct FxaaTex { SamplerState smpl; Texture2D tex; };
898
- #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)
899
- #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)
900
- #define FxaaTexAlpha4(t, p) t.tex.GatherAlpha(t.smpl, p)
901
- #define FxaaTexOffAlpha4(t, p, o) t.tex.GatherAlpha(t.smpl, p, o)
902
- #define FxaaTexGreen4(t, p) t.tex.GatherGreen(t.smpl, p)
903
- #define FxaaTexOffGreen4(t, p, o) t.tex.GatherGreen(t.smpl, p, o)
904
- #endif
905
-
906
-
907
- /*============================================================================
908
- GREEN AS LUMA OPTION SUPPORT FUNCTION
909
- ============================================================================*/
910
- #if (FXAA_GREEN_AS_LUMA == 0)
911
- FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.w; }
912
- #else
913
- FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
914
- #endif
915
-
916
-
917
-
918
-
919
- /*============================================================================
920
-
921
- FXAA3 QUALITY - PC
922
-
923
- ============================================================================*/
924
- #if (FXAA_PC == 1)
925
- /*--------------------------------------------------------------------------*/
926
- FxaaFloat4 FxaaPixelShader(
927
- //
928
- // Use noperspective interpolation here (turn off perspective interpolation).
929
- // {xy} = center of pixel
930
- FxaaFloat2 pos,
931
- //
932
- // Used only for FXAA Console, and not used on the 360 version.
933
- // Use noperspective interpolation here (turn off perspective interpolation).
934
- // {xy_} = upper left of pixel
935
- // {_zw} = lower right of pixel
936
- FxaaFloat4 fxaaConsolePosPos,
937
- //
938
- // Input color texture.
939
- // {rgb_} = color in linear or perceptual color space
940
- // if (FXAA_GREEN_AS_LUMA == 0)
941
- // {__a} = luma in perceptual color space (not linear)
942
- FxaaTex tex,
943
- //
944
- // Only used on the optimized 360 version of FXAA Console.
945
- // For everything but 360, just use the same input here as for "tex".
946
- // For 360, same texture, just alias with a 2nd sampler.
947
- // This sampler needs to have an exponent bias of -1.
948
- FxaaTex fxaaConsole360TexExpBiasNegOne,
949
- //
950
- // Only used on the optimized 360 version of FXAA Console.
951
- // For everything but 360, just use the same input here as for "tex".
952
- // For 360, same texture, just alias with a 3nd sampler.
953
- // This sampler needs to have an exponent bias of -2.
954
- FxaaTex fxaaConsole360TexExpBiasNegTwo,
955
- //
956
- // Only used on FXAA Quality.
957
- // This must be from a constant/uniform.
958
- // {x_} = 1.0/screenWidthInPixels
959
- // {_y} = 1.0/screenHeightInPixels
960
- FxaaFloat2 fxaaQualityRcpFrame,
961
- //
962
- // Only used on FXAA Console.
963
- // This must be from a constant/uniform.
964
- // This effects sub-pixel AA quality and inversely sharpness.
965
- // Where N ranges between,
966
- // N = 0.50 (default)
967
- // N = 0.33 (sharper)
968
- // {x__} = -N/screenWidthInPixels
969
- // {_y_} = -N/screenHeightInPixels
970
- // {_z_} = N/screenWidthInPixels
971
- // {__w} = N/screenHeightInPixels
972
- FxaaFloat4 fxaaConsoleRcpFrameOpt,
973
- //
974
- // Only used on FXAA Console.
975
- // Not used on 360, but used on PS3 and PC.
976
- // This must be from a constant/uniform.
977
- // {x__} = -2.0/screenWidthInPixels
978
- // {_y_} = -2.0/screenHeightInPixels
979
- // {_z_} = 2.0/screenWidthInPixels
980
- // {__w} = 2.0/screenHeightInPixels
981
- FxaaFloat4 fxaaConsoleRcpFrameOpt2,
982
- //
983
- // Only used on FXAA Console.
984
- // Only used on 360 in place of fxaaConsoleRcpFrameOpt2.
985
- // This must be from a constant/uniform.
986
- // {x__} = 8.0/screenWidthInPixels
987
- // {_y_} = 8.0/screenHeightInPixels
988
- // {_z_} = -4.0/screenWidthInPixels
989
- // {__w} = -4.0/screenHeightInPixels
990
- FxaaFloat4 fxaaConsole360RcpFrameOpt2,
991
- //
992
- // Only used on FXAA Quality.
993
- // This used to be the FXAA_QUALITY_SUBPIX define.
994
- // It is here now to allow easier tuning.
995
- // Choose the amount of sub-pixel aliasing removal.
996
- // This can effect sharpness.
997
- // 1.00 - upper limit (softer)
998
- // 0.75 - default amount of filtering
999
- // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
1000
- // 0.25 - almost off
1001
- // 0.00 - completely off
1002
- FxaaFloat fxaaQualitySubpix,
1003
- //
1004
- // Only used on FXAA Quality.
1005
- // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.
1006
- // It is here now to allow easier tuning.
1007
- // The minimum amount of local contrast required to apply algorithm.
1008
- // 0.333 - too little (faster)
1009
- // 0.250 - low quality
1010
- // 0.166 - default
1011
- // 0.125 - high quality
1012
- // 0.063 - overkill (slower)
1013
- FxaaFloat fxaaQualityEdgeThreshold,
1014
- //
1015
- // Only used on FXAA Quality.
1016
- // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.
1017
- // It is here now to allow easier tuning.
1018
- // Trims the algorithm from processing darks.
1019
- // 0.0833 - upper limit (default, the start of visible unfiltered edges)
1020
- // 0.0625 - high quality (faster)
1021
- // 0.0312 - visible limit (slower)
1022
- // Special notes when using FXAA_GREEN_AS_LUMA,
1023
- // Likely want to set this to zero.
1024
- // As colors that are mostly not-green
1025
- // will appear very dark in the green channel!
1026
- // Tune by looking at mostly non-green content,
1027
- // then start at zero and increase until aliasing is a problem.
1028
- FxaaFloat fxaaQualityEdgeThresholdMin,
1029
- //
1030
- // Only used on FXAA Console.
1031
- // This used to be the FXAA_CONSOLE_EDGE_SHARPNESS define.
1032
- // It is here now to allow easier tuning.
1033
- // This does not effect PS3, as this needs to be compiled in.
1034
- // Use FXAA_CONSOLE_PS3_EDGE_SHARPNESS for PS3.
1035
- // Due to the PS3 being ALU bound,
1036
- // there are only three safe values here: 2 and 4 and 8.
1037
- // These options use the shaders ability to a free *|/ by 2|4|8.
1038
- // For all other platforms can be a non-power of two.
1039
- // 8.0 is sharper (default!!!)
1040
- // 4.0 is softer
1041
- // 2.0 is really soft (good only for vector graphics inputs)
1042
- FxaaFloat fxaaConsoleEdgeSharpness,
1043
- //
1044
- // Only used on FXAA Console.
1045
- // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD define.
1046
- // It is here now to allow easier tuning.
1047
- // This does not effect PS3, as this needs to be compiled in.
1048
- // Use FXAA_CONSOLE_PS3_EDGE_THRESHOLD for PS3.
1049
- // Due to the PS3 being ALU bound,
1050
- // there are only two safe values here: 1/4 and 1/8.
1051
- // These options use the shaders ability to a free *|/ by 2|4|8.
1052
- // The console setting has a different mapping than the quality setting.
1053
- // Other platforms can use other values.
1054
- // 0.125 leaves less aliasing, but is softer (default!!!)
1055
- // 0.25 leaves more aliasing, and is sharper
1056
- FxaaFloat fxaaConsoleEdgeThreshold,
1057
- //
1058
- // Only used on FXAA Console.
1059
- // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD_MIN define.
1060
- // It is here now to allow easier tuning.
1061
- // Trims the algorithm from processing darks.
1062
- // The console setting has a different mapping than the quality setting.
1063
- // This only applies when FXAA_EARLY_EXIT is 1.
1064
- // This does not apply to PS3,
1065
- // PS3 was simplified to avoid more shader instructions.
1066
- // 0.06 - faster but more aliasing in darks
1067
- // 0.05 - default
1068
- // 0.04 - slower and less aliasing in darks
1069
- // Special notes when using FXAA_GREEN_AS_LUMA,
1070
- // Likely want to set this to zero.
1071
- // As colors that are mostly not-green
1072
- // will appear very dark in the green channel!
1073
- // Tune by looking at mostly non-green content,
1074
- // then start at zero and increase until aliasing is a problem.
1075
- FxaaFloat fxaaConsoleEdgeThresholdMin,
1076
- //
1077
- // Extra constants for 360 FXAA Console only.
1078
- // Use zeros or anything else for other platforms.
1079
- // These must be in physical constant registers and NOT immediates.
1080
- // Immediates will result in compiler un-optimizing.
1081
- // {xyzw} = float4(1.0, -1.0, 0.25, -0.25)
1082
- FxaaFloat4 fxaaConsole360ConstDir
1083
- ) {
1084
- /*--------------------------------------------------------------------------*/
1085
- FxaaFloat2 posM;
1086
- posM.x = pos.x;
1087
- posM.y = pos.y;
1088
- #if (FXAA_GATHER4_ALPHA == 1)
1089
- #if (FXAA_DISCARD == 0)
1090
- FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
1091
- #if (FXAA_GREEN_AS_LUMA == 0)
1092
- #define lumaM rgbyM.w
1093
- #else
1094
- #define lumaM rgbyM.y
1095
- #endif
1096
- #endif
1097
- #if (FXAA_GREEN_AS_LUMA == 0)
1098
- FxaaFloat4 luma4A = FxaaTexAlpha4(tex, posM);
1099
- FxaaFloat4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1));
1100
- #else
1101
- FxaaFloat4 luma4A = FxaaTexGreen4(tex, posM);
1102
- FxaaFloat4 luma4B = FxaaTexOffGreen4(tex, posM, FxaaInt2(-1, -1));
1103
- #endif
1104
- #if (FXAA_DISCARD == 1)
1105
- #define lumaM luma4A.w
1106
- #endif
1107
- #define lumaE luma4A.z
1108
- #define lumaS luma4A.x
1109
- #define lumaSE luma4A.y
1110
- #define lumaNW luma4B.w
1111
- #define lumaN luma4B.z
1112
- #define lumaW luma4B.x
1113
- #else
1114
- FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
1115
- #if (FXAA_GREEN_AS_LUMA == 0)
1116
- #define lumaM rgbyM.w
1117
- #else
1118
- #define lumaM rgbyM.y
1119
- #endif
1120
- #if (FXAA_GLSL_100 == 1)
1121
- FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0, 1.0), fxaaQualityRcpFrame.xy));
1122
- FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 0.0), fxaaQualityRcpFrame.xy));
1123
- FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0,-1.0), fxaaQualityRcpFrame.xy));
1124
- FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 0.0), fxaaQualityRcpFrame.xy));
1125
- #else
1126
- FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
1127
- FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
1128
- FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
1129
- FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
1130
- #endif
1131
- #endif
1132
- /*--------------------------------------------------------------------------*/
1133
- FxaaFloat maxSM = max(lumaS, lumaM);
1134
- FxaaFloat minSM = min(lumaS, lumaM);
1135
- FxaaFloat maxESM = max(lumaE, maxSM);
1136
- FxaaFloat minESM = min(lumaE, minSM);
1137
- FxaaFloat maxWN = max(lumaN, lumaW);
1138
- FxaaFloat minWN = min(lumaN, lumaW);
1139
- FxaaFloat rangeMax = max(maxWN, maxESM);
1140
- FxaaFloat rangeMin = min(minWN, minESM);
1141
- FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
1142
- FxaaFloat range = rangeMax - rangeMin;
1143
- FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
1144
- FxaaBool earlyExit = range < rangeMaxClamped;
1145
- /*--------------------------------------------------------------------------*/
1146
- if(earlyExit)
1147
- #if (FXAA_DISCARD == 1)
1148
- FxaaDiscard;
1149
- #else
1150
- return rgbyM;
1151
- #endif
1152
- /*--------------------------------------------------------------------------*/
1153
- #if (FXAA_GATHER4_ALPHA == 0)
1154
- #if (FXAA_GLSL_100 == 1)
1155
- FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0,-1.0), fxaaQualityRcpFrame.xy));
1156
- FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 1.0), fxaaQualityRcpFrame.xy));
1157
- FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0,-1.0), fxaaQualityRcpFrame.xy));
1158
- FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 1.0), fxaaQualityRcpFrame.xy));
1159
- #else
1160
- FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
1161
- FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
1162
- FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
1163
- FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
1164
- #endif
1165
- #else
1166
- FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(1, -1), fxaaQualityRcpFrame.xy));
1167
- FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
1168
- #endif
1169
- /*--------------------------------------------------------------------------*/
1170
- FxaaFloat lumaNS = lumaN + lumaS;
1171
- FxaaFloat lumaWE = lumaW + lumaE;
1172
- FxaaFloat subpixRcpRange = 1.0/range;
1173
- FxaaFloat subpixNSWE = lumaNS + lumaWE;
1174
- FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
1175
- FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
1176
- /*--------------------------------------------------------------------------*/
1177
- FxaaFloat lumaNESE = lumaNE + lumaSE;
1178
- FxaaFloat lumaNWNE = lumaNW + lumaNE;
1179
- FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
1180
- FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
1181
- /*--------------------------------------------------------------------------*/
1182
- FxaaFloat lumaNWSW = lumaNW + lumaSW;
1183
- FxaaFloat lumaSWSE = lumaSW + lumaSE;
1184
- FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
1185
- FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
1186
- FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
1187
- FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
1188
- FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
1189
- FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
1190
- /*--------------------------------------------------------------------------*/
1191
- FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
1192
- FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
1193
- FxaaBool horzSpan = edgeHorz >= edgeVert;
1194
- FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
1195
- /*--------------------------------------------------------------------------*/
1196
- if(!horzSpan) lumaN = lumaW;
1197
- if(!horzSpan) lumaS = lumaE;
1198
- if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
1199
- FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
1200
- /*--------------------------------------------------------------------------*/
1201
- FxaaFloat gradientN = lumaN - lumaM;
1202
- FxaaFloat gradientS = lumaS - lumaM;
1203
- FxaaFloat lumaNN = lumaN + lumaM;
1204
- FxaaFloat lumaSS = lumaS + lumaM;
1205
- FxaaBool pairN = abs(gradientN) >= abs(gradientS);
1206
- FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
1207
- if(pairN) lengthSign = -lengthSign;
1208
- FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
1209
- /*--------------------------------------------------------------------------*/
1210
- FxaaFloat2 posB;
1211
- posB.x = posM.x;
1212
- posB.y = posM.y;
1213
- FxaaFloat2 offNP;
1214
- offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
1215
- offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
1216
- if(!horzSpan) posB.x += lengthSign * 0.5;
1217
- if( horzSpan) posB.y += lengthSign * 0.5;
1218
- /*--------------------------------------------------------------------------*/
1219
- FxaaFloat2 posN;
1220
- posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
1221
- posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
1222
- FxaaFloat2 posP;
1223
- posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
1224
- posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
1225
- FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
1226
- FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
1227
- FxaaFloat subpixE = subpixC * subpixC;
1228
- FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
1229
- /*--------------------------------------------------------------------------*/
1230
- if(!pairN) lumaNN = lumaSS;
1231
- FxaaFloat gradientScaled = gradient * 1.0/4.0;
1232
- FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
1233
- FxaaFloat subpixF = subpixD * subpixE;
1234
- FxaaBool lumaMLTZero = lumaMM < 0.0;
1235
- /*--------------------------------------------------------------------------*/
1236
- lumaEndN -= lumaNN * 0.5;
1237
- lumaEndP -= lumaNN * 0.5;
1238
- FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
1239
- FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
1240
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
1241
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
1242
- FxaaBool doneNP = (!doneN) || (!doneP);
1243
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
1244
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
1245
- /*--------------------------------------------------------------------------*/
1246
- if(doneNP) {
1247
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1248
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1249
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1250
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1251
- doneN = abs(lumaEndN) >= gradientScaled;
1252
- doneP = abs(lumaEndP) >= gradientScaled;
1253
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
1254
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
1255
- doneNP = (!doneN) || (!doneP);
1256
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
1257
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
1258
- /*--------------------------------------------------------------------------*/
1259
- #if (FXAA_QUALITY_PS > 3)
1260
- if(doneNP) {
1261
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1262
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1263
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1264
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1265
- doneN = abs(lumaEndN) >= gradientScaled;
1266
- doneP = abs(lumaEndP) >= gradientScaled;
1267
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
1268
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
1269
- doneNP = (!doneN) || (!doneP);
1270
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
1271
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
1272
- /*--------------------------------------------------------------------------*/
1273
- #if (FXAA_QUALITY_PS > 4)
1274
- if(doneNP) {
1275
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1276
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1277
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1278
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1279
- doneN = abs(lumaEndN) >= gradientScaled;
1280
- doneP = abs(lumaEndP) >= gradientScaled;
1281
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
1282
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
1283
- doneNP = (!doneN) || (!doneP);
1284
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
1285
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
1286
- /*--------------------------------------------------------------------------*/
1287
- #if (FXAA_QUALITY_PS > 5)
1288
- if(doneNP) {
1289
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1290
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1291
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1292
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1293
- doneN = abs(lumaEndN) >= gradientScaled;
1294
- doneP = abs(lumaEndP) >= gradientScaled;
1295
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
1296
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
1297
- doneNP = (!doneN) || (!doneP);
1298
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
1299
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
1300
- /*--------------------------------------------------------------------------*/
1301
- #if (FXAA_QUALITY_PS > 6)
1302
- if(doneNP) {
1303
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1304
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1305
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1306
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1307
- doneN = abs(lumaEndN) >= gradientScaled;
1308
- doneP = abs(lumaEndP) >= gradientScaled;
1309
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
1310
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
1311
- doneNP = (!doneN) || (!doneP);
1312
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
1313
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
1314
- /*--------------------------------------------------------------------------*/
1315
- #if (FXAA_QUALITY_PS > 7)
1316
- if(doneNP) {
1317
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1318
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1319
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1320
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1321
- doneN = abs(lumaEndN) >= gradientScaled;
1322
- doneP = abs(lumaEndP) >= gradientScaled;
1323
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
1324
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
1325
- doneNP = (!doneN) || (!doneP);
1326
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
1327
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
1328
- /*--------------------------------------------------------------------------*/
1329
- #if (FXAA_QUALITY_PS > 8)
1330
- if(doneNP) {
1331
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1332
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1333
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1334
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1335
- doneN = abs(lumaEndN) >= gradientScaled;
1336
- doneP = abs(lumaEndP) >= gradientScaled;
1337
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
1338
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
1339
- doneNP = (!doneN) || (!doneP);
1340
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
1341
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
1342
- /*--------------------------------------------------------------------------*/
1343
- #if (FXAA_QUALITY_PS > 9)
1344
- if(doneNP) {
1345
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1346
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1347
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1348
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1349
- doneN = abs(lumaEndN) >= gradientScaled;
1350
- doneP = abs(lumaEndP) >= gradientScaled;
1351
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
1352
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
1353
- doneNP = (!doneN) || (!doneP);
1354
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
1355
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
1356
- /*--------------------------------------------------------------------------*/
1357
- #if (FXAA_QUALITY_PS > 10)
1358
- if(doneNP) {
1359
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1360
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1361
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1362
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1363
- doneN = abs(lumaEndN) >= gradientScaled;
1364
- doneP = abs(lumaEndP) >= gradientScaled;
1365
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
1366
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
1367
- doneNP = (!doneN) || (!doneP);
1368
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
1369
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
1370
- /*--------------------------------------------------------------------------*/
1371
- #if (FXAA_QUALITY_PS > 11)
1372
- if(doneNP) {
1373
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1374
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1375
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1376
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1377
- doneN = abs(lumaEndN) >= gradientScaled;
1378
- doneP = abs(lumaEndP) >= gradientScaled;
1379
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
1380
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
1381
- doneNP = (!doneN) || (!doneP);
1382
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
1383
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
1384
- /*--------------------------------------------------------------------------*/
1385
- #if (FXAA_QUALITY_PS > 12)
1386
- if(doneNP) {
1387
- if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
1388
- if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
1389
- if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
1390
- if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
1391
- doneN = abs(lumaEndN) >= gradientScaled;
1392
- doneP = abs(lumaEndP) >= gradientScaled;
1393
- if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
1394
- if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
1395
- doneNP = (!doneN) || (!doneP);
1396
- if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
1397
- if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
1398
- /*--------------------------------------------------------------------------*/
1399
- }
1400
- #endif
1401
- /*--------------------------------------------------------------------------*/
1402
- }
1403
- #endif
1404
- /*--------------------------------------------------------------------------*/
1405
- }
1406
- #endif
1407
- /*--------------------------------------------------------------------------*/
1408
- }
1409
- #endif
1410
- /*--------------------------------------------------------------------------*/
1411
- }
1412
- #endif
1413
- /*--------------------------------------------------------------------------*/
1414
- }
1415
- #endif
1416
- /*--------------------------------------------------------------------------*/
1417
- }
1418
- #endif
1419
- /*--------------------------------------------------------------------------*/
1420
- }
1421
- #endif
1422
- /*--------------------------------------------------------------------------*/
1423
- }
1424
- #endif
1425
- /*--------------------------------------------------------------------------*/
1426
- }
1427
- #endif
1428
- /*--------------------------------------------------------------------------*/
1429
- }
1430
- /*--------------------------------------------------------------------------*/
1431
- FxaaFloat dstN = posM.x - posN.x;
1432
- FxaaFloat dstP = posP.x - posM.x;
1433
- if(!horzSpan) dstN = posM.y - posN.y;
1434
- if(!horzSpan) dstP = posP.y - posM.y;
1435
- /*--------------------------------------------------------------------------*/
1436
- FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
1437
- FxaaFloat spanLength = (dstP + dstN);
1438
- FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
1439
- FxaaFloat spanLengthRcp = 1.0/spanLength;
1440
- /*--------------------------------------------------------------------------*/
1441
- FxaaBool directionN = dstN < dstP;
1442
- FxaaFloat dst = min(dstN, dstP);
1443
- FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
1444
- FxaaFloat subpixG = subpixF * subpixF;
1445
- FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
1446
- FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
1447
- /*--------------------------------------------------------------------------*/
1448
- FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
1449
- FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
1450
- if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
1451
- if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
1452
- #if (FXAA_DISCARD == 1)
1453
- return FxaaTexTop(tex, posM);
1454
- #else
1455
- return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
1456
- #endif
1457
- }
1458
- /*==========================================================================*/
1459
- #endif
1460
-
1461
- void main() {
1462
- gl_FragColor = FxaaPixelShader(
1463
- vUv,
1464
- vec4(0.0),
1465
- tDiffuse,
1466
- tDiffuse,
1467
- tDiffuse,
1468
- resolution,
1469
- vec4(0.0),
1470
- vec4(0.0),
1471
- vec4(0.0),
1472
- 0.75,
1473
- 0.166,
1474
- 0.0833,
1475
- 0.0,
1476
- 0.0,
1477
- 0.0,
1478
- vec4(0.0)
1479
- );
1480
-
1481
- // TODO avoid querying texture twice for same texel
1482
- gl_FragColor.a = texture2D(tDiffuse, vUv).a;
1483
- }`};var Jt=function(){try{var f=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&f.getContext("webgl2"))}catch(t){return!1}},Ia=0,$t=1,We=!1,gt=Jt()!==!1,ea=`varying vec2 vUv;
1
+ (function(){var Fe={187:function(O){"use strict";var R=typeof Reflect=="object"?Reflect:null,C=R&&typeof R.apply=="function"?R.apply:function(l,p,b){return Function.prototype.apply.call(l,p,b)},G;R&&typeof R.ownKeys=="function"?G=R.ownKeys:Object.getOwnPropertySymbols?G=function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:G=function(l){return Object.getOwnPropertyNames(l)};function A(f){console&&console.warn&&console.warn(f)}var j=Number.isNaN||function(l){return l!==l};function m(){m.init.call(this)}O.exports=m,O.exports.once=$,m.EventEmitter=m,m.prototype._events=void 0,m.prototype._eventsCount=0,m.prototype._maxListeners=void 0;var D=10;function V(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}Object.defineProperty(m,"defaultMaxListeners",{enumerable:!0,get:function(){return D},set:function(f){if(typeof f!="number"||f<0||j(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");D=f}}),m.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},m.prototype.setMaxListeners=function(l){if(typeof l!="number"||l<0||j(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this};function k(f){return f._maxListeners===void 0?m.defaultMaxListeners:f._maxListeners}m.prototype.getMaxListeners=function(){return k(this)},m.prototype.emit=function(l){for(var p=[],b=1;b<arguments.length;b++)p.push(arguments[b]);var w=l==="error",E=this._events;if(E!==void 0)w=w&&E.error===void 0;else if(!w)return!1;if(w){var T;if(p.length>0&&(T=p[0]),T instanceof Error)throw T;var z=new Error("Unhandled error."+(T?" ("+T.message+")":""));throw z.context=T,z}var ie=E[l];if(ie===void 0)return!1;if(typeof ie=="function")C(ie,this,p);else for(var le=ie.length,ce=ne(ie,le),b=0;b<le;++b)C(ce[b],this,p);return!0};function B(f,l,p,b){var w,E,T;if(V(p),E=f._events,E===void 0?(E=f._events=Object.create(null),f._eventsCount=0):(E.newListener!==void 0&&(f.emit("newListener",l,p.listener?p.listener:p),E=f._events),T=E[l]),T===void 0)T=E[l]=p,++f._eventsCount;else if(typeof T=="function"?T=E[l]=b?[p,T]:[T,p]:b?T.unshift(p):T.push(p),w=k(f),w>0&&T.length>w&&!T.warned){T.warned=!0;var z=new Error("Possible EventEmitter memory leak detected. "+T.length+" "+String(l)+" listeners added. Use emitter.setMaxListeners() to increase limit");z.name="MaxListenersExceededWarning",z.emitter=f,z.type=l,z.count=T.length,A(z)}return f}m.prototype.addListener=function(l,p){return B(this,l,p,!1)},m.prototype.on=m.prototype.addListener,m.prototype.prependListener=function(l,p){return B(this,l,p,!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 X(f,l,p){var b={fired:!1,wrapFn:void 0,target:f,type:l,listener:p},w=I.bind(b);return w.listener=p,b.wrapFn=w,w}m.prototype.once=function(l,p){return V(p),this.on(l,X(this,l,p)),this},m.prototype.prependOnceListener=function(l,p){return V(p),this.prependListener(l,X(this,l,p)),this},m.prototype.removeListener=function(l,p){var b,w,E,T,z;if(V(p),w=this._events,w===void 0)return this;if(b=w[l],b===void 0)return this;if(b===p||b.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete w[l],w.removeListener&&this.emit("removeListener",l,b.listener||p));else if(typeof b!="function"){for(E=-1,T=b.length-1;T>=0;T--)if(b[T]===p||b[T].listener===p){z=b[T].listener,E=T;break}if(E<0)return this;E===0?b.shift():re(b,E),b.length===1&&(w[l]=b[0]),w.removeListener!==void 0&&this.emit("removeListener",l,z||p)}return this},m.prototype.off=m.prototype.removeListener,m.prototype.removeAllListeners=function(l){var p,b,w;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[l]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[l]),this;if(arguments.length===0){var E=Object.keys(b),T;for(w=0;w<E.length;++w)T=E[w],T!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(p=b[l],typeof p=="function")this.removeListener(l,p);else if(p!==void 0)for(w=p.length-1;w>=0;w--)this.removeListener(l,p[w]);return this};function N(f,l,p){var b=f._events;if(b===void 0)return[];var w=b[l];return w===void 0?[]:typeof w=="function"?p?[w.listener||w]:[w]:p?F(w):ne(w,w.length)}m.prototype.listeners=function(l){return N(this,l,!0)},m.prototype.rawListeners=function(l){return N(this,l,!1)},m.listenerCount=function(f,l){return typeof f.listenerCount=="function"?f.listenerCount(l):v.call(f,l)},m.prototype.listenerCount=v;function v(f){var l=this._events;if(l!==void 0){var p=l[f];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}m.prototype.eventNames=function(){return this._eventsCount>0?G(this._events):[]};function ne(f,l){for(var p=new Array(l),b=0;b<l;++b)p[b]=f[b];return p}function re(f,l){for(;l+1<f.length;l++)f[l]=f[l+1];f.pop()}function F(f){for(var l=new Array(f.length),p=0;p<l.length;++p)l[p]=f[p].listener||f[p];return l}function $(f,l){return new Promise(function(p,b){function w(T){f.removeListener(l,E),b(T)}function E(){typeof f.removeListener=="function"&&f.removeListener("error",w),p([].slice.call(arguments))}U(f,l,E,{once:!0}),l!=="error"&&L(f,w,{once:!0})})}function L(f,l,p){typeof f.on=="function"&&U(f,"error",l,p)}function U(f,l,p,b){if(typeof f.on=="function")b.once?f.once(l,p):f.on(l,p);else if(typeof f.addEventListener=="function")f.addEventListener(l,function w(E){b.once&&f.removeEventListener(l,w),p(E)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof f)}},666:function(O){var R=function(C){"use strict";var G=Object.prototype,A=G.hasOwnProperty,j,m=typeof Symbol=="function"?Symbol:{},D=m.iterator||"@@iterator",V=m.asyncIterator||"@@asyncIterator",k=m.toStringTag||"@@toStringTag";function B(h,c,g){return Object.defineProperty(h,c,{value:g,enumerable:!0,configurable:!0,writable:!0}),h[c]}try{B({},"")}catch(h){B=function(c,g,x){return c[g]=x}}function I(h,c,g,x){var S=c&&c.prototype instanceof $?c:$,H=Object.create(S.prototype),Q=new ce(x||[]);return H._invoke=T(h,g,Q),H}C.wrap=I;function X(h,c,g){try{return{type:"normal",arg:h.call(c,g)}}catch(x){return{type:"throw",arg:x}}}var N="suspendedStart",v="suspendedYield",ne="executing",re="completed",F={};function $(){}function L(){}function U(){}var f={};B(f,D,function(){return this});var l=Object.getPrototypeOf,p=l&&l(l(me([])));p&&p!==G&&A.call(p,D)&&(f=p);var b=U.prototype=$.prototype=Object.create(f);L.prototype=U,B(b,"constructor",U),B(U,"constructor",L),L.displayName=B(U,k,"GeneratorFunction");function w(h){["next","throw","return"].forEach(function(c){B(h,c,function(g){return this._invoke(c,g)})})}C.isGeneratorFunction=function(h){var c=typeof h=="function"&&h.constructor;return c?c===L||(c.displayName||c.name)==="GeneratorFunction":!1},C.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,U):(h.__proto__=U,B(h,k,"GeneratorFunction")),h.prototype=Object.create(b),h},C.awrap=function(h){return{__await:h}};function E(h,c){function g(H,Q,K,te){var ee=X(h[H],h,Q);if(ee.type==="throw")te(ee.arg);else{var ve=ee.arg,de=ve.value;return de&&typeof de=="object"&&A.call(de,"__await")?c.resolve(de.__await).then(function(oe){g("next",oe,K,te)},function(oe){g("throw",oe,K,te)}):c.resolve(de).then(function(oe){ve.value=oe,K(ve)},function(oe){return g("throw",oe,K,te)})}}var x;function S(H,Q){function K(){return new c(function(te,ee){g(H,Q,te,ee)})}return x=x?x.then(K,K):K()}this._invoke=S}w(E.prototype),B(E.prototype,V,function(){return this}),C.AsyncIterator=E,C.async=function(h,c,g,x,S){S===void 0&&(S=Promise);var H=new E(I(h,c,g,x),S);return C.isGeneratorFunction(c)?H:H.next().then(function(Q){return Q.done?Q.value:H.next()})};function T(h,c,g){var x=N;return function(H,Q){if(x===ne)throw new Error("Generator is already running");if(x===re){if(H==="throw")throw Q;return ge()}for(g.method=H,g.arg=Q;;){var K=g.delegate;if(K){var te=z(K,g);if(te){if(te===F)continue;return te}}if(g.method==="next")g.sent=g._sent=g.arg;else if(g.method==="throw"){if(x===N)throw x=re,g.arg;g.dispatchException(g.arg)}else g.method==="return"&&g.abrupt("return",g.arg);x=ne;var ee=X(h,c,g);if(ee.type==="normal"){if(x=g.done?re:v,ee.arg===F)continue;return{value:ee.arg,done:g.done}}else ee.type==="throw"&&(x=re,g.method="throw",g.arg=ee.arg)}}}function z(h,c){var g=h.iterator[c.method];if(g===j){if(c.delegate=null,c.method==="throw"){if(h.iterator.return&&(c.method="return",c.arg=j,z(h,c),c.method==="throw"))return F;c.method="throw",c.arg=new TypeError("The iterator does not provide a 'throw' method")}return F}var x=X(g,h.iterator,c.arg);if(x.type==="throw")return c.method="throw",c.arg=x.arg,c.delegate=null,F;var S=x.arg;if(!S)return c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,F;if(S.done)c[h.resultName]=S.value,c.next=h.nextLoc,c.method!=="return"&&(c.method="next",c.arg=j);else return S;return c.delegate=null,F}w(b),B(b,k,"Generator"),B(b,D,function(){return this}),B(b,"toString",function(){return"[object Generator]"});function ie(h){var c={tryLoc:h[0]};1 in h&&(c.catchLoc=h[1]),2 in h&&(c.finallyLoc=h[2],c.afterLoc=h[3]),this.tryEntries.push(c)}function le(h){var c=h.completion||{};c.type="normal",delete c.arg,h.completion=c}function ce(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(ie,this),this.reset(!0)}C.keys=function(h){var c=[];for(var g in h)c.push(g);return c.reverse(),function x(){for(;c.length;){var S=c.pop();if(S in h)return x.value=S,x.done=!1,x}return x.done=!0,x}};function me(h){if(h){var c=h[D];if(c)return c.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var g=-1,x=function S(){for(;++g<h.length;)if(A.call(h,g))return S.value=h[g],S.done=!1,S;return S.value=j,S.done=!0,S};return x.next=x}}return{next:ge}}C.values=me;function ge(){return{value:j,done:!0}}return ce.prototype={constructor:ce,reset:function(h){if(this.prev=0,this.next=0,this.sent=this._sent=j,this.done=!1,this.delegate=null,this.method="next",this.arg=j,this.tryEntries.forEach(le),!h)for(var c in this)c.charAt(0)==="t"&&A.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=j)},stop:function(){this.done=!0;var h=this.tryEntries[0],c=h.completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(h){if(this.done)throw h;var c=this;function g(te,ee){return H.type="throw",H.arg=h,c.next=te,ee&&(c.method="next",c.arg=j),!!ee}for(var x=this.tryEntries.length-1;x>=0;--x){var S=this.tryEntries[x],H=S.completion;if(S.tryLoc==="root")return g("end");if(S.tryLoc<=this.prev){var Q=A.call(S,"catchLoc"),K=A.call(S,"finallyLoc");if(Q&&K){if(this.prev<S.catchLoc)return g(S.catchLoc,!0);if(this.prev<S.finallyLoc)return g(S.finallyLoc)}else if(Q){if(this.prev<S.catchLoc)return g(S.catchLoc,!0)}else if(K){if(this.prev<S.finallyLoc)return g(S.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(h,c){for(var g=this.tryEntries.length-1;g>=0;--g){var x=this.tryEntries[g];if(x.tryLoc<=this.prev&&A.call(x,"finallyLoc")&&this.prev<x.finallyLoc){var S=x;break}}S&&(h==="break"||h==="continue")&&S.tryLoc<=c&&c<=S.finallyLoc&&(S=null);var H=S?S.completion:{};return H.type=h,H.arg=c,S?(this.method="next",this.next=S.finallyLoc,F):this.complete(H)},complete:function(h,c){if(h.type==="throw")throw h.arg;return h.type==="break"||h.type==="continue"?this.next=h.arg:h.type==="return"?(this.rval=this.arg=h.arg,this.method="return",this.next="end"):h.type==="normal"&&c&&(this.next=c),F},finish:function(h){for(var c=this.tryEntries.length-1;c>=0;--c){var g=this.tryEntries[c];if(g.finallyLoc===h)return this.complete(g.completion,g.afterLoc),le(g),F}},catch:function(h){for(var c=this.tryEntries.length-1;c>=0;--c){var g=this.tryEntries[c];if(g.tryLoc===h){var x=g.completion;if(x.type==="throw"){var S=x.arg;le(g)}return S}}throw new Error("illegal catch attempt")},delegateYield:function(h,c,g){return this.delegate={iterator:me(h),resultName:c,nextLoc:g},this.method==="next"&&(this.arg=j),F}},C}(O.exports);try{regeneratorRuntime=R}catch(C){typeof globalThis=="object"?globalThis.regeneratorRuntime=R:Function("r","regeneratorRuntime = r")(R)}},695:function(O,R,C){"use strict";C.d(R,{Z:function(){return G}});function G(A){if(A.geometry&&A.geometry.dispose(),A.material){var j=Array.isArray(A.material)?A.material:[A.material];j.forEach(function(m){var D,V,k,B,I,X,N,v,ne,re,F,$,L;(D=m.map)===null||D===void 0||D.dispose(),(V=m.lightMap)===null||V===void 0||V.dispose(),(k=m.bumpMap)===null||k===void 0||k.dispose(),(B=m.normalMap)===null||B===void 0||B.dispose(),(I=m.specularMap)===null||I===void 0||I.dispose(),(X=m.envMap)===null||X===void 0||X.dispose(),(N=m.alphaMap)===null||N===void 0||N.dispose(),(v=m.aoMap)===null||v===void 0||v.dispose(),(ne=m.displacementMap)===null||ne===void 0||ne.dispose(),(re=m.emissiveMap)===null||re===void 0||re.dispose(),(F=m.gradientMap)===null||F===void 0||F.dispose(),($=m.metalnessMap)===null||$===void 0||$.dispose(),(L=m.roughnessMap)===null||L===void 0||L.dispose(),m.dispose()})}}},519:function(O,R,C){"use strict";C.d(R,{disposeMesh:function(){return m.Z},isPlainObject:function(){return k.Z}});var G=C(666),A=C.n(G),j=null,m=C(695),D=C(644);function V(F){if(F.material){var $=Array.isArray(F.material)?F.material:[F.material];$.forEach(function(L){var U,f;(U=L.color)===null||U===void 0||U.convertSRGBToLinear(),(f=L.emissive)===null||f===void 0||f.convertSRGBToLinear(),L.map&&(L.map.encoding=THREE.sRGBEncoding),L.emissiveMap&&(L.emissiveMap.encoding=THREE.sRGBEncoding)})}}var k=C(738),B=C(568),I=C(924),X=require("idb-keyval"),N=C(484),v=null,ne=null,re=function(){var F=(0,B.Z)(A().mark(function $(L,U){var f,l,p,b,w,E;return A().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return f=U.version,z.next=4,(0,X.get)(L);case 4:if(p=z.sent,!(p&&p[f])){z.next=9;break}l=p[f],z.next=15;break;case 9:return z.next=11,(0,N.Z)(fetch(L).then(function(ie){if(ie.ok)return ie.blob();throw new Error}));case 11:b=z.sent,w=b.res,E=b.err,E||(l=w,(0,X.set)(L,(0,I.Z)({},f,w)));case 15:return z.abrupt("return",l?{url:URL.createObjectURL(l)}:{url:L});case 16:case"end":return z.stop()}},$)}));return function(L,U){return F.apply(this,arguments)}}()},738:function(O,R,C){"use strict";C.d(R,{Z:function(){return A}});function G(j){return Object.prototype.toString.call(j)==="[object Object]"}function A(j){if(G(j)===!1)return!1;var m=j.constructor;if(m===void 0)return!0;var D=m.prototype;return!(G(D)===!1||D.hasOwnProperty("isPrototypeOf")===!1)}},484:function(O,R,C){"use strict";C.d(R,{Z:function(){return A}});var G=C(42);function A(j){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return j.then(function(D){return(0,G.Z)({err:null,res:D},m)}).catch(function(D){return(0,G.Z)({err:D,res:void 0},m)})}},644:function(O){"use strict";O.exports=require("three")},568:function(O,R,C){"use strict";C.d(R,{Z:function(){return A}});function G(j,m,D,V,k,B,I){try{var X=j[B](I),N=X.value}catch(v){D(v);return}X.done?m(N):Promise.resolve(N).then(V,k)}function A(j){return function(){var m=this,D=arguments;return new Promise(function(V,k){var B=j.apply(m,D);function I(N){G(B,V,k,I,X,"next",N)}function X(N){G(B,V,k,I,X,"throw",N)}I(void 0)})}}},924:function(O,R,C){"use strict";C.d(R,{Z:function(){return G}});function G(A,j,m){return j in A?Object.defineProperty(A,j,{value:m,enumerable:!0,configurable:!0,writable:!0}):A[j]=m,A}},42:function(O,R,C){"use strict";C.d(R,{Z:function(){return A}});var G=C(924);function A(j){for(var m=1;m<arguments.length;m++){var D=arguments[m]!=null?arguments[m]:{},V=Object.keys(D);typeof Object.getOwnPropertySymbols=="function"&&(V=V.concat(Object.getOwnPropertySymbols(D).filter(function(k){return Object.getOwnPropertyDescriptor(D,k).enumerable}))),V.forEach(function(k){(0,G.Z)(j,k,D[k])})}return j}}},Oe={};function q(O){var R=Oe[O];if(R!==void 0)return R.exports;var C=Oe[O]={exports:{}};return Fe[O](C,C.exports,q),C.exports}(function(){q.n=function(O){var R=O&&O.__esModule?function(){return O.default}:function(){return O};return q.d(R,{a:R}),R}})(),function(){q.d=function(O,R){for(var C in R)q.o(R,C)&&!q.o(O,C)&&Object.defineProperty(O,C,{enumerable:!0,get:R[C]})}}(),function(){q.o=function(O,R){return Object.prototype.hasOwnProperty.call(O,R)}}(),function(){q.r=function(O){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})}}();var ye={};(function(){"use strict";q.r(ye),q.d(ye,{BaseObject:function(){return ct},Pencil:function(){return Ce},default:function(){return Ce}});function O(u,a){if(!(u instanceof a))throw new TypeError("Cannot call a class as a function")}function R(u,a){for(var n=0;n<a.length;n++){var e=a[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(u,e.key,e)}}function C(u,a,n){return a&&R(u.prototype,a),n&&R(u,n),u}var G=q(42);function A(u,a){var n=Object.keys(u);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(u);a&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable})),n.push.apply(n,e)}return n}function j(u,a){return a=a!=null?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(a)):A(Object(a)).forEach(function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(a,n))}),u}function m(u,a){(a==null||a>u.length)&&(a=u.length);for(var n=0,e=new Array(a);n<a;n++)e[n]=u[n];return e}function D(u){if(Array.isArray(u))return m(u)}function V(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 B(u,a){if(!!u){if(typeof u=="string")return m(u,a);var n=Object.prototype.toString.call(u).slice(8,-1);if(n==="Object"&&u.constructor&&(n=u.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(u,a)}}function I(u){return D(u)||V(u)||B(u)||k()}var X=require("@tweenjs/tween.js"),N=q.n(X),v=q(644),ne=q(187),re=require("deepmerge"),F=q.n(re),$=require("three/examples/jsm/libs/stats.module"),L=q.n($),U=require("lil-gui"),f=q.n(U),l=function(){"use strict";function u(){O(this,u),this.guiParams={}}var a=u.prototype;return a.showGuiParams=function(e){var r=this;!e||Object.keys(this.guiParams).forEach(function(t){var s=e.addFolder(t),o=r.guiParams[t];Object.keys(o).forEach(function(i){var d=o[i],P=d.min,y=d.max,_=d.step,M=d.name,Z=d.to,W=d.paramMap,J=d.items,se=d.value,ae=d.target,ue=i.toLowerCase().indexOf("color")>-1,Y,pe=typeof se=="undefined"&&ae,fe=pe?ae():o[i],he=pe?i:"value";J?Y=s.add(fe,he,J):ue?Y=s.addColor(fe,he):Y=s.add(fe,he),Y=Y.name(M||i),typeof P!="undefined"&&(Y=Y.min(P)),typeof y!="undefined"&&(Y=Y.max(y)),typeof _!="undefined"&&(Y=Y.step(_)),Y=Y.onChange(function(){r.setGuiTargetValue(t,i,fe[he],W)}),(Z||pe)&&Y.listen()})})},a.setGuiTargetValue=function(e,r,t,s){var o=this.guiParams[e][r],i=o.onChange,d=o.target,P=o.value,y=r.toLowerCase().indexOf("color")>-1,_=typeof P=="undefined"&&d;if(d&&!_){var M=d();Array.isArray(M)||(M=[M]),M.forEach(function(Z){if(!!Z)if(y)try{Z[s||r].set(t)}catch(W){r!=="color"&&!s&&console.warn("".concat(r," is not a color,set paramMap"))}else Z[s||r]=t})}i&&i(t)},a.setGuiTargetValueByParams=function(){var e=this;Object.keys(this.guiParams).forEach(function(r){Object.keys(e.guiParams[r]).forEach(function(t){var s=e.guiParams[r][t];typeof s.value!="undefined"&&e.setGuiTargetValue(r,t,s.value,s.paramMap)})})},a.guiParamTween=function(e,r,t){var s=t.duration,o=s===void 0?0:s,i=this,d=this.guiParams[e][r],P=d.to,y=d.paramMap,_=y===void 0?"":y;return new(N()).Tween(this.guiParams[e][r]).to({value:P},o).onUpdate(function(M){i.setGuiTargetValue(e,r,M.value,_)})},u}(),p={None:v.NoToneMapping,Linear:v.LinearToneMapping,Reinhard:v.ReinhardToneMapping,Cineon:v.CineonToneMapping,ACESFilmic:v.ACESFilmicToneMapping},b={antialias:!1,devicePixelRatio:window.devicePixelRatio,powerPreference:"high-performance",toneMapping:"None",toneMappingExposure:1,alpha:!1,outputEncoding:v.LinearEncoding,logarithmicDepthBuffer:!1,preserveDrawingBuffer:!1},w=function(){"use strict";function u(n){O(this,u),this.options=n;var e=n.width,r=n.height,t=n.rendererParams,s=t.alpha,o=t.devicePixelRatio,i=t.antialias,d=t.powerPreference,P=t.toneMapping,y=t.toneMappingExposure,_=t.outputEncoding,M=t.logarithmicDepthBuffer,Z=t.preserveDrawingBuffer,W=new v.WebGLRenderer({alpha:s,antialias:i,powerPreference:d,logarithmicDepthBuffer:M,preserveDrawingBuffer:Z});W.setSize(e,r),W.setPixelRatio(o),W.autoClear=!1,W.toneMapping=p[P],W.toneMappingExposure=y,W.outputEncoding=_,this.renderer=W}var a=u.prototype;return a.setSize=function(e,r){this.renderer.setSize(e,r)},a.render=function(){var e=this.options,r=e.scene,t=e.camera;this.renderer.render(r,t)},a.setGui=function(e){var r=this,t=new l;t.guiParams={renderer:{toneMapping:{value:this.options.rendererParams.toneMapping,items:p,target:function(){return r.renderer}},toneMappingExposure:{value:this.options.rendererParams.toneMappingExposure,min:0,max:Math.pow(2,4),target:function(){return r.renderer}}}},t.showGuiParams(e)},a.dispose=function(){var e,r,t;(e=this.renderer)===null||e===void 0||e.clear(),(r=this.renderer)===null||r===void 0||r.dispose(),(t=this.renderer)===null||t===void 0||t.renderLists.dispose(),this.renderer=void 0},u}(),E={fov:45,near:1,far:1e3},T=function(){"use strict";function u(n){O(this,u),this.oldCameraPosition=new v.Vector3,this.oldCameraRotation=new v.Euler,this.customCamera=!1,this.options=n;var e=n.isdev,r=n.width,t=n.height,s=n.cameraParams;if(s instanceof v.Camera)this.camera=s,this.customCamera=!0;else{var o=s.fov,i=s.far,d=s.near,P=new v.PerspectiveCamera(o,r/t,d,i);(!o||!i)&&e&&(console.warn("camera.fov \u9ED8\u8BA4\u503C\u4E3A 45\uFF0C\u65E7\u7248\u672C\u4E3A 12"),console.warn("camera.far \u9ED8\u8BA4\u503C\u4E3A 1000\uFF0C\u65E7\u7248\u672C\u4E3A 20000")),P.position.set(0,0,400),P.lookAt(0,0,0),this.camera=P}}var a=u.prototype;return a.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},a.setSize=function(e,r){this.camera instanceof v.PerspectiveCamera&&(this.camera.aspect=e/r),this.camera.updateProjectionMatrix()},a.dispose=function(){this.camera=void 0},a.setGui=function(e){var r=this,t=new l;t.guiParams={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(s){r.camera.updateProjectionMatrix()}},far:{min:0,max:2e4,step:1,target:function(){return r.camera},onChange:function(s){r.camera.updateProjectionMatrix()}}}},this.camera instanceof v.PerspectiveCamera&&(t.guiParams.camera.fov={min:0,max:90,step:1,target:function(){return r.camera},onChange:function(s){r.camera.updateProjectionMatrix()}}),t.showGuiParams(e)},u}(),z=q(519),ie={background:null},le=function(){"use strict";function u(n){O(this,u),this.options=n;var e=n.camera,r=n.sceneParams,t=r.background,s=new v.Scene;t&&(s.background=t),s.add(e),this.scene=s}var a=u.prototype;return a.addAxesHelper=function(){var e,r=new v.AxesHelper(100);(e=this.scene)===null||e===void 0||e.add(r)},a.dispose=function(){var e;(e=this.scene)===null||e===void 0||e.traverse(function(r){(0,z.disposeMesh)(r)}),this.scene=void 0},u}(),ce=require("three/examples/jsm/controls/OrbitControls"),me={},ge=function(){"use strict";function u(n){O(this,u),this.options=n;var e=n.camera,r=n.controlParams,t=n.mapControl,s=r.domElement,o=t?new ce.MapControls(e,s):new ce.OrbitControls(e,s);o.minPolarAngle=Math.PI*.15,o.maxPolarAngle=Math.PI*.85,o.enableDamping=!0,o.dampingFactor=.063,o.autoRotate=!1,o.autoRotateSpeed=-60,o.enableZoom=!0,o.zoomSpeed=.2,this.control=o}var a=u.prototype;return a.limitPan=function(e){var r=e.maxX,t=r===void 0?1/0:r,s=e.minX,o=s===void 0?-1/0:s,i=e.maxZ,d=i===void 0?1/0:i,P=e.minZ,y=P===void 0?-1/0:P,_=e.maxY,M=_===void 0?1/0:_,Z=e.minY,W=Z===void 0?-1/0:Z,J=this.limitPanV||new v.Vector3,se=this.control,ae=this.options.camera,ue=new v.Vector3(o,W,y),Y=new v.Vector3(t,M,d);this.limitPanV=J,J.copy(se.target),se.target.clamp(ue,Y),J.sub(se.target),ae.position.sub(J)},a.update=function(){var e;(e=this.control)===null||e===void 0||e.update()},a.dispose=function(){var e;(e=this.control)===null||e===void 0||e.dispose(),this.control=void 0},u}(),h=require("three/examples/jsm/renderers/CSS2DRenderer"),c=require("three/examples/jsm/renderers/CSS3DRenderer"),g={zIndex:"auto"},x=function(){"use strict";function u(n){O(this,u),this.container=n}var a=u.prototype;return a.addRenderer=function(e,r){var t=this.container,s=t.offsetWidth,o=t.offsetHeight,i=e==="css2d"?new h.CSS2DRenderer:new c.CSS3DRenderer;i.domElement.style.position="absolute",i.domElement.style.top="0",i.domElement.style.pointerEvents="none",i.domElement.style.zIndex=r.zIndex,i.setSize(s,o),t.appendChild(i.domElement),e==="css2d"?this.css2Drenderer=i:e==="css3d"&&(this.css3Drenderer=i)},a.setSize=function(e,r){var t,s;(t=this.css2Drenderer)===null||t===void 0||t.setSize(e,r),(s=this.css3Drenderer)===null||s===void 0||s.setSize(e,r)},a.render=function(e,r){var t,s;(t=this.css2Drenderer)===null||t===void 0||t.render(e,r),(s=this.css3Drenderer)===null||s===void 0||s.render(e,r)},a.dispose=function(){this.css2Drenderer=void 0,this.css3Drenderer=void 0},u}(),S=require("three/examples/jsm/postprocessing/EffectComposer"),H=require("three/examples/jsm/postprocessing/RenderPass"),Q=require("three/examples/jsm/postprocessing/ShaderPass"),K=require("three/examples/jsm/shaders/CopyShader"),te=require("three/examples/jsm/shaders/GammaCorrectionShader"),ee=require("three/examples/jsm/postprocessing/SMAAPass"),ve=require("three/examples/jsm/postprocessing/SSAARenderPass"),de=require("three/examples/jsm/shaders/FXAAShader"),oe=function(){try{var u=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&u.getContext("webgl2"))}catch(a){return!1}},ht=0,Ue=1,be=!1,Re=oe()!==!1,ke=`varying vec2 vUv;
1484
2
 
1485
3
  void main() {
1486
4
 
@@ -1488,7 +6,7 @@ void main() {
1488
6
 
1489
7
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
1490
8
 
1491
- }`,ta=`uniform sampler2D baseTexture;
9
+ }`,Ve=`uniform sampler2D baseTexture;
1492
10
  uniform sampler2D bloomTexture;
1493
11
 
1494
12
  varying vec2 vUv;
@@ -1497,41 +15,7 @@ void main() {
1497
15
 
1498
16
  gl_FragColor = (texture2D(baseTexture, vUv) + vec4(1.0) * texture2D(bloomTexture, vUv));
1499
17
 
1500
- }`;function it(f,t){return it=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e},it(f,t)}function At(f,t){return it(f,t)}function Tt(f,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(t&&t.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),t&&At(f,t)}function aa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function nt(f){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},nt(f)}function Pt(f){return nt(f)}function ra(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function ia(f){return f&&f.constructor===Symbol?"symbol":typeof f}function na(f,t){return t&&(ia(t)==="object"||typeof t=="function")?t:ra(f)}function bt(f){var t=aa();return function(){var e=Pt(f),a;if(t){var r=Pt(this).constructor;a=Reflect.construct(e,arguments,r)}else a=e.apply(this,arguments);return na(this,a)}}const yt={shaderID:"luminosityHighPass",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new n.Color(0)},defaultOpacity:{value:0}},vertexShader:`
1501
-
1502
- varying vec2 vUv;
1503
-
1504
- void main() {
1505
-
1506
- vUv = uv;
1507
-
1508
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1509
-
1510
- }`,fragmentShader:`
1511
-
1512
- uniform sampler2D tDiffuse;
1513
- uniform vec3 defaultColor;
1514
- uniform float defaultOpacity;
1515
- uniform float luminosityThreshold;
1516
- uniform float smoothWidth;
1517
-
1518
- varying vec2 vUv;
1519
-
1520
- void main() {
1521
-
1522
- vec4 texel = texture2D( tDiffuse, vUv );
1523
-
1524
- vec3 luma = vec3( 0.299, 0.587, 0.114 );
1525
-
1526
- float v = dot( texel.xyz, luma );
1527
-
1528
- vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );
1529
-
1530
- float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );
1531
-
1532
- gl_FragColor = mix( outputColor, texel, alpha );
1533
-
1534
- }`};var st=function(f){"use strict";Tt(i,f);var t=bt(i);function i(a,r,s,l){R(this,i);var o;o=t.call(this),o.strength=r!==void 0?r:1,o.radius=s,o.threshold=l,o.resolution=a!==void 0?new n.Vector2(a.x,a.y):new n.Vector2(256,256),o.clearColor=new n.Color(0,0,0);var c={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat};o.renderTargetsHorizontal=[],o.renderTargetsVertical=[],o.nMips=5;var u=Math.round(o.resolution.x/2),m=Math.round(o.resolution.y/2);o.renderTargetBright=new n.WebGLRenderTarget(u,m,c),o.renderTargetBright.texture.name="UnrealBloomPass.bright",o.renderTargetBright.texture.generateMipmaps=!1;for(var P=0;P<o.nMips;P++){var A=new n.WebGLRenderTarget(u,m,c);A.texture.name="UnrealBloomPass.h".concat(P),A.texture.generateMipmaps=!1,o.renderTargetsHorizontal.push(A);var v=new n.WebGLRenderTarget(u,m,c);v.texture.name="UnrealBloomPass.v".concat(P),v.texture.generateMipmaps=!1,o.renderTargetsVertical.push(v),u=Math.round(u/2),m=Math.round(m/2)}yt===void 0&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");var h=yt;o.highPassUniforms=n.UniformsUtils.clone(h.uniforms),o.highPassUniforms.luminosityThreshold.value=l,o.highPassUniforms.smoothWidth.value=.01,o.materialHighPassFilter=new n.ShaderMaterial({uniforms:o.highPassUniforms,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,defines:{}}),o.separableBlurMaterials=[];var y=[3,5,7,9,11];u=Math.round(o.resolution.x/2),m=Math.round(o.resolution.y/2);for(var _=0;_<o.nMips;_++)o.separableBlurMaterials.push(o.getSeperableBlurMaterial(y[_])),o.separableBlurMaterials[_].uniforms.texSize.value=new n.Vector2(u,m),u=Math.round(u/2),m=Math.round(m/2);o.compositeMaterial=o.getCompositeMaterial(o.nMips),o.compositeMaterial.uniforms.blurTexture1.value=o.renderTargetsVertical[0].texture,o.compositeMaterial.uniforms.blurTexture2.value=o.renderTargetsVertical[1].texture,o.compositeMaterial.uniforms.blurTexture3.value=o.renderTargetsVertical[2].texture,o.compositeMaterial.uniforms.blurTexture4.value=o.renderTargetsVertical[3].texture,o.compositeMaterial.uniforms.blurTexture5.value=o.renderTargetsVertical[4].texture,o.compositeMaterial.uniforms.bloomStrength.value=r,o.compositeMaterial.uniforms.bloomRadius.value=.1,o.compositeMaterial.needsUpdate=!0;var I=[1,.8,.6,.4,.2];o.compositeMaterial.uniforms.bloomFactors.value=I,o.bloomTintColors=[new n.Vector3(1,1,1),new n.Vector3(1,1,1),new n.Vector3(1,1,1),new n.Vector3(1,1,1),new n.Vector3(1,1,1)],o.compositeMaterial.uniforms.bloomTintColors.value=o.bloomTintColors,ge===void 0&&console.error("THREE.UnrealBloomPass relies on CopyShader");var Q=ge;return o.copyUniforms=n.UniformsUtils.clone(Q.uniforms),o.copyUniforms.opacity.value=1,o.materialCopy=new n.ShaderMaterial({uniforms:o.copyUniforms,vertexShader:Q.vertexShader,fragmentShader:Q.fragmentShader,blending:n.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),o.enabled=!0,o.needsSwap=!1,o._oldClearColor=new n.Color,o.oldClearAlpha=1,o.basic=new n.MeshBasicMaterial,o.fsQuad=new Ue(void 0),o}var e=i.prototype;return e.dispose=function(){for(var r=0;r<this.renderTargetsHorizontal.length;r++)this.renderTargetsHorizontal[r].dispose();for(var s=0;s<this.renderTargetsVertical.length;s++)this.renderTargetsVertical[s].dispose();this.renderTargetBright.dispose()},e.setSize=function(r,s){var l=Math.round(r/2),o=Math.round(s/2);this.renderTargetBright.setSize(l,o);for(var c=0;c<this.nMips;c++)this.renderTargetsHorizontal[c].setSize(l,o),this.renderTargetsVertical[c].setSize(l,o),this.separableBlurMaterials[c].uniforms.texSize.value=new n.Vector2(l,o),l=Math.round(l/2),o=Math.round(o/2)},e.render=function(r,s,l,o,c){r.getClearColor(this._oldClearColor),this.oldClearAlpha=r.getClearAlpha();var u=r.autoClear;r.autoClear=!1,r.setClearColor(this.clearColor,0),c&&r.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=l.texture,r.setRenderTarget(null),r.clear(),this.fsQuad.render(r)),this.highPassUniforms.tDiffuse.value=l.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,r.setRenderTarget(this.renderTargetBright),r.clear(),this.fsQuad.render(r);for(var m=this.renderTargetBright,P=0;P<this.nMips;P++)this.fsQuad.material=this.separableBlurMaterials[P],this.separableBlurMaterials[P].uniforms.colorTexture.value=m.texture,this.separableBlurMaterials[P].uniforms.direction.value=i.BlurDirectionX,r.setRenderTarget(this.renderTargetsHorizontal[P]),r.clear(),this.fsQuad.render(r),this.separableBlurMaterials[P].uniforms.colorTexture.value=this.renderTargetsHorizontal[P].texture,this.separableBlurMaterials[P].uniforms.direction.value=i.BlurDirectionY,r.setRenderTarget(this.renderTargetsVertical[P]),r.clear(),this.fsQuad.render(r),m=this.renderTargetsVertical[P];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,r.setRenderTarget(this.renderTargetsHorizontal[0]),r.clear(),this.fsQuad.render(r),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,c&&r.state.buffers.stencil.setTest(!0),this.renderToScreen?(r.setRenderTarget(null),this.fsQuad.render(r)):(r.setRenderTarget(l),this.fsQuad.render(r)),r.setClearColor(this._oldClearColor,this.oldClearAlpha),r.autoClear=u},e.getSeperableBlurMaterial=function(r){return new n.ShaderMaterial({defines:{KERNEL_RADIUS:r,SIGMA:r},uniforms:{colorTexture:{value:null},texSize:{value:new n.Vector2(.5,.5)},direction:{value:new n.Vector2(.5,.5)}},vertexShader:`varying vec2 vUv;
18
+ }`;function _e(u,a){return _e=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},_e(u,a)}function Te(u,a){return _e(u,a)}function je(u,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(a&&a.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),a&&Te(u,a)}function Ie(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function we(u){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},we(u)}function Me(u){return we(u)}function Ne(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function He(u){return u&&u.constructor===Symbol?"symbol":typeof u}function Ze(u,a){return a&&(He(a)==="object"||typeof a=="function")?a:Ne(u)}function Ee(u){var a=Ie();return function(){var e=Me(u),r;if(a){var t=Me(this).constructor;r=Reflect.construct(e,arguments,t)}else r=e.apply(this,arguments);return Ze(this,r)}}var Le=require("three/examples/jsm/postprocessing/Pass"),Ae=require("three/examples/jsm/shaders/LuminosityHighPassShader"),Se=function(u){"use strict";je(n,u);var a=Ee(n);function n(r,t,s,o){O(this,n);var i;i=a.call(this),i.strength=t!==void 0?t:1,i.radius=s,i.threshold=o,i.resolution=r!==void 0?new v.Vector2(r.x,r.y):new v.Vector2(256,256),i.clearColor=new v.Color(0,0,0);var d={minFilter:v.LinearFilter,magFilter:v.LinearFilter,format:v.RGBAFormat};i.renderTargetsHorizontal=[],i.renderTargetsVertical=[],i.nMips=5;var P=Math.round(i.resolution.x/2),y=Math.round(i.resolution.y/2);i.renderTargetBright=new v.WebGLRenderTarget(P,y,d),i.renderTargetBright.texture.name="UnrealBloomPass.bright",i.renderTargetBright.texture.generateMipmaps=!1;for(var _=0;_<i.nMips;_++){var M=new v.WebGLRenderTarget(P,y,d);M.texture.name="UnrealBloomPass.h".concat(_),M.texture.generateMipmaps=!1,i.renderTargetsHorizontal.push(M);var Z=new v.WebGLRenderTarget(P,y,d);Z.texture.name="UnrealBloomPass.v".concat(_),Z.texture.generateMipmaps=!1,i.renderTargetsVertical.push(Z),P=Math.round(P/2),y=Math.round(y/2)}Ae.LuminosityHighPassShader===void 0&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");var W=Ae.LuminosityHighPassShader;i.highPassUniforms=v.UniformsUtils.clone(W.uniforms),i.highPassUniforms.luminosityThreshold.value=o,i.highPassUniforms.smoothWidth.value=.01,i.materialHighPassFilter=new v.ShaderMaterial({uniforms:i.highPassUniforms,vertexShader:W.vertexShader,fragmentShader:W.fragmentShader,defines:{}}),i.separableBlurMaterials=[];var J=[3,5,7,9,11];P=Math.round(i.resolution.x/2),y=Math.round(i.resolution.y/2);for(var se=0;se<i.nMips;se++)i.separableBlurMaterials.push(i.getSeperableBlurMaterial(J[se])),i.separableBlurMaterials[se].uniforms.texSize.value=new v.Vector2(P,y),P=Math.round(P/2),y=Math.round(y/2);i.compositeMaterial=i.getCompositeMaterial(i.nMips),i.compositeMaterial.uniforms.blurTexture1.value=i.renderTargetsVertical[0].texture,i.compositeMaterial.uniforms.blurTexture2.value=i.renderTargetsVertical[1].texture,i.compositeMaterial.uniforms.blurTexture3.value=i.renderTargetsVertical[2].texture,i.compositeMaterial.uniforms.blurTexture4.value=i.renderTargetsVertical[3].texture,i.compositeMaterial.uniforms.blurTexture5.value=i.renderTargetsVertical[4].texture,i.compositeMaterial.uniforms.bloomStrength.value=t,i.compositeMaterial.uniforms.bloomRadius.value=.1,i.compositeMaterial.needsUpdate=!0;var ae=[1,.8,.6,.4,.2];i.compositeMaterial.uniforms.bloomFactors.value=ae,i.bloomTintColors=[new v.Vector3(1,1,1),new v.Vector3(1,1,1),new v.Vector3(1,1,1),new v.Vector3(1,1,1),new v.Vector3(1,1,1)],i.compositeMaterial.uniforms.bloomTintColors.value=i.bloomTintColors,K.CopyShader===void 0&&console.error("THREE.UnrealBloomPass relies on CopyShader");var ue=K.CopyShader;return i.copyUniforms=v.UniformsUtils.clone(ue.uniforms),i.copyUniforms.opacity.value=1,i.materialCopy=new v.ShaderMaterial({uniforms:i.copyUniforms,vertexShader:ue.vertexShader,fragmentShader:ue.fragmentShader,blending:v.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),i.enabled=!0,i.needsSwap=!1,i._oldClearColor=new v.Color,i.oldClearAlpha=1,i.basic=new v.MeshBasicMaterial,i.fsQuad=new Le.FullScreenQuad(void 0),i}var e=n.prototype;return e.dispose=function(){for(var t=0;t<this.renderTargetsHorizontal.length;t++)this.renderTargetsHorizontal[t].dispose();for(var s=0;s<this.renderTargetsVertical.length;s++)this.renderTargetsVertical[s].dispose();this.renderTargetBright.dispose()},e.setSize=function(t,s){var o=Math.round(t/2),i=Math.round(s/2);this.renderTargetBright.setSize(o,i);for(var d=0;d<this.nMips;d++)this.renderTargetsHorizontal[d].setSize(o,i),this.renderTargetsVertical[d].setSize(o,i),this.separableBlurMaterials[d].uniforms.texSize.value=new v.Vector2(o,i),o=Math.round(o/2),i=Math.round(i/2)},e.render=function(t,s,o,i,d){t.getClearColor(this._oldClearColor),this.oldClearAlpha=t.getClearAlpha();var P=t.autoClear;t.autoClear=!1,t.setClearColor(this.clearColor,0),d&&t.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=o.texture,t.setRenderTarget(null),t.clear(),this.fsQuad.render(t)),this.highPassUniforms.tDiffuse.value=o.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,t.setRenderTarget(this.renderTargetBright),t.clear(),this.fsQuad.render(t);for(var y=this.renderTargetBright,_=0;_<this.nMips;_++)this.fsQuad.material=this.separableBlurMaterials[_],this.separableBlurMaterials[_].uniforms.colorTexture.value=y.texture,this.separableBlurMaterials[_].uniforms.direction.value=n.BlurDirectionX,t.setRenderTarget(this.renderTargetsHorizontal[_]),t.clear(),this.fsQuad.render(t),this.separableBlurMaterials[_].uniforms.colorTexture.value=this.renderTargetsHorizontal[_].texture,this.separableBlurMaterials[_].uniforms.direction.value=n.BlurDirectionY,t.setRenderTarget(this.renderTargetsVertical[_]),t.clear(),this.fsQuad.render(t),y=this.renderTargetsVertical[_];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,t.setRenderTarget(this.renderTargetsHorizontal[0]),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,d&&t.state.buffers.stencil.setTest(!0),this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(o),this.fsQuad.render(t)),t.setClearColor(this._oldClearColor,this.oldClearAlpha),t.autoClear=P},e.getSeperableBlurMaterial=function(t){return new v.ShaderMaterial({defines:{KERNEL_RADIUS:t,SIGMA:t},uniforms:{colorTexture:{value:null},texSize:{value:new v.Vector2(.5,.5)},direction:{value:new v.Vector2(.5,.5)}},vertexShader:`varying vec2 vUv;
1535
19
  void main() {
1536
20
  vUv = uv;
1537
21
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
@@ -1545,7 +29,7 @@ void main() {
1545
29
  }
1546
30
  void main() {
1547
31
  vec2 invSize = 1.0 / texSize; float fSigma = float(SIGMA); float weightSum = gaussianPdf(0.0, fSigma); float alphaSum = 0.0; vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum; for( int i = 1; i < KERNEL_RADIUS; i ++ ) { float x = float(i); float w = gaussianPdf(x, fSigma); vec2 uvOffset = direction * invSize * x; vec4 sample1 = texture2D( colorTexture, vUv + uvOffset); vec4 sample2 = texture2D( colorTexture, vUv - uvOffset); diffuseSum += (sample1.rgb + sample2.rgb) * w; alphaSum += (sample1.a + sample2.a) * w; weightSum += 2.0 * w; } gl_FragColor = vec4(diffuseSum/weightSum, alphaSum/weightSum);
1548
- }`})},e.getCompositeMaterial=function(r){return new n.ShaderMaterial({defines:{NUM_MIPS:r},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
32
+ }`})},e.getCompositeMaterial=function(t){return new v.ShaderMaterial({defines:{NUM_MIPS:t},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
1549
33
  void main() {
1550
34
  vUv = uv;
1551
35
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
@@ -1570,469 +54,4 @@ void main() {
1570
54
  lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
1571
55
  lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
1572
56
  lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
1573
- }`})},i}(we);st.BlurDirectionX=new n.Vector2(1,0),st.BlurDirectionY=new n.Vector2(0,1);var sa={threshold:.2,strength:.5,radius:0},oa=new n.MeshBasicMaterial({color:"black"}),la=new n.SpriteMaterial({color:"#000"}),ua=function(){"use strict";function f(i,e){R(this,f),this.materials={},this.bloomLayer=new n.Layers,this.active=!0,this.composerController=i,this.options=e;var a=i.renderer,r=i.renderPass,s=i.finalComposer,l=i.getSize(),o=l.width,c=l.height,u=new st(new n.Vector2(o,c),e.strength,e.radius,e.threshold);this.bloomPass=u;var m=new xt(a);m.renderToScreen=!1,m.addPass(r),m.addPass(this.bloomPass),this.bloomComposer=m,this.bloomLayer.set($t);var P=new n.ShaderMaterial({uniforms:{baseTexture:{value:null},bloomTexture:{value:m.renderTarget2.texture}},vertexShader:ea,fragmentShader:ta,defines:{}}),A=new Ie(P,"baseTexture");A.needsSwap=!0,this.finalPass=A,s.addPass(A)}var t=f.prototype;return t.enable=function(){this.active||(this.finalPass.enabled=!0,this.bloomPass.enabled=!0,this.active=!0)},t.disable=function(){!this.active||(this.finalPass.enabled=!1,this.bloomPass.enabled=!1,this.active=!1)},t.render=function(e){if(!!this.active){var a=this,r=a.bloomComposer,s=a.bloomLayer,l=a.materials;e.traverse(function(o){var c=o;c.material&&s.test(c.layers)===!1&&(l[c.uuid]=c.material,c.material=c.isSprite?la:oa)}),r.render(),e.traverse(function(o){var c=o;l[c.uuid]&&(c.material=l[c.uuid],delete l[c.uuid])})}},t.setSize=function(e,a){this.bloomComposer.setSize(e,a)},t.setGui=function(e){var a=this,r=new p;r.guiParams={bloom:{threshold:{value:this.options.threshold,min:0,max:1,target:function(){return a.bloomPass}},strength:{value:this.options.strength,min:0,max:10,target:function(){return a.bloomPass}},radius:{value:this.options.radius,min:0,max:2,step:.01,target:function(){return a.bloomPass}}}},r.showGuiParams(e)},t.dispose=function(){this.bloomPass.dispose(),this.materials={}},f}();class Re extends we{constructor(t,i,e,a){super(),this.renderScene=i,this.renderCamera=e,this.selectedObjects=a!==void 0?a:[],this.visibleEdgeColor=new n.Color(1,1,1),this.hiddenEdgeColor=new n.Color(.1,.04,.02),this.edgeGlow=0,this.usePatternTexture=!1,this.edgeThickness=1,this.edgeStrength=3,this.downSampleRatio=2,this.pulsePeriod=0,this._visibilityCache=new Map,this.resolution=t!==void 0?new n.Vector2(t.x,t.y):new n.Vector2(256,256);const r={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat},s=Math.round(this.resolution.x/this.downSampleRatio),l=Math.round(this.resolution.y/this.downSampleRatio);this.maskBufferMaterial=new n.MeshBasicMaterial({color:16777215}),this.maskBufferMaterial.side=n.DoubleSide,this.renderTargetMaskBuffer=new n.WebGLRenderTarget(this.resolution.x,this.resolution.y,r),this.renderTargetMaskBuffer.texture.name="OutlinePass.mask",this.renderTargetMaskBuffer.texture.generateMipmaps=!1,this.depthMaterial=new n.MeshDepthMaterial,this.depthMaterial.side=n.DoubleSide,this.depthMaterial.depthPacking=n.RGBADepthPacking,this.depthMaterial.blending=n.NoBlending,this.prepareMaskMaterial=this.getPrepareMaskMaterial(),this.prepareMaskMaterial.side=n.DoubleSide,this.prepareMaskMaterial.fragmentShader=m(this.prepareMaskMaterial.fragmentShader,this.renderCamera),this.renderTargetDepthBuffer=new n.WebGLRenderTarget(this.resolution.x,this.resolution.y,r),this.renderTargetDepthBuffer.texture.name="OutlinePass.depth",this.renderTargetDepthBuffer.texture.generateMipmaps=!1,this.renderTargetMaskDownSampleBuffer=new n.WebGLRenderTarget(s,l,r),this.renderTargetMaskDownSampleBuffer.texture.name="OutlinePass.depthDownSample",this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps=!1,this.renderTargetBlurBuffer1=new n.WebGLRenderTarget(s,l,r),this.renderTargetBlurBuffer1.texture.name="OutlinePass.blur1",this.renderTargetBlurBuffer1.texture.generateMipmaps=!1,this.renderTargetBlurBuffer2=new n.WebGLRenderTarget(Math.round(s/2),Math.round(l/2),r),this.renderTargetBlurBuffer2.texture.name="OutlinePass.blur2",this.renderTargetBlurBuffer2.texture.generateMipmaps=!1,this.edgeDetectionMaterial=this.getEdgeDetectionMaterial(),this.renderTargetEdgeBuffer1=new n.WebGLRenderTarget(s,l,r),this.renderTargetEdgeBuffer1.texture.name="OutlinePass.edge1",this.renderTargetEdgeBuffer1.texture.generateMipmaps=!1,this.renderTargetEdgeBuffer2=new n.WebGLRenderTarget(Math.round(s/2),Math.round(l/2),r),this.renderTargetEdgeBuffer2.texture.name="OutlinePass.edge2",this.renderTargetEdgeBuffer2.texture.generateMipmaps=!1;const o=4,c=4;this.separableBlurMaterial1=this.getSeperableBlurMaterial(o),this.separableBlurMaterial1.uniforms.texSize.value.set(s,l),this.separableBlurMaterial1.uniforms.kernelRadius.value=1,this.separableBlurMaterial2=this.getSeperableBlurMaterial(c),this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(s/2),Math.round(l/2)),this.separableBlurMaterial2.uniforms.kernelRadius.value=c,this.overlayMaterial=this.getOverlayMaterial(),ge===void 0&&console.error("THREE.OutlinePass relies on CopyShader");const u=ge;this.copyUniforms=n.UniformsUtils.clone(u.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new n.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,blending:n.NoBlending,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new n.Color,this.oldClearAlpha=1,this.fsQuad=new Ue(null),this.tempPulseColor1=new n.Color,this.tempPulseColor2=new n.Color,this.textureMatrix=new n.Matrix4;function m(P,A){var v=A.isPerspectiveCamera?"perspective":"orthographic";return P.replace(/DEPTH_TO_VIEW_Z/g,v+"DepthToViewZ")}}dispose(){this.renderTargetMaskBuffer.dispose(),this.renderTargetDepthBuffer.dispose(),this.renderTargetMaskDownSampleBuffer.dispose(),this.renderTargetBlurBuffer1.dispose(),this.renderTargetBlurBuffer2.dispose(),this.renderTargetEdgeBuffer1.dispose(),this.renderTargetEdgeBuffer2.dispose()}setSize(t,i){this.renderTargetMaskBuffer.setSize(t,i),this.renderTargetDepthBuffer.setSize(t,i);let e=Math.round(t/this.downSampleRatio),a=Math.round(i/this.downSampleRatio);this.renderTargetMaskDownSampleBuffer.setSize(e,a),this.renderTargetBlurBuffer1.setSize(e,a),this.renderTargetEdgeBuffer1.setSize(e,a),this.separableBlurMaterial1.uniforms.texSize.value.set(e,a),e=Math.round(e/2),a=Math.round(a/2),this.renderTargetBlurBuffer2.setSize(e,a),this.renderTargetEdgeBuffer2.setSize(e,a),this.separableBlurMaterial2.uniforms.texSize.value.set(e,a)}changeVisibilityOfSelectedObjects(t){const i=this._visibilityCache;function e(a){a.isMesh&&(t===!0?a.visible=i.get(a):(i.set(a,a.visible),a.visible=t))}for(let a=0;a<this.selectedObjects.length;a++)this.selectedObjects[a].traverse(e)}changeVisibilityOfNonSelectedObjects(t){const i=this._visibilityCache,e=[];function a(s){s.isMesh&&e.push(s)}for(let s=0;s<this.selectedObjects.length;s++)this.selectedObjects[s].traverse(a);function r(s){if(s.isMesh||s.isSprite){let l=!1;for(let o=0;o<e.length;o++)if(e[o].id===s.id){l=!0;break}if(l===!1){const o=s.visible;(t===!1||i.get(s)===!0)&&(s.visible=t),i.set(s,o)}}else(s.isPoints||s.isLine)&&(t===!0?s.visible=i.get(s):(i.set(s,s.visible),s.visible=t))}this.renderScene.traverse(r)}updateTextureMatrix(){this.textureMatrix.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),this.textureMatrix.multiply(this.renderCamera.projectionMatrix),this.textureMatrix.multiply(this.renderCamera.matrixWorldInverse)}render(t,i,e,a,r){if(this.selectedObjects.length>0){t.getClearColor(this._oldClearColor),this.oldClearAlpha=t.getClearAlpha();const s=t.autoClear;t.autoClear=!1,r&&t.state.buffers.stencil.setTest(!1),t.setClearColor(16777215,1),this.changeVisibilityOfSelectedObjects(!1);const l=this.renderScene.background;if(this.renderScene.background=null,this.renderScene.overrideMaterial=this.depthMaterial,t.setRenderTarget(this.renderTargetDepthBuffer),t.clear(),t.render(this.renderScene,this.renderCamera),this.changeVisibilityOfSelectedObjects(!0),this._visibilityCache.clear(),this.updateTextureMatrix(),this.changeVisibilityOfNonSelectedObjects(!1),this.renderScene.overrideMaterial=this.prepareMaskMaterial,this.prepareMaskMaterial.uniforms.cameraNearFar.value.set(this.renderCamera.near,this.renderCamera.far),this.prepareMaskMaterial.uniforms.depthTexture.value=this.renderTargetDepthBuffer.texture,this.prepareMaskMaterial.uniforms.textureMatrix.value=this.textureMatrix,t.setRenderTarget(this.renderTargetMaskBuffer),t.clear(),t.render(this.renderScene,this.renderCamera),this.renderScene.overrideMaterial=null,this.changeVisibilityOfNonSelectedObjects(!0),this._visibilityCache.clear(),this.renderScene.background=l,this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetMaskBuffer.texture,t.setRenderTarget(this.renderTargetMaskDownSampleBuffer),t.clear(),this.fsQuad.render(t),this.tempPulseColor1.copy(this.visibleEdgeColor),this.tempPulseColor2.copy(this.hiddenEdgeColor),this.pulsePeriod>0){const o=.625+Math.cos(performance.now()*.01/this.pulsePeriod)*.75/2;this.tempPulseColor1.multiplyScalar(o),this.tempPulseColor2.multiplyScalar(o)}this.fsQuad.material=this.edgeDetectionMaterial,this.edgeDetectionMaterial.uniforms.maskTexture.value=this.renderTargetMaskDownSampleBuffer.texture,this.edgeDetectionMaterial.uniforms.texSize.value.set(this.renderTargetMaskDownSampleBuffer.width,this.renderTargetMaskDownSampleBuffer.height),this.edgeDetectionMaterial.uniforms.visibleEdgeColor.value=this.tempPulseColor1,this.edgeDetectionMaterial.uniforms.hiddenEdgeColor.value=this.tempPulseColor2,t.setRenderTarget(this.renderTargetEdgeBuffer1),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.separableBlurMaterial1,this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=Re.BlurDirectionX,this.separableBlurMaterial1.uniforms.kernelRadius.value=this.edgeThickness,t.setRenderTarget(this.renderTargetBlurBuffer1),t.clear(),this.fsQuad.render(t),this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetBlurBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=Re.BlurDirectionY,t.setRenderTarget(this.renderTargetEdgeBuffer1),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.separableBlurMaterial2,this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial2.uniforms.direction.value=Re.BlurDirectionX,t.setRenderTarget(this.renderTargetBlurBuffer2),t.clear(),this.fsQuad.render(t),this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetBlurBuffer2.texture,this.separableBlurMaterial2.uniforms.direction.value=Re.BlurDirectionY,t.setRenderTarget(this.renderTargetEdgeBuffer2),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.overlayMaterial,this.overlayMaterial.uniforms.maskTexture.value=this.renderTargetMaskBuffer.texture,this.overlayMaterial.uniforms.edgeTexture1.value=this.renderTargetEdgeBuffer1.texture,this.overlayMaterial.uniforms.edgeTexture2.value=this.renderTargetEdgeBuffer2.texture,this.overlayMaterial.uniforms.patternTexture.value=this.patternTexture,this.overlayMaterial.uniforms.edgeStrength.value=this.edgeStrength,this.overlayMaterial.uniforms.edgeGlow.value=this.edgeGlow,this.overlayMaterial.uniforms.usePatternTexture.value=this.usePatternTexture,r&&t.state.buffers.stencil.setTest(!0),t.setRenderTarget(e),this.fsQuad.render(t),t.setClearColor(this._oldClearColor,this.oldClearAlpha),t.autoClear=s}this.renderToScreen&&(this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=e.texture,t.setRenderTarget(null),this.fsQuad.render(t))}getPrepareMaskMaterial(){return new n.ShaderMaterial({uniforms:{depthTexture:{value:null},cameraNearFar:{value:new n.Vector2(.5,.5)},textureMatrix:{value:null}},vertexShader:`#include <morphtarget_pars_vertex>
1574
- #include <skinning_pars_vertex>
1575
-
1576
- varying vec4 projTexCoord;
1577
- varying vec4 vPosition;
1578
- uniform mat4 textureMatrix;
1579
-
1580
- void main() {
1581
-
1582
- #include <skinbase_vertex>
1583
- #include <begin_vertex>
1584
- #include <morphtarget_vertex>
1585
- #include <skinning_vertex>
1586
- #include <project_vertex>
1587
-
1588
- vPosition = mvPosition;
1589
- vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );
1590
- projTexCoord = textureMatrix * worldPosition;
1591
-
1592
- }`,fragmentShader:`#include <packing>
1593
- varying vec4 vPosition;
1594
- varying vec4 projTexCoord;
1595
- uniform sampler2D depthTexture;
1596
- uniform vec2 cameraNearFar;
1597
-
1598
- void main() {
1599
-
1600
- float depth = unpackRGBAToDepth(texture2DProj( depthTexture, projTexCoord ));
1601
- float viewZ = - DEPTH_TO_VIEW_Z( depth, cameraNearFar.x, cameraNearFar.y );
1602
- float depthTest = (-vPosition.z > viewZ) ? 1.0 : 0.0;
1603
- gl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);
1604
-
1605
- }`})}getEdgeDetectionMaterial(){return new n.ShaderMaterial({uniforms:{maskTexture:{value:null},texSize:{value:new n.Vector2(.5,.5)},visibleEdgeColor:{value:new n.Vector3(1,1,1)},hiddenEdgeColor:{value:new n.Vector3(1,1,1)}},vertexShader:`varying vec2 vUv;
1606
-
1607
- void main() {
1608
- vUv = uv;
1609
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1610
- }`,fragmentShader:`varying vec2 vUv;
1611
-
1612
- uniform sampler2D maskTexture;
1613
- uniform vec2 texSize;
1614
- uniform vec3 visibleEdgeColor;
1615
- uniform vec3 hiddenEdgeColor;
1616
-
1617
- void main() {
1618
- vec2 invSize = 1.0 / texSize;
1619
- vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);
1620
- vec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy);
1621
- vec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy);
1622
- vec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw);
1623
- vec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw);
1624
- float diff1 = (c1.r - c2.r)*0.5;
1625
- float diff2 = (c3.r - c4.r)*0.5;
1626
- float d = length( vec2(diff1, diff2) );
1627
- float a1 = min(c1.g, c2.g);
1628
- float a2 = min(c3.g, c4.g);
1629
- float visibilityFactor = min(a1, a2);
1630
- vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;
1631
- gl_FragColor = vec4(edgeColor, 1.0) * vec4(d);
1632
- }`})}getSeperableBlurMaterial(t){return new n.ShaderMaterial({defines:{MAX_RADIUS:t},uniforms:{colorTexture:{value:null},texSize:{value:new n.Vector2(.5,.5)},direction:{value:new n.Vector2(.5,.5)},kernelRadius:{value:1}},vertexShader:`varying vec2 vUv;
1633
-
1634
- void main() {
1635
- vUv = uv;
1636
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1637
- }`,fragmentShader:`#include <common>
1638
- varying vec2 vUv;
1639
- uniform sampler2D colorTexture;
1640
- uniform vec2 texSize;
1641
- uniform vec2 direction;
1642
- uniform float kernelRadius;
1643
-
1644
- float gaussianPdf(in float x, in float sigma) {
1645
- return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
1646
- }
1647
-
1648
- void main() {
1649
- vec2 invSize = 1.0 / texSize;
1650
- float weightSum = gaussianPdf(0.0, kernelRadius);
1651
- vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;
1652
- vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);
1653
- vec2 uvOffset = delta;
1654
- for( int i = 1; i <= MAX_RADIUS; i ++ ) {
1655
- float w = gaussianPdf(uvOffset.x, kernelRadius);
1656
- vec4 sample1 = texture2D( colorTexture, vUv + uvOffset);
1657
- vec4 sample2 = texture2D( colorTexture, vUv - uvOffset);
1658
- diffuseSum += ((sample1 + sample2) * w);
1659
- weightSum += (2.0 * w);
1660
- uvOffset += delta;
1661
- }
1662
- gl_FragColor = diffuseSum/weightSum;
1663
- }`})}getOverlayMaterial(){return new n.ShaderMaterial({uniforms:{maskTexture:{value:null},edgeTexture1:{value:null},edgeTexture2:{value:null},patternTexture:{value:null},edgeStrength:{value:1},edgeGlow:{value:1},usePatternTexture:{value:0}},vertexShader:`varying vec2 vUv;
1664
-
1665
- void main() {
1666
- vUv = uv;
1667
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1668
- }`,fragmentShader:`varying vec2 vUv;
1669
-
1670
- uniform sampler2D maskTexture;
1671
- uniform sampler2D edgeTexture1;
1672
- uniform sampler2D edgeTexture2;
1673
- uniform sampler2D patternTexture;
1674
- uniform float edgeStrength;
1675
- uniform float edgeGlow;
1676
- uniform bool usePatternTexture;
1677
-
1678
- void main() {
1679
- vec4 edgeValue1 = texture2D(edgeTexture1, vUv);
1680
- vec4 edgeValue2 = texture2D(edgeTexture2, vUv);
1681
- vec4 maskColor = texture2D(maskTexture, vUv);
1682
- vec4 patternColor = texture2D(patternTexture, 6.0 * vUv);
1683
- float visibilityFactor = 1.0 - maskColor.g > 0.0 ? 1.0 : 0.5;
1684
- vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;
1685
- vec4 finalColor = edgeStrength * maskColor.r * edgeValue;
1686
- if(usePatternTexture)
1687
- finalColor += + visibilityFactor * (1.0 - maskColor.r) * (1.0 - patternColor.r);
1688
- gl_FragColor = finalColor;
1689
- }`,blending:n.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0})}}Re.BlurDirectionX=new n.Vector2(1,0),Re.BlurDirectionY=new n.Vector2(0,1);var fa={edgeStrength:3,edgeGlow:4,edgeThickness:1,pulsePeriod:0,rotate:!1,usePatternTexture:!1,visibleEdgeColor:"#5ee8e8",hiddenEdgeColor:"#190a05"},da=function(){"use strict";function f(i,e){R(this,f),this.selectedObjects=[],this.active=!0,this.composerController=i,this.options=e;var a=i.scene,r=i.camera,s=i.finalComposer,l=i.getSize(),o=l.width,c=l.height,u=new Re(new n.Vector2(o,c),a,r);u.selectedObjects=this.selectedObjects,this.outlinePass=u,s.addPass(u),this.setGui()}var t=f.prototype;return t.enable=function(){this.active||(this.outlinePass.enabled=!0,this.active=!0)},t.disable=function(){!this.active||(this.outlinePass.enabled=!1,this.active=!1)},t.setGui=function(){var e=this,a=new p;a.guiParams={outline:{edgeStrength:{value:this.options.edgeStrength,min:.01,max:10,step:.01,target:function(){return e.outlinePass}},edgeGlow:{value:this.options.edgeGlow,min:0,max:10,step:.01,target:function(){return e.outlinePass}},edgeThickness:{value:this.options.edgeThickness,min:0,max:4,step:.01,target:function(){return e.outlinePass}},pulsePeriod:{value:this.options.pulsePeriod,min:0,max:4,step:.01,target:function(){return e.outlinePass}},usePatternTexture:{value:this.options.usePatternTexture,target:function(){return e.outlinePass}},visibleEdgeColor:{value:this.options.visibleEdgeColor,target:function(){return e.outlinePass}},hiddenEdgeColor:{value:this.options.hiddenEdgeColor,target:function(){return e.outlinePass}}}},a.setGuiTargetValueByParams(),this.outlineGui=a},t.dispose=function(){this.outlinePass.dispose(),this.selectedObjects=[]},f}();function ca(f,t){if(f==null)return{};var i={},e=Object.keys(f),a,r;for(r=0;r<e.length;r++)a=e[r],!(t.indexOf(a)>=0)&&(i[a]=f[a]);return i}function ha(f,t){if(f==null)return{};var i=ca(f,t),e,a;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(f);for(a=0;a<r.length;a++)e=r[a],!(t.indexOf(e)>=0)&&(!Object.prototype.propertyIsEnumerable.call(f,e)||(i[e]=f[e]))}return i}var Ae={defines:{MAX_STEP:0,PERSPECTIVE_CAMERA:!0,DISTANCE_ATTENUATION:!0,FRESNEL:!0,INFINITE_THICK:!1,SELECTIVE:!1},uniforms:{tDiffuse:{value:null},tNormal:{value:null},tMetalness:{value:null},tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null},resolution:{value:new n.Vector2},cameraProjectionMatrix:{value:new n.Matrix4},cameraInverseProjectionMatrix:{value:new n.Matrix4},opacity:{value:.5},maxDistance:{value:180},cameraRange:{value:0},thickness:{value:.018}},vertexShader:`
1690
-
1691
- varying vec2 vUv;
1692
-
1693
- void main() {
1694
-
1695
- vUv = uv;
1696
-
1697
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1698
-
1699
- }
1700
-
1701
- `,fragmentShader:`
1702
- // precision highp float;
1703
- precision highp sampler2D;
1704
- varying vec2 vUv;
1705
- uniform sampler2D tDepth;
1706
- uniform sampler2D tNormal;
1707
- uniform sampler2D tMetalness;
1708
- uniform sampler2D tDiffuse;
1709
- uniform float cameraRange;
1710
- uniform vec2 resolution;
1711
- uniform float opacity;
1712
- uniform float cameraNear;
1713
- uniform float cameraFar;
1714
- uniform float maxDistance;
1715
- uniform float thickness;
1716
- uniform mat4 cameraProjectionMatrix;
1717
- uniform mat4 cameraInverseProjectionMatrix;
1718
- #include <packing>
1719
- float pointToLineDistance(vec3 x0, vec3 x1, vec3 x2) {
1720
- //x0: point, x1: linePointA, x2: linePointB
1721
- //https://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html
1722
- return length(cross(x0-x1,x0-x2))/length(x2-x1);
1723
- }
1724
- float pointPlaneDistance(vec3 point,vec3 planePoint,vec3 planeNormal){
1725
- // https://mathworld.wolfram.com/Point-PlaneDistance.html
1726
- //// https://en.wikipedia.org/wiki/Plane_(geometry)
1727
- //// http://paulbourke.net/geometry/pointlineplane/
1728
- float a=planeNormal.x,b=planeNormal.y,c=planeNormal.z;
1729
- float x0=point.x,y0=point.y,z0=point.z;
1730
- float x=planePoint.x,y=planePoint.y,z=planePoint.z;
1731
- float d=-(a*x+b*y+c*z);
1732
- float distance=(a*x0+b*y0+c*z0+d)/sqrt(a*a+b*b+c*c);
1733
- return distance;
1734
- }
1735
- float getDepth( const in vec2 uv ) {
1736
- return texture2D( tDepth, uv ).x;
1737
- }
1738
- float getViewZ( const in float depth ) {
1739
- #ifdef PERSPECTIVE_CAMERA
1740
- return perspectiveDepthToViewZ( depth, cameraNear, cameraFar );
1741
- #else
1742
- return orthographicDepthToViewZ( depth, cameraNear, cameraFar );
1743
- #endif
1744
- }
1745
- vec3 getViewPosition( const in vec2 uv, const in float depth/*clip space*/, const in float clipW ) {
1746
- vec4 clipPosition = vec4( ( vec3( uv, depth ) - 0.5 ) * 2.0, 1.0 );//ndc
1747
- clipPosition *= clipW; //clip
1748
- return ( cameraInverseProjectionMatrix * clipPosition ).xyz;//view
1749
- }
1750
- vec3 getViewNormal( const in vec2 uv ) {
1751
- return unpackRGBToNormal( texture2D( tNormal, uv ).xyz );
1752
- }
1753
- vec2 viewPositionToXY(vec3 viewPosition){
1754
- vec2 xy;
1755
- vec4 clip=cameraProjectionMatrix*vec4(viewPosition,1);
1756
- xy=clip.xy;//clip
1757
- float clipW=clip.w;
1758
- xy/=clipW;//NDC
1759
- xy=(xy+1.)/2.;//uv
1760
- xy*=resolution;//screen
1761
- return xy;
1762
- }
1763
- void main(){
1764
- #ifdef SELECTIVE
1765
- float metalness=texture2D(tMetalness,vUv).r;
1766
- if(metalness==0.) return;
1767
- #endif
1768
-
1769
- float depth = getDepth( vUv );
1770
- float viewZ = getViewZ( depth );
1771
- if(-viewZ>=cameraFar) return;
1772
-
1773
- float clipW = cameraProjectionMatrix[2][3] * viewZ+cameraProjectionMatrix[3][3];
1774
- vec3 viewPosition=getViewPosition( vUv, depth, clipW );
1775
-
1776
- vec2 d0=gl_FragCoord.xy;
1777
- vec2 d1;
1778
-
1779
- vec3 viewNormal=getViewNormal( vUv );
1780
-
1781
- #ifdef PERSPECTIVE_CAMERA
1782
- vec3 viewIncidentDir=normalize(viewPosition);
1783
- vec3 viewReflectDir=reflect(viewIncidentDir,viewNormal);
1784
- #else
1785
- vec3 viewIncidentDir=vec3(0,0,-1);
1786
- vec3 viewReflectDir=reflect(viewIncidentDir,viewNormal);
1787
- #endif
1788
-
1789
- float maxReflectRayLen=maxDistance/dot(-viewIncidentDir,viewNormal);
1790
- // dot(a,b)==length(a)*length(b)*cos(theta) // https://www.mathsisfun.com/algebra/vectors-dot-product.html
1791
- // if(a.isNormalized&&b.isNormalized) dot(a,b)==cos(theta)
1792
- // maxDistance/maxReflectRayLen=cos(theta)
1793
- // maxDistance/maxReflectRayLen==dot(a,b)
1794
- // maxReflectRayLen==maxDistance/dot(a,b)
1795
-
1796
- vec3 d1viewPosition=viewPosition+viewReflectDir*maxReflectRayLen;
1797
- #ifdef PERSPECTIVE_CAMERA
1798
- if(d1viewPosition.z>-cameraNear){
1799
- //https://tutorial.math.lamar.edu/Classes/CalcIII/EqnsOfLines.aspx
1800
- float t=(-cameraNear-viewPosition.z)/viewReflectDir.z;
1801
- d1viewPosition=viewPosition+viewReflectDir*t;
1802
- }
1803
- #endif
1804
- d1=viewPositionToXY(d1viewPosition);
1805
-
1806
- float totalLen=length(d1-d0);
1807
- float xLen=d1.x-d0.x;
1808
- float yLen=d1.y-d0.y;
1809
- float totalStep=max(abs(xLen),abs(yLen));
1810
- float xSpan=xLen/totalStep;
1811
- float ySpan=yLen/totalStep;
1812
- for(float i=0.;i<float(MAX_STEP);i++){
1813
- if(i>=totalStep) break;
1814
- vec2 xy=vec2(d0.x+i*xSpan,d0.y+i*ySpan);
1815
- if(xy.x<0.||xy.x>resolution.x||xy.y<0.||xy.y>resolution.y) break;
1816
- float s=length(xy-d0)/totalLen;
1817
- vec2 uv=xy/resolution;
1818
-
1819
- float d = getDepth(uv);
1820
- float vZ = getViewZ( d );
1821
- if(-vZ>=cameraFar) continue;
1822
- float cW = cameraProjectionMatrix[2][3] * vZ+cameraProjectionMatrix[3][3];
1823
- vec3 vP=getViewPosition( uv, d, cW );
1824
-
1825
- #ifdef PERSPECTIVE_CAMERA
1826
- // https://comp.nus.edu.sg/~lowkl/publications/lowk_persp_interp_techrep.pdf
1827
- float recipVPZ=1./viewPosition.z;
1828
- float viewReflectRayZ=1./(recipVPZ+s*(1./d1viewPosition.z-recipVPZ));
1829
- #else
1830
- float viewReflectRayZ=viewPosition.z+s*(d1viewPosition.z-viewPosition.z);
1831
- #endif
1832
-
1833
- // if(viewReflectRayZ>vZ) continue; // will cause "npm run make-screenshot webgl_postprocessing_ssr" high probability hang.
1834
- // https://github.com/mrdoob/three.js/pull/21539#issuecomment-821061164
1835
- if(viewReflectRayZ<=vZ){
1836
-
1837
- bool hit;
1838
- #ifdef INFINITE_THICK
1839
- hit=true;
1840
- #else
1841
- float away=pointToLineDistance(vP,viewPosition,d1viewPosition);
1842
-
1843
- float minThickness;
1844
- vec2 xyNeighbor=xy;
1845
- xyNeighbor.x+=1.;
1846
- vec2 uvNeighbor=xyNeighbor/resolution;
1847
- vec3 vPNeighbor=getViewPosition(uvNeighbor,d,cW);
1848
- minThickness=vPNeighbor.x-vP.x;
1849
- minThickness*=3.;
1850
- float tk=max(minThickness,thickness);
1851
-
1852
- hit=away<=tk;
1853
- #endif
1854
-
1855
- if(hit){
1856
- vec3 vN=getViewNormal( uv );
1857
- if(dot(viewReflectDir,vN)>=0.) continue;
1858
- float distance=pointPlaneDistance(vP,viewPosition,viewNormal);
1859
- if(distance>maxDistance) break;
1860
- float op=opacity;
1861
- #ifdef DISTANCE_ATTENUATION
1862
- float ratio=1.-(distance/maxDistance);
1863
- float attenuation=ratio*ratio;
1864
- op=opacity*attenuation;
1865
- #endif
1866
- #ifdef FRESNEL
1867
- float fresnelCoe=(dot(viewIncidentDir,viewReflectDir)+1.)/2.;
1868
- op*=fresnelCoe;
1869
- #endif
1870
- vec4 reflectColor=texture2D(tDiffuse,uv);
1871
- gl_FragColor.xyz=reflectColor.xyz;
1872
- gl_FragColor.a=op;
1873
- break;
1874
- }
1875
- }
1876
- }
1877
- }
1878
- `},He={defines:{PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null}},vertexShader:`
1879
-
1880
- varying vec2 vUv;
1881
-
1882
- void main() {
1883
-
1884
- vUv = uv;
1885
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1886
-
1887
- }
1888
-
1889
- `,fragmentShader:`
1890
-
1891
- uniform sampler2D tDepth;
1892
-
1893
- uniform float cameraNear;
1894
- uniform float cameraFar;
1895
-
1896
- varying vec2 vUv;
1897
-
1898
- #include <packing>
1899
-
1900
- float getLinearDepth( const in vec2 uv ) {
1901
-
1902
- #if PERSPECTIVE_CAMERA == 1
1903
-
1904
- float fragCoordZ = texture2D( tDepth, uv ).x;
1905
- float viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );
1906
- return viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );
1907
-
1908
- #else
1909
-
1910
- return texture2D( tDepth, uv ).x;
1911
-
1912
- #endif
1913
-
1914
- }
1915
-
1916
- void main() {
1917
-
1918
- float depth = getLinearDepth( vUv );
1919
- float d = 1.0 - depth;
1920
- // d=(d-.999)*1000.;
1921
- gl_FragColor = vec4( vec3( d ), 1.0 );
1922
-
1923
- }
1924
-
1925
- `},_e={uniforms:{tDiffuse:{value:null},resolution:{value:new n.Vector2},opacity:{value:.5}},vertexShader:`
1926
-
1927
- varying vec2 vUv;
1928
-
1929
- void main() {
1930
-
1931
- vUv = uv;
1932
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1933
-
1934
- }
1935
-
1936
- `,fragmentShader:`
1937
-
1938
- uniform sampler2D tDiffuse;
1939
- uniform vec2 resolution;
1940
- varying vec2 vUv;
1941
- void main() {
1942
- //reverse engineering from PhotoShop blur filter, then change coefficient
1943
-
1944
- vec2 texelSize = ( 1.0 / resolution );
1945
-
1946
- vec4 c=texture2D(tDiffuse,vUv);
1947
-
1948
- vec2 offset;
1949
-
1950
- offset=(vec2(-1,0))*texelSize;
1951
- vec4 cl=texture2D(tDiffuse,vUv+offset);
1952
-
1953
- offset=(vec2(1,0))*texelSize;
1954
- vec4 cr=texture2D(tDiffuse,vUv+offset);
1955
-
1956
- offset=(vec2(0,-1))*texelSize;
1957
- vec4 cb=texture2D(tDiffuse,vUv+offset);
1958
-
1959
- offset=(vec2(0,1))*texelSize;
1960
- vec4 ct=texture2D(tDiffuse,vUv+offset);
1961
-
1962
- // float coeCenter=.5;
1963
- // float coeSide=.125;
1964
- float coeCenter=.2;
1965
- float coeSide=.2;
1966
- float a=c.a*coeCenter+cl.a*coeSide+cr.a*coeSide+cb.a*coeSide+ct.a*coeSide;
1967
- vec3 rgb=(c.rgb*c.a*coeCenter+cl.rgb*cl.a*coeSide+cr.rgb*cr.a*coeSide+cb.rgb*cb.a*coeSide+ct.rgb*ct.a*coeSide)/a;
1968
- gl_FragColor=vec4(rgb,a);
1969
-
1970
- }
1971
- `};class Me extends we{constructor({renderer:t,scene:i,camera:e,width:a,height:r,selects:s,bouncing:l=!1,groundReflector:o}){super(),this.width=a!==void 0?a:512,this.height=r!==void 0?r:512,this.clear=!0,this.renderer=t,this.scene=i,this.camera=e,this.groundReflector=o,this.opacity=Ae.uniforms.opacity.value,this.output=0,this.maxDistance=Ae.uniforms.maxDistance.value,this.thickness=Ae.uniforms.thickness.value,this.tempColor=new n.Color,this._selects=s,this.selective=Array.isArray(this._selects),Object.defineProperty(this,"selects",{get(){return this._selects},set(u){this._selects!==u&&(this._selects=u,Array.isArray(u)?(this.selective=!0,this.ssrMaterial.defines.SELECTIVE=!0,this.ssrMaterial.needsUpdate=!0):(this.selective=!1,this.ssrMaterial.defines.SELECTIVE=!1,this.ssrMaterial.needsUpdate=!0))}}),this._bouncing=l,Object.defineProperty(this,"bouncing",{get(){return this._bouncing},set(u){this._bouncing!==u&&(this._bouncing=u,u?this.ssrMaterial.uniforms.tDiffuse.value=this.prevRenderTarget.texture:this.ssrMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture)}}),this.blur=!0,this._distanceAttenuation=Ae.defines.DISTANCE_ATTENUATION,Object.defineProperty(this,"distanceAttenuation",{get(){return this._distanceAttenuation},set(u){this._distanceAttenuation!==u&&(this._distanceAttenuation=u,this.ssrMaterial.defines.DISTANCE_ATTENUATION=u,this.ssrMaterial.needsUpdate=!0)}}),this._fresnel=Ae.defines.FRESNEL,Object.defineProperty(this,"fresnel",{get(){return this._fresnel},set(u){this._fresnel!==u&&(this._fresnel=u,this.ssrMaterial.defines.FRESNEL=u,this.ssrMaterial.needsUpdate=!0)}}),this._infiniteThick=Ae.defines.INFINITE_THICK,Object.defineProperty(this,"infiniteThick",{get(){return this._infiniteThick},set(u){this._infiniteThick!==u&&(this._infiniteThick=u,this.ssrMaterial.defines.INFINITE_THICK=u,this.ssrMaterial.needsUpdate=!0)}});const c=new n.DepthTexture;c.type=n.UnsignedShortType,c.minFilter=n.NearestFilter,c.magFilter=n.NearestFilter,this.beautyRenderTarget=new n.WebGLRenderTarget(this.width,this.height,{minFilter:n.NearestFilter,magFilter:n.NearestFilter,format:n.RGBAFormat,depthTexture:c,depthBuffer:!0}),this.prevRenderTarget=new n.WebGLRenderTarget(this.width,this.height,{minFilter:n.NearestFilter,magFilter:n.NearestFilter,format:n.RGBAFormat}),this.normalRenderTarget=new n.WebGLRenderTarget(this.width,this.height,{minFilter:n.NearestFilter,magFilter:n.NearestFilter,format:n.RGBAFormat,type:n.HalfFloatType}),this.metalnessRenderTarget=new n.WebGLRenderTarget(this.width,this.height,{minFilter:n.NearestFilter,magFilter:n.NearestFilter,format:n.RGBAFormat}),this.ssrRenderTarget=new n.WebGLRenderTarget(this.width,this.height,{minFilter:n.NearestFilter,magFilter:n.NearestFilter,format:n.RGBAFormat}),this.blurRenderTarget=this.ssrRenderTarget.clone(),this.blurRenderTarget2=this.ssrRenderTarget.clone(),Ae===void 0&&console.error("THREE.SSRPass: The pass relies on SSRShader."),this.ssrMaterial=new n.ShaderMaterial({defines:Object.assign({},Ae.defines,{MAX_STEP:Math.sqrt(this.width*this.width+this.height*this.height)}),uniforms:n.UniformsUtils.clone(Ae.uniforms),vertexShader:Ae.vertexShader,fragmentShader:Ae.fragmentShader,blending:n.NoBlending}),this.ssrMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.ssrMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.ssrMaterial.defines.SELECTIVE=this.selective,this.ssrMaterial.needsUpdate=!0,this.ssrMaterial.uniforms.tMetalness.value=this.metalnessRenderTarget.texture,this.ssrMaterial.uniforms.tDepth.value=this.beautyRenderTarget.depthTexture,this.ssrMaterial.uniforms.cameraNear.value=this.camera.near,this.ssrMaterial.uniforms.cameraFar.value=this.camera.far,this.ssrMaterial.uniforms.thickness.value=this.thickness,this.ssrMaterial.uniforms.resolution.value.set(this.width,this.height),this.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.normalMaterial=new n.MeshNormalMaterial,this.normalMaterial.blending=n.NoBlending,this.metalnessOnMaterial=new n.MeshBasicMaterial({color:"white"}),this.metalnessOffMaterial=new n.MeshBasicMaterial({color:"black"}),this.blurMaterial=new n.ShaderMaterial({defines:Object.assign({},_e.defines),uniforms:n.UniformsUtils.clone(_e.uniforms),vertexShader:_e.vertexShader,fragmentShader:_e.fragmentShader}),this.blurMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.blurMaterial.uniforms.resolution.value.set(this.width,this.height),this.blurMaterial2=new n.ShaderMaterial({defines:Object.assign({},_e.defines),uniforms:n.UniformsUtils.clone(_e.uniforms),vertexShader:_e.vertexShader,fragmentShader:_e.fragmentShader}),this.blurMaterial2.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.blurMaterial2.uniforms.resolution.value.set(this.width,this.height),this.depthRenderMaterial=new n.ShaderMaterial({defines:Object.assign({},He.defines),uniforms:n.UniformsUtils.clone(He.uniforms),vertexShader:He.vertexShader,fragmentShader:He.fragmentShader,blending:n.NoBlending}),this.depthRenderMaterial.uniforms.tDepth.value=this.beautyRenderTarget.depthTexture,this.depthRenderMaterial.uniforms.cameraNear.value=this.camera.near,this.depthRenderMaterial.uniforms.cameraFar.value=this.camera.far,this.copyMaterial=new n.ShaderMaterial({uniforms:n.UniformsUtils.clone(ge.uniforms),vertexShader:ge.vertexShader,fragmentShader:ge.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blendSrc:n.SrcAlphaFactor,blendDst:n.OneMinusSrcAlphaFactor,blendEquation:n.AddEquation,blendSrcAlpha:n.SrcAlphaFactor,blendDstAlpha:n.OneMinusSrcAlphaFactor,blendEquationAlpha:n.AddEquation}),this.fsQuad=new Ue(null),this.originalClearColor=new n.Color}dispose(){this.beautyRenderTarget.dispose(),this.prevRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.metalnessRenderTarget.dispose(),this.ssrRenderTarget.dispose(),this.blurRenderTarget.dispose(),this.blurRenderTarget2.dispose(),this.normalMaterial.dispose(),this.metalnessOnMaterial.dispose(),this.metalnessOffMaterial.dispose(),this.blurMaterial.dispose(),this.blurMaterial2.dispose(),this.copyMaterial.dispose(),this.depthRenderMaterial.dispose(),this.fsQuad.dispose()}render(t,i){switch(t.setRenderTarget(this.beautyRenderTarget),t.clear(),this.groundReflector&&(this.groundReflector.visible=!1,this.groundReflector.doRender(this.renderer,this.scene,this.camera),this.groundReflector.visible=!0),t.render(this.scene,this.camera),this.groundReflector&&(this.groundReflector.visible=!1),this.renderOverride(t,this.normalMaterial,this.normalRenderTarget,0,0),this.selective&&this.renderMetalness(t,this.metalnessOnMaterial,this.metalnessRenderTarget,0,0),this.ssrMaterial.uniforms.opacity.value=this.opacity,this.ssrMaterial.uniforms.maxDistance.value=this.maxDistance,this.ssrMaterial.uniforms.thickness.value=this.thickness,this.renderPass(t,this.ssrMaterial,this.ssrRenderTarget),this.blur&&(this.renderPass(t,this.blurMaterial,this.blurRenderTarget),this.renderPass(t,this.blurMaterial2,this.blurRenderTarget2)),this.output){case Me.OUTPUT.Default:this.bouncing?(this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.prevRenderTarget),this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=n.NormalBlending,this.renderPass(t,this.copyMaterial,this.prevRenderTarget),this.copyMaterial.uniforms.tDiffuse.value=this.prevRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i)):(this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i),this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=n.NormalBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i));break;case Me.OUTPUT.SSR:this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i),this.bouncing&&(this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.prevRenderTarget),this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=n.NormalBlending,this.renderPass(t,this.copyMaterial,this.prevRenderTarget));break;case Me.OUTPUT.Beauty:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i);break;case Me.OUTPUT.Depth:this.renderPass(t,this.depthRenderMaterial,this.renderToScreen?null:i);break;case Me.OUTPUT.Normal:this.copyMaterial.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i);break;case Me.OUTPUT.Metalness:this.copyMaterial.uniforms.tDiffuse.value=this.metalnessRenderTarget.texture,this.copyMaterial.blending=n.NoBlending,this.renderPass(t,this.copyMaterial,this.renderToScreen?null:i);break;default:console.warn("THREE.SSRPass: Unknown output type.")}}renderPass(t,i,e,a,r){this.originalClearColor.copy(t.getClearColor(this.tempColor));const s=t.getClearAlpha(this.tempColor),l=t.autoClear;t.setRenderTarget(e),t.autoClear=!1,a!=null&&(t.setClearColor(a),t.setClearAlpha(r||0),t.clear()),this.fsQuad.material=i,this.fsQuad.render(t),t.autoClear=l,t.setClearColor(this.originalClearColor),t.setClearAlpha(s)}renderOverride(t,i,e,a,r){this.originalClearColor.copy(t.getClearColor(this.tempColor));const s=t.getClearAlpha(this.tempColor),l=t.autoClear;t.setRenderTarget(e),t.autoClear=!1,a=i.clearColor||a,r=i.clearAlpha||r,a!=null&&(t.setClearColor(a),t.setClearAlpha(r||0),t.clear()),this.scene.overrideMaterial=i,t.render(this.scene,this.camera),this.scene.overrideMaterial=null,t.autoClear=l,t.setClearColor(this.originalClearColor),t.setClearAlpha(s)}renderMetalness(t,i,e,a,r){this.originalClearColor.copy(t.getClearColor(this.tempColor));const s=t.getClearAlpha(this.tempColor),l=t.autoClear;t.setRenderTarget(e),t.autoClear=!1,a=i.clearColor||a,r=i.clearAlpha||r,a!=null&&(t.setClearColor(a),t.setClearAlpha(r||0),t.clear()),this.scene.traverseVisible(o=>{o._SSRPassBackupMaterial=o.material,this._selects.includes(o)?o.material=this.metalnessOnMaterial:o.material=this.metalnessOffMaterial}),t.render(this.scene,this.camera),this.scene.traverseVisible(o=>{o.material=o._SSRPassBackupMaterial}),t.autoClear=l,t.setClearColor(this.originalClearColor),t.setClearAlpha(s)}setSize(t,i){this.width=t,this.height=i,this.ssrMaterial.defines.MAX_STEP=Math.sqrt(t*t+i*i),this.ssrMaterial.needsUpdate=!0,this.beautyRenderTarget.setSize(t,i),this.prevRenderTarget.setSize(t,i),this.ssrRenderTarget.setSize(t,i),this.normalRenderTarget.setSize(t,i),this.metalnessRenderTarget.setSize(t,i),this.blurRenderTarget.setSize(t,i),this.blurRenderTarget2.setSize(t,i),this.ssrMaterial.uniforms.resolution.value.set(t,i),this.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.blurMaterial.uniforms.resolution.value.set(t,i),this.blurMaterial2.uniforms.resolution.value.set(t,i)}}Me.OUTPUT={Default:0,SSR:1,Beauty:3,Depth:4,Normal:5,Metalness:7};class ye extends n.Mesh{constructor(t,i={}){super(t),this.type="ReflectorForSSRPass";const e=this,a=i.color!==void 0?new n.Color(i.color):new n.Color(8355711),r=i.textureWidth||512,s=i.textureHeight||512,l=i.clipBias||0,o=i.shader||ye.ReflectorShader,c=i.useDepthTexture===!0,u=new n.Vector3(0,1,0),m=new n.Vector3,P=new n.Vector3;e.needsUpdate=!1,e.maxDistance=ye.ReflectorShader.uniforms.maxDistance.value,e.opacity=ye.ReflectorShader.uniforms.opacity.value,e.color=a,e.resolution=i.resolution||new n.Vector2(window.innerWidth,window.innerHeight),e._distanceAttenuation=ye.ReflectorShader.defines.DISTANCE_ATTENUATION,Object.defineProperty(e,"distanceAttenuation",{get(){return e._distanceAttenuation},set(W){e._distanceAttenuation!==W&&(e._distanceAttenuation=W,e.material.defines.DISTANCE_ATTENUATION=W,e.material.needsUpdate=!0)}}),e._fresnel=ye.ReflectorShader.defines.FRESNEL,Object.defineProperty(e,"fresnel",{get(){return e._fresnel},set(W){e._fresnel!==W&&(e._fresnel=W,e.material.defines.FRESNEL=W,e.material.needsUpdate=!0)}});const A=new n.Vector3,v=new n.Vector3,h=new n.Vector3,y=new n.Matrix4,_=new n.Vector3(0,0,-1),I=new n.Vector3,Q=new n.Vector3,B=new n.Matrix4,L=new n.PerspectiveCamera;let ne;c&&(ne=new n.DepthTexture,ne.type=n.UnsignedShortType,ne.minFilter=n.NearestFilter,ne.magFilter=n.NearestFilter);const Te={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBFormat,depthTexture:c?ne:null},he=new n.WebGLRenderTarget(r,s,Te);(!n.MathUtils.isPowerOfTwo(r)||!n.MathUtils.isPowerOfTwo(s))&&(he.texture.generateMipmaps=!1);const $=new n.ShaderMaterial({transparent:c,defines:Object.assign({},ye.ReflectorShader.defines,{useDepthTexture:c}),uniforms:n.UniformsUtils.clone(o.uniforms),fragmentShader:o.fragmentShader,vertexShader:o.vertexShader});$.uniforms.tDiffuse.value=he.texture,$.uniforms.color.value=e.color,$.uniforms.textureMatrix.value=B,c&&($.uniforms.tDepth.value=he.depthTexture),this.material=$;const Be=[new n.Plane(new n.Vector3(0,1,0),l)];this.doRender=function(W,Se,pe){if($.uniforms.maxDistance.value=e.maxDistance,$.uniforms.color.value=e.color,$.uniforms.opacity.value=e.opacity,m.copy(pe.position).normalize(),P.copy(m).reflect(u),$.uniforms.fresnelCoe.value=(m.dot(P)+1)/2,v.setFromMatrixPosition(e.matrixWorld),h.setFromMatrixPosition(pe.matrixWorld),y.extractRotation(e.matrixWorld),A.set(0,0,1),A.applyMatrix4(y),I.subVectors(v,h),I.dot(A)>0)return;I.reflect(A).negate(),I.add(v),y.extractRotation(pe.matrixWorld),_.set(0,0,-1),_.applyMatrix4(y),_.add(h),Q.subVectors(v,_),Q.reflect(A).negate(),Q.add(v),L.position.copy(I),L.up.set(0,1,0),L.up.applyMatrix4(y),L.up.reflect(A),L.lookAt(Q),L.far=pe.far,L.updateMatrixWorld(),L.projectionMatrix.copy(pe.projectionMatrix),$.uniforms.virtualCameraNear.value=pe.near,$.uniforms.virtualCameraFar.value=pe.far,$.uniforms.virtualCameraMatrixWorld.value=L.matrixWorld,$.uniforms.virtualCameraProjectionMatrix.value=pe.projectionMatrix,$.uniforms.virtualCameraProjectionMatrixInverse.value=pe.projectionMatrixInverse,$.uniforms.resolution.value=e.resolution,B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(L.projectionMatrix),B.multiply(L.matrixWorldInverse),B.multiply(e.matrixWorld),he.texture.encoding=W.outputEncoding;const Ve=W.getRenderTarget(),Ze=W.xr.enabled,lt=W.shadowMap.autoUpdate,qe=W.clippingPlanes;W.xr.enabled=!1,W.shadowMap.autoUpdate=!1,W.clippingPlanes=Be,W.setRenderTarget(he),W.state.buffers.depth.setMask(!0),W.autoClear===!1&&W.clear(),W.render(Se,L),W.xr.enabled=Ze,W.shadowMap.autoUpdate=lt,W.clippingPlanes=qe,W.setRenderTarget(Ve);const Ke=pe.viewport;Ke!==void 0&&W.state.viewport(Ke)},this.getRenderTarget=function(){return he}}}ye.prototype.isReflectorForSSRPass=!0,ye.ReflectorShader={defines:{DISTANCE_ATTENUATION:!0,FRESNEL:!0},uniforms:{color:{value:null},tDiffuse:{value:null},tDepth:{value:null},textureMatrix:{value:new n.Matrix4},maxDistance:{value:180},opacity:{value:.5},fresnelCoe:{value:null},virtualCameraNear:{value:null},virtualCameraFar:{value:null},virtualCameraProjectionMatrix:{value:new n.Matrix4},virtualCameraMatrixWorld:{value:new n.Matrix4},virtualCameraProjectionMatrixInverse:{value:new n.Matrix4},resolution:{value:new n.Vector2}},vertexShader:`
1972
- uniform mat4 textureMatrix;
1973
- varying vec4 vUv;
1974
-
1975
- void main() {
1976
-
1977
- vUv = textureMatrix * vec4( position, 1.0 );
1978
-
1979
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1980
-
1981
- }`,fragmentShader:`
1982
- uniform vec3 color;
1983
- uniform sampler2D tDiffuse;
1984
- uniform sampler2D tDepth;
1985
- uniform float maxDistance;
1986
- uniform float opacity;
1987
- uniform float fresnelCoe;
1988
- uniform float virtualCameraNear;
1989
- uniform float virtualCameraFar;
1990
- uniform mat4 virtualCameraProjectionMatrix;
1991
- uniform mat4 virtualCameraProjectionMatrixInverse;
1992
- uniform mat4 virtualCameraMatrixWorld;
1993
- uniform vec2 resolution;
1994
- varying vec4 vUv;
1995
- #include <packing>
1996
- float blendOverlay( float base, float blend ) {
1997
- return( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );
1998
- }
1999
- vec3 blendOverlay( vec3 base, vec3 blend ) {
2000
- return vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );
2001
- }
2002
- float getDepth( const in vec2 uv ) {
2003
- return texture2D( tDepth, uv ).x;
2004
- }
2005
- float getViewZ( const in float depth ) {
2006
- return perspectiveDepthToViewZ( depth, virtualCameraNear, virtualCameraFar );
2007
- }
2008
- vec3 getViewPosition( const in vec2 uv, const in float depth/*clip space*/, const in float clipW ) {
2009
- vec4 clipPosition = vec4( ( vec3( uv, depth ) - 0.5 ) * 2.0, 1.0 );//ndc
2010
- clipPosition *= clipW; //clip
2011
- return ( virtualCameraProjectionMatrixInverse * clipPosition ).xyz;//view
2012
- }
2013
- void main() {
2014
- vec4 base = texture2DProj( tDiffuse, vUv );
2015
- #ifdef useDepthTexture
2016
- vec2 uv=(gl_FragCoord.xy-.5)/resolution.xy;
2017
- uv.x=1.-uv.x;
2018
- float depth = texture2DProj( tDepth, vUv ).r;
2019
- float viewZ = getViewZ( depth );
2020
- float clipW = virtualCameraProjectionMatrix[2][3] * viewZ+virtualCameraProjectionMatrix[3][3];
2021
- vec3 viewPosition=getViewPosition( uv, depth, clipW );
2022
- vec3 worldPosition=(virtualCameraMatrixWorld*vec4(viewPosition,1)).xyz;
2023
- if(worldPosition.y>maxDistance) discard;
2024
- float op=opacity;
2025
- #ifdef DISTANCE_ATTENUATION
2026
- float ratio=1.-(worldPosition.y/maxDistance);
2027
- float attenuation=ratio*ratio;
2028
- op=opacity*attenuation;
2029
- #endif
2030
- #ifdef FRESNEL
2031
- op*=fresnelCoe;
2032
- #endif
2033
- gl_FragColor = vec4( blendOverlay( base.rgb, color ), op );
2034
- #else
2035
- gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );
2036
- #endif
2037
- }
2038
- `};var pa={maxDistance:10,selects:!0},ma={width:1,height:1,clipBias:3e-4,color:8947848,useDepthTexture:!0},va=function(){"use strict";function f(i,e){R(this,f),this.selectedObjects=[],this.active=!0,this.composerController=i,this.options=e;var a=i.scene,r=i.camera,s=i.renderer,l=i.finalComposer,o=i.getSize(),c=o.width,u=o.height,m=new Me({renderer:s,scene:a,camera:r,width:c,height:u,groundReflector:null,selects:this.selectedObjects});this.ssrPass=m,l.addPass(m),this.setGui()}var t=f.prototype;return t.addGroundReflector=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=(0,G.Z)({},ma,e),r=a.width,s=a.height,l=ha(a,["width","height"]),o=this.composerController,c=o.scene,u=o.getSize(),m=new n.PlaneGeometry(r,s),P=new ye(m,X((0,G.Z)({},l),{textureWidth:u.width,textureHeight:u.height}));P.material.depthWrite=!1,P.rotation.x=-Math.PI/2,P.visible=!1,c.add(P),this.ssrPass.groundReflector=this.groundReflector,this.groundReflector=P},t.removeaGroundReflector=function(){this.ssrPass.groundReflector=null,this.groundReflector=void 0},t.enable=function(){this.active||(this.ssrPass.enabled=!0,this.active=!0)},t.disable=function(){!this.active||(this.ssrPass.enabled=!1,this.active=!1)},t.setSize=function(e,a){var r=this.groundReflector;r&&(r.getRenderTarget().setSize(e,a),r.resolution.set(e,a))},t.setGui=function(){var e=this,a=new p;a.guiParams={ssr:{thickness:{value:.018,min:0,max:.1,step:1e-4,target:function(){return e.ssrPass}},infiniteThick:{value:!1,target:function(){return e.ssrPass}},fresnel:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},distanceAttenuation:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},selects:{value:this.options.selects,onChange:function(r){r?e.ssrPass.selects=e.selectedObjects:e.ssrPass.selects=null}},maxDistance:{value:this.options.maxDistance,min:0,max:100,step:.001,target:function(){return[e.ssrPass,e.groundReflector]}},opacity:{value:1,min:0,max:1,step:.01,target:function(){return[e.ssrPass,e.groundReflector]}}}},a.setGuiTargetValueByParams(),this.ssrGui=a},t.dispose=function(){this.ssrPass.dispose(),this.selectedObjects=[]},f}(),xa=function(){"use strict";function f(i){R(this,f),this.active=!0,this.options=i;var e=i.renderer,a=i.scene,r=i.camera,s=this.createRenderTarget(),l=new xt(e,s);l.setPixelRatio(e.getPixelRatio()),this.finalComposer=l,this.addRenderPasss(),this.renderer=e,this.scene=a,this.renderTarget=s,this.camera=r}var t=f.prototype;return t.createRenderTarget=function(){var e=this.options.composerParams,a=e.multisampling,r=e.type,s=e.encoding,l=this.getSize(),o={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat,encoding:s,type:r},c;if(+n.REVISION<138&&a>0){var u=new n.WebGLMultisampleRenderTarget(l.width,l.height,o);u.samples=a,c=u}else if(+n.REVISION>=138&&a>0){var m=new n.WebGLRenderTarget(l.width,l.height,X((0,G.Z)({},o),{samples:a}));c=m}else{var P=new n.WebGLRenderTarget(l.width,l.height,o);c=P}return c.texture.name="EffectComposer.rt1",c},t.addRenderPasss=function(){var e=this.options,a=e.scene,r=e.camera,s=new Ht(a,r);this.finalComposer.addPass(s),this.renderPass=s},t.addCopyPass=function(){var e=new Ie(ge);this.finalComposer.addPass(e),this.copyPass=e},t.addGammaCorrectionPass=function(){var e=new Ie(kt);this.finalComposer.addPass(e),this.gammaCorrectionPass=e},t.addFXAAPass=function(){var e=this.getSize(),a=e.width,r=e.height,s=new Ie(Kt);this.finalComposer.addPass(s),this.fxaaPass=s,this.setFXAAPassSize(a,r)},t.addSMAAPass=function(){var e=this.getSize(),a=e.width,r=e.height,s=this.options.renderer,l=new Vt(a*s.getPixelRatio(),r*s.getPixelRatio());this.finalComposer.addPass(l),this.smaaPass=l},t.addSSAAPass=function(){var e=this.options,a=e.scene,r=e.camera,s=new Zt(a,r,0,0);s.unbiased=!0,s.sampleLevel=1,this.finalComposer.addPass(s),this.ssaaPass=s},t.addBloomPass=function(e){var a=new ua(this,e);a.disable(),this.options.gui&&a.setGui(this.options.gui),this.bloomController=a},t.addOutlinePass=function(e){var a=new da(this,e);a.disable(),this.options.gui&&a.outlineGui.showGuiParams(this.options.gui),this.outlineController=a},t.addSSRPass=function(e){var a=new va(this,e);a.disable(),this.options.gui&&a.ssrGui.showGuiParams(this.options.gui),this.ssrController=a},t.getSize=function(){var e=this.options.renderer;return e.getSize(new n.Vector2)},t.enable=function(){this.active||(this.active=!0)},t.disable=function(){!this.active||(this.active=!1)},t.checkCopyPass=function(){var e=this,a=this.finalComposer.passes.some(function(r){return r!==e.renderPass&&r!==e.copyPass?r.enabled:!1});a&&this.copyPass?this.copyPass.enabled=!1:!a&&this.copyPass?this.copyPass.enabled=!0:!a&&!this.copyPass&&this.addCopyPass()},t.setSize=function(e,a){var r,s;this.finalComposer.setSize(e,a),(r=this.bloomController)===null||r===void 0||r.setSize(e,a),(s=this.ssrController)===null||s===void 0||s.setSize(e,a),this.setFXAAPassSize(e,a)},t.setFXAAPassSize=function(e,a){if(!!this.fxaaPass){var r=this.options.renderer,s=r.getPixelRatio();this.fxaaPass.material.uniforms.resolution.value.x=1/(e*s),this.fxaaPass.material.uniforms.resolution.value.y=1/(a*s)}},t.render=function(){var e;if(!!this.active){var a=this.options.scene;(e=this.bloomController)===null||e===void 0||e.render(a),this.finalComposer.render()}},t.dispose=function(){var e,a,r,s,l;(e=this.bloomController)===null||e===void 0||e.dispose(),(a=this.outlineController)===null||a===void 0||a.dispose(),(r=this.ssrController)===null||r===void 0||r.dispose(),(s=this.finalComposer)===null||s===void 0||s.passes.forEach(function(o){var c,u,m;(c=o.fsQuad)===null||c===void 0||c.dispose(),(u=o.fsQuad)===null||u===void 0||(m=u.material)===null||m===void 0||m.dispose()}),(l=this.renderTarget)===null||l===void 0||l.dispose(),this.renderer=void 0,this.scene=void 0,this.camera=void 0,this.finalComposer=void 0,this.renderTarget=void 0,this.renderPass=void 0,this.copyPass=void 0,this.gammaCorrectionPass=void 0,this.smaaPass=void 0,this.ssaaPass=void 0,this.fxaaPass=void 0,this.bloomController=void 0,this.outlineController=void 0,this.ssrController=void 0},f}(),ot=function(){"use strict";function f(i){R(this,f),this.raycaster=new n.Raycaster,this.installPlugins=new Map,this.event=new ve.EventEmitter,this.clock=new n.Clock,this.options=q()(f.options,i,{isMergeableObject:k.isPlainObject});var e=this.options,a=e.container,r=e.stats,s=e.gui;if(s){var l=new(g());l.open(!1),this.gui=l}if(r){var o=new Y;o.showPanel(0),o.dom.style.position="absolute",a.appendChild(o.dom),this.stats=o}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),this.clock.getDelta(),this.clock.getElapsedTime()}var t=f.prototype;return t.use=function(e){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var l;(l=e).install.apply(l,[this].concat(te(r))),this.installPlugins.set(e,!0)}},t.init=function(){var e=this,a=this.options,r=a.container,s=a.isdev,l=a.axesHelper,o=a.renderer,c=a.scene,u=a.camera,m=this.getSize(),P=m.width,A=m.height,v=new U({isdev:s,width:P,height:A,cameraParams:u});this.gui&&v.setGui(this.gui);var h=v.camera,y=new Ce({camera:h,sceneParams:c}),_=y.scene,I=new M({width:P,height:A,scene:_,camera:h,isdev:s,rendererParams:X((0,G.Z)({},o),{outputEncoding:n.LinearEncoding,antialias:!1})});this.gui&&I.setGui(this.gui);var Q=I.renderer;l&&y.addAxesHelper(),this.sceneController=y,this.rendererController=I,this.cameraController=v,r.appendChild(Q.domElement);var B=new ResizeObserver(function(L){var ne=!0,Te=!1,he=void 0;try{for(var $=L[Symbol.iterator](),Xe;!(ne=(Xe=$.next()).done);ne=!0){var Be=Xe.value,W=Be.contentRect;e.handeleResize(W.width,W.height)}}catch(Se){Te=!0,he=Se}finally{try{!ne&&$.return!=null&&$.return()}finally{if(Te)throw he}}});B.observe(r),this.resizeObserver=B},t.initComposer=function(){var e=this.options,a=e.bloom,r=e.outline,s=e.ssr,l=e.renderer,o=e.bloomParams,c=e.outlineParams,u=e.ssrParams,m=e.multisampling,P=l.antialias;P==="msaa"&&!gt&&(P=!1,console.warn("MSAA is not supported on this browser"));var A=new xa({renderer:this.renderer,scene:this.scene,camera:this.camera,gui:this.gui,composerParams:{multisampling:P==="msaa"?m:0,type:n.UnsignedByteType,encoding:l.outputEncoding}});this.composerController=A,P==="ssaa"&&A.addSSAAPass(),s&&A.addSSRPass(u),a&&A.addBloomPass(o),r&&A.addOutlinePass(c),l.outputEncoding===n.sRGBEncoding&&A.addGammaCorrectionPass(),P==="fxaa"?A.addFXAAPass():P==="smaa"&&A.addSMAAPass(),A.checkCopyPass(),this.event.on("passcheck",function(){A.checkCopyPass()})},t.initCSSRenderer=function(){var e=this.options,a=e.container,r=e.css2DRenderer,s=e.css3DRenderer,l=e.css2DRendererParams,o=e.css3DRendererParams;if(r||s){var c=new jt(a);r&&c.addRenderer("css2d",l),s&&c.addRenderer("css3d",o),this.cssRendererController=c}},t.initControl=function(){var e=this.options,a=e.control,r=e.mapControl,s=e.controlParams;if(a){var l=new O({camera:this.camera,controlParams:{domElement:(s==null?void 0:s.domElement)||this.renderer.domElement},mapControl:r});this.controlController=l}},t.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},t.handeleResize=function(e,a){var r=this,s=r.rendererController,l=r.cameraController,o=r.composerController,c=r.cssRendererController;l==null||l.setSize(e,a),s==null||s.setSize(e,a),o==null||o.setSize(e,a),c==null||c.setSize(e,a),this.installPlugins.forEach(function(u){var m;(m=u.resize)===null||m===void 0||m.call(u,{width:e,height:a})}),this.event.emit("resize",{width:e,height:a})},t.pick=function(e,a){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=this,l=s.raycaster,o=s.options,c=o.container,u=new n.Vector2,m=c.getBoundingClientRect();if(u.x=(e.clientX-m.left)/(m.right-m.left)*2-1,u.y=-((e.clientY-m.top)/(m.bottom-m.top))*2+1,this.camera&&this.scene){l.setFromCamera(u,this.camera);var P=l.intersectObjects(a||this.scene.children,r);if(P.length)return{object:P[0].object,intersects:P}}},t.render=function(){var e,a,r,s,l=this,o=l.renderer,c=l.scene,u=l.camera,m=l.clock;if(!(!o||!c||!u||this.options.staticRender&&!this.cameraController.checkCameraChange())){var P=m.getDelta(),A=m.getElapsedTime();if(o.clear(),ae().update(),(e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(h){var y;(y=h.update)===null||y===void 0||y.call(h,P,A)}),!((a=this.composerController)===null||a===void 0)&&a.active)this.composerController.render();else{var v;(v=this.rendererController)===null||v===void 0||v.render()}(r=this.cssRendererController)===null||r===void 0||r.render(c,u),(s=this.stats)===null||s===void 0||s.update(),this.event.emit("render",{delta:P,elapsed:A})}},t.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},t.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},t.dispose=function(){var e,a,r,s,l,o,c,u;this.stop(),ae().removeAll(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.resizeObserver=void 0,this.installPlugins.forEach(function(m){var P;(P=m.dispose)===null||P===void 0||P.call(m)}),(a=this.controlController)===null||a===void 0||a.dispose(),(r=this.cssRendererController)===null||r===void 0||r.dispose(),(s=this.cameraController)===null||s===void 0||s.dispose(),(l=this.sceneController)===null||l===void 0||l.dispose(),(o=this.composerController)===null||o===void 0||o.dispose(),(c=this.rendererController)===null||c===void 0||c.dispose(),this.controlController=void 0,this.cssRendererController=void 0,this.cameraController=void 0,this.sceneController=void 0,this.composerController=void 0,this.rendererController=void 0,(u=this.gui)===null||u===void 0||u.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},C(f,[{key:"renderer",get:function(){var e;return(e=this.rendererController)===null||e===void 0?void 0:e.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){var e;return(e=this.cameraController)===null||e===void 0?void 0:e.camera}},{key:"scene",get:function(){var e;return(e=this.sceneController)===null||e===void 0?void 0:e.scene}}]),f}();ot.options={isdev:We,stats:We,gui:We,axesHelper:We,control:!1,renderer:X((0,G.Z)({},w),{antialias:gt?"msaa":"smaa"}),staticRender:!1,multisampling:8,scene:xe,camera:z,bloom:!1,bloomParams:sa,outline:!1,outlineParams:fa,css2DRenderer:!1,ssr:!1,ssrParams:pa,css2DRendererParams:(0,G.Z)({},mt),css3DRenderer:!1,css3DRendererParams:(0,G.Z)({},mt),staticPath:"/"};function ga(){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(f){return!1}}function ke(f,t,i){return ga()?ke=Reflect.construct:ke=function(a,r,s){var l=[null];l.push.apply(l,r);var o=Function.bind.apply(a,l),c=new o;return s&&At(c,s.prototype),c},ke.apply(null,arguments)}function St(f,t,i){return ke.apply(null,arguments)}var Aa=se(484);function Ta(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i={};return i.promise=new Promise(function(e,a){i.resolve=e,i.reject=a}),f&&(i.promise=(0,Aa.Z)(i.promise,t)),i}var Pa=function(f){"use strict";Tt(i,f);var t=bt(i);function i(a){R(this,i);var r;return r=t.call(this),r.objecttype__="BaseObject",r.isAdd=!1,r.userData={},r.pm=Ta(),r.visible=!1,r}var e=i.prototype;return e.init=function(){},e.create=function(){},e.render=function(){},e.update=function(r,s){},e.resize=function(r,s){},e.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},e.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},e.isVisible=function(){return this.visible},e.createMesh=function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];return this.object3d=St(n.Mesh,te(s)),this},e.createGroup=function(){return this.object3d=new n.Group,this},e.createPoints=function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];return this.object3d=St(n.Points,te(s)),this},e.createCSS2DObject=function(r){return this.object3d=new E(r),this},e.createCSS3DObject=function(r){return this.object3d=new et(r),this},e.createCSS3DSprite=function(r){return this.object3d=new pt(r),this},e.add=function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];var o;return(o=this.object3d).add.apply(o,te(s)),this},e.remove=function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];var o;return(o=this.object3d).remove.apply(o,te(s)),this},e.getSize=function(){var r=new n.Box3().setFromObject(this.object3d);return{min:r.min,max:r.max,size:r.getSize(new n.Vector3)}},e.traverse=function(r){r(this),this.children.forEach(function(s){s.traverse(r)})},e.dispose=function(){var r;(r=this.object3d)===null||r===void 0||r.traverse(function(s){(0,k.disposeMesh)(s)})},C(i,[{key:"parent",get:function(){var r=this.object3d.parent;return(r==null?void 0:r.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(r){return r.userData.BaseObject_}).filter(function(r){return!!r})}}]),i}(p)})(),module.exports=$e})();
57
+ }`})},n}(Le.Pass);Se.BlurDirectionX=new v.Vector2(1,0),Se.BlurDirectionY=new v.Vector2(0,1);var We={threshold:.2,strength:.5,radius:0},Xe=new v.MeshBasicMaterial({color:"black"}),qe=new v.SpriteMaterial({color:"#000"}),Qe=function(){"use strict";function u(n,e){O(this,u),this.materials={},this.bloomLayer=new v.Layers,this.active=!0,this.composerController=n,this.options=e;var r=n.renderer,t=n.renderPass,s=n.finalComposer,o=n.getSize(),i=o.width,d=o.height,P=new Se(new v.Vector2(i,d),e.strength,e.radius,e.threshold);this.bloomPass=P;var y=new S.EffectComposer(r);y.renderToScreen=!1,y.addPass(t),y.addPass(this.bloomPass),this.bloomComposer=y,this.bloomLayer.set(Ue);var _=new v.ShaderMaterial({uniforms:{baseTexture:{value:null},bloomTexture:{value:y.renderTarget2.texture}},vertexShader:ke,fragmentShader:Ve,defines:{}}),M=new Q.ShaderPass(_,"baseTexture");M.needsSwap=!0,this.finalPass=M,s.addPass(M)}var a=u.prototype;return a.enable=function(){this.active||(this.finalPass.enabled=!0,this.bloomPass.enabled=!0,this.active=!0)},a.disable=function(){!this.active||(this.finalPass.enabled=!1,this.bloomPass.enabled=!1,this.active=!1)},a.render=function(e){if(!!this.active){var r=this,t=r.bloomComposer,s=r.bloomLayer,o=r.materials;e.traverse(function(i){var d=i;d.material&&s.test(d.layers)===!1&&(o[d.uuid]=d.material,d.material=d.isSprite?qe:Xe)}),t.render(),e.traverse(function(i){var d=i;o[d.uuid]&&(d.material=o[d.uuid],delete o[d.uuid])})}},a.setSize=function(e,r){this.bloomComposer.setSize(e,r)},a.setGui=function(e){var r=this,t=new l;t.guiParams={bloom:{threshold:{value:this.options.threshold,min:0,max:1,target:function(){return r.bloomPass}},strength:{value:this.options.strength,min:0,max:10,target:function(){return r.bloomPass}},radius:{value:this.options.radius,min:0,max:2,step:.01,target:function(){return r.bloomPass}}}},t.showGuiParams(e)},a.dispose=function(){this.bloomPass.dispose(),this.materials={}},u}(),Ye=require("three/examples/jsm/postprocessing/OutlinePass"),Ke={edgeStrength:3,edgeGlow:4,edgeThickness:1,pulsePeriod:0,rotate:!1,usePatternTexture:!1,visibleEdgeColor:"#5ee8e8",hiddenEdgeColor:"#190a05"},$e=function(){"use strict";function u(n,e){O(this,u),this.selectedObjects=[],this.active=!0,this.composerController=n,this.options=e;var r=n.scene,t=n.camera,s=n.finalComposer,o=n.getSize(),i=o.width,d=o.height,P=new Ye.OutlinePass(new v.Vector2(i,d),r,t);P.selectedObjects=this.selectedObjects,this.outlinePass=P,s.addPass(P),this.setGui()}var a=u.prototype;return a.enable=function(){this.active||(this.outlinePass.enabled=!0,this.active=!0)},a.disable=function(){!this.active||(this.outlinePass.enabled=!1,this.active=!1)},a.setGui=function(){var e=this,r=new l;r.guiParams={outline:{edgeStrength:{value:this.options.edgeStrength,min:.01,max:10,step:.01,target:function(){return e.outlinePass}},edgeGlow:{value:this.options.edgeGlow,min:0,max:10,step:.01,target:function(){return e.outlinePass}},edgeThickness:{value:this.options.edgeThickness,min:0,max:4,step:.01,target:function(){return e.outlinePass}},pulsePeriod:{value:this.options.pulsePeriod,min:0,max:4,step:.01,target:function(){return e.outlinePass}},usePatternTexture:{value:this.options.usePatternTexture,target:function(){return e.outlinePass}},visibleEdgeColor:{value:this.options.visibleEdgeColor,target:function(){return e.outlinePass}},hiddenEdgeColor:{value:this.options.hiddenEdgeColor,target:function(){return e.outlinePass}}}},r.setGuiTargetValueByParams(),this.outlineGui=r},a.dispose=function(){this.outlinePass.dispose(),this.selectedObjects=[]},u}();function Je(u,a){if(u==null)return{};var n={},e=Object.keys(u),r,t;for(t=0;t<e.length;t++)r=e[t],!(a.indexOf(r)>=0)&&(n[r]=u[r]);return n}function et(u,a){if(u==null)return{};var n=Je(u,a),e,r;if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(u);for(r=0;r<t.length;r++)e=t[r],!(a.indexOf(e)>=0)&&(!Object.prototype.propertyIsEnumerable.call(u,e)||(n[e]=u[e]))}return n}var tt=require("three/examples/jsm/postprocessing/SSRPass"),rt=require("three/examples/jsm/objects/ReflectorForSSRPass"),nt={maxDistance:10,selects:!0},it={width:1,height:1,clipBias:3e-4,color:8947848,useDepthTexture:!0},st=function(){"use strict";function u(n,e){O(this,u),this.selectedObjects=[],this.active=!0,this.composerController=n,this.options=e;var r=n.scene,t=n.camera,s=n.renderer,o=n.finalComposer,i=n.getSize(),d=i.width,P=i.height,y=new tt.SSRPass({renderer:s,scene:r,camera:t,width:d,height:P,groundReflector:null,selects:this.selectedObjects});this.ssrPass=y,o.addPass(y),this.setGui()}var a=u.prototype;return a.addGroundReflector=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(0,G.Z)({},it,e),t=r.width,s=r.height,o=et(r,["width","height"]),i=this.composerController,d=i.scene,P=i.getSize(),y=new v.PlaneGeometry(t,s),_=new rt.ReflectorForSSRPass(y,j((0,G.Z)({},o),{textureWidth:P.width,textureHeight:P.height}));_.material.depthWrite=!1,_.rotation.x=-Math.PI/2,_.visible=!1,d.add(_),this.ssrPass.groundReflector=this.groundReflector,this.groundReflector=_},a.removeaGroundReflector=function(){this.ssrPass.groundReflector=null,this.groundReflector=void 0},a.enable=function(){this.active||(this.ssrPass.enabled=!0,this.active=!0)},a.disable=function(){!this.active||(this.ssrPass.enabled=!1,this.active=!1)},a.setSize=function(e,r){var t=this.groundReflector;t&&(t.getRenderTarget().setSize(e,r),t.resolution.set(e,r))},a.setGui=function(){var e=this,r=new l;r.guiParams={ssr:{thickness:{value:.018,min:0,max:.1,step:1e-4,target:function(){return e.ssrPass}},infiniteThick:{value:!1,target:function(){return e.ssrPass}},fresnel:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},distanceAttenuation:{value:!0,target:function(){return[e.ssrPass,e.groundReflector]}},selects:{value:this.options.selects,onChange:function(t){t?e.ssrPass.selects=e.selectedObjects:e.ssrPass.selects=null}},maxDistance:{value:this.options.maxDistance,min:0,max:100,step:.001,target:function(){return[e.ssrPass,e.groundReflector]}},opacity:{value:1,min:0,max:1,step:.01,target:function(){return[e.ssrPass,e.groundReflector]}}}},r.setGuiTargetValueByParams(),this.ssrGui=r},a.dispose=function(){this.ssrPass.dispose(),this.selectedObjects=[]},u}(),at=function(){"use strict";function u(n){O(this,u),this.active=!0,this.options=n;var e=n.renderer,r=n.scene,t=n.camera,s=this.createRenderTarget(),o=new S.EffectComposer(e,s);o.setPixelRatio(e.getPixelRatio()),this.finalComposer=o,this.addRenderPasss(),this.renderer=e,this.scene=r,this.renderTarget=s,this.camera=t}var a=u.prototype;return a.createRenderTarget=function(){var e=this.options.composerParams,r=e.multisampling,t=e.type,s=e.encoding,o=this.getSize(),i={minFilter:v.LinearFilter,magFilter:v.LinearFilter,format:v.RGBAFormat,encoding:s,type:t},d;if(+v.REVISION<138&&r>0){var P=new v.WebGLMultisampleRenderTarget(o.width,o.height,i);P.samples=r,d=P}else if(+v.REVISION>=138&&r>0){var y=new v.WebGLRenderTarget(o.width,o.height,j((0,G.Z)({},i),{samples:r}));d=y}else{var _=new v.WebGLRenderTarget(o.width,o.height,i);d=_}return d.texture.name="EffectComposer.rt1",d},a.addRenderPasss=function(){var e=this.options,r=e.scene,t=e.camera,s=new H.RenderPass(r,t);this.finalComposer.addPass(s),this.renderPass=s},a.addCopyPass=function(){var e=new Q.ShaderPass(K.CopyShader);this.finalComposer.addPass(e),this.copyPass=e},a.addGammaCorrectionPass=function(){var e=new Q.ShaderPass(te.GammaCorrectionShader);this.finalComposer.addPass(e),this.gammaCorrectionPass=e},a.addFXAAPass=function(){var e=this.getSize(),r=e.width,t=e.height,s=new Q.ShaderPass(de.FXAAShader);this.finalComposer.addPass(s),this.fxaaPass=s,this.setFXAAPassSize(r,t)},a.addSMAAPass=function(){var e=this.getSize(),r=e.width,t=e.height,s=this.options.renderer,o=new ee.SMAAPass(r*s.getPixelRatio(),t*s.getPixelRatio());this.finalComposer.addPass(o),this.smaaPass=o},a.addSSAAPass=function(){var e=this.options,r=e.scene,t=e.camera,s=new ve.SSAARenderPass(r,t,0,0);s.unbiased=!0,s.sampleLevel=1,this.finalComposer.addPass(s),this.ssaaPass=s},a.addBloomPass=function(e){var r=new Qe(this,e);r.disable(),this.options.gui&&r.setGui(this.options.gui),this.bloomController=r},a.addOutlinePass=function(e){var r=new $e(this,e);r.disable(),this.options.gui&&r.outlineGui.showGuiParams(this.options.gui),this.outlineController=r},a.addSSRPass=function(e){var r=new st(this,e);r.disable(),this.options.gui&&r.ssrGui.showGuiParams(this.options.gui),this.ssrController=r},a.getSize=function(){var e=this.options.renderer;return e.getSize(new v.Vector2)},a.enable=function(){this.active||(this.active=!0)},a.disable=function(){!this.active||(this.active=!1)},a.checkCopyPass=function(){var e=this,r=this.finalComposer.passes.some(function(t){return t!==e.renderPass&&t!==e.copyPass?t.enabled:!1});r&&this.copyPass?this.copyPass.enabled=!1:!r&&this.copyPass?this.copyPass.enabled=!0:!r&&!this.copyPass&&this.addCopyPass()},a.setSize=function(e,r){var t,s;this.finalComposer.setSize(e,r),(t=this.bloomController)===null||t===void 0||t.setSize(e,r),(s=this.ssrController)===null||s===void 0||s.setSize(e,r),this.setFXAAPassSize(e,r)},a.setFXAAPassSize=function(e,r){if(!!this.fxaaPass){var t=this.options.renderer,s=t.getPixelRatio();this.fxaaPass.material.uniforms.resolution.value.x=1/(e*s),this.fxaaPass.material.uniforms.resolution.value.y=1/(r*s)}},a.render=function(){var e;if(!!this.active){var r=this.options.scene;(e=this.bloomController)===null||e===void 0||e.render(r),this.finalComposer.render()}},a.dispose=function(){var e,r,t,s,o;(e=this.bloomController)===null||e===void 0||e.dispose(),(r=this.outlineController)===null||r===void 0||r.dispose(),(t=this.ssrController)===null||t===void 0||t.dispose(),(s=this.finalComposer)===null||s===void 0||s.passes.forEach(function(i){var d,P,y;(d=i.fsQuad)===null||d===void 0||d.dispose(),(P=i.fsQuad)===null||P===void 0||(y=P.material)===null||y===void 0||y.dispose()}),(o=this.renderTarget)===null||o===void 0||o.dispose(),this.renderer=void 0,this.scene=void 0,this.camera=void 0,this.finalComposer=void 0,this.renderTarget=void 0,this.renderPass=void 0,this.copyPass=void 0,this.gammaCorrectionPass=void 0,this.smaaPass=void 0,this.ssaaPass=void 0,this.fxaaPass=void 0,this.bloomController=void 0,this.outlineController=void 0,this.ssrController=void 0},u}(),Ce=function(){"use strict";function u(n){O(this,u),this.raycaster=new v.Raycaster,this.installPlugins=new Map,this.event=new ne.EventEmitter,this.clock=new v.Clock,this.options=F()(u.options,n,{isMergeableObject:z.isPlainObject});var e=this.options,r=e.container,t=e.stats,s=e.gui;if(s){var o=new(f());o.open(!1),this.gui=o}if(t){var i=new(L());i.showPanel(0),i.dom.style.position="absolute",r.appendChild(i.dom),this.stats=i}this.init(),this.initComposer(),this.initCSSRenderer(),this.initControl(),this.clock.getDelta(),this.clock.getElapsedTime()}var a=u.prototype;return a.use=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),s=1;s<r;s++)t[s-1]=arguments[s];if(this.installPlugins.has(e))console.log("plugin already installed");else if(typeof e.install=="function"){var o;(o=e).install.apply(o,[this].concat(I(t))),this.installPlugins.set(e,!0)}},a.init=function(){var e=this,r=this.options,t=r.container,s=r.isdev,o=r.axesHelper,i=r.renderer,d=r.scene,P=r.camera,y=this.getSize(),_=y.width,M=y.height,Z=new T({isdev:s,width:_,height:M,cameraParams:P});this.gui&&Z.setGui(this.gui);var W=Z.camera,J=new le({camera:W,sceneParams:d}),se=J.scene,ae=new w({width:_,height:M,scene:se,camera:W,isdev:s,rendererParams:j((0,G.Z)({},i),{outputEncoding:v.LinearEncoding,antialias:!1})});this.gui&&ae.setGui(this.gui);var ue=ae.renderer;o&&J.addAxesHelper(),this.sceneController=J,this.rendererController=ae,this.cameraController=Z,t.appendChild(ue.domElement);var Y=new ResizeObserver(function(pe){var fe=!0,he=!1,De=void 0;try{for(var xe=pe[Symbol.iterator](),ze;!(fe=(ze=xe.next()).done);fe=!0){var ft=ze.value,Be=ft.contentRect;e.handeleResize(Be.width,Be.height)}}catch(dt){he=!0,De=dt}finally{try{!fe&&xe.return!=null&&xe.return()}finally{if(he)throw De}}});Y.observe(t),this.resizeObserver=Y},a.initComposer=function(){var e=this.options,r=e.bloom,t=e.outline,s=e.ssr,o=e.renderer,i=e.bloomParams,d=e.outlineParams,P=e.ssrParams,y=e.multisampling,_=o.antialias;_==="msaa"&&!Re&&(_=!1,console.warn("MSAA is not supported on this browser"));var M=new at({renderer:this.renderer,scene:this.scene,camera:this.camera,gui:this.gui,composerParams:{multisampling:_==="msaa"?y:0,type:v.UnsignedByteType,encoding:o.outputEncoding}});this.composerController=M,_==="ssaa"&&M.addSSAAPass(),s&&M.addSSRPass(P),r&&M.addBloomPass(i),t&&M.addOutlinePass(d),o.outputEncoding===v.sRGBEncoding&&M.addGammaCorrectionPass(),_==="fxaa"?M.addFXAAPass():_==="smaa"&&M.addSMAAPass(),M.checkCopyPass(),this.event.on("passcheck",function(){M.checkCopyPass()})},a.initCSSRenderer=function(){var e=this.options,r=e.container,t=e.css2DRenderer,s=e.css3DRenderer,o=e.css2DRendererParams,i=e.css3DRendererParams;if(t||s){var d=new x(r);t&&d.addRenderer("css2d",o),s&&d.addRenderer("css3d",i),this.cssRendererController=d}},a.initControl=function(){var e=this.options,r=e.control,t=e.mapControl,s=e.controlParams;if(r){var o=new ge({camera:this.camera,controlParams:{domElement:(s==null?void 0:s.domElement)||this.renderer.domElement},mapControl:t});this.controlController=o}},a.getSize=function(){var e=this.options.container;return{width:e.offsetWidth,height:e.offsetHeight}},a.handeleResize=function(e,r){var t=this,s=t.rendererController,o=t.cameraController,i=t.composerController,d=t.cssRendererController;o==null||o.setSize(e,r),s==null||s.setSize(e,r),i==null||i.setSize(e,r),d==null||d.setSize(e,r),this.installPlugins.forEach(function(P){var y;(y=P.resize)===null||y===void 0||y.call(P,{width:e,height:r})}),this.event.emit("resize",{width:e,height:r})},a.pick=function(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=this,o=s.raycaster,i=s.options,d=i.container,P=new v.Vector2,y=d.getBoundingClientRect();if(P.x=(e.clientX-y.left)/(y.right-y.left)*2-1,P.y=-((e.clientY-y.top)/(y.bottom-y.top))*2+1,this.camera&&this.scene){o.setFromCamera(P,this.camera);var _=o.intersectObjects(r||this.scene.children,t);if(_.length)return{object:_[0].object,intersects:_}}},a.render=function(){var e,r,t,s,o=this,i=o.renderer,d=o.scene,P=o.camera,y=o.clock;if(!(!i||!d||!P||this.options.staticRender&&!this.cameraController.checkCameraChange())){var _=y.getDelta(),M=y.getElapsedTime();if(i.clear(),N().update(),(e=this.controlController)===null||e===void 0||e.update(),this.installPlugins.forEach(function(W){var J;(J=W.update)===null||J===void 0||J.call(W,_,M)}),!((r=this.composerController)===null||r===void 0)&&r.active)this.composerController.render();else{var Z;(Z=this.rendererController)===null||Z===void 0||Z.render()}(t=this.cssRendererController)===null||t===void 0||t.render(d,P),(s=this.stats)===null||s===void 0||s.update(),this.event.emit("render",{delta:_,elapsed:M})}},a.start=function(){this.renderer.setAnimationLoop(this.render.bind(this)),this.event.emit("start")},a.stop=function(){this.renderer.setAnimationLoop(null),this.event.emit("stop")},a.dispose=function(){var e,r,t,s,o,i,d,P;this.stop(),N().removeAll(),this.handeleResize(0,0),(e=this.resizeObserver)===null||e===void 0||e.unobserve(this.options.container),this.resizeObserver=void 0,this.installPlugins.forEach(function(y){var _;(_=y.dispose)===null||_===void 0||_.call(y)}),(r=this.controlController)===null||r===void 0||r.dispose(),(t=this.cssRendererController)===null||t===void 0||t.dispose(),(s=this.cameraController)===null||s===void 0||s.dispose(),(o=this.sceneController)===null||o===void 0||o.dispose(),(i=this.composerController)===null||i===void 0||i.dispose(),(d=this.rendererController)===null||d===void 0||d.dispose(),this.controlController=void 0,this.cssRendererController=void 0,this.cameraController=void 0,this.sceneController=void 0,this.composerController=void 0,this.rendererController=void 0,(P=this.gui)===null||P===void 0||P.destroy(),this.event.removeAllListeners(),this.installPlugins.clear()},C(u,[{key:"renderer",get:function(){var e;return(e=this.rendererController)===null||e===void 0?void 0:e.renderer}},{key:"control",get:function(){var e;return(e=this.controlController)===null||e===void 0?void 0:e.control}},{key:"camera",get:function(){var e;return(e=this.cameraController)===null||e===void 0?void 0:e.camera}},{key:"scene",get:function(){var e;return(e=this.sceneController)===null||e===void 0?void 0:e.scene}}]),u}();Ce.options={isdev:be,stats:be,gui:be,axesHelper:be,control:!1,renderer:j((0,G.Z)({},b),{antialias:Re?"msaa":"smaa"}),staticRender:!1,multisampling:8,scene:ie,camera:E,bloom:!1,bloomParams:We,outline:!1,outlineParams:Ke,css2DRenderer:!1,ssr:!1,ssrParams:nt,css2DRendererParams:(0,G.Z)({},g),css3DRenderer:!1,css3DRendererParams:(0,G.Z)({},g),staticPath:"/"};function ot(){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 Pe(u,a,n){return ot()?Pe=Reflect.construct:Pe=function(r,t,s){var o=[null];o.push.apply(o,t);var i=Function.bind.apply(r,o),d=new i;return s&&Te(d,s.prototype),d},Pe.apply(null,arguments)}function Ge(u,a,n){return Pe.apply(null,arguments)}var ut=q(484);function lt(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={};return n.promise=new Promise(function(e,r){n.resolve=e,n.reject=r}),u&&(n.promise=(0,ut.Z)(n.promise,a)),n}var ct=function(u){"use strict";je(n,u);var a=Ee(n);function n(r){O(this,n);var t;return t=a.call(this),t.objecttype__="BaseObject",t.isAdd=!1,t.userData={},t.pm=lt(),t.visible=!1,t}var e=n.prototype;return e.init=function(){},e.create=function(){},e.render=function(){},e.update=function(t,s){},e.resize=function(t,s){},e.show=function(){return this.object3d&&(this.object3d.visible=!0),this.visible=!0,this},e.hide=function(){return this.object3d&&(this.object3d.visible=!1),this.visible=!1,this},e.isVisible=function(){return this.visible},e.createMesh=function(){for(var t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];return this.object3d=Ge(v.Mesh,I(s)),this},e.createGroup=function(){return this.object3d=new v.Group,this},e.createPoints=function(){for(var t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];return this.object3d=Ge(v.Points,I(s)),this},e.createCSS2DObject=function(t){return this.object3d=new h.CSS2DObject(t),this},e.createCSS3DObject=function(t){return this.object3d=new c.CSS3DObject(t),this},e.createCSS3DSprite=function(t){return this.object3d=new c.CSS3DSprite(t),this},e.add=function(){for(var t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];var i;return(i=this.object3d).add.apply(i,I(s)),this},e.remove=function(){for(var t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];var i;return(i=this.object3d).remove.apply(i,I(s)),this},e.getSize=function(){var t=new v.Box3().setFromObject(this.object3d);return{min:t.min,max:t.max,size:t.getSize(new v.Vector3)}},e.traverse=function(t){t(this),this.children.forEach(function(s){s.traverse(t)})},e.dispose=function(){var t;(t=this.object3d)===null||t===void 0||t.traverse(function(s){(0,z.disposeMesh)(s)})},C(n,[{key:"parent",get:function(){var t=this.object3d.parent;return(t==null?void 0:t.userData.BaseObject_)||this.pencil.scene}},{key:"children",get:function(){return this.object3d.children.map(function(t){return t.userData.BaseObject_}).filter(function(t){return!!t})}}]),n}(l)})(),module.exports=ye})();