2023-06-06 13:24:29 +08:00
var VS = Object . defineProperty , WS = Object . defineProperties ; var jS = Object . getOwnPropertyDescriptors ; var Tu = Object . getOwnPropertySymbols ; var HS = Object . prototype . hasOwnProperty , $S = Object . prototype . propertyIsEnumerable ; var Eu = Math . pow , jn = ( r , e , t ) => e in r ? VS ( r , e , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : t } ) : r [ e ] = t , i2 = ( r , e ) => { for ( var t in e || ( e = { } ) ) HS . call ( e , t ) && jn ( r , t , e [ t ] ) ; if ( Tu ) for ( var t of Tu ( e ) ) $S . call ( e , t ) && jn ( r , t , e [ t ] ) ; return r } , r3 = ( r , e ) => WS ( r , jS ( e ) ) ; var l1 = ( r , e , t ) => ( jn ( r , typeof e != "symbol" ? e + "" : e , t ) , t ) ; var m3 = ( r , e , t ) => new Promise ( ( n , i ) => { var o = c => { try { s ( t . next ( c ) ) } catch ( f ) { i ( f ) } } , a = c => { try { s ( t . throw ( c ) ) } catch ( f ) { i ( f ) } } , s = c => c . done ? n ( c . value ) : Promise . resolve ( c . value ) . then ( o , a ) ; s ( ( t = t . apply ( r , e ) ) . next ( ) ) } ) ; import { bq as d7 , j as w2 , br as K2 , aN as Du , $ as $1 , bs as jf , ab as et , bt as Hi , J as s2 , bu as Hf , d as S1 , r as Y , o as G , D as z1 , w as b , b as p , c as h1 , F as F1 , q as g2 , e as X1 , t as w3 , a1 as I2 , u , a6 as I3 , aT as i5 , ac as V1 , l as g0 , bv as N5 , bw as YS , m as j5 , aF as le , a2 as C5 , bx as v3 , by as C3 , bz as JS , bA as ZS , bB as J3 , bC as $f , bD as W3 , bE as Z3 , bF as f4 , bG as Eo , ad as l6 , n as Q , au as Z2 , s as r5 , x as o5 , h as F2 , bH as f7 , bI as K6 , bJ as H8 , aZ as j0 , bK as e5 , bd as H9 , g as Do , b3 as Io , bL as XS , bM as qS , bN as Yf , bO as Ro , bP as Hn , ae as m1 , bQ as Oo , bR as Jf , bS as QS , bT as Lo , bU as KS , bV as R0 , bW as Iu , bX as eM , bY as Zf , bZ as Xf , b _ as qf , b$ as Qf , c0 as tM , c1 as Kf , c2 as nM , c3 as $n , c4 as Ru , c5 as eh , c6 as je , c7 as Ou , c8 as $i , c9 as iM , ca as rM , cb as Lu , cc as oM , cd as Pu , ce as aM , b2 as zu , cf as sM , cg as th , ch as lM , ci as uM , cj as cM , ck as dM , cl as fM , cm as hM , av as h7 , L as g9 , cn as ue , be as O0 , co as pM , Q as mM , U as gM , X as ku , a5 as nh , cp as _M , cq as vM , cr as yM , cs as bM , ct as xM , cu as Uu , cv as SM , cw as Yn , aW as MM , ak as ih , aj as rh , bk as oh , cx as Yi } from "./index-4ec2ce15.js" ; import { S as R } from "./SettingItem-35031211.js" ; import { S as r1 } from "./SettingItemBox-f60eaa4e.js" ; import { _ as k1 } from "./CollapseItem.vue_vue_type_script_setup_true_lang-77b092a0.js" ; import { i as ah } from "./icon-42fa39e7.js" ; import { d as r2 , u as A2 , b as q1 , e as M2 , F as Po } from "./chartEditStore-bfc6c223.js" ; import { s as a5 , e as P3 , m as j3 , S as z3 } from "./index.esm.min-2eecdcbd.js" ; /* empty css */ import { a as wM , b as AM , l as CM , g as TM } from "./plugin-ae137233.js" ; import { F as Jn } from "./fileTypeEnum-21359a08.js" ; const EM = ( r , e , t , n ) => { const i = r , o = e , a = { width : 1 , height : 1 } , s = parseFloat ( ( i / o ) . toFixed ( 5 ) ) , c = ( ) => { const g = parseFloat ( ( window . innerWidth / window . innerHeight ) . toFixed ( 5 ) ) ; t && ( g > s ? ( a . width = parseFloat ( ( window . innerHeight * s / i ) . toFixed ( 5 ) ) , a . height = parseFloat ( ( window . innerHeight / o ) . toFixed ( 5 ) ) , t . style . transform = ` scale( ${ a . width } , ${ a . height } ) ` ) : ( a . height = parseFloat ( ( window . innerWidth / s / o ) . toFixed ( 5 ) ) , a . width = parseFloat ( ( window . innerWidth / i ) . toFixed ( 5 ) ) , t . style . transform = ` scale( ${ a . width } , ${ a . height } ) ` ) , n && n ( a ) ) } , f = d7 ( ( ) => { c ( ) } , 200 ) ; return { calcRate : c , windowResize : ( ) => { window . addEventListener ( "resize" , f ) } , unWindowResize : ( ) => { window . removeEventListener ( "resize" , f ) } } } , DM = ( r , e , t , n ) => { const i = r , o = e , a = { width : 1 , height : 1 } , s = parseFloat ( ( i / o ) . toFixed ( 5 ) ) , c = ( ) => { t && ( a . height = parseFloat ( ( window . innerWidth / s / o ) . toFixed ( 5 ) ) , a . width = parseFloat ( ( window . innerWidth / i ) . toFixed ( 5 ) ) , t . style . transform = ` scale( ${ a . width } , ${ a . height } ) ` , n && n ( a ) ) } , f = d7 ( ( ) => { c ( ) } , 200 ) ; return { calcRate : c , windowResize : ( ) => { window . addEventListener ( "resize" , f ) } , unWindowResize : ( ) => { window . removeEventListener ( "resize" , f ) } } } , IM = ( r , e , t , n ) => { const i = r , o = e , a = { height : 1 , width : 1 } , s = parseFloat ( ( i / o ) . toFixed ( 5 ) ) , c = ( ) => { t && ( a . width = parseFloat ( ( window . innerHeight * s / i ) . toFixed ( 5 ) ) , a . height = parseFloat ( ( window . innerHeight / o ) . toFixed ( 5 ) ) , t . style . transform = ` scale( ${ a . width } , ${ a . height } ) ` , n && n ( a ) ) } , f = d7 ( ( ) => { c ( ) } , 200 ) ; return { calcRate : c , windowResize : ( ) => { window . addEventListener ( "resize" , f ) } , unWindowResize : ( ) => { window . removeEventListener ( "resize" , f ) } } } , RM = ( r , e , t , n ) => { const i = { width : 1 , height : 1 } , o = ( ) => { t && ( i . width = parseFloat ( ( window . innerWidth / r ) . toFixed ( 5 ) ) , i . height = parseFloat ( ( window . innerHeight / e ) . toFixed ( 5 ) ) , t . style . transform = ` scale( ${ i . width } , ${ i . height } ) ` , n && n ( i ) ) } , a = d7 (
2023-06-06 11:55:37 +08:00
* @ license
* Lodash < https : //lodash.com/>
* Copyright OpenJS Foundation and other contributors < https : //openjsf.org/>
* Released under MIT license < https : //lodash.com/license>
* Based on Underscore . js 1.8 . 3 < http : //underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas , DocumentCloud and Investigative Reporters & Editors
* /at.exports;(function(r,e){(function(){var t,n="4.17.21",i=200,o="Unsupported core-js use. Try https:/ / npms . io / search ? q = ponyfill . ",a=" Expected a function ",s=" Invalid ` variable ` option passed into ` _.template ` ",c=" _ _lodash _hash _undefined _ _ ",f=500,h=" _ _lodash _placeholder _ _ ",m=1,g=2,v=4,S=1,_=2,x=1,M=2,A=4,D=8,T=16,E=32,C=64,P=128,I=256,L=512,W=30,e1=" ... ",a1=800,$=16,N=1,H=2,K=3,X=1/0,B=9007199254740991,j=17976931348623157e292,J=0/0,u1=4294967295,d1=u1-1,x1=u1>>>1,v1=[[" ary ",P],[" bind ",x],[" bindKey ",M],[" curry ",D],[" curryRight ",T],[" flip ",L],[" partial ",E],[" partialRight ",C],[" rearg ",I]],o1=" [ object Arguments ] ",n1=" [ object Array ] ",E1=" [ object AsyncFunction ] ",T1=" [ object Boolean ] ",M1=" [ object Date ] ",w1=" [ object DOMException ] ",e2=" [ object Error ] ",N1=" [ object Function ] ",U1=" [ object GeneratorFunction ] ",l2=" [ object Map ] ",f2=" [ object Number ] ",h2=" [ object Null ] ",p2=" [ object Object ] ",R2=" [ object Promise ] ",o2=" [ object Proxy ] ",v2=" [ object RegExp ] ",t2=" [ object Set ] ",F=" [ object String ] ",k=" [ object Symbol ] ",y1=" [ object Undefined ] ",P1=" [ object WeakMap ] ",B1=" [ object WeakSet ] ",W1=" [ object ArrayBuffer ] ",a2=" [ object DataView ] ",q=" [ object Float32Array ] ",p1=" [ object Float64Array ] ",Y1=" [ object Int8Array ] ",J1=" [ object Int16Array ] ",Q1=" [ object Int32Array ] ",u2=" [ object Uint8Array ] ",S2=" [ object Uint8ClampedArray ] ",G2=" [ object Uint16Array ] ",s1=" [ object Uint32Array ] ",K1=/\b__p \+= '';/g,G1=/\b(__p \+=) '' \+/g,O1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,j1=/&(?:amp|lt|gt|quot|#39);/g,x2=/[&<>" ']/g,n3=RegExp(j1.source),h3=RegExp(x2.source),L0=/<%-([\s\S]+?)%>/g,c3=/<%([\s\S]+?)%>/g,J4=/<%=([\s\S]+?)%>/g,x4=/\.|\[(?:[^[\]]*|(["' ] ) ( ? : ( ? ! \ 1 ) [ ^ \ \ ] | \ \ . ) * ? \ 1 ) \ ] / , Rt = /^\w*$/ , J5 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g , Z5 = /[\\^$.*+?()[\]{}|]/g , Ot = RegExp ( Z5 . source ) , d6 = /^\s+/ , Lt = /\s/ , V = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/ , _1 = /\{\n\/\* \[wrapped with (.+)\] \*/ , C1 = /,? & / , g1 = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g , D1 = /[()=,{}\[\]\/\s]/ , m2 = /\\(\\)?/g , C2 = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g , O2 = /\w*$/ , T2 = /^[-+]0x[0-9a-f]+$/i , Y2 = /^0b[01]+$/i , V2 = /^\[object .+?Constructor\]$/ , W2 = /^0o[0-7]+$/i , d3 = /^(?:0|[1-9]\d*)$/ , J0 = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g , y0 = /($^)/ , M9 = /['\n\r\u2028\u2029\\]/g , p4 = "\\ud800-\\udfff" , $2 = "\\u0300-\\u036f" , w9 = "\\ufe20-\\ufe2f" , x3 = "\\u20d0-\\u20ff" , m4 = $2 + w9 + x3 , b0 = "\\u2700-\\u27bf" , A9 = "a-z\\xdf-\\xf6\\xf8-\\xff" , f6 = "\\xac\\xb1\\xd7\\xf7" , X3 = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf" , Z0 = "\\u2000-\\u206f" , h6 = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000" , n4 = "A-Z\\xc0-\\xd6\\xd8-\\xde" , X5 = "\\ufe0e\\ufe0f" , x7 = f6 + X3 + Z0 + h6 , q5 = "['’ ]" , Vm = "[" + p4 + "]" , ls = "[" + x7 + "]" , S7 = "[" + m4 + "]" , us = "\\d+" , Wm = "[" + b0 + "]" , cs = "[" + A9 + "]" , ds = "[^" + p4 + x7 + us + b0 + A9 + n4 + "]" , Pt = "\\ud83c[\\udffb-\\udfff]" , jm = "(?:" + S7 + "|" + Pt + ")" , fs = "[^" + p4 + "]" , zt = "(?:\\ud83c[\\udde6-\\uddff]){2}" , kt = "[\\ud800-\\udbff][\\udc00-\\udfff]" , Q5 = "[" + n4 + "]" , hs = "\\u200d" , ps = "(?:" + cs + "|" + ds + ")" , Hm = "(?:" + Q5 + "|" + ds + ")" , ms = "(?:" + q5 + "(?:d|ll|m|re|s|t|ve))?" , gs = "(?:" + q5 + "(?:D|LL|M|RE|S|T|VE))?" , _s = jm + "?" , vs = "[" + X5 + "]?" , $m = "(?:" + hs + "(?:" + [ fs , zt , kt ] . join ( "|" ) + ")" + vs + _s + ")*" , Ym = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])" , Jm = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])" , ys = vs + _s + $m , Zm = "(?:" + [ Wm , zt , kt ] . join ( "|" ) + ")" + ys , Xm = "(?:" + [ fs + S7 + "?" , S7 , zt , kt , Vm ] . join ( "|" ) + ")" , qm = RegExp ( q5 , "g" ) , Qm = RegExp ( S7 , "g" ) , Ut = RegExp ( Pt + "(?=" + Pt + ")|" + Xm + ys , "g" ) , Km = RegExp ( [ Q5 + "?" + cs + "+" + ms + "(?=" + [ ls , Q5 , "$" ] . join ( "|" ) + ")" , Hm + "+" + gs + "(?=" + [ ls , Q5 + ps , "$" ] . join ( "|" ) + ")" , Q5 + "?" + ps + "+" + ms , Q5 + "+" + gs , Jm , Ym , us , Zm ] . join ( "|" ) , "g" ) , eg = RegExp ( "[" + hs + p4 + m4 + X5 + "]" ) , tg = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ , ng = [ "Array" , "Buffer" , "DataView" , "Date" , "Error" , "Float32Array" , "Float64Array" , "Function" , "Int8Array" , "Int16Array" , "Int32Array" , "Map" , "Math" , "Object" , "Promise" , "RegExp" , "Set" , "String" , "Symbol" , "TypeError" , "Uint8Array" , "Uint8ClampedArray" , "Uint16Array" , "Uint32Array" , "WeakMap" , "_" , "clearTimeout" , "isFinite" , "parseInt" , "setTimeout" ] , ig = - 1 , u3 = {
/* [wrapped with `+d+`] */
` )}function bv(l){return D2(l)||g5(l)||!!(Vs&&l&&l[Vs])}function t9(l,d){var y=typeof l;return d=d==null?B:d,!!d&&(y=="number"||y!="symbol"&&d3.test(l))&&l>-1&&l%1==0&&l<d}function _4(l,d,y){if(!p3(y))return!1;var w=typeof d;return(w=="number"?M4(y)&&t9(d,y.length):w=="string"&&d in y)?M0(y[d],l):!1}function An(l,d){if(D2(l))return!1;var y=typeof l;return y=="number"||y=="symbol"||y=="boolean"||l==null||U4(l)?!0:Rt.test(l)||!x4.test(l)||d!=null&&l in i3(d)}function xv(l){var d=typeof l;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?l!=="__proto__":l===null}function Cn(l){var d=q7(l),y=z[d];if(typeof y!="function"||!(d in N2.prototype))return!1;if(l===y)return!0;var w=Sn(y);return!!w&&l===w[0]}function Sv(l){return!!Ns&&Ns in l}var Mv=T7?n9:Wn;function C6(l){var d=l&&l.constructor,y=typeof d=="function"&&d.prototype||i8;return l===y}function Nl(l){return l===l&&!p3(l)}function Fl(l,d){return function(y){return y==null?!1:y[l]===d&&(d!==t||l in i3(y))}}function wv(l){var d=ie(l,function(w){return y.size===f&&y.clear(),w}),y=d.cache;return d}function Av(l,d){var y=l[1],w=d[1],O=y|w,U=O<(x|M|P),Z=w==P&&y==D||w==P&&y==I&&l[7].length<=d[8]||w==(P|I)&&d[7].length<=d[8]&&y==D;if(!(U||Z))return l;w&x&&(l[2]=d[2],O|=y&x?0:A);var i1=d[3];if(i1){var f1=l[3];l[3]=f1?xl(f1,i1,d[4]):i1,l[4]=f1?E9(l[3],h):d[4]}return i1=d[5],i1&&(f1=l[5],l[5]=f1?Sl(f1,i1,d[6]):i1,l[6]=f1?E9(l[5],h):d[6]),i1=d[7],i1&&(l[7]=i1),w&P&&(l[8]=l[8]==null?d[8]:i4(l[8],d[8])),l[9]==null&&(l[9]=d[9]),l[0]=d[0],l[1]=O,l}function Cv(l){var d=[];if(l!=null)for(var y in i3(l))d.push(y);return d}function Tv(l){return D7.call(l)}function Bl(l,d,y){return d=N3(d===t?l.length-1:d,0),function(){for(var w=arguments,O=-1,U=N3(w.length-d,0),Z=b1(U);++O<U;)Z[O]=w[d+O];O=-1;for(var i1=b1(d+1);++O<d;)i1[O]=w[O];return i1[d]=y(Z),P4(l,this,i1)}}function Gl(l,d){return d.length<2?l:h5(l,e0(d,0,-1))}function Ev(l,d){for(var y=l.length,w=i4(d.length,y),O=S4(l);w--;){var U=d[w];l[w]=t9(U,y)?O[U]:t}return l}function Tn(l,d){if(!(d==="constructor"&&typeof l[d]=="function")&&d!="__proto__")return l[d]}var Vl=jl(dl),T6=Wg||function(l,d){return q3.setTimeout(l,d)},En=jl(q_);function Wl(l,d,y){var w=d+"";return En(l,yv(w,Dv(gv(w),y)))}function jl(l){var d=0,y=0;return function(){var w=Yg(),O= $ -(w-y);if(y=w,O>0){if(++d>=a1)return arguments[0]}else d=0;return l.apply(t,arguments)}}function K7(l,d){var y=-1,w=l.length,O=w-1;for(d=d===t?w:d;++y<d;){var U=cn(y,O),Z=l[U];l[U]=l[y],l[y]=Z}return l.length=d,l}var Hl=wv(function(l){var d=[];return l.charCodeAt(0)===46&&d.push(""),l.replace(J5,function(y,w,O,U){d.push(O?U.replace(m2," $ 1"):w||y)}),d});function k0(l){if(typeof l=="string"||U4(l))return l;var d=l+"";return d=="0"&&1/l==-X?"-0":d}function m5(l){if(l!=null){try{return E7.call(l)}catch(d){}try{return l+""}catch(d){}}return""}function Dv(l,d){return X4(v1,function(y){var w="_."+y[0];d&y[1]&&!M7(l,w)&&l.push(w)}),l.sort()}function $ l(l){if(l instanceof N2)return l.clone();var d=new Q4(l.__wrapped__,l.__chain__);return d.__actions__=S4(l.__actions__),d.__index__=l.__index__,d.__values__=l.__values__,d}function Iv(l,d,y){(y?_4(l,d,y):d===t)?d=1:d=N3(L2(d),0);var w=l==null?0:l.length;if(!w||d<1)return[];for(var O=0,U=0,Z=b1(z7(w/d));O<w;)Z[U++]=e0(l,O,O+=d);return Z}function Rv(l){for(var d=-1,y=l==null?0:l.length,w=0,O=[];++d<y;){var U=l[d];U&&(O[w++]=U)}return O}function Ov(){var l=arguments.length;if(!l)return[];for(var d=b1(l-1),y=arguments[0],w=l;w--;)d[w-1]=arguments[w];return T9(D2(y)?S4(y):[y],Q3(d,1))}var Lv=z2(function(l,d){return T3(l)?x6(l,Q3(d,1,T3,!0)):[]}),Pv=z2(function(l,d){var y=t0(d);return T3(y)&&(y=t),T3(l)?x6(l,Q3(d,1,T3,!0),_2(y,2)):[]}),zv=z2(function(l,d){var y=t0(d);return T3(y)&&(y=t),T3(l)?x6(l,Q3(d,1,T3,!0),t,y):[]});function kv(l,d,y){var w=l==null?0:l.length;return w?(d=y||d===t?1:L2(d),e0(l,d<0?0:d,w)):[]}function Uv(l,d,y){var w=l==null?0:l.length;return w?(d=y||d===t?1:L2(d),d=w-d,e0(l,0,d<0?0:d)):[]}function Nv(l,d){return l&&l.length?H7(l,_2(d,3),!0,!0):[]}function Fv(l,d){return l&&l.length?H7(l,_2(d,3),!0):[]}function Bv(l,d,y,w){var O=l==nul
` ;l.replace(Z1,function(b2,k2,j2,N4,v4,F4){return j2||(j2=N4),L1+=l.slice(I1,F4).replace(M9,Mg),k2&&(i1=!0,L1+= ` ' +
_ _e ( ` +k2+ ` ) +
'`),v4&&(f1=!0,L1+=`' ;
` +v4+ ` ;
_ _p += '`),j2&&(L1+=`' +
( ( _ _t = ( ` +j2+ ` ) ) == null ? '' : _ _t ) +
'`),I1=F4+b2.length,b2}),L1+=`' ;
` ;var y2=Q2.call(d,"variable")&&d.variable;if(!y2)L1= ` with ( obj ) {
` +L1+ `
}
` ;else if(D1.test(y2))throw new E2(s);L1=(f1?L1.replace(K1,""):L1).replace(G1," $ 1").replace(O1," $ 1;"),L1="function("+(y2||"obj")+ ` ) {
` +(y2?"": ` obj || ( obj = { } ) ;
` )+"var __t, __p = ''"+(i1?", __e = _.escape":"")+(f1? ` , _ _j = Array . prototype . join ;
function print ( ) { _ _p += _ _j . call ( arguments , '' ) }
` : ` ;
` )+L1+ ` return _ _p
} ` ;var P2=wu(function(){return J2(U,d2+"return "+L1).apply(t,Z)});if(P2.source=L1,Ln(P2))throw P2;return P2}function Zx(l){return q2(l).toLowerCase()}function Xx(l){return q2(l).toUpperCase()}function qx(l,d,y){if(l=q2(l),l&&(y||d===t))return Ls(l);if(!l||!(d=k4(d)))return l;var w=x0(l),O=x0(d),U=Ps(w,O),Z=zs(w,O)+1;return L9(w,U,Z).join("")}function Qx(l,d,y){if(l=q2(l),l&&(y||d===t))return l.slice(0,Us(l)+1);if(!l||!(d=k4(d)))return l;var w=x0(l),O=zs(w,x0(d))+1;return L9(w,0,O).join("")}function Kx(l,d,y){if(l=q2(l),l&&(y||d===t))return l.replace(d6,"");if(!l||!(d=k4(d)))return l;var w=x0(l),O=Ps(w,x0(d));return L9(w,O).join("")}function eS(l,d){var y=W,w=e1;if(p3(d)){var O="separator"in d?d.separator:O;y="length"in d?L2(d.length):y,w="omission"in d?k4(d.omission):w}l=q2(l);var U=l.length;if(e8(l)){var Z=x0(l);U=Z.length}if(y>=U)return l;var i1=y-t8(w);if(i1<1)return w;var f1=Z?L9(Z,0,i1).join(""):l.slice(0,i1);if(O===t)return f1+w;if(Z&&(i1+=f1.length-i1),Pn(O)){if(l.slice(i1).search(O)){var I1,R1=f1;for(O.global||(O=Zt(O.source,q2(O2.exec(O))+"g")),O.lastIndex=0;I1=O.exec(R1);)var L1=I1.index;f1=f1.slice(0,L1===t?i1:L1)}}else if(l.indexOf(k4(O),i1)!=i1){var Z1=f1.lastIndexOf(O);Z1>-1&&(f1=f1.slice(0,Z1))}return f1+w}function tS(l){return l=q2(l),l&&n3.test(l)?l.replace(j1,Ig):l}var nS=l8(function(l,d,y){return l+(y?" ":"")+d.toUpperCase()}),Un=Al("toUpperCase");function Mu(l,d,y){return l=q2(l),d=y?t:d,d===t?Ag(l)?Lg(l):gg(l):l.match(d)||[]}var wu=z2(function(l,d){try{return P4(l,t,d)}catch(y){return Ln(y)?y:new E2(y)}}),iS=e9(function(l,d){return X4(d,function(y){y=k0(y),Q0(l,y,Rn(l[y],l))}),l});function rS(l){var d=l==null?0:l.length,y=_2();return l=d?f3(l,function(w){if(typeof w[1]!="function")throw new q4(a);return[y(w[0]),w[1]]}):[],z2(function(w){for(var O=-1;++O<d;){var U=l[O];if(P4(U[0],this,w))return P4(U[1],this,w)}})}function oS(l){return I_(K4(l,m))}function Nn(l){return function(){return l}}function aS(l,d){return l==null||l!==l?d:l}var sS=Tl(),lS=Tl(!0);function A4(l){return l}function Fn(l){return il(typeof l=="function"?l:K4(l,m))}function uS(l){return ol(K4(l,m))}function cS(l,d){return al(l,K4(d,m))}var dS=z2(function(l,d){return function(y){return S6(y,l,d)}}),fS=z2(function(l,d){return function(y){return S6(l,y,d)}});function Bn(l,d,y){var w=H3(d),O=V7(d,w);y==null&&!(p3(d)&&(O.length||!w.length))&&(y=d,d=l,l=this,O=V7(d,H3(d)));var U=!(p3(y)&&"chain"in y)||!!y.chain,Z=n9(l);return X4(O,function(i1){var f1=d[i1];l[i1]=f1,Z&&(l.prototype[i1]=function(){var I1=this.__chain__;if(U||I1){var R1=l(this.__wrapped__),L1=R1.__actions__=S4(this.__actions__);return L1.push({func:f1,args:arguments,thisArg:l}),R1.__chain__=I1,R1}return f1.apply(l,T9([this.value()],arguments))})}),l}function hS(){return q3._===this&&(q3._=Fg),this}function Gn(){}function pS(l){return l=L2(l),z2(function(d){return sl(d,l)})}var mS=vn(f3),gS=vn(Es),_S=vn(Vt);function Au(l){return An(l)?Wt(k0(l)):Y_(l)}function vS(l){return function(d){return l==null?t:h5(l,d)}}var yS=Dl(),bS=Dl(!0);function Vn(){return[]}function Wn(){return!1}function xS(){return{}}function SS(){return""}function MS(){return!0}function wS(l,d){if(l=L2(l),l<1||l>B)return[];var y=u1,w=i4(l,u1);d=_2(d),l-=u1;for(var O= $ t(w,d);++y<l;)d(y);return O}function AS(l){return D2(l)?f3(l,k0):U4(l)?[l]:S4(Hl(q2(l)))}function CS(l){var d=++Ug;return q2(l)+d}var TS=J7(function(l,d){return l+d},0),ES=yn("ceil"),DS=J7(function(l,d){return l/d},1),IS=yn("floor");function RS(l){return l&&l.length?G7(l,A4,rn):t}function OS(l,d){return l&&l.length?G7(l,_2(d,2),rn):t}function LS(l){return Rs(l,A4)}function PS(l,d){return Rs(l,_2(d,2))}function zS(l){return l&&l.length?G7(l,A4,ln):t}function kS(l,d){return l&&l.length?G7(l,_2(d,2),ln):t}var US=J7(function(l,d){return l*d},1),NS=yn("round"),FS=J7(function(l,d){return l-d},0);function BS(l){return l&&l.length?Ht(l,A4):0}function GS(l,d){return l&&l.length?Ht(l,_2(d,2)):0}return z.after=ub,z.ary=nu,z.assign=Xb,z.assignIn=gu,z.assignInWith=se,z.assignWith=qb,z.at=Qb,z.before=iu,z.bind=Rn,z.bindAll=iS,z.bindKey=ru,z.castArray=xb,z.chain=
38 , $ { u ( i ) - 11 } 41 , $ { u ( i ) - 8 } 73 , $ { u ( i ) - 8 } 75 , $ { u ( i ) - 10 } 81 , $ { u ( i ) - 10 }
85 , $ { u ( i ) - 6 } $ { u ( n ) - 85 } , $ { u ( i ) - 6 } $ { u ( n ) - 81 } , $ { u ( i ) - 10 } $ { u ( n ) - 75 } , $ { u ( i ) - 10 }
$ { u ( n ) - 73 } , $ { u ( i ) - 8 } $ { u ( n ) - 41 } , $ { u ( i ) - 8 } $ { u ( n ) - 38 } , $ { u ( i ) - 11 }
$ { u ( n ) - 24 } , $ { u ( i ) - 11 } $ { u ( n ) - 13 } , $ { u ( i ) - 21 } $ { u ( n ) - 13 } , $ { u ( i ) - 24 }
$ { u ( n ) - 10 } , $ { u ( i ) - 27 } $ { u ( n ) - 10 } , 27 $ { u ( n ) - 13 } , 25 $ { u ( n ) - 13 } , 21
$ { u ( n ) - 24 } , 11 $ { u ( n ) - 38 } , 11 $ { u ( n ) - 41 } , 8 $ { u ( n ) - 73 } , 8 $ { u ( n ) - 75 } , 10
$ { u ( n ) - 81 } , 10 $ { u ( n ) - 85 } , 6 85 , 6 81 , 10 75 , 10 73 , 8 41 , 8 38 , 11 24 , 11 13 , 21 13 , 24 ` },null,8,tD)],8,eD)),(G(),h1(F1,null,g2(t,h=>Q("svg",{width:u(n),height:u(i),key:h,class:h7( ` border - item $ { h } ` )},[Q("polygon",{fill:u(o)[0],points:"6,66 6,18 12,12 18,12 24,6 27,6 30,9 36,9 39,6 84,6 81,9 75,9 73.2,7 40.8,7 37.8,10.2 24,10.2 12,21 12,24 9,27 9,51 7.8,54 7.8,63"},[Q("animate",{attributeName:"fill",values: ` $ { u ( o ) [ 0 ] } ; $ { u ( o ) [ 1 ] } ; $ { u ( o ) [ 0 ] } ` ,dur: ` $ { u ( a ) } s ` ,begin:"0s",repeatCount:"indefinite"},null,8,rD)],8,iD),Q("polygon",{fill:u(o)[1],points:"27.599999999999998,4.8 38.4,4.8 35.4,7.8 30.599999999999998,7.8"},[Q("animate",{attributeName:"fill",values: ` $ { u ( o ) [ 1 ] } ; $ { u ( o ) [ 0 ] } ; $ { u ( o ) [ 1 ] } ` ,dur: ` $ { u ( a ) } s ` ,begin:"0s",repeatCount:"indefinite"},null,8,aD)],8,oD),Q("polygon",{fill:u(o)[0],points:"9,54 9,63 7.199999999999999,66 7.199999999999999,75 7.8,78 7.8,110 8.4,110 8.4,66 9.6,66 9.6,54"},[Q("animate",{attributeName:"fill",values: ` $ { u ( o ) [ 0 ] } ; $ { u ( o ) [ 1 ] } ; transparent ` ,dur: ` $ { u ( a ) + 1 } s ` ,begin:"0s",repeatCount:"indefinite"},null,8,lD)],8,sD)],10,nD)),64))]))}});const cD=F2(uD,[["__scopeId","data-v-708ac670"]]),dD=Object.freeze(Object.defineProperty({__proto__:null,default:cD},Symbol.toStringTag,{value:"Module"})),fD={class:"go-border-box"},hD=["width","height"],pD=["fill","stroke","d"],mD=["stroke"],gD=["stroke"],_D=["stroke","d"],vD=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,backgroundColor:o}= $ 1(e.chartConfig.option);return(a,s)=>(G(),h1("div",fD,[(G(),h1("svg",{width:u(t),height:u(n)},[Q("path",{fill:u(o),stroke:u(i)[0],d: `
M 5 20 L 5 10 L 12 3 L 60 3 L 68 10
L $ { u ( t ) - 20 } 10 L $ { u ( t ) - 5 } 25
L $ { u ( t ) - 5 } $ { u ( n ) - 5 } L 20 $ { u ( n ) - 5 }
L 5 $ { u ( n ) - 20 } L 5 20
` },null,8,pD),Q("path",{fill:"transparent","stroke-w":"3","stroke-linecap":"round","stroke-dasharray":"10, 5",stroke:u(i)[0],d:"M 16 9 L 61 9"},null,8,mD),Q("path",{fill:"transparent",stroke:u(i)[1],d:"M 5 20 L 5 10 L 12 3 L 60 3 L 68 10"},null,8,gD),Q("path",{fill:"transparent",stroke:u(i)[1],d: ` M $ { u ( t ) - 5 } $ { u ( n ) - 30 } L $ { u ( t ) - 5 } $ { u ( n ) - 5 } L $ { u ( t ) - 30 } $ { u ( n ) - 5 } ` },null,8,_D)],8,hD))]))}});const yD=F2(vD,[["__scopeId","data-v-fc7dd111"]]),bD=Object.freeze(Object.defineProperty({__proto__:null,default:yD},Symbol.toStringTag,{value:"Module"})),bt=r=>(r5("data-v-b07bae32"),r=r(),o5(),r),xD={class:"go-border-box"},SD=["width","height"],MD=bt(()=>Q("feMorphology",{operator:"dilate",radius:"1",in:"SourceAlpha",result:"thicken"},null,-1)),wD=bt(()=>Q("feGaussianBlur",{in:"thicken",stdDeviation:"2",result:"blurred"},null,-1)),AD=["flood-color"],CD=["values"],TD=bt(()=>Q("feComposite",{in:"glowColor",in2:"blurred",operator:"in",result:"softGlowColored"},null,-1)),ED=bt(()=>Q("feMerge",null,[Q("feMergeNode",{in:"softGlowColored"}),Q("feMergeNode",{in:"SourceGraphic"})],-1)),DD=["fill","stroke","d"],ID=["filter","stroke"],RD=["filter","stroke","d"],OD=["filter","stroke","d"],LD=["filter","stroke","d"],PD=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,t= ` border - box - 03 - filterId - $ { g9 ( ) } ` ,{w:n,h:i}= $ 1(e.chartConfig.attr),{colors:o,backgroundColor:a}= $ 1(e.chartConfig.option);return(s,c)=>(G(),h1("div",xD,[(G(),h1("svg",{width:u(n),height:u(i)},[Q("defs",null,[Q("filter",{id:t,height:"150%",width:"150%",x:"-25%",y:"-25%"},[MD,wD,Q("feFlood",{"flood-color":u(ue)(u(o)[1],.7),result:"glowColor"},[Q("animate",{attributeName:"flood-color",values: `
$ { u ( ue ) ( u ( o ) [ 1 ] , . 7 ) } ;
$ { u ( ue ) ( u ( o ) [ 1 ] , . 3 ) } ;
$ { u ( ue ) ( u ( o ) [ 1 ] , . 7 ) } ;
` ,dur:"3s",begin:"0s",repeatCount:"indefinite"},null,8,CD)],8,AD),TD,ED])]),u(n)&&u(i)?(G(),h1("path",{key:0,fill:u(a),"stroke-width":"2",stroke:u(o)[0],d: `
M15 5 L $ { u ( n ) - 15 } 5 Q $ { u ( n ) - 5 } 5 , $ { u ( n ) - 5 } 15
L $ { u ( n ) - 5 } $ { u ( i ) - 15 } Q $ { u ( n ) - 5 } $ { u ( i ) - 5 } , $ { u ( n ) - 15 } $ { u ( i ) - 5 }
L 15 , $ { u ( i ) - 5 } Q 5 $ { u ( i ) - 5 } 5 $ { u ( i ) - 15 } L 5 15
Q 5 5 15 5
` },null,8,DD)):I3("",!0),Q("path",{"stroke-width":"2",fill:"transparent","stroke-linecap":"round",filter: ` url ( # $ { t } ) ` ,stroke:u(o)[1],d:"M 20 5 L 15 5 Q 5 5 5 15 L 5 20"},null,8,ID),Q("path",{"stroke-width":"2",fill:"transparent","stroke-linecap":"round",filter: ` url ( # $ { t } ) ` ,stroke:u(o)[1],d: ` M $ { u ( n ) - 20 } 5 L $ { u ( n ) - 15 } 5 Q $ { u ( n ) - 5 } 5 $ { u ( n ) - 5 } 15 L $ { u ( n ) - 5 } 20 ` },null,8,RD),Q("path",{"stroke-width":"2",fill:"transparent","stroke-linecap":"round",filter: ` url ( # $ { t } ) ` ,stroke:u(o)[1],d: `
M $ { u ( n ) - 20 } $ { u ( i ) - 5 } L $ { u ( n ) - 15 } $ { u ( i ) - 5 }
Q $ { u ( n ) - 5 } $ { u ( i ) - 5 } $ { u ( n ) - 5 } $ { u ( i ) - 15 }
L $ { u ( n ) - 5 } $ { u ( i ) - 20 }
` },null,8,OD),Q("path",{"stroke-width":"2",fill:"transparent","stroke-linecap":"round",filter: ` url ( # $ { t } ) ` ,stroke:u(o)[1],d: `
M 20 $ { u ( i ) - 5 } L 15 $ { u ( i ) - 5 }
Q 5 $ { u ( i ) - 5 } 5 $ { u ( i ) - 15 }
L 5 $ { u ( i ) - 20 }
` },null,8,LD)],8,SD))]))}});const zD=F2(PD,[["__scopeId","data-v-b07bae32"]]),kD=Object.freeze(Object.defineProperty({__proto__:null,default:zD},Symbol.toStringTag,{value:"Module"})),Y0=r=>(r5("data-v-4dd6360b"),r=r(),o5(),r),UD={class:"go-border-box"},ND=["width","height"],FD=Y0(()=>Q("feMorphology",{operator:"dilate",radius:"2",in:"SourceAlpha",result:"thicken"},null,-1)),BD=Y0(()=>Q("feGaussianBlur",{in:"thicken",stdDeviation:"3",result:"blurred"},null,-1)),GD=["flood-color"],VD=Y0(()=>Q("feComposite",{in:"glowColor",in2:"blurred",operator:"in",result:"softGlowColored"},null,-1)),WD=Y0(()=>Q("feMerge",null,[Q("feMergeNode",{in:"softGlowColored"}),Q("feMergeNode",{in:"SourceGraphic"})],-1)),jD=["fill","points"],HD=["fill","stroke","filter","points"], $ D=["stroke","points"],YD=["stroke","points"],JD=["stroke","fill","filter","points"],ZD=["filter","fill","points"],XD=Y0(()=>Q("animate",{attributeName:"opacity",values:"1;0.7;1",dur:"2s",begin:"0s",repeatCount:"indefinite"},null,-1)),qD=[XD],QD=["filter","fill","points"],KD=Y0(()=>Q("animate",{attributeName:"opacity",values:"0.7;0.4;0.7",dur:"2s",begin:"0s",repeatCount:"indefinite"},null,-1)),eI=[KD],tI=["filter","fill","points"],nI=Y0(()=>Q("animate",{attributeName:"opacity",values:"0.5;0.2;0.5",dur:"2s",begin:"0s",repeatCount:"indefinite"},null,-1)),iI=[nI],rI=["filter","fill","points"],oI=Y0(()=>Q("animate",{attributeName:"opacity",values:"1;0.7;1",dur:"2s",begin:"0s",repeatCount:"indefinite"},null,-1)),aI=[oI],sI=["filter","fill","points"],lI=Y0(()=>Q("animate",{attributeName:"opacity",values:"0.7;0.4;0.7",dur:"2s",begin:"0s",repeatCount:"indefinite"},null,-1)),uI=[lI],cI=["filter","fill","points"],dI=Y0(()=>Q("animate",{attributeName:"opacity",values:"0.5;0.2;0.5",dur:"2s",begin:"0s",repeatCount:"indefinite"},null,-1)),fI=[dI],hI=["x","y","fill","font-size"],pI=["fill","filter","points"],mI=["fill","filter","points"],gI=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,t= ` border - box - 04 - filterId - $ { g9 ( ) } ` ,{w:n,h:i}= $ 1(e.chartConfig.attr),{colors:o,borderTitle:a,borderTitleColor:s,borderTitleSize:c,borderTitleHeight:f,borderTitleWidth:h,backgroundColor:m}= $ 1(e.chartConfig.option);return(g,v)=>(G(),h1("div",UD,[(G(),h1("svg",{width:u(n),height:u(i)},[Q("defs",null,[Q("filter",{id:t,height:"150%",width:"150%",x:"-25%",y:"-25%"},[FD,BD,Q("feFlood",{"flood-color":u(o)[1],result:"glowColor"},null,8,GD),VD,WD])]),Q("polygon",{fill:u(m),points: `
20 , 32 $ { u ( n ) * . 5 - u ( h ) / 2 } , 32 $ { u ( n ) * . 5 - u ( h ) / 2 + 20 } , 53
$ { u ( n ) * . 5 + u ( h ) / 2 - 20 } , 53 $ { u ( n ) * . 5 + u ( h ) / 2 } , 32
$ { u ( n ) - 20 } , 32 $ { u ( n ) - 8 } , 48 $ { u ( n ) - 8 } , $ { u ( i ) - 25 } $ { u ( n ) - 20 } , $ { u ( i ) - 8 }
20 , $ { u ( i ) - 8 } 8 , $ { u ( i ) - 25 } 8 , 50
` },null,8,jD),Q("polyline",{fill:u(m),stroke:u(o)[0],filter: ` url ( # $ { t } ) ` ,points: `
$ { ( u ( n ) - u ( h ) ) / 2 } , 30
20 , 30 7 , 50 7 , $ { 50 + ( u ( i ) - 167 ) / 2 }
13 , $ { 55 + ( u ( i ) - 167 ) / 2 } 13 , $ { 135 + ( u ( i ) - 167 ) / 2 }
7 , $ { 140 + ( u ( i ) - 167 ) / 2 } 7 , $ { u ( i ) - 27 }
20 , $ { u ( i ) - 7 } $ { u ( n ) - 20 } , $ { u ( i ) - 7 } $ { u ( n ) - 7 } , $ { u ( i ) - 27 }
$ { u ( n ) - 7 } , $ { 140 + ( u ( i ) - 167 ) / 2 } $ { u ( n ) - 13 } , $ { 135 + ( u ( i ) - 167 ) / 2 }
$ { u ( n ) - 13 } , $ { 55 + ( u ( i ) - 167 ) / 2 } $ { u ( n ) - 7 } , $ { 50 + ( u ( i ) - 167 ) / 2 }
$ { u ( n ) - 7 } , 50 $ { u ( n ) - 20 } , 30 $ { ( u ( n ) + u ( h ) ) / 2 } , 30
$ { ( u ( n ) + u ( h ) ) / 2 - 20 } , 7 $ { ( u ( n ) - u ( h ) ) / 2 + 20 } , 7
$ { ( u ( n ) - u ( h ) ) / 2 } , 30 $ { ( u ( n ) - u ( h ) ) / 2 + 20 } , 52
$ { ( u ( n ) + u ( h ) ) / 2 - 20 } , 52 $ { ( u ( n ) + u ( h ) ) / 2 } , 30
` },null,8,HD),Q("polygon",{stroke:u(o)[0],fill:"transparent",points: `
$ { ( u ( n ) + u ( h ) ) / 2 - 5 } , 30 $ { ( u ( n ) + u ( h ) ) / 2 - 21 } , 11
$ { ( u ( n ) + u ( h ) ) / 2 - 27 } , 11 $ { ( u ( n ) + u ( h ) ) / 2 - 8 } , 34
` },null,8, $ D),Q("polygon",{stroke:u(o)[0],fill:"transparent",points: `
$ { ( u ( n ) - u ( h ) ) / 2 + 5 } , 30 $ { ( u ( n ) - u ( h ) ) / 2 + 22 } , 49
$ { ( u ( n ) - u ( h ) ) / 2 + 28 } , 49 $ { ( u ( n ) - u ( h ) ) / 2 + 8 } , 26
` },null,8,YD),Q("polygon",{stroke:u(o)[0],fill:u(o)[1],filter: ` url ( # $ { t } ) ` ,points: `
$ { ( u ( n ) + u ( h ) ) / 2 - 11 } , 37 $ { ( u ( n ) + u ( h ) ) / 2 - 32 } , 11
$ { ( u ( n ) - u ( h ) ) / 2 + 23 } , 11 $ { ( u ( n ) - u ( h ) ) / 2 + 11 } , 23
$ { ( u ( n ) - u ( h ) ) / 2 + 33 } , 49 $ { ( u ( n ) + u ( h ) ) / 2 - 22 } , 49
` },null,8,JD),Q("polygon",{filter: ` url ( # $ { t } ) ` ,fill:u(o)[0],opacity:"1",points: `
$ { ( u ( n ) - u ( h ) ) / 2 - 10 } , 37 $ { ( u ( n ) - u ( h ) ) / 2 - 31 } , 37
$ { ( u ( n ) - u ( h ) ) / 2 - 25 } , 46 $ { ( u ( n ) - u ( h ) ) / 2 - 4 } , 46
` },qD,8,ZD),Q("polygon",{filter: ` url ( # $ { t } ) ` ,fill:u(o)[0],opacity:"0.7",points: `
$ { ( u ( n ) - u ( h ) ) / 2 - 40 } , 37 $ { ( u ( n ) - u ( h ) ) / 2 - 61 } , 37
$ { ( u ( n ) - u ( h ) ) / 2 - 55 } , 46 $ { ( u ( n ) - u ( h ) ) / 2 - 34 } , 46
` },eI,8,QD),Q("polygon",{filter: ` url ( # $ { t } ) ` ,fill:u(o)[0],opacity:"0.5",points: `
$ { ( u ( n ) - u ( h ) ) / 2 - 70 } , 37 $ { ( u ( n ) - u ( h ) ) / 2 - 91 } , 37
$ { ( u ( n ) - u ( h ) ) / 2 - 85 } , 46 $ { ( u ( n ) - u ( h ) ) / 2 - 64 } , 46
` },iI,8,tI),Q("polygon",{filter: ` url ( # $ { t } ) ` ,fill:u(o)[0],opacity:"1",points: `
$ { ( u ( n ) + u ( h ) ) / 2 + 30 } , 37 $ { ( u ( n ) + u ( h ) ) / 2 + 9 } , 37
$ { ( u ( n ) + u ( h ) ) / 2 + 3 } , 46 $ { ( u ( n ) + u ( h ) ) / 2 + 24 } , 46
` },aI,8,rI),Q("polygon",{filter: ` url ( # $ { t } ) ` ,fill:u(o)[0],opacity:"0.7",points: `
$ { ( u ( n ) + u ( h ) ) / 2 + 60 } , 37 $ { ( u ( n ) + u ( h ) ) / 2 + 39 } , 37
$ { ( u ( n ) + u ( h ) ) / 2 + 33 } , 46 $ { ( u ( n ) + u ( h ) ) / 2 + 54 } , 46
` },uI,8,sI),Q("polygon",{filter: ` url ( # $ { t } ) ` ,fill:u(o)[0],opacity:"0.5",points: `
$ { ( u ( n ) + u ( h ) ) / 2 + 90 } , 37 $ { ( u ( n ) + u ( h ) ) / 2 + 69 } , 37
$ { ( u ( n ) + u ( h ) ) / 2 + 63 } , 46 $ { ( u ( n ) + u ( h ) ) / 2 + 84 } , 46
` },fI,8,cI),Q("text",{x: ` $ { u ( n ) / 2 } ` ,y:u(f),fill:u(s),"font-size":u(c),"text-anchor":"middle","dominant-baseline":"middle"},w3(u(a)),9,hI),Q("polygon",{fill:u(o)[0],filter: ` url ( # $ { t } ) ` ,points: `
7 , $ { 53 + ( u ( i ) - 167 ) / 2 } 11 , $ { 57 + ( u ( i ) - 167 ) / 2 }
11 , $ { 133 + ( u ( i ) - 167 ) / 2 } 7 , $ { 137 + ( u ( i ) - 167 ) / 2 }
` },null,8,pI),Q("polygon",{fill:u(o)[0],filter: ` url ( # $ { t } ) ` ,points: `
$ { u ( n ) - 7 } , $ { 53 + ( u ( i ) - 167 ) / 2 } $ { u ( n ) - 11 } , $ { 57 + ( u ( i ) - 167 ) / 2 }
$ { u ( n ) - 11 } , $ { 133 + ( u ( i ) - 167 ) / 2 } $ { u ( n ) - 7 } , $ { 137 + ( u ( i ) - 167 ) / 2 }
` },null,8,mI)],8,ND))]))}});const _I=F2(gI,[["__scopeId","data-v-4dd6360b"]]),vI=Object.freeze(Object.defineProperty({__proto__:null,default:_I},Symbol.toStringTag,{value:"Module"})),yI=["width","height"],bI=["fill","points"],xI=["width","height"],SI=["fill"],MI=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,t=["left-top","right-top","left-bottom","right-bottom"],{w:n,h:i}= $ 1(e.chartConfig.attr),{colors:o,backgroundColor:a}= $ 1(e.chartConfig.option);return(s,c)=>(G(),h1("div",{class:"go-border-box",style:Z2( ` box - shadow : inset 0 0 25 px 3 px $ { u ( o ) [ 0 ] } ` )},[(G(),h1("svg",{width:u(n),height:u(i)},[Q("polygon",{fill:u(a),points: `
4 , 0 $ { u ( n ) - 4 } , 0 $ { u ( n ) } , 4 $ { u ( n ) } , $ { u ( i ) - 4 } $ { u ( n ) - 4 } , $ { u ( i ) }
4 , $ { u ( i ) } 0 , $ { u ( i ) - 4 } 0 , 4
` },null,8,bI)],8,yI)),(G(),h1(F1,null,g2(t,f=>Q("svg",{width:u(n),height:u(i),key:f,class:h7( ` border - item $ { f } ` )},[Q("polygon",{fill:u(o)[1],points:"40, 0 5, 0 0, 5 0, 16 3, 19 3, 7 7, 3 35, 3"},null,8,SI)],10,xI)),64))],4))}});const wI=F2(MI,[["__scopeId","data-v-37a601de"]]),AI=Object.freeze(Object.defineProperty({__proto__:null,default:wI},Symbol.toStringTag,{value:"Module"})),CI=["width","height"],TI=["stroke"],EI=["stroke","points"],DI=["stroke","points"],II=["stroke","points"],RI=["stroke"],OI=["stroke","points"],LI=["stroke","points"],PI=["stroke","points"],zI=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,backgroundColor:o}= $ 1(e.chartConfig.option);return(a,s)=>(G(),h1("div",{class:"go-border-box",style:Z2( `
box - shadow : inset 0 0 40 px $ { u ( i ) [ 0 ] } ;
border : 1 px solid $ { u ( i ) [ 1 ] } ;
background - color : $ { u ( o ) } ;
` )},[(G(),h1("svg",{width:u(t),height:u(n)},[Q("polyline",{class:"go-border-line-w-2",stroke:u(i)[0],points:"0, 25 0, 0 25, 0"},null,8,TI),Q("polyline",{class:"go-border-line-w-2",stroke:u(i)[0],points: ` $ { u ( t ) - 25 } , 0 $ { u ( t ) } , 0 $ { u ( t ) } , 25 ` },null,8,EI),Q("polyline",{class:"go-border-line-w-2",stroke:u(i)[0],points: ` $ { u ( t ) - 25 } , $ { u ( n ) } $ { u ( t ) } , $ { u ( n ) } $ { u ( t ) } , $ { u ( n ) - 25 } ` },null,8,DI),Q("polyline",{class:"go-border-line-w-2",stroke:u(i)[0],points: ` 0 , $ { u ( n ) - 25 } 0 , $ { u ( n ) } 25 , $ { u ( n ) } ` },null,8,II),Q("polyline",{class:"go-border-line-w-5",stroke:u(i)[1],points:"0, 10 0, 0 10, 0"},null,8,RI),Q("polyline",{class:"go-border-line-w-5",stroke:u(i)[1],points: ` $ { u ( t ) - 10 } , 0 $ { u ( t ) } , 0 $ { u ( t ) } , 10 ` },null,8,OI),Q("polyline",{class:"go-border-line-w-5",stroke:u(i)[1],points: ` $ { u ( t ) - 10 } , $ { u ( n ) } $ { u ( t ) } , $ { u ( n ) } $ { u ( t ) } , $ { u ( n ) - 10 } ` },null,8,LI),Q("polyline",{class:"go-border-line-w-5",stroke:u(i)[1],points: ` 0 , $ { u ( n ) - 10 } 0 , $ { u ( n ) } 10 , $ { u ( n ) } ` },null,8,PI)],8,CI))],4))}});const kI=F2(zI,[["__scopeId","data-v-9d777740"]]),UI=Object.freeze(Object.defineProperty({__proto__:null,default:kI},Symbol.toStringTag,{value:"Module"})),Gh=r=>(r5("data-v-1e74db59"),r=r(),o5(),r),NI={class:"go-border-box"},FI=["width","height"],BI=Gh(()=>Q("animate",{attributeName:"x1",values:"0%;100%;0%",dur:"10s",begin:"0s",repeatCount:"indefinite"},null,-1)),GI=Gh(()=>Q("animate",{attributeName:"x2",values:"100%;0%;100%",dur:"10s",begin:"0s",repeatCount:"indefinite"},null,-1)),VI=["stop-color"],WI=["values"],jI=["stop-color"],HI=["values"], $ I=["points"],YI=["points"],JI=["points"],ZI=["points"],XI=["points"],qI=["points"],QI=["points"],KI=["points"],eR=["points"],tR=["fill","points"],nR=["width","height","fill","mask"],iR=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,t= ` border - box - 07 - filter - $ { g9 ( ) } ` ,n= ` border - box - 07 - mask - $ { g9 ( ) } ` ,{w:i,h:o}= $ 1(e.chartConfig.attr),{colors:a,backgroundColor:s}= $ 1(e.chartConfig.option);return(c,f)=>(G(),h1("div",NI,[(G(),h1("svg",{width:u(i),height:u(o)},[Q("defs",null,[Q("linearGradient",{id:t,x1:"0%",y1:"0%",x2:"100%",y2:"100%"},[BI,GI,Q("stop",{offset:"0%","stop-color":u(a)[0]},[Q("animate",{attributeName:"stop-color",values: ` $ { u ( a ) [ 0 ] } ; $ { u ( a ) [ 1 ] } ; $ { u ( a ) [ 0 ] } ` ,dur:"10s",begin:"0s",repeatCount:"indefinite"},null,8,WI)],8,VI),Q("stop",{offset:"100%","stop-color":u(a)[1]},[Q("animate",{attributeName:"stop-color",values: ` $ { u ( a ) [ 1 ] } ; $ { u ( a ) [ 0 ] } ; $ { u ( a ) [ 1 ] } ` ,dur:"10s",begin:"0s",repeatCount:"indefinite"},null,8,HI)],8,jI)]),Q("mask",{id:n},[Q("polyline",{stroke:"#fff","stroke-width":"3",fill:"transparent",points: ` 8 , $ { u ( o ) * . 4 } 8 , 3 , $ { u ( i ) * . 4 + 7 } , 3 ` },null,8, $ I),Q("polyline",{fill:"#fff",points: ` 8 , $ { u ( o ) * . 15 } 8 , 3 , $ { u ( i ) * . 1 + 7 } , 3
$ { u ( i ) * . 1 } , 8 14 , 8 14 , $ { u ( o ) * . 15 - 7 }
` },null,8,YI),Q("polyline",{stroke:"#fff","stroke-width":"3",fill:"transparent",points: ` $ { u ( i ) * . 5 } , 3 $ { u ( i ) - 3 } , 3 , $ { u ( i ) - 3 } , $ { u ( o ) * . 25 } ` },null,8,JI),Q("polyline",{fill:"#fff",points: `
$ { u ( i ) * . 52 } , 3 $ { u ( i ) * . 58 } , 3
$ { u ( i ) * . 58 - 7 } , 9 $ { u ( i ) * . 52 + 7 } , 9
` },null,8,ZI),Q("polyline",{fill:"#fff",points: `
$ { u ( i ) * . 9 } , 3 $ { u ( i ) - 3 } , 3 $ { u ( i ) - 3 } , $ { u ( o ) * . 1 }
$ { u ( i ) - 9 } , $ { u ( o ) * . 1 - 7 } $ { u ( i ) - 9 } , 9 $ { u ( i ) * . 9 + 7 } , 9
` },null,8,XI),Q("polyline",{stroke:"#fff","stroke-width":"3",fill:"transparent",points: ` 8 , $ { u ( o ) * . 5 } 8 , $ { u ( o ) - 3 } $ { u ( i ) * . 3 + 7 } , $ { u ( o ) - 3 } ` },null,8,qI),Q("polyline",{fill:"#fff",points: `
8 , $ { u ( o ) * . 55 } 8 , $ { u ( o ) * . 7 }
2 , $ { u ( o ) * . 7 - 7 } 2 , $ { u ( o ) * . 55 + 7 }
` },null,8,QI),Q("polyline",{stroke:"#fff","stroke-width":"3",fill:"transparent",points: ` $ { u ( i ) * . 35 } , $ { u ( o ) - 3 } $ { u ( i ) - 3 } , $ { u ( o ) - 3 } $ { u ( i ) - 3 } , $ { u ( o ) * . 35 } ` },null,8,KI),Q("polyline",{fill:"#fff",points: `
$ { u ( i ) * . 92 } , $ { u ( o ) - 3 } $ { u ( i ) - 3 } , $ { u ( o ) - 3 } $ { u ( i ) - 3 } , $ { u ( o ) * . 8 }
$ { u ( i ) - 9 } , $ { u ( o ) * . 8 + 7 } $ { u ( i ) - 9 } , $ { u ( o ) - 9 } $ { u ( i ) * . 92 + 7 } , $ { u ( o ) - 9 }
` },null,8,eR)])]),Q("polygon",{fill:u(s),points: `
15 , 9 $ { u ( i ) * . 1 + 1 } , 9 $ { u ( i ) * . 1 + 4 } , 6 $ { u ( i ) * . 52 + 2 } , 6
$ { u ( i ) * . 52 + 6 } , 10 $ { u ( i ) * . 58 - 7 } , 10 $ { u ( i ) * . 58 - 2 } , 6
$ { u ( i ) * . 9 + 2 } , 6 $ { u ( i ) * . 9 + 6 } , 10 $ { u ( i ) - 10 } , 10 $ { u ( i ) - 10 } , $ { u ( o ) * . 1 - 6 }
$ { u ( i ) - 6 } , $ { u ( o ) * . 1 - 1 } $ { u ( i ) - 6 } , $ { u ( o ) * . 8 + 1 } $ { u ( i ) - 10 } , $ { u ( o ) * . 8 + 6 }
$ { u ( i ) - 10 } , $ { u ( o ) - 10 } $ { u ( i ) * . 92 + 7 } , $ { u ( o ) - 10 } $ { u ( i ) * . 92 + 2 } , $ { u ( o ) - 6 }
11 , $ { u ( o ) - 6 } 11 , $ { u ( o ) * . 15 - 2 } 15 , $ { u ( o ) * . 15 - 7 }
` },null,8,tR),Q("rect",{x:"0",y:"0",width:u(i),height:u(o),fill: ` url ( # $ { t } ) ` ,mask: ` url ( # $ { n } ) ` },null,8,nR)],8,FI))]))}});const rR=F2(iR,[["__scopeId","data-v-1e74db59"]]),oR=Object.freeze(Object.defineProperty({__proto__:null,default:rR},Symbol.toStringTag,{value:"Module"})),Vh=r=>(r5("data-v-966367ac"),r=r(),o5(),r),aR={class:"go-border-box"},sR=["width","height"],lR=["d"],uR=Vh(()=>Q("stop",{offset:"0%","stop-color":"#fff","stop-opacity":"1"},null,-1)),cR=Vh(()=>Q("stop",{offset:"100%","stop-color":"#fff","stop-opacity":"0"},null,-1)),dR=[uR,cR],fR=["fill"],hR=["dur","path"],pR=["fill","points"],mR=["stroke","xlink:href"],gR=["stroke","xlink:href","mask"],_R=["from","to","dur"],vR=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,t= ` border - box - 08 - path - $ { g9 ( ) } ` ,n= ` border - box - 08 - gradient - $ { g9 ( ) } ` ,i= ` border - box - 08 - mask - $ { g9 ( ) } ` ,{w:o,h:a}= $ 1(e.chartConfig.attr),{colors:s,dur:c,backgroundColor:f,reverse:h}= $ 1(e.chartConfig.option),m=I2(()=>(o.value+a.value-5)*2),g=I2(()=>h.value? ` M 2.5 , 2.5 L 2.5 , $ { a . value - 2.5 } L $ { o . value - 2.5 } , $ { a . value - 2.5 } L $ { o . value - 2.5 } , 2.5 L 2.5 , 2.5 ` : ` M2 . 5 , 2.5 L$ { o . value - 2.5 } , 2.5 L$ { o . value - 2.5 } , $ { a . value - 2.5 } L2 . 5 , $ { a . value - 2.5 } L2 . 5 , 2.5 ` );return(v,S)=>(G(),h1("div",aR,[(G(),h1("svg",{width:u(o),height:u(a)},[Q("defs",null,[Q("path",{id:t,d:g.value,fill:"transparent"},null,8,lR),Q("radialGradient",{id:n,cx:"50%",cy:"50%",r:"50%"},dR),Q("mask",{id:i},[Q("circle",{cx:"0",cy:"0",r:"150",fill: ` url ( # $ { n } ) ` },[Q("animateMotion",{dur: ` $ { u ( c ) } s ` ,path:g.value,rotate:"auto",repeatCount:"indefinite"},null,8,hR)],8,fR)])]),Q("polygon",{fill:u(f),points: ` 5 , 5 $ { u ( o ) - 5 } , 5 $ { u ( o ) - 5 } $ { u ( a ) - 5 } 5 , $ { u ( a ) - 5 } ` },null,8,pR),Q("use",{stroke:u(s)[0],"stroke-width":"1","xlink:href": ` # $ { t } ` },null,8,mR),Q("use",{stroke:u(s)[1],"stroke-width":"3","xlink:href": ` # $ { t } ` ,mask: ` url ( # $ { i } ) ` },[Q("animate",{attributeName:"stroke-dasharray",from: ` 0 , $ { m . value } ` ,to: ` $ { m . value } , 0 ` ,dur: ` $ { u ( c ) } s ` ,repeatCount:"indefinite"},null,8,_R)],8,gR)],8,sR))]))}});const yR=F2(vR,[["__scopeId","data-v-966367ac"]]),bR=Object.freeze(Object.defineProperty({__proto__:null,default:yR},Symbol.toStringTag,{value:"Module"})),xR={class:"go-border-box"},SR=["width","height"],MR=["fill","points"],wR=["fill"],AR=["fill","cx"],CR=["fill","cx","cy"],TR=["fill","cy"],ER=["stroke","points"],DR=["stroke","points"],IR=["stroke","points"],RR=["stroke","points"],OR=["stroke"],LR=["stroke"],PR=["stroke","points"],zR=["stroke","points"],kR=["stroke","points"],UR=["stroke","points"],NR=["stroke","points"],FR=["stroke","points"],BR=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,backgroundColor:o}= $ 1(e.chartConfig.option);return(a,s)=>(G(),h1("div",xR,[(G(),h1("svg",{width:u(t),height:u(n)},[Q("polygon",{fill:u(o),points: ` 9 , 7 $ { u ( t ) - 9 } , 7 $ { u ( t ) - 9 } , $ { u ( n ) - 7 } 9 , $ { u ( n ) - 7 } ` },null,8,MR),Q("circle",{fill:u(i)[1],cx:"5",cy:"5",r:"2"},null,8,wR),Q("circle",{fill:u(i)[1],cx:u(t)-5,cy:"5",r:"2"},null,8,AR),Q("circle",{fill:u(i)[1],cx:u(t)-5,cy:u(n)-5,r:"2"},null,8,CR),Q("circle",{fill:u(i)[1],cx:"5",cy:u(n)-5,r:"2"},null,8,TR),Q("polyline",{stroke:u(i)[0],points: ` 10 , 4 $ { u ( t ) - 10 } , 4 ` },null,8,ER),Q("polyline",{stroke:u(i)[0],points: ` 10 , $ { u ( n ) - 4 } $ { u ( t ) - 10 } , $ { u ( n ) - 4 } ` },null,8,DR),Q("polyline",{stroke:u(i)[0],points: ` 5 , 70 5 , $ { u ( n ) - 70 } ` },null,8,IR),Q("polyline",{stroke:u(i)[0],points: ` $ { u ( t ) - 5 } , 70 $ { u ( t ) - 5 } , $ { u ( n ) - 70 } ` },null,8,RR),Q("polyline",{stroke:u(i)[0],points:"3, 10, 3, 50"},null,8,OR),Q("polyline",{stroke:u(i)[0],points:"7, 30 7, 80"},null,8,LR),Q("polyline",{stroke:u(i)[0],points: ` $ { u ( t ) - 3 } , 10 $ { u ( t ) - 3 } , 50 ` },null,8,PR),Q("polyline",{stroke:u(i)[0],points: ` $ { u ( t ) - 7 } , 30 $ { u ( t ) - 7 } , 80 ` },null,8,zR),Q("polyline",{stroke:u(i)[0],points: ` 3 , $ { u ( n ) - 10 } 3 , $ { u ( n ) - 50 } ` },null,8,kR),Q("polyline",{stroke:u(i)[0],points: ` 7 , $ { u ( n ) - 30 } 7 , $ { u ( n ) - 80 } ` },null,8,UR),Q("polyline",{stroke:u(i)[0],points: ` $ { u ( t ) - 3 } , $ { u ( n ) - 10 } $ { u ( t ) - 3 } , $ { u ( n ) - 50 } ` },null,8,NR),Q("polyline",{stroke:u(i)[0],points: ` $ { u ( t ) - 7 } , $ { u ( n ) - 30 } $ { u ( t ) - 7 } , $ { u ( n ) - 80 } ` },null,8,FR)],8,S
$ { u ( t ) - 15 } , 22 170 , 22 150 , 7 40 , 7 28 , 21 32 , 24
16 , 42 16 , $ { u ( n ) - 32 } 41 , $ { u ( n ) - 7 } $ { u ( t ) - 15 } , $ { u ( n ) - 7 }
` },null,8,HR),Q("polyline",{class:"go-border-line-1",stroke:u(i)[0],points: ` 145 , $ { u ( n ) - 5 } 40 , $ { u ( n ) - 5 } 10 , $ { u ( n ) - 35 }
10 , 40 40 , 5 150 , 5 170 , 20 $ { u ( t ) - 15 } , 20 ` },null,8, $ R),Q("polyline",{stroke:u(i)[1],class:"go-border-line-2",points: ` 245 , $ { u ( n ) - 1 } 36 , $ { u ( n ) - 1 } 14 , $ { u ( n ) - 23 }
14 , $ { u ( n ) - 100 } ` },null,8,YR),Q("polyline",{class:"go-border-line-3",stroke:u(i)[0],points: ` 7 , $ { u ( n ) - 40 } 7 , $ { u ( n ) - 75 } ` },null,8,JR),Q("polyline",{class:"go-border-line-4",stroke:u(i)[0],points:"28, 24 13, 41 13, 64"},null,8,ZR),Q("polyline",{class:"go-border-line-5",stroke:u(i)[0],points:"5, 45 5, 140"},null,8,XR),Q("polyline",{class:"go-border-line-6",stroke:u(i)[1],points:"14, 75 14, 180"},null,8,qR),Q("polyline",{class:"go-border-line-7",stroke:u(i)[1],points:"55, 11 147, 11 167, 26 250, 26"},null,8,QR),Q("polyline",{class:"go-border-line-8",stroke:u(i)[1],points:"158, 5 173, 16"},null,8,KR),Q("polyline",{class:"go-border-line-9",stroke:u(i)[0],points: ` 200 , 17 $ { u ( t ) - 10 } , 17 ` },null,8,eO),Q("polyline",{class:"go-border-line-10",stroke:u(i)[1],points: ` 385 , 17 $ { u ( t ) - 10 } , 17 ` },null,8,tO)],8,jR))]))}});const iO=F2(nO,[["__scopeId","data-v-03a8a229"]]),rO=Object.freeze(Object.defineProperty({__proto__:null,default:iO},Symbol.toStringTag,{value:"Module"})),oO={class:"go-border-box"},aO=["width","height"],sO=["fill","points"],lO=["stroke","points"],uO=["stroke","points"],cO=["stroke","points"],dO=["stroke","points"],fO=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,backgroundColor:o}= $ 1(e.chartConfig.option);return(a,s)=>(G(),h1("div",oO,[(G(),h1("svg",{class:"bv-border-svg-container",width:u(t),height:u(n)},[Q("polygon",{fill:u(o),points: `
23 , 23 $ { u ( t ) - 24 } , 23 $ { u ( t ) - 24 } , $ { u ( n ) - 24 } 23 , $ { u ( n ) - 24 }
` },null,8,sO),Q("polyline",{class:"go-border-line-1",stroke:u(i)[0],points: ` 4 , 4 $ { u ( t ) - 22 } , 4 $ { u ( t ) - 22 } , $ { u ( n ) - 22 } 4 , $ { u ( n ) - 22 } 4 , 4 ` },null,8,lO),Q("polyline",{class:"go-border-line-3",stroke:u(i)[1],points: ` 10 , 10 $ { u ( t ) - 16 } , 10 $ { u ( t ) - 16 } , $ { u ( n ) - 16 } 10 , $ { u ( n ) - 16 } 10 , 10 ` },null,8,uO),Q("polyline",{class:"go-border-line-3",stroke:u(i)[1],points: ` 16 , 16 $ { u ( t ) - 10 } , 16 $ { u ( t ) - 10 } , $ { u ( n ) - 10 } 16 , $ { u ( n ) - 10 } 16 , 16 ` },null,8,cO),Q("polyline",{class:"go-border-line-3",stroke:u(i)[1],points: ` 22 , 22 $ { u ( t ) - 4 } , 22 $ { u ( t ) - 4 } , $ { u ( n ) - 4 } 22 , $ { u ( n ) - 4 } 22 , 22 ` },null,8,dO)],8,aO))]))}});const hO=F2(fO,[["__scopeId","data-v-454ad1b3"]]),pO=Object.freeze(Object.defineProperty({__proto__:null,default:hO},Symbol.toStringTag,{value:"Module"})),mO={class:"go-border-box"},gO=["width","height"],_O=["fill","points"],vO=["stroke","points"],yO=["stroke","points"],bO=["stroke","points"],xO=["stroke","points"],SO=["stroke","points"],MO=["stroke","points"],wO=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,backgroundColor:o}= $ 1(e.chartConfig.option);return(a,s)=>(G(),h1("div",mO,[(G(),h1("svg",{width:u(t),height:u(n)},[Q("polygon",{fill:u(o),points: `
10 , 22 $ { u ( t ) - 22 } , 22 $ { u ( t ) - 22 } , $ { u ( n ) - 86 } $ { u ( t ) - 84 } , $ { u ( n ) - 24 } 10 , $ { u ( n ) - 24 }
` },null,8,_O),Q("polyline",{class:"bv-bb5-line-1",stroke:u(i)[0],points: ` 8 , 5 $ { u ( t ) - 5 } , 5 $ { u ( t ) - 5 } , $ { u ( n ) - 100 }
$ { u ( t ) - 100 } , $ { u ( n ) - 5 } 8 , $ { u ( n ) - 5 } 8 , 5 ` },null,8,vO),Q("polyline",{class:"bv-bb5-line-2",stroke:u(i)[1],points: ` 3 , 5 $ { u ( t ) - 20 } , 5 $ { u ( t ) - 20 } , $ { u ( n ) - 60 }
$ { u ( t ) - 74 } , $ { u ( n ) - 5 } 3 , $ { u ( n ) - 5 } 3 , 5 ` },null,8,yO),Q("polyline",{class:"bv-bb5-line-3",stroke:u(i)[1],points: ` 50 , 13 $ { u ( t ) - 35 } , 13 ` },null,8,bO),Q("polyline",{class:"bv-bb5-line-4",stroke:u(i)[1],points: ` 15 , 20 $ { u ( t ) - 35 } , 20 ` },null,8,xO),Q("polyline",{class:"bv-bb5-line-5",stroke:u(i)[1],points: ` 15 , $ { u ( n ) - 20 } $ { u ( t ) - 110 } , $ { u ( n ) - 20 } ` },null,8,SO),Q("polyline",{class:"bv-bb5-line-6",stroke:u(i)[1],points: ` 15 , $ { u ( n ) - 13 } $ { u ( t ) - 110 } , $ { u ( n ) - 13 } ` },null,8,MO)],8,gO))]))}});const AO=F2(wO,[["__scopeId","data-v-80c70916"]]),CO=Object.freeze(Object.defineProperty({__proto__:null,default:AO},Symbol.toStringTag,{value:"Module"})),TO={class:"go-border-box"},EO=["width","height"],DO=["fill","points"],IO=["stroke","points"],RO=["stroke","points"],OO=["fill"],LO=["fill","cx"],PO=["fill","cx","cy"],zO=["fill","cy"],kO=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,backgroundColor:o}= $ 1(e.chartConfig.option);return(a,s)=>(G(),h1("div",TO,[(G(),h1("svg",{width:u(t),height:u(n)},[Q("polygon",{fill:u(o),points: `
7 , 7 $ { u ( t ) - 7 } , 7 $ { u ( t ) - 7 } , $ { u ( n ) - 7 } 7 , $ { u ( n ) - 7 }
` },null,8,DO),Q("polyline",{stroke:u(i)[0],points: ` 2 , 2 $ { u ( t ) - 2 } , 2 $ { u ( t ) - 2 } , $ { u ( n ) - 2 } 2 , $ { u ( n ) - 2 } 2 , 2 ` },null,8,IO),Q("polyline",{stroke:u(i)[1],points: ` 6 , 6 $ { u ( t ) - 6 } , 6 $ { u ( t ) - 6 } , $ { u ( n ) - 6 } 6 , $ { u ( n ) - 6 } 6 , 6 ` },null,8,RO),Q("circle",{fill:u(i)[0],cx:"11",cy:"11",r:"1"},null,8,OO),Q("circle",{fill:u(i)[0],cx:u(t)-11,cy:"11",r:"1"},null,8,LO),Q("circle",{fill:u(i)[0],cx:u(t)-11,cy:u(n)-11,r:"1"},null,8,PO),Q("circle",{fill:u(i)[0],cx:"11",cy:u(n)-11,r:"1"},null,8,zO)],8,EO))]))}});const UO=F2(kO,[["__scopeId","data-v-e5e18ea8"]]),NO=Object.freeze(Object.defineProperty({__proto__:null,default:UO},Symbol.toStringTag,{value:"Module"})),FO=["width","height"],BO=["x","y","width","height","fill"],GO=["to","dur"],VO=["x","y","width","height","fill"],WO=["to","dur"],jO=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,dur:o,endWidth:a,lineHeight:s}= $ 1(e.chartConfig.option),c=I2(()=>0),f=I2(()=>n.value/2);return(h,m)=>(G(),h1("svg",{width:u(t),height:u(n)},[Q("rect",{x:c.value,y:f.value,width:u(t),height:u(s),fill:u(i)[0]},[Q("animate",{attributeName:"width",from:"0",to:u(t),dur: ` $ { u ( o ) } s ` ,calcMode:"spline",keyTimes:"0;1",keySplines:".42,0,.58,1",repeatCount:"indefinite"},null,8,GO)],8,BO),Q("rect",{x:c.value,y:f.value,width:u(a),height:u(s),fill:u(i)[1]},[Q("animate",{attributeName:"x",from:"0",to:u(t),dur: ` $ { u ( o ) } s ` ,calcMode:"spline",keyTimes:"0;1",keySplines:"0.42,0,0.58,1",repeatCount:"indefinite"},null,8,WO)],8,VO)],8,FO))}}),HO=Object.freeze(Object.defineProperty({__proto__:null,default:jO},Symbol.toStringTag,{value:"Module"})), $ O=["width"],YO=["stroke","points"],JO=["stroke","points"],ZO=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,dur:o,lineHeight:a}= $ 1(e.chartConfig.option);return(s,c)=>(G(),h1("div",{class:"go-decorates-2",style:Z2( ` width : $ { u ( t ) } px ; height : $ { u ( a ) } px animation - duration : $ { u ( o ) } s ` )},[(G(),h1("svg",{width:u(t),height:3},[Q("polyline",{stroke:u(i)[0],points: ` 0 , 2.5 $ { u ( t ) } , 2.5 ` },null,8,YO),Q("polyline",{stroke:u(i)[1],"stroke-width":"3","stroke-dasharray":"20, 80","stroke-dashoffset":"-30",points: ` 0 , 2.5 $ { u ( t ) } , 2.5 ` },null,8,JO)],8, $ O))],4))}});const XO=F2(ZO,[["__scopeId","data-v-bf54f1e3"]]),qO=Object.freeze(Object.defineProperty({__proto__:null,default:XO},Symbol.toStringTag,{value:"Module"})),QO={width:20,height:20},KO=["stroke"],eL=["stroke"],tL={width:20,height:20},nL=["stroke"],iL=["stroke"],rL=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,dataset:o,textSize:a,textColor:s}= $ 1(e.chartConfig.option);return(c,f)=>(G(),h1("div",{class:"go-border-03",style:Z2( ` width : $ { u ( t ) } px ; height : $ { u ( n ) } px ` )},[(G(),h1("svg",QO,[Q("polyline",{"stroke-width":"4",fill:"transparent",stroke:u(i)[0],points:"10, 0 19, 10 10, 20"},null,8,KO),Q("polyline",{"stroke-width":"2",fill:"transparent",stroke:u(i)[1],points:"2, 0 11, 10 2, 20"},null,8,eL)])),Q("span",{style:Z2( ` color : $ { u ( s ) } ; font - size : $ { u ( a ) } px ` )},w3(u(o)),5),(G(),h1("svg",tL,[Q("polyline",{"stroke-width":"4",fill:"transparent",stroke:u(i)[0],points:"11, 0 2, 10 11, 20"},null,8,nL),Q("polyline",{"stroke-width":"2",fill:"transparent",stroke:u(i)[1],points:"19, 0 10, 10 19, 20"},null,8,iL)]))],4))}});const oL=F2(rL,[["__scopeId","data-v-a4359992"]]),aL=Object.freeze(Object.defineProperty({__proto__:null,default:oL},Symbol.toStringTag,{value:"Module"})),sL={class:"go-border-04"},lL=["width","height"],uL=["stroke","points"],cL=["stroke","points"],dL=["stroke","points"],fL=S1({__name:"index",props:{chartConfig:{type:Object,required:!0}},setup(r){const e=r,{w:t,h:n}= $ 1(e.chartConfig.attr),{colors:i,reverse:o}= $ 1(e.chartConfig.option),a=s=>o.value?t.value-s:s;return(s,c)=>(G(),h1("div",sL,[(G(),h1("svg",{width:u(t),height:u(n)},[Q("polyline",{stroke:u(i)[0],"stroke-width":"2",fill:"transparent",points: ` $ { a ( 0 ) } , 0 $ { a ( 30 ) } , $ { u ( n ) / 2 } ` },null,8,uL),Q("polyline",{stroke:u(i)[0],"stroke-width":"2",fill:"transparent",points: ` $ { a (
letter - spacing : $ { u ( g ) } px ; font - weight : $ { u ( v ) } ;
text - shadow : $ { u ( o ) } ` )},w3(u(i)),5)],4))}});const ZP=F2(JP,[["__scopeId","data-v-c7a246c7"]]),XP=Object.freeze(Object.defineProperty({__proto__:null,default:ZP},Symbol.toStringTag,{value:"Module"}));/**
* @ license
* Copyright 2010 - 2022 Three . js Authors
* SPDX - License - Identifier : MIT
* / c o n s t C a = " 1 4 5 " , f 8 = { L E F T : 0 , M I D D L E : 1 , R I G H T : 2 , R O T A T E : 0 , D O L L Y : 1 , P A N : 2 } , h 8 = { R O T A T E : 0 , P A N : 1 , D O L L Y _ P A N : 2 , D O L L Y _ R O T A T E : 3 } , q P = 0 , z c = 1 , Q P = 2 , W h = 1 , K P = 2 , V 6 = 3 , X 8 = 0 , h 0 = 1 , G 0 = 2 , X 9 = 0 , O 5 = 1 , k c = 2 , U c = 3 , N c = 4 , e z = 5 , z 8 = 1 0 0 , t z = 1 0 1 , n z = 1 0 2 , F c = 1 0 3 , B c = 1 0 4 , i z = 2 0 0 , r z = 2 0 1 , o z = 2 0 2 , a z = 2 0 3 , j h = 2 0 4 , H h = 2 0 5 , s z = 2 0 6 , l z = 2 0 7 , u z = 2 0 8 , c z = 2 0 9 , d z = 2 1 0 , f z = 0 , h z = 1 , p z = 2 , j r = 3 , m z = 4 , g z = 5 , _ z = 6 , v z = 7 , $ h = 0 , y z = 1 , b z = 2 , _ 9 = 0 , x z = 1 , S z = 2 , M z = 3 , w z = 4 , A z = 5 , Y h = 3 0 0 , q 8 = 3 0 1 , Q 8 = 3 0 2 , H r = 3 0 3 , $ r = 3 0 4 , x t = 3 0 6 , Y r = 1 e 3 , D 0 = 1 0 0 1 , J r = 1 0 0 2 , C 4 = 1 0 0 3 , G c = 1 0 0 4 , V c = 1 0 0 5 , a 0 = 1 0 0 6 , C z = 1 0 0 7 , S t = 1 0 0 8 , F 5 = 1 0 0 9 , T z = 1 0 1 0 , E z = 1 0 1 1 , J h = 1 0 1 2 , D z = 1 0 1 3 , T 5 = 1 0 1 4 , E 5 = 1 0 1 5 , e 7 = 1 0 1 6 , I z = 1 0 1 7 , R z = 1 0 1 8 , $ 8 = 1 0 2 0 , O z = 1 0 2 1 , L z = 1 0 2 2 , V 0 = 1 0 2 3 , P z = 1 0 2 4 , z z = 1 0 2 5 , L 5 = 1 0 2 6 , K 8 = 1 0 2 7 , k z = 1 0 2 8 , U z = 1 0 2 9 , N z = 1 0 3 0 , F z = 1 0 3 1 , B z = 1 0 3 3 , X n = 3 3 7 7 6 , q n = 3 3 7 7 7 , Q n = 3 3 7 7 8 , K n = 3 3 7 7 9 , W c = 3 5 8 4 0 , j c = 3 5 8 4 1 , H c = 3 5 8 4 2 , $ c = 3 5 8 4 3 , G z = 3 6 1 9 6 , Y c = 3 7 4 9 2 , J c = 3 7 4 9 6 , Z c = 3 7 8 0 8 , X c = 3 7 8 0 9 , q c = 3 7 8 1 0 , Q c = 3 7 8 1 1 , K c = 3 7 8 1 2 , e d = 3 7 8 1 3 , t d = 3 7 8 1 4 , n d = 3 7 8 1 5 , i d = 3 7 8 1 6 , r d = 3 7 8 1 7 , o d = 3 7 8 1 8 , a d = 3 7 8 1 9 , s d = 3 7 8 2 0 , l d = 3 7 8 2 1 , u d = 3 6 4 9 2 , B 5 = 3 e 3 , M 3 = 3 0 0 1 , V z = 3 2 0 0 , W z = 3 2 0 1 , j z = 0 , H z = 1 , d 9 = " s r g b " , D 5 = " s r g b - l i n e a r " , e i = 7 6 8 0 , $ z = 5 1 9 , Z r = 3 5 0 4 4 , c d = " 3 0 0 e s " , X r = 1 0 3 5 ; c l a s s H 5 { a d d E v e n t L i s t e n e r ( e , t ) { t h i s . _ l i s t e n e r s = = = v o i d 0 & & ( t h i s . _ l i s t e n e r s = { } ) ; c o n s t n = t h i s . _ l i s t e n e r s ; n [ e ] = = = v o i d 0 & & ( n [ e ] = [ ] ) , n [ e ] . i n d e x O f ( t ) = = = - 1 & & n [ e ] . p u s h ( t ) } h a s E v e n t L i s t e n e r ( e , t ) { i f ( t h i s . _ l i s t e n e r s = = = v o i d 0 ) r e t u r n ! 1 ; c o n s t n = t h i s . _ l i s t e n e r s ; r e t u r n n [ e ] ! = = v o i d 0 & & n [ e ] . i n d e x O f ( t ) ! = = - 1 } r e m o v e E v e n t L i s t e n e r ( e , t ) { i f ( t h i s . _ l i s t e n e r s = = = v o i d 0 ) r e t u r n ; c o n s t i = t h i s . _ l i s t e n e r s [ e ] ; i f ( i ! = = v o i d 0 ) { c o n s t o = i . i n d e x O f ( t ) ; o ! = = - 1 & & i . s p l i c e ( o , 1 ) } } d i s p a t c h E v e n t ( e ) { i f ( t h i s . _ l i s t e n e r s = = = v o i d 0 ) r e t u r n ; c o n s t n = t h i s . _ l i s t e n e r s [ e . t y p e ] ; i f ( n ! = = v o i d 0 ) { e . t a r g e t = t h i s ; c o n s t i = n . s l i c e ( 0 ) ; f o r ( l e t o = 0 , a = i . l e n g t h ; o < a ; o + + ) i [ o ] . c a l l ( t h i s , e ) ; e . t a r g e t = n u l l } } } c o n s t o 4 = [ " 0 0 " , " 0 1 " , " 0 2 " , " 0 3 " , " 0 4 " , " 0 5 " , " 0 6 " , " 0 7 " , " 0 8 " , " 0 9 " , " 0 a " , " 0 b " , " 0 c " , " 0 d " , " 0 e " , " 0 f " , " 1 0 " , " 1 1 " , " 1 2 " , " 1 3 " , " 1 4 " , " 1 5 " , " 1 6 " , " 1 7 " , " 1 8 " , " 1 9 " , " 1 a " , " 1 b " , " 1 c " , " 1 d " , " 1 e " , " 1 f " , " 2 0 " , " 2 1 " , " 2 2 " , " 2 3 " , " 2 4 " , " 2 5 " , " 2 6 " , " 2 7 " , " 2 8 " , " 2 9 " , " 2 a " , " 2 b " , " 2 c " , " 2 d " , " 2 e " , " 2 f " , " 3 0 " , " 3 1 " , " 3 2 " , " 3 3 " , " 3 4 " , " 3 5 " , " 3 6 " , " 3 7 " , " 3 8 " , " 3 9 " , " 3 a " , " 3 b " , " 3 c " , " 3 d " , " 3 e " , " 3 f " , " 4 0 " , " 4 1 " , " 4 2 " , " 4 3 " , " 4 4 " , " 4 5 " , " 4 6 " , " 4 7 " , " 4 8 " , " 4 9 " , " 4 a " , " 4 b " , " 4 c " , " 4 d " , " 4 e " , " 4 f " , " 5 0 " , " 5 1 " , " 5 2 " , " 5 3 " , " 5 4 " , " 5 5 " , " 5 6 " , " 5 7 " , " 5 8 " , " 5 9 " , " 5 a " , " 5 b " , " 5 c " , " 5 d " , " 5 e " , " 5 f " , " 6 0 " , " 6 1 " , " 6 2 " , " 6 3 " , " 6 4 " , " 6 5 " , " 6 6 " , " 6 7 " , " 6 8 " , " 6 9 " , " 6 a " , " 6 b " , " 6 c " , " 6 d " , " 6 e " , " 6 f " , " 7 0 " , " 7 1 " , " 7 2 " , " 7 3 " , " 7 4 " , " 7 5 " , " 7 6 " , " 7 7 " , " 7 8 " , " 7 9 " , " 7 a " , " 7 b " , " 7 c " , " 7 d " , " 7 e " , " 7 f " , " 8 0 " , " 8 1 " , " 8 2 " , " 8 3 " , " 8 4 " , " 8 5 " , " 8 6 " , " 8 7 " , " 8 8 " , " 8 9 " , " 8 a " , " 8 b " , " 8 c " , " 8 d " , " 8 e " , " 8 f " , " 9 0 " , " 9 1 " , " 9 2 " , " 9 3 " , " 9 4 " , " 9 5 " , " 9 6 " , " 9 7 " , " 9 8 " , " 9 9 " , " 9 a " , " 9 b " , " 9 c " , " 9 d " , " 9 e " , " 9 f " , " a 0 " , " a 1 " , " a 2 " , " a 3 " , " a 4 " , " a 5 " , " a 6 " , " a 7 " , " a 8 " , " a 9 " , " a a " , " a b " , " a c " , " a d " , " a e " , " a f " , " b 0 " , " b 1 " , " b 2 " , " b 3 " , " b 4 " , " b 5 " , " b 6 " , " b 7 " , " b 8 " , " b 9 " , " b a " , " b b " , " b c " , " b d " , " b e " , " b f " , " c 0 " , " c 1 " , " c 2 " , " c 3 " , " c 4 " , " c 5 " , " c 6 " , " c 7 " , " c 8 " , " c 9 " , " c a " , " c b " , " c c " , " c d " , " c e " , " c f " , " d 0 " , " d 1 " , " d 2 " , " d 3 " , " d 4 " , " d 5 " , " d 6 " , " d 7 " , " d 8 " , " d 9 " , " d a " , " d b " , " d c " , " d d " , " d e " , " d f " , " e 0 " , " e 1 " , " e 2 " , " e 3 " , " e 4 " , " e 5 " , " e 6 " , " e 7 " , " e 8 " , " e 9 " , " e a " , " e b " , " e c " , " e d " , " e e " , " e f " , " f 0 " , " f 1 " , " f 2 " , " f 3 " , " f 4 " , " f 5 " , " f 6 " , " f 7 " , " f 8 " , " f 9 " , " f a " , " f b " , " f c " , " f d " , " f e " , " f f " ] , t i = M a t h . P I / 1 8 0 , d d = 1 8 0 / M a t h . P I ; f u n c t i o n q 9 ( ) { c o n s t r = M a t h . r a n d o m ( ) * 4 2 9 4 9 6 7 2 9 5 | 0 , e = M a t h . r a n d o m ( ) * 4 2 9 4 9 6 7 2 9 5 | 0 , t = M a t h . r a n d o m ( ) * 4 2 9 4 9 6 7 2 9 5 | 0 , n = M a t h . r a n d o m ( ) * 4 2 9 4 9 6 7 2 9 5 | 0 ; r e t u r n ( o 4 [ r & 2 5 5 ] + o 4 [ r > > 8 & 2 5 5 ] + o 4 [ r > > 1 6 & 2 5 5 ] + o 4 [ r > > 2 4 & 2 5 5 ] + " - " + o 4 [ e & 2 5 5 ] + o 4 [ e > > 8 & 2 5 5 ] + " - " + o 4 [ e > > 1 6 & 1 5 | 6 4 ] + o 4 [ e > > 2 4 & 2 5 5 ] + " - " + o 4 [ t & 6 3 | 1 2 8 ] + o 4 [ t > > 8 & 2 5 5 ] + " - " + o 4 [ t > > 1 6 & 2 5 5 ] + o 4 [ t > > 2 4 & 2 5 5 ] + o 4 [ n & 2 5 5 ] + o 4 [ n > > 8 & 2 5 5 ] + o 4 [ n > > 1 6 & 2 5 5 ] + o 4 [ n > > 2 4 & 2 5 5 ] ) . t o L o w e r C a s e ( ) } f u n c t i o n s 4 ( r , e , t ) { r e t u r n M a t h . m a x ( e , M a t h . m i n ( t , r ) ) } f u n c t i o n Y z ( r , e ) { r e t u r n ( r % e + e ) % e } f u n c t i o n n i ( r , e , t ) { r e t u r n ( 1 - t ) * r + t * e } f u n c t i o n f d ( r ) { r e t u r n ( r & r - 1 ) = = = 0 & & r ! = = 0 } f u n c t i o n q r ( r ) { r e t u r n M a t h . p o w ( 2 , M a t h . f l o o r ( M a t h . l o g ( r ) / M a t h . L N 2 ) ) } f u n c t i o n $ 9 ( r , e ) { s w i t c h ( e . c o n s t r u c t o r ) { c a s e F l o a t 3 2 A r r a y : r e t u r n r ; c a s e U i n t 1 6 A r r a y : r e t u r n r / 6 5 5 3 5 ; c a s e U i n t 8 A r r a y : r e t u r n r / 2 5 5 ; c a s e I n t 1 6 A r r a y : r e t u r n M a t h . m a x ( r / 3 2 7 6 7 , - 1 ) ; c a s e I n t 8 A r r a y : r e t u r n M a t h . m a x ( r / 1 2 7 , - 1 ) ; d e f a u l t : t h r o w n e w E r r o r ( " I n v a l i d c o m p o n e n t t y p e . " ) } } f u n c t i o n l 3 ( r , e ) { s w i t c h ( e . c o n s t r u c t o r ) { c a s e F l o a t 3 2 A r r a y : r e t u r n r ; c a s e U i n t 1 6 A r r a y : r e t u r n M a t h . r o u n d ( r * 6 5 5 3 5 ) ; c a s e U i n t 8 A r r a y : r e t u r n M a t h . r o u n d ( r * 2 5 5 ) ; c a s e I n t 1 6 A r r a y : r e t u r n M a t h . r o u n d ( r * 3 2 7 6 7 ) ; c a s e I n t 8 A r r a y : r e t u r n M a t h . r o u n d ( r * 1 2 7 ) ; d
gl _Position = projectionMatrix * modelViewMatrix * vec4 ( position , 1.0 ) ;
} ` ,uk= ` void main ( ) {
gl _FragColor = vec4 ( 1.0 , 0.0 , 0.0 , 1.0 ) ;
} ` ;class y9 extends $ 5{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=lk,this.fragmentShader=uk,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=e6(e.uniforms),this.uniformsGroups=ak(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const i in this.uniforms){const a=this.uniforms[i].value;a&&a.isTexture?t.uniforms[i]={type:"t",value:a.toJSON(e).uuid}:a&&a.isColor?t.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?t.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?t.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?t.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?t.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?t.uniforms[i]={type:"m4",value:a.toArray()}:t.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class ip extends u4{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new R3,this.projectionMatrix=new R3,this.projectionMatrixInverse=new R3}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class s0 extends ip{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=dd*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ti*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return dd*2*Math.atan(Math.tan(ti*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,i,o,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(ti*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,o=-.5*i;const a=this.view;if(this.view!==null&&this.view.enabled){const c=a.
varying vec3 vWorldDirection ;
vec3 transformDirection ( in vec3 dir , in mat4 matrix ) {
return normalize ( ( matrix * vec4 ( dir , 0.0 ) ) . xyz ) ;
}
void main ( ) {
vWorldDirection = transformDirection ( position , modelMatrix ) ;
# include < begin _vertex >
# include < project _vertex >
}
` ,fragmentShader: `
uniform sampler2D tEquirect ;
varying vec3 vWorldDirection ;
# include < common >
void main ( ) {
vec3 direction = normalize ( vWorldDirection ) ;
vec2 sampleUV = equirectUv ( direction ) ;
gl _FragColor = texture2D ( tEquirect , sampleUV ) ;
}
` },i=new _7(5,5,5),o=new y9({name:"CubemapFromEquirect",uniforms:e6(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:h0,blending:X9});o.uniforms.tEquirect.value=t;const a=new e4(i,o),s=t.minFilter;return t.minFilter===St&&(t.minFilter=a0),new ck(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,i){const o=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(o)}}const Mi=new t1,fk=new t1,hk=new l0;class S5{constructor(e=new t1(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=Mi.subVectors(n,t).cross(fk.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(Mi),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:t.copy(n).multiplyScalar(o).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||hk.getNormalMatrix(e),i=this.coplanarPoint(Mi).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const C8=new m7,Le=new t1;class op{constructor(e=new S5,t=new S5,n=new S5,i=new S5,o=new S5,a=new S5){this.planes=[e,t,n,i,o,a]}set(e,t,n,i,o,a){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(i),s[4].copy(o),s[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],f=n[5],h=n[6],m=n[7],g=n[8],v=n[9],S=n[10],_=n[11],x=n[12],M=n[13],A=n[14],D=n[15];return t[0].setComponents(s-i,m-c,_-g,D-x).normalize(),t[1].setComponents(s+i,m+c,_+g,D+x).normalize(),t[2].setComponents(s+o,m+f,_+v,D+M).normalize(),t[3].setComponents(s-o,m-f,_-v,D-M).normalize(),t[4].setComponents(s-a,m-h,_-S,D-A).normalize(),t[5].setComponents(s+a,m+h,_+S,D+A).normalize(),this}intersectsObject(e){const t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),C8.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(C8)}intersectsSprite(e){return C8.center.set(0,0,0),C8.radius=.7071067811865476,C8.applyMatrix4(e.matrixWorld),this.intersectsSphere(C8)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if(Le.x=i.normal.x>0?e.max.x:e.min.x,Le.y=i.normal.y>0?e.max.y:e.min.y,Le.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Le)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function ap(){let r=null,e=!1,t=null,n=null;function i(o,a){t(o,a),n=r.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=
diffuseColor . a *= texture2D ( alphaMap , vUv ) . g ;
# endif ` ,gk= ` # ifdef USE _ALPHAMAP
uniform sampler2D alphaMap ;
# endif ` ,_k= ` # ifdef USE _ALPHATEST
if ( diffuseColor . a < alphaTest ) discard ;
# endif ` ,vk= ` # ifdef USE _ALPHATEST
uniform float alphaTest ;
# endif ` ,yk= ` # ifdef USE _AOMAP
float ambientOcclusion = ( texture2D ( aoMap , vUv2 ) . r - 1.0 ) * aoMapIntensity + 1.0 ;
reflectedLight . indirectDiffuse *= ambientOcclusion ;
# if defined ( USE _ENVMAP ) && defined ( STANDARD )
float dotNV = saturate ( dot ( geometry . normal , geometry . viewDir ) ) ;
reflectedLight . indirectSpecular *= computeSpecularOcclusion ( dotNV , ambientOcclusion , material . roughness ) ;
# endif
# endif ` ,bk= ` # ifdef USE _AOMAP
uniform sampler2D aoMap ;
uniform float aoMapIntensity ;
# endif ` ,xk="vec3 transformed = vec3( position );",Sk= ` vec3 objectNormal = vec3 ( normal ) ;
# ifdef USE _TANGENT
vec3 objectTangent = vec3 ( tangent . xyz ) ;
# endif ` ,Mk= ` vec3 BRDF _Lambert ( const in vec3 diffuseColor ) {
return RECIPROCAL _PI * diffuseColor ;
}
vec3 F _Schlick ( const in vec3 f0 , const in float f90 , const in float dotVH ) {
float fresnel = exp2 ( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ) ;
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ) ;
}
float F _Schlick ( const in float f0 , const in float f90 , const in float dotVH ) {
float fresnel = exp2 ( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ) ;
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ) ;
}
vec3 Schlick _to _F0 ( const in vec3 f , const in float f90 , const in float dotVH ) {
float x = clamp ( 1.0 - dotVH , 0.0 , 1.0 ) ;
float x2 = x * x ;
float x5 = clamp ( x * x2 * x2 , 0.0 , 0.9999 ) ;
return ( f - vec3 ( f90 ) * x5 ) / ( 1.0 - x5 ) ;
}
float V _GGX _SmithCorrelated ( const in float alpha , const in float dotNL , const in float dotNV ) {
float a2 = pow2 ( alpha ) ;
float gv = dotNL * sqrt ( a2 + ( 1.0 - a2 ) * pow2 ( dotNV ) ) ;
float gl = dotNV * sqrt ( a2 + ( 1.0 - a2 ) * pow2 ( dotNL ) ) ;
return 0.5 / max ( gv + gl , EPSILON ) ;
}
float D _GGX ( const in float alpha , const in float dotNH ) {
float a2 = pow2 ( alpha ) ;
float denom = pow2 ( dotNH ) * ( a2 - 1.0 ) + 1.0 ;
return RECIPROCAL _PI * a2 / pow2 ( denom ) ;
}
vec3 BRDF _GGX ( const in vec3 lightDir , const in vec3 viewDir , const in vec3 normal , const in vec3 f0 , const in float f90 , const in float roughness ) {
float alpha = pow2 ( roughness ) ;
vec3 halfDir = normalize ( lightDir + viewDir ) ;
float dotNL = saturate ( dot ( normal , lightDir ) ) ;
float dotNV = saturate ( dot ( normal , viewDir ) ) ;
float dotNH = saturate ( dot ( normal , halfDir ) ) ;
float dotVH = saturate ( dot ( viewDir , halfDir ) ) ;
vec3 F = F _Schlick ( f0 , f90 , dotVH ) ;
float V = V _GGX _SmithCorrelated ( alpha , dotNL , dotNV ) ;
float D = D _GGX ( alpha , dotNH ) ;
return F * ( V * D ) ;
}
# ifdef USE _IRIDESCENCE
vec3 BRDF _GGX _Iridescence ( const in vec3 lightDir , const in vec3 viewDir , const in vec3 normal , const in vec3 f0 , const in float f90 , const in float iridescence , const in vec3 iridescenceFresnel , const in float roughness ) {
float alpha = pow2 ( roughness ) ;
vec3 halfDir = normalize ( lightDir + viewDir ) ;
float dotNL = saturate ( dot ( normal , lightDir ) ) ;
float dotNV = saturate ( dot ( normal , viewDir ) ) ;
float dotNH = saturate ( dot ( normal , halfDir ) ) ;
float dotVH = saturate ( dot ( viewDir , halfDir ) ) ;
vec3 F = mix ( F _Schlick ( f0 , f90 , dotVH ) , iridescenceFresnel , iridescence ) ;
float V = V _GGX _SmithCorrelated ( alpha , dotNL , dotNV ) ;
float D = D _GGX ( alpha , dotNH ) ;
return F * ( V * D ) ;
}
# endif
vec2 LTC _Uv ( const in vec3 N , const in vec3 V , const in float roughness ) {
const float LUT _SIZE = 64.0 ;
const float LUT _SCALE = ( LUT _SIZE - 1.0 ) / LUT _SIZE ;
const float LUT _BIAS = 0.5 / LUT _SIZE ;
float dotNV = saturate ( dot ( N , V ) ) ;
vec2 uv = vec2 ( roughness , sqrt ( 1.0 - dotNV ) ) ;
uv = uv * LUT _SCALE + LUT _BIAS ;
return uv ;
}
float LTC _ClippedSphereFormFactor ( const in vec3 f ) {
float l = length ( f ) ;
return max ( ( l * l + f . z ) / ( l + 1.0 ) , 0.0 ) ;
}
vec3 LTC _EdgeVectorFormFactor ( const in vec3 v1 , const in vec3 v2 ) {
float x = dot ( v1 , v2 ) ;
float y = abs ( x ) ;
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y ;
float b = 3.4175940 + ( 4.1616724 + y ) * y ;
float v = a / b ;
float theta _sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt ( max ( 1.0 - x * x , 1e-7 ) ) - v ;
return cross ( v1 , v2 ) * theta _sintheta ;
}
vec3 LTC _Evaluate ( const in vec3 N , const in vec3 V , const in vec3 P , const in mat3 mInv , const in vec3 rectCoords [ 4 ] ) {
vec3 v1 = rectCoords [ 1 ] - rectCoords [ 0 ] ;
vec3 v2 = rectCoords [ 3 ] - rectCoords [ 0 ] ;
vec3 lightNormal = cross ( v1 , v2 ) ;
if ( dot ( lightNormal , P - rectCoords [ 0 ] ) < 0.0 ) return vec3 ( 0.0 ) ;
vec3 T1 , T2 ;
T1 = normalize ( V - N * dot ( V , N ) ) ;
T2 = - cross ( N , T1 ) ;
mat3 mat = mInv * transposeMat3 ( mat3 ( T1 , T2 , N ) ) ;
vec3 coords [ 4 ] ;
coords [ 0 ] = mat * ( rectCoords [ 0 ] - P ) ;
coords [ 1 ] = mat * ( rectCoords [ 1 ] - P ) ;
coords [ 2 ] = mat * ( rectCoords [ 2 ] - P ) ;
coords [ 3 ] = mat * ( rectCoords [ 3 ] - P ) ;
coords [ 0 ] = normalize ( coords [ 0 ] ) ;
coords [ 1 ] = normalize ( coords [ 1 ] ) ;
coords [ 2 ] = normalize ( coords [ 2 ] ) ;
coords [ 3 ] = normalize ( coords [ 3 ] ) ;
vec3 vectorFormFactor = vec3 ( 0.0 ) ;
vectorFormFactor += LTC _EdgeVectorFormFactor ( coords [ 0 ] , coords [ 1 ] ) ;
vectorFormFactor += LTC _EdgeVectorFormFactor ( coords [ 1 ] , coords [ 2 ] ) ;
vectorFormFactor += LTC _EdgeVectorFormFactor ( coords [ 2 ] , coords [ 3 ] ) ;
vectorFormFactor += LTC _EdgeVectorFormFactor ( coords [ 3 ] , coords [ 0 ] ) ;
float result = LTC _ClippedSphereFormFactor ( vectorFormFactor ) ;
return vec3 ( result ) ;
}
float G _BlinnPhong _Implicit ( ) {
return 0.25 ;
}
float D _BlinnPhong ( const in float shininess , const in float dotNH ) {
return RECIPROCAL _PI * ( shininess * 0.5 + 1.0 ) * pow ( dotNH , shininess ) ;
}
vec3 BRDF _BlinnPhong ( const in vec3 lightDir , const in vec3 viewDir , const in vec3 normal , const in vec3 specularColor , const in float shininess ) {
vec3 halfDir = normalize ( lightDir + viewDir ) ;
float dotNH = saturate ( dot ( normal , halfDir ) ) ;
float dotVH = saturate ( dot ( viewDir , halfDir ) ) ;
vec3 F = F _Schlick ( specularColor , 1.0 , dotVH ) ;
float G = G _BlinnPhong _Implicit ( ) ;
float D = D _BlinnPhong ( shininess , dotNH ) ;
return F * ( G * D ) ;
}
# if defined ( USE _SHEEN )
float D _Charlie ( float roughness , float dotNH ) {
float alpha = pow2 ( roughness ) ;
float invAlpha = 1.0 / alpha ;
float cos2h = dotNH * dotNH ;
float sin2h = max ( 1.0 - cos2h , 0.0078125 ) ;
return ( 2.0 + invAlpha ) * pow ( sin2h , invAlpha * 0.5 ) / ( 2.0 * PI ) ;
}
float V _Neubelt ( float dotNV , float dotNL ) {
return saturate ( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ) ;
}
vec3 BRDF _Sheen ( const in vec3 lightDir , const in vec3 viewDir , const in vec3 normal , vec3 sheenColor , const in float sheenRoughness ) {
vec3 halfDir = normalize ( lightDir + viewDir ) ;
float dotNL = saturate ( dot ( normal , lightDir ) ) ;
float dotNV = saturate ( dot ( normal , viewDir ) ) ;
float dotNH = saturate ( dot ( normal , halfDir ) ) ;
float D = D _Charlie ( sheenRoughness , dotNH ) ;
float V = V _Neubelt ( dotNV , dotNL ) ;
return sheenColor * ( D * V ) ;
}
# endif ` ,wk= ` # ifdef USE _IRIDESCENCE
const mat3 XYZ _TO _REC709 = mat3 (
3.2404542 , - 0.9692660 , 0.0556434 ,
- 1.5371385 , 1.8760108 , - 0.2040259 ,
- 0.4985314 , 0.0415560 , 1.0572252
) ;
vec3 Fresnel0ToIor ( vec3 fresnel0 ) {
vec3 sqrtF0 = sqrt ( fresnel0 ) ;
return ( vec3 ( 1.0 ) + sqrtF0 ) / ( vec3 ( 1.0 ) - sqrtF0 ) ;
}
vec3 IorToFresnel0 ( vec3 transmittedIor , float incidentIor ) {
return pow2 ( ( transmittedIor - vec3 ( incidentIor ) ) / ( transmittedIor + vec3 ( incidentIor ) ) ) ;
}
float IorToFresnel0 ( float transmittedIor , float incidentIor ) {
return pow2 ( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ) ) ;
}
vec3 evalSensitivity ( float OPD , vec3 shift ) {
float phase = 2.0 * PI * OPD * 1.0 e - 9 ;
vec3 val = vec3 ( 5.4856 e - 13 , 4.4201 e - 13 , 5.2481 e - 13 ) ;
vec3 pos = vec3 ( 1.6810 e + 06 , 1.7953 e + 06 , 2.2084 e + 06 ) ;
vec3 var = vec3 ( 4.3278 e + 09 , 9.3046 e + 09 , 6.6121 e + 09 ) ;
vec3 xyz = val * sqrt ( 2.0 * PI * var ) * cos ( pos * phase + shift ) * exp ( - pow2 ( phase ) * var ) ;
xyz . x += 9.7470 e - 14 * sqrt ( 2.0 * PI * 4.5282 e + 09 ) * cos ( 2.2399 e + 06 * phase + shift [ 0 ] ) * exp ( - 4.5282 e + 09 * pow2 ( phase ) ) ;
xyz /= 1.0685 e - 7 ;
vec3 rgb = XYZ _TO _REC709 * xyz ;
return rgb ;
}
vec3 evalIridescence ( float outsideIOR , float eta2 , float cosTheta1 , float thinFilmThickness , vec3 baseF0 ) {
vec3 I ;
float iridescenceIOR = mix ( outsideIOR , eta2 , smoothstep ( 0.0 , 0.03 , thinFilmThickness ) ) ;
float sinTheta2Sq = pow2 ( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2 ( cosTheta1 ) ) ;
float cosTheta2Sq = 1.0 - sinTheta2Sq ;
if ( cosTheta2Sq < 0.0 ) {
return vec3 ( 1.0 ) ;
}
float cosTheta2 = sqrt ( cosTheta2Sq ) ;
float R0 = IorToFresnel0 ( iridescenceIOR , outsideIOR ) ;
float R12 = F _Schlick ( R0 , 1.0 , cosTheta1 ) ;
float R21 = R12 ;
float T121 = 1.0 - R12 ;
float phi12 = 0.0 ;
if ( iridescenceIOR < outsideIOR ) phi12 = PI ;
float phi21 = PI - phi12 ;
vec3 baseIOR = Fresnel0ToIor ( clamp ( baseF0 , 0.0 , 0.9999 ) ) ; vec3 R1 = IorToFresnel0 ( baseIOR , iridescenceIOR ) ;
vec3 R23 = F _Schlick ( R1 , 1.0 , cosTheta2 ) ;
vec3 phi23 = vec3 ( 0.0 ) ;
if ( baseIOR [ 0 ] < iridescenceIOR ) phi23 [ 0 ] = PI ;
if ( baseIOR [ 1 ] < iridescenceIOR ) phi23 [ 1 ] = PI ;
if ( baseIOR [ 2 ] < iridescenceIOR ) phi23 [ 2 ] = PI ;
float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2 ;
vec3 phi = vec3 ( phi21 ) + phi23 ;
vec3 R123 = clamp ( R12 * R23 , 1e-5 , 0.9999 ) ;
vec3 r123 = sqrt ( R123 ) ;
vec3 Rs = pow2 ( T121 ) * R23 / ( vec3 ( 1.0 ) - R123 ) ;
vec3 C0 = R12 + Rs ;
I = C0 ;
vec3 Cm = Rs - T121 ;
for ( int m = 1 ; m <= 2 ; ++ m ) {
Cm *= r123 ;
vec3 Sm = 2.0 * evalSensitivity ( float ( m ) * OPD , float ( m ) * phi ) ;
I += Cm * Sm ;
}
return max ( I , vec3 ( 0.0 ) ) ;
}
# endif ` ,Ak= ` # ifdef USE _BUMPMAP
uniform sampler2D bumpMap ;
uniform float bumpScale ;
vec2 dHdxy _fwd ( ) {
vec2 dSTdx = dFdx ( vUv ) ;
vec2 dSTdy = dFdy ( vUv ) ;
float Hll = bumpScale * texture2D ( bumpMap , vUv ) . x ;
float dBx = bumpScale * texture2D ( bumpMap , vUv + dSTdx ) . x - Hll ;
float dBy = bumpScale * texture2D ( bumpMap , vUv + dSTdy ) . x - Hll ;
return vec2 ( dBx , dBy ) ;
}
vec3 perturbNormalArb ( vec3 surf _pos , vec3 surf _norm , vec2 dHdxy , float faceDirection ) {
vec3 vSigmaX = dFdx ( surf _pos . xyz ) ;
vec3 vSigmaY = dFdy ( surf _pos . xyz ) ;
vec3 vN = surf _norm ;
vec3 R1 = cross ( vSigmaY , vN ) ;
vec3 R2 = cross ( vN , vSigmaX ) ;
float fDet = dot ( vSigmaX , R1 ) * faceDirection ;
vec3 vGrad = sign ( fDet ) * ( dHdxy . x * R1 + dHdxy . y * R2 ) ;
return normalize ( abs ( fDet ) * surf _norm - vGrad ) ;
}
# endif ` ,Ck= ` # if NUM _CLIPPING _PLANES > 0
vec4 plane ;
# pragma unroll _loop _start
for ( int i = 0 ; i < UNION _CLIPPING _PLANES ; i ++ ) {
plane = clippingPlanes [ i ] ;
if ( dot ( vClipPosition , plane . xyz ) > plane . w ) discard ;
}
# pragma unroll _loop _end
# if UNION _CLIPPING _PLANES < NUM _CLIPPING _PLANES
bool clipped = true ;
# pragma unroll _loop _start
for ( int i = UNION _CLIPPING _PLANES ; i < NUM _CLIPPING _PLANES ; i ++ ) {
plane = clippingPlanes [ i ] ;
clipped = ( dot ( vClipPosition , plane . xyz ) > plane . w ) && clipped ;
}
# pragma unroll _loop _end
if ( clipped ) discard ;
# endif
# endif ` ,Tk= ` # if NUM _CLIPPING _PLANES > 0
varying vec3 vClipPosition ;
uniform vec4 clippingPlanes [ NUM _CLIPPING _PLANES ] ;
# endif ` ,Ek= ` # if NUM _CLIPPING _PLANES > 0
varying vec3 vClipPosition ;
# endif ` ,Dk= ` # if NUM _CLIPPING _PLANES > 0
vClipPosition = - mvPosition . xyz ;
# endif ` ,Ik= ` # if defined ( USE _COLOR _ALPHA )
diffuseColor *= vColor ;
# elif defined ( USE _COLOR )
diffuseColor . rgb *= vColor ;
# endif ` ,Rk= ` # if defined ( USE _COLOR _ALPHA )
varying vec4 vColor ;
# elif defined ( USE _COLOR )
varying vec3 vColor ;
# endif ` ,Ok= ` # if defined ( USE _COLOR _ALPHA )
varying vec4 vColor ;
# elif defined ( USE _COLOR ) || defined ( USE _INSTANCING _COLOR )
varying vec3 vColor ;
# endif ` ,Lk= ` # if defined ( USE _COLOR _ALPHA )
vColor = vec4 ( 1.0 ) ;
# elif defined ( USE _COLOR ) || defined ( USE _INSTANCING _COLOR )
vColor = vec3 ( 1.0 ) ;
# endif
# ifdef USE _COLOR
vColor *= color ;
# endif
# ifdef USE _INSTANCING _COLOR
vColor . xyz *= instanceColor . xyz ;
# endif ` ,Pk= ` # define PI 3.141592653589793
# define PI2 6.283185307179586
# define PI _HALF 1.5707963267948966
# define RECIPROCAL _PI 0.3183098861837907
# define RECIPROCAL _PI2 0.15915494309189535
# define EPSILON 1e-6
# ifndef saturate
# define saturate ( a ) clamp ( a , 0.0 , 1.0 )
# endif
# define whiteComplement ( a ) ( 1.0 - saturate ( a ) )
float pow2 ( const in float x ) { return x * x ; }
vec3 pow2 ( const in vec3 x ) { return x * x ; }
float pow3 ( const in float x ) { return x * x * x ; }
float pow4 ( const in float x ) { float x2 = x * x ; return x2 * x2 ; }
float max3 ( const in vec3 v ) { return max ( max ( v . x , v . y ) , v . z ) ; }
float average ( const in vec3 v ) { return dot ( v , vec3 ( 0.3333333 ) ) ; }
highp float rand ( const in vec2 uv ) {
const highp float a = 12.9898 , b = 78.233 , c = 43758.5453 ;
highp float dt = dot ( uv . xy , vec2 ( a , b ) ) , sn = mod ( dt , PI ) ;
return fract ( sin ( sn ) * c ) ;
}
# ifdef HIGH _PRECISION
float precisionSafeLength ( vec3 v ) { return length ( v ) ; }
# else
float precisionSafeLength ( vec3 v ) {
float maxComponent = max3 ( abs ( v ) ) ;
return length ( v / maxComponent ) * maxComponent ;
}
# endif
struct IncidentLight {
vec3 color ;
vec3 direction ;
bool visible ;
} ;
struct ReflectedLight {
vec3 directDiffuse ;
vec3 directSpecular ;
vec3 indirectDiffuse ;
vec3 indirectSpecular ;
} ;
struct GeometricContext {
vec3 position ;
vec3 normal ;
vec3 viewDir ;
# ifdef USE _CLEARCOAT
vec3 clearcoatNormal ;
# endif
} ;
vec3 transformDirection ( in vec3 dir , in mat4 matrix ) {
return normalize ( ( matrix * vec4 ( dir , 0.0 ) ) . xyz ) ;
}
vec3 inverseTransformDirection ( in vec3 dir , in mat4 matrix ) {
return normalize ( ( vec4 ( dir , 0.0 ) * matrix ) . xyz ) ;
}
mat3 transposeMat3 ( const in mat3 m ) {
mat3 tmp ;
tmp [ 0 ] = vec3 ( m [ 0 ] . x , m [ 1 ] . x , m [ 2 ] . x ) ;
tmp [ 1 ] = vec3 ( m [ 0 ] . y , m [ 1 ] . y , m [ 2 ] . y ) ;
tmp [ 2 ] = vec3 ( m [ 0 ] . z , m [ 1 ] . z , m [ 2 ] . z ) ;
return tmp ;
}
float luminance ( const in vec3 rgb ) {
const vec3 weights = vec3 ( 0.2126729 , 0.7151522 , 0.0721750 ) ;
return dot ( weights , rgb ) ;
}
bool isPerspectiveMatrix ( mat4 m ) {
return m [ 2 ] [ 3 ] == - 1.0 ;
}
vec2 equirectUv ( in vec3 dir ) {
float u = atan ( dir . z , dir . x ) * RECIPROCAL _PI2 + 0.5 ;
float v = asin ( clamp ( dir . y , - 1.0 , 1.0 ) ) * RECIPROCAL _PI + 0.5 ;
return vec2 ( u , v ) ;
} ` ,zk= ` # ifdef ENVMAP _TYPE _CUBE _UV
# define cubeUV _minMipLevel 4.0
# define cubeUV _minTileSize 16.0
float getFace ( vec3 direction ) {
vec3 absDirection = abs ( direction ) ;
float face = - 1.0 ;
if ( absDirection . x > absDirection . z ) {
if ( absDirection . x > absDirection . y )
face = direction . x > 0.0 ? 0.0 : 3.0 ;
else
face = direction . y > 0.0 ? 1.0 : 4.0 ;
} else {
if ( absDirection . z > absDirection . y )
face = direction . z > 0.0 ? 2.0 : 5.0 ;
else
face = direction . y > 0.0 ? 1.0 : 4.0 ;
}
return face ;
}
vec2 getUV ( vec3 direction , float face ) {
vec2 uv ;
if ( face == 0.0 ) {
uv = vec2 ( direction . z , direction . y ) / abs ( direction . x ) ;
} else if ( face == 1.0 ) {
uv = vec2 ( - direction . x , - direction . z ) / abs ( direction . y ) ;
} else if ( face == 2.0 ) {
uv = vec2 ( - direction . x , direction . y ) / abs ( direction . z ) ;
} else if ( face == 3.0 ) {
uv = vec2 ( - direction . z , direction . y ) / abs ( direction . x ) ;
} else if ( face == 4.0 ) {
uv = vec2 ( - direction . x , direction . z ) / abs ( direction . y ) ;
} else {
uv = vec2 ( direction . x , direction . y ) / abs ( direction . z ) ;
}
return 0.5 * ( uv + 1.0 ) ;
}
vec3 bilinearCubeUV ( sampler2D envMap , vec3 direction , float mipInt ) {
float face = getFace ( direction ) ;
float filterInt = max ( cubeUV _minMipLevel - mipInt , 0.0 ) ;
mipInt = max ( mipInt , cubeUV _minMipLevel ) ;
float faceSize = exp2 ( mipInt ) ;
vec2 uv = getUV ( direction , face ) * ( faceSize - 2.0 ) + 1.0 ;
if ( face > 2.0 ) {
uv . y += faceSize ;
face -= 3.0 ;
}
uv . x += face * faceSize ;
uv . x += filterInt * 3.0 * cubeUV _minTileSize ;
uv . y += 4.0 * ( exp2 ( CUBEUV _MAX _MIP ) - faceSize ) ;
uv . x *= CUBEUV _TEXEL _WIDTH ;
uv . y *= CUBEUV _TEXEL _HEIGHT ;
# ifdef texture2DGradEXT
return texture2DGradEXT ( envMap , uv , vec2 ( 0.0 ) , vec2 ( 0.0 ) ) . rgb ;
# else
return texture2D ( envMap , uv ) . rgb ;
# endif
}
# define cubeUV _r0 1.0
# define cubeUV _v0 0.339
# define cubeUV _m0 - 2.0
# define cubeUV _r1 0.8
# define cubeUV _v1 0.276
# define cubeUV _m1 - 1.0
# define cubeUV _r4 0.4
# define cubeUV _v4 0.046
# define cubeUV _m4 2.0
# define cubeUV _r5 0.305
# define cubeUV _v5 0.016
# define cubeUV _m5 3.0
# define cubeUV _r6 0.21
# define cubeUV _v6 0.0038
# define cubeUV _m6 4.0
float roughnessToMip ( float roughness ) {
float mip = 0.0 ;
if ( roughness >= cubeUV _r1 ) {
mip = ( cubeUV _r0 - roughness ) * ( cubeUV _m1 - cubeUV _m0 ) / ( cubeUV _r0 - cubeUV _r1 ) + cubeUV _m0 ;
} else if ( roughness >= cubeUV _r4 ) {
mip = ( cubeUV _r1 - roughness ) * ( cubeUV _m4 - cubeUV _m1 ) / ( cubeUV _r1 - cubeUV _r4 ) + cubeUV _m1 ;
} else if ( roughness >= cubeUV _r5 ) {
mip = ( cubeUV _r4 - roughness ) * ( cubeUV _m5 - cubeUV _m4 ) / ( cubeUV _r4 - cubeUV _r5 ) + cubeUV _m4 ;
} else if ( roughness >= cubeUV _r6 ) {
mip = ( cubeUV _r5 - roughness ) * ( cubeUV _m6 - cubeUV _m5 ) / ( cubeUV _r5 - cubeUV _r6 ) + cubeUV _m5 ;
} else {
mip = - 2.0 * log2 ( 1.16 * roughness ) ; }
return mip ;
}
vec4 textureCubeUV ( sampler2D envMap , vec3 sampleDir , float roughness ) {
float mip = clamp ( roughnessToMip ( roughness ) , cubeUV _m0 , CUBEUV _MAX _MIP ) ;
float mipF = fract ( mip ) ;
float mipInt = floor ( mip ) ;
vec3 color0 = bilinearCubeUV ( envMap , sampleDir , mipInt ) ;
if ( mipF == 0.0 ) {
return vec4 ( color0 , 1.0 ) ;
} else {
vec3 color1 = bilinearCubeUV ( envMap , sampleDir , mipInt + 1.0 ) ;
return vec4 ( mix ( color0 , color1 , mipF ) , 1.0 ) ;
}
}
# endif ` ,kk= ` vec3 transformedNormal = objectNormal ;
# ifdef USE _INSTANCING
mat3 m = mat3 ( instanceMatrix ) ;
transformedNormal /= vec3 ( dot ( m [ 0 ] , m [ 0 ] ) , dot ( m [ 1 ] , m [ 1 ] ) , dot ( m [ 2 ] , m [ 2 ] ) ) ;
transformedNormal = m * transformedNormal ;
# endif
transformedNormal = normalMatrix * transformedNormal ;
# ifdef FLIP _SIDED
transformedNormal = - transformedNormal ;
# endif
# ifdef USE _TANGENT
vec3 transformedTangent = ( modelViewMatrix * vec4 ( objectTangent , 0.0 ) ) . xyz ;
# ifdef FLIP _SIDED
transformedTangent = - transformedTangent ;
# endif
# endif ` ,Uk= ` # ifdef USE _DISPLACEMENTMAP
uniform sampler2D displacementMap ;
uniform float displacementScale ;
uniform float displacementBias ;
# endif ` ,Nk= ` # ifdef USE _DISPLACEMENTMAP
transformed += normalize ( objectNormal ) * ( texture2D ( displacementMap , vUv ) . x * displacementScale + displacementBias ) ;
# endif ` ,Fk= ` # ifdef USE _EMISSIVEMAP
vec4 emissiveColor = texture2D ( emissiveMap , vUv ) ;
totalEmissiveRadiance *= emissiveColor . rgb ;
# endif ` ,Bk= ` # ifdef USE _EMISSIVEMAP
uniform sampler2D emissiveMap ;
# endif ` ,Gk="gl_FragColor = linearToOutputTexel( gl_FragColor );",Vk= ` vec4 LinearToLinear ( in vec4 value ) {
return value ;
}
vec4 LinearTosRGB ( in vec4 value ) {
return vec4 ( mix ( pow ( value . rgb , vec3 ( 0.41666 ) ) * 1.055 - vec3 ( 0.055 ) , value . rgb * 12.92 , vec3 ( lessThanEqual ( value . rgb , vec3 ( 0.0031308 ) ) ) ) , value . a ) ;
} ` ,Wk= ` # ifdef USE _ENVMAP
# ifdef ENV _WORLDPOS
vec3 cameraToFrag ;
if ( isOrthographic ) {
cameraToFrag = normalize ( vec3 ( - viewMatrix [ 0 ] [ 2 ] , - viewMatrix [ 1 ] [ 2 ] , - viewMatrix [ 2 ] [ 2 ] ) ) ;
} else {
cameraToFrag = normalize ( vWorldPosition - cameraPosition ) ;
}
vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;
# ifdef ENVMAP _MODE _REFLECTION
vec3 reflectVec = reflect ( cameraToFrag , worldNormal ) ;
# else
vec3 reflectVec = refract ( cameraToFrag , worldNormal , refractionRatio ) ;
# endif
# else
vec3 reflectVec = vReflect ;
# endif
# ifdef ENVMAP _TYPE _CUBE
vec4 envColor = textureCube ( envMap , vec3 ( flipEnvMap * reflectVec . x , reflectVec . yz ) ) ;
# elif defined ( ENVMAP _TYPE _CUBE _UV )
vec4 envColor = textureCubeUV ( envMap , reflectVec , 0.0 ) ;
# else
vec4 envColor = vec4 ( 0.0 ) ;
# endif
# ifdef ENVMAP _BLENDING _MULTIPLY
outgoingLight = mix ( outgoingLight , outgoingLight * envColor . xyz , specularStrength * reflectivity ) ;
# elif defined ( ENVMAP _BLENDING _MIX )
outgoingLight = mix ( outgoingLight , envColor . xyz , specularStrength * reflectivity ) ;
# elif defined ( ENVMAP _BLENDING _ADD )
outgoingLight += envColor . xyz * specularStrength * reflectivity ;
# endif
# endif ` ,jk= ` # ifdef USE _ENVMAP
uniform float envMapIntensity ;
uniform float flipEnvMap ;
# ifdef ENVMAP _TYPE _CUBE
uniform samplerCube envMap ;
# else
uniform sampler2D envMap ;
# endif
# endif ` ,Hk= ` # ifdef USE _ENVMAP
uniform float reflectivity ;
# if defined ( USE _BUMPMAP ) || defined ( USE _NORMALMAP ) || defined ( PHONG ) || defined ( LAMBERT )
# define ENV _WORLDPOS
# endif
# ifdef ENV _WORLDPOS
varying vec3 vWorldPosition ;
uniform float refractionRatio ;
# else
varying vec3 vReflect ;
# endif
# endif ` , $ k= ` # ifdef USE _ENVMAP
# if defined ( USE _BUMPMAP ) || defined ( USE _NORMALMAP ) || defined ( PHONG ) || defined ( LAMBERT )
# define ENV _WORLDPOS
# endif
# ifdef ENV _WORLDPOS
varying vec3 vWorldPosition ;
# else
varying vec3 vReflect ;
uniform float refractionRatio ;
# endif
# endif ` ,Yk= ` # ifdef USE _ENVMAP
# ifdef ENV _WORLDPOS
vWorldPosition = worldPosition . xyz ;
# else
vec3 cameraToVertex ;
if ( isOrthographic ) {
cameraToVertex = normalize ( vec3 ( - viewMatrix [ 0 ] [ 2 ] , - viewMatrix [ 1 ] [ 2 ] , - viewMatrix [ 2 ] [ 2 ] ) ) ;
} else {
cameraToVertex = normalize ( worldPosition . xyz - cameraPosition ) ;
}
vec3 worldNormal = inverseTransformDirection ( transformedNormal , viewMatrix ) ;
# ifdef ENVMAP _MODE _REFLECTION
vReflect = reflect ( cameraToVertex , worldNormal ) ;
# else
vReflect = refract ( cameraToVertex , worldNormal , refractionRatio ) ;
# endif
# endif
# endif ` ,Jk= ` # ifdef USE _FOG
vFogDepth = - mvPosition . z ;
# endif ` ,Zk= ` # ifdef USE _FOG
varying float vFogDepth ;
# endif ` ,Xk= ` # ifdef USE _FOG
# ifdef FOG _EXP2
float fogFactor = 1.0 - exp ( - fogDensity * fogDensity * vFogDepth * vFogDepth ) ;
# else
float fogFactor = smoothstep ( fogNear , fogFar , vFogDepth ) ;
# endif
gl _FragColor . rgb = mix ( gl _FragColor . rgb , fogColor , fogFactor ) ;
# endif ` ,qk= ` # ifdef USE _FOG
uniform vec3 fogColor ;
varying float vFogDepth ;
# ifdef FOG _EXP2
uniform float fogDensity ;
# else
uniform float fogNear ;
uniform float fogFar ;
# endif
# endif ` ,Qk= ` # ifdef USE _GRADIENTMAP
uniform sampler2D gradientMap ;
# endif
vec3 getGradientIrradiance ( vec3 normal , vec3 lightDirection ) {
float dotNL = dot ( normal , lightDirection ) ;
vec2 coord = vec2 ( dotNL * 0.5 + 0.5 , 0.0 ) ;
# ifdef USE _GRADIENTMAP
return vec3 ( texture2D ( gradientMap , coord ) . r ) ;
# else
vec2 fw = fwidth ( coord ) * 0.5 ;
return mix ( vec3 ( 0.7 ) , vec3 ( 1.0 ) , smoothstep ( 0.7 - fw . x , 0.7 + fw . x , coord . x ) ) ;
# endif
} ` ,Kk= ` # ifdef USE _LIGHTMAP
vec4 lightMapTexel = texture2D ( lightMap , vUv2 ) ;
vec3 lightMapIrradiance = lightMapTexel . rgb * lightMapIntensity ;
reflectedLight . indirectDiffuse += lightMapIrradiance ;
# endif ` ,eU= ` # ifdef USE _LIGHTMAP
uniform sampler2D lightMap ;
uniform float lightMapIntensity ;
# endif ` ,tU= ` LambertMaterial material ;
material . diffuseColor = diffuseColor . rgb ;
material . specularStrength = specularStrength ; ` ,nU= ` varying vec3 vViewPosition ;
struct LambertMaterial {
vec3 diffuseColor ;
float specularStrength ;
} ;
void RE _Direct _Lambert ( const in IncidentLight directLight , const in GeometricContext geometry , const in LambertMaterial material , inout ReflectedLight reflectedLight ) {
float dotNL = saturate ( dot ( geometry . normal , directLight . direction ) ) ;
vec3 irradiance = dotNL * directLight . color ;
reflectedLight . directDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
void RE _IndirectDiffuse _Lambert ( const in vec3 irradiance , const in GeometricContext geometry , const in LambertMaterial material , inout ReflectedLight reflectedLight ) {
reflectedLight . indirectDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
# define RE _Direct RE _Direct _Lambert
# define RE _IndirectDiffuse RE _IndirectDiffuse _Lambert
# define Material _LightProbeLOD ( material ) ( 0 ) ` ,iU= ` uniform bool receiveShadow ;
uniform vec3 ambientLightColor ;
uniform vec3 lightProbe [ 9 ] ;
vec3 shGetIrradianceAt ( in vec3 normal , in vec3 shCoefficients [ 9 ] ) {
float x = normal . x , y = normal . y , z = normal . z ;
vec3 result = shCoefficients [ 0 ] * 0.886227 ;
result += shCoefficients [ 1 ] * 2.0 * 0.511664 * y ;
result += shCoefficients [ 2 ] * 2.0 * 0.511664 * z ;
result += shCoefficients [ 3 ] * 2.0 * 0.511664 * x ;
result += shCoefficients [ 4 ] * 2.0 * 0.429043 * x * y ;
result += shCoefficients [ 5 ] * 2.0 * 0.429043 * y * z ;
result += shCoefficients [ 6 ] * ( 0.743125 * z * z - 0.247708 ) ;
result += shCoefficients [ 7 ] * 2.0 * 0.429043 * x * z ;
result += shCoefficients [ 8 ] * 0.429043 * ( x * x - y * y ) ;
return result ;
}
vec3 getLightProbeIrradiance ( const in vec3 lightProbe [ 9 ] , const in vec3 normal ) {
vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;
vec3 irradiance = shGetIrradianceAt ( worldNormal , lightProbe ) ;
return irradiance ;
}
vec3 getAmbientLightIrradiance ( const in vec3 ambientLightColor ) {
vec3 irradiance = ambientLightColor ;
return irradiance ;
}
float getDistanceAttenuation ( const in float lightDistance , const in float cutoffDistance , const in float decayExponent ) {
# if defined ( PHYSICALLY _CORRECT _LIGHTS )
float distanceFalloff = 1.0 / max ( pow ( lightDistance , decayExponent ) , 0.01 ) ;
if ( cutoffDistance > 0.0 ) {
distanceFalloff *= pow2 ( saturate ( 1.0 - pow4 ( lightDistance / cutoffDistance ) ) ) ;
}
return distanceFalloff ;
# else
if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
return pow ( saturate ( - lightDistance / cutoffDistance + 1.0 ) , decayExponent ) ;
}
return 1.0 ;
# endif
}
float getSpotAttenuation ( const in float coneCosine , const in float penumbraCosine , const in float angleCosine ) {
return smoothstep ( coneCosine , penumbraCosine , angleCosine ) ;
}
# if NUM _DIR _LIGHTS > 0
struct DirectionalLight {
vec3 direction ;
vec3 color ;
} ;
uniform DirectionalLight directionalLights [ NUM _DIR _LIGHTS ] ;
void getDirectionalLightInfo ( const in DirectionalLight directionalLight , const in GeometricContext geometry , out IncidentLight light ) {
light . color = directionalLight . color ;
light . direction = directionalLight . direction ;
light . visible = true ;
}
# endif
# if NUM _POINT _LIGHTS > 0
struct PointLight {
vec3 position ;
vec3 color ;
float distance ;
float decay ;
} ;
uniform PointLight pointLights [ NUM _POINT _LIGHTS ] ;
void getPointLightInfo ( const in PointLight pointLight , const in GeometricContext geometry , out IncidentLight light ) {
vec3 lVector = pointLight . position - geometry . position ;
light . direction = normalize ( lVector ) ;
float lightDistance = length ( lVector ) ;
light . color = pointLight . color ;
light . color *= getDistanceAttenuation ( lightDistance , pointLight . distance , pointLight . decay ) ;
light . visible = ( light . color != vec3 ( 0.0 ) ) ;
}
# endif
# if NUM _SPOT _LIGHTS > 0
struct SpotLight {
vec3 position ;
vec3 direction ;
vec3 color ;
float distance ;
float decay ;
float coneCos ;
float penumbraCos ;
} ;
uniform SpotLight spotLights [ NUM _SPOT _LIGHTS ] ;
void getSpotLightInfo ( const in SpotLight spotLight , const in GeometricContext geometry , out IncidentLight light ) {
vec3 lVector = spotLight . position - geometry . position ;
light . direction = normalize ( lVector ) ;
float angleCos = dot ( light . direction , spotLight . direction ) ;
float spotAttenuation = getSpotAttenuation ( spotLight . coneCos , spotLight . penumbraCos , angleCos ) ;
if ( spotAttenuation > 0.0 ) {
float lightDistance = length ( lVector ) ;
light . color = spotLight . color * spotAttenuation ;
light . color *= getDistanceAttenuation ( lightDistance , spotLight . distance , spotLight . decay ) ;
light . visible = ( light . color != vec3 ( 0.0 ) ) ;
} else {
light . color = vec3 ( 0.0 ) ;
light . visible = false ;
}
}
# endif
# if NUM _RECT _AREA _LIGHTS > 0
struct RectAreaLight {
vec3 color ;
vec3 position ;
vec3 halfWidth ;
vec3 halfHeight ;
} ;
uniform sampler2D ltc _1 ; uniform sampler2D ltc _2 ;
uniform RectAreaLight rectAreaLights [ NUM _RECT _AREA _LIGHTS ] ;
# endif
# if NUM _HEMI _LIGHTS > 0
struct HemisphereLight {
vec3 direction ;
vec3 skyColor ;
vec3 groundColor ;
} ;
uniform HemisphereLight hemisphereLights [ NUM _HEMI _LIGHTS ] ;
vec3 getHemisphereLightIrradiance ( const in HemisphereLight hemiLight , const in vec3 normal ) {
float dotNL = dot ( normal , hemiLight . direction ) ;
float hemiDiffuseWeight = 0.5 * dotNL + 0.5 ;
vec3 irradiance = mix ( hemiLight . groundColor , hemiLight . skyColor , hemiDiffuseWeight ) ;
return irradiance ;
}
# endif ` ,rU= ` # if defined ( USE _ENVMAP )
vec3 getIBLIrradiance ( const in vec3 normal ) {
# if defined ( ENVMAP _TYPE _CUBE _UV )
vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;
vec4 envMapColor = textureCubeUV ( envMap , worldNormal , 1.0 ) ;
return PI * envMapColor . rgb * envMapIntensity ;
# else
return vec3 ( 0.0 ) ;
# endif
}
vec3 getIBLRadiance ( const in vec3 viewDir , const in vec3 normal , const in float roughness ) {
# if defined ( ENVMAP _TYPE _CUBE _UV )
vec3 reflectVec = reflect ( - viewDir , normal ) ;
reflectVec = normalize ( mix ( reflectVec , normal , roughness * roughness ) ) ;
reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;
vec4 envMapColor = textureCubeUV ( envMap , reflectVec , roughness ) ;
return envMapColor . rgb * envMapIntensity ;
# else
return vec3 ( 0.0 ) ;
# endif
}
# endif ` ,oU= ` ToonMaterial material ;
material . diffuseColor = diffuseColor . rgb ; ` ,aU= ` varying vec3 vViewPosition ;
struct ToonMaterial {
vec3 diffuseColor ;
} ;
void RE _Direct _Toon ( const in IncidentLight directLight , const in GeometricContext geometry , const in ToonMaterial material , inout ReflectedLight reflectedLight ) {
vec3 irradiance = getGradientIrradiance ( geometry . normal , directLight . direction ) * directLight . color ;
reflectedLight . directDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
void RE _IndirectDiffuse _Toon ( const in vec3 irradiance , const in GeometricContext geometry , const in ToonMaterial material , inout ReflectedLight reflectedLight ) {
reflectedLight . indirectDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
# define RE _Direct RE _Direct _Toon
# define RE _IndirectDiffuse RE _IndirectDiffuse _Toon
# define Material _LightProbeLOD ( material ) ( 0 ) ` ,sU= ` BlinnPhongMaterial material ;
material . diffuseColor = diffuseColor . rgb ;
material . specularColor = specular ;
material . specularShininess = shininess ;
material . specularStrength = specularStrength ; ` ,lU= ` varying vec3 vViewPosition ;
struct BlinnPhongMaterial {
vec3 diffuseColor ;
vec3 specularColor ;
float specularShininess ;
float specularStrength ;
} ;
void RE _Direct _BlinnPhong ( const in IncidentLight directLight , const in GeometricContext geometry , const in BlinnPhongMaterial material , inout ReflectedLight reflectedLight ) {
float dotNL = saturate ( dot ( geometry . normal , directLight . direction ) ) ;
vec3 irradiance = dotNL * directLight . color ;
reflectedLight . directDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
reflectedLight . directSpecular += irradiance * BRDF _BlinnPhong ( directLight . direction , geometry . viewDir , geometry . normal , material . specularColor , material . specularShininess ) * material . specularStrength ;
}
void RE _IndirectDiffuse _BlinnPhong ( const in vec3 irradiance , const in GeometricContext geometry , const in BlinnPhongMaterial material , inout ReflectedLight reflectedLight ) {
reflectedLight . indirectDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
# define RE _Direct RE _Direct _BlinnPhong
# define RE _IndirectDiffuse RE _IndirectDiffuse _BlinnPhong
# define Material _LightProbeLOD ( material ) ( 0 ) ` ,uU= ` PhysicalMaterial material ;
material . diffuseColor = diffuseColor . rgb * ( 1.0 - metalnessFactor ) ;
vec3 dxy = max ( abs ( dFdx ( geometryNormal ) ) , abs ( dFdy ( geometryNormal ) ) ) ;
float geometryRoughness = max ( max ( dxy . x , dxy . y ) , dxy . z ) ;
material . roughness = max ( roughnessFactor , 0.0525 ) ; material . roughness += geometryRoughness ;
material . roughness = min ( material . roughness , 1.0 ) ;
# ifdef IOR
material . ior = ior ;
# ifdef SPECULAR
float specularIntensityFactor = specularIntensity ;
vec3 specularColorFactor = specularColor ;
# ifdef USE _SPECULARINTENSITYMAP
specularIntensityFactor *= texture2D ( specularIntensityMap , vUv ) . a ;
# endif
# ifdef USE _SPECULARCOLORMAP
specularColorFactor *= texture2D ( specularColorMap , vUv ) . rgb ;
# endif
material . specularF90 = mix ( specularIntensityFactor , 1.0 , metalnessFactor ) ;
# else
float specularIntensityFactor = 1.0 ;
vec3 specularColorFactor = vec3 ( 1.0 ) ;
material . specularF90 = 1.0 ;
# endif
material . specularColor = mix ( min ( pow2 ( ( material . ior - 1.0 ) / ( material . ior + 1.0 ) ) * specularColorFactor , vec3 ( 1.0 ) ) * specularIntensityFactor , diffuseColor . rgb , metalnessFactor ) ;
# else
material . specularColor = mix ( vec3 ( 0.04 ) , diffuseColor . rgb , metalnessFactor ) ;
material . specularF90 = 1.0 ;
# endif
# ifdef USE _CLEARCOAT
material . clearcoat = clearcoat ;
material . clearcoatRoughness = clearcoatRoughness ;
material . clearcoatF0 = vec3 ( 0.04 ) ;
material . clearcoatF90 = 1.0 ;
# ifdef USE _CLEARCOATMAP
material . clearcoat *= texture2D ( clearcoatMap , vUv ) . x ;
# endif
# ifdef USE _CLEARCOAT _ROUGHNESSMAP
material . clearcoatRoughness *= texture2D ( clearcoatRoughnessMap , vUv ) . y ;
# endif
material . clearcoat = saturate ( material . clearcoat ) ; material . clearcoatRoughness = max ( material . clearcoatRoughness , 0.0525 ) ;
material . clearcoatRoughness += geometryRoughness ;
material . clearcoatRoughness = min ( material . clearcoatRoughness , 1.0 ) ;
# endif
# ifdef USE _IRIDESCENCE
material . iridescence = iridescence ;
material . iridescenceIOR = iridescenceIOR ;
# ifdef USE _IRIDESCENCEMAP
material . iridescence *= texture2D ( iridescenceMap , vUv ) . r ;
# endif
# ifdef USE _IRIDESCENCE _THICKNESSMAP
material . iridescenceThickness = ( iridescenceThicknessMaximum - iridescenceThicknessMinimum ) * texture2D ( iridescenceThicknessMap , vUv ) . g + iridescenceThicknessMinimum ;
# else
material . iridescenceThickness = iridescenceThicknessMaximum ;
# endif
# endif
# ifdef USE _SHEEN
material . sheenColor = sheenColor ;
# ifdef USE _SHEENCOLORMAP
material . sheenColor *= texture2D ( sheenColorMap , vUv ) . rgb ;
# endif
material . sheenRoughness = clamp ( sheenRoughness , 0.07 , 1.0 ) ;
# ifdef USE _SHEENROUGHNESSMAP
material . sheenRoughness *= texture2D ( sheenRoughnessMap , vUv ) . a ;
# endif
# endif ` ,cU= ` struct PhysicalMaterial {
vec3 diffuseColor ;
float roughness ;
vec3 specularColor ;
float specularF90 ;
# ifdef USE _CLEARCOAT
float clearcoat ;
float clearcoatRoughness ;
vec3 clearcoatF0 ;
float clearcoatF90 ;
# endif
# ifdef USE _IRIDESCENCE
float iridescence ;
float iridescenceIOR ;
float iridescenceThickness ;
vec3 iridescenceFresnel ;
vec3 iridescenceF0 ;
# endif
# ifdef USE _SHEEN
vec3 sheenColor ;
float sheenRoughness ;
# endif
# ifdef IOR
float ior ;
# endif
# ifdef USE _TRANSMISSION
float transmission ;
float transmissionAlpha ;
float thickness ;
float attenuationDistance ;
vec3 attenuationColor ;
# endif
} ;
vec3 clearcoatSpecular = vec3 ( 0.0 ) ;
vec3 sheenSpecular = vec3 ( 0.0 ) ;
float IBLSheenBRDF ( const in vec3 normal , const in vec3 viewDir , const in float roughness ) {
float dotNV = saturate ( dot ( normal , viewDir ) ) ;
float r2 = roughness * roughness ;
float a = roughness < 0.25 ? - 339.2 * r2 + 161.4 * roughness - 25.9 : - 8.48 * r2 + 14.3 * roughness - 9.95 ;
float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72 ;
float DG = exp ( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ) ;
return saturate ( DG * RECIPROCAL _PI ) ;
}
vec2 DFGApprox ( const in vec3 normal , const in vec3 viewDir , const in float roughness ) {
float dotNV = saturate ( dot ( normal , viewDir ) ) ;
const vec4 c0 = vec4 ( - 1 , - 0.0275 , - 0.572 , 0.022 ) ;
const vec4 c1 = vec4 ( 1 , 0.0425 , 1.04 , - 0.04 ) ;
vec4 r = roughness * c0 + c1 ;
float a004 = min ( r . x * r . x , exp2 ( - 9.28 * dotNV ) ) * r . x + r . y ;
vec2 fab = vec2 ( - 1.04 , 1.04 ) * a004 + r . zw ;
return fab ;
}
vec3 EnvironmentBRDF ( const in vec3 normal , const in vec3 viewDir , const in vec3 specularColor , const in float specularF90 , const in float roughness ) {
vec2 fab = DFGApprox ( normal , viewDir , roughness ) ;
return specularColor * fab . x + specularF90 * fab . y ;
}
# ifdef USE _IRIDESCENCE
void computeMultiscatteringIridescence ( const in vec3 normal , const in vec3 viewDir , const in vec3 specularColor , const in float specularF90 , const in float iridescence , const in vec3 iridescenceF0 , const in float roughness , inout vec3 singleScatter , inout vec3 multiScatter ) {
# else
void computeMultiscattering ( const in vec3 normal , const in vec3 viewDir , const in vec3 specularColor , const in float specularF90 , const in float roughness , inout vec3 singleScatter , inout vec3 multiScatter ) {
# endif
vec2 fab = DFGApprox ( normal , viewDir , roughness ) ;
# ifdef USE _IRIDESCENCE
vec3 Fr = mix ( specularColor , iridescenceF0 , iridescence ) ;
# else
vec3 Fr = specularColor ;
# endif
vec3 FssEss = Fr * fab . x + specularF90 * fab . y ;
float Ess = fab . x + fab . y ;
float Ems = 1.0 - Ess ;
vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619 ; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ) ;
singleScatter += FssEss ;
multiScatter += Fms * Ems ;
}
# if NUM _RECT _AREA _LIGHTS > 0
void RE _Direct _RectArea _Physical ( const in RectAreaLight rectAreaLight , const in GeometricContext geometry , const in PhysicalMaterial material , inout ReflectedLight reflectedLight ) {
vec3 normal = geometry . normal ;
vec3 viewDir = geometry . viewDir ;
vec3 position = geometry . position ;
vec3 lightPos = rectAreaLight . position ;
vec3 halfWidth = rectAreaLight . halfWidth ;
vec3 halfHeight = rectAreaLight . halfHeight ;
vec3 lightColor = rectAreaLight . color ;
float roughness = material . roughness ;
vec3 rectCoords [ 4 ] ;
rectCoords [ 0 ] = lightPos + halfWidth - halfHeight ; rectCoords [ 1 ] = lightPos - halfWidth - halfHeight ;
rectCoords [ 2 ] = lightPos - halfWidth + halfHeight ;
rectCoords [ 3 ] = lightPos + halfWidth + halfHeight ;
vec2 uv = LTC _Uv ( normal , viewDir , roughness ) ;
vec4 t1 = texture2D ( ltc _1 , uv ) ;
vec4 t2 = texture2D ( ltc _2 , uv ) ;
mat3 mInv = mat3 (
vec3 ( t1 . x , 0 , t1 . y ) ,
vec3 ( 0 , 1 , 0 ) ,
vec3 ( t1 . z , 0 , t1 . w )
) ;
vec3 fresnel = ( material . specularColor * t2 . x + ( vec3 ( 1.0 ) - material . specularColor ) * t2 . y ) ;
reflectedLight . directSpecular += lightColor * fresnel * LTC _Evaluate ( normal , viewDir , position , mInv , rectCoords ) ;
reflectedLight . directDiffuse += lightColor * material . diffuseColor * LTC _Evaluate ( normal , viewDir , position , mat3 ( 1.0 ) , rectCoords ) ;
}
# endif
void RE _Direct _Physical ( const in IncidentLight directLight , const in GeometricContext geometry , const in PhysicalMaterial material , inout ReflectedLight reflectedLight ) {
float dotNL = saturate ( dot ( geometry . normal , directLight . direction ) ) ;
vec3 irradiance = dotNL * directLight . color ;
# ifdef USE _CLEARCOAT
float dotNLcc = saturate ( dot ( geometry . clearcoatNormal , directLight . direction ) ) ;
vec3 ccIrradiance = dotNLcc * directLight . color ;
clearcoatSpecular += ccIrradiance * BRDF _GGX ( directLight . direction , geometry . viewDir , geometry . clearcoatNormal , material . clearcoatF0 , material . clearcoatF90 , material . clearcoatRoughness ) ;
# endif
# ifdef USE _SHEEN
sheenSpecular += irradiance * BRDF _Sheen ( directLight . direction , geometry . viewDir , geometry . normal , material . sheenColor , material . sheenRoughness ) ;
# endif
# ifdef USE _IRIDESCENCE
reflectedLight . directSpecular += irradiance * BRDF _GGX _Iridescence ( directLight . direction , geometry . viewDir , geometry . normal , material . specularColor , material . specularF90 , material . iridescence , material . iridescenceFresnel , material . roughness ) ;
# else
reflectedLight . directSpecular += irradiance * BRDF _GGX ( directLight . direction , geometry . viewDir , geometry . normal , material . specularColor , material . specularF90 , material . roughness ) ;
# endif
reflectedLight . directDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
void RE _IndirectDiffuse _Physical ( const in vec3 irradiance , const in GeometricContext geometry , const in PhysicalMaterial material , inout ReflectedLight reflectedLight ) {
reflectedLight . indirectDiffuse += irradiance * BRDF _Lambert ( material . diffuseColor ) ;
}
void RE _IndirectSpecular _Physical ( const in vec3 radiance , const in vec3 irradiance , const in vec3 clearcoatRadiance , const in GeometricContext geometry , const in PhysicalMaterial material , inout ReflectedLight reflectedLight ) {
# ifdef USE _CLEARCOAT
clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF ( geometry . clearcoatNormal , geometry . viewDir , material . clearcoatF0 , material . clearcoatF90 , material . clearcoatRoughness ) ;
# endif
# ifdef USE _SHEEN
sheenSpecular += irradiance * material . sheenColor * IBLSheenBRDF ( geometry . normal , geometry . viewDir , material . sheenRoughness ) ;
# endif
vec3 singleScattering = vec3 ( 0.0 ) ;
vec3 multiScattering = vec3 ( 0.0 ) ;
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL _PI ;
# ifdef USE _IRIDESCENCE
computeMultiscatteringIridescence ( geometry . normal , geometry . viewDir , material . specularColor , material . specularF90 , material . iridescence , material . iridescenceFresnel , material . roughness , singleScattering , multiScattering ) ;
# else
computeMultiscattering ( geometry . normal , geometry . viewDir , material . specularColor , material . specularF90 , material . roughness , singleScattering , multiScattering ) ;
# endif
vec3 totalScattering = singleScattering + multiScattering ;
vec3 diffuse = material . diffuseColor * ( 1.0 - max ( max ( totalScattering . r , totalScattering . g ) , totalScattering . b ) ) ;
reflectedLight . indirectSpecular += radiance * singleScattering ;
reflectedLight . indirectSpecular += multiScattering * cosineWeightedIrradiance ;
reflectedLight . indirectDiffuse += diffuse * cosineWeightedIrradiance ;
}
# define RE _Direct RE _Direct _Physical
# define RE _Direct _RectArea RE _Direct _RectArea _Physical
# define RE _IndirectDiffuse RE _IndirectDiffuse _Physical
# define RE _IndirectSpecular RE _IndirectSpecular _Physical
float computeSpecularOcclusion ( const in float dotNV , const in float ambientOcclusion , const in float roughness ) {
return saturate ( pow ( dotNV + ambientOcclusion , exp2 ( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ) ;
} ` ,dU= `
GeometricContext geometry ;
geometry . position = - vViewPosition ;
geometry . normal = normal ;
geometry . viewDir = ( isOrthographic ) ? vec3 ( 0 , 0 , 1 ) : normalize ( vViewPosition ) ;
# ifdef USE _CLEARCOAT
geometry . clearcoatNormal = clearcoatNormal ;
# endif
# ifdef USE _IRIDESCENCE
float dotNVi = saturate ( dot ( normal , geometry . viewDir ) ) ;
if ( material . iridescenceThickness == 0.0 ) {
material . iridescence = 0.0 ;
} else {
material . iridescence = saturate ( material . iridescence ) ;
}
if ( material . iridescence > 0.0 ) {
material . iridescenceFresnel = evalIridescence ( 1.0 , material . iridescenceIOR , dotNVi , material . iridescenceThickness , material . specularColor ) ;
material . iridescenceF0 = Schlick _to _F0 ( material . iridescenceFresnel , 1.0 , dotNVi ) ;
}
# endif
IncidentLight directLight ;
# if ( NUM _POINT _LIGHTS > 0 ) && defined ( RE _Direct )
PointLight pointLight ;
# if defined ( USE _SHADOWMAP ) && NUM _POINT _LIGHT _SHADOWS > 0
PointLightShadow pointLightShadow ;
# endif
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _POINT _LIGHTS ; i ++ ) {
pointLight = pointLights [ i ] ;
getPointLightInfo ( pointLight , geometry , directLight ) ;
# if defined ( USE _SHADOWMAP ) && ( UNROLLED _LOOP _INDEX < NUM _POINT _LIGHT _SHADOWS )
pointLightShadow = pointLightShadows [ i ] ;
directLight . color *= all ( bvec2 ( directLight . visible , receiveShadow ) ) ? getPointShadow ( pointShadowMap [ i ] , pointLightShadow . shadowMapSize , pointLightShadow . shadowBias , pointLightShadow . shadowRadius , vPointShadowCoord [ i ] , pointLightShadow . shadowCameraNear , pointLightShadow . shadowCameraFar ) : 1.0 ;
# endif
RE _Direct ( directLight , geometry , material , reflectedLight ) ;
}
# pragma unroll _loop _end
# endif
# if ( NUM _SPOT _LIGHTS > 0 ) && defined ( RE _Direct )
SpotLight spotLight ;
vec4 spotColor ;
vec3 spotLightCoord ;
bool inSpotLightMap ;
# if defined ( USE _SHADOWMAP ) && NUM _SPOT _LIGHT _SHADOWS > 0
SpotLightShadow spotLightShadow ;
# endif
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _SPOT _LIGHTS ; i ++ ) {
spotLight = spotLights [ i ] ;
getSpotLightInfo ( spotLight , geometry , directLight ) ;
# if ( UNROLLED _LOOP _INDEX < NUM _SPOT _LIGHT _SHADOWS _WITH _MAPS )
# define SPOT _LIGHT _MAP _INDEX UNROLLED _LOOP _INDEX
# elif ( UNROLLED _LOOP _INDEX < NUM _SPOT _LIGHT _SHADOWS )
# define SPOT _LIGHT _MAP _INDEX NUM _SPOT _LIGHT _MAPS
# else
# define SPOT _LIGHT _MAP _INDEX ( UNROLLED _LOOP _INDEX - NUM _SPOT _LIGHT _SHADOWS + NUM _SPOT _LIGHT _SHADOWS _WITH _MAPS )
# endif
# if ( SPOT _LIGHT _MAP _INDEX < NUM _SPOT _LIGHT _MAPS )
spotLightCoord = vSpotLightCoord [ i ] . xyz / vSpotLightCoord [ i ] . w ;
inSpotLightMap = all ( lessThan ( abs ( spotLightCoord * 2. - 1. ) , vec3 ( 1.0 ) ) ) ;
spotColor = texture2D ( spotLightMap [ SPOT _LIGHT _MAP _INDEX ] , spotLightCoord . xy ) ;
directLight . color = inSpotLightMap ? directLight . color * spotColor . rgb : directLight . color ;
# endif
# undef SPOT _LIGHT _MAP _INDEX
# if defined ( USE _SHADOWMAP ) && ( UNROLLED _LOOP _INDEX < NUM _SPOT _LIGHT _SHADOWS )
spotLightShadow = spotLightShadows [ i ] ;
directLight . color *= all ( bvec2 ( directLight . visible , receiveShadow ) ) ? getShadow ( spotShadowMap [ i ] , spotLightShadow . shadowMapSize , spotLightShadow . shadowBias , spotLightShadow . shadowRadius , vSpotLightCoord [ i ] ) : 1.0 ;
# endif
RE _Direct ( directLight , geometry , material , reflectedLight ) ;
}
# pragma unroll _loop _end
# endif
# if ( NUM _DIR _LIGHTS > 0 ) && defined ( RE _Direct )
DirectionalLight directionalLight ;
# if defined ( USE _SHADOWMAP ) && NUM _DIR _LIGHT _SHADOWS > 0
DirectionalLightShadow directionalLightShadow ;
# endif
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _DIR _LIGHTS ; i ++ ) {
directionalLight = directionalLights [ i ] ;
getDirectionalLightInfo ( directionalLight , geometry , directLight ) ;
# if defined ( USE _SHADOWMAP ) && ( UNROLLED _LOOP _INDEX < NUM _DIR _LIGHT _SHADOWS )
directionalLightShadow = directionalLightShadows [ i ] ;
directLight . color *= all ( bvec2 ( directLight . visible , receiveShadow ) ) ? getShadow ( directionalShadowMap [ i ] , directionalLightShadow . shadowMapSize , directionalLightShadow . shadowBias , directionalLightShadow . shadowRadius , vDirectionalShadowCoord [ i ] ) : 1.0 ;
# endif
RE _Direct ( directLight , geometry , material , reflectedLight ) ;
}
# pragma unroll _loop _end
# endif
# if ( NUM _RECT _AREA _LIGHTS > 0 ) && defined ( RE _Direct _RectArea )
RectAreaLight rectAreaLight ;
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _RECT _AREA _LIGHTS ; i ++ ) {
rectAreaLight = rectAreaLights [ i ] ;
RE _Direct _RectArea ( rectAreaLight , geometry , material , reflectedLight ) ;
}
# pragma unroll _loop _end
# endif
# if defined ( RE _IndirectDiffuse )
vec3 iblIrradiance = vec3 ( 0.0 ) ;
vec3 irradiance = getAmbientLightIrradiance ( ambientLightColor ) ;
irradiance += getLightProbeIrradiance ( lightProbe , geometry . normal ) ;
# if ( NUM _HEMI _LIGHTS > 0 )
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _HEMI _LIGHTS ; i ++ ) {
irradiance += getHemisphereLightIrradiance ( hemisphereLights [ i ] , geometry . normal ) ;
}
# pragma unroll _loop _end
# endif
# endif
# if defined ( RE _IndirectSpecular )
vec3 radiance = vec3 ( 0.0 ) ;
vec3 clearcoatRadiance = vec3 ( 0.0 ) ;
# endif ` ,fU= ` # if defined ( RE _IndirectDiffuse )
# ifdef USE _LIGHTMAP
vec4 lightMapTexel = texture2D ( lightMap , vUv2 ) ;
vec3 lightMapIrradiance = lightMapTexel . rgb * lightMapIntensity ;
irradiance += lightMapIrradiance ;
# endif
# if defined ( USE _ENVMAP ) && defined ( STANDARD ) && defined ( ENVMAP _TYPE _CUBE _UV )
iblIrradiance += getIBLIrradiance ( geometry . normal ) ;
# endif
# endif
# if defined ( USE _ENVMAP ) && defined ( RE _IndirectSpecular )
radiance += getIBLRadiance ( geometry . viewDir , geometry . normal , material . roughness ) ;
# ifdef USE _CLEARCOAT
clearcoatRadiance += getIBLRadiance ( geometry . viewDir , geometry . clearcoatNormal , material . clearcoatRoughness ) ;
# endif
# endif ` ,hU= ` # if defined ( RE _IndirectDiffuse )
RE _IndirectDiffuse ( irradiance , geometry , material , reflectedLight ) ;
# endif
# if defined ( RE _IndirectSpecular )
RE _IndirectSpecular ( radiance , iblIrradiance , clearcoatRadiance , geometry , material , reflectedLight ) ;
# endif ` ,pU= ` # if defined ( USE _LOGDEPTHBUF ) && defined ( USE _LOGDEPTHBUF _EXT )
gl _FragDepthEXT = vIsPerspective == 0.0 ? gl _FragCoord . z : log2 ( vFragDepth ) * logDepthBufFC * 0.5 ;
# endif ` ,mU= ` # if defined ( USE _LOGDEPTHBUF ) && defined ( USE _LOGDEPTHBUF _EXT )
uniform float logDepthBufFC ;
varying float vFragDepth ;
varying float vIsPerspective ;
# endif ` ,gU= ` # ifdef USE _LOGDEPTHBUF
# ifdef USE _LOGDEPTHBUF _EXT
varying float vFragDepth ;
varying float vIsPerspective ;
# else
uniform float logDepthBufFC ;
# endif
# endif ` ,_U= ` # ifdef USE _LOGDEPTHBUF
# ifdef USE _LOGDEPTHBUF _EXT
vFragDepth = 1.0 + gl _Position . w ;
vIsPerspective = float ( isPerspectiveMatrix ( projectionMatrix ) ) ;
# else
if ( isPerspectiveMatrix ( projectionMatrix ) ) {
gl _Position . z = log2 ( max ( EPSILON , gl _Position . w + 1.0 ) ) * logDepthBufFC - 1.0 ;
gl _Position . z *= gl _Position . w ;
}
# endif
# endif ` ,vU= ` # ifdef USE _MAP
vec4 sampledDiffuseColor = texture2D ( map , vUv ) ;
# ifdef DECODE _VIDEO _TEXTURE
sampledDiffuseColor = vec4 ( mix ( pow ( sampledDiffuseColor . rgb * 0.9478672986 + vec3 ( 0.0521327014 ) , vec3 ( 2.4 ) ) , sampledDiffuseColor . rgb * 0.0773993808 , vec3 ( lessThanEqual ( sampledDiffuseColor . rgb , vec3 ( 0.04045 ) ) ) ) , sampledDiffuseColor . w ) ;
# endif
diffuseColor *= sampledDiffuseColor ;
# endif ` ,yU= ` # ifdef USE _MAP
uniform sampler2D map ;
# endif ` ,bU= ` # if defined ( USE _MAP ) || defined ( USE _ALPHAMAP )
vec2 uv = ( uvTransform * vec3 ( gl _PointCoord . x , 1.0 - gl _PointCoord . y , 1 ) ) . xy ;
# endif
# ifdef USE _MAP
diffuseColor *= texture2D ( map , uv ) ;
# endif
# ifdef USE _ALPHAMAP
diffuseColor . a *= texture2D ( alphaMap , uv ) . g ;
# endif ` ,xU= ` # if defined ( USE _MAP ) || defined ( USE _ALPHAMAP )
uniform mat3 uvTransform ;
# endif
# ifdef USE _MAP
uniform sampler2D map ;
# endif
# ifdef USE _ALPHAMAP
uniform sampler2D alphaMap ;
# endif ` ,SU= ` float metalnessFactor = metalness ;
# ifdef USE _METALNESSMAP
vec4 texelMetalness = texture2D ( metalnessMap , vUv ) ;
metalnessFactor *= texelMetalness . b ;
# endif ` ,MU= ` # ifdef USE _METALNESSMAP
uniform sampler2D metalnessMap ;
# endif ` ,wU= ` # if defined ( USE _MORPHCOLORS ) && defined ( MORPHTARGETS _TEXTURE )
vColor *= morphTargetBaseInfluence ;
for ( int i = 0 ; i < MORPHTARGETS _COUNT ; i ++ ) {
# if defined ( USE _COLOR _ALPHA )
if ( morphTargetInfluences [ i ] != 0.0 ) vColor += getMorph ( gl _VertexID , i , 2 ) * morphTargetInfluences [ i ] ;
# elif defined ( USE _COLOR )
if ( morphTargetInfluences [ i ] != 0.0 ) vColor += getMorph ( gl _VertexID , i , 2 ) . rgb * morphTargetInfluences [ i ] ;
# endif
}
# endif ` ,AU= ` # ifdef USE _MORPHNORMALS
objectNormal *= morphTargetBaseInfluence ;
# ifdef MORPHTARGETS _TEXTURE
for ( int i = 0 ; i < MORPHTARGETS _COUNT ; i ++ ) {
if ( morphTargetInfluences [ i ] != 0.0 ) objectNormal += getMorph ( gl _VertexID , i , 1 ) . xyz * morphTargetInfluences [ i ] ;
}
# else
objectNormal += morphNormal0 * morphTargetInfluences [ 0 ] ;
objectNormal += morphNormal1 * morphTargetInfluences [ 1 ] ;
objectNormal += morphNormal2 * morphTargetInfluences [ 2 ] ;
objectNormal += morphNormal3 * morphTargetInfluences [ 3 ] ;
# endif
# endif ` ,CU= ` # ifdef USE _MORPHTARGETS
uniform float morphTargetBaseInfluence ;
# ifdef MORPHTARGETS _TEXTURE
uniform float morphTargetInfluences [ MORPHTARGETS _COUNT ] ;
uniform sampler2DArray morphTargetsTexture ;
uniform ivec2 morphTargetsTextureSize ;
vec4 getMorph ( const in int vertexIndex , const in int morphTargetIndex , const in int offset ) {
int texelIndex = vertexIndex * MORPHTARGETS _TEXTURE _STRIDE + offset ;
int y = texelIndex / morphTargetsTextureSize . x ;
int x = texelIndex - y * morphTargetsTextureSize . x ;
ivec3 morphUV = ivec3 ( x , y , morphTargetIndex ) ;
return texelFetch ( morphTargetsTexture , morphUV , 0 ) ;
}
# else
# ifndef USE _MORPHNORMALS
uniform float morphTargetInfluences [ 8 ] ;
# else
uniform float morphTargetInfluences [ 4 ] ;
# endif
# endif
# endif ` ,TU= ` # ifdef USE _MORPHTARGETS
transformed *= morphTargetBaseInfluence ;
# ifdef MORPHTARGETS _TEXTURE
for ( int i = 0 ; i < MORPHTARGETS _COUNT ; i ++ ) {
if ( morphTargetInfluences [ i ] != 0.0 ) transformed += getMorph ( gl _VertexID , i , 0 ) . xyz * morphTargetInfluences [ i ] ;
}
# else
transformed += morphTarget0 * morphTargetInfluences [ 0 ] ;
transformed += morphTarget1 * morphTargetInfluences [ 1 ] ;
transformed += morphTarget2 * morphTargetInfluences [ 2 ] ;
transformed += morphTarget3 * morphTargetInfluences [ 3 ] ;
# ifndef USE _MORPHNORMALS
transformed += morphTarget4 * morphTargetInfluences [ 4 ] ;
transformed += morphTarget5 * morphTargetInfluences [ 5 ] ;
transformed += morphTarget6 * morphTargetInfluences [ 6 ] ;
transformed += morphTarget7 * morphTargetInfluences [ 7 ] ;
# endif
# endif
# endif ` ,EU= ` float faceDirection = gl _FrontFacing ? 1.0 : - 1.0 ;
# ifdef FLAT _SHADED
vec3 fdx = dFdx ( vViewPosition ) ;
vec3 fdy = dFdy ( vViewPosition ) ;
vec3 normal = normalize ( cross ( fdx , fdy ) ) ;
# else
vec3 normal = normalize ( vNormal ) ;
# ifdef DOUBLE _SIDED
normal = normal * faceDirection ;
# endif
# ifdef USE _TANGENT
vec3 tangent = normalize ( vTangent ) ;
vec3 bitangent = normalize ( vBitangent ) ;
# ifdef DOUBLE _SIDED
tangent = tangent * faceDirection ;
bitangent = bitangent * faceDirection ;
# endif
# if defined ( TANGENTSPACE _NORMALMAP ) || defined ( USE _CLEARCOAT _NORMALMAP )
mat3 vTBN = mat3 ( tangent , bitangent , normal ) ;
# endif
# endif
# endif
vec3 geometryNormal = normal ; ` ,DU= ` # ifdef OBJECTSPACE _NORMALMAP
normal = texture2D ( normalMap , vUv ) . xyz * 2.0 - 1.0 ;
# ifdef FLIP _SIDED
normal = - normal ;
# endif
# ifdef DOUBLE _SIDED
normal = normal * faceDirection ;
# endif
normal = normalize ( normalMatrix * normal ) ;
# elif defined ( TANGENTSPACE _NORMALMAP )
vec3 mapN = texture2D ( normalMap , vUv ) . xyz * 2.0 - 1.0 ;
mapN . xy *= normalScale ;
# ifdef USE _TANGENT
normal = normalize ( vTBN * mapN ) ;
# else
normal = perturbNormal2Arb ( - vViewPosition , normal , mapN , faceDirection ) ;
# endif
# elif defined ( USE _BUMPMAP )
normal = perturbNormalArb ( - vViewPosition , normal , dHdxy _fwd ( ) , faceDirection ) ;
# endif ` ,IU= ` # ifndef FLAT _SHADED
varying vec3 vNormal ;
# ifdef USE _TANGENT
varying vec3 vTangent ;
varying vec3 vBitangent ;
# endif
# endif ` ,RU= ` # ifndef FLAT _SHADED
varying vec3 vNormal ;
# ifdef USE _TANGENT
varying vec3 vTangent ;
varying vec3 vBitangent ;
# endif
# endif ` ,OU= ` # ifndef FLAT _SHADED
vNormal = normalize ( transformedNormal ) ;
# ifdef USE _TANGENT
vTangent = normalize ( transformedTangent ) ;
vBitangent = normalize ( cross ( vNormal , vTangent ) * tangent . w ) ;
# endif
# endif ` ,LU= ` # ifdef USE _NORMALMAP
uniform sampler2D normalMap ;
uniform vec2 normalScale ;
# endif
# ifdef OBJECTSPACE _NORMALMAP
uniform mat3 normalMatrix ;
# endif
# if ! defined ( USE _TANGENT ) && ( defined ( TANGENTSPACE _NORMALMAP ) || defined ( USE _CLEARCOAT _NORMALMAP ) )
vec3 perturbNormal2Arb ( vec3 eye _pos , vec3 surf _norm , vec3 mapN , float faceDirection ) {
vec3 q0 = dFdx ( eye _pos . xyz ) ;
vec3 q1 = dFdy ( eye _pos . xyz ) ;
vec2 st0 = dFdx ( vUv . st ) ;
vec2 st1 = dFdy ( vUv . st ) ;
vec3 N = surf _norm ;
vec3 q1perp = cross ( q1 , N ) ;
vec3 q0perp = cross ( N , q0 ) ;
vec3 T = q1perp * st0 . x + q0perp * st1 . x ;
vec3 B = q1perp * st0 . y + q0perp * st1 . y ;
float det = max ( dot ( T , T ) , dot ( B , B ) ) ;
float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt ( det ) ;
return normalize ( T * ( mapN . x * scale ) + B * ( mapN . y * scale ) + N * mapN . z ) ;
}
# endif ` ,PU= ` # ifdef USE _CLEARCOAT
vec3 clearcoatNormal = geometryNormal ;
# endif ` ,zU= ` # ifdef USE _CLEARCOAT _NORMALMAP
vec3 clearcoatMapN = texture2D ( clearcoatNormalMap , vUv ) . xyz * 2.0 - 1.0 ;
clearcoatMapN . xy *= clearcoatNormalScale ;
# ifdef USE _TANGENT
clearcoatNormal = normalize ( vTBN * clearcoatMapN ) ;
# else
clearcoatNormal = perturbNormal2Arb ( - vViewPosition , clearcoatNormal , clearcoatMapN , faceDirection ) ;
# endif
# endif ` ,kU= ` # ifdef USE _CLEARCOATMAP
uniform sampler2D clearcoatMap ;
# endif
# ifdef USE _CLEARCOAT _ROUGHNESSMAP
uniform sampler2D clearcoatRoughnessMap ;
# endif
# ifdef USE _CLEARCOAT _NORMALMAP
uniform sampler2D clearcoatNormalMap ;
uniform vec2 clearcoatNormalScale ;
# endif ` ,UU= ` # ifdef USE _IRIDESCENCEMAP
uniform sampler2D iridescenceMap ;
# endif
# ifdef USE _IRIDESCENCE _THICKNESSMAP
uniform sampler2D iridescenceThicknessMap ;
# endif ` ,NU= ` # ifdef OPAQUE
diffuseColor . a = 1.0 ;
# endif
# ifdef USE _TRANSMISSION
diffuseColor . a *= material . transmissionAlpha + 0.1 ;
# endif
gl _FragColor = vec4 ( outgoingLight , diffuseColor . a ) ; ` ,FU= ` vec3 packNormalToRGB ( const in vec3 normal ) {
return normalize ( normal ) * 0.5 + 0.5 ;
}
vec3 unpackRGBToNormal ( const in vec3 rgb ) {
return 2.0 * rgb . xyz - 1.0 ;
}
const float PackUpscale = 256. / 255. ; const float UnpackDownscale = 255. / 256. ;
const vec3 PackFactors = vec3 ( 256. * 256. * 256. , 256. * 256. , 256. ) ;
const vec4 UnpackFactors = UnpackDownscale / vec4 ( PackFactors , 1. ) ;
const float ShiftRight8 = 1. / 256. ;
vec4 packDepthToRGBA ( const in float v ) {
vec4 r = vec4 ( fract ( v * PackFactors ) , v ) ;
r . yzw -= r . xyz * ShiftRight8 ; return r * PackUpscale ;
}
float unpackRGBAToDepth ( const in vec4 v ) {
return dot ( v , UnpackFactors ) ;
}
vec4 pack2HalfToRGBA ( vec2 v ) {
vec4 r = vec4 ( v . x , fract ( v . x * 255.0 ) , v . y , fract ( v . y * 255.0 ) ) ;
return vec4 ( r . x - r . y / 255.0 , r . y , r . z - r . w / 255.0 , r . w ) ;
}
vec2 unpackRGBATo2Half ( vec4 v ) {
return vec2 ( v . x + ( v . y / 255.0 ) , v . z + ( v . w / 255.0 ) ) ;
}
float viewZToOrthographicDepth ( const in float viewZ , const in float near , const in float far ) {
return ( viewZ + near ) / ( near - far ) ;
}
float orthographicDepthToViewZ ( const in float linearClipZ , const in float near , const in float far ) {
return linearClipZ * ( near - far ) - near ;
}
float viewZToPerspectiveDepth ( const in float viewZ , const in float near , const in float far ) {
return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ) ;
}
float perspectiveDepthToViewZ ( const in float invClipZ , const in float near , const in float far ) {
return ( near * far ) / ( ( far - near ) * invClipZ - far ) ;
} ` ,BU= ` # ifdef PREMULTIPLIED _ALPHA
gl _FragColor . rgb *= gl _FragColor . a ;
# endif ` ,GU= ` vec4 mvPosition = vec4 ( transformed , 1.0 ) ;
# ifdef USE _INSTANCING
mvPosition = instanceMatrix * mvPosition ;
# endif
mvPosition = modelViewMatrix * mvPosition ;
gl _Position = projectionMatrix * mvPosition ; ` ,VU= ` # ifdef DITHERING
gl _FragColor . rgb = dithering ( gl _FragColor . rgb ) ;
# endif ` ,WU= ` # ifdef DITHERING
vec3 dithering ( vec3 color ) {
float grid _position = rand ( gl _FragCoord . xy ) ;
vec3 dither _shift _RGB = vec3 ( 0.25 / 255.0 , - 0.25 / 255.0 , 0.25 / 255.0 ) ;
dither _shift _RGB = mix ( 2.0 * dither _shift _RGB , - 2.0 * dither _shift _RGB , grid _position ) ;
return color + dither _shift _RGB ;
}
# endif ` ,jU= ` float roughnessFactor = roughness ;
# ifdef USE _ROUGHNESSMAP
vec4 texelRoughness = texture2D ( roughnessMap , vUv ) ;
roughnessFactor *= texelRoughness . g ;
# endif ` ,HU= ` # ifdef USE _ROUGHNESSMAP
uniform sampler2D roughnessMap ;
# endif ` , $ U= ` # if NUM _SPOT _LIGHT _COORDS > 0
varying vec4 vSpotLightCoord [ NUM _SPOT _LIGHT _COORDS ] ;
# endif
# if NUM _SPOT _LIGHT _MAPS > 0
uniform sampler2D spotLightMap [ NUM _SPOT _LIGHT _MAPS ] ;
# endif
# ifdef USE _SHADOWMAP
# if NUM _DIR _LIGHT _SHADOWS > 0
uniform sampler2D directionalShadowMap [ NUM _DIR _LIGHT _SHADOWS ] ;
varying vec4 vDirectionalShadowCoord [ NUM _DIR _LIGHT _SHADOWS ] ;
struct DirectionalLightShadow {
float shadowBias ;
float shadowNormalBias ;
float shadowRadius ;
vec2 shadowMapSize ;
} ;
uniform DirectionalLightShadow directionalLightShadows [ NUM _DIR _LIGHT _SHADOWS ] ;
# endif
# if NUM _SPOT _LIGHT _SHADOWS > 0
uniform sampler2D spotShadowMap [ NUM _SPOT _LIGHT _SHADOWS ] ;
struct SpotLightShadow {
float shadowBias ;
float shadowNormalBias ;
float shadowRadius ;
vec2 shadowMapSize ;
} ;
uniform SpotLightShadow spotLightShadows [ NUM _SPOT _LIGHT _SHADOWS ] ;
# endif
# if NUM _POINT _LIGHT _SHADOWS > 0
uniform sampler2D pointShadowMap [ NUM _POINT _LIGHT _SHADOWS ] ;
varying vec4 vPointShadowCoord [ NUM _POINT _LIGHT _SHADOWS ] ;
struct PointLightShadow {
float shadowBias ;
float shadowNormalBias ;
float shadowRadius ;
vec2 shadowMapSize ;
float shadowCameraNear ;
float shadowCameraFar ;
} ;
uniform PointLightShadow pointLightShadows [ NUM _POINT _LIGHT _SHADOWS ] ;
# endif
float texture2DCompare ( sampler2D depths , vec2 uv , float compare ) {
return step ( compare , unpackRGBAToDepth ( texture2D ( depths , uv ) ) ) ;
}
vec2 texture2DDistribution ( sampler2D shadow , vec2 uv ) {
return unpackRGBATo2Half ( texture2D ( shadow , uv ) ) ;
}
float VSMShadow ( sampler2D shadow , vec2 uv , float compare ) {
float occlusion = 1.0 ;
vec2 distribution = texture2DDistribution ( shadow , uv ) ;
float hard _shadow = step ( compare , distribution . x ) ;
if ( hard _shadow != 1.0 ) {
float distance = compare - distribution . x ;
float variance = max ( 0.00000 , distribution . y * distribution . y ) ;
float softness _probability = variance / ( variance + distance * distance ) ; softness _probability = clamp ( ( softness _probability - 0.3 ) / ( 0.95 - 0.3 ) , 0.0 , 1.0 ) ; occlusion = clamp ( max ( hard _shadow , softness _probability ) , 0.0 , 1.0 ) ;
}
return occlusion ;
}
float getShadow ( sampler2D shadowMap , vec2 shadowMapSize , float shadowBias , float shadowRadius , vec4 shadowCoord ) {
float shadow = 1.0 ;
shadowCoord . xyz /= shadowCoord . w ;
shadowCoord . z += shadowBias ;
bvec4 inFrustumVec = bvec4 ( shadowCoord . x >= 0.0 , shadowCoord . x <= 1.0 , shadowCoord . y >= 0.0 , shadowCoord . y <= 1.0 ) ;
bool inFrustum = all ( inFrustumVec ) ;
bvec2 frustumTestVec = bvec2 ( inFrustum , shadowCoord . z <= 1.0 ) ;
bool frustumTest = all ( frustumTestVec ) ;
if ( frustumTest ) {
# if defined ( SHADOWMAP _TYPE _PCF )
vec2 texelSize = vec2 ( 1.0 ) / shadowMapSize ;
float dx0 = - texelSize . x * shadowRadius ;
float dy0 = - texelSize . y * shadowRadius ;
float dx1 = + texelSize . x * shadowRadius ;
float dy1 = + texelSize . y * shadowRadius ;
float dx2 = dx0 / 2.0 ;
float dy2 = dy0 / 2.0 ;
float dx3 = dx1 / 2.0 ;
float dy3 = dy1 / 2.0 ;
shadow = (
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx0 , dy0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( 0.0 , dy0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx1 , dy0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx2 , dy2 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( 0.0 , dy2 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx3 , dy2 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx0 , 0.0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx2 , 0.0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx3 , 0.0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx1 , 0.0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx2 , dy3 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( 0.0 , dy3 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx3 , dy3 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx0 , dy1 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( 0.0 , dy1 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , shadowCoord . xy + vec2 ( dx1 , dy1 ) , shadowCoord . z )
) * ( 1.0 / 17.0 ) ;
# elif defined ( SHADOWMAP _TYPE _PCF _SOFT )
vec2 texelSize = vec2 ( 1.0 ) / shadowMapSize ;
float dx = texelSize . x ;
float dy = texelSize . y ;
vec2 uv = shadowCoord . xy ;
vec2 f = fract ( uv * shadowMapSize + 0.5 ) ;
uv -= f * texelSize ;
shadow = (
texture2DCompare ( shadowMap , uv , shadowCoord . z ) +
texture2DCompare ( shadowMap , uv + vec2 ( dx , 0.0 ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , uv + vec2 ( 0.0 , dy ) , shadowCoord . z ) +
texture2DCompare ( shadowMap , uv + texelSize , shadowCoord . z ) +
mix ( texture2DCompare ( shadowMap , uv + vec2 ( - dx , 0.0 ) , shadowCoord . z ) ,
texture2DCompare ( shadowMap , uv + vec2 ( 2.0 * dx , 0.0 ) , shadowCoord . z ) ,
f . x ) +
mix ( texture2DCompare ( shadowMap , uv + vec2 ( - dx , dy ) , shadowCoord . z ) ,
texture2DCompare ( shadowMap , uv + vec2 ( 2.0 * dx , dy ) , shadowCoord . z ) ,
f . x ) +
mix ( texture2DCompare ( shadowMap , uv + vec2 ( 0.0 , - dy ) , shadowCoord . z ) ,
texture2DCompare ( shadowMap , uv + vec2 ( 0.0 , 2.0 * dy ) , shadowCoord . z ) ,
f . y ) +
mix ( texture2DCompare ( shadowMap , uv + vec2 ( dx , - dy ) , shadowCoord . z ) ,
texture2DCompare ( shadowMap , uv + vec2 ( dx , 2.0 * dy ) , shadowCoord . z ) ,
f . y ) +
mix ( mix ( texture2DCompare ( shadowMap , uv + vec2 ( - dx , - dy ) , shadowCoord . z ) ,
texture2DCompare ( shadowMap , uv + vec2 ( 2.0 * dx , - dy ) , shadowCoord . z ) ,
f . x ) ,
mix ( texture2DCompare ( shadowMap , uv + vec2 ( - dx , 2.0 * dy ) , shadowCoord . z ) ,
texture2DCompare ( shadowMap , uv + vec2 ( 2.0 * dx , 2.0 * dy ) , shadowCoord . z ) ,
f . x ) ,
f . y )
) * ( 1.0 / 9.0 ) ;
# elif defined ( SHADOWMAP _TYPE _VSM )
shadow = VSMShadow ( shadowMap , shadowCoord . xy , shadowCoord . z ) ;
# else
shadow = texture2DCompare ( shadowMap , shadowCoord . xy , shadowCoord . z ) ;
# endif
}
return shadow ;
}
vec2 cubeToUV ( vec3 v , float texelSizeY ) {
vec3 absV = abs ( v ) ;
float scaleToCube = 1.0 / max ( absV . x , max ( absV . y , absV . z ) ) ;
absV *= scaleToCube ;
v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ) ;
vec2 planar = v . xy ;
float almostATexel = 1.5 * texelSizeY ;
float almostOne = 1.0 - almostATexel ;
if ( absV . z >= almostOne ) {
if ( v . z > 0.0 )
planar . x = 4.0 - v . x ;
} else if ( absV . x >= almostOne ) {
float signX = sign ( v . x ) ;
planar . x = v . z * signX + 2.0 * signX ;
} else if ( absV . y >= almostOne ) {
float signY = sign ( v . y ) ;
planar . x = v . x + 2.0 * signY + 2.0 ;
planar . y = v . z * signY - 2.0 ;
}
return vec2 ( 0.125 , 0.25 ) * planar + vec2 ( 0.375 , 0.75 ) ;
}
float getPointShadow ( sampler2D shadowMap , vec2 shadowMapSize , float shadowBias , float shadowRadius , vec4 shadowCoord , float shadowCameraNear , float shadowCameraFar ) {
vec2 texelSize = vec2 ( 1.0 ) / ( shadowMapSize * vec2 ( 4.0 , 2.0 ) ) ;
vec3 lightToPosition = shadowCoord . xyz ;
float dp = ( length ( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ) ; dp += shadowBias ;
vec3 bd3D = normalize ( lightToPosition ) ;
# if defined ( SHADOWMAP _TYPE _PCF ) || defined ( SHADOWMAP _TYPE _PCF _SOFT ) || defined ( SHADOWMAP _TYPE _VSM )
vec2 offset = vec2 ( - 1 , 1 ) * shadowRadius * texelSize . y ;
return (
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . xyy , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . yyy , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . xyx , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . yyx , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . xxy , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . yxy , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . xxx , texelSize . y ) , dp ) +
texture2DCompare ( shadowMap , cubeToUV ( bd3D + offset . yxx , texelSize . y ) , dp )
) * ( 1.0 / 9.0 ) ;
# else
return texture2DCompare ( shadowMap , cubeToUV ( bd3D , texelSize . y ) , dp ) ;
# endif
}
# endif ` ,YU= ` # if NUM _SPOT _LIGHT _COORDS > 0
uniform mat4 spotLightMatrix [ NUM _SPOT _LIGHT _COORDS ] ;
varying vec4 vSpotLightCoord [ NUM _SPOT _LIGHT _COORDS ] ;
# endif
# ifdef USE _SHADOWMAP
# if NUM _DIR _LIGHT _SHADOWS > 0
uniform mat4 directionalShadowMatrix [ NUM _DIR _LIGHT _SHADOWS ] ;
varying vec4 vDirectionalShadowCoord [ NUM _DIR _LIGHT _SHADOWS ] ;
struct DirectionalLightShadow {
float shadowBias ;
float shadowNormalBias ;
float shadowRadius ;
vec2 shadowMapSize ;
} ;
uniform DirectionalLightShadow directionalLightShadows [ NUM _DIR _LIGHT _SHADOWS ] ;
# endif
# if NUM _SPOT _LIGHT _SHADOWS > 0
struct SpotLightShadow {
float shadowBias ;
float shadowNormalBias ;
float shadowRadius ;
vec2 shadowMapSize ;
} ;
uniform SpotLightShadow spotLightShadows [ NUM _SPOT _LIGHT _SHADOWS ] ;
# endif
# if NUM _POINT _LIGHT _SHADOWS > 0
uniform mat4 pointShadowMatrix [ NUM _POINT _LIGHT _SHADOWS ] ;
varying vec4 vPointShadowCoord [ NUM _POINT _LIGHT _SHADOWS ] ;
struct PointLightShadow {
float shadowBias ;
float shadowNormalBias ;
float shadowRadius ;
vec2 shadowMapSize ;
float shadowCameraNear ;
float shadowCameraFar ;
} ;
uniform PointLightShadow pointLightShadows [ NUM _POINT _LIGHT _SHADOWS ] ;
# endif
# endif ` ,JU= ` # if defined ( USE _SHADOWMAP ) || ( NUM _SPOT _LIGHT _COORDS > 0 )
# if NUM _DIR _LIGHT _SHADOWS > 0 || NUM _SPOT _LIGHT _COORDS > 0 || NUM _POINT _LIGHT _SHADOWS > 0
vec3 shadowWorldNormal = inverseTransformDirection ( transformedNormal , viewMatrix ) ;
vec4 shadowWorldPosition ;
# endif
# if NUM _DIR _LIGHT _SHADOWS > 0
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _DIR _LIGHT _SHADOWS ; i ++ ) {
shadowWorldPosition = worldPosition + vec4 ( shadowWorldNormal * directionalLightShadows [ i ] . shadowNormalBias , 0 ) ;
vDirectionalShadowCoord [ i ] = directionalShadowMatrix [ i ] * shadowWorldPosition ;
}
# pragma unroll _loop _end
# endif
# if NUM _SPOT _LIGHT _COORDS > 0
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _SPOT _LIGHT _COORDS ; i ++ ) {
shadowWorldPosition = worldPosition ;
# if ( defined ( USE _SHADOWMAP ) && UNROLLED _LOOP _INDEX < NUM _SPOT _LIGHT _SHADOWS )
shadowWorldPosition . xyz += shadowWorldNormal * spotLightShadows [ i ] . shadowNormalBias ;
# endif
vSpotLightCoord [ i ] = spotLightMatrix [ i ] * shadowWorldPosition ;
}
# pragma unroll _loop _end
# endif
# if NUM _POINT _LIGHT _SHADOWS > 0
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _POINT _LIGHT _SHADOWS ; i ++ ) {
shadowWorldPosition = worldPosition + vec4 ( shadowWorldNormal * pointLightShadows [ i ] . shadowNormalBias , 0 ) ;
vPointShadowCoord [ i ] = pointShadowMatrix [ i ] * shadowWorldPosition ;
}
# pragma unroll _loop _end
# endif
# endif ` ,ZU= ` float getShadowMask ( ) {
float shadow = 1.0 ;
# ifdef USE _SHADOWMAP
# if NUM _DIR _LIGHT _SHADOWS > 0
DirectionalLightShadow directionalLight ;
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _DIR _LIGHT _SHADOWS ; i ++ ) {
directionalLight = directionalLightShadows [ i ] ;
shadow *= receiveShadow ? getShadow ( directionalShadowMap [ i ] , directionalLight . shadowMapSize , directionalLight . shadowBias , directionalLight . shadowRadius , vDirectionalShadowCoord [ i ] ) : 1.0 ;
}
# pragma unroll _loop _end
# endif
# if NUM _SPOT _LIGHT _SHADOWS > 0
SpotLightShadow spotLight ;
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _SPOT _LIGHT _SHADOWS ; i ++ ) {
spotLight = spotLightShadows [ i ] ;
shadow *= receiveShadow ? getShadow ( spotShadowMap [ i ] , spotLight . shadowMapSize , spotLight . shadowBias , spotLight . shadowRadius , vSpotLightCoord [ i ] ) : 1.0 ;
}
# pragma unroll _loop _end
# endif
# if NUM _POINT _LIGHT _SHADOWS > 0
PointLightShadow pointLight ;
# pragma unroll _loop _start
for ( int i = 0 ; i < NUM _POINT _LIGHT _SHADOWS ; i ++ ) {
pointLight = pointLightShadows [ i ] ;
shadow *= receiveShadow ? getPointShadow ( pointShadowMap [ i ] , pointLight . shadowMapSize , pointLight . shadowBias , pointLight . shadowRadius , vPointShadowCoord [ i ] , pointLight . shadowCameraNear , pointLight . shadowCameraFar ) : 1.0 ;
}
# pragma unroll _loop _end
# endif
# endif
return shadow ;
} ` ,XU= ` # ifdef USE _SKINNING
mat4 boneMatX = getBoneMatrix ( skinIndex . x ) ;
mat4 boneMatY = getBoneMatrix ( skinIndex . y ) ;
mat4 boneMatZ = getBoneMatrix ( skinIndex . z ) ;
mat4 boneMatW = getBoneMatrix ( skinIndex . w ) ;
# endif ` ,qU= ` # ifdef USE _SKINNING
uniform mat4 bindMatrix ;
uniform mat4 bindMatrixInverse ;
uniform highp sampler2D boneTexture ;
uniform int boneTextureSize ;
mat4 getBoneMatrix ( const in float i ) {
float j = i * 4.0 ;
float x = mod ( j , float ( boneTextureSize ) ) ;
float y = floor ( j / float ( boneTextureSize ) ) ;
float dx = 1.0 / float ( boneTextureSize ) ;
float dy = 1.0 / float ( boneTextureSize ) ;
y = dy * ( y + 0.5 ) ;
vec4 v1 = texture2D ( boneTexture , vec2 ( dx * ( x + 0.5 ) , y ) ) ;
vec4 v2 = texture2D ( boneTexture , vec2 ( dx * ( x + 1.5 ) , y ) ) ;
vec4 v3 = texture2D ( boneTexture , vec2 ( dx * ( x + 2.5 ) , y ) ) ;
vec4 v4 = texture2D ( boneTexture , vec2 ( dx * ( x + 3.5 ) , y ) ) ;
mat4 bone = mat4 ( v1 , v2 , v3 , v4 ) ;
return bone ;
}
# endif ` ,QU= ` # ifdef USE _SKINNING
vec4 skinVertex = bindMatrix * vec4 ( transformed , 1.0 ) ;
vec4 skinned = vec4 ( 0.0 ) ;
skinned += boneMatX * skinVertex * skinWeight . x ;
skinned += boneMatY * skinVertex * skinWeight . y ;
skinned += boneMatZ * skinVertex * skinWeight . z ;
skinned += boneMatW * skinVertex * skinWeight . w ;
transformed = ( bindMatrixInverse * skinned ) . xyz ;
# endif ` ,KU= ` # ifdef USE _SKINNING
mat4 skinMatrix = mat4 ( 0.0 ) ;
skinMatrix += skinWeight . x * boneMatX ;
skinMatrix += skinWeight . y * boneMatY ;
skinMatrix += skinWeight . z * boneMatZ ;
skinMatrix += skinWeight . w * boneMatW ;
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix ;
objectNormal = vec4 ( skinMatrix * vec4 ( objectNormal , 0.0 ) ) . xyz ;
# ifdef USE _TANGENT
objectTangent = vec4 ( skinMatrix * vec4 ( objectTangent , 0.0 ) ) . xyz ;
# endif
# endif ` ,eN= ` float specularStrength ;
# ifdef USE _SPECULARMAP
vec4 texelSpecular = texture2D ( specularMap , vUv ) ;
specularStrength = texelSpecular . r ;
# else
specularStrength = 1.0 ;
# endif ` ,tN= ` # ifdef USE _SPECULARMAP
uniform sampler2D specularMap ;
# endif ` ,nN= ` # if defined ( TONE _MAPPING )
gl _FragColor . rgb = toneMapping ( gl _FragColor . rgb ) ;
# endif ` ,iN= ` # ifndef saturate
# define saturate ( a ) clamp ( a , 0.0 , 1.0 )
# endif
uniform float toneMappingExposure ;
vec3 LinearToneMapping ( vec3 color ) {
return toneMappingExposure * color ;
}
vec3 ReinhardToneMapping ( vec3 color ) {
color *= toneMappingExposure ;
return saturate ( color / ( vec3 ( 1.0 ) + color ) ) ;
}
vec3 OptimizedCineonToneMapping ( vec3 color ) {
color *= toneMappingExposure ;
color = max ( vec3 ( 0.0 ) , color - 0.004 ) ;
return pow ( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ) , vec3 ( 2.2 ) ) ;
}
vec3 RRTAndODTFit ( vec3 v ) {
vec3 a = v * ( v + 0.0245786 ) - 0.000090537 ;
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081 ;
return a / b ;
}
vec3 ACESFilmicToneMapping ( vec3 color ) {
const mat3 ACESInputMat = mat3 (
vec3 ( 0.59719 , 0.07600 , 0.02840 ) , vec3 ( 0.35458 , 0.90834 , 0.13383 ) ,
vec3 ( 0.04823 , 0.01566 , 0.83777 )
) ;
const mat3 ACESOutputMat = mat3 (
vec3 ( 1.60475 , - 0.10208 , - 0.00327 ) , vec3 ( - 0.53108 , 1.10813 , - 0.07276 ) ,
vec3 ( - 0.07367 , - 0.00605 , 1.07602 )
) ;
color *= toneMappingExposure / 0.6 ;
color = ACESInputMat * color ;
color = RRTAndODTFit ( color ) ;
color = ACESOutputMat * color ;
return saturate ( color ) ;
}
vec3 CustomToneMapping ( vec3 color ) { return color ; } ` ,rN= ` # ifdef USE _TRANSMISSION
material . transmission = transmission ;
material . transmissionAlpha = 1.0 ;
material . thickness = thickness ;
material . attenuationDistance = attenuationDistance ;
material . attenuationColor = attenuationColor ;
# ifdef USE _TRANSMISSIONMAP
material . transmission *= texture2D ( transmissionMap , vUv ) . r ;
# endif
# ifdef USE _THICKNESSMAP
material . thickness *= texture2D ( thicknessMap , vUv ) . g ;
# endif
vec3 pos = vWorldPosition ;
vec3 v = normalize ( cameraPosition - pos ) ;
vec3 n = inverseTransformDirection ( normal , viewMatrix ) ;
vec4 transmission = getIBLVolumeRefraction (
n , v , material . roughness , material . diffuseColor , material . specularColor , material . specularF90 ,
pos , modelMatrix , viewMatrix , projectionMatrix , material . ior , material . thickness ,
material . attenuationColor , material . attenuationDistance ) ;
material . transmissionAlpha = mix ( material . transmissionAlpha , transmission . a , material . transmission ) ;
totalDiffuse = mix ( totalDiffuse , transmission . rgb , material . transmission ) ;
# endif ` ,oN= ` # ifdef USE _TRANSMISSION
uniform float transmission ;
uniform float thickness ;
uniform float attenuationDistance ;
uniform vec3 attenuationColor ;
# ifdef USE _TRANSMISSIONMAP
uniform sampler2D transmissionMap ;
# endif
# ifdef USE _THICKNESSMAP
uniform sampler2D thicknessMap ;
# endif
uniform vec2 transmissionSamplerSize ;
uniform sampler2D transmissionSamplerMap ;
uniform mat4 modelMatrix ;
uniform mat4 projectionMatrix ;
varying vec3 vWorldPosition ;
vec3 getVolumeTransmissionRay ( const in vec3 n , const in vec3 v , const in float thickness , const in float ior , const in mat4 modelMatrix ) {
vec3 refractionVector = refract ( - v , normalize ( n ) , 1.0 / ior ) ;
vec3 modelScale ;
modelScale . x = length ( vec3 ( modelMatrix [ 0 ] . xyz ) ) ;
modelScale . y = length ( vec3 ( modelMatrix [ 1 ] . xyz ) ) ;
modelScale . z = length ( vec3 ( modelMatrix [ 2 ] . xyz ) ) ;
return normalize ( refractionVector ) * thickness * modelScale ;
}
float applyIorToRoughness ( const in float roughness , const in float ior ) {
return roughness * clamp ( ior * 2.0 - 2.0 , 0.0 , 1.0 ) ;
}
vec4 getTransmissionSample ( const in vec2 fragCoord , const in float roughness , const in float ior ) {
float framebufferLod = log2 ( transmissionSamplerSize . x ) * applyIorToRoughness ( roughness , ior ) ;
# ifdef texture2DLodEXT
return texture2DLodEXT ( transmissionSamplerMap , fragCoord . xy , framebufferLod ) ;
# else
return texture2D ( transmissionSamplerMap , fragCoord . xy , framebufferLod ) ;
# endif
}
vec3 applyVolumeAttenuation ( const in vec3 radiance , const in float transmissionDistance , const in vec3 attenuationColor , const in float attenuationDistance ) {
if ( isinf ( attenuationDistance ) ) {
return radiance ;
} else {
vec3 attenuationCoefficient = - log ( attenuationColor ) / attenuationDistance ;
vec3 transmittance = exp ( - attenuationCoefficient * transmissionDistance ) ; return transmittance * radiance ;
}
}
vec4 getIBLVolumeRefraction ( const in vec3 n , const in vec3 v , const in float roughness , const in vec3 diffuseColor ,
const in vec3 specularColor , const in float specularF90 , const in vec3 position , const in mat4 modelMatrix ,
const in mat4 viewMatrix , const in mat4 projMatrix , const in float ior , const in float thickness ,
const in vec3 attenuationColor , const in float attenuationDistance ) {
vec3 transmissionRay = getVolumeTransmissionRay ( n , v , thickness , ior , modelMatrix ) ;
vec3 refractedRayExit = position + transmissionRay ;
vec4 ndcPos = projMatrix * viewMatrix * vec4 ( refractedRayExit , 1.0 ) ;
vec2 refractionCoords = ndcPos . xy / ndcPos . w ;
refractionCoords += 1.0 ;
refractionCoords /= 2.0 ;
vec4 transmittedLight = getTransmissionSample ( refractionCoords , roughness , ior ) ;
vec3 attenuatedColor = applyVolumeAttenuation ( transmittedLight . rgb , length ( transmissionRay ) , attenuationColor , attenuationDistance ) ;
vec3 F = EnvironmentBRDF ( n , v , specularColor , specularF90 , roughness ) ;
return vec4 ( ( 1.0 - F ) * attenuatedColor * diffuseColor , transmittedLight . a ) ;
}
# endif ` ,aN= ` # if ( defined ( USE _UV ) && ! defined ( UVS _VERTEX _ONLY ) )
varying vec2 vUv ;
# endif ` ,sN= ` # ifdef USE _UV
# ifdef UVS _VERTEX _ONLY
vec2 vUv ;
# else
varying vec2 vUv ;
# endif
uniform mat3 uvTransform ;
# endif ` ,lN= ` # ifdef USE _UV
vUv = ( uvTransform * vec3 ( uv , 1 ) ) . xy ;
# endif ` ,uN= ` # if defined ( USE _LIGHTMAP ) || defined ( USE _AOMAP )
varying vec2 vUv2 ;
# endif ` ,cN= ` # if defined ( USE _LIGHTMAP ) || defined ( USE _AOMAP )
attribute vec2 uv2 ;
varying vec2 vUv2 ;
uniform mat3 uv2Transform ;
# endif ` ,dN= ` # if defined ( USE _LIGHTMAP ) || defined ( USE _AOMAP )
vUv2 = ( uv2Transform * vec3 ( uv2 , 1 ) ) . xy ;
# endif ` ,fN= ` # if defined ( USE _ENVMAP ) || defined ( DISTANCE ) || defined ( USE _SHADOWMAP ) || defined ( USE _TRANSMISSION ) || NUM _SPOT _LIGHT _COORDS > 0
vec4 worldPosition = vec4 ( transformed , 1.0 ) ;
# ifdef USE _INSTANCING
worldPosition = instanceMatrix * worldPosition ;
# endif
worldPosition = modelMatrix * worldPosition ;
# endif ` ;const hN= ` varying vec2 vUv ;
uniform mat3 uvTransform ;
void main ( ) {
vUv = ( uvTransform * vec3 ( uv , 1 ) ) . xy ;
gl _Position = vec4 ( position . xy , 1.0 , 1.0 ) ;
} ` ,pN= ` uniform sampler2D t2D ;
varying vec2 vUv ;
void main ( ) {
gl _FragColor = texture2D ( t2D , vUv ) ;
# ifdef DECODE _VIDEO _TEXTURE
gl _FragColor = vec4 ( mix ( pow ( gl _FragColor . rgb * 0.9478672986 + vec3 ( 0.0521327014 ) , vec3 ( 2.4 ) ) , gl _FragColor . rgb * 0.0773993808 , vec3 ( lessThanEqual ( gl _FragColor . rgb , vec3 ( 0.04045 ) ) ) ) , gl _FragColor . w ) ;
# endif
# include < tonemapping _fragment >
# include < encodings _fragment >
} ` ,mN= ` varying vec3 vWorldDirection ;
# include < common >
void main ( ) {
vWorldDirection = transformDirection ( position , modelMatrix ) ;
# include < begin _vertex >
# include < project _vertex >
gl _Position . z = gl _Position . w ;
} ` ,gN= ` # include < envmap _common _pars _fragment >
uniform float opacity ;
varying vec3 vWorldDirection ;
# include < cube _uv _reflection _fragment >
void main ( ) {
vec3 vReflect = vWorldDirection ;
# include < envmap _fragment >
gl _FragColor = envColor ;
gl _FragColor . a *= opacity ;
# include < tonemapping _fragment >
# include < encodings _fragment >
} ` ,_N= ` # include < common >
# include < uv _pars _vertex >
# include < displacementmap _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
varying vec2 vHighPrecisionZW ;
void main ( ) {
# include < uv _vertex >
# include < skinbase _vertex >
# ifdef USE _DISPLACEMENTMAP
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinnormal _vertex >
# endif
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
vHighPrecisionZW = gl _Position . zw ;
} ` ,vN= ` # if DEPTH _PACKING == 3200
uniform float opacity ;
# endif
# include < common >
# include < packing >
# include < uv _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
varying vec2 vHighPrecisionZW ;
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( 1.0 ) ;
# if DEPTH _PACKING == 3200
diffuseColor . a = opacity ;
# endif
# include < map _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < logdepthbuf _fragment >
float fragCoordZ = 0.5 * vHighPrecisionZW [ 0 ] / vHighPrecisionZW [ 1 ] + 0.5 ;
# if DEPTH _PACKING == 3200
gl _FragColor = vec4 ( vec3 ( 1.0 - fragCoordZ ) , opacity ) ;
# elif DEPTH _PACKING == 3201
gl _FragColor = packDepthToRGBA ( fragCoordZ ) ;
# endif
} ` ,yN= ` # define DISTANCE
varying vec3 vWorldPosition ;
# include < common >
# include < uv _pars _vertex >
# include < displacementmap _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < skinbase _vertex >
# ifdef USE _DISPLACEMENTMAP
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinnormal _vertex >
# endif
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < worldpos _vertex >
# include < clipping _planes _vertex >
vWorldPosition = worldPosition . xyz ;
} ` ,bN= ` # define DISTANCE
uniform vec3 referencePosition ;
uniform float nearDistance ;
uniform float farDistance ;
varying vec3 vWorldPosition ;
# include < common >
# include < packing >
# include < uv _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( 1.0 ) ;
# include < map _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
float dist = length ( vWorldPosition - referencePosition ) ;
dist = ( dist - nearDistance ) / ( farDistance - nearDistance ) ;
dist = saturate ( dist ) ;
gl _FragColor = packDepthToRGBA ( dist ) ;
} ` ,xN= ` varying vec3 vWorldDirection ;
# include < common >
void main ( ) {
vWorldDirection = transformDirection ( position , modelMatrix ) ;
# include < begin _vertex >
# include < project _vertex >
} ` ,SN= ` uniform sampler2D tEquirect ;
varying vec3 vWorldDirection ;
# include < common >
void main ( ) {
vec3 direction = normalize ( vWorldDirection ) ;
vec2 sampleUV = equirectUv ( direction ) ;
gl _FragColor = texture2D ( tEquirect , sampleUV ) ;
# include < tonemapping _fragment >
# include < encodings _fragment >
} ` ,MN= ` uniform float scale ;
attribute float lineDistance ;
varying float vLineDistance ;
# include < common >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < morphtarget _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
vLineDistance = scale * lineDistance ;
# include < color _vertex >
# include < morphcolor _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
# include < fog _vertex >
} ` ,wN= ` uniform vec3 diffuse ;
uniform float opacity ;
uniform float dashSize ;
uniform float totalSize ;
varying float vLineDistance ;
# include < common >
# include < color _pars _fragment >
# include < fog _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
if ( mod ( vLineDistance , totalSize ) > dashSize ) {
discard ;
}
vec3 outgoingLight = vec3 ( 0.0 ) ;
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
# include < logdepthbuf _fragment >
# include < color _fragment >
outgoingLight = diffuseColor . rgb ;
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
} ` ,AN= ` # include < common >
# include < uv _pars _vertex >
# include < uv2 _pars _vertex >
# include < envmap _pars _vertex >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < uv2 _vertex >
# include < color _vertex >
# include < morphcolor _vertex >
# if defined ( USE _ENVMAP ) || defined ( USE _SKINNING )
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# endif
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
# include < worldpos _vertex >
# include < envmap _vertex >
# include < fog _vertex >
} ` ,CN= ` uniform vec3 diffuse ;
uniform float opacity ;
# ifndef FLAT _SHADED
varying vec3 vNormal ;
# endif
# include < common >
# include < dithering _pars _fragment >
# include < color _pars _fragment >
# include < uv _pars _fragment >
# include < uv2 _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < aomap _pars _fragment >
# include < lightmap _pars _fragment >
# include < envmap _common _pars _fragment >
# include < envmap _pars _fragment >
# include < fog _pars _fragment >
# include < specularmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < color _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < specularmap _fragment >
ReflectedLight reflectedLight = ReflectedLight ( vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) ) ;
# ifdef USE _LIGHTMAP
vec4 lightMapTexel = texture2D ( lightMap , vUv2 ) ;
reflectedLight . indirectDiffuse += lightMapTexel . rgb * lightMapIntensity * RECIPROCAL _PI ;
# else
reflectedLight . indirectDiffuse += vec3 ( 1.0 ) ;
# endif
# include < aomap _fragment >
reflectedLight . indirectDiffuse *= diffuseColor . rgb ;
vec3 outgoingLight = reflectedLight . indirectDiffuse ;
# include < envmap _fragment >
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
# include < dithering _fragment >
} ` ,TN= ` # define LAMBERT
varying vec3 vViewPosition ;
# include < common >
# include < uv _pars _vertex >
# include < uv2 _pars _vertex >
# include < displacementmap _pars _vertex >
# include < envmap _pars _vertex >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < normal _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < shadowmap _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < uv2 _vertex >
# include < color _vertex >
# include < morphcolor _vertex >
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < normal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
vViewPosition = - mvPosition . xyz ;
# include < worldpos _vertex >
# include < envmap _vertex >
# include < shadowmap _vertex >
# include < fog _vertex >
} ` ,EN= ` # define LAMBERT
uniform vec3 diffuse ;
uniform vec3 emissive ;
uniform float opacity ;
# include < common >
# include < packing >
# include < dithering _pars _fragment >
# include < color _pars _fragment >
# include < uv _pars _fragment >
# include < uv2 _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < aomap _pars _fragment >
# include < lightmap _pars _fragment >
# include < emissivemap _pars _fragment >
# include < envmap _common _pars _fragment >
# include < envmap _pars _fragment >
# include < fog _pars _fragment >
# include < bsdfs >
# include < lights _pars _begin >
# include < normal _pars _fragment >
# include < lights _lambert _pars _fragment >
# include < shadowmap _pars _fragment >
# include < bumpmap _pars _fragment >
# include < normalmap _pars _fragment >
# include < specularmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
ReflectedLight reflectedLight = ReflectedLight ( vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) ) ;
vec3 totalEmissiveRadiance = emissive ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < color _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < specularmap _fragment >
# include < normal _fragment _begin >
# include < normal _fragment _maps >
# include < emissivemap _fragment >
# include < lights _lambert _fragment >
# include < lights _fragment _begin >
# include < lights _fragment _maps >
# include < lights _fragment _end >
# include < aomap _fragment >
vec3 outgoingLight = reflectedLight . directDiffuse + reflectedLight . indirectDiffuse + totalEmissiveRadiance ;
# include < envmap _fragment >
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
# include < dithering _fragment >
} ` ,DN= ` # define MATCAP
varying vec3 vViewPosition ;
# include < common >
# include < uv _pars _vertex >
# include < color _pars _vertex >
# include < displacementmap _pars _vertex >
# include < fog _pars _vertex >
# include < normal _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < color _vertex >
# include < morphcolor _vertex >
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < normal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
# include < fog _vertex >
vViewPosition = - mvPosition . xyz ;
} ` ,IN= ` # define MATCAP
uniform vec3 diffuse ;
uniform float opacity ;
uniform sampler2D matcap ;
varying vec3 vViewPosition ;
# include < common >
# include < dithering _pars _fragment >
# include < color _pars _fragment >
# include < uv _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < fog _pars _fragment >
# include < normal _pars _fragment >
# include < bumpmap _pars _fragment >
# include < normalmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < color _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < normal _fragment _begin >
# include < normal _fragment _maps >
vec3 viewDir = normalize ( vViewPosition ) ;
vec3 x = normalize ( vec3 ( viewDir . z , 0.0 , - viewDir . x ) ) ;
vec3 y = cross ( viewDir , x ) ;
vec2 uv = vec2 ( dot ( x , normal ) , dot ( y , normal ) ) * 0.495 + 0.5 ;
# ifdef USE _MATCAP
vec4 matcapColor = texture2D ( matcap , uv ) ;
# else
vec4 matcapColor = vec4 ( vec3 ( mix ( 0.2 , 0.8 , uv . y ) ) , 1.0 ) ;
# endif
vec3 outgoingLight = diffuseColor . rgb * matcapColor . rgb ;
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
# include < dithering _fragment >
} ` ,RN= ` # define NORMAL
# if defined ( FLAT _SHADED ) || defined ( USE _BUMPMAP ) || defined ( TANGENTSPACE _NORMALMAP )
varying vec3 vViewPosition ;
# endif
# include < common >
# include < uv _pars _vertex >
# include < displacementmap _pars _vertex >
# include < normal _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < normal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
# if defined ( FLAT _SHADED ) || defined ( USE _BUMPMAP ) || defined ( TANGENTSPACE _NORMALMAP )
vViewPosition = - mvPosition . xyz ;
# endif
} ` ,ON= ` # define NORMAL
uniform float opacity ;
# if defined ( FLAT _SHADED ) || defined ( USE _BUMPMAP ) || defined ( TANGENTSPACE _NORMALMAP )
varying vec3 vViewPosition ;
# endif
# include < packing >
# include < uv _pars _fragment >
# include < normal _pars _fragment >
# include < bumpmap _pars _fragment >
# include < normalmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
# include < logdepthbuf _fragment >
# include < normal _fragment _begin >
# include < normal _fragment _maps >
gl _FragColor = vec4 ( packNormalToRGB ( normal ) , opacity ) ;
# ifdef OPAQUE
gl _FragColor . a = 1.0 ;
# endif
} ` ,LN= ` # define PHONG
varying vec3 vViewPosition ;
# include < common >
# include < uv _pars _vertex >
# include < uv2 _pars _vertex >
# include < displacementmap _pars _vertex >
# include < envmap _pars _vertex >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < normal _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < shadowmap _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < uv2 _vertex >
# include < color _vertex >
# include < morphcolor _vertex >
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < normal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
vViewPosition = - mvPosition . xyz ;
# include < worldpos _vertex >
# include < envmap _vertex >
# include < shadowmap _vertex >
# include < fog _vertex >
} ` ,PN= ` # define PHONG
uniform vec3 diffuse ;
uniform vec3 emissive ;
uniform vec3 specular ;
uniform float shininess ;
uniform float opacity ;
# include < common >
# include < packing >
# include < dithering _pars _fragment >
# include < color _pars _fragment >
# include < uv _pars _fragment >
# include < uv2 _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < aomap _pars _fragment >
# include < lightmap _pars _fragment >
# include < emissivemap _pars _fragment >
# include < envmap _common _pars _fragment >
# include < envmap _pars _fragment >
# include < fog _pars _fragment >
# include < bsdfs >
# include < lights _pars _begin >
# include < normal _pars _fragment >
# include < lights _phong _pars _fragment >
# include < shadowmap _pars _fragment >
# include < bumpmap _pars _fragment >
# include < normalmap _pars _fragment >
# include < specularmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
ReflectedLight reflectedLight = ReflectedLight ( vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) ) ;
vec3 totalEmissiveRadiance = emissive ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < color _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < specularmap _fragment >
# include < normal _fragment _begin >
# include < normal _fragment _maps >
# include < emissivemap _fragment >
# include < lights _phong _fragment >
# include < lights _fragment _begin >
# include < lights _fragment _maps >
# include < lights _fragment _end >
# include < aomap _fragment >
vec3 outgoingLight = reflectedLight . directDiffuse + reflectedLight . indirectDiffuse + reflectedLight . directSpecular + reflectedLight . indirectSpecular + totalEmissiveRadiance ;
# include < envmap _fragment >
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
# include < dithering _fragment >
} ` ,zN= ` # define STANDARD
varying vec3 vViewPosition ;
# ifdef USE _TRANSMISSION
varying vec3 vWorldPosition ;
# endif
# include < common >
# include < uv _pars _vertex >
# include < uv2 _pars _vertex >
# include < displacementmap _pars _vertex >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < normal _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < shadowmap _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < uv2 _vertex >
# include < color _vertex >
# include < morphcolor _vertex >
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < normal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
vViewPosition = - mvPosition . xyz ;
# include < worldpos _vertex >
# include < shadowmap _vertex >
# include < fog _vertex >
# ifdef USE _TRANSMISSION
vWorldPosition = worldPosition . xyz ;
# endif
} ` ,kN= ` # define STANDARD
# ifdef PHYSICAL
# define IOR
# define SPECULAR
# endif
uniform vec3 diffuse ;
uniform vec3 emissive ;
uniform float roughness ;
uniform float metalness ;
uniform float opacity ;
# ifdef IOR
uniform float ior ;
# endif
# ifdef SPECULAR
uniform float specularIntensity ;
uniform vec3 specularColor ;
# ifdef USE _SPECULARINTENSITYMAP
uniform sampler2D specularIntensityMap ;
# endif
# ifdef USE _SPECULARCOLORMAP
uniform sampler2D specularColorMap ;
# endif
# endif
# ifdef USE _CLEARCOAT
uniform float clearcoat ;
uniform float clearcoatRoughness ;
# endif
# ifdef USE _IRIDESCENCE
uniform float iridescence ;
uniform float iridescenceIOR ;
uniform float iridescenceThicknessMinimum ;
uniform float iridescenceThicknessMaximum ;
# endif
# ifdef USE _SHEEN
uniform vec3 sheenColor ;
uniform float sheenRoughness ;
# ifdef USE _SHEENCOLORMAP
uniform sampler2D sheenColorMap ;
# endif
# ifdef USE _SHEENROUGHNESSMAP
uniform sampler2D sheenRoughnessMap ;
# endif
# endif
varying vec3 vViewPosition ;
# include < common >
# include < packing >
# include < dithering _pars _fragment >
# include < color _pars _fragment >
# include < uv _pars _fragment >
# include < uv2 _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < aomap _pars _fragment >
# include < lightmap _pars _fragment >
# include < emissivemap _pars _fragment >
# include < bsdfs >
# include < iridescence _fragment >
# include < cube _uv _reflection _fragment >
# include < envmap _common _pars _fragment >
# include < envmap _physical _pars _fragment >
# include < fog _pars _fragment >
# include < lights _pars _begin >
# include < normal _pars _fragment >
# include < lights _physical _pars _fragment >
# include < transmission _pars _fragment >
# include < shadowmap _pars _fragment >
# include < bumpmap _pars _fragment >
# include < normalmap _pars _fragment >
# include < clearcoat _pars _fragment >
# include < iridescence _pars _fragment >
# include < roughnessmap _pars _fragment >
# include < metalnessmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
ReflectedLight reflectedLight = ReflectedLight ( vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) ) ;
vec3 totalEmissiveRadiance = emissive ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < color _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < roughnessmap _fragment >
# include < metalnessmap _fragment >
# include < normal _fragment _begin >
# include < normal _fragment _maps >
# include < clearcoat _normal _fragment _begin >
# include < clearcoat _normal _fragment _maps >
# include < emissivemap _fragment >
# include < lights _physical _fragment >
# include < lights _fragment _begin >
# include < lights _fragment _maps >
# include < lights _fragment _end >
# include < aomap _fragment >
vec3 totalDiffuse = reflectedLight . directDiffuse + reflectedLight . indirectDiffuse ;
vec3 totalSpecular = reflectedLight . directSpecular + reflectedLight . indirectSpecular ;
# include < transmission _fragment >
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance ;
# ifdef USE _SHEEN
float sheenEnergyComp = 1.0 - 0.157 * max3 ( material . sheenColor ) ;
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular ;
# endif
# ifdef USE _CLEARCOAT
float dotNVcc = saturate ( dot ( geometry . clearcoatNormal , geometry . viewDir ) ) ;
vec3 Fcc = F _Schlick ( material . clearcoatF0 , material . clearcoatF90 , dotNVcc ) ;
outgoingLight = outgoingLight * ( 1.0 - material . clearcoat * Fcc ) + clearcoatSpecular * material . clearcoat ;
# endif
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
# include < dithering _fragment >
} ` ,UN= ` # define TOON
varying vec3 vViewPosition ;
# include < common >
# include < uv _pars _vertex >
# include < uv2 _pars _vertex >
# include < displacementmap _pars _vertex >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < normal _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < shadowmap _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
# include < uv2 _vertex >
# include < color _vertex >
# include < morphcolor _vertex >
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < normal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < displacementmap _vertex >
# include < project _vertex >
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
vViewPosition = - mvPosition . xyz ;
# include < worldpos _vertex >
# include < shadowmap _vertex >
# include < fog _vertex >
} ` ,NN= ` # define TOON
uniform vec3 diffuse ;
uniform vec3 emissive ;
uniform float opacity ;
# include < common >
# include < packing >
# include < dithering _pars _fragment >
# include < color _pars _fragment >
# include < uv _pars _fragment >
# include < uv2 _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < aomap _pars _fragment >
# include < lightmap _pars _fragment >
# include < emissivemap _pars _fragment >
# include < gradientmap _pars _fragment >
# include < fog _pars _fragment >
# include < bsdfs >
# include < lights _pars _begin >
# include < normal _pars _fragment >
# include < lights _toon _pars _fragment >
# include < shadowmap _pars _fragment >
# include < bumpmap _pars _fragment >
# include < normalmap _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
ReflectedLight reflectedLight = ReflectedLight ( vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) , vec3 ( 0.0 ) ) ;
vec3 totalEmissiveRadiance = emissive ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < color _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
# include < normal _fragment _begin >
# include < normal _fragment _maps >
# include < emissivemap _fragment >
# include < lights _toon _fragment >
# include < lights _fragment _begin >
# include < lights _fragment _maps >
# include < lights _fragment _end >
# include < aomap _fragment >
vec3 outgoingLight = reflectedLight . directDiffuse + reflectedLight . indirectDiffuse + totalEmissiveRadiance ;
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
# include < dithering _fragment >
} ` ,FN= ` uniform float size ;
uniform float scale ;
# include < common >
# include < color _pars _vertex >
# include < fog _pars _vertex >
# include < morphtarget _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < color _vertex >
# include < morphcolor _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < project _vertex >
gl _PointSize = size ;
# ifdef USE _SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix ( projectionMatrix ) ;
if ( isPerspective ) gl _PointSize *= ( scale / - mvPosition . z ) ;
# endif
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
# include < worldpos _vertex >
# include < fog _vertex >
} ` ,BN= ` uniform vec3 diffuse ;
uniform float opacity ;
# include < common >
# include < color _pars _fragment >
# include < map _particle _pars _fragment >
# include < alphatest _pars _fragment >
# include < fog _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec3 outgoingLight = vec3 ( 0.0 ) ;
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
# include < logdepthbuf _fragment >
# include < map _particle _fragment >
# include < color _fragment >
# include < alphatest _fragment >
outgoingLight = diffuseColor . rgb ;
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
# include < premultiplied _alpha _fragment >
} ` ,GN= ` # include < common >
# include < fog _pars _vertex >
# include < morphtarget _pars _vertex >
# include < skinning _pars _vertex >
# include < shadowmap _pars _vertex >
void main ( ) {
# include < beginnormal _vertex >
# include < morphnormal _vertex >
# include < skinbase _vertex >
# include < skinnormal _vertex >
# include < defaultnormal _vertex >
# include < begin _vertex >
# include < morphtarget _vertex >
# include < skinning _vertex >
# include < project _vertex >
# include < worldpos _vertex >
# include < shadowmap _vertex >
# include < fog _vertex >
} ` ,VN= ` uniform vec3 color ;
uniform float opacity ;
# include < common >
# include < packing >
# include < fog _pars _fragment >
# include < bsdfs >
# include < lights _pars _begin >
# include < shadowmap _pars _fragment >
# include < shadowmask _pars _fragment >
void main ( ) {
gl _FragColor = vec4 ( color , opacity * ( 1.0 - getShadowMask ( ) ) ) ;
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
} ` ,WN= ` uniform float rotation ;
uniform vec2 center ;
# include < common >
# include < uv _pars _vertex >
# include < fog _pars _vertex >
# include < logdepthbuf _pars _vertex >
# include < clipping _planes _pars _vertex >
void main ( ) {
# include < uv _vertex >
vec4 mvPosition = modelViewMatrix * vec4 ( 0.0 , 0.0 , 0.0 , 1.0 ) ;
vec2 scale ;
scale . x = length ( vec3 ( modelMatrix [ 0 ] . x , modelMatrix [ 0 ] . y , modelMatrix [ 0 ] . z ) ) ;
scale . y = length ( vec3 ( modelMatrix [ 1 ] . x , modelMatrix [ 1 ] . y , modelMatrix [ 1 ] . z ) ) ;
# ifndef USE _SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix ( projectionMatrix ) ;
if ( isPerspective ) scale *= - mvPosition . z ;
# endif
vec2 alignedPosition = ( position . xy - ( center - vec2 ( 0.5 ) ) ) * scale ;
vec2 rotatedPosition ;
rotatedPosition . x = cos ( rotation ) * alignedPosition . x - sin ( rotation ) * alignedPosition . y ;
rotatedPosition . y = sin ( rotation ) * alignedPosition . x + cos ( rotation ) * alignedPosition . y ;
mvPosition . xy += rotatedPosition ;
gl _Position = projectionMatrix * mvPosition ;
# include < logdepthbuf _vertex >
# include < clipping _planes _vertex >
# include < fog _vertex >
} ` ,jN= ` uniform vec3 diffuse ;
uniform float opacity ;
# include < common >
# include < uv _pars _fragment >
# include < map _pars _fragment >
# include < alphamap _pars _fragment >
# include < alphatest _pars _fragment >
# include < fog _pars _fragment >
# include < logdepthbuf _pars _fragment >
# include < clipping _planes _pars _fragment >
void main ( ) {
# include < clipping _planes _fragment >
vec3 outgoingLight = vec3 ( 0.0 ) ;
vec4 diffuseColor = vec4 ( diffuse , opacity ) ;
# include < logdepthbuf _fragment >
# include < map _fragment >
# include < alphamap _fragment >
# include < alphatest _fragment >
outgoingLight = diffuseColor . rgb ;
# include < output _fragment >
# include < tonemapping _fragment >
# include < encodings _fragment >
# include < fog _fragment >
} ` ,U2={alphamap_fragment:mk,alphamap_pars_fragment:gk,alphatest_fragment:_k,alphatest_pars_fragment:vk,aomap_fragment:yk,aomap_pars_fragment:bk,begin_vertex:xk,beginnormal_vertex:Sk,bsdfs:Mk,iridescence_fragment:wk,bumpmap_pars_fragment:Ak,clipping_planes_fragment:Ck,clipping_planes_pars_fragment:Tk,clipping_planes_pars_vertex:Ek,clipping_planes_vertex:Dk,color_fragment:Ik,color_pars_fragment:Rk,color_pars_vertex:Ok,color_vertex:Lk,common:Pk,cube_uv_reflection_fragment:zk,defaultnormal_vertex:kk,displacementmap_pars_vertex:Uk,displacementmap_vertex:Nk,emissivemap_fragment:Fk,emissivemap_pars_fragment:Bk,encodings_fragment:Gk,encodings_pars_fragment:Vk,envmap_fragment:Wk,envmap_common_pars_fragment:jk,envmap_pars_fragment:Hk,envmap_pars_vertex: $ k,envmap_physical_pars_fragment:rU,envmap_vertex:Yk,fog_vertex:Jk,fog_pars_vertex:Zk,fog_fragment:Xk,fog_pars_fragment:qk,gradientmap_pars_fragment:Qk,lightmap_fragment:Kk,lightmap_pars_fragment:eU,lights_lambert_fragment:tU,lights_lambert_pars_fragment:nU,lights_pars_begin:iU,lights_toon_fragment:oU,lights_toon_pars_fragment:aU,lights_phong_fragment:sU,lights_phong_pars_fragment:lU,lights_physical_fragment:uU,lights_physical_pars_fragment:cU,lights_fragment_begin:dU,lights_fragment_maps:fU,lights_fragment_end:hU,logdepthbuf_fragment:pU,logdepthbuf_pars_fragment:mU,logdepthbuf_pars_vertex:gU,logdepthbuf_vertex:_U,map_fragment:vU,map_pars_fragment:yU,map_particle_fragment:bU,map_particle_pars_fragment:xU,metalnessmap_fragment:SU,metalnessmap_pars_fragment:MU,morphcolor_vertex:wU,morphnormal_vertex:AU,morphtarget_pars_vertex:CU,morphtarget_vertex:TU,normal_fragment_begin:EU,normal_fragment_maps:DU,normal_pars_fragment:IU,normal_pars_vertex:RU,normal_vertex:OU,normalmap_pars_fragment:LU,clearcoat_normal_fragment_begin:PU,clearcoat_normal_fragment_maps:zU,clearcoat_pars_fragment:kU,iridescence_pars_fragment:UU,output_fragment:NU,packing:FU,premultiplied_alpha_fragment:BU,project_vertex:GU,dithering_fragment:VU,dithering_pars_fragment:WU,roughnessmap_fragment:jU,roughnessmap_pars_fragment:HU,shadowmap_pars_fragment: $ U,shadowmap_pars_vertex:YU,shadowmap_vertex:JU,shadowmask_pars_fragment:ZU,skinbase_vertex:XU,skinning_pars_vertex:qU,skinning_vertex:QU,skinnormal_vertex:KU,specularmap_fragment:eN,specularmap_pars_fragment:tN,tonemapping_fragment:nN,tonemapping_pars_fragment:iN,transmission_fragment:rN,transmission_pars_fragment:oN,uv_pars_fragment:aN,uv_pars_vertex:sN,uv_vertex:lN,uv2_pars_fragment:uN,uv2_pars_vertex:cN,uv2_vertex:dN,worldpos_vertex:fN,background_vert:hN,background_frag:pN,cube_vert:mN,cube_frag:gN,depth_vert:_N,depth_frag:vN,distanceRGBA_vert:yN,distanceRGBA_frag:bN,equirect_vert:xN,equirect_frag:SN,linedashed_vert:MN,linedashed_frag:wN,meshbasic_vert:AN,meshbasic_frag:CN,meshlambert_vert:TN,meshlambert_frag:EN,meshmatcap_vert:DN,meshmatcap_frag:IN,meshnormal_vert:RN,meshnormal_frag:ON,meshphong_vert:LN,meshphong_frag:PN,meshphysical_vert:zN,meshphysical_frag:kN,meshtoon_vert:UN,meshtoon_frag:NN,points_vert:FN,points_frag:BN,shadow_vert:GN,shadow_frag:VN,sprite_vert:WN,sprite_frag:jN},H1={common:{diffuse:{value:new X2(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new l0},uv2Transform:{value:new l0},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new c2(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new X2(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLigh
precision mediump float ;
precision mediump int ;
varying vec3 vOutputDirection ;
uniform sampler2D envMap ;
uniform int samples ;
uniform float weights [ n ] ;
uniform bool latitudinal ;
uniform float dTheta ;
uniform float mipInt ;
uniform vec3 poleAxis ;
# define ENVMAP _TYPE _CUBE _UV
# include < cube _uv _reflection _fragment >
vec3 getSample ( float theta , vec3 axis ) {
float cosTheta = cos ( theta ) ;
// Rodrigues' axis-angle rotation
vec3 sampleDirection = vOutputDirection * cosTheta
+ cross ( axis , vOutputDirection ) * sin ( theta )
+ axis * dot ( axis , vOutputDirection ) * ( 1.0 - cosTheta ) ;
return bilinearCubeUV ( envMap , sampleDirection , mipInt ) ;
}
void main ( ) {
vec3 axis = latitudinal ? poleAxis : cross ( poleAxis , vOutputDirection ) ;
if ( all ( equal ( axis , vec3 ( 0.0 ) ) ) ) {
axis = vec3 ( vOutputDirection . z , 0.0 , - vOutputDirection . x ) ;
}
axis = normalize ( axis ) ;
gl _FragColor = vec4 ( 0.0 , 0.0 , 0.0 , 1.0 ) ;
gl _FragColor . rgb += weights [ 0 ] * getSample ( 0.0 , axis ) ;
for ( int i = 1 ; i < n ; i ++ ) {
if ( i >= samples ) {
break ;
}
float theta = dTheta * float ( i ) ;
gl _FragColor . rgb += weights [ i ] * getSample ( - 1.0 * theta , axis ) ;
gl _FragColor . rgb += weights [ i ] * getSample ( theta , axis ) ;
}
}
` ,blending:X9,depthTest:!1,depthWrite:!1})}function Dd(){return new y9({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Ea(),fragmentShader: `
precision mediump float ;
precision mediump int ;
varying vec3 vOutputDirection ;
uniform sampler2D envMap ;
# include < common >
void main ( ) {
vec3 outputDirection = normalize ( vOutputDirection ) ;
vec2 uv = equirectUv ( outputDirection ) ;
gl _FragColor = vec4 ( texture2D ( envMap , uv ) . rgb , 1.0 ) ;
}
` ,blending:X9,depthTest:!1,depthWrite:!1})}function Id(){return new y9({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Ea(),fragmentShader: `
precision mediump float ;
precision mediump int ;
uniform float flipEnvMap ;
varying vec3 vOutputDirection ;
uniform samplerCube envMap ;
void main ( ) {
gl _FragColor = textureCube ( envMap , vec3 ( flipEnvMap * vOutputDirection . x , vOutputDirection . yz ) ) ;
}
` ,blending:X9,depthTest:!1,depthWrite:!1})}function Ea(){return `
precision mediump float ;
precision mediump int ;
attribute float faceIndex ;
varying vec3 vOutputDirection ;
// RH coordinate system; PMREM face-indexing convention
vec3 getDirection ( vec2 uv , float face ) {
uv = 2.0 * uv - 1.0 ;
vec3 direction = vec3 ( uv , 1.0 ) ;
if ( face == 0.0 ) {
direction = direction . zyx ; // ( 1, v, u ) pos x
} else if ( face == 1.0 ) {
direction = direction . xzy ;
direction . xz *= - 1.0 ; // ( -u, 1, -v ) pos y
} else if ( face == 2.0 ) {
direction . x *= - 1.0 ; // ( -u, v, 1 ) pos z
} else if ( face == 3.0 ) {
direction = direction . zyx ;
direction . xz *= - 1.0 ; // ( -1, v, -u ) neg x
} else if ( face == 4.0 ) {
direction = direction . xzy ;
direction . xy *= - 1.0 ; // ( -u, -1, v ) neg y
} else if ( face == 5.0 ) {
direction . z *= - 1.0 ; // ( u, v, -1 ) neg z
}
return direction ;
}
void main ( ) {
vOutputDirection = getDirection ( uv , faceIndex ) ;
gl _Position = vec4 ( position , 1.0 ) ;
}
` }function eF(r){let e=new WeakMap,t=null;function n(s){if(s&&s.isTexture){const c=s.mapping,f=c===Hr||c=== $ r,h=c===q8||c===Q8;if(f||h)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let m=e.get(s);return t===null&&(t=new Td(r)),m=f?t.fromEquirectangular(s,m):t.fromCubemap(s,m),e.set(s,m),m.texture}else{if(e.has(s))return e.get(s).texture;{const m=s.image;if(f&&m&&m.height>0||h&&m&&i(m)){t===null&&(t=new Td(r));const g=f?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,g),s.addEventListener("dispose",o),g.texture}else return null}}}return s}function i(s){let c=0;const f=6;for(let h=0;h<f;h++)s[h]!==void 0&&c++;return c===f}function o(s){const c=s.target;c.removeEventListener("dispose",o);const f=e.get(c);f!==void 0&&(e.delete(c),f.dispose())}function a(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:a}}function tF(r){const e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=r.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(n){n.isWebGL2?t("EXT_color_buffer_float"):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture")},get:function(n){const i=t(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function nF(r,e,t,n){const i={},o=new WeakMap;function a(m){const g=m.target;g.index!==null&&e.remove(g.index);for(const S in g.attributes)e.remove(g.attributes[S]);g.removeEventListener("dispose",a),delete i[g.id];const v=o.get(g);v&&(e.remove(v),o.delete(g)),n.releaseStatesOfGeometry(g),g.isInstancedBufferGeometry===!0&&delete g._maxInstanceCount,t.memory.geometries--}function s(m,g){return i[g.id]===!0||(g.addEventListener("dispose",a),i[g.id]=!0,t.memory.geometries++),g}function c(m){const g=m.attributes;for(const S in g)e.update(g[S],34962);const v=m.morphAttributes;for(const S in v){const _=v[S];for(let x=0,M=_.length;x<M;x++)e.update(_[x],34962)}}function f(m){const g=[],v=m.index,S=m.attributes.position;let _=0;if(v!==null){const A=v.array;_=v.version;for(let D=0,T=A.length;D<T;D+=3){const E=A[D+0],C=A[D+1],P=A[D+2];g.push(E,C,C,P,P,E)}}else{const A=S.array;_=S.version;for(let D=0,T=A.length/3-1;D<T;D+=3){const E=D+0,C=D+1,P=D+2;g.push(E,C,C,P,P,E)}}const x=new(Zh(g)?np:tp)(g,1);x.version=_;const M=o.get(m);M&&e.remove(M),o.set(m,x)}function h(m){const g=o.get(m);if(g){const v=m.index;v!==null&&g.version<v.version&&f(m)}else f(m);return o.get(m)}return{get:s,update:c,getWireframeAttribute:h}}function iF(r,e,t,n){const i=n.isWebGL2;let o;function a(g){o=g}let s,c;function f(g){s=g.type,c=g.bytesPerElement}function h(g,v){r.drawElements(o,v,s,g*c),t.update(v,o,1)}function m(g,v,S){if(S===0)return;let _,x;if(i)_=r,x="drawElementsInstanced";else if(_=e.get("ANGLE_instanced_arrays"),x="drawElementsInstancedANGLE",_===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}_[x](o,v,s,g*c,S),t.update(v,o,S)}this.setMode=a,this.setIndex=f,this.render=h,this.renderInstances=m}function rF(r){
` ),n=[],i=Math.max(e-6,0),o=Math.min(e+6,t.length);for(let a=i;a<o;a++){const s=a+1;n.push( ` $ { s === e ? ">" : " " } $ { s } : $ { t [ a ] } ` )}return n.join( `
` )}function tB(r){switch(r){case B5:return["Linear","( value )"];case M3:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",r),["Linear","( value )"]}}function Nd(r,e,t){const n=r.getShaderParameter(e,35713),i=r.getShaderInfoLog(e).trim();if(n&&i==="")return"";const o=/ERROR: 0:( \d +)/.exec(i);if(o){const a=parseInt(o[1]);return t.toUpperCase()+ `
` +i+ `
` +eB(r.getShaderSource(e),a)}else return i}function nB(r,e){const t=tB(e);return"vec4 "+r+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function iB(r,e){let t;switch(e){case xz:t="Linear";break;case Sz:t="Reinhard";break;case Mz:t="OptimizedCineon";break;case wz:t="ACESFilmic";break;case Az:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function rB(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.tangentSpaceNormalMap||r.clearcoatNormalMap||r.flatShading||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(W6).join( `
` )}function oB(r){const e=[];for(const t in r){const n=r[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join( `
` )}function aB(r,e){const t={},n=r.getProgramParameter(e,35721);for(let i=0;i<n;i++){const o=r.getActiveAttrib(e,i),a=o.name;let s=1;o.type===35674&&(s=2),o.type===35675&&(s=3),o.type===35676&&(s=4),t[a]={type:o.type,location:r.getAttribLocation(e,a),locationSize:s}}return t}function W6(r){return r!==""}function Fd(r,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return r.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function Bd(r,e){return r.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const sB=/^[ \t ]*#include +<([ \w \d ./]+)>/gm;function Qr(r){return r.replace(sB,lB)}function lB(r,e){const t=U2[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return Qr(t)}const uB=/#pragma unroll_loop_start \s +for \s * \( \s *int \s +i \s *= \s *( \d +) \s *; \s *i \s *< \s *( \d +) \s *; \s *i \s * \+ \+ \s * \) \s *{([ \s \S ]+?)} \s +#pragma unroll_loop_end/g;function Gd(r){return r.replace(uB,cB)}function cB(r,e,t,n){let i="";for(let o=parseInt(e);o<parseInt(t);o++)i+=n.replace(/ \[ \s *i \s * \] /g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function Vd(r){let e="precision "+r.precision+ ` float ;
precision ` +r.precision+" int;";return r.precision==="highp"?e+= `
# define HIGH _PRECISION ` :r.precision==="mediump"?e+= `
# define MEDIUM _PRECISION ` :r.precision==="lowp"&&(e+= `
# define LOW _PRECISION ` ),e}function dB(r){let e="SHADOWMAP_TYPE_BASIC";return r.shadowMapType===Wh?e="SHADOWMAP_TYPE_PCF":r.shadowMapType===KP?e="SHADOWMAP_TYPE_PCF_SOFT":r.shadowMapType===V6&&(e="SHADOWMAP_TYPE_VSM"),e}function fB(r){let e="ENVMAP_TYPE_CUBE";if(r.envMap)switch(r.envMapMode){case q8:case Q8:e="ENVMAP_TYPE_CUBE";break;case xt:e="ENVMAP_TYPE_CUBE_UV";break}return e}function hB(r){let e="ENVMAP_MODE_REFLECTION";if(r.envMap)switch(r.envMapMode){case Q8:e="ENVMAP_MODE_REFRACTION";break}return e}function pB(r){let e="ENVMAP_BLENDING_NONE";if(r.envMap)switch(r.combine){case $ h:e="ENVMAP_BLENDING_MULTIPLY";break;case yz:e="ENVMAP_BLENDING_MIX";break;case bz:e="ENVMAP_BLENDING_ADD";break}return e}function mB(r){const e=r.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:n,maxMip:t}}function gB(r,e,t,n){const i=r.getContext(),o=t.defines;let a=t.vertexShader,s=t.fragmentShader;const c=dB(t),f=fB(t),h=hB(t),m=pB(t),g=mB(t),v=t.isWebGL2?"":rB(t),S=oB(o),_=i.createProgram();let x,M,A=t.glslVersion?"#version "+t.glslVersion+ `
` :"";t.isRawShaderMaterial?(x=[S].filter(W6).join( `
` ),x.length>0&&(x+= `
` ),M=[v,S].filter(W6).join( `
` ),M.length>0&&(M+= `
` )):(x=[Vd(t),"#define SHADER_NAME "+t.shaderName,S,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif", `
` ].filter(W6).join( `
` ),M=[v,Vd(t),"#define SHADER_NAME "+t.shaderName,S,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+f:"",t.envMap?"#define "+h:"",t.envMap?"#define "+m:"",g?"#define CUBEUV_TEXEL_WIDTH "+g.texelWidth:"",g?"#define CUBEUV_TEXEL_HEIGHT "+g.texelHeight:"",g?"#define CUBEUV_MAX_MIP "+g.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==_9?"#define TONE_MAPPING":"",t.toneMapping!==_9?U2.tonemapping_pars_fragment:"",t.toneMapping!==_9?iB("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",U2.encodings_pars_fragment,nB("linearToOutputTexel",t.outputEncoding),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"", `
` ].filter(W6).join( `
` )),a=Qr(a),a=Fd(a,t),a=Bd(a,t),s=Qr(s),s=Fd(s,t),s=Bd(s,t),a=Gd(a),s=Gd(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(A= ` # version 300 es
` ,x=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join( `
` )+ `
` +x,M=["#define varying in",t.glslVersion===cd?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===cd?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join( `
` )+ `
` +M);const D=A+x+a,T=A+M+s,E=Ud(i,35633,D),C=Ud(i,35632,T);if(i.attachShader(_,E),i.attachShader(_,C),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_),r.debug.checkShaderErrors){const L=i.getProgramInfoLog(_).trim(),W=i.getShaderInfoLog(E).trim(),e1=i.getShaderInfoLog(C).trim();let a1=!0, $ =!0;if(i.getProgramParameter(_,35714)===!1){a1=!1;const N=Nd(i,E,"vertex"),H=Nd(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,35715)+ `
Program Info Log : ` +L+ `
` +N+ `
` +H)}else L!==""?console.warn("THREE.WebGLProgram: Program Info Log:",L):(W===""||e1==="")&&( $ =!1); $ &&(this.diagnostics={runnable:a1,programLog:L,vertexShader:{log:W,prefix:x},fragmentShader:{log:e1,prefix:M}})}i.deleteShader(E),i.deleteShader(C);let P;this.getUniforms=function(){return P===void 0&&(P=new Ye(i,_)),P};let I;return this.getAttributes=function(){return I===void 0&&(I=aB(i,_)),I},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.name=t.shaderName,this.id=KF++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=E,this.fragmentShader=C,this}let _B=0;class vB{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),o=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(o)===!1&&(a.add(o),o.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new yB(e),t.set(e,n)),n}}class yB{constructor(e){this.id=_B++,this.code=e,this.usedTimes=0}}function bB(r,e,t,n,i,o,a){const s=new ep,c=new vB,f=[],h=i.isWebGL2,m=i.logarithmicDepthBuffer,g=i.vertexTextures;let v=i.precision;const S={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(I,L,W,e1,a1){const $ =e1.fog,N=a1.geometry,H=I.isMeshStandardMaterial?e1.environment:null,K=(I.isMeshStandardMaterial?t:e).get(I.envMap||H),X=K&&K.mapping===xt?K.image.height:null,B=S[I.type];I.precision!==null&&(v=i.getMaxPrecision(I.precision),v!==I.precision&&console.warn("THREE.WebGLProgram.getParameters:",I.precision,"not supported, using",v,"instead."));const j=N.morphAttributes.position||N.morphAttributes.normal||N.morphAttributes.color,J=j!==void 0?j.length:0;let u1=0;N.morphAttributes.position!==void 0&&(u1=1),N.morphAttributes.normal!==void 0&&(u1=2),N.morphAttributes.color!==void 0&&(u1=3);let d1,x1,v1,o1;if(B){const e2=N0[B];d1=e2.vertexShader,x1=e2.fragmentShader}else d1=I.vertexShader,x1=I.fragmentShader,c.update(I),v1=c.getVertexShaderID(I),o1=c.getFragmentShaderID(I);const n1=r.getRenderTarget(),E1=I.alphaTest>0,T1=I.clearcoat>0,M1=I.iridescence>0;return{isWebGL2:h,shaderID:B,shaderName:I.type,vertexShader:d1,fragmentShader:x1,defines:I.defines,customVertexShaderID:v1,customFragmentShaderID:o1,isRawShaderMaterial:I.isRawShaderMaterial===!0,glslVersion:I.glslVersion,precision:v,instancing:a1.isInstancedMesh===!0,instancingColor:a1.isInstancedMesh===!0&&a1.instanceColor!==null,supportsVertexTextures:g,outputEncoding:n1===null?r.outputEncoding:n1.isXRRenderTarget===!0?n1.texture.encoding:B5,map:!!I.map,matcap:!!I.matcap,envMap:!!K,envMapMode:K&&K.mapping,envMapCubeUVHeight:X,lightMap:!!I.lightMap,aoMap:!!I.aoMap,emissiveMap:!!I.emissiveMap,bumpMap:!!I.bumpMap,normalMap:!!I.normalMap,objectSpaceNormalMap:I.normalMapType===Hz,tangentSpaceNormalMap:I.normalMapType===jz,decodeVideoTexture:!!I.map&&I.map.isVideoTexture===!0&&I.map.encoding===M3,clearcoat:T1,clearcoatMap:T1&&!!I.clearcoatMap,clearcoatRoughnessMap:T1&&!!I.clearcoatRoughnessMap,clearcoatNormalMap:T1&&!!I.clearcoatNormalMap,iridescence:M1,iridescenceMap:M1&&!!I.iridescenceMap,iridescenceThicknessMap:M1&&!!I.iridescenceThicknessMa
gl _Position = vec4 ( position , 1.0 ) ;
} ` ,LB= ` uniform sampler2D shadow _pass ;
uniform vec2 resolution ;
uniform float radius ;
# include < packing >
void main ( ) {
const float samples = float ( VSM _SAMPLES ) ;
float mean = 0.0 ;
float squared _mean = 0.0 ;
float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ) ;
float uvStart = samples <= 1.0 ? 0.0 : - 1.0 ;
for ( float i = 0.0 ; i < samples ; i ++ ) {
float uvOffset = uvStart + i * uvStride ;
# ifdef HORIZONTAL _PASS
vec2 distribution = unpackRGBATo2Half ( texture2D ( shadow _pass , ( gl _FragCoord . xy + vec2 ( uvOffset , 0.0 ) * radius ) / resolution ) ) ;
mean += distribution . x ;
squared _mean += distribution . y * distribution . y + distribution . x * distribution . x ;
# else
float depth = unpackRGBAToDepth ( texture2D ( shadow _pass , ( gl _FragCoord . xy + vec2 ( 0.0 , uvOffset ) * radius ) / resolution ) ) ;
mean += depth ;
squared _mean += depth * depth ;
# endif
}
mean = mean / samples ;
squared _mean = squared _mean / samples ;
float std _dev = sqrt ( squared _mean - mean * mean ) ;
gl _FragColor = pack2HalfToRGBA ( vec2 ( mean , std _dev ) ) ;
} ` ;function PB(r,e,t){let n=new op;const i=new c2,o=new c2,a=new t4,s=new IB({depthPacking:Wz}),c=new RB,f={},h=t.maxTextureSize,m={0:h0,1:X8,2:G0},g=new y9({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new c2},radius:{value:4}},vertexShader:OB,fragmentShader:LB}),v=g.clone();v.defines.HORIZONTAL_PASS=1;const S=new L4;S.setAttribute("position",new H4(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new e4(S,g),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Wh,this.render=function(T,E,C){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||T.length===0)return;const P=r.getRenderTarget(),I=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),W=r.state;W.setBlending(X9),W.buffers.color.setClear(1,1,1,1),W.buffers.depth.setTest(!0),W.setScissorTest(!1);for(let e1=0,a1=T.length;e1<a1;e1++){const $ =T[e1],N= $ .shadow;if(N===void 0){console.warn("THREE.WebGLShadowMap:", $ ,"has no shadow.");continue}if(N.autoUpdate===!1&&N.needsUpdate===!1)continue;i.copy(N.mapSize);const H=N.getFrameExtents();if(i.multiply(H),o.copy(N.mapSize),(i.x>h||i.y>h)&&(i.x>h&&(o.x=Math.floor(h/H.x),i.x=o.x*H.x,N.mapSize.x=o.x),i.y>h&&(o.y=Math.floor(h/H.y),i.y=o.y*H.y,N.mapSize.y=o.y)),N.map===null){const X=this.type!==V6?{minFilter:C4,magFilter:C4}:{};N.map=new G5(i.x,i.y,X),N.map.texture.name= $ .name+".shadowMap",N.camera.updateProjectionMatrix()}r.setRenderTarget(N.map),r.clear();const K=N.getViewportCount();for(let X=0;X<K;X++){const B=N.getViewport(X);a.set(o.x*B.x,o.y*B.y,o.x*B.z,o.y*B.w),W.viewport(a),N.updateMatrices( $ ,X),n=N.getFrustum(),D(E,C,N.camera, $ ,this.type)}N.isPointLightShadow!==!0&&this.type===V6&&M(N,C),N.needsUpdate=!1}x.needsUpdate=!1,r.setRenderTarget(P,I,L)};function M(T,E){const C=e.update(_);g.defines.VSM_SAMPLES!==T.blurSamples&&(g.defines.VSM_SAMPLES=T.blurSamples,v.defines.VSM_SAMPLES=T.blurSamples,g.needsUpdate=!0,v.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new G5(i.x,i.y)),g.uniforms.shadow_pass.value=T.map.texture,g.uniforms.resolution.value=T.mapSize,g.uniforms.radius.value=T.radius,r.setRenderTarget(T.mapPass),r.clear(),r.renderBufferDirect(E,null,C,g,_,null),v.uniforms.shadow_pass.value=T.mapPass.texture,v.uniforms.resolution.value=T.mapSize,v.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(E,null,C,v,_,null)}function A(T,E,C,P,I,L){let W=null;const e1=C.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(e1!==void 0?W=e1:W=C.isPointLight===!0?c:s,r.localClippingEnabled&&E.clipShadows===!0&&Array.isArray(E.clippingPlanes)&&E.clippingPlanes.length!==0||E.displacementMap&&E.displacementScale!==0||E.alphaMap&&E.alphaTest>0){const a1=W.uuid, $ =E.uuid;let N=f[a1];N===void 0&&(N={},f[a1]=N);let H=N[ $ ];H===void 0&&(H=W.clone(),N[ $ ]=H),W=H}return W.visible=E.visible,W.wireframe=E.wireframe,L===V6?W.side=E.shadowSide!==null?E.shadowSide:E.side:W.side=E.shadowSide!==null?E.shadowSide:m[E.side],W.alphaMap=E.alphaMap,W.alphaTest=E.alphaTest,W.clipShadows=E.clipShadows,W.clippingPlanes=E.clippingPlanes,W.clipIntersection=E.clipIntersection,W.displacementMap=E.displacementMap,W.displacementScale=E.displacementScale,W.displacementBias=E.displacementBias,W.wireframeLinewidth=E.wireframeLinewidth,W.linewidth=E.linewidth,C.isPointLight===!0&&W.isMeshDistanceMaterial===!0&&(W.referencePosition.setFromMatrixPosition(C.matrixWorld),W.nearDistance=P,W.farDistance=I),W}function D(T,E,C,P,I){if(T.visible===!1)return;if(T.layers.test(E.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&I===V6)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(C.matrixWorldInverse,T.matrixWorld);const e1=e.update(T),a1=T.material;if(Array.isArray(a1)){const $ =e1.groups;for(let N=0,H= $ .length;N<H;N++){const K= $ [N],X=a1[K.materialIndex];if(X&&X.visible){const B=A(T,X,P,C.near,C.far,I);r.renderBufferDirect(C,null,e1,B,T,K)}}}else if(a1.visible){const $ =A(T,a1,P,C.near,C.far,I);r.renderBufferDirect(C,null,e1, $ ,T,null)}}const W=T.children;for(let e1=0,a1=W.length;e1<a1;e1++)D(W[e1],E,C,P,I)}}func
* GSAP 3.11 . 5
* https : //greensock.com
*
* @ license Copyright 2008 - 2023 , GreenSock . All rights reserved .
* Subject to the terms at https : //greensock.com/standard-license or for
* Club GreenSock members , the agreement issued with that membership .
* @ author : Jack Doyle , jack @ greensock . com
* / v a r $ 4 = { a u t o S l e e p : 1 2 0 , f o r c e 3 D : " a u t o " , n u l l T a r g e t W a r n : 1 , u n i t s : { l i n e H e i g h t : " " } } , t 6 = { d u r a t i o n : . 5 , o v e r w r i t e : ! 1 , d e l a y : 0 } , L a , c 4 , L 3 , u 0 = 1 e 8 , a 3 = 1 / u 0 , e o = M a t h . P I * 2 , U G = e o / 4 , N G = 0 , M p = M a t h . s q r t , F G = M a t h . c o s , B G = M a t h . s i n , Y 3 = f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " s t r i n g " } , A 3 = f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " f u n c t i o n " } , b 9 = f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " n u m b e r " } , P a = f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " u n d e f i n e d " } , $ 0 = f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " o b j e c t " } , D 4 = f u n c t i o n ( e ) { r e t u r n e ! = = ! 1 } , z a = f u n c t i o n ( ) { r e t u r n t y p e o f w i n d o w ! = " u n d e f i n e d " } , V e = f u n c t i o n ( e ) { r e t u r n A 3 ( e ) | | Y 3 ( e ) } , w p = t y p e o f A r r a y B u f f e r = = " f u n c t i o n " & & A r r a y B u f f e r . i s V i e w | | f u n c t i o n ( ) { } , d 4 = A r r a y . i s A r r a y , t o = / ( ? : - ? \ . ? \ d | \ . ) + / g i , A p = / [ - + = . ] * \ d + [ . e \ - + ] * \ d * [ e \ - + ] * \ d * / g , W 8 = / [ - + = . ] * \ d + [ . e - ] * \ d * [ a - z % ] * / g , P i = / [ - + = . ] * \ d + \ . ? \ d * ( ? : e - | e \ + ) ? \ d * / g i , C p = / [ + - ] = - ? [ . \ d ] + / , T p = / [ ^ , ' " \ [ \ ] \ s ] + / g i , G G = / ^ [ + \ - = e \ s \ d ] * \ d + [ . \ d ] * ( [ a - z ] * | % ) \ s * $ / i , g 3 , o 0 , n o , k a , Y 4 = { } , l t = { } , E p , D p = f u n c t i o n ( e ) { r e t u r n ( l t = V 5 ( e , Y 4 ) ) & & O 4 } , U a = f u n c t i o n ( e , t ) { r e t u r n c o n s o l e . w a r n ( " I n v a l i d p r o p e r t y " , e , " s e t t o " , t , " M i s s i n g p l u g i n ? g s a p . r e g i s t e r P l u g i n ( ) " ) } , u t = f u n c t i o n ( e , t ) { r e t u r n ! t & & c o n s o l e . w a r n ( e ) } , I p = f u n c t i o n ( e , t ) { r e t u r n e & & ( Y 4 [ e ] = t ) & & l t & & ( l t [ e ] = t ) | | Y 4 } , i 7 = f u n c t i o n ( ) { r e t u r n 0 } , V G = { s u p p r e s s E v e n t s : ! 0 , i s S t a r t : ! 0 , k i l l : ! 1 } , J e = { s u p p r e s s E v e n t s : ! 0 , k i l l : ! 1 } , W G = { s u p p r e s s E v e n t s : ! 0 } , N a = { } , Q 9 = [ ] , i o = { } , R p , W 4 = { } , z i = { } , u f = 3 0 , Z e = [ ] , F a = " " , B a = f u n c t i o n ( e ) { v a r t = e [ 0 ] , n , i ; i f ( $ 0 ( t ) | | A 3 ( t ) | | ( e = [ e ] ) , ! ( n = ( t . _ g s a p | | { } ) . h a r n e s s ) ) { f o r ( i = Z e . l e n g t h ; i - - & & ! Z e [ i ] . t a r g e t T e s t ( t ) ; ) ; n = Z e [ i ] } f o r ( i = e . l e n g t h ; i - - ; ) e [ i ] & & ( e [ i ] . _ g s a p | | ( e [ i ] . _ g s a p = n e w t m ( e [ i ] , n ) ) ) | | e . s p l i c e ( i , 1 ) ; r e t u r n e } , z 5 = f u n c t i o n ( e ) { r e t u r n e . _ g s a p | | B a ( c 0 ( e ) ) [ 0 ] . _ g s a p } , O p = f u n c t i o n ( e , t , n ) { r e t u r n ( n = e [ t ] ) & & A 3 ( n ) ? e [ t ] ( ) : P a ( n ) & & e . g e t A t t r i b u t e & & e . g e t A t t r i b u t e ( t ) | | n } , I 4 = f u n c t i o n ( e , t ) { r e t u r n ( e = e . s p l i t ( " , " ) ) . f o r E a c h ( t ) | | e } , D 3 = f u n c t i o n ( e ) { r e t u r n M a t h . r o u n d ( e * 1 e 5 ) / 1 e 5 | | 0 } , K 3 = f u n c t i o n ( e ) { r e t u r n M a t h . r o u n d ( e * 1 e 7 ) / 1 e 7 | | 0 } , Y 8 = f u n c t i o n ( e , t ) { v a r n = t . c h a r A t ( 0 ) , i = p a r s e F l o a t ( t . s u b s t r ( 2 ) ) ; r e t u r n e = p a r s e F l o a t ( e ) , n = = = " + " ? e + i : n = = = " - " ? e - i : n = = = " * " ? e * i : e / i } , j G = f u n c t i o n ( e , t ) { f o r ( v a r n = t . l e n g t h , i = 0 ; e . i n d e x O f ( t [ i ] ) < 0 & & + + i < n ; ) ; r e t u r n i < n } , c t = f u n c t i o n ( ) { v a r e = Q 9 . l e n g t h , t = Q 9 . s l i c e ( 0 ) , n , i ; f o r ( i o = { } , Q 9 . l e n g t h = 0 , n = 0 ; n < e ; n + + ) i = t [ n ] , i & & i . _ l a z y & & ( i . r e n d e r ( i . _ l a z y [ 0 ] , i . _ l a z y [ 1 ] , ! 0 ) . _ l a z y = 0 ) } , L p = f u n c t i o n ( e , t , n , i ) { Q 9 . l e n g t h & & ! c 4 & & c t ( ) , e . r e n d e r ( t , n , i | | c 4 & & t < 0 & & ( e . _ i n i t t e d | | e . _ s t a r t A t ) ) , Q 9 . l e n g t h & & ! c 4 & & c t ( ) } , P p = f u n c t i o n ( e ) { v a r t = p a r s e F l o a t ( e ) ; r e t u r n ( t | | t = = = 0 ) & & ( e + " " ) . m a t c h ( T p ) . l e n g t h < 2 ? t : Y 3 ( e ) ? e . t r i m ( ) : e } , z p = f u n c t i o n ( e ) { r e t u r n e } , m 0 = f u n c t i o n ( e , t ) { f o r ( v a r n i n t ) n i n e | | ( e [ n ] = t [ n ] ) ; r e t u r n e } , H G = f u n c t i o n ( e ) { r e t u r n f u n c t i o n ( t , n ) { f o r ( v a r i i n n ) i i n t | | i = = = " d u r a t i o n " & & e | | i = = = " e a s e " | | ( t [ i ] = n [ i ] ) } } , V 5 = f u n c t i o n ( e , t ) { f o r ( v a r n i n t ) e [ n ] = t [ n ] ; r e t u r n e } , c f = f u n c t i o n r ( e , t ) { f o r ( v a r n i n t ) n ! = = " _ _ p r o t o _ _ " & & n ! = = " c o n s t r u c t o r " & & n ! = = " p r o t o t y p e " & & ( e [ n ] = $ 0 ( t [ n ] ) ? r ( e [ n ] | | ( e [ n ] = { } ) , t [ n ] ) : t [ n ] ) ; r e t u r n e } , d t = f u n c t i o n ( e , t ) { v a r n = { } , i ; f o r ( i i n e ) i i n t | | ( n [ i ] = e [ i ] ) ; r e t u r n n } , Z 6 = f u n c t i o n ( e ) { v a r t = e . p a r e n t | | g 3 , n = e . k e y f r a m e s ? H G ( d 4 ( e . k e y f r a m e s ) ) : m 0 ; i f ( D 4 ( e . i n h e r i t ) ) f o r ( ; t ; ) n ( e , t . v a r s . d e f a u l t s ) , t = t . p a r e n t | | t . _ d p ; r e t u r n e } , $ G = f u n c t i o n ( e , t ) { f o r ( v a r n = e . l e n g t h , i = n = = = t . l e n g t h ; i & & n - - & & e [ n ] = = = t [ n ] ; ) ; r e t u r n n < 0 } , k p = f u n c t i o n ( e , t , n , i , o ) { n = = = v o i d 0 & & ( n = " _ f i r s t " ) , i = = = v o i d 0 & & ( i = " _ l a s t " ) ; v a r a = e [ i ] , s ; i f ( o ) f o r ( s = t [ o ] ; a & & a [ o ] > s ; ) a = a . _ p r e v ; r e t u r n a ? ( t . _ n e x t = a . _ n e x t , a . _ n e x t = t ) : ( t . _ n e x t = e [ n ] , e [ n ] = t ) , t . _ n e x t ? t . _ n e x t . _ p r e v = t : e [ i ] = t , t . _ p r e v = a , t . p a r e n t = t . _ d p = e , t } , w t = f u n c t i o n ( e , t , n , i ) { n = = = v o i d 0 & & ( n = " _ f i r s t " ) , i = = = v o i d 0 & & ( i = " _ l a s t " ) ; v a r o = t . _ p r e v , a = t . _ n e x t ; o ? o . _ n e x t = a : e [ n ] = = = t & & ( e [ n ] = a ) , a ? a . _ p r e v = o : e [ i ] = = = t & & ( e [ i ] = o ) , t . _ n e x t = t . _ p r e v = t . p a r e n t = n u l l } , t 5 = f u n c t i o n ( e , t ) { e . p a r e n t & & ( ! t | | e . p a r e n t . a u t o R e m o v e C h i l d r e n ) & & e . p a r e n t . r e m o v e ( e ) , e . _ a c t = 0 } , k 5 = f u n c t i o n ( e , t ) { i f ( e & & ( ! t | | t . _ e n d > e . _ d u r | | t . _ s t a r t < 0 ) ) f o r ( v a r n = e ; n ; ) n . _ d i r t y = 1 , n = n . p a r e n t ; r e t u r n e } , Y G = f u n c t i o n ( e ) { f o r ( v a r t = e . p a r e n t ; t & & t . p a r e n t ; ) t . _ d i r t y = 1 , t . t o t a l D u r a t i o n ( ) , t = t . p a r e n t ; r e t u r n e } , r o = f u n c t i o n ( e , t , n , i ) { r e t u r n e . _ s t a r t A t & & ( c 4 ? e . _ s t a r t A t . r e v e r t ( J e ) : e . v a r s . i m m e d i a t e R e n d e r & & ! e . v a r s . a u t o R e v e r t | | e . _ s t a r t A t . r e n d e r ( t , ! 0 , i ) ) } , J G = f u n c t i o n r ( e ) { r e t u r n ! e | | e . _ t s & & r ( e . p a r e n t ) } , d f = f u n c t i o n ( e ) { r e t u r n e . _ r e p e a t ? n 6 ( e . _ t T i m e , e = e . d u r a t i o n ( ) + e . _ r D e l a y ) * e : 0 } , n 6 = f u n c t i o n ( e , t ) { v a r n = M a t h . f l o o r ( e / = t ) ; r e t u r n e & & n = = = e ? n - 1 :
* CSSPlugin 3.11 . 5
* https : //greensock.com
*
* Copyright 2008 - 2023 , GreenSock . All rights reserved .
* Subject to the terms at https : //greensock.com/standard-license or for
* Club GreenSock members , the agreement issued with that membership .
* @ author : Jack Doyle , jack @ greensock . com
* / v a r g f , J 9 , J 8 , $ a , I 5 , _ f , Y a , E V = f u n c t i o n ( ) { r e t u r n t y p e o f w i n d o w ! = " u n d e f i n e d " } , x 9 = { } , w 5 = 1 8 0 / M a t h . P I , Z 8 = M a t h . P I / 1 8 0 , O 8 = M a t h . a t a n 2 , v f = 1 e 8 , J a = / ( [ A - Z ] ) / g , D V = / ( l e f t | r i g h t | w i d t h | m a r g i n | p a d d i n g | x ) / i , I V = / [ \ s , \ ( ] \ S / , W 0 = { a u t o A l p h a : " o p a c i t y , v i s i b i l i t y " , s c a l e : " s c a l e X , s c a l e Y " , a l p h a : " o p a c i t y " } , f o = f u n c t i o n ( e , t ) { r e t u r n t . s e t ( t . t , t . p , M a t h . r o u n d ( ( t . s + t . c * e ) * 1 e 4 ) / 1 e 4 + t . u , t ) } , R V = f u n c t i o n ( e , t ) { r e t u r n t . s e t ( t . t , t . p , e = = = 1 ? t . e : M a t h . r o u n d ( ( t . s + t . c * e ) * 1 e 4 ) / 1 e 4 + t . u , t ) } , O V = f u n c t i o n ( e , t ) { r e t u r n t . s e t ( t . t , t . p , e ? M a t h . r o u n d ( ( t . s + t . c * e ) * 1 e 4 ) / 1 e 4 + t . u : t . b , t ) } , L V = f u n c t i o n ( e , t ) { v a r n = t . s + t . c * e ; t . s e t ( t . t , t . p , ~ ~ ( n + ( n < 0 ? - . 5 : . 5 ) ) + t . u , t ) } , c m = f u n c t i o n ( e , t ) { r e t u r n t . s e t ( t . t , t . p , e ? t . e : t . b , t ) } , d m = f u n c t i o n ( e , t ) { r e t u r n t . s e t ( t . t , t . p , e ! = = 1 ? t . b : t . e , t ) } , P V = f u n c t i o n ( e , t , n ) { r e t u r n e . s t y l e [ t ] = n } , z V = f u n c t i o n ( e , t , n ) { r e t u r n e . s t y l e . s e t P r o p e r t y ( t , n ) } , k V = f u n c t i o n ( e , t , n ) { r e t u r n e . _ g s a p [ t ] = n } , U V = f u n c t i o n ( e , t , n ) { r e t u r n e . _ g s a p . s c a l e X = e . _ g s a p . s c a l e Y = n } , N V = f u n c t i o n ( e , t , n , i , o ) { v a r a = e . _ g s a p ; a . s c a l e X = a . s c a l e Y = n , a . r e n d e r T r a n s f o r m ( o , a ) } , F V = f u n c t i o n ( e , t , n , i , o ) { v a r a = e . _ g s a p ; a [ t ] = n , a . r e n d e r T r a n s f o r m ( o , a ) } , _ 3 = " t r a n s f o r m " , I 0 = _ 3 + " O r i g i n " , B V = f u n c t i o n r ( e , t ) { v a r n = t h i s , i = t h i s . t a r g e t , o = i . s t y l e ; i f ( e i n x 9 ) { i f ( t h i s . t f m = t h i s . t f m | | { } , e ! = = " t r a n s f o r m " ) e = W 0 [ e ] | | e , ~ e . i n d e x O f ( " , " ) ? e . s p l i t ( " , " ) . f o r E a c h ( f u n c t i o n ( a ) { r e t u r n n . t f m [ a ] = h 9 ( i , a ) } ) : t h i s . t f m [ e ] = i . _ g s a p . x ? i . _ g s a p [ e ] : h 9 ( i , e ) ; e l s e r e t u r n W 0 . t r a n s f o r m . s p l i t ( " , " ) . f o r E a c h ( f u n c t i o n ( a ) { r e t u r n r . c a l l ( n , a , t ) } ) ; i f ( t h i s . p r o p s . i n d e x O f ( _ 3 ) > = 0 ) r e t u r n ; i . _ g s a p . s v g & & ( t h i s . s v g o = i . g e t A t t r i b u t e ( " d a t a - s v g - o r i g i n " ) , t h i s . p r o p s . p u s h ( I 0 , t , " " ) ) , e = _ 3 } ( o | | t ) & & t h i s . p r o p s . p u s h ( e , t , o [ e ] ) } , f m = f u n c t i o n ( e ) { e . t r a n s l a t e & & ( e . r e m o v e P r o p e r t y ( " t r a n s l a t e " ) , e . r e m o v e P r o p e r t y ( " s c a l e " ) , e . r e m o v e P r o p e r t y ( " r o t a t e " ) ) } , G V = f u n c t i o n ( ) { v a r e = t h i s . p r o p s , t = t h i s . t a r g e t , n = t . s t y l e , i = t . _ g s a p , o , a ; f o r ( o = 0 ; o < e . l e n g t h ; o + = 3 ) e [ o + 1 ] ? t [ e [ o ] ] = e [ o + 2 ] : e [ o + 2 ] ? n [ e [ o ] ] = e [ o + 2 ] : n . r e m o v e P r o p e r t y ( e [ o ] . s u b s t r ( 0 , 2 ) = = = " - - " ? e [ o ] : e [ o ] . r e p l a c e ( J a , " - $ 1 " ) . t o L o w e r C a s e ( ) ) ; i f ( t h i s . t f m ) { f o r ( a i n t h i s . t f m ) i [ a ] = t h i s . t f m [ a ] ; i . s v g & & ( i . r e n d e r T r a n s f o r m ( ) , t . s e t A t t r i b u t e ( " d a t a - s v g - o r i g i n " , t h i s . s v g o | | " " ) ) , o = Y a ( ) , ( ! o | | ! o . i s S t a r t ) & & ! n [ _ 3 ] & & ( f m ( n ) , i . u n c a c h e = 1 ) } } , h m = f u n c t i o n ( e , t ) { v a r n = { t a r g e t : e , p r o p s : [ ] , r e v e r t : G V , s a v e : B V } ; r e t u r n e . _ g s a p | | O 4 . c o r e . g e t C a c h e ( e ) , t & & t . s p l i t ( " , " ) . f o r E a c h ( f u n c t i o n ( i ) { r e t u r n n . s a v e ( i ) } ) , n } , p m , h o = f u n c t i o n ( e , t ) { v a r n = J 9 . c r e a t e E l e m e n t N S ? J 9 . c r e a t e E l e m e n t N S ( ( t | | " h t t p : / / w w w . w 3 . o r g / 1 9 9 9 / x h t m l " ) . r e p l a c e ( / ^ h t t p s / , " h t t p " ) , e ) : J 9 . c r e a t e E l e m e n t ( e ) ; r e t u r n n . s t y l e ? n : J 9 . c r e a t e E l e m e n t ( e ) } , H 0 = f u n c t i o n r ( e , t , n ) { v a r i = g e t C o m p u t e d S t y l e ( e ) ; r e t u r n i [ t ] | | i . g e t P r o p e r t y V a l u e ( t . r e p l a c e ( J a , " - $ 1 " ) . t o L o w e r C a s e ( ) ) | | i . g e t P r o p e r t y V a l u e ( t ) | | ! n & & r ( e , s 6 ( t ) | | t , 1 ) | | " " } , y f = " O , M o z , m s , M s , W e b k i t " . s p l i t ( " , " ) , s 6 = f u n c t i o n ( e , t , n ) { v a r i = t | | I 5 , o = i . s t y l e , a = 5 ; i f ( e i n o & & ! n ) r e t u r n e ; f o r ( e = e . c h a r A t ( 0 ) . t o U p p e r C a s e ( ) + e . s u b s t r ( 1 ) ; a - - & & ! ( y f [ a ] + e i n o ) ; ) ; r e t u r n a < 0 ? n u l l : ( a = = = 3 ? " m s " : a > = 0 ? y f [ a ] : " " ) + e } , p o = f u n c t i o n ( ) { E V ( ) & & w i n d o w . d o c u m e n t & & ( g f = w i n d o w , J 9 = g f . d o c u m e n t , J 8 = J 9 . d o c u m e n t E l e m e n t , I 5 = h o ( " d i v " ) | | { s t y l e : { } } , h o ( " d i v " ) , _ 3 = s 6 ( _ 3 ) , I 0 = _ 3 + " O r i g i n " , I 5 . s t y l e . c s s T e x t = " b o r d e r - w i d t h : 0 ; l i n e - h e i g h t : 0 ; p o s i t i o n : a b s o l u t e ; p a d d i n g : 0 " , p m = ! ! s 6 ( " p e r s p e c t i v e " ) , Y a = O 4 . c o r e . r e v e r t i n g , $ a = 1 ) } , G i = f u n c t i o n r ( e ) { v a r t = h o ( " s v g " , t h i s . o w n e r S V G E l e m e n t & & t h i s . o w n e r S V G E l e m e n t . g e t A t t r i b u t e ( " x m l n s " ) | | " h t t p : / / w w w . w 3 . o r g / 2 0 0 0 / s v g " ) , n = t h i s . p a r e n t N o d e , i = t h i s . n e x t S i b l i n g , o = t h i s . s t y l e . c s s T e x t , a ; i f ( J 8 . a p p e n d C h i l d ( t ) , t . a p p e n d C h i l d ( t h i s ) , t h i s . s t y l e . d i s p l a y = " b l o c k " , e ) t r y { a = t h i s . g e t B B o x ( ) , t h i s . _ g s a p B B o x = t h i s . g e t B B o x , t h i s . g e t B B o x = r } c a t c h ( s ) { } e l s e t h i s . _ g s a p B B o x & & ( a = t h i s . _ g s a p B B o x ( ) ) ; r e t u r n n & & ( i ? n . i n s e r t B e f o r e ( t h i s , i ) : n . a p p e n d C h i l d ( t h i s ) ) , J 8 . r e m o v e C h i l d ( t ) , t h i s . s t y l e . c s s T e x t = o , a } , b f = f u n c t i o n ( e , t ) { f o r ( v a r n = t . l e n g t h ; n - - ; ) i f ( e . h a s A t t r i b u t e ( t [ n ] ) ) r e t u r n e . g e t A t t r i b u t e ( t [ n ] ) } , m m = f u n c t i o n ( e ) { v a r t ; t r y { t = e . g e t B B o x ( ) } c a t c h ( n ) { t = G i . c a l l ( e , ! 0 ) } r e t u r n t & & ( t . w i d t h | | t . h e i g h t ) | | e . g e t B B o x = = = G i | | ( t = G i . c a l l ( e , ! 0 ) ) , t & & ! t . w i d t h & & ! t . x & & ! t . y ? { x : + b f ( e , [ " x " , " c x " , " x 1 " ] ) | | 0 , y : + b f ( e , [ " y " , " c y " , " y 1 " ] ) | | 0 , w i d t h : 0 , h e i g h t : 0 } : t } , g m = f u n c t i o n ( e ) { r e t u r n ! ! ( e . g e t C T M & & ( ! e . p a r e n t N o d e | | e . o w n e r S V G E l e m e n t ) & & m m ( e ) ) } , a 7 = f u n c t i o n ( e , t ) { i f ( t ) { v a r n = e . s t y l e ; t i n x 9 & & t ! = = I 0 & & ( t = _ 3 ) , n . r e m o v e P r o p e r t y ? ( ( t . s u b s t r ( 0 , 2 ) = = = " m s " | | t . s u b s t r ( 0 , 6 ) = = = " w e b k i t " ) & & ( t = " - " + t ) , n . r e m o v e P r o p e r t y ( t . r
` )),v.vertexShader=v.vertexShader.replace("gl_PointSize = size;",["gl_PointSize = percent * size;"].join( `
` ))};const g=new mp(i,m);return m.color=new X2(n),g.name="飞行线",g}function qV(r,e,t,n,i,o){const a=n7(r,e,t),s=new t1(a.x,a.y,a.z),c=n7(r,n,i),f=new t1(c.x,c.y,c.z),h=QV(s,f),m=KV(r,h.startPoint,h.endPoint,o);return m.quaternion.multiply(h.quaternion),m}function QV(r,e){const t=new t1(0,0,0),n=r.clone().sub(t),i=e.clone().sub(t),o=n.clone().cross(i).normalize(),a=new t1(0,0,1),s=new v9().setFromUnitVectors(o,a),c=r.clone().applyQuaternion(s),f=e.clone().applyQuaternion(s),m=c.clone().add(f).multiplyScalar(.5).clone().sub(t).normalize(),g=new t1(0,1,0),v=new v9().setFromUnitVectors(m,g),S=c.clone().applyQuaternion(v),_=f.clone().applyQuaternion(v);return{quaternion:s.clone().invert().multiply(v.clone().invert()),startPoint:S,endPoint:_}}function KV(r,e,t,n){const o=new t1().addVectors(e,t).multiplyScalar(.5).clone().normalize(),a=Af(e,t,new t1(0,0,0)),s=o.multiplyScalar(r+a*r*.2),c=tW(e,t,s),f=Math.abs(c.y-s.y),h=Af(e,new t1(0,-1,0),c),m=-Math.PI/2+h,g=Math.PI-m,v=eW(c.x,c.y,f,m,g,n.color);v.center=c,v.topCoord=s;const S=(g-m)/7,_=XV(f,m,m+S,n.flyLineColor);return _.position.y=c.y,v.add(_),_.flyEndAngle=g-m-S,_.startAngle=m,_.AngleZ=v.flyEndAngle*Math.random(),v.userData.flyLine=_,v}function Af(r,e,t){const n=r.clone().sub(t).normalize(),i=e.clone().sub(t).normalize(),o=n.clone().dot(i);return Math.acos(o)}function eW(r,e,t,n,i,o){const a=new L4,c=new Ia(r,e,t,n,i,!1).getSpacedPoints(80);a.setFromPoints(c);const f=new pp({color:o||13731143});return new ZB(a,f)}function tW(r,e,t){const n=r.lengthSq(),i=e.lengthSq(),o=t.lengthSq(),a=r.x,s=r.y,c=e.x,f=e.y,h=t.x,m=t.y,g=a*f+c*m+h*s-a*m-c*s-h*f,v=(i*m+n*f+o*s-i*s-o*f-n*m)/g/2,S=(o*c+i*a+n*h-n*c-i*h-o*a)/g/2;return new t1(v,S,0)}const nW= `
varying vec2 vUv ;
varying vec3 vNormal ;
varying vec3 vp ;
varying vec3 vPositionNormal ;
void main ( void ) {
vUv = uv ;
vNormal = normalize ( normalMatrix * normal ) ; // 转换到视图空间
vp = position ;
vPositionNormal = normalize ( ( modelViewMatrix * vec4 ( position , 1.0 ) ) . xyz ) ;
gl _Position = projectionMatrix * modelViewMatrix * vec4 ( position , 1.0 ) ;
} ` ,iW= ` uniform vec3 glowColor ;
uniform float bias ;
uniform float power ;
uniform float time ;
varying vec3 vp ;
varying vec3 vNormal ;
varying vec3 vPositionNormal ;
uniform float scale ;
// 获取纹理
uniform sampler2D map ;
// 纹理坐标
varying vec2 vUv ;
void main ( void ) {
float a = pow ( bias + scale * abs ( dot ( vNormal , vPositionNormal ) ) , power ) ;
if ( vp . y > time && vp . y < time + 20.0 ) {
float t = smoothstep ( 0.0 , 0.8 , ( 1.0 - abs ( 0.5 - ( vp . y - time ) / 20.0 ) ) / 3.0 ) ;
gl _FragColor = mix ( gl _FragColor , vec4 ( glowColor , 1.0 ) , t * t ) ;
}
gl _FragColor = mix ( gl _FragColor , vec4 ( glowColor , 1.0 ) , a ) ;
float b = 0.8 ;
gl _FragColor = gl _FragColor + texture2D ( map , vUv ) ;
} ` ;class rW{constructor(e){l1(this,"group");l1(this,"earthGroup");l1(this,"around");l1(this,"aroundPoints");l1(this,"options");l1(this,"uniforms");l1(this,"timeValue");l1(this,"earth");l1(this,"punctuationMaterial");l1(this,"markupPoint");l1(this,"waveMeshArr");l1(this,"circleLineList");l1(this,"circleList");l1(this,"x");l1(this,"n");l1(this,"isRotation");l1(this,"flyLineArcGroup");this.options=e,this.group=new m9,this.group.name="group",this.group.scale.set(0,0,0),this.earthGroup=new m9,this.group.add(this.earthGroup),this.earthGroup.name="EarthGroup",this.markupPoint=new m9,this.markupPoint.name="markupPoint",this.waveMeshArr=[],this.circleLineList=[],this.circleList=[],this.x=0,this.n=0,this.isRotation=this.options.earth.isRotation,this.timeValue=200,this.uniforms={glowColor:{value:new X2(840171)},scale:{type:"f",value:-1},bias:{type:"f",value:1},power:{type:"f",value:3.3},time:{type:"f",value:this.timeValue},isHover:{value:!1},map:{value:void 0}}}init(){return m3(this,null,function*(){return new Promise(e=>{(()=>m3(this,null,function*(){this.createEarth(),this.createEarthGlow(),this.createEarthAperture(),yield this.createMarkupPoint(),this.createAnimateCircle(),this.createFlyLine(),this.show(),e()}))()})})}createEarth(){const e=new j9(this.options.earth.radius,50,50),t=new j9(this.options.earth.radius+10,60,60),n=new Da({color:8519679,transparent:!0,sizeAttenuation:!0,opacity:.1,vertexColors:!1,size:.2}),i=new mp(t,n);this.earthGroup.add(i),this.uniforms.map.value=this.options.textures.earth;const o=new y9({uniforms:this.uniforms,vertexShader:nW,fragmentShader:iW});o.needsUpdate=!0,this.earth=new e4(e,o),this.earth.name="earth",this.earthGroup.add(this.earth)}createEarthGlow(){const e=this.options.earth.radius,t=this.options.textures.glow,n=new fp({map:t,color:4427985,transparent:!0,opacity:.7,depthWrite:!1}),i=new JB(n);i.scale.set(e*3,e*3,1),this.earthGroup.add(i)}createEarthAperture(){const e=["varying vec3 vVertexWorldPosition;","varying vec3 vVertexNormal;","varying vec4 vFragColor;","void main(){"," vVertexNormal = normalize(normalMatrix * normal);"," vVertexWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;"," // set gl_Position"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join( `
` ),t={uniforms:{coeficient:{type:"f",value:1},power:{type:"f",value:3},glowColor:{type:"c",value:new X2(4427985)}},vertexShader:e,fragmentShader:["uniform vec3 glowColor;","uniform float coeficient;","uniform float power;","varying vec3 vVertexNormal;","varying vec3 vVertexWorldPosition;","varying vec4 vFragColor;","void main(){"," vec3 worldCameraToVertex = vVertexWorldPosition - cameraPosition;"," vec3 viewCameraToVertex = (viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz;"," viewCameraToVertex= normalize(viewCameraToVertex);"," float intensity = pow(coeficient + dot(vVertexNormal, viewCameraToVertex), power);"," gl_FragColor = vec4(glowColor, intensity);","}"].join( `
` )},n=new y9({uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,blending:O5,transparent:!0,depthWrite:!1}),i=new j9(this.options.earth.radius+0,50,50),o=new e4(i,n);this.earthGroup.add(o)}createMarkupPoint(){return m3(this,null,function*(){yield Promise.all(this.options.data.map(e=>m3(this,null,function*(){const t=this.options.earth.radius,n=e.startArray.E,i=e.startArray.N;this.punctuationMaterial=new p9({color:this.options.punctuation.circleColor,map:this.options.textures.label,transparent:!0,depthWrite:!1});const o=lf({radius:t,lon:n,lat:i,material:this.punctuationMaterial});this.markupPoint.add(o);const a=sf({radius:this.options.earth.radius,lon:n,lat:i,index:0,textures:this.options.textures,punctuation:this.options.punctuation});this.markupPoint.add(a);const s=af({radius:t,lon:n,lat:i,textures:this.options.textures});this.markupPoint.add(s),this.waveMeshArr.push(s),yield Promise.all(e.endArray.map(c=>{const f=c.E,h=c.N,m=lf({radius:t,lon:f,lat:h,material:this.punctuationMaterial});this.markupPoint.add(m);const g=sf({radius:this.options.earth.radius,lon:f,lat:h,index:1,textures:this.options.textures,punctuation:this.options.punctuation});this.markupPoint.add(g);const v=af({radius:t,lon:f,lat:h,textures:this.options.textures});this.markupPoint.add(v),this.waveMeshArr.push(v)})),this.earthGroup.add(this.markupPoint)})))})}createAnimateCircle(){const e=zG({radius:this.options.earth.radius+15,number:150,closed:!0}),t=new p9({color:"#0c3172",transparent:!0,opacity:.4,side:G0}),n=kG({pointList:e,material:t,number:100,radius:.1});this.earthGroup.add(n);const i=n.clone();i.scale.set(1.2,1.2,1.2),i.rotateZ(Math.PI/6),this.earthGroup.add(i);const o=n.clone();o.scale.set(.8,.8,.8),o.rotateZ(-Math.PI/6),this.earthGroup.add(o);const a=new e4(new j9(this.options.satellite.size,32,32),new p9({color:"#e0b187"})),s=new e4(new j9(this.options.satellite.size,32,32),new p9({color:"#628fbb"})),c=new e4(new j9(this.options.satellite.size,32,32),new p9({color:"#806bdf"}));this.circleLineList.push(n,i,o),a.name=s.name=c.name="卫星";for(let f=0;f<this.options.satellite.number;f++){const h=a.clone(),m=Math.floor(e.length/this.options.satellite.number);h.position.set(e[m*(f+1)][0]*1,e[m*(f+1)][1]*1,e[m*(f+1)][2]*1),n.add(h);const g=s.clone(),v=Math.floor(e.length/this.options.satellite.number);g.position.set(e[v*(f+1)][0]*1,e[v*(f+1)][1]*1,e[v*(f+1)][2]*1),i.add(g);const S=s.clone(),_=Math.floor(e.length/this.options.satellite.number);S.position.set(e[_*(f+1)][0]*1,e[_*(f+1)][1]*1,e[_*(f+1)][2]*1),o.add(S)}}createFlyLine(){this.flyLineArcGroup=new m9,this.flyLineArcGroup.userData.flyLineArray=[],this.earthGroup.add(this.flyLineArcGroup),this.options.data.forEach(e=>{e.endArray.forEach(t=>{const n=qV(this.options.earth.radius,e.startArray.E,e.startArray.N,t.E,t.N,this.options.flyLine);this.flyLineArcGroup.add(n),this.flyLineArcGroup.userData.flyLineArray.push(n.userData.flyLine)})})}show(){xm.to(this.group.scale,{x:1,y:1,z:1,duration:2,ease:"Quadratic"})}render(){var e,t;(t=(e=this.flyLineArcGroup)==null?void 0:e.userData.flyLineArray)==null||t.forEach(n=>{n.rotation.z+=this.options.flyLine.speed,n.rotation.z>=n.flyEndAngle&&(n.rotation.z=0)}),this.isRotation&&(this.earthGroup.rotation.y+=this.options.earth.rotateSpeed),this.circleLineList.forEach(n=>{n.rotateY(this.options.satellite.rotateSpeed)}),this.uniforms.time.value=this.uniforms.time.value<-this.timeValue?this.timeValue:this.uniforms.time.value-1,this.waveMeshArr.length&&this.waveMeshArr.forEach(n=>{n.userData.scale+=.007,n.scale.set(n.userData.size*n.userData.scale,n.userData.size*n.userData.scale,n.userData.size*n.userData.scale),n.userData.scale<=1.5?n.material.opacity=(n.userData.scale-1)*2:n.userData.scale>1.5&&n.userData.scale<=2?n.material.opacity=1-(n.userData.scale-1.5)*2:n.userData.scale=1})}}class oW{constructor(e){l1(this,"basic");l1(this,"scene");l1(this,"camera");l1(this,"renderer");l1(this,"controls");l1(this,"material");l1(this,"resources");l1(this,"option");l1(this,"earth");this.option=e,this.basic=new pG(e.dom),this.scene=this.basic.scen
* wordcloud2 . js
* http : //timdream.org/wordcloud2.js/
*
* Copyright 2011 - 2019 Tim Guan - tin Chien and contributors .
* Released under the MIT license
* / w i n d o w . s e t I m m e d i a t e | | ( w i n d o w . s e t I m m e d i a t e = f u n c t i o n ( ) { r e t u r n w i n d o w . m s S e t I m m e d i a t e | | w i n d o w . w e b k i t S e t I m m e d i a t e | | w i n d o w . m o z S e t I m m e d i a t e | | w i n d o w . o S e t I m m e d i a t e | | f u n c t i o n ( ) { i f ( ! w i n d o w . p o s t M e s s a g e | | ! w i n d o w . a d d E v e n t L i s t e n e r ) r e t u r n n u l l ; v a r t = [ v o i d 0 ] , n = " z e r o - t i m e o u t - m e s s a g e " , i = f u n c t i o n ( a ) { v a r s = t . l e n g t h ; r e t u r n t . p u s h ( a ) , w i n d o w . p o s t M e s s a g e ( n + s . t o S t r i n g ( 3 6 ) , " * " ) , s } ; r e t u r n w i n d o w . a d d E v e n t L i s t e n e r ( " m e s s a g e " , f u n c t i o n ( a ) { i f ( ! ( t y p e o f a . d a t a ! = " s t r i n g " | | a . d a t a . s u b s t r ( 0 , n . l e n g t h ) ! = = n ) ) { a . s t o p I m m e d i a t e P r o p a g a t i o n ( ) ; v a r s = p a r s e I n t ( a . d a t a . s u b s t r ( n . l e n g t h ) , 3 6 ) ; t [ s ] & & ( t [ s ] ( ) , t [ s ] = v o i d 0 ) } } , ! 0 ) , w i n d o w . c l e a r I m m e d i a t e = f u n c t i o n ( a ) { t [ a ] & & ( t [ a ] = v o i d 0 ) } , i } ( ) | | f u n c t i o n ( t ) { w i n d o w . s e t T i m e o u t ( t , 0 ) } } ( ) ) ; w i n d o w . c l e a r I m m e d i a t e | | ( w i n d o w . c l e a r I m m e d i a t e = f u n c t i o n ( ) { r e t u r n w i n d o w . m s C l e a r I m m e d i a t e | | w i n d o w . w e b k i t C l e a r I m m e d i a t e | | w i n d o w . m o z C l e a r I m m e d i a t e | | w i n d o w . o C l e a r I m m e d i a t e | | f u n c t i o n ( t ) { w i n d o w . c l e a r T i m e o u t ( t ) } } ( ) ) ; v a r r s = f u n c t i o n ( ) { v a r e = d o c u m e n t . c r e a t e E l e m e n t ( " c a n v a s " ) ; i f ( ! e | | ! e . g e t C o n t e x t ) r e t u r n ! 1 ; v a r t = e . g e t C o n t e x t ( " 2 d " ) ; r e t u r n ! ( ! t | | ! t . g e t I m a g e D a t a | | ! t . f i l l T e x t | | ! A r r a y . p r o t o t y p e . s o m e | | ! A r r a y . p r o t o t y p e . p u s h ) } ( ) , A o = f u n c t i o n ( ) { i f ( r s ) { f o r ( v a r e = d o c u m e n t . c r e a t e E l e m e n t ( " c a n v a s " ) . g e t C o n t e x t ( " 2 d " ) , t = 2 0 , n , i ; t ; ) { i f ( e . f o n t = t . t o S t r i n g ( 1 0 ) + " p x s a n s - s e r i f " , e . m e a s u r e T e x t ( " W " ) . w i d t h = = = n & & e . m e a s u r e T e x t ( " m " ) . w i d t h = = = i ) r e t u r n t + 1 ; n = e . m e a s u r e T e x t ( " W " ) . w i d t h , i = e . m e a s u r e T e x t ( " m " ) . w i d t h , t - - } r e t u r n 0 } } ( ) , U j = f u n c t i o n ( r ) { i f ( A r r a y . i s A r r a y ( r ) ) { v a r e = r . s l i c e ( ) ; r e t u r n e . s p l i c e ( 0 , 2 ) , e } e l s e r e t u r n [ ] } , N j = f u n c t i o n ( e ) { f o r ( v a r t , n , i = e . l e n g t h ; i ; ) t = M a t h . f l o o r ( M a t h . r a n d o m ( ) * i ) , n = e [ - - i ] , e [ i ] = e [ t ] , e [ t ] = n ; r e t u r n e } , L 8 = { } , I t = f u n c t i o n ( e , t ) { i f ( ! r s ) r e t u r n ; v a r n = M a t h . f l o o r ( M a t h . r a n d o m ( ) * D a t e . n o w ( ) ) ; A r r a y . i s A r r a y ( e ) | | ( e = [ e ] ) , e . f o r E a c h ( f u n c t i o n ( v 1 , o 1 ) { i f ( t y p e o f v 1 = = " s t r i n g " ) { i f ( e [ o 1 ] = d o c u m e n t . g e t E l e m e n t B y I d ( v 1 ) , ! e [ o 1 ] ) t h r o w n e w E r r o r ( " T h e e l e m e n t i d s p e c i f i e d i s n o t f o u n d . " ) } e l s e i f ( ! v 1 . t a g N a m e & & ! v 1 . a p p e n d C h i l d ) t h r o w n e w E r r o r ( " Y o u m u s t p a s s v a l i d H T M L e l e m e n t s , o r I D o f t h e e l e m e n t . " ) } ) ; v a r i = { l i s t : [ ] , f o n t F a m i l y : ' " T r e b u c h e t M S " , " H e i t i T C " , " 微 軟 正 黑 體 " , " A r i a l U n i c o d e M S " , " D r o i d F a l l b a c k S a n s " , s a n s - s e r i f ' , f o n t W e i g h t : " n o r m a l " , c o l o r : " r a n d o m - d a r k " , m i n S i z e : 0 , w e i g h t F a c t o r : 1 , c l e a r C a n v a s : ! 0 , b a c k g r o u n d C o l o r : " # f f f " , g r i d S i z e : 8 , d r a w O u t O f B o u n d : ! 1 , s h r i n k T o F i t : ! 1 , o r i g i n : n u l l , d r a w M a s k : ! 1 , m a s k C o l o r : " r g b a ( 2 5 5 , 0 , 0 , 0 . 3 ) " , m a s k G a p W i d t h : . 3 , l a y o u t A n i m a t i o n : ! 0 , w a i t : 0 , a b o r t T h r e s h o l d : 0 , a b o r t : f u n c t i o n ( ) { } , m i n R o t a t i o n : - M a t h . P I / 2 , m a x R o t a t i o n : M a t h . P I / 2 , r o t a t i o n S t e p : . 1 , s h u f f l e : ! 0 , r o t a t e R a t i o : . 1 , s h a p e : " c i r c l e " , e l l i p t i c i t y : . 6 5 , c l a s s e s : n u l l , h o v e r : n u l l , c l i c k : n u l l } ; i f ( t ) f o r ( v a r o i n t ) o i n i & & ( i [ o ] = t [ o ] ) ; i f ( t y p e o f i . w e i g h t F a c t o r ! = " f u n c t i o n " ) { v a r a = i . w e i g h t F a c t o r ; i . w e i g h t F a c t o r = f u n c t i o n ( o 1 ) { r e t u r n o 1 * a } } i f ( t y p e o f i . s h a p e ! = " f u n c t i o n " ) s w i t c h ( i . s h a p e ) { c a s e " c i r c l e " : d e f a u l t : i . s h a p e = " c i r c l e " ; b r e a k ; c a s e " c a r d i o i d " : i . s h a p e = f u n c t i o n ( o 1 ) { r e t u r n 1 - M a t h . s i n ( o 1 ) } ; b r e a k ; c a s e " d i a m o n d " : i . s h a p e = f u n c t i o n ( o 1 ) { v a r n 1 = o 1 % ( 2 * M a t h . P I / 4 ) ; r e t u r n 1 / ( M a t h . c o s ( n 1 ) + M a t h . s i n ( n 1 ) ) } ; b r e a k ; c a s e " s q u a r e " : i . s h a p e = f u n c t i o n ( o 1 ) { r e t u r n M a t h . m i n ( 1 / M a t h . a b s ( M a t h . c o s ( o 1 ) ) , 1 / M a t h . a b s ( M a t h . s i n ( o 1 ) ) ) } ; b r e a k ; c a s e " t r i a n g l e - f o r w a r d " : i . s h a p e = f u n c t i o n ( o 1 ) { v a r n 1 = o 1 % ( 2 * M a t h . P I / 3 ) ; r e t u r n 1 / ( M a t h . c o s ( n 1 ) + M a t h . s q r t ( 3 ) * M a t h . s i n ( n 1 ) ) } ; b r e a k ; c a s e " t r i a n g l e " : c a s e " t r i a n g l e - u p r i g h t " : i . s h a p e = f u n c t i o n ( o 1 ) { v a r n 1 = ( o 1 + M a t h . P I * 3 / 2 ) % ( 2 * M a t h . P I / 3 ) ; r e t u r n 1 / ( M a t h . c o s ( n 1 ) + M a t h . s q r t ( 3 ) * M a t h . s i n ( n 1 ) ) } ; b r e a k ; c a s e " p e n t a g o n " : i . s h a p e = f u n c t i o n ( o 1 ) { v a r n 1 = ( o 1 + . 9 5 5 ) % ( 2 * M a t h . P I / 5 ) ; r e t u r n 1 / ( M a t h . c o s ( n 1 ) + . 7 2 6 5 4 3 * M a t h . s i n ( n 1 ) ) } ; b r e a k ; c a s e " s t a r " : i . s h a p e = f u n c t i o n ( o 1 ) { v a r n 1 = ( o 1 + . 9 5 5 ) % ( 2 * M a t h . P I / 1 0 ) ; r e t u r n ( o 1 + . 9 5 5 ) % ( 2 * M a t h . P I / 5 ) - 2 * M a t h . P I / 1 0 > = 0 ? 1 / ( M a t h . c o s ( 2 * M a t h . P I / 1 0 - n 1 ) + 3 . 0 7 7 6 8 * M a t h . s i n ( 2 * M a t h . P I / 1 0 - n 1 ) ) : 1 / ( M a t h . c o s ( n 1 ) + 3 . 0 7 7 6 8 * M a t h . s i n ( n 1 ) ) } ; b r e a k } i . g r i d S i z e = M a t h . m a x ( M a t h . f l o o r ( i . g r i d S i z e ) , 4 ) ; v a r s = i . g r i d S i z e , c = s - i . m a s k G a p W i d t h , f = M a t h . a b s ( i . m a x R o t a t i o n - i . m i n R o t a t i o n ) , h = M a t h . m i n ( i . m a x R o t a t i o n , i . m i n R o t a t i o n ) , m = i . r o t a t i o n S t e p , g , v , S , _ , x , M , A ; f u n c t i o n D ( v 1 , o 1 ) { r e t u r n " h s l ( " + ( M a t h . r a n d o m ( ) * 3 6 0 ) . t o F i x e d ( ) + " , " + ( M a t h . r a n d o m ( ) * 3 0 + 7 0 ) . t o F i x e d ( ) + " % , " + ( M a t h . r a n d o m ( ) * ( o 1 - v 1 ) + v 1 ) . t o F i x e d ( ) + " % ) " } s w i t c h ( i . c o l o r ) { c a s e " r a n d o m - d a r k " : A = f u n c t i o n ( ) { r e t u r n D ( 1 0 , 5 0 ) } ; b r e a k ; c a s e " r a n d o m - l i g h t " : A = f u n c t i o n ( ) { r e t u r n D ( 5 0 , 9 0 ) } ; b r e a k ; d e f a u
height : $ { i . mergedConfig . headerHeight } px ;
line - height : $ { i . mergedConfig . headerHeight } px ;
width : $ { i . widths [ A ] } px ;
` ),align:i.aligns[A],innerHTML:M},null,12,pH))),128))],4)):I3("",!0),i.mergedConfig?(G(),h1("div",{key:1,class:"rows",style:Z2( ` height : $ { u ( n ) - ( i . header . length ? i . mergedConfig . headerHeight : 0 ) } px ; ` )},[(G(!0),h1(F1,null,g2(i.rows,(M,A)=>(G(),h1("div",{class:"row-item",key: ` $ { M . toString ( ) } $ { M . scroll } ` ,style:Z2( `
height : $ { i . heights [ A ] } px ;
line - height : $ { i . heights [ A ] } px ;
background - color : $ { i . mergedConfig [ M . rowIndex % 2 === 0 ? "evenRowBGC" : "oddRowBGC" ] } ;
2023-06-06 13:24:29 +08:00
` )},[(G(!0),h1(F1,null,g2(M.ceils,(D,T)=>(G(),h1("div",{class:"ceil",key: ` $ { D } $ { A } $ { T } ` ,style:Z2( ` width : $ { i . widths [ T ] } px ; ` ),align:i.aligns[T],innerHTML:D},null,12,mH))),128))],4))),128))],4)):I3("",!0)]))}});const _H=F2(gH,[["__scopeId","data-v-a6b4b361"]]),vH=Object.freeze(Object.defineProperty({__proto__:null,default:_H},Symbol.toStringTag,{value:"Module"})),yH=""+new URL("../png/bar_x.png",import.meta.url).href,bH=Object.freeze(Object.defineProperty({__proto__:null,default:yH},Symbol.toStringTag,{value:"Module"})),xH=""+new URL("../png/bar_y.png",import.meta.url).href,SH=Object.freeze(Object.defineProperty({__proto__:null,default:xH},Symbol.toStringTag,{value:"Module"})),MH=""+new URL("../png/capsule.png",import.meta.url).href,wH=Object.freeze(Object.defineProperty({__proto__:null,default:MH},Symbol.toStringTag,{value:"Module"})),AH=""+new URL("../png/dial.png",import.meta.url).href,CH=Object.freeze(Object.defineProperty({__proto__:null,default:AH},Symbol.toStringTag,{value:"Module"})),TH=""+new URL("../png/funnel.png",import.meta.url).href,EH=Object.freeze(Object.defineProperty({__proto__:null,default:TH},Symbol.toStringTag,{value:"Module"})),DH=""+new URL("../png/graph.png",import.meta.url).href,IH=Object.freeze(Object.defineProperty({__proto__:null,default:DH},Symbol.toStringTag,{value:"Module"})),RH=""+new URL("../png/heatmap.png",import.meta.url).href,OH=Object.freeze(Object.defineProperty({__proto__:null,default:RH},Symbol.toStringTag,{value:"Module"})),LH=""+new URL("../png/line.png",import.meta.url).href,PH=Object.freeze(Object.defineProperty({__proto__:null,default:LH},Symbol.toStringTag,{value:"Module"})),zH=""+new URL("../png/line_gradient.png",import.meta.url).href,kH=Object.freeze(Object.defineProperty({__proto__:null,default:zH},Symbol.toStringTag,{value:"Module"})),UH=""+new URL("../png/line_gradient_single.png",import.meta.url).href,NH=Object.freeze(Object.defineProperty({__proto__:null,default:UH},Symbol.toStringTag,{value:"Module"})),FH=""+new URL("../png/line_linear_single.png",import.meta.url).href,BH=Object.freeze(Object.defineProperty({__proto__:null,default:FH},Symbol.toStringTag,{value:"Module"})),GH=""+new URL("../png/map.png",import.meta.url).href,VH=Object.freeze(Object.defineProperty({__proto__:null,default:GH},Symbol.toStringTag,{value:"Module"})),WH=""+new URL("../png/map_amap.png",import.meta.url).href,jH=Object.freeze(Object.defineProperty({__proto__:null,default:WH},Symbol.toStringTag,{value:"Module"})),HH=""+new URL("../png/pie-circle.png",import.meta.url).href, $ H=Object.freeze(Object.defineProperty({__proto__:null,default:HH},Symbol.toStringTag,{value:"Module"})),YH=""+new URL("../png/pie.png",import.meta.url).href,JH=Object.freeze(Object.defineProperty({__proto__:null,default:YH},Symbol.toStringTag,{value:"Module"})),ZH=""+new URL("../png/process.png",import.meta.url).href,XH=Object.freeze(Object.defineProperty({__proto__:null,default:ZH},Symbol.toStringTag,{value:"Module"})),qH=""+new URL("../png/radar.png",import.meta.url).href,QH=Object.freeze(Object.defineProperty({__proto__:null,default:qH},Symbol.toStringTag,{value:"Module"})),KH=""+new URL("../png/sankey.png",import.meta.url).href,e $ =Object.freeze(Object.defineProperty({__proto__:null,default:KH},Symbol.toStringTag,{value:"Module"})),t $ =""+new URL("../png/scatter-logarithmic-regression.png",import.meta.url).href,n $ =Object.freeze(Object.defineProperty({__proto__:null,default:t $ },Symbol.toStringTag,{value:"Module"})),i $ =""+new URL("../png/scatter-multi.png",import.meta.url).href,r $ =Object.freeze(Object.defineProperty({__proto__:null,default:i $ },Symbol.toStringTag,{value:"Module"})),o $ =""+new URL("../png/scatter.png",import.meta.url).href,a $ =Object.freeze(Object.defineProperty({__proto__:null,default:o $ },Symbol.toStringTag,{value:"Module"})),s $ =""+new URL("../png/tree_map.png",import.meta.url).href,l $ =Object.freeze(Object.defineProperty({__proto__:null,default:s $ },Symbol.toStringTag,{value:"Module"})),u $ =""+new URL("../png/water_WaterPolo.png",import.meta.url).href,c $ =Object.freeze(Object.defineProperty({__proto__:null,d