vendor: 12,555 bytes, line 1
1import{E,W as R,C as p,T as m,b as y,c as G,d as H,R as A}from"./math.scalar.functions-DkeaWAWz.js";function T(w){return Math.pow(w,y)}function d(w){return w<=.04045?.0773993808*w:Math.pow(.947867299*(w+.055),2.4)}function F(w){return Math.pow(w,G)}function M(w){return w<=.0031308?12.92*w:1.055*Math.pow(w,.41666)-.055}class e{constructor(t=0,i=0,s=0){this.r=t,this.g=i,this.b=s}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"}getClassName(){return"Color3"}getHashCode(){let t=this.r*255|0;return t=t*397^(this.g*255|0),t=t*397^(this.b*255|0),t}toArray(t,i=0){return t[i]=this.r,t[i+1]=this.g,t[i+2]=this.b,this}fromArray(t,i=0){return e.FromArrayToRef(t,i,this),this}toColor4(t=1){return new b(this.r,this.g,this.b,t)}asArray(){return[this.r,this.g,this.b]}toLuminance(){return this.r*.3+this.g*.59+this.b*.11}multiply(t){return new e(this.r*t.r,this.g*t.g,this.b*t.b)}multiplyToRef(t,i){return i.r=this.r*t.r,i.g=this.g*t.g,i.b=this.b*t.b,i}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyByFloats(t,i,s){return new e(this.r*t,this.g*i,this.b*s)}divide(t){throw new ReferenceError("Can not divide a color")}divideToRef(t,i){throw new ReferenceError("Can not divide a color")}divideInPlace(t){throw new ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.minimizeInPlaceFromFloats(t.r,t.g,t.b)}maximizeInPlace(t){return this.maximizeInPlaceFromFloats(t.r,t.g,t.b)}minimizeInPlaceFromFloats(t,i,s){return this.r=Math.min(t,this.r),this.g=Math.min(i,this.g),this.b=Math.min(s,this.b),this}maximizeInPlaceFromFloats(t,i,s){return this.r=Math.max(t,this.r),this.g=Math.max(i,this.g),this.b=Math.max(s,this.b),this}floorToRef(t){throw new ReferenceError("Can not floor a color")}floor(){throw new ReferenceError("Can not floor a color")}fractToRef(t){throw new ReferenceError("Can not fract a color")}fract(){throw new ReferenceError("Can not fract a color")}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b}equalsFloats(t,i,s){return this.equalsToFloats(t,i,s)}equalsToFloats(t,i,s){return this.r===t&&this.g===i&&this.b===s}equalsWithEpsilon(t,i=E){return R(this.r,t.r,i)&&R(this.g,t.g,i)&&R(this.b,t.b,i)}negate(){throw new ReferenceError("Can not negate a color")}negateInPlace(){throw new ReferenceError("Can not negate a color")}negateToRef(t){throw new ReferenceError("Can not negate a color")}scale(t){return new e(this.r*t,this.g*t,this.b*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this}scaleToRef(t,i){return i.r=this.r*t,i.g=this.g*t,i.b=this.b*t,i}scaleAndAddToRef(t,i){return i.r+=this.r*t,i.g+=this.g*t,i.b+=this.b*t,i}clampToRef(t=0,i=1,s){return s.r=p(this.r,t,i),s.g=p(this.g,t,i),s.b=p(this.b,t,i),s}add(t){return new e(this.r+t.r,this.g+t.g,this.b+t.b)}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addInPlaceFromFloats(t,i,s){return this.r+=t,this.g+=i,this.b+=s,this}addToRef(t,i){return i.r=this.r+t.r,i.g=this.g+t.g,i.b=this.b+t.b,i}subtract(t){return new e(this.r-t.r,this.g-t.g,this.b-t.b)}subtractToRef(t,i){return i.r=this.r-t.r,i.g=this.g-t.g,i.b=this.b-t.b,i}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this}subtractFromFloats(t,i,s){return new e(this.r-t,this.g-i,this.b-s)}subtractFromFloatsToRef(t,i,s,r){return r.r=this.r-t,r.g=this.g-i,r.b=this.b-s,r}clone(){return new e(this.r,this.g,this.b)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyFromFloats(t,i,s){return this.r=t,this.g=i,this.b=s,this}set(t,i,s){return this.copyFromFloats(t,i,s)}setAll(t){return this.r=this.g=this.b=t,this}toHexString(){const t=Math.round(this.r*255),i=Math.round(this.g*255),s=Math.round(this.b*255);return"#"+m(t)+m(i)+m(s)}fromHexString(t){return t.substring(0,1)!=="#"||t.length!==7?this:(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255,this)}toHSV(){return this.toHSVToRef(new e)}toHSVToRef(t){const i=this.r,s=this.g,r=this.b,n=Math.max(i,s,r),a=Math.min(i,s,r);let h=0,c=0;const u=n,g=n-a;return n!==0&&(c=g/n),n!=a&&(n==i?(h=(s-r)/g,s<r&&(h+=6)):n==s?h=(r-i)/g+2:n==r&&(h=(i-s)/g+4),h*=60),t.r=h,t.g=c,t.b=u,t}toLinearSpace(t=!1){const i=new e;return this.toLinearSpaceToRef(i,t),i}toLinearSpaceToRef(t,i=!1){return i?(t.r=d(this.r),t.g=d(this.g),t.b=d(this.b)):(t.r=T(this.r),t.g=T(this.g),t.b=T(this.b)),this}toGammaSpace(t=!1){const i=new e;return this.toGammaSpaceToRef(i,t),i}toGammaSpaceToRef(t,i=!1){return i?(t.r=M(this.r),t.g=M(this.g),t.b=M(this.b)):(t.r=F(this.r),t.g=F(this.g),t.b=F(this.b)),this}static HSVtoRGBToRef(t,i,s,r){const n=s*i,a=t/60,h=n*(1-Math.abs(a%2-1));let c=0,u=0,g=0;a>=0&&a<=1?(c=n,u=h):a>=1&&a<=2?(c=h,u=n):a>=2&&a<=3?(u=n,g=h):a>=3&&a<=4?(u=h,g=n):a>=4&&a<=5?(c=h,g=n):a>=5&&a<=6&&(c=n,g=h);const f=s-n;return r.r=c+f,r.g=u+f,r.b=g+f,r}static FromHSV(t,i,s){const r=new e(0,0,0);return e.HSVtoRGBToRef(t,i,s,r),r}static FromHexString(t){return new e(0,0,0).fromHexString(t)}static FromArray(t,i=0){return new e(t[i],t[i+1],t[i+2])}static FromArrayToRef(t,i=0,s){s.r=t[i],s.g=t[i+1],s.b=t[i+2]}static FromInts(t,i,s){return new e(t/255,i/255,s/255)}static Lerp(t,i,s){const r=new e(0,0,0);return e.LerpToRef(t,i,s,r),r}static LerpToRef(t,i,s,r){r.r=t.r+(i.r-t.r)*s,r.g=t.g+(i.g-t.g)*s,r.b=t.b+(i.b-t.b)*s}static Hermite(t,i,s,r,n){const a=n*n,h=n*a,c=2*h-3*a+1,u=-2*h+3*a,g=h-2*a+n,f=h-a,I=t.r*c+s.r*u+i.r*g+r.r*f,S=t.g*c+s.g*u+i.g*g+r.g*f,P=t.b*c+s.b*u+i.b*g+r.b*f;return new e(I,S,P)}static Hermite1stDerivative(t,i,s,r,n){const a=e.Black();return this.Hermite1stDerivativeToRef(t,i,s,r,n,a),a}static Hermite1stDerivativeToRef(t,i,s,r,n,a){const h=n*n;a.r=(h-n)*6*t.r+(3*h-4*n+1)*i.r+(-h+n)*6*s.r+(3*h-2*n)*r.r,a.g=(h-n)*6*t.g+(3*h-4*n+1)*i.g+(-h+n)*6*s.g+(3*h-2*n)*r.g,a.b=(h-n)*6*t.b+(3*h-4*n+1)*i.b+(-h+n)*6*s.b+(3*h-2*n)*r.b}static Red(){return new e(1,0,0)}static Green(){return new e(0,1,0)}static Blue(){return new e(0,0,1)}static Black(){return new e(0,0,0)}static get BlackReadOnly(){return e._BlackReadOnly}static White(){return new e(1,1,1)}static Purple(){return new e(.5,0,.5)}static Magenta(){return new e(1,0,1)}static Yellow(){return new e(1,1,0)}static Gray(){return new e(.5,.5,.5)}static Teal(){return new e(0,1,1)}static Random(){return new e(Math.random(),Math.random(),Math.random())}}e._V8PerformanceHack=new e(.5,.5,.5);e._BlackReadOnly=e.Black();Object.defineProperties(e.prototype,{dimension:{value:[3]},rank:{value:1}});class b{constructor(t=0,i=0,s=0,r=1){this.r=t,this.g=i,this.b=s,this.a=r}asArray(){return[this.r,this.g,this.b,this.a]}toArray(t,i=0){return t[i]=this.r,t[i+1]=this.g,t[i+2]=this.b,t[i+3]=this.a,this}fromArray(t,i=0){return this.r=t[i],this.g=t[i+1],this.b=t[i+2],this.a=t[i+3],this}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}add(t){return new b(this.r+t.r,this.g+t.g,this.b+t.b,this.a+t.a)}addToRef(t,i){return i.r=this.r+t.r,i.g=this.g+t.g,i.b=this.b+t.b,i.a=this.a+t.a,i}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this.a+=t.a,this}addInPlaceFromFloats(t,i,s,r){return this.r+=t,this.g+=i,this.b+=s,this.a+=r,this}subtract(t){return new b(this.r-t.r,this.g-t.g,this.b-t.b,this.a-t.a)}subtractToRef(t,i){return i.r=this.r-t.r,i.g=this.g-t.g,i.b=this.b-t.b,i.a=this.a-t.a,i}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this.a-=t.a,this}subtractFromFloats(t,i,s,r){return new b(this.r-t,this.g-i,this.b-s,this.a-r)}subtractFromFloatsToRef(t,i,s,r,n){return n.r=this.r-t,n.g=this.g-i,n.b=this.b-s,n.a=this.a-r,n}scale(t){return new b(this.r*t,this.g*t,this.b*t,this.a*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this.a*=t,this}scaleToRef(t,i){return i.r=this.r*t,i.g=this.g*t,i.b=this.b*t,i.a=this.a*t,i}scaleAndAddToRef(t,i){return i.r+=this.r*t,i.g+=this.g*t,i.b+=this.b*t,i.a+=this.a*t,i}clampToRef(t=0,i=1,s){return s.r=p(this.r,t,i),s.g=p(this.g,t,i),s.b=p(this.b,t,i),s.a=p(this.a,t,i),s}multiply(t){return new b(this.r*t.r,this.g*t.g,this.b*t.b,this.a*t.a)}multiplyToRef(t,i){return i.r=this.r*t.r,i.g=this.g*t.g,i.b=this.b*t.b,i.a=this.a*t.a,i}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this.a*=t.a,this}multiplyByFloats(t,i,s,r){return new b(this.r*t,this.g*i,this.b*s,this.a*r)}divide(t){throw new ReferenceError("Can not divide a color")}divideToRef(t,i){throw new ReferenceError("Can not divide a color")}divideInPlace(t){throw new ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.r=Math.min(this.r,t.r),this.g=Math.min(this.g,t.g),this.b=Math.min(this.b,t.b),this.a=Math.min(this.a,t.a),this}maximizeInPlace(t){return this.r=Math.max(this.r,t.r),this.g=Math.max(this.g,t.g),this.b=Math.max(this.b,t.b),this.a=Math.max(this.a,t.a),this}minimizeInPlaceFromFloats(t,i,s,r){return this.r=Math.min(t,this.r),this.g=Math.min(i,this.g),this.b=Math.min(s,this.b),this.a=Math.min(r,this.a),this}maximizeInPlaceFromFloats(t,i,s,r){return this.r=Math.max(t,this.r),this.g=Math.max(i,this.g),this.b=Math.max(s,this.b),this.a=Math.max(r,this.a),this}floorToRef(t){throw new ReferenceError("Can not floor a color")}floor(){throw new ReferenceError("Can not floor a color")}fractToRef(t){throw new ReferenceError("Can not fract a color")}fract(){throw new ReferenceError("Can not fract a color")}negate(){throw new ReferenceError("Can not negate a color")}negateInPlace(){throw new ReferenceError("Can not negate a color")}negateToRef(t){throw new ReferenceError("Can not negate a color")}equalsWithEpsilon(t,i=E){return R(this.r,t.r,i)&&R(this.g,t.g,i)&&R(this.b,t.b,i)&&R(this.a,t.a,i)}equalsToFloats(t,i,s,r){return this.r===t&&this.g===i&&this.b===s&&this.a===r}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"}getClassName(){return"Color4"}getHashCode(){let t=this.r*255|0;return t=t*397^(this.g*255|0),t=t*397^(this.b*255|0),t=t*397^(this.a*255|0),t}clone(){return new b().copyFrom(this)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}copyFromFloats(t,i,s,r){return this.r=t,this.g=i,this.b=s,this.a=r,this}set(t,i,s,r){return this.copyFromFloats(t,i,s,r)}setAll(t){return this.r=this.g=this.b=this.a=t,this}toHexString(t=!1){const i=Math.round(this.r*255),s=Math.round(this.g*255),r=Math.round(this.b*255);if(t)return"#"+m(i)+m(s)+m(r);const n=Math.round(this.a*255);return"#"+m(i)+m(s)+m(r)+m(n)}fromHexString(t){return t.substring(0,1)!=="#"||t.length!==9&&t.length!==7?this:(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255,t.length===9&&(this.a=parseInt(t.substring(7,9),16)/255),this)}toLinearSpace(t=!1){const i=new b;return this.toLinearSpaceToRef(i,t),i}toLinearSpaceToRef(t,i=!1){return i?(t.r=d(this.r),t.g=d(this.g),t.b=d(this.b)):(t.r=T(this.r),t.g=T(this.g),t.b=T(this.b)),t.a=this.a,this}toGammaSpace(t=!1){const i=new b;return this.toGammaSpaceToRef(i,t),i}toGammaSpaceToRef(t,i=!1){return i?(t.r=M(this.r),t.g=M(this.g),t.b=M(this.b)):(t.r=F(this.r),t.g=F(this.g),t.b=F(this.b)),t.a=this.a,this}static FromHexString(t){return t.substring(0,1)!=="#"||t.length!==9&&t.length!==7?new b(0,0,0,0):new b(0,0,0,1).fromHexString(t)}static Lerp(t,i,s){return b.LerpToRef(t,i,s,new b)}static LerpToRef(t,i,s,r){return r.r=t.r+(i.r-t.r)*s,r.g=t.g+(i.g-t.g)*s,r.b=t.b+(i.b-t.b)*s,r.a=t.a+(i.a-t.a)*s,r}static Hermite(t,i,s,r,n){const a=n*n,h=n*a,c=2*h-3*a+1,u=-2*h+3*a,g=h-2*a+n,f=h-a,I=t.r*c+s.r*u+i.r*g+r.r*f,S=t.g*c+s.g*u+i.g*g+r.g*f,P=t.b*c+s.b*u+i.b*g+r.b*f,L=t.a*c+s.a*u+i.a*g+r.a*f;return new b(I,S,P,L)}static Hermite1stDerivative(t,i,s,r,n){const a=new b;return this.Hermite1stDerivativeToRef(t,i,s,r,n,a),a}static Hermite1stDerivativeToRef(t,i,s,r,n,a){const h=n*n;a.r=(h-n)*6*t.r+(3*h-4*n+1)*i.r+(-h+n)*6*s.r+(3*h-2*n)*r.r,a.g=(h-n)*6*t.g+(3*h-4*n+1)*i.g+(-h+n)*6*s.g+(3*h-2*n)*r.g,a.b=(h-n)*6*t.b+(3*h-4*n+1)*i.b+(-h+n)*6*s.b+(3*h-2*n)*r.b,a.a=(h-n)*6*t.a+(3*h-4*n+1)*i.a+(-h+n)*6*s.a+(3*h-2*n)*r.a}static FromColor3(t,i=1){return new b(t.r,t.g,t.b,i)}static FromArray(t,i=0){return new b(t[i],t[i+1],t[i+2],t[i+3])}static FromArrayToRef(t,i=0,s){s.r=t[i],s.g=t[i+1],s.b=t[i+2],s.a=t[i+3]}static FromInts(t,i,s,r){return new b(t/255,i/255,s/255,r/255)}static CheckColors4(t,i){if(t.length===i*3){const s=[];for(let r=0;r<t.length;r+=3){const n=r/3*4;s[n]=t[r],s[n+1]=t[r+1],s[n+2]=t[r+2],s[n+3]=1}return s}return t}}b._V8PerformanceHack=new b(.5,.5,.5,.5);Object.defineProperties(b.prototype,{dimension:{value:[4]},rank:{value:1}});class B{}B.Color3=H(3,e.Black);B.Color4=H(3,()=>new b(0,0,0,0));A("BABYLON.Color3",e);A("BABYLON.Color4",b);export{e as Color3,b as Color4,B as TmpColors};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.