From 9167010287a63fa6e8dd097bf73e7490c69e3f6b Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Thu, 11 Oct 2018 12:26:27 -0400 Subject: [PATCH] Updates --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 8c748c7..d2bf595 100644 --- a/app.js +++ b/app.js @@ -49,4 +49,4 @@ s.vertexColors===rl&&F.multiply(a.color),D.copy(R),j.copy(e.positionWorld).add(r },skin:{uniforms:Mu.merge([mp.fog,mp.lights,{passID:{value:0},tDiffuse:{value:null},tNormal:{value:null},tBlur1:{value:null},tBlur2:{value:null},tBlur3:{value:null},tBlur4:{value:null},tBeckmann:{value:null},uNormalScale:{value:1},diffuse:{value:new u(15658734)},specular:{value:new u(1118481)},opacity:{value:1},uRoughness:{value:.15},uSpecularBrightness:{value:.75}}]),fragmentShader:["uniform vec3 diffuse;","uniform vec3 specular;","uniform float opacity;","uniform float uRoughness;","uniform float uSpecularBrightness;","uniform int passID;","uniform sampler2D tDiffuse;","uniform sampler2D tNormal;","uniform sampler2D tBlur1;","uniform sampler2D tBlur2;","uniform sampler2D tBlur3;","uniform sampler2D tBlur4;","uniform sampler2D tBeckmann;","uniform float uNormalScale;","varying vec3 vNormal;","varying vec2 vUv;","varying vec3 vViewPosition;",fp.common,fp.lights_pars_begin,fp.fog_pars_fragment,"float fresnelReflectance( vec3 H, vec3 V, float F0 ) {","float base = 1.0 - dot( V, H );","float exponential = pow( base, 5.0 );","return exponential + F0 * ( 1.0 - exponential );","}","float KS_Skin_Specular( vec3 N,","vec3 L,","vec3 V,","float m,","float rho_s",") {","float result = 0.0;","float ndotl = dot( N, L );","if( ndotl > 0.0 ) {","vec3 h = L + V;","vec3 H = normalize( h );","float ndoth = dot( N, H );","float PH = pow( 2.0 * texture2D( tBeckmann, vec2( ndoth, m ) ).x, 10.0 );","float F = fresnelReflectance( H, V, 0.028 );","float frSpec = max( PH * F / dot( h, h ), 0.0 );","result = ndotl * rho_s * frSpec;","}","return result;","}","void main() {","vec3 outgoingLight = vec3( 0.0 );","vec4 diffuseColor = vec4( diffuse, opacity );","vec4 mSpecular = vec4( specular, opacity );","vec4 colDiffuse = texture2D( tDiffuse, vUv );","colDiffuse *= colDiffuse;","diffuseColor *= colDiffuse;","vec4 posAndU = vec4( -vViewPosition, vUv.x );","vec4 posAndU_dx = dFdx( posAndU ), posAndU_dy = dFdy( posAndU );","vec3 tangent = posAndU_dx.w * posAndU_dx.xyz + posAndU_dy.w * posAndU_dy.xyz;","vec3 normal = normalize( vNormal );","vec3 binormal = normalize( cross( tangent, normal ) );","tangent = cross( normal, binormal );","mat3 tsb = mat3( tangent, binormal, normal );","vec3 normalTex = texture2D( tNormal, vUv ).xyz * 2.0 - 1.0;","normalTex.xy *= uNormalScale;","normalTex = normalize( normalTex );","vec3 finalNormal = tsb * normalTex;","normal = normalize( finalNormal );","vec3 viewerDirection = normalize( vViewPosition );","vec3 totalDiffuseLight = vec3( 0.0 );","vec3 totalSpecularLight = vec3( 0.0 );","#if NUM_POINT_LIGHTS > 0","for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {","vec3 pointVector = normalize( pointLights[ i ].direction );","float attenuation = calcLightAttenuation( length( lVector ), pointLights[ i ].distance, pointLights[ i ].decay );","float pointDiffuseWeight = max( dot( normal, pointVector ), 0.0 );","totalDiffuseLight += pointLightColor[ i ] * ( pointDiffuseWeight * attenuation );","if ( passID == 1 ) {","float pointSpecularWeight = KS_Skin_Specular( normal, pointVector, viewerDirection, uRoughness, uSpecularBrightness );","totalSpecularLight += pointLightColor[ i ] * mSpecular.xyz * ( pointSpecularWeight * attenuation );","}","}","#endif","#if NUM_DIR_LIGHTS > 0","for( int i = 0; i < NUM_DIR_LIGHTS; i++ ) {","vec3 dirVector = directionalLights[ i ].direction;","float dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );","totalDiffuseLight += directionalLights[ i ].color * dirDiffuseWeight;","if ( passID == 1 ) {","float dirSpecularWeight = KS_Skin_Specular( normal, dirVector, viewerDirection, uRoughness, uSpecularBrightness );","totalSpecularLight += directionalLights[ i ].color * mSpecular.xyz * dirSpecularWeight;","}","}","#endif","outgoingLight += diffuseColor.rgb * ( totalDiffuseLight + totalSpecularLight );","if ( passID == 0 ) {","outgoingLight = sqrt( outgoingLight );","} else if ( passID == 1 ) {","#ifdef VERSION1","vec3 nonblurColor = sqrt(outgoingLight );","#else","vec3 nonblurColor = outgoingLight;","#endif","vec3 blur1Color = texture2D( tBlur1, vUv ).xyz;","vec3 blur2Color = texture2D( tBlur2, vUv ).xyz;","vec3 blur3Color = texture2D( tBlur3, vUv ).xyz;","vec3 blur4Color = texture2D( tBlur4, vUv ).xyz;","outgoingLight = vec3( vec3( 0.22, 0.437, 0.635 ) * nonblurColor + ","vec3( 0.101, 0.355, 0.365 ) * blur1Color + ","vec3( 0.119, 0.208, 0.0 ) * blur2Color + ","vec3( 0.114, 0.0, 0.0 ) * blur3Color + ","vec3( 0.444, 0.0, 0.0 ) * blur4Color );","outgoingLight *= sqrt( colDiffuse.xyz );","outgoingLight += ambientLightColor * diffuse * colDiffuse.xyz + totalSpecularLight;","#ifndef VERSION1","outgoingLight = sqrt( outgoingLight );","#endif","}","gl_FragColor = vec4( outgoingLight, diffuseColor.a );",fp.fog_fragment,"}"].join("\n"),vertexShader:["#ifdef VERTEX_TEXTURES","uniform sampler2D tDisplacement;","uniform float uDisplacementScale;","uniform float uDisplacementBias;","#endif","varying vec3 vNormal;","varying vec2 vUv;","varying vec3 vViewPosition;",fp.common,fp.fog_pars_vertex,"void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","vViewPosition = -mvPosition.xyz;","vNormal = normalize( normalMatrix * normal );","vUv = uv;","#ifdef VERTEX_TEXTURES","vec3 dv = texture2D( tDisplacement, uv ).xyz;","float df = uDisplacementScale * dv.x + uDisplacementBias;","vec4 displacedPosition = vec4( vNormal.xyz * df, 0.0 ) + mvPosition;","gl_Position = projectionMatrix * displacedPosition;","#else","gl_Position = projectionMatrix * mvPosition;","#endif",fp.fog_vertex,"}"].join("\n"),vertexShaderUV:["varying vec3 vNormal;","varying vec2 vUv;","varying vec3 vViewPosition;",fp.common,"void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","vViewPosition = -mvPosition.xyz;","vNormal = normalize( normalMatrix * normal );","vUv = uv;","gl_Position = vec4( uv.x * 2.0 - 1.0, uv.y * 2.0 - 1.0, 0.0, 1.0 );","}"].join("\n")},beckmann:{uniforms:{},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["varying vec2 vUv;","float PHBeckmann( float ndoth, float m ) {","float alpha = acos( ndoth );","float ta = tan( alpha );","float val = 1.0 / ( m * m * pow( ndoth, 4.0 ) ) * exp( -( ta * ta ) / ( m * m ) );","return val;","}","float KSTextureCompute( vec2 tex ) {","return 0.5 * pow( PHBeckmann( tex.x, tex.y ), 0.1 );","}","void main() {","float x = KSTextureCompute( vUv );","gl_FragColor = vec4( x, x, x, 1.0 );","}"].join("\n")}},Uy={terrain:{uniforms:Mu.merge([mp.fog,mp.lights,{enableDiffuse1:{value:0},enableDiffuse2:{value:0},enableSpecular:{value:0},enableReflection:{value:0},tDiffuse1:{value:null},tDiffuse2:{value:null},tDetail:{value:null},tNormal:{value:null},tSpecular:{value:null},tDisplacement:{value:null},uNormalScale:{value:1},uDisplacementBias:{value:0},uDisplacementScale:{value:1},diffuse:{value:new u(15658734)},specular:{value:new u(1118481)},shininess:{value:30},opacity:{value:1},uRepeatBase:{value:new f(1,1)},uRepeatOverlay:{value:new f(1,1)},uOffset:{value:new f(0,0)}}]),fragmentShader:["uniform vec3 diffuse;","uniform vec3 specular;","uniform float shininess;","uniform float opacity;","uniform bool enableDiffuse1;","uniform bool enableDiffuse2;","uniform bool enableSpecular;","uniform sampler2D tDiffuse1;","uniform sampler2D tDiffuse2;","uniform sampler2D tDetail;","uniform sampler2D tNormal;","uniform sampler2D tSpecular;","uniform sampler2D tDisplacement;","uniform float uNormalScale;","uniform vec2 uRepeatOverlay;","uniform vec2 uRepeatBase;","uniform vec2 uOffset;","varying vec3 vTangent;","varying vec3 vBinormal;","varying vec3 vNormal;","varying vec2 vUv;","varying vec3 vViewPosition;",fp.common,fp.bsdfs,fp.lights_pars_begin,fp.shadowmap_pars_fragment,fp.fog_pars_fragment,"float calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) {","if ( decayExponent > 0.0 ) {","return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );","}","return 1.0;","}","void main() {","vec3 outgoingLight = vec3( 0.0 );","vec4 diffuseColor = vec4( diffuse, opacity );","vec3 specularTex = vec3( 1.0 );","vec2 uvOverlay = uRepeatOverlay * vUv + uOffset;","vec2 uvBase = uRepeatBase * vUv;","vec3 normalTex = texture2D( tDetail, uvOverlay ).xyz * 2.0 - 1.0;","normalTex.xy *= uNormalScale;","normalTex = normalize( normalTex );","if( enableDiffuse1 && enableDiffuse2 ) {","vec4 colDiffuse1 = texture2D( tDiffuse1, uvOverlay );","vec4 colDiffuse2 = texture2D( tDiffuse2, uvOverlay );","colDiffuse1 = GammaToLinear( colDiffuse1, float( GAMMA_FACTOR ) );","colDiffuse2 = GammaToLinear( colDiffuse2, float( GAMMA_FACTOR ) );","diffuseColor *= mix ( colDiffuse1, colDiffuse2, 1.0 - texture2D( tDisplacement, uvBase ) );"," } else if( enableDiffuse1 ) {","diffuseColor *= texture2D( tDiffuse1, uvOverlay );","} else if( enableDiffuse2 ) {","diffuseColor *= texture2D( tDiffuse2, uvOverlay );","}","if( enableSpecular )","specularTex = texture2D( tSpecular, uvOverlay ).xyz;","mat3 tsb = mat3( vTangent, vBinormal, vNormal );","vec3 finalNormal = tsb * normalTex;","vec3 normal = normalize( finalNormal );","vec3 viewPosition = normalize( vViewPosition );","vec3 totalDiffuseLight = vec3( 0.0 );","vec3 totalSpecularLight = vec3( 0.0 );","#if NUM_POINT_LIGHTS > 0","for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {","vec3 lVector = pointLights[ i ].position + vViewPosition.xyz;","float attenuation = calcLightAttenuation( length( lVector ), pointLights[ i ].distance, pointLights[ i ].decay );","lVector = normalize( lVector );","vec3 pointHalfVector = normalize( lVector + viewPosition );","float pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );","float pointDiffuseWeight = max( dot( normal, lVector ), 0.0 );","float pointSpecularWeight = specularTex.r * max( pow( pointDotNormalHalf, shininess ), 0.0 );","totalDiffuseLight += attenuation * pointLights[ i ].color * pointDiffuseWeight;","totalSpecularLight += attenuation * pointLights[ i ].color * specular * pointSpecularWeight * pointDiffuseWeight;","}","#endif","#if NUM_DIR_LIGHTS > 0","vec3 dirDiffuse = vec3( 0.0 );","vec3 dirSpecular = vec3( 0.0 );","for( int i = 0; i < NUM_DIR_LIGHTS; i++ ) {","vec3 dirVector = directionalLights[ i ].direction;","vec3 dirHalfVector = normalize( dirVector + viewPosition );","float dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );","float dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );","float dirSpecularWeight = specularTex.r * max( pow( dirDotNormalHalf, shininess ), 0.0 );","totalDiffuseLight += directionalLights[ i ].color * dirDiffuseWeight;","totalSpecularLight += directionalLights[ i ].color * specular * dirSpecularWeight * dirDiffuseWeight;","}","#endif","#if NUM_HEMI_LIGHTS > 0","vec3 hemiDiffuse = vec3( 0.0 );","vec3 hemiSpecular = vec3( 0.0 );","for( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {","vec3 lVector = hemisphereLightDirection[ i ];","float dotProduct = dot( normal, lVector );","float hemiDiffuseWeight = 0.5 * dotProduct + 0.5;","totalDiffuseLight += mix( hemisphereLights[ i ].groundColor, hemisphereLights[ i ].skyColor, hemiDiffuseWeight );","float hemiSpecularWeight = 0.0;","vec3 hemiHalfVectorSky = normalize( lVector + viewPosition );","float hemiDotNormalHalfSky = 0.5 * dot( normal, hemiHalfVectorSky ) + 0.5;","hemiSpecularWeight += specularTex.r * max( pow( hemiDotNormalHalfSky, shininess ), 0.0 );","vec3 lVectorGround = -lVector;","vec3 hemiHalfVectorGround = normalize( lVectorGround + viewPosition );","float hemiDotNormalHalfGround = 0.5 * dot( normal, hemiHalfVectorGround ) + 0.5;","hemiSpecularWeight += specularTex.r * max( pow( hemiDotNormalHalfGround, shininess ), 0.0 );","totalSpecularLight += specular * mix( hemisphereLights[ i ].groundColor, hemisphereLights[ i ].skyColor, hemiDiffuseWeight ) * hemiSpecularWeight * hemiDiffuseWeight;","}","#endif","outgoingLight += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor + totalSpecularLight );","gl_FragColor = vec4( outgoingLight, diffuseColor.a );",fp.fog_fragment,"}"].join("\n"),vertexShader:["attribute vec4 tangent;","uniform vec2 uRepeatBase;","uniform sampler2D tNormal;","#ifdef VERTEX_TEXTURES","uniform sampler2D tDisplacement;","uniform float uDisplacementScale;","uniform float uDisplacementBias;","#endif","varying vec3 vTangent;","varying vec3 vBinormal;","varying vec3 vNormal;","varying vec2 vUv;","varying vec3 vViewPosition;",fp.shadowmap_pars_vertex,fp.fog_pars_vertex,"void main() {","vNormal = normalize( normalMatrix * normal );","vTangent = normalize( normalMatrix * tangent.xyz );","vBinormal = cross( vNormal, vTangent ) * tangent.w;","vBinormal = normalize( vBinormal );","vUv = uv;","vec2 uvBase = uv * uRepeatBase;","#ifdef VERTEX_TEXTURES","vec3 dv = texture2D( tDisplacement, uvBase ).xyz;","float df = uDisplacementScale * dv.x + uDisplacementBias;","vec3 displacedPosition = normal * df + position;","vec4 worldPosition = modelMatrix * vec4( displacedPosition, 1.0 );","vec4 mvPosition = modelViewMatrix * vec4( displacedPosition, 1.0 );","#else","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","#endif","gl_Position = projectionMatrix * mvPosition;","vViewPosition = -mvPosition.xyz;","vec3 normalTex = texture2D( tNormal, uvBase ).xyz * 2.0 - 1.0;","vNormal = normalMatrix * normalTex;",fp.shadowmap_vertex,fp.fog_vertex,"}"].join("\n")}},ky={toon1:{uniforms:{uDirLightPos:{value:new i},uDirLightColor:{value:new u(15658734)},uAmbientLightColor:{value:new u(328965)},uBaseColor:{value:new u(16777215)}},vertexShader:["varying vec3 vNormal;","varying vec3 vRefract;","void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","vec3 worldNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );","vNormal = normalize( normalMatrix * normal );","vec3 I = worldPosition.xyz - cameraPosition;","vRefract = refract( normalize( I ), worldNormal, 1.02 );","gl_Position = projectionMatrix * mvPosition;","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","varying vec3 vRefract;","void main() {","float directionalLightWeighting = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);","vec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;","float intensity = smoothstep( - 0.5, 1.0, pow( length(lightWeighting), 20.0 ) );","intensity += length(lightWeighting) * 0.2;","float cameraWeighting = dot( normalize( vNormal ), vRefract );","intensity += pow( 1.0 - length( cameraWeighting ), 6.0 );","intensity = intensity * 0.2 + 0.3;","if ( intensity < 0.50 ) {","gl_FragColor = vec4( 2.0 * intensity * uBaseColor, 1.0 );","} else {","gl_FragColor = vec4( 1.0 - 2.0 * ( 1.0 - intensity ) * ( 1.0 - uBaseColor ), 1.0 );","}","}"].join("\n")},toon2:{uniforms:{uDirLightPos:{value:new i},uDirLightColor:{value:new u(15658734)},uAmbientLightColor:{value:new u(328965)},uBaseColor:{value:new u(15658734)},uLineColor1:{value:new u(8421504)},uLineColor2:{value:new u(0)},uLineColor3:{value:new u(0)},uLineColor4:{value:new u(0)}},vertexShader:["varying vec3 vNormal;","void main() {","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","vNormal = normalize( normalMatrix * normal );","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uLineColor1;","uniform vec3 uLineColor2;","uniform vec3 uLineColor3;","uniform vec3 uLineColor4;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","void main() {","float camera = max( dot( normalize( vNormal ), vec3( 0.0, 0.0, 1.0 ) ), 0.4);","float light = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);","gl_FragColor = vec4( uBaseColor, 1.0 );","if ( length(uAmbientLightColor + uDirLightColor * light) < 1.00 ) {","gl_FragColor *= vec4( uLineColor1, 1.0 );","}","if ( length(uAmbientLightColor + uDirLightColor * camera) < 0.50 ) {","gl_FragColor *= vec4( uLineColor2, 1.0 );","}","}"].join("\n")},hatching:{uniforms:{uDirLightPos:{value:new i},uDirLightColor:{value:new u(15658734)},uAmbientLightColor:{value:new u(328965)},uBaseColor:{value:new u(16777215)},uLineColor1:{value:new u(0)},uLineColor2:{value:new u(0)},uLineColor3:{value:new u(0)},uLineColor4:{value:new u(0)}},vertexShader:["varying vec3 vNormal;","void main() {","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","vNormal = normalize( normalMatrix * normal );","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uLineColor1;","uniform vec3 uLineColor2;","uniform vec3 uLineColor3;","uniform vec3 uLineColor4;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","void main() {","float directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);","vec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;","gl_FragColor = vec4( uBaseColor, 1.0 );","if ( length(lightWeighting) < 1.00 ) {","if ( mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) {","gl_FragColor = vec4( uLineColor1, 1.0 );","}","}","if ( length(lightWeighting) < 0.75 ) {","if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) {","gl_FragColor = vec4( uLineColor2, 1.0 );","}","}","if ( length(lightWeighting) < 0.50 ) {","if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) {","gl_FragColor = vec4( uLineColor3, 1.0 );","}","}","if ( length(lightWeighting) < 0.3465 ) {","if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) {","gl_FragColor = vec4( uLineColor4, 1.0 );","}","}","}"].join("\n")},dotted:{uniforms:{uDirLightPos:{value:new i},uDirLightColor:{value:new u(15658734)},uAmbientLightColor:{value:new u(328965)},uBaseColor:{value:new u(16777215)},uLineColor1:{value:new u(0)}},vertexShader:["varying vec3 vNormal;","void main() {","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","vNormal = normalize( normalMatrix * normal );","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uLineColor1;","uniform vec3 uLineColor2;","uniform vec3 uLineColor3;","uniform vec3 uLineColor4;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","void main() {","float directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);","vec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;","gl_FragColor = vec4( uBaseColor, 1.0 );","if ( length(lightWeighting) < 1.00 ) {","if ( ( mod(gl_FragCoord.x, 4.001) + mod(gl_FragCoord.y, 4.0) ) > 6.00 ) {","gl_FragColor = vec4( uLineColor1, 1.0 );","}","}","if ( length(lightWeighting) < 0.50 ) {","if ( ( mod(gl_FragCoord.x + 2.0, 4.001) + mod(gl_FragCoord.y + 2.0, 4.0) ) > 6.00 ) {","gl_FragColor = vec4( uLineColor1, 1.0 );","}","}","}"].join("\n")}},By=function(){this.uniforms=Mu.merge([mp.common,mp.lights,{color:{value:new u(16777215)},diffuse:{value:new u(16777215)},specular:{value:new u(16777215)},emissive:{value:new u(0)},opacity:{value:1},shininess:{value:1},thicknessMap:{value:null},thicknessColor:{value:new u(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),this.fragmentShader=["#define USE_MAP","#define PHONG","#define TRANSLUCENT","#include ","#include ","#include ","#include ","#include ","varying vec3 vColor;","uniform vec3 diffuse;","uniform vec3 specular;","uniform vec3 emissive;","uniform float opacity;","uniform float shininess;","uniform sampler2D thicknessMap;","uniform float thicknessPower;","uniform float thicknessScale;","uniform float thicknessDistortion;","uniform float thicknessAmbient;","uniform float thicknessAttenuation;","uniform vec3 thicknessColor;",fp.lights_pars_begin,"void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {","\tvec3 thickness = thicknessColor * texture2D(thicknessMap, uv).r;","\tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));","\tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;","\tvec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;","\treflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;","}","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 viewerDirection = normalize( vViewPosition );","\tvec4 diffuseColor = vec4( diffuse, opacity );","\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );",fp.map_fragment,fp.color_fragment,fp.specularmap_fragment,"\tvec3 totalEmissiveRadiance = emissive;",fp.lights_phong_fragment,"\tGeometricContext geometry;","\tgeometry.position = - vViewPosition;","\tgeometry.normal = normal;","\tgeometry.viewDir = normalize( vViewPosition );","\tIncidentLight directLight;","\t#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )","\t\tPointLight pointLight;","\t\t#pragma unroll_loop","\t\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {","\t\t \tpointLight = pointLights[ i ];","\t\t \tgetPointDirectLightIrradiance( pointLight, geometry, directLight );","\t\t\t#ifdef USE_SHADOWMAP","\t\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;","\t\t\t#endif","\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );","\t\t\t#if defined( TRANSLUCENT ) && defined( USE_MAP )","\t\t\tRE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);","\t\t\t#endif","\t\t}","\t\t#endif","\t#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )","\t\tDirectionalLight directionalLight;","\t\t#pragma unroll_loop","\t\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {","\t\t\tdirectionalLight = directionalLights[ i ];","\t\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );","\t\t\t#ifdef USE_SHADOWMAP","\t\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;","\t\t\t#endif","\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );","\t\t\t#if defined( TRANSLUCENT ) && defined( USE_MAP )","\t\t\tRE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);","\t\t\t#endif","\t\t}","\t#endif","\t#if defined( RE_IndirectDiffuse )","\t\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );","\t\t#if ( NUM_HEMI_LIGHTS > 0 )","\t\t\t#pragma unroll_loop","\t\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {","\t\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );","\t\t\t}","\t\t#endif","\t#endif","\t#if defined( RE_IndirectSpecular )","\t\tvec3 radiance = vec3( 0.0 );","\t\tvec3 clearCoatRadiance = vec3( 0.0 );","\t#endif",fp.lights_fragment_end,"\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;","\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );",fp.encodings_fragment,"}"].join("\n"),this.vertexShader=["varying vec3 vNormal;","varying vec2 vUv;","varying vec3 vViewPosition;",fp.common,"void main() {","\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );","\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","\tvViewPosition = -mvPosition.xyz;","\tvNormal = normalize( normalMatrix * normal );","\tvUv = uv;","\tgl_Position = projectionMatrix * mvPosition;","}"].join("\n")},zy=function(e){var t=this;void 0==e&&(e=Math),this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.grad4=[[0,1,1,1],[0,1,1,-1],[0,1,-1,1],[0,1,-1,-1],[0,-1,1,1],[0,-1,1,-1],[0,-1,-1,1],[0,-1,-1,-1],[1,0,1,1],[1,0,1,-1],[1,0,-1,1],[1,0,-1,-1],[-1,0,1,1],[-1,0,1,-1],[-1,0,-1,1],[-1,0,-1,-1],[1,1,0,1],[1,1,0,-1],[1,-1,0,1],[1,-1,0,-1],[-1,1,0,1],[-1,1,0,-1],[-1,-1,0,1],[-1,-1,0,-1],[1,1,1,0],[1,1,-1,0],[1,-1,1,0],[1,-1,-1,0],[-1,1,1,0],[-1,1,-1,0],[-1,-1,1,0],[-1,-1,-1,0]],this.p=[];for(var r=0;r<256;r++)t.p[r]=Math.floor(256*e.random());this.perm=[];for(var r=0;r<512;r++)t.perm[r]=t.p[255&r];this.simplex=[[0,1,2,3],[0,1,3,2],[0,0,0,0],[0,2,3,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,3,0],[0,2,1,3],[0,0,0,0],[0,3,1,2],[0,3,2,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,3,2,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,0,3],[0,0,0,0],[1,3,0,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,3,0,1],[2,3,1,0],[1,0,2,3],[1,0,3,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,3,1],[0,0,0,0],[2,1,3,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,1,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,0,1,2],[3,0,2,1],[0,0,0,0],[3,1,2,0],[2,1,0,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,1,0,2],[0,0,0,0],[3,2,0,1],[3,2,1,0]]};zy.prototype.dot=function(e,t,r){return e[0]*t+e[1]*r},zy.prototype.dot3=function(e,t,r,i){return e[0]*t+e[1]*r+e[2]*i},zy.prototype.dot4=function(e,t,r,i,n){return e[0]*t+e[1]*r+e[2]*i+e[3]*n},zy.prototype.noise=function(e,t){var r,i,n,a,o,s=.5*(Math.sqrt(3)-1),l=(e+t)*s,c=Math.floor(e+l),u=Math.floor(t+l),h=(3-Math.sqrt(3))/6,d=(c+u)*h,p=c-d,f=u-d,m=e-p,v=t-f;m>v?(a=1,o=0):(a=0,o=1);var g=m-a+h,y=v-o+h,x=m-1+2*h,b=v-1+2*h,w=255&c,_=255&u,S=this.perm[w+this.perm[_]]%12,A=this.perm[w+a+this.perm[_+o]]%12,M=this.perm[w+1+this.perm[_+1]]%12,T=.5-m*m-v*v;T<0?r=0:(T*=T,r=T*T*this.dot(this.grad3[S],m,v));var E=.5-g*g-y*y;E<0?i=0:(E*=E,i=E*E*this.dot(this.grad3[A],g,y));var C=.5-x*x-b*b;return C<0?n=0:(C*=C,n=C*C*this.dot(this.grad3[M],x,b)),70*(r+i+n)},zy.prototype.noise3d=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,p=1/3,f=(e+t+r)*p,m=Math.floor(e+f),v=Math.floor(t+f),g=Math.floor(r+f),y=1/6,x=(m+v+g)*y,b=m-x,w=v-x,_=g-x,S=e-b,A=t-w,M=r-_;S>=A?A>=M?(s=1,l=0,c=0,u=1,h=1,d=0):S>=M?(s=1,l=0,c=0,u=1,h=0,d=1):(s=0,l=0,c=1,u=1,h=0,d=1):AU?32:0,j=I>k?16:0,V=U>k?8:0,G=I>B?4:0,W=U>B?2:0,X=k>B?1:0,H=z+j+V+G+W+X;c=_[H][0]>=3?1:0,u=_[H][1]>=3?1:0,h=_[H][2]>=3?1:0,d=_[H][3]>=3?1:0,p=_[H][0]>=2?1:0,f=_[H][1]>=2?1:0,m=_[H][2]>=2?1:0,v=_[H][3]>=2?1:0,g=_[H][0]>=1?1:0,y=_[H][1]>=1?1:0,x=_[H][2]>=1?1:0,b=_[H][3]>=1?1:0;var Y=I-c+M,q=U-u+M,Q=k-h+M,J=B-d+M,Z=I-p+2*M,K=U-f+2*M,$=k-m+2*M,ee=B-v+2*M,te=I-g+3*M,re=U-y+3*M,ie=k-x+3*M,ne=B-b+3*M,ae=I-1+4*M,oe=U-1+4*M,se=k-1+4*M,le=B-1+4*M,ce=255&E,ue=255&C,he=255&L,de=255&P,pe=S[ce+S[ue+S[he+S[de]]]]%32,fe=S[ce+c+S[ue+u+S[he+h+S[de+d]]]]%32,me=S[ce+p+S[ue+f+S[he+m+S[de+v]]]]%32,ve=S[ce+g+S[ue+y+S[he+x+S[de+b]]]]%32,ge=S[ce+1+S[ue+1+S[he+1+S[de+1]]]]%32,ye=.6-I*I-U*U-k*k-B*B;ye<0?n=0:(ye*=ye,n=ye*ye*this.dot4(w[pe],I,U,k,B));var xe=.6-Y*Y-q*q-Q*Q-J*J;xe<0?a=0:(xe*=xe,a=xe*xe*this.dot4(w[fe],Y,q,Q,J));var be=.6-Z*Z-K*K-$*$-ee*ee;be<0?o=0:(be*=be,o=be*be*this.dot4(w[me],Z,K,$,ee));var we=.6-te*te-re*re-ie*ie-ne*ne;we<0?s=0:(we*=we,s=we*we*this.dot4(w[ve],te,re,ie,ne));var _e=.6-ae*ae-oe*oe-se*se-le*le;return _e<0?l=0:(_e*=_e,l=_e*_e*this.dot4(w[ge],ae,oe,se,le)),27*(n+a+o+s+l)};var jy=function(e,t,r){this._scene=e,this._trackInfo=t,this._onUpdate=r,this._mixer=new ae(e),this._clip=null,this._action=null,this._tracks={},this._propRefs={},this._channelNames=[]};jy.prototype={constructor:jy,init:function(e){for(var t=this,r=[],i=this._trackInfo,n=0,a=i.length;n!==a;++n){var o=i[n];r.push(t._addTrack(o.type,o.propertyPath,o.initialValue,o.interpolation))}this._clip=new re("editclip",0,r),this._action=this._mixer.clipAction(this._clip).play()},setDisplayTime:function(e){this._action.time=e,this._mixer.update(0),this._onUpdate()},setDuration:function(e){this._clip.duration=e},getChannelNames:function(){return this._channelNames},getChannelKeyTimes:function(e){return this._tracks[e].times},setKeyframe:function(e,t){var r=this._tracks[e],i=r.times,n=Timeliner.binarySearch(i,t),a=r.values,o=r.getValueSize(),s=n*o;if(n<0){n=~n,s=n*o;for(var l=i.length+1,c=a.length+o,u=l-1;u!==n;--u)i[u]=i[u-1];for(var u=c-1,h=s+o-1;u!==h;--u)a[u]=a[u-o]}i[n]=t,this._propRefs[e].getValue(a,s)},delKeyframe:function(e,t){var r=this._tracks[e],i=r.times,n=Timeliner.binarySearch(i,t);if(i.length>1&&n>=0){for(var a=i.length-1,o=r.values,s=r.getValueSize(),l=o.length-s,c=n;c!==a;++c)i[c]=i[c+1];i.pop();for(var u=n*s;u!==l;++u)o[u]=o[u+s];o.length=l}},moveKeyframe:function(e,t,r,i){var n=this._tracks[e],a=n.times,o=Timeliner.binarySearch(a,t);if(o>=0){for(var s=i?a.length:o+1,l=a[o-1]<=t||!i&&t>=a[o+1];o!==s;)a[o++]+=r;l&&this._sort(n)}},serialize:function(){for(var e={duration:this._clip.duration,channels:{}},t=this._channelNames,r=this._tracks,i=e.channels,n=0,a=t.length;n!==a;++n){var o=t[n],s=r[o];i[o]={times:s.times,values:s.values}}return e},deserialize:function(e){var t=this,r=this._channelNames,i=this._tracks,n=e.channels;this.setDuration(e.duration);for(var a=0,o=r.length;a!==o;++a){var s=r[a],l=i[s],c=n[s];t._setArray(l.times,c.times),t._setArray(l.values,c.values)}this.setDisplayTime(this._mixer.time)},_sort:function(e){var t=e.times,r=wu.getKeyframeOrder(t);this._setArray(t,wu.sortedArray(t,1,r));var i=e.values,n=e.getValueSize();this._setArray(i,wu.sortedArray(i,n,r))},_setArray:function(e,t){e.length=0,e.push.apply(e,t)},_addTrack:function(e,t,r,i){var n=new e(t,[0],r,i);return n.times=Array.prototype.slice.call(n.times),n.values=Array.prototype.slice.call(n.values),this._channelNames.push(t),this._tracks[t]=n,this._propRefs[t]=new W(this._scene,t),n}};var Vy={};Vy.quicksortIP=function(e,t,r){for(var i,n,a=[],o=-1,s=0,l=e.length/t-1,c=0,u=0,h=0,d=function(r,i){for(r*=t,i*=t,h=0;h=s&&e[i*t+r]>p[r];){for(u=0;u>1;for(i=s+1,n=l,d(m,i),e[s*t+r]>e[l*t+r]&&d(s,l),e[i*t+r]>e[l*t+r]&&d(i,l),e[s*t+r]>e[i*t+r]&&d(s,i),u=0;uf[r]);if(n=n-s?(a[++o]=i,a[++o]=l,l=n-1):(a[++o]=s,a[++o]=n-1,s=i)}return e}, Vy.Kdtree=function(e,t,r){function i(e,t,s,l){var c,u,h=t%r,d=e.length/r;return t>a&&(a=t),0===d?null:1===d?new n.Node(o(e,0),t,s,l):(Vy.quicksortIP(e,r,h),c=Math.floor(d/2),u=new n.Node(o(e,c),t,s,c+l),u.left=i(e.subarray(0,c*r),t+1,u,l),u.right=i(e.subarray((c+1)*r,e.length),t+1,u,l+c+1),u)}var n=this,a=0,o=function(e,t){return e.subarray(t*r,t*r+r)};this.root=i(e,0,null,0),this.getMaxDepth=function(){return a},this.nearest=function(e,i,a){function o(n){function a(e,t){c.push([e,t]),c.size()>i&&c.pop()}var s,l,u,h=n.depth%r,d=t(e,n.obj),p=0,f=[];for(u=0;u0&&(this.content[0]=t,this.sinkDown(0)),e},peek:function(){return this.content[0]},remove:function(e){for(var t=this,r=this.content.length,i=0;i0;){var i=Math.floor((e+1)/2)-1,n=t.content[i];if(!(t.scoreFunction(r)1&&(o=1-o,s=1-s);var l=1-o-s;return a.copy(t),a.multiplyScalar(o),e.copy(r),e.multiplyScalar(s),a.add(e),e.copy(n),e.multiplyScalar(l),a.add(e),a}}(),randomPointInFace:function(e,t){var r,i,n;return r=t.vertices[e.a],i=t.vertices[e.b],n=t.vertices[e.c],Wy.randomPointInTriangle(r,i,n)},randomPointsInGeometry:function(e,t){function r(e){function t(r,i){if(ie?t(r,n-1):d[n]e?t(r,n-1):u[n].95&&h.fillText(r,n.x%1*c,(1-n.y)*u),h.font="8pt Arial bold",h.fillStyle="rgba( 0, 0, 0, 1.0 )",o=0,s=t.length;o.95&&h.fillText(i[o]+d,a.x%1*c,(1-a.y)*u)}}var i="abc",n=new f,a=new f,o=[new f,new f,new f],s=[],l=document.createElement("canvas"),c=t||1024,u=t||1024;l.width=c,l.height=u;var h=l.getContext("2d");if(h.lineWidth=2,h.strokeStyle="rgba( 0, 0, 0, 1.0 )",h.textAlign="center",h.fillStyle="rgba( 255, 255, 255, 1.0 )",h.fillRect(0,0,c,u),e.isGeometry)for(var d=e.faces,p=e.faceVertexUvs[0],m=0,v=p.length;m=e.colorMap.length?g%e.colorMap.length+1:g;var y=e.colorMap[g];l[4*f]=y>>24&255,l[4*f+1]=y>>16&255,l[4*f+2]=y>>8&255,l[4*f+3]=255&y,f++}else for(var m=0;m=x&&h<=x?b:0,x=Math.floor(255*(x-d)/(p-d)),x=x>255?255:x<0?0:0|x,l[4*f]=x,l[4*f+1]=x,l[4*f+2]=x,l[4*f+3]=b,f++}o.putImageData(s,0,0),this.ctx.drawImage(a,0,0,t,r,0,0,this.canvas.width,this.canvas.height),this.mesh.material.map.needsUpdate=!0},updateGeometry:function(){var e=this.volume.extractPerpendicularPlane(this.axis,this.index);this.sliceAccess=e.sliceAccess,this.jLength=e.jLength,this.iLength=e.iLength,this.matrix=e.matrix,this.canvas.width=e.planeWidth,this.canvas.height=e.planeHeight,this.canvasBuffer.width=this.iLength,this.canvasBuffer.height=this.jLength,this.ctx=this.canvas.getContext("2d"),this.ctxBuffer=this.canvasBuffer.getContext("2d"),this.geometry=new xe(e.planeWidth,e.planeHeight),this.mesh&&(this.mesh.geometry=this.geometry,this.mesh.matrix=(new r).identity(),this.mesh.applyMatrix(this.matrix)),this.geometryNeedsUpdate=!1}};var Zy=function(){function e(){for(var e=navigator.getGamepads&&navigator.getGamepads(),t=0;t<4;t++){var r=e[t];if(r&&"Daydream Controller"===r.id)return r}}c.call(this);var t,r=this,n=[0,0],a=!1,o=new i;this.matrixAutoUpdate=!1,this.getGamepad=function(){return t},this.getTouchpadState=function(){return a},this.update=function(){if(t=e(),void 0!==t&&void 0!==t.pose){var i=t.pose;if(null===i)return;null!==i.orientation&&r.quaternion.fromArray(i.orientation),r.updateMatrix(),r.visible=!0,null===i.angularVelocity||o.equals(i.angularVelocity)||(o.fromArray(i.angularVelocity),r.dispatchEvent({type:"angularvelocitychanged",angularVelocity:o})),n[0]===t.axes[0]&&n[1]===t.axes[1]||(n[0]=t.axes[0],n[1]=t.axes[1],r.dispatchEvent({type:"axischanged",axes:n})),a!==t.buttons[0].pressed&&(a=t.buttons[0].pressed,r.dispatchEvent({type:a?"touchpaddown":"touchpadup"}))}else r.visible=!1},this.getTouchPadState=function(){return console.warn("DaydreamController: getTouchPadState() is now getTouchpadState()"),a}};Zy.prototype=Object.create(c.prototype),Zy.prototype.constructor=Zy;var Ky=function(){function e(){for(var e=navigator.getGamepads&&navigator.getGamepads(),t=0;t<4;t++){var r=e[t];if(r&&("Gear VR Controller"===r.id||"Oculus Go Controller"===r.id))return r}}c.call(this);var t,r=this,n=[0,0],a=!1,o=!1,s=new i;this.matrixAutoUpdate=!0,this.getGamepad=function(){return t},this.getTouchpadState=function(){return a},this.update=function(){if(t=e(),void 0!==t&&void 0!==t.pose){var i=t.pose;if(null===i)return;null!==i.orientation&&r.quaternion.fromArray(i.orientation),r.updateMatrix(),r.visible=!0,null===i.angularVelocity||s.equals(i.angularVelocity)||(s.fromArray(i.angularVelocity),r.dispatchEvent({type:"angularvelocitychanged",angularVelocity:s})),n[0]===t.axes[0]&&n[1]===t.axes[1]||(n[0]=t.axes[0],n[1]=t.axes[1],r.dispatchEvent({type:"axischanged",axes:n})),a!==t.buttons[0].pressed&&(a=t.buttons[0].pressed,r.dispatchEvent({type:a?"touchpaddown":"touchpadup",axes:n})),o!==t.buttons[1].pressed&&(o=t.buttons[1].pressed,r.dispatchEvent({type:o?"triggerdown":"triggerup"}))}else r.visible=!1},this.getTouchPadState=function(){return console.warn("GearVRController: getTouchPadState() is now getTouchpadState()"),a},this.setHand=function(){console.warn("GearVRController: setHand() has been removed.")}};Ky.prototype=Object.create(c.prototype),Ky.prototype.constructor=Ky;var $y=function(e){function t(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),r=0,i=0;r0?r(e[0]):n()})["catch"](n),o}var s=document.createElement("a");return s.href="https://webvr.info",s.innerHTML="WEBVR NOT SUPPORTED",s.style.left="calc(50% - 90px)",s.style.width="180px",s.style.textDecoration="none",a(s),s},checkAvailability:function(){return console.warn("WEBVR.checkAvailability has been deprecated."),new Promise(function(){})},getMessageContainer:function(){return console.warn("WEBVR.getMessageContainer has been deprecated."),document.createElement("div")},getButton:function(){return console.warn("WEBVR.getButton has been deprecated."),document.createElement("div")},getVRDisplay:function(){console.warn("WEBVR.getVRDisplay has been deprecated.")}};Object.assign(Eo.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=arguments,t=this._objects,r=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,a=this._paths,o=this._parsedPaths,s=this._bindings,l=s.length,c=void 0,u=0,h=arguments.length;u!==h;++u){var d=e[u],p=d.uuid,f=n[p];if(void 0===f){f=r++,n[p]=f,t.push(d);for(var m=0,v=l;m!==v;++m)s[m].push(new W(d,a[m],o[m]))}else if(f=r){var h=r++,d=t[h];i[d.uuid]=u,t[u]=d,i[c]=h,t[h]=l;for(var p=0,f=a;p!==f;++p){var m=n[p],v=m[h],g=m[u];m[u]=v,m[h]=g}}}this.nCachedObjects_=r},uncache:function(){for(var e=arguments,t=this._objects,r=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,a=this._bindings,o=a.length,s=0,l=arguments.length;s!==l;++s){var c=e[s],u=c.uuid,h=n[u];if(void 0!==h)if(delete n[u],h0){this.source.connect(this.filters[0]);for(var t=1,r=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(var t=1,r=this.filters.length;t.99999?this.quaternion.set(0,0,0,1):r.y<-.99999?this.quaternion.set(1,0,0,0):(t.set(r.z,0,-r.x).normalize(),e=Math.acos(r.y),this.quaternion.setFromAxisAngle(t,e))}}(),as.prototype.setLength=function(e,t,r){void 0===t&&(t=.2*e),void 0===r&&(r=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(r,t,r),this.cone.position.y=e,this.cone.updateMatrix()},as.prototype.setColor=function(e){this.line.material.color.copy(e),this.cone.material.color.copy(e)},os.prototype=Object.create(Yt.prototype),os.prototype.constructor=os,ss.prototype=Object.create(Yt.prototype),ss.prototype.constructor=ss,ss.prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),c.prototype.updateMatrixWorld.call(this,e))},ls.prototype=Object.create(Yt.prototype),ls.prototype.constructor=ls,ls.prototype.update=function(){function e(e,i,o,s){n.set(i,o,s).unproject(a);var l=r[e];if(void 0!==l)for(var c=t.getAttribute("position"),u=0,h=l.length;u1){e.setFromMatrixPosition(r.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var n=e.distanceTo(t);i[0].object.visible=!0;for(var a=1,o=i.length;a=i[a].distance;a++)i[a-1].object.visible=!1,i[a].object.visible=!0;for(;a0){var a=new be(t),o=new Ie(a);o.setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;s0?new Rt(s,l):new k(s,l);break;case"LOD":a=new Ts;break;case"Line":a=new B(i(e.geometry),n(e.material),e.mode);break;case"LineLoop":a=new Jt(i(e.geometry),n(e.material));break;case"LineSegments":a=new Yt(i(e.geometry),n(e.material));break;case"PointCloud":case"Points":a=new Et(i(e.geometry),n(e.material));break;case"Sprite":a=new vi(n(e.material));break;case"Group":a=new Dt;break;default:a=new c}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,d=0;d=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),e.CCDIKSolver=xu,e.MMDAnimationHelper=Su,e.MMDPhysics=_u,e.AnimationClipCreator=Au,e.CinematicCamera=Nu,e.Car=Uu,e.DeviceOrientationControls=ku,e.DragControls=Bu,e.EditorControls=zu,e.FirstPersonControls=ju,e.FlyControls=Vu,e.MapControls=Gu,e.OrbitControls=Wu,e.OrthographicTrackballControls=Xu,e.PointerLockControls=Hu,e.TrackballControls=Yu,e.TransformControls=qu,e.TransformControlsGizmo=Qu,e.TransformControlsPlane=Ju,e.ConvexObjectBreaker=$u,e.GrannyKnot=ot,e.HeartCurve=st,e.VivianiCurve=lt,e.KnotCurve=ct,e.HelixCurve=ut,e.TrefoilKnot=ht,e.TorusKnot=dt,e.CinquefoilKnot=pt,e.TrefoilPolynomialKnot=ft,e.FigureEightPolynomialKnot=mt,e.DecoratedTorusKnot4a=vt,e.DecoratedTorusKnot4b=gt,e.DecoratedTorusKnot5a=yt,e.DecoratedTorusKnot5c=xt,e.NURBSCurve=rh,e.NURBSSurface=ih,e.NURBSUtils=th,e.Detector=nh,e.AnaglyphEffect=ah,e.AsciiEffect=oh,e.OutlineEffect=gp,e.ParallaxBarrierEffect=yp,e.PeppersGhostEffect=xp,e.StereoEffect=bp,e.ColladaExporter=wp,e.GLTFExporter=Mp,e.MMDExporter=Tp,e.OBJExporter=Ep,e.PLYExporter=Cp,e.STLExporter=Lp,e.TypedGeometryExporter=Pp,e.ConvexGeometry=it,e.ConvexBufferGeometry=nt,e.DecalGeometry=wt,e.hilbert2D=St,e.hilbert3D=At,e.TeapotBufferGeometry=Np,e.GPUComputationRenderer=Tt,e.GPUParticleSystem=Op,e.GPUParticleContainer=Dp,e.Gyroscope=Fp,e.ImprovedNoise=Rp,e.Line2=zp,e.LineGeometry=Bp,e.LineMaterial=Up,e.LineSegments2=kp,e.LineSegmentsGeometry=Ip,e.Wireframe=jp,e.WireframeGeometry2=Vp,e.ThreeMFLoader=Gp,e.AMFLoader=Wp,e.AssimpJSONLoader=Xp,e.AssimpLoader=Hp,e.AWDLoader=yf,e.BabylonLoader=xf,e.BinaryLoader=Iu,e.BVHLoader=bf,e.ColladaLoader=_f,e.DDSLoader=Sf,e.LegacyGLTFLoader=Af,e.DRACOLoader=Mf,e.EquirectangularToCubeGenerator=Tf,e.EXRLoader=Ef,e.FBXLoader=Cf,e.GCodeLoader=Lf,e.GLTFLoader=Nf,e.HDRCubeTextureLoader=Ff,e.KMZLoader=Rf,e.KTXLoader=If,e.LoaderSupport=kf,e.MD2Loader=Bf,e.MMDLoader=zf,e.MTLLoader=jf,e.NodeMaterialLoader=Yf,e.OBJLoader=qf,e.OBJLoader2=Qf,e.PCDLoader=Jf,e.PDBLoader=Zf,e.PlayCanvasLoader=Kf,e.PLYLoader=$f,e.PRWMLoader=im,e.PVRLoader=nm,e.HDRLoader=Df,e.RGBELoader=Of,e.STLLoader=am,e.SVGLoader=pm,e.TDSLoader=fm,e.TGALoader=wf,e.TTFLoader=Km,e.VRMLLoader=$m,e.VRMLoader=ev,e.VTKLoader=tv,e.MarchingCubes=rv,e.ColorConverter=av,e.Lut=sv,e.MD2Character=cv,e.MD2CharacterComplex=hv,e.ExplodeModifier=dv,e.SimplifyModifier=pv,e.SubdivisionModifier=fv,e.TessellateModifier=mv,e.MorphAnimMesh=vv,e.MorphBlendMesh=uv,e.CameraNode=cr,e.ColorsNode=gi,e.LightNode=yi,e.NormalNode=nr,e.PositionNode=ir,e.ReflectNode=xi,e.ResolutionNode=Ii,e.ScreenUVNode=Ui,e.UVNode=rr,e.BlinnExponentToRoughnessNode=Ci,e.BlinnShininessExponentNode=Ei,e.RoughnessToBlinnExponentNode=Bi,e.AttributeNode=zi,e.ConstNode=lr,e.ExpressionNode=ji,e.FunctionCallNode=Vi,e.FunctionNode=Vf,e.InputNode=ar,e.Node=er,e.NodeBuilder=Ni,e.NodeFrame=Gi,e.NodeLib=Gf,e.NodeUniform=bi,e.NodeUtils=xv,e.StructNode=wi,e.TempNode=tr,e.VarNode=Wi,e.BlurNode=Xi,e.ColorAdjustmentNode=Yi,e.LuminanceNode=Hi,e.ColorNode=Oi,e.CubeTextureNode=Ti,e.FloatNode=or,e.IntNode=qi,e.Matrix3Node=Qi,e.Matrix4Node=Ji,e.PropertyNode=Zi,e.ReflectorNode=$i,e.RTTNode=en,e.ScreenNode=tn,e.TextureNode=Mi,e.Vector2Node=Ri,e.Vector3Node=_i,e.Vector4Node=Si,e.MeshStandardNodeMaterial=sn,e.NodeMaterial=Fi,e.MeshStandardNode=on,e.PhongNode=ln,e.RawNode=Di,e.SpriteNode=cn,e.StandardNode=rn,e.PhongNodeMaterial=un,e.SpriteNodeMaterial=hn,e.StandardNodeMaterial=dn,e.CondNode=pn,e.Math1Node=fn,e.Math2Node=mn,e.Math3Node=vn,e.OperatorNode=Ki,e.BumpMapNode=gn,e.NormalMapNode=an,e.TextureCubeNode=Pi,e.TextureCubeUVNode=Li,e.NodePass=yn,e.NodePostProcessing=xn, -e.CheckerNode=bn,e.NoiseNode=wn,e.BypassNode=_n,e.ColorSpaceNode=Ai,e.JoinNode=Sn,e.MaxMIPLevelNode=ki,e.SwitchNode=nn,e.TimerNode=sr,e.UVTransformNode=An,e.VelocityNode=Mn,e.Lensflare=Lv,e.LensflareElement=Pv,e.Reflector=Nv,e.ReflectorRTT=Ov,e.Refractor=Dv,e.ShadowMesh=Fv,e.Sky=Rv,e.Water=Iv,e.Water2=Cn,e.Ocean=Uv,e.Octree=kv,e.OctreeObjectData=Bv,e.OctreeNode=zv,e.PMREMCubeUVPacker=jv,e.PMREMGenerator=Vv,e.AdaptiveToneMappingPass=Hv,e.AfterimagePass=qv,e.BloomPass=Jv,e.BokehPass=Zv,e.ClearPass=Kv,e.CubeTexturePass=$v,e.DotScreenPass=tg,e.EffectComposer=ng,e.FilmPass=og,e.GlitchPass=lg,e.HalftonePass=ug,e.MaskPass=rg,e.ClearMaskPass=ig,e.OutlinePass=hg,e.Pass=Tv,e.RenderPass=dg,e.SAOPass=gg,e.SavePass=yg,e.ShaderPass=Ev,e.SMAAPass=bg,e.SSAARenderPass=wg,e.SSAOPass=Sg,e.TAARenderPass=Ag,e.TexturePass=Mg,e.UnrealBloomPass=Eg,e.PRNG=Cg,e.QuickHull=Ke,e.SpriteCanvasMaterial=Rg,e.CanvasRenderer=Ig,e.CSS2DObject=Ug,e.CSS2DRenderer=kg,e.CSS3DObject=Bg,e.CSS3DSprite=zg,e.CSS3DRenderer=jg,e.RenderableObject=Lg,e.RenderableFace=Pg,e.RenderableVertex=Ng,e.RenderableLine=Og,e.RenderableSprite=Dg,e.Projector=Fg,e.RaytracingRenderer=Vg,e.SoftwareRenderer=Gg,e.SVGObject=Wg,e.SVGRenderer=Xg,e.WebGLDeferredRenderer=iy,e.RollerCoasterGeometry=po,e.RollerCoasterLiftersGeometry=fo,e.RollerCoasterShadowGeometry=mo,e.SkyGeometry=vo,e.TreesGeometry=go,e.ShaderGodRays=sy,e.AfterimageShader=Yv,e.BasicShader=ly,e.BleachBypassShader=cy,e.BlendShader=uy,e.BokehShader=Cu,e.BokehShader2=Lu,e.BokehDepthShader=Pu,e.BrightnessContrastShader=hy,e.ColorCorrectionShader=dy,e.ColorifyShader=py,e.ConvolutionShader=Qv,e.CopyShader=Gv,e.DepthLimitedBlurShader=fg,e.BlurShaderUtils=mg,e.DigitalGlitch=sg,e.DOFMipMapShader=fy,e.DotScreenShader=eg,e.FilmShader=ag,e.FocusShader=my,e.FreiChenShader=vy,e.FresnelShader=gy,e.FXAAShader=ry,e.GammaCorrectionShader=yy,e.HalftoneShader=cg,e.HorizontalBlurShader=xy,e.HorizontalTiltShiftShader=by,e.HueSaturationShader=wy,e.KaleidoShader=_y,e.LuminosityHighPassShader=Tg,e.LuminosityShader=Wv,e.MirrorShader=Sy,e.NormalMapShader=Ay,e.ParallaxShader=My,e.PixelShader=Ty,e.RGBShiftShader=Ey,e.SAOShader=pg,e.SepiaShader=Cy,e.SMAAShader=xg,e.SobelOperatorShader=Ly,e.SSAOShader=_g,e.TechnicolorShader=Py,e.ToneMapShader=Xv,e.TriangleBlurShader=Ny,e.UnpackDepthRGBAShader=vg,e.VerticalBlurShader=Oy,e.VerticalTiltShiftShader=Dy,e.VignetteShader=Fy,e.WaterRefractionShader=Ry,e.ShaderSkin=Iy,e.ShaderTerrain=Uy,e.ShaderToon=ky,e.TranslucentShader=By,e.SimplexNoise=zy,e.TimelinerController=jy,e.TypedArrayUtils=Vy,e.UCSCharacter=Gy,e.BufferGeometryUtils=Pf,e.GeometryUtils=Wy,e.MathUtils=Xy,e.SceneUtils=Hy,e.ShadowMapViewer=Yy,e.SkeletonUtils=qy,e.UVsDebug=Qy,e.VolumeSlice=Jy,e.DaydreamController=Zy,e.GearVRController=Ky,e.PaintViveController=ex,e.ViveController=$y,e.WebVR=tx,e.AnimationAction=z,e.AnimationClip=re,e.AnimationMixer=ae,e.AnimationObjectGroup=Eo,e.AnimationUtils=wu,e.KeyframeTrack=q,e.PropertyBinding=W,e.PropertyMixer=X,e.BooleanKeyframeTrack=Q,e.ColorKeyframeTrack=J,e.NumberKeyframeTrack=Z,e.QuaternionKeyframeTrack=$,e.StringKeyframeTrack=ee,e.VectorKeyframeTrack=te,e.Audio=Co,e.AudioAnalyser=Lo,e.AudioContext=ix,e.AudioListener=Po,e.PositionalAudio=No,e.ArrayCamera=so,e.Camera=he,e.CubeCamera=Oo,e.OrthographicCamera=me,e.PerspectiveCamera=de,e.StereoCamera=bt,e.REVISION=Bs,e.MOUSE=zs,e.CullFaceNone=js,e.CullFaceBack=Vs,e.CullFaceFront=Gs,e.CullFaceFrontBack=Ws,e.FrontFaceDirectionCW=Xs,e.FrontFaceDirectionCCW=Hs,e.BasicShadowMap=Ys,e.PCFShadowMap=qs,e.PCFSoftShadowMap=Qs,e.FrontSide=Js,e.BackSide=Zs,e.DoubleSide=Ks,e.FlatShading=$s,e.SmoothShading=el,e.NoColors=tl,e.FaceColors=rl,e.VertexColors=il,e.NoBlending=nl,e.NormalBlending=al,e.AdditiveBlending=ol,e.SubtractiveBlending=sl,e.MultiplyBlending=ll,e.CustomBlending=cl,e.AddEquation=ul,e.SubtractEquation=hl,e.ReverseSubtractEquation=dl,e.MinEquation=pl,e.MaxEquation=fl,e.ZeroFactor=ml,e.OneFactor=vl,e.SrcColorFactor=gl,e.OneMinusSrcColorFactor=yl,e.SrcAlphaFactor=xl,e.OneMinusSrcAlphaFactor=bl,e.DstAlphaFactor=wl,e.OneMinusDstAlphaFactor=_l,e.DstColorFactor=Sl,e.OneMinusDstColorFactor=Al,e.SrcAlphaSaturateFactor=Ml,e.NeverDepth=Tl,e.AlwaysDepth=El,e.LessDepth=Cl,e.LessEqualDepth=Ll,e.EqualDepth=Pl,e.GreaterEqualDepth=Nl,e.GreaterDepth=Ol,e.NotEqualDepth=Dl,e.MultiplyOperation=Fl,e.MixOperation=Rl,e.AddOperation=Il,e.NoToneMapping=Ul,e.LinearToneMapping=kl,e.ReinhardToneMapping=Bl,e.Uncharted2ToneMapping=zl,e.CineonToneMapping=jl,e.UVMapping=Vl,e.CubeReflectionMapping=Gl,e.CubeRefractionMapping=Wl,e.EquirectangularReflectionMapping=Xl,e.EquirectangularRefractionMapping=Hl,e.SphericalReflectionMapping=Yl,e.CubeUVReflectionMapping=ql,e.CubeUVRefractionMapping=Ql,e.RepeatWrapping=Jl,e.ClampToEdgeWrapping=Zl,e.MirroredRepeatWrapping=Kl,e.NearestFilter=$l,e.NearestMipMapNearestFilter=ec,e.NearestMipMapLinearFilter=tc,e.LinearFilter=rc,e.LinearMipMapNearestFilter=ic,e.LinearMipMapLinearFilter=nc,e.UnsignedByteType=ac,e.ByteType=oc,e.ShortType=sc,e.UnsignedShortType=lc,e.IntType=cc,e.UnsignedIntType=uc,e.FloatType=hc,e.HalfFloatType=dc,e.UnsignedShort4444Type=pc,e.UnsignedShort5551Type=fc,e.UnsignedShort565Type=mc,e.UnsignedInt248Type=vc,e.AlphaFormat=gc,e.RGBFormat=yc,e.RGBAFormat=xc,e.LuminanceFormat=bc,e.LuminanceAlphaFormat=wc,e.RGBEFormat=_c,e.DepthFormat=Sc,e.DepthStencilFormat=Ac,e.RGB_S3TC_DXT1_Format=Mc,e.RGBA_S3TC_DXT1_Format=Tc,e.RGBA_S3TC_DXT3_Format=Ec,e.RGBA_S3TC_DXT5_Format=Cc,e.RGB_PVRTC_4BPPV1_Format=Lc,e.RGB_PVRTC_2BPPV1_Format=Pc,e.RGBA_PVRTC_4BPPV1_Format=Nc,e.RGBA_PVRTC_2BPPV1_Format=Oc,e.RGB_ETC1_Format=Dc,e.RGBA_ASTC_4x4_Format=Fc,e.RGBA_ASTC_5x4_Format=Rc,e.RGBA_ASTC_5x5_Format=Ic,e.RGBA_ASTC_6x5_Format=Uc,e.RGBA_ASTC_6x6_Format=kc,e.RGBA_ASTC_8x5_Format=Bc,e.RGBA_ASTC_8x6_Format=zc,e.RGBA_ASTC_8x8_Format=jc,e.RGBA_ASTC_10x5_Format=Vc,e.RGBA_ASTC_10x6_Format=Gc,e.RGBA_ASTC_10x8_Format=Wc,e.RGBA_ASTC_10x10_Format=Xc,e.RGBA_ASTC_12x10_Format=Hc,e.RGBA_ASTC_12x12_Format=Yc,e.LoopOnce=qc,e.LoopRepeat=Qc,e.LoopPingPong=Jc,e.InterpolateDiscrete=Zc,e.InterpolateLinear=Kc,e.InterpolateSmooth=$c,e.ZeroCurvatureEnding=eu,e.ZeroSlopeEnding=tu,e.WrapAroundEnding=ru,e.TrianglesDrawMode=iu,e.TriangleStripDrawMode=nu,e.TriangleFanDrawMode=au,e.LinearEncoding=ou,e.sRGBEncoding=su,e.GammaEncoding=lu,e.RGBEEncoding=cu,e.LogLuvEncoding=uu,e.RGBM7Encoding=hu,e.RGBM16Encoding=du,e.RGBDEncoding=pu,e.BasicDepthPacking=fu,e.RGBADepthPacking=mu,e.TangentSpaceNormalMap=vu,e.ObjectSpaceNormalMap=gu,e.Float64BufferAttribute=T,e.Float32BufferAttribute=M,e.Uint32BufferAttribute=A,e.Int32BufferAttribute=S,e.Uint16BufferAttribute=_,e.Int16BufferAttribute=w,e.Uint8ClampedBufferAttribute=b,e.Uint8BufferAttribute=x,e.Int8BufferAttribute=y,e.BufferAttribute=g,e.BufferGeometry=P,e.Clock=En,e.DirectGeometry=E,e.EventDispatcher=a,e.Face3=h,e.Geometry=m,e.InstancedBufferAttribute=Do,e.InstancedBufferGeometry=Ct,e.InstancedInterleavedBuffer=Pt,e.InterleavedBuffer=Lt,e.InterleavedBufferAttribute=Nt,e.Layers=s,e.Object3D=c,e.Raycaster=je,e.Uniform=ho,e.Curve=at,e.CurvePath=Fr,e.Font=Fo,e.CatmullRom=gr,e.QuadraticBezier=wr,e.CubicBezier=Tr,e.Path=Rr,e.Shape=Ir,e.ShapePath=pi,e.ArcCurve=fr,e.CatmullRomCurve3=vr,e.CubicBezierCurve=Er,e.CubicBezierCurve3=Cr,e.EllipseCurve=pr,e.LineCurve=Lr,e.LineCurve3=Pr,e.QuadraticBezierCurve=Nr,e.QuadraticBezierCurve3=Or,e.SplineCurve=Dr,e.Earcut=hm,e.ImageUtils=Tu,e.ImmediateRenderObject=fi,e.ShapeUtils=dm,e.BoxGeometry=se,e.BoxBufferGeometry=le,e.CircleGeometry=bo,e.CircleBufferGeometry=wo,e.ConeGeometry=Uo,e.ConeBufferGeometry=ko,e.CylinderGeometry=ce,e.CylinderBufferGeometry=ue,e.DodecahedronGeometry=Bo,e.DodecahedronBufferGeometry=zo,e.EdgesGeometry=jo,e.ExtrudeGeometry=Vo,e.ExtrudeBufferGeometry=Go,e.IcosahedronGeometry=_o,e.IcosahedronBufferGeometry=So,e.LatheGeometry=Xo,e.LatheBufferGeometry=Ho,e.OctahedronGeometry=Ye,e.OctahedronBufferGeometry=qe,e.ParametricGeometry=Yo,e.ParametricBufferGeometry=qo,e.PlaneGeometry=ye,e.PlaneBufferGeometry=xe,e.PolyhedronGeometry=Xe,e.PolyhedronBufferGeometry=He,e.RingGeometry=Qo,e.RingBufferGeometry=Jo,e.ShapeGeometry=Ao,e.ShapeBufferGeometry=Mo,e.SphereGeometry=N,e.SphereBufferGeometry=O,e.TetrahedronGeometry=Zo,e.TetrahedronBufferGeometry=Ko,e.TextGeometry=$o,e.TextBufferGeometry=es,e.TorusGeometry=Qe,e.TorusBufferGeometry=Je,e.TorusKnotGeometry=ts,e.TorusKnotBufferGeometry=rs,e.TubeGeometry=is,e.TubeBufferGeometry=ns,e.WireframeGeometry=Ot,e.ArrowHelper=as,e.AxesHelper=os,e.Box3Helper=ss,e.BoxHelper=Ln,e.CameraHelper=ls,e.DirectionalLightHelper=cs,e.FaceNormalsHelper=us,e.GridHelper=hs,e.HemisphereLightHelper=ds,e.PlaneHelper=ps,e.PointLightHelper=fs,e.PolarGridHelper=ms,e.RectAreaLightHelper=vs,e.SkeletonHelper=xo,e.SpotLightHelper=gs,e.VertexNormalsHelper=ys,e.AmbientLight=Ht,e.DirectionalLight=Vt,e.DirectionalLightShadow=jt,e.HemisphereLight=Xt,e.Light=kt,e.LightShadow=Bt,e.PointLight=zt,e.RectAreaLight=xs,e.SpotLight=Wt,e.SpotLightShadow=Gt,e.AnimationLoader=bs,e.AudioLoader=ws,e.BufferGeometryLoader=_s,e.Cache=Ou,e.CompressedTextureLoader=Qt,e.CubeTextureLoader=Ss,e.DataTextureLoader=Kt,e.FileLoader=we,e.FontLoader=As,e.ImageBitmapLoader=Ms,e.ImageLoader=Ie,e.JSONLoader=Be,e.Loader=ke,e.LoaderUtils=Ru,e.DefaultLoadingManager=Du,e.LoadingManager=be,e.MaterialLoader=Re,e.ObjectLoader=Ls,e.TextureLoader=Ue,e.LineBasicMaterial=R,e.LineDashedMaterial=_e,e.Material=D,e.MeshBasicMaterial=F,e.MeshDepthMaterial=Se,e.MeshDistanceMaterial=Ae,e.MeshLambertMaterial=Me,e.MeshNormalMaterial=Te,e.MeshPhongMaterial=Ee,e.MeshPhysicalMaterial=Le,e.MeshStandardMaterial=Ce,e.MeshToonMaterial=Pe,e.PointsMaterial=Ne,e.RawShaderMaterial=Oe,e.ShaderMaterial=pe,e.ShadowMaterial=De,e.SpriteMaterial=Fe,e.Box2=Tn,e.Box3=d,e.Color=u,e.Cylindrical=Ps,e.Euler=o,e.Frustum=In,e.Interpolant=j,e.CubicInterpolant=H,e.DiscreteInterpolant=Y,e.LinearInterpolant=V,e.QuaternionLinearInterpolant=K,e.Line3=Ze,e._Math=Fs,e.Matrix3=l,e.Matrix4=r,e.Plane=ze,e.Quaternion=n,e.Ray=I,e.Sphere=p,e.Spherical=We,e.Triangle=U,e.Vector2=f,e.Vector3=i,e.Vector4=v,e.Bone=oe,e.Group=Dt,e.Line=B,e.LineLoop=Jt,e.LineSegments=Yt,e.LOD=Ts,e.Mesh=k,e.Points=Et,e.Skeleton=Ft,e.SkinnedMesh=Rt,e.Sprite=vi,e.ShaderChunk=fp,e.ShaderLib=vp,e.UniformsLib=mp,e.UniformsUtils=Mu,e.WebGLAnimation=Un,e.WebGLAttributes=kn,e.WebGLBackground=Bn,e.WebGLBufferRenderer=zn,e.WebGLCapabilities=jn,e.WebGLClipping=Vn,e.WebGLExtensions=Gn,e.WebGLGeometries=Wn,e.WebGLIndexedBufferRenderer=Xn,e.WebGLInfo=Hn,e.WebGLLights=eo,e.WebGLMorphtargets=qn,e.WebGLObjects=Qn,e.WebGLProgram=Ha,e.WebGLPrograms=Ya,e.WebGLProperties=qa,e.WebGLRenderLists=Ka,e.WebGLRenderStates=ro,e.WebGLShader=Da,e.WebGLShadowMap=io,e.WebGLState=no,e.WebGLTextures=ao,e.WebGLUniforms=Na,e.WebGLUtils=oo,e.WebGL2Renderer=Ns,e.WebGLRenderer=uo,e.WebGLRenderTarget=ge,e.WebGLRenderTargetCube=Zt,e.WebVRManager=lo,e.WebXRManager=co,e.Fog=Es,e.FogExp2=Cs,e.Scene=fe,e.CanvasTexture=mi,e.CompressedTexture=qt,e.CubeTexture=$t,e.DataTexture=Mt,e.DepthTexture=Rn,e.Texture=ve,e.VideoTexture=Os,e.arrayMin=C,e.arrayMax=L}()}),require.register("js/components/Bean.js",function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r=0;)e=this._listeners[t],e&&e.apply(this,null);this._idRAF=requestAnimationFrame(this._binds.update)}},{key:"start",value:function(){this._update()}},{key:"stop",value:function(){cancelAnimationFrame(this._idRAF)}},{key:"add",value:function(e){var t=this._listeners.indexOf(e);t>=0||(this._listeners.push(e),this._count++)}},{key:"remove",value:function(e){var t=this._listeners.indexOf(e);t<0||(this._listeners.splice(t,1),this._count--)}}]),e}();r.exports=new a}),require.register("js/core/Webgl.js",function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=0;)e=this._listeners[t],e&&e.apply(this,null);this._idRAF=requestAnimationFrame(this._binds.update)}},{key:"start",value:function(){this._update()}},{key:"stop",value:function(){cancelAnimationFrame(this._idRAF)}},{key:"add",value:function(e){var t=this._listeners.indexOf(e);t>=0||(this._listeners.push(e),this._count++)}},{key:"remove",value:function(e){var t=this._listeners.indexOf(e);t<0||(this._listeners.splice(t,1),this._count--)}}]),e}();r.exports=new a}),require.register("js/core/Webgl.js",function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r