d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}returnfunction(b,c,d){b=THREE.Math.euclideanModulo(b,1);c=THREE.Math.clamp(c,0,1);d=THREE.Math.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));returnthis}}(),setStyle:function(a){functionb(b){void0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}varc;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){vard=c[2];switch(c[1]){case"rgb":case"rgba":if(c=
d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}returnfunction(b,c,d){b=THREE.Math.euclideanModulo(b,1);c=THREE.Math.clamp(c,0,1);d=THREE.Math.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));returnthis}}(),setStyle:function(a){functionb(b){void0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}varc;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){vard=c[2];switch(c[1]){case"rgb":case"rgba":if(c=
scale:function(a){if(1!==a)for(varb=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;returnthis},trim:function(a,b){for(varc=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),d=this.getValueSize(),this.times=THREE.AnimationUtils.arraySlice(c,e,f),this.values=THREE.AnimationUtils.arraySlice(this.values,e*d,f*d);returnthis},validate:function(){vara=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",
scale:function(a){if(1!==a)for(varb=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;returnthis},trim:function(a,b){for(varc=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),d=this.getValueSize(),this.times=THREE.AnimationUtils.arraySlice(c,e,f),this.values=THREE.AnimationUtils.arraySlice(this.values,e*d,f*d);returnthis},validate:function(){vara=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",
this),a=!1);varc=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(vare=null,f=0;f!==d;f++){varg=c[f];if("number"===typeofg&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void0!==b&&THREE.AnimationUtils.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}returna},optimize:function(){for(vara=
this),a=!1);varc=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(vare=null,f=0;f!==d;f++){varg=c[f];if("number"===typeofg&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void0!==b&&THREE.AnimationUtils.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}returna},optimize:function(){for(vara=
Object.assign(THREE.KeyframeTrack,{parse:function(a){if(void0===a.type)throwError("track type undefined, can not parse");varb=THREE.KeyframeTrack._getTrackTypeForValueTypeName(a.type);if(void0===a.times){console.warn("legacy JSON format detected, converting");varc=[],d=[];THREE.AnimationUtils.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}returnvoid0!==b.parse?b.parse(a):newb(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){varb=a.constructor;if(void0!==b.toJSON)b=b.toJSON(a);
Object.assign(THREE.KeyframeTrack,{parse:function(a){if(void0===a.type)throwError("track type undefined, can not parse");varb=THREE.KeyframeTrack._getTrackTypeForValueTypeName(a.type);if(void0===a.times){varc=[],d=[];THREE.AnimationUtils.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}returnvoid0!==b.parse?b.parse(a):newb(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){varb=a.constructor;if(void0!==b.toJSON)b=b.toJSON(a);else{varb={name:a.name,times:THREE.AnimationUtils.convertArray(a.times,
THREE.PropertyBinding.prototype={constructor:THREE.PropertyBinding,getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,b){this.bind();this.setValue(a,b)},bind:function(){vara=this.node,b=this.parsedPath,c=b.objectName,d=b.propertyName,e=b.propertyIndex;a||(this.node=a=THREE.PropertyBinding.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){varf=b.objectIndex;switch(c){case"materials":if(!a.material){console.error(" can not bind to material as node does not have a material",
THREE.PropertyBinding.prototype={constructor:THREE.PropertyBinding,getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,b){this.bind();this.setValue(a,b)},bind:function(){vara=this.node,b=this.parsedPath,c=b.objectName,d=b.propertyName,e=b.propertyIndex;a||(this.node=a=THREE.PropertyBinding.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){varf=b.objectIndex;switch(c){case"materials":if(!a.material){console.error(" can not bind to material as node does not have a material",
this);return}if(!a.material.materials){console.error(" can not bind to material.materials as node.material does not have a materials array",this);return}a=a.material.materials;break;case"bones":if(!a.skeleton){console.error(" can not bind to bones as node does not have a skeleton",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void0===a[c]){console.error(" can not bind to objectName of node, undefined",this);return}a=a[c]}if(void0!==f){if(void0===
this);return}if(!a.material.materials){console.error(" can not bind to material.materials as node.material does not have a materials array",this);return}a=a.material.materials;break;case"bones":if(!a.skeleton){console.error(" can not bind to bones as node does not have a skeleton",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void0===a[c]){console.error(" can not bind to objectName of node, undefined",this);return}a=a[c]}if(void0!==f){if(void0===
a[f]){console.error(" trying to bind to objectIndex of objectName, but is undefined:",this,a);return}a=a[f]}}if(f=a[d]){b=this.Versioning.None;void0!==a.needsUpdate?(b=this.Versioning.NeedsUpdate,this.targetObject=a):void0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);c=this.BindingType.Direct;if(void0!==e){if("morphTargetInfluences"===d){if(!a.geometry){console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry",
a[f]){console.error(" trying to bind to objectIndex of objectName, but is undefined:",this,a);return}a=a[f]}}if(f=a[d]){b=this.Versioning.None;void0!==a.needsUpdate?(b=this.Versioning.NeedsUpdate,this.targetObject=a):void0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);c=this.BindingType.Direct;if(void0!==e){if("morphTargetInfluences"===d){if(!a.geometry){console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry",