-
Notifications
You must be signed in to change notification settings - Fork 0
/
088d5a4e-75bcffe53719928ecf27.js
2 lines (2 loc) · 47.4 KB
/
088d5a4e-75bcffe53719928ecf27.js
1
2
"use strict";(self.webpackChunkvictor_cortes=self.webpackChunkvictor_cortes||[]).push([[770],{6900:function(t,o,r){r.d(o,{FM:function(){return u},P:function(){return h},Lt:function(){return y},_f:function(){return f},y3:function(){return _},jp:function(){return p}});var n=r(5602),i=r(3681),e=r(8134),s=r(1704),a=r(6196),u=function(){function t(t,o){void 0===t&&(t=0),void 0===o&&(o=0),this.x=t,this.y=o}return t.prototype.toString=function(){return"{X: "+this.x+" Y: "+this.y+"}"},t.prototype.getClassName=function(){return"Vector2"},t.prototype.getHashCode=function(){var t=0|this.x;return t=397*t^(0|this.y)},t.prototype.toArray=function(t,o){return void 0===o&&(o=0),t[o]=this.x,t[o+1]=this.y,this},t.prototype.fromArray=function(o,r){return void 0===r&&(r=0),t.FromArrayToRef(o,r,this),this},t.prototype.asArray=function(){var t=new Array;return this.toArray(t,0),t},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.copyFromFloats=function(t,o){return this.x=t,this.y=o,this},t.prototype.set=function(t,o){return this.copyFromFloats(t,o)},t.prototype.add=function(o){return new t(this.x+o.x,this.y+o.y)},t.prototype.addToRef=function(t,o){return o.x=this.x+t.x,o.y=this.y+t.y,this},t.prototype.addInPlace=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.addVector3=function(o){return new t(this.x+o.x,this.y+o.y)},t.prototype.subtract=function(o){return new t(this.x-o.x,this.y-o.y)},t.prototype.subtractToRef=function(t,o){return o.x=this.x-t.x,o.y=this.y-t.y,this},t.prototype.subtractInPlace=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.multiplyInPlace=function(t){return this.x*=t.x,this.y*=t.y,this},t.prototype.multiply=function(o){return new t(this.x*o.x,this.y*o.y)},t.prototype.multiplyToRef=function(t,o){return o.x=this.x*t.x,o.y=this.y*t.y,this},t.prototype.multiplyByFloats=function(o,r){return new t(this.x*o,this.y*r)},t.prototype.divide=function(o){return new t(this.x/o.x,this.y/o.y)},t.prototype.divideToRef=function(t,o){return o.x=this.x/t.x,o.y=this.y/t.y,this},t.prototype.divideInPlace=function(t){return this.divideToRef(t,this)},t.prototype.negate=function(){return new t(-this.x,-this.y)},t.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},t.prototype.negateToRef=function(t){return t.copyFromFloats(-1*this.x,-1*this.y)},t.prototype.scaleInPlace=function(t){return this.x*=t,this.y*=t,this},t.prototype.scale=function(o){var r=new t(0,0);return this.scaleToRef(o,r),r},t.prototype.scaleToRef=function(t,o){return o.x=this.x*t,o.y=this.y*t,this},t.prototype.scaleAndAddToRef=function(t,o){return o.x+=this.x*t,o.y+=this.y*t,this},t.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},t.prototype.equalsWithEpsilon=function(t,o){return void 0===o&&(o=i.kn),t&&n.R.WithinEpsilon(this.x,t.x,o)&&n.R.WithinEpsilon(this.y,t.y,o)},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y))},t.prototype.fract=function(){return new t(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},t.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.length();return 0===t||(this.x/=t,this.y/=t),this},t.prototype.clone=function(){return new t(this.x,this.y)},t.Zero=function(){return new t(0,0)},t.One=function(){return new t(1,1)},t.FromArray=function(o,r){return void 0===r&&(r=0),new t(o[r],o[r+1])},t.FromArrayToRef=function(t,o,r){r.x=t[o],r.y=t[o+1]},t.CatmullRom=function(o,r,n,i,e){var s=e*e,a=e*s;return new t(.5*(2*r.x+(-o.x+n.x)*e+(2*o.x-5*r.x+4*n.x-i.x)*s+(-o.x+3*r.x-3*n.x+i.x)*a),.5*(2*r.y+(-o.y+n.y)*e+(2*o.y-5*r.y+4*n.y-i.y)*s+(-o.y+3*r.y-3*n.y+i.y)*a))},t.Clamp=function(o,r,n){var i=o.x;i=(i=i>n.x?n.x:i)<r.x?r.x:i;var e=o.y;return new t(i,e=(e=e>n.y?n.y:e)<r.y?r.y:e)},t.Hermite=function(o,r,n,i,e){var s=e*e,a=e*s,u=2*a-3*s+1,h=-2*a+3*s,y=a-2*s+e,f=a-s;return new t(o.x*u+n.x*h+r.x*y+i.x*f,o.y*u+n.y*h+r.y*y+i.y*f)},t.Lerp=function(o,r,n){return new t(o.x+(r.x-o.x)*n,o.y+(r.y-o.y)*n)},t.Dot=function(t,o){return t.x*o.x+t.y*o.y},t.Normalize=function(t){var o=t.clone();return o.normalize(),o},t.Minimize=function(o,r){return new t(o.x<r.x?o.x:r.x,o.y<r.y?o.y:r.y)},t.Maximize=function(o,r){return new t(o.x>r.x?o.x:r.x,o.y>r.y?o.y:r.y)},t.Transform=function(o,r){var n=t.Zero();return t.TransformToRef(o,r,n),n},t.TransformToRef=function(t,o,r){var n=o.m,i=t.x*n[0]+t.y*n[4]+n[12],e=t.x*n[1]+t.y*n[5]+n[13];r.x=i,r.y=e},t.PointInTriangle=function(t,o,r,n){var i=.5*(-r.y*n.x+o.y*(-r.x+n.x)+o.x*(r.y-n.y)+r.x*n.y),e=i<0?-1:1,s=(o.y*n.x-o.x*n.y+(n.y-o.y)*t.x+(o.x-n.x)*t.y)*e,a=(o.x*r.y-o.y*r.x+(o.y-r.y)*t.x+(r.x-o.x)*t.y)*e;return s>0&&a>0&&s+a<2*i*e},t.Distance=function(o,r){return Math.sqrt(t.DistanceSquared(o,r))},t.DistanceSquared=function(t,o){var r=t.x-o.x,n=t.y-o.y;return r*r+n*n},t.Center=function(t,o){var r=t.add(o);return r.scaleInPlace(.5),r},t.DistanceOfPointFromSegment=function(o,r,n){var i=t.DistanceSquared(r,n);if(0===i)return t.Distance(o,r);var e=n.subtract(r),s=Math.max(0,Math.min(1,t.Dot(o.subtract(r),e)/i)),a=r.add(e.multiplyByFloats(s,s));return t.Distance(o,a)},t}(),h=function(){function t(t,o,r){void 0===t&&(t=0),void 0===o&&(o=0),void 0===r&&(r=0),this._isDirty=!0,this._x=t,this._y=o,this._z=r}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"z",{get:function(){return this._z},set:function(t){this._z=t,this._isDirty=!0},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+"}"},t.prototype.getClassName=function(){return"Vector3"},t.prototype.getHashCode=function(){var t=0|this._x;return t=397*(t=397*t^(0|this._y))^(0|this._z)},t.prototype.asArray=function(){var t=[];return this.toArray(t,0),t},t.prototype.toArray=function(t,o){return void 0===o&&(o=0),t[o]=this._x,t[o+1]=this._y,t[o+2]=this._z,this},t.prototype.fromArray=function(o,r){return void 0===r&&(r=0),t.FromArrayToRef(o,r,this),this},t.prototype.toQuaternion=function(){return f.RotationYawPitchRoll(this._y,this._x,this._z)},t.prototype.addInPlace=function(t){return this.addInPlaceFromFloats(t._x,t._y,t._z)},t.prototype.addInPlaceFromFloats=function(t,o,r){return this.x+=t,this.y+=o,this.z+=r,this},t.prototype.add=function(o){return new t(this._x+o._x,this._y+o._y,this._z+o._z)},t.prototype.addToRef=function(t,o){return o.copyFromFloats(this._x+t._x,this._y+t._y,this._z+t._z)},t.prototype.subtractInPlace=function(t){return this.x-=t._x,this.y-=t._y,this.z-=t._z,this},t.prototype.subtract=function(o){return new t(this._x-o._x,this._y-o._y,this._z-o._z)},t.prototype.subtractToRef=function(t,o){return this.subtractFromFloatsToRef(t._x,t._y,t._z,o)},t.prototype.subtractFromFloats=function(o,r,n){return new t(this._x-o,this._y-r,this._z-n)},t.prototype.subtractFromFloatsToRef=function(t,o,r,n){return n.copyFromFloats(this._x-t,this._y-o,this._z-r)},t.prototype.negate=function(){return new t(-this._x,-this._y,-this._z)},t.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},t.prototype.negateToRef=function(t){return t.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},t.prototype.scaleInPlace=function(t){return this.x*=t,this.y*=t,this.z*=t,this},t.prototype.scale=function(o){return new t(this._x*o,this._y*o,this._z*o)},t.prototype.scaleToRef=function(t,o){return o.copyFromFloats(this._x*t,this._y*t,this._z*t)},t.prototype.scaleAndAddToRef=function(t,o){return o.addInPlaceFromFloats(this._x*t,this._y*t,this._z*t)},t.prototype.projectOnPlane=function(o,r){var n=t.Zero();return this.projectOnPlaneToRef(o,r,n),n},t.prototype.projectOnPlaneToRef=function(o,r,n){var i=o.normal,e=o.d,s=c.Vector3[0];this.subtractToRef(r,s),s.normalize();var a=t.Dot(s,i),u=-(t.Dot(r,i)+e)/a,h=s.scaleInPlace(u);r.addToRef(h,n)},t.prototype.equals=function(t){return t&&this._x===t._x&&this._y===t._y&&this._z===t._z},t.prototype.equalsWithEpsilon=function(t,o){return void 0===o&&(o=i.kn),t&&n.R.WithinEpsilon(this._x,t._x,o)&&n.R.WithinEpsilon(this._y,t._y,o)&&n.R.WithinEpsilon(this._z,t._z,o)},t.prototype.equalsToFloats=function(t,o,r){return this._x===t&&this._y===o&&this._z===r},t.prototype.multiplyInPlace=function(t){return this.x*=t._x,this.y*=t._y,this.z*=t._z,this},t.prototype.multiply=function(t){return this.multiplyByFloats(t._x,t._y,t._z)},t.prototype.multiplyToRef=function(t,o){return o.copyFromFloats(this._x*t._x,this._y*t._y,this._z*t._z)},t.prototype.multiplyByFloats=function(o,r,n){return new t(this._x*o,this._y*r,this._z*n)},t.prototype.divide=function(o){return new t(this._x/o._x,this._y/o._y,this._z/o._z)},t.prototype.divideToRef=function(t,o){return o.copyFromFloats(this._x/t._x,this._y/t._y,this._z/t._z)},t.prototype.divideInPlace=function(t){return this.divideToRef(t,this)},t.prototype.minimizeInPlace=function(t){return this.minimizeInPlaceFromFloats(t._x,t._y,t._z)},t.prototype.maximizeInPlace=function(t){return this.maximizeInPlaceFromFloats(t._x,t._y,t._z)},t.prototype.minimizeInPlaceFromFloats=function(t,o,r){return t<this._x&&(this.x=t),o<this._y&&(this.y=o),r<this._z&&(this.z=r),this},t.prototype.maximizeInPlaceFromFloats=function(t,o,r){return t>this._x&&(this.x=t),o>this._y&&(this.y=o),r>this._z&&(this.z=r),this},t.prototype.isNonUniformWithinEpsilon=function(t){var o=Math.abs(this._x),r=Math.abs(this._y);if(!n.R.WithinEpsilon(o,r,t))return!0;var i=Math.abs(this._z);return!n.R.WithinEpsilon(o,i,t)||!n.R.WithinEpsilon(r,i,t)},Object.defineProperty(t.prototype,"isNonUniform",{get:function(){var t=Math.abs(this._x);return t!==Math.abs(this._y)||t!==Math.abs(this._z)},enumerable:!1,configurable:!0}),t.prototype.floor=function(){return new t(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},t.prototype.fract=function(){return new t(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},t.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},t.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},t.prototype.normalize=function(){return this.normalizeFromLength(this.length())},t.prototype.reorderInPlace=function(t){var o=this;return"xyz"===(t=t.toLowerCase())||(c.Vector3[0].copyFrom(this),["x","y","z"].forEach((function(r,n){o[r]=c.Vector3[0][t[n]]}))),this},t.prototype.rotateByQuaternionToRef=function(o,r){return o.toRotationMatrix(c.Matrix[0]),t.TransformCoordinatesToRef(this,c.Matrix[0],r),r},t.prototype.rotateByQuaternionAroundPointToRef=function(t,o,r){return this.subtractToRef(o,c.Vector3[0]),c.Vector3[0].rotateByQuaternionToRef(t,c.Vector3[0]),o.addToRef(c.Vector3[0],r),r},t.prototype.cross=function(o){return t.Cross(this,o)},t.prototype.normalizeFromLength=function(t){return 0===t||1===t?this:this.scaleInPlace(1/t)},t.prototype.normalizeToNew=function(){var o=new t(0,0,0);return this.normalizeToRef(o),o},t.prototype.normalizeToRef=function(t){var o=this.length();return 0===o||1===o?t.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/o,t)},t.prototype.clone=function(){return new t(this._x,this._y,this._z)},t.prototype.copyFrom=function(t){return this.copyFromFloats(t._x,t._y,t._z)},t.prototype.copyFromFloats=function(t,o,r){return this.x=t,this.y=o,this.z=r,this},t.prototype.set=function(t,o,r){return this.copyFromFloats(t,o,r)},t.prototype.setAll=function(t){return this.x=this.y=this.z=t,this},t.GetClipFactor=function(o,r,n,i){var e=t.Dot(o,n)-i;return e/(e-(t.Dot(r,n)-i))},t.GetAngleBetweenVectors=function(o,r,n){var i=o.normalizeToRef(c.Vector3[1]),e=r.normalizeToRef(c.Vector3[2]),s=t.Dot(i,e),a=c.Vector3[3];return t.CrossToRef(i,e,a),t.Dot(a,n)>0?Math.acos(s):-Math.acos(s)},t.FromArray=function(o,r){return void 0===r&&(r=0),new t(o[r],o[r+1],o[r+2])},t.FromFloatArray=function(o,r){return t.FromArray(o,r)},t.FromArrayToRef=function(t,o,r){r.x=t[o],r.y=t[o+1],r.z=t[o+2]},t.FromFloatArrayToRef=function(o,r,n){return t.FromArrayToRef(o,r,n)},t.FromFloatsToRef=function(t,o,r,n){n.copyFromFloats(t,o,r)},t.Zero=function(){return new t(0,0,0)},t.One=function(){return new t(1,1,1)},t.Up=function(){return new t(0,1,0)},Object.defineProperty(t,"UpReadOnly",{get:function(){return t._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(t,"ZeroReadOnly",{get:function(){return t._ZeroReadOnly},enumerable:!1,configurable:!0}),t.Down=function(){return new t(0,-1,0)},t.Forward=function(o){return void 0===o&&(o=!1),new t(0,0,o?-1:1)},t.Backward=function(o){return void 0===o&&(o=!1),new t(0,0,o?1:-1)},t.Right=function(){return new t(1,0,0)},t.Left=function(){return new t(-1,0,0)},t.TransformCoordinates=function(o,r){var n=t.Zero();return t.TransformCoordinatesToRef(o,r,n),n},t.TransformCoordinatesToRef=function(o,r,n){t.TransformCoordinatesFromFloatsToRef(o._x,o._y,o._z,r,n)},t.TransformCoordinatesFromFloatsToRef=function(t,o,r,n,i){var e=n.m,s=t*e[0]+o*e[4]+r*e[8]+e[12],a=t*e[1]+o*e[5]+r*e[9]+e[13],u=t*e[2]+o*e[6]+r*e[10]+e[14],h=1/(t*e[3]+o*e[7]+r*e[11]+e[15]);i.x=s*h,i.y=a*h,i.z=u*h},t.TransformNormal=function(o,r){var n=t.Zero();return t.TransformNormalToRef(o,r,n),n},t.TransformNormalToRef=function(t,o,r){this.TransformNormalFromFloatsToRef(t._x,t._y,t._z,o,r)},t.TransformNormalFromFloatsToRef=function(t,o,r,n,i){var e=n.m;i.x=t*e[0]+o*e[4]+r*e[8],i.y=t*e[1]+o*e[5]+r*e[9],i.z=t*e[2]+o*e[6]+r*e[10]},t.CatmullRom=function(o,r,n,i,e){var s=e*e,a=e*s;return new t(.5*(2*r._x+(-o._x+n._x)*e+(2*o._x-5*r._x+4*n._x-i._x)*s+(-o._x+3*r._x-3*n._x+i._x)*a),.5*(2*r._y+(-o._y+n._y)*e+(2*o._y-5*r._y+4*n._y-i._y)*s+(-o._y+3*r._y-3*n._y+i._y)*a),.5*(2*r._z+(-o._z+n._z)*e+(2*o._z-5*r._z+4*n._z-i._z)*s+(-o._z+3*r._z-3*n._z+i._z)*a))},t.Clamp=function(o,r,n){var i=new t;return t.ClampToRef(o,r,n,i),i},t.ClampToRef=function(t,o,r,n){var i=t._x;i=(i=i>r._x?r._x:i)<o._x?o._x:i;var e=t._y;e=(e=e>r._y?r._y:e)<o._y?o._y:e;var s=t._z;s=(s=s>r._z?r._z:s)<o._z?o._z:s,n.copyFromFloats(i,e,s)},t.CheckExtends=function(t,o,r){o.minimizeInPlace(t),r.maximizeInPlace(t)},t.Hermite=function(o,r,n,i,e){var s=e*e,a=e*s,u=2*a-3*s+1,h=-2*a+3*s,y=a-2*s+e,f=a-s;return new t(o._x*u+n._x*h+r._x*y+i._x*f,o._y*u+n._y*h+r._y*y+i._y*f,o._z*u+n._z*h+r._z*y+i._z*f)},t.Lerp=function(o,r,n){var i=new t(0,0,0);return t.LerpToRef(o,r,n,i),i},t.LerpToRef=function(t,o,r,n){n.x=t._x+(o._x-t._x)*r,n.y=t._y+(o._y-t._y)*r,n.z=t._z+(o._z-t._z)*r},t.Dot=function(t,o){return t._x*o._x+t._y*o._y+t._z*o._z},t.Cross=function(o,r){var n=t.Zero();return t.CrossToRef(o,r,n),n},t.CrossToRef=function(t,o,r){var n=t._y*o._z-t._z*o._y,i=t._z*o._x-t._x*o._z,e=t._x*o._y-t._y*o._x;r.copyFromFloats(n,i,e)},t.Normalize=function(o){var r=t.Zero();return t.NormalizeToRef(o,r),r},t.NormalizeToRef=function(t,o){t.normalizeToRef(o)},t.Project=function(o,r,n,i){var e=new t;return t.ProjectToRef(o,r,n,i,e),e},t.ProjectToRef=function(o,r,n,i,e){var s=i.width,a=i.height,u=i.x,h=i.y,y=c.Matrix[1];_.FromValuesToRef(s/2,0,0,0,0,-a/2,0,0,0,0,.5,0,u+s/2,a/2+h,.5,1,y);var f=c.Matrix[0];return r.multiplyToRef(n,f),f.multiplyToRef(y,f),t.TransformCoordinatesToRef(o,f,e),e},t._UnprojectFromInvertedMatrixToRef=function(o,r,i){t.TransformCoordinatesToRef(o,r,i);var e=r.m,s=o._x*e[3]+o._y*e[7]+o._z*e[11]+e[15];n.R.WithinEpsilon(s,1)&&i.scaleInPlace(1/s)},t.UnprojectFromTransform=function(o,r,n,i,e){var s=c.Matrix[0];i.multiplyToRef(e,s),s.invert(),o.x=o._x/r*2-1,o.y=-(o._y/n*2-1);var a=new t;return t._UnprojectFromInvertedMatrixToRef(o,s,a),a},t.Unproject=function(o,r,n,i,e,s){var a=t.Zero();return t.UnprojectToRef(o,r,n,i,e,s,a),a},t.UnprojectToRef=function(o,r,n,i,e,s,a){t.UnprojectFloatsToRef(o._x,o._y,o._z,r,n,i,e,s,a)},t.UnprojectFloatsToRef=function(o,r,n,i,e,s,a,u,h){var y=c.Matrix[0];s.multiplyToRef(a,y),y.multiplyToRef(u,y),y.invert();var f=c.Vector3[0];f.x=o/i*2-1,f.y=-(r/e*2-1),f.z=2*n-1,t._UnprojectFromInvertedMatrixToRef(f,y,h)},t.Minimize=function(t,o){var r=t.clone();return r.minimizeInPlace(o),r},t.Maximize=function(t,o){var r=t.clone();return r.maximizeInPlace(o),r},t.Distance=function(o,r){return Math.sqrt(t.DistanceSquared(o,r))},t.DistanceSquared=function(t,o){var r=t._x-o._x,n=t._y-o._y,i=t._z-o._z;return r*r+n*n+i*i},t.Center=function(t,o){var r=t.add(o);return r.scaleInPlace(.5),r},t.RotationFromAxis=function(o,r,n){var i=t.Zero();return t.RotationFromAxisToRef(o,r,n,i),i},t.RotationFromAxisToRef=function(t,o,r,n){var i=c.Quaternion[0];f.RotationQuaternionFromAxisToRef(t,o,r,i),i.toEulerAnglesToRef(n)},t._UpReadOnly=t.Up(),t._ZeroReadOnly=t.Zero(),t}(),y=function(){function t(t,o,r,n){this.x=t,this.y=o,this.z=r,this.w=n}return t.prototype.toString=function(){return"{X: "+this.x+" Y:"+this.y+" Z:"+this.z+" W:"+this.w+"}"},t.prototype.getClassName=function(){return"Vector4"},t.prototype.getHashCode=function(){var t=0|this.x;return t=397*(t=397*(t=397*t^(0|this.y))^(0|this.z))^(0|this.w)},t.prototype.asArray=function(){var t=new Array;return this.toArray(t,0),t},t.prototype.toArray=function(t,o){return void 0===o&&(o=0),t[o]=this.x,t[o+1]=this.y,t[o+2]=this.z,t[o+3]=this.w,this},t.prototype.fromArray=function(o,r){return void 0===r&&(r=0),t.FromArrayToRef(o,r,this),this},t.prototype.addInPlace=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},t.prototype.add=function(o){return new t(this.x+o.x,this.y+o.y,this.z+o.z,this.w+o.w)},t.prototype.addToRef=function(t,o){return o.x=this.x+t.x,o.y=this.y+t.y,o.z=this.z+t.z,o.w=this.w+t.w,this},t.prototype.subtractInPlace=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},t.prototype.subtract=function(o){return new t(this.x-o.x,this.y-o.y,this.z-o.z,this.w-o.w)},t.prototype.subtractToRef=function(t,o){return o.x=this.x-t.x,o.y=this.y-t.y,o.z=this.z-t.z,o.w=this.w-t.w,this},t.prototype.subtractFromFloats=function(o,r,n,i){return new t(this.x-o,this.y-r,this.z-n,this.w-i)},t.prototype.subtractFromFloatsToRef=function(t,o,r,n,i){return i.x=this.x-t,i.y=this.y-o,i.z=this.z-r,i.w=this.w-n,this},t.prototype.negate=function(){return new t(-this.x,-this.y,-this.z,-this.w)},t.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this},t.prototype.negateToRef=function(t){return t.copyFromFloats(-1*this.x,-1*this.y,-1*this.z,-1*this.w)},t.prototype.scaleInPlace=function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},t.prototype.scale=function(o){return new t(this.x*o,this.y*o,this.z*o,this.w*o)},t.prototype.scaleToRef=function(t,o){return o.x=this.x*t,o.y=this.y*t,o.z=this.z*t,o.w=this.w*t,this},t.prototype.scaleAndAddToRef=function(t,o){return o.x+=this.x*t,o.y+=this.y*t,o.z+=this.z*t,o.w+=this.w*t,this},t.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},t.prototype.equalsWithEpsilon=function(t,o){return void 0===o&&(o=i.kn),t&&n.R.WithinEpsilon(this.x,t.x,o)&&n.R.WithinEpsilon(this.y,t.y,o)&&n.R.WithinEpsilon(this.z,t.z,o)&&n.R.WithinEpsilon(this.w,t.w,o)},t.prototype.equalsToFloats=function(t,o,r,n){return this.x===t&&this.y===o&&this.z===r&&this.w===n},t.prototype.multiplyInPlace=function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this},t.prototype.multiply=function(o){return new t(this.x*o.x,this.y*o.y,this.z*o.z,this.w*o.w)},t.prototype.multiplyToRef=function(t,o){return o.x=this.x*t.x,o.y=this.y*t.y,o.z=this.z*t.z,o.w=this.w*t.w,this},t.prototype.multiplyByFloats=function(o,r,n,i){return new t(this.x*o,this.y*r,this.z*n,this.w*i)},t.prototype.divide=function(o){return new t(this.x/o.x,this.y/o.y,this.z/o.z,this.w/o.w)},t.prototype.divideToRef=function(t,o){return o.x=this.x/t.x,o.y=this.y/t.y,o.z=this.z/t.z,o.w=this.w/t.w,this},t.prototype.divideInPlace=function(t){return this.divideToRef(t,this)},t.prototype.minimizeInPlace=function(t){return t.x<this.x&&(this.x=t.x),t.y<this.y&&(this.y=t.y),t.z<this.z&&(this.z=t.z),t.w<this.w&&(this.w=t.w),this},t.prototype.maximizeInPlace=function(t){return t.x>this.x&&(this.x=t.x),t.y>this.y&&(this.y=t.y),t.z>this.z&&(this.z=t.z),t.w>this.w&&(this.w=t.w),this},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},t.prototype.fract=function(){return new t(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},t.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},t.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},t.prototype.normalize=function(){var t=this.length();return 0===t?this:this.scaleInPlace(1/t)},t.prototype.toVector3=function(){return new h(this.x,this.y,this.z)},t.prototype.clone=function(){return new t(this.x,this.y,this.z,this.w)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},t.prototype.copyFromFloats=function(t,o,r,n){return this.x=t,this.y=o,this.z=r,this.w=n,this},t.prototype.set=function(t,o,r,n){return this.copyFromFloats(t,o,r,n)},t.prototype.setAll=function(t){return this.x=this.y=this.z=this.w=t,this},t.FromArray=function(o,r){return r||(r=0),new t(o[r],o[r+1],o[r+2],o[r+3])},t.FromArrayToRef=function(t,o,r){r.x=t[o],r.y=t[o+1],r.z=t[o+2],r.w=t[o+3]},t.FromFloatArrayToRef=function(o,r,n){t.FromArrayToRef(o,r,n)},t.FromFloatsToRef=function(t,o,r,n,i){i.x=t,i.y=o,i.z=r,i.w=n},t.Zero=function(){return new t(0,0,0,0)},t.One=function(){return new t(1,1,1,1)},t.Normalize=function(o){var r=t.Zero();return t.NormalizeToRef(o,r),r},t.NormalizeToRef=function(t,o){o.copyFrom(t),o.normalize()},t.Minimize=function(t,o){var r=t.clone();return r.minimizeInPlace(o),r},t.Maximize=function(t,o){var r=t.clone();return r.maximizeInPlace(o),r},t.Distance=function(o,r){return Math.sqrt(t.DistanceSquared(o,r))},t.DistanceSquared=function(t,o){var r=t.x-o.x,n=t.y-o.y,i=t.z-o.z,e=t.w-o.w;return r*r+n*n+i*i+e*e},t.Center=function(t,o){var r=t.add(o);return r.scaleInPlace(.5),r},t.TransformNormal=function(o,r){var n=t.Zero();return t.TransformNormalToRef(o,r,n),n},t.TransformNormalToRef=function(t,o,r){var n=o.m,i=t.x*n[0]+t.y*n[4]+t.z*n[8],e=t.x*n[1]+t.y*n[5]+t.z*n[9],s=t.x*n[2]+t.y*n[6]+t.z*n[10];r.x=i,r.y=e,r.z=s,r.w=t.w},t.TransformNormalFromFloatsToRef=function(t,o,r,n,i,e){var s=i.m;e.x=t*s[0]+o*s[4]+r*s[8],e.y=t*s[1]+o*s[5]+r*s[9],e.z=t*s[2]+o*s[6]+r*s[10],e.w=n},t.FromVector3=function(o,r){return void 0===r&&(r=0),new t(o._x,o._y,o._z,r)},t}(),f=function(){function t(t,o,r,n){void 0===t&&(t=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=1),this._isDirty=!0,this._x=t,this._y=o,this._z=r,this._w=n}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"z",{get:function(){return this._z},set:function(t){this._z=t,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"w",{get:function(){return this._w},set:function(t){this._w=t,this._isDirty=!0},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+" W:"+this._w+"}"},t.prototype.getClassName=function(){return"Quaternion"},t.prototype.getHashCode=function(){var t=0|this._x;return t=397*(t=397*(t=397*t^(0|this._y))^(0|this._z))^(0|this._w)},t.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},t.prototype.equals=function(t){return t&&this._x===t._x&&this._y===t._y&&this._z===t._z&&this._w===t._w},t.prototype.equalsWithEpsilon=function(t,o){return void 0===o&&(o=i.kn),t&&n.R.WithinEpsilon(this._x,t._x,o)&&n.R.WithinEpsilon(this._y,t._y,o)&&n.R.WithinEpsilon(this._z,t._z,o)&&n.R.WithinEpsilon(this._w,t._w,o)},t.prototype.clone=function(){return new t(this._x,this._y,this._z,this._w)},t.prototype.copyFrom=function(t){return this.x=t._x,this.y=t._y,this.z=t._z,this.w=t._w,this},t.prototype.copyFromFloats=function(t,o,r,n){return this.x=t,this.y=o,this.z=r,this.w=n,this},t.prototype.set=function(t,o,r,n){return this.copyFromFloats(t,o,r,n)},t.prototype.add=function(o){return new t(this._x+o._x,this._y+o._y,this._z+o._z,this._w+o._w)},t.prototype.addInPlace=function(t){return this._x+=t._x,this._y+=t._y,this._z+=t._z,this._w+=t._w,this},t.prototype.subtract=function(o){return new t(this._x-o._x,this._y-o._y,this._z-o._z,this._w-o._w)},t.prototype.scale=function(o){return new t(this._x*o,this._y*o,this._z*o,this._w*o)},t.prototype.scaleToRef=function(t,o){return o.x=this._x*t,o.y=this._y*t,o.z=this._z*t,o.w=this._w*t,this},t.prototype.scaleInPlace=function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},t.prototype.scaleAndAddToRef=function(t,o){return o.x+=this._x*t,o.y+=this._y*t,o.z+=this._z*t,o.w+=this._w*t,this},t.prototype.multiply=function(o){var r=new t(0,0,0,1);return this.multiplyToRef(o,r),r},t.prototype.multiplyToRef=function(t,o){var r=this._x*t._w+this._y*t._z-this._z*t._y+this._w*t._x,n=-this._x*t._z+this._y*t._w+this._z*t._x+this._w*t._y,i=this._x*t._y-this._y*t._x+this._z*t._w+this._w*t._z,e=-this._x*t._x-this._y*t._y-this._z*t._z+this._w*t._w;return o.copyFromFloats(r,n,i,e),this},t.prototype.multiplyInPlace=function(t){return this.multiplyToRef(t,this),this},t.prototype.conjugateToRef=function(t){return t.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},t.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},t.prototype.conjugate=function(){return new t(-this._x,-this._y,-this._z,this._w)},t.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},t.prototype.normalize=function(){var t=this.length();if(0===t)return this;var o=1/t;return this.x*=o,this.y*=o,this.z*=o,this.w*=o,this},t.prototype.toEulerAngles=function(t){void 0===t&&(t="YZX");var o=h.Zero();return this.toEulerAnglesToRef(o),o},t.prototype.toEulerAnglesToRef=function(t){var o=this._z,r=this._x,n=this._y,i=this._w,e=i*i,s=o*o,a=r*r,u=n*n,h=n*o-r*i,y=.4999999;return h<-y?(t.y=2*Math.atan2(n,i),t.x=Math.PI/2,t.z=0):h>y?(t.y=2*Math.atan2(n,i),t.x=-Math.PI/2,t.z=0):(t.z=Math.atan2(2*(r*n+o*i),-s-a+u+e),t.x=Math.asin(-2*(o*n-r*i)),t.y=Math.atan2(2*(o*r+n*i),s-a-u+e)),this},t.prototype.toRotationMatrix=function(t){return _.FromQuaternionToRef(this,t),this},t.prototype.fromRotationMatrix=function(o){return t.FromRotationMatrixToRef(o,this),this},t.FromRotationMatrix=function(o){var r=new t;return t.FromRotationMatrixToRef(o,r),r},t.FromRotationMatrixToRef=function(t,o){var r,n=t.m,i=n[0],e=n[4],s=n[8],a=n[1],u=n[5],h=n[9],y=n[2],f=n[6],_=n[10],c=i+u+_;c>0?(r=.5/Math.sqrt(c+1),o.w=.25/r,o.x=(f-h)*r,o.y=(s-y)*r,o.z=(a-e)*r):i>u&&i>_?(r=2*Math.sqrt(1+i-u-_),o.w=(f-h)/r,o.x=.25*r,o.y=(e+a)/r,o.z=(s+y)/r):u>_?(r=2*Math.sqrt(1+u-i-_),o.w=(s-y)/r,o.x=(e+a)/r,o.y=.25*r,o.z=(h+f)/r):(r=2*Math.sqrt(1+_-i-u),o.w=(a-e)/r,o.x=(s+y)/r,o.y=(h+f)/r,o.z=.25*r)},t.Dot=function(t,o){return t._x*o._x+t._y*o._y+t._z*o._z+t._w*o._w},t.AreClose=function(o,r){return t.Dot(o,r)>=0},t.Zero=function(){return new t(0,0,0,0)},t.Inverse=function(o){return new t(-o._x,-o._y,-o._z,o._w)},t.InverseToRef=function(t,o){return o.set(-t._x,-t._y,-t._z,t._w),o},t.Identity=function(){return new t(0,0,0,1)},t.IsIdentity=function(t){return t&&0===t._x&&0===t._y&&0===t._z&&1===t._w},t.RotationAxis=function(o,r){return t.RotationAxisToRef(o,r,new t)},t.RotationAxisToRef=function(t,o,r){var n=Math.sin(o/2);return t.normalize(),r.w=Math.cos(o/2),r.x=t._x*n,r.y=t._y*n,r.z=t._z*n,r},t.FromArray=function(o,r){return r||(r=0),new t(o[r],o[r+1],o[r+2],o[r+3])},t.FromArrayToRef=function(t,o,r){r.x=t[o],r.y=t[o+1],r.z=t[o+2],r.w=t[o+3]},t.FromEulerAngles=function(o,r,n){var i=new t;return t.RotationYawPitchRollToRef(r,o,n,i),i},t.FromEulerAnglesToRef=function(o,r,n,i){return t.RotationYawPitchRollToRef(r,o,n,i),i},t.FromEulerVector=function(o){var r=new t;return t.RotationYawPitchRollToRef(o._y,o._x,o._z,r),r},t.FromEulerVectorToRef=function(o,r){return t.RotationYawPitchRollToRef(o._y,o._x,o._z,r),r},t.RotationYawPitchRoll=function(o,r,n){var i=new t;return t.RotationYawPitchRollToRef(o,r,n,i),i},t.RotationYawPitchRollToRef=function(t,o,r,n){var i=.5*r,e=.5*o,s=.5*t,a=Math.sin(i),u=Math.cos(i),h=Math.sin(e),y=Math.cos(e),f=Math.sin(s),_=Math.cos(s);n.x=_*h*u+f*y*a,n.y=f*y*u-_*h*a,n.z=_*y*a-f*h*u,n.w=_*y*u+f*h*a},t.RotationAlphaBetaGamma=function(o,r,n){var i=new t;return t.RotationAlphaBetaGammaToRef(o,r,n,i),i},t.RotationAlphaBetaGammaToRef=function(t,o,r,n){var i=.5*(r+t),e=.5*(r-t),s=.5*o;n.x=Math.cos(e)*Math.sin(s),n.y=Math.sin(e)*Math.sin(s),n.z=Math.sin(i)*Math.cos(s),n.w=Math.cos(i)*Math.cos(s)},t.RotationQuaternionFromAxis=function(o,r,n){var i=new t(0,0,0,0);return t.RotationQuaternionFromAxisToRef(o,r,n,i),i},t.RotationQuaternionFromAxisToRef=function(o,r,n,i){var e=c.Matrix[0];_.FromXYZAxesToRef(o.normalize(),r.normalize(),n.normalize(),e),t.FromRotationMatrixToRef(e,i)},t.Slerp=function(o,r,n){var i=t.Identity();return t.SlerpToRef(o,r,n,i),i},t.SlerpToRef=function(t,o,r,n){var i,e,s=t._x*o._x+t._y*o._y+t._z*o._z+t._w*o._w,a=!1;if(s<0&&(a=!0,s=-s),s>.999999)e=1-r,i=a?-r:r;else{var u=Math.acos(s),h=1/Math.sin(u);e=Math.sin((1-r)*u)*h,i=a?-Math.sin(r*u)*h:Math.sin(r*u)*h}n.x=e*t._x+i*o._x,n.y=e*t._y+i*o._y,n.z=e*t._z+i*o._z,n.w=e*t._w+i*o._w},t.Hermite=function(o,r,n,i,e){var s=e*e,a=e*s,u=2*a-3*s+1,h=-2*a+3*s,y=a-2*s+e,f=a-s;return new t(o._x*u+n._x*h+r._x*y+i._x*f,o._y*u+n._y*h+r._y*y+i._y*f,o._z*u+n._z*h+r._z*y+i._z*f,o._w*u+n._w*h+r._w*y+i._w*f)},t}(),_=function(){function t(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,a.Z.MatrixTrackPrecisionChange&&a.Z.MatrixTrackedMatrices.push(this),this._m=new a.Z.MatrixCurrentType(16),this._updateIdentityStatus(!1)}return Object.defineProperty(t,"Use64Bits",{get:function(){return a.Z.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),t.prototype._markAsUpdated=function(){this.updateFlag=t._updateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},t.prototype._updateIdentityStatus=function(o,r,n,i){void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!0),this.updateFlag=t._updateFlagSeed++,this._isIdentity=o,this._isIdentity3x2=o||n,this._isIdentityDirty=!this._isIdentity&&r,this._isIdentity3x2Dirty=!this._isIdentity3x2&&i},t.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var t=this._m;this._isIdentity=1===t[0]&&0===t[1]&&0===t[2]&&0===t[3]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[7]&&0===t[8]&&0===t[9]&&1===t[10]&&0===t[11]&&0===t[12]&&0===t[13]&&0===t[14]&&1===t[15]}return this._isIdentity},t.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},t.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var t=this._m,o=t[0],r=t[1],n=t[2],i=t[3],e=t[4],s=t[5],a=t[6],u=t[7],h=t[8],y=t[9],f=t[10],_=t[11],c=t[12],p=t[13],l=t[14],x=t[15],m=f*x-l*_,d=y*x-p*_,R=y*l-p*f,z=h*x-c*_,T=h*l-f*c,w=h*p-c*y;return o*+(s*m-a*d+u*R)+r*-(e*m-a*z+u*T)+n*+(e*d-s*z+u*w)+i*-(e*R-s*T+a*w)},t.prototype.toArray=function(){return this._m},t.prototype.asArray=function(){return this._m},t.prototype.invert=function(){return this.invertToRef(this),this},t.prototype.reset=function(){return t.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},t.prototype.add=function(o){var r=new t;return this.addToRef(o,r),r},t.prototype.addToRef=function(t,o){for(var r=this._m,n=o._m,i=t.m,e=0;e<16;e++)n[e]=r[e]+i[e];return o._markAsUpdated(),this},t.prototype.addToSelf=function(t){for(var o=this._m,r=t.m,n=0;n<16;n++)o[n]+=r[n];return this._markAsUpdated(),this},t.prototype.invertToRef=function(o){if(!0===this._isIdentity)return t.IdentityToRef(o),this;var r=this._m,n=r[0],i=r[1],e=r[2],s=r[3],a=r[4],u=r[5],h=r[6],y=r[7],f=r[8],_=r[9],c=r[10],p=r[11],l=r[12],x=r[13],m=r[14],d=r[15],R=c*d-m*p,z=_*d-x*p,T=_*m-x*c,w=f*d-l*p,v=f*m-c*l,F=f*x-l*_,M=+(u*R-h*z+y*T),I=-(a*R-h*w+y*v),A=+(a*z-u*w+y*F),g=-(a*T-u*v+h*F),P=n*M+i*I+e*A+s*g;if(0===P)return o.copyFrom(this),this;var V=1/P,b=h*d-m*y,D=u*d-x*y,C=u*m-x*h,O=a*d-l*y,S=a*m-l*h,L=a*x-l*u,U=h*p-c*y,k=u*p-_*y,B=u*c-_*h,Z=a*p-f*y,q=a*c-f*h,H=a*_-f*u,j=-(i*R-e*z+s*T),E=+(n*R-e*w+s*v),N=-(n*z-i*w+s*F),Y=+(n*T-i*v+e*F),W=+(i*b-e*D+s*C),Q=-(n*b-e*O+s*S),X=+(n*D-i*O+s*L),G=-(n*C-i*S+e*L),J=-(i*U-e*k+s*B),K=+(n*U-e*Z+s*q),$=-(n*k-i*Z+s*H),tt=+(n*B-i*q+e*H);return t.FromValuesToRef(M*V,j*V,W*V,J*V,I*V,E*V,Q*V,K*V,A*V,N*V,X*V,$*V,g*V,Y*V,G*V,tt*V,o),this},t.prototype.addAtIndex=function(t,o){return this._m[t]+=o,this._markAsUpdated(),this},t.prototype.multiplyAtIndex=function(t,o){return this._m[t]*=o,this._markAsUpdated(),this},t.prototype.setTranslationFromFloats=function(t,o,r){return this._m[12]=t,this._m[13]=o,this._m[14]=r,this._markAsUpdated(),this},t.prototype.addTranslationFromFloats=function(t,o,r){return this._m[12]+=t,this._m[13]+=o,this._m[14]+=r,this._markAsUpdated(),this},t.prototype.setTranslation=function(t){return this.setTranslationFromFloats(t._x,t._y,t._z)},t.prototype.getTranslation=function(){return new h(this._m[12],this._m[13],this._m[14])},t.prototype.getTranslationToRef=function(t){return t.x=this._m[12],t.y=this._m[13],t.z=this._m[14],this},t.prototype.removeRotationAndScaling=function(){var o=this.m;return t.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,o[12],o[13],o[14],o[15],this),this._updateIdentityStatus(0===o[12]&&0===o[13]&&0===o[14]&&1===o[15]),this},t.prototype.multiply=function(o){var r=new t;return this.multiplyToRef(o,r),r},t.prototype.copyFrom=function(t){t.copyToArray(this._m);var o=t;return this._updateIdentityStatus(o._isIdentity,o._isIdentityDirty,o._isIdentity3x2,o._isIdentity3x2Dirty),this},t.prototype.copyToArray=function(t,o){void 0===o&&(o=0);var r=this._m;return t[o]=r[0],t[o+1]=r[1],t[o+2]=r[2],t[o+3]=r[3],t[o+4]=r[4],t[o+5]=r[5],t[o+6]=r[6],t[o+7]=r[7],t[o+8]=r[8],t[o+9]=r[9],t[o+10]=r[10],t[o+11]=r[11],t[o+12]=r[12],t[o+13]=r[13],t[o+14]=r[14],t[o+15]=r[15],this},t.prototype.multiplyToRef=function(t,o){return this._isIdentity?(o.copyFrom(t),this):t._isIdentity?(o.copyFrom(this),this):(this.multiplyToArray(t,o._m,0),o._markAsUpdated(),this)},t.prototype.multiplyToArray=function(t,o,r){var n=this._m,i=t.m,e=n[0],s=n[1],a=n[2],u=n[3],h=n[4],y=n[5],f=n[6],_=n[7],c=n[8],p=n[9],l=n[10],x=n[11],m=n[12],d=n[13],R=n[14],z=n[15],T=i[0],w=i[1],v=i[2],F=i[3],M=i[4],I=i[5],A=i[6],g=i[7],P=i[8],V=i[9],b=i[10],D=i[11],C=i[12],O=i[13],S=i[14],L=i[15];return o[r]=e*T+s*M+a*P+u*C,o[r+1]=e*w+s*I+a*V+u*O,o[r+2]=e*v+s*A+a*b+u*S,o[r+3]=e*F+s*g+a*D+u*L,o[r+4]=h*T+y*M+f*P+_*C,o[r+5]=h*w+y*I+f*V+_*O,o[r+6]=h*v+y*A+f*b+_*S,o[r+7]=h*F+y*g+f*D+_*L,o[r+8]=c*T+p*M+l*P+x*C,o[r+9]=c*w+p*I+l*V+x*O,o[r+10]=c*v+p*A+l*b+x*S,o[r+11]=c*F+p*g+l*D+x*L,o[r+12]=m*T+d*M+R*P+z*C,o[r+13]=m*w+d*I+R*V+z*O,o[r+14]=m*v+d*A+R*b+z*S,o[r+15]=m*F+d*g+R*D+z*L,this},t.prototype.equals=function(t){var o=t;if(!o)return!1;if((this._isIdentity||o._isIdentity)&&!this._isIdentityDirty&&!o._isIdentityDirty)return this._isIdentity&&o._isIdentity;var r=this.m,n=o.m;return r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]&&r[3]===n[3]&&r[4]===n[4]&&r[5]===n[5]&&r[6]===n[6]&&r[7]===n[7]&&r[8]===n[8]&&r[9]===n[9]&&r[10]===n[10]&&r[11]===n[11]&&r[12]===n[12]&&r[13]===n[13]&&r[14]===n[14]&&r[15]===n[15]},t.prototype.clone=function(){var o=new t;return o.copyFrom(this),o},t.prototype.getClassName=function(){return"Matrix"},t.prototype.getHashCode=function(){for(var t=0|this._m[0],o=1;o<16;o++)t=397*t^(0|this._m[o]);return t},t.prototype.decompose=function(o,r,n){if(this._isIdentity)return n&&n.setAll(0),o&&o.setAll(1),r&&r.copyFromFloats(0,0,0,1),!0;var i=this._m;if(n&&n.copyFromFloats(i[12],i[13],i[14]),(o=o||c.Vector3[0]).x=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]),o.y=Math.sqrt(i[4]*i[4]+i[5]*i[5]+i[6]*i[6]),o.z=Math.sqrt(i[8]*i[8]+i[9]*i[9]+i[10]*i[10]),this.determinant()<=0&&(o.y*=-1),0===o._x||0===o._y||0===o._z)return r&&r.copyFromFloats(0,0,0,1),!1;if(r){var e=1/o._x,s=1/o._y,a=1/o._z;t.FromValuesToRef(i[0]*e,i[1]*e,i[2]*e,0,i[4]*s,i[5]*s,i[6]*s,0,i[8]*a,i[9]*a,i[10]*a,0,0,0,0,1,c.Matrix[0]),f.FromRotationMatrixToRef(c.Matrix[0],r)}return!0},t.prototype.getRow=function(t){if(t<0||t>3)return null;var o=4*t;return new y(this._m[o+0],this._m[o+1],this._m[o+2],this._m[o+3])},t.prototype.setRow=function(t,o){return this.setRowFromFloats(t,o.x,o.y,o.z,o.w)},t.prototype.transpose=function(){return t.Transpose(this)},t.prototype.transposeToRef=function(o){return t.TransposeToRef(this,o),this},t.prototype.setRowFromFloats=function(t,o,r,n,i){if(t<0||t>3)return this;var e=4*t;return this._m[e+0]=o,this._m[e+1]=r,this._m[e+2]=n,this._m[e+3]=i,this._markAsUpdated(),this},t.prototype.scale=function(o){var r=new t;return this.scaleToRef(o,r),r},t.prototype.scaleToRef=function(t,o){for(var r=0;r<16;r++)o._m[r]=this._m[r]*t;return o._markAsUpdated(),this},t.prototype.scaleAndAddToRef=function(t,o){for(var r=0;r<16;r++)o._m[r]+=this._m[r]*t;return o._markAsUpdated(),this},t.prototype.toNormalMatrix=function(o){var r=c.Matrix[0];this.invertToRef(r),r.transposeToRef(o);var n=o._m;t.FromValuesToRef(n[0],n[1],n[2],0,n[4],n[5],n[6],0,n[8],n[9],n[10],0,0,0,0,1,o)},t.prototype.getRotationMatrix=function(){var o=new t;return this.getRotationMatrixToRef(o),o},t.prototype.getRotationMatrixToRef=function(o){var r=c.Vector3[0];if(!this.decompose(r))return t.IdentityToRef(o),this;var n=this._m,i=1/r._x,e=1/r._y,s=1/r._z;return t.FromValuesToRef(n[0]*i,n[1]*i,n[2]*i,0,n[4]*e,n[5]*e,n[6]*e,0,n[8]*s,n[9]*s,n[10]*s,0,0,0,0,1,o),this},t.prototype.toggleModelMatrixHandInPlace=function(){var t=this._m;t[2]*=-1,t[6]*=-1,t[8]*=-1,t[9]*=-1,t[14]*=-1,this._markAsUpdated()},t.prototype.toggleProjectionMatrixHandInPlace=function(){var t=this._m;t[8]*=-1,t[9]*=-1,t[10]*=-1,t[11]*=-1,this._markAsUpdated()},t.FromArray=function(o,r){void 0===r&&(r=0);var n=new t;return t.FromArrayToRef(o,r,n),n},t.FromArrayToRef=function(t,o,r){for(var n=0;n<16;n++)r._m[n]=t[n+o];r._markAsUpdated()},t.FromFloat32ArrayToRefScaled=function(t,o,r,n){for(var i=0;i<16;i++)n._m[i]=t[i+o]*r;n._markAsUpdated()},Object.defineProperty(t,"IdentityReadOnly",{get:function(){return t._identityReadOnly},enumerable:!1,configurable:!0}),t.FromValuesToRef=function(t,o,r,n,i,e,s,a,u,h,y,f,_,c,p,l,x){var m=x._m;m[0]=t,m[1]=o,m[2]=r,m[3]=n,m[4]=i,m[5]=e,m[6]=s,m[7]=a,m[8]=u,m[9]=h,m[10]=y,m[11]=f,m[12]=_,m[13]=c,m[14]=p,m[15]=l,x._markAsUpdated()},t.FromValues=function(o,r,n,i,e,s,a,u,h,y,f,_,c,p,l,x){var m=new t,d=m._m;return d[0]=o,d[1]=r,d[2]=n,d[3]=i,d[4]=e,d[5]=s,d[6]=a,d[7]=u,d[8]=h,d[9]=y,d[10]=f,d[11]=_,d[12]=c,d[13]=p,d[14]=l,d[15]=x,m._markAsUpdated(),m},t.Compose=function(o,r,n){var i=new t;return t.ComposeToRef(o,r,n,i),i},t.ComposeToRef=function(t,o,r,n){var i=n._m,e=o._x,s=o._y,a=o._z,u=o._w,h=e+e,y=s+s,f=a+a,_=e*h,c=e*y,p=e*f,l=s*y,x=s*f,m=a*f,d=u*h,R=u*y,z=u*f,T=t._x,w=t._y,v=t._z;i[0]=(1-(l+m))*T,i[1]=(c+z)*T,i[2]=(p-R)*T,i[3]=0,i[4]=(c-z)*w,i[5]=(1-(_+m))*w,i[6]=(x+d)*w,i[7]=0,i[8]=(p+R)*v,i[9]=(x-d)*v,i[10]=(1-(_+l))*v,i[11]=0,i[12]=r._x,i[13]=r._y,i[14]=r._z,i[15]=1,n._markAsUpdated()},t.Identity=function(){var o=t.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return o._updateIdentityStatus(!0),o},t.IdentityToRef=function(o){t.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,o),o._updateIdentityStatus(!0)},t.Zero=function(){var o=t.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return o._updateIdentityStatus(!1),o},t.RotationX=function(o){var r=new t;return t.RotationXToRef(o,r),r},t.Invert=function(o){var r=new t;return o.invertToRef(r),r},t.RotationXToRef=function(o,r){var n=Math.sin(o),i=Math.cos(o);t.FromValuesToRef(1,0,0,0,0,i,n,0,0,-n,i,0,0,0,0,1,r),r._updateIdentityStatus(1===i&&0===n)},t.RotationY=function(o){var r=new t;return t.RotationYToRef(o,r),r},t.RotationYToRef=function(o,r){var n=Math.sin(o),i=Math.cos(o);t.FromValuesToRef(i,0,-n,0,0,1,0,0,n,0,i,0,0,0,0,1,r),r._updateIdentityStatus(1===i&&0===n)},t.RotationZ=function(o){var r=new t;return t.RotationZToRef(o,r),r},t.RotationZToRef=function(o,r){var n=Math.sin(o),i=Math.cos(o);t.FromValuesToRef(i,n,0,0,-n,i,0,0,0,0,1,0,0,0,0,1,r),r._updateIdentityStatus(1===i&&0===n)},t.RotationAxis=function(o,r){var n=new t;return t.RotationAxisToRef(o,r,n),n},t.RotationAxisToRef=function(t,o,r){var n=Math.sin(-o),i=Math.cos(-o),e=1-i;t.normalize();var s=r._m;s[0]=t._x*t._x*e+i,s[1]=t._x*t._y*e-t._z*n,s[2]=t._x*t._z*e+t._y*n,s[3]=0,s[4]=t._y*t._x*e+t._z*n,s[5]=t._y*t._y*e+i,s[6]=t._y*t._z*e-t._x*n,s[7]=0,s[8]=t._z*t._x*e-t._y*n,s[9]=t._z*t._y*e+t._x*n,s[10]=t._z*t._z*e+i,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,r._markAsUpdated()},t.RotationAlignToRef=function(t,o,r){var n=h.Cross(o,t),i=h.Dot(o,t),e=1/(1+i),s=r._m;s[0]=n._x*n._x*e+i,s[1]=n._y*n._x*e-n._z,s[2]=n._z*n._x*e+n._y,s[3]=0,s[4]=n._x*n._y*e+n._z,s[5]=n._y*n._y*e+i,s[6]=n._z*n._y*e-n._x,s[7]=0,s[8]=n._x*n._z*e-n._y,s[9]=n._y*n._z*e+n._x,s[10]=n._z*n._z*e+i,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,r._markAsUpdated()},t.RotationYawPitchRoll=function(o,r,n){var i=new t;return t.RotationYawPitchRollToRef(o,r,n,i),i},t.RotationYawPitchRollToRef=function(t,o,r,n){f.RotationYawPitchRollToRef(t,o,r,c.Quaternion[0]),c.Quaternion[0].toRotationMatrix(n)},t.Scaling=function(o,r,n){var i=new t;return t.ScalingToRef(o,r,n,i),i},t.ScalingToRef=function(o,r,n,i){t.FromValuesToRef(o,0,0,0,0,r,0,0,0,0,n,0,0,0,0,1,i),i._updateIdentityStatus(1===o&&1===r&&1===n)},t.Translation=function(o,r,n){var i=new t;return t.TranslationToRef(o,r,n,i),i},t.TranslationToRef=function(o,r,n,i){t.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,o,r,n,1,i),i._updateIdentityStatus(0===o&&0===r&&0===n)},t.Lerp=function(o,r,n){var i=new t;return t.LerpToRef(o,r,n,i),i},t.LerpToRef=function(t,o,r,n){for(var i=n._m,e=t.m,s=o.m,a=0;a<16;a++)i[a]=e[a]*(1-r)+s[a]*r;n._markAsUpdated()},t.DecomposeLerp=function(o,r,n){var i=new t;return t.DecomposeLerpToRef(o,r,n,i),i},t.DecomposeLerpToRef=function(o,r,n,i){var e=c.Vector3[0],s=c.Quaternion[0],a=c.Vector3[1];o.decompose(e,s,a);var u=c.Vector3[2],y=c.Quaternion[1],_=c.Vector3[3];r.decompose(u,y,_);var p=c.Vector3[4];h.LerpToRef(e,u,n,p);var l=c.Quaternion[2];f.SlerpToRef(s,y,n,l);var x=c.Vector3[5];h.LerpToRef(a,_,n,x),t.ComposeToRef(p,l,x,i)},t.LookAtLH=function(o,r,n){var i=new t;return t.LookAtLHToRef(o,r,n,i),i},t.LookAtLHToRef=function(o,r,n,i){var e=c.Vector3[0],s=c.Vector3[1],a=c.Vector3[2];r.subtractToRef(o,a),a.normalize(),h.CrossToRef(n,a,e);var u=e.lengthSquared();0===u?e.x=1:e.normalizeFromLength(Math.sqrt(u)),h.CrossToRef(a,e,s),s.normalize();var y=-h.Dot(e,o),f=-h.Dot(s,o),_=-h.Dot(a,o);t.FromValuesToRef(e._x,s._x,a._x,0,e._y,s._y,a._y,0,e._z,s._z,a._z,0,y,f,_,1,i)},t.LookAtRH=function(o,r,n){var i=new t;return t.LookAtRHToRef(o,r,n,i),i},t.LookAtRHToRef=function(o,r,n,i){var e=c.Vector3[0],s=c.Vector3[1],a=c.Vector3[2];o.subtractToRef(r,a),a.normalize(),h.CrossToRef(n,a,e);var u=e.lengthSquared();0===u?e.x=1:e.normalizeFromLength(Math.sqrt(u)),h.CrossToRef(a,e,s),s.normalize();var y=-h.Dot(e,o),f=-h.Dot(s,o),_=-h.Dot(a,o);t.FromValuesToRef(e._x,s._x,a._x,0,e._y,s._y,a._y,0,e._z,s._z,a._z,0,y,f,_,1,i)},t.OrthoLH=function(o,r,n,i){var e=new t;return t.OrthoLHToRef(o,r,n,i,e),e},t.OrthoLHToRef=function(o,r,n,i,e){var s=2/o,a=2/r,u=2/(i-n),h=-(i+n)/(i-n);t.FromValuesToRef(s,0,0,0,0,a,0,0,0,0,u,0,0,0,h,1,e),e._updateIdentityStatus(1===s&&1===a&&1===u&&0===h)},t.OrthoOffCenterLH=function(o,r,n,i,e,s){var a=new t;return t.OrthoOffCenterLHToRef(o,r,n,i,e,s,a),a},t.OrthoOffCenterLHToRef=function(o,r,n,i,e,s,a){var u=2/(r-o),h=2/(i-n),y=2/(s-e),f=-(s+e)/(s-e),_=(o+r)/(o-r),c=(i+n)/(n-i);t.FromValuesToRef(u,0,0,0,0,h,0,0,0,0,y,0,_,c,f,1,a),a._markAsUpdated()},t.OrthoOffCenterRH=function(o,r,n,i,e,s){var a=new t;return t.OrthoOffCenterRHToRef(o,r,n,i,e,s,a),a},t.OrthoOffCenterRHToRef=function(o,r,n,i,e,s,a){t.OrthoOffCenterLHToRef(o,r,n,i,e,s,a),a._m[10]*=-1},t.PerspectiveLH=function(o,r,n,i){var e=new t,s=2*n/o,a=2*n/r,u=(i+n)/(i-n),h=-2*i*n/(i-n);return t.FromValuesToRef(s,0,0,0,0,a,0,0,0,0,u,1,0,0,h,0,e),e._updateIdentityStatus(!1),e},t.PerspectiveFovLH=function(o,r,n,i){var e=new t;return t.PerspectiveFovLHToRef(o,r,n,i,e),e},t.PerspectiveFovLHToRef=function(o,r,n,i,e,s){void 0===s&&(s=!0);var a=n,u=i,h=1/Math.tan(.5*o),y=s?h/r:h,f=s?h:h*r,_=(u+a)/(u-a),c=-2*u*a/(u-a);t.FromValuesToRef(y,0,0,0,0,f,0,0,0,0,_,1,0,0,c,0,e),e._updateIdentityStatus(!1)},t.PerspectiveFovReverseLHToRef=function(o,r,n,i,e,s){void 0===s&&(s=!0);var a=1/Math.tan(.5*o),u=s?a/r:a,h=s?a:a*r;t.FromValuesToRef(u,0,0,0,0,h,0,0,0,0,-n,1,0,0,1,0,e),e._updateIdentityStatus(!1)},t.PerspectiveFovRH=function(o,r,n,i){var e=new t;return t.PerspectiveFovRHToRef(o,r,n,i,e),e},t.PerspectiveFovRHToRef=function(o,r,n,i,e,s){void 0===s&&(s=!0);var a=n,u=i,h=1/Math.tan(.5*o),y=s?h/r:h,f=s?h:h*r,_=-(u+a)/(u-a),c=-2*u*a/(u-a);t.FromValuesToRef(y,0,0,0,0,f,0,0,0,0,_,-1,0,0,c,0,e),e._updateIdentityStatus(!1)},t.PerspectiveFovReverseRHToRef=function(o,r,n,i,e,s){void 0===s&&(s=!0);var a=1/Math.tan(.5*o),u=s?a/r:a,h=s?a:a*r;t.FromValuesToRef(u,0,0,0,0,h,0,0,0,0,-n,-1,0,0,-1,0,e),e._updateIdentityStatus(!1)},t.PerspectiveFovWebVRToRef=function(t,o,r,n,i){void 0===i&&(i=!1);var e=i?-1:1,s=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),u=Math.tan(t.leftDegrees*Math.PI/180),h=Math.tan(t.rightDegrees*Math.PI/180),y=2/(u+h),f=2/(s+a),_=n._m;_[0]=y,_[1]=_[2]=_[3]=_[4]=0,_[5]=f,_[6]=_[7]=0,_[8]=(u-h)*y*.5,_[9]=-(s-a)*f*.5,_[10]=-r/(o-r),_[11]=1*e,_[12]=_[13]=_[15]=0,_[14]=-2*r*o/(r-o),n._markAsUpdated()},t.GetFinalMatrix=function(o,r,n,i,e,s){var a=o.width,u=o.height,h=o.x,y=o.y,f=t.FromValues(a/2,0,0,0,0,-u/2,0,0,0,0,s-e,0,h+a/2,u/2+y,e,1),_=c.Matrix[0];return r.multiplyToRef(n,_),_.multiplyToRef(i,_),_.multiply(f)},t.GetAsMatrix2x2=function(t){var o=t.m,r=[o[0],o[1],o[4],o[5]];return a.Z.MatrixUse64Bits?r:new Float32Array(r)},t.GetAsMatrix3x3=function(t){var o=t.m,r=[o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]];return a.Z.MatrixUse64Bits?r:new Float32Array(r)},t.Transpose=function(o){var r=new t;return t.TransposeToRef(o,r),r},t.TransposeToRef=function(t,o){var r=o._m,n=t.m;r[0]=n[0],r[1]=n[4],r[2]=n[8],r[3]=n[12],r[4]=n[1],r[5]=n[5],r[6]=n[9],r[7]=n[13],r[8]=n[2],r[9]=n[6],r[10]=n[10],r[11]=n[14],r[12]=n[3],r[13]=n[7],r[14]=n[11],r[15]=n[15],o._updateIdentityStatus(t._isIdentity,t._isIdentityDirty)},t.Reflection=function(o){var r=new t;return t.ReflectionToRef(o,r),r},t.ReflectionToRef=function(o,r){o.normalize();var n=o.normal.x,i=o.normal.y,e=o.normal.z,s=-2*n,a=-2*i,u=-2*e;t.FromValuesToRef(s*n+1,a*n,u*n,0,s*i,a*i+1,u*i,0,s*e,a*e,u*e+1,0,s*o.d,a*o.d,u*o.d,1,r)},t.FromXYZAxesToRef=function(o,r,n,i){t.FromValuesToRef(o._x,o._y,o._z,0,r._x,r._y,r._z,0,n._x,n._y,n._z,0,0,0,0,1,i)},t.FromQuaternionToRef=function(t,o){var r=t._x*t._x,n=t._y*t._y,i=t._z*t._z,e=t._x*t._y,s=t._z*t._w,a=t._z*t._x,u=t._y*t._w,h=t._y*t._z,y=t._x*t._w;o._m[0]=1-2*(n+i),o._m[1]=2*(e+s),o._m[2]=2*(a-u),o._m[3]=0,o._m[4]=2*(e-s),o._m[5]=1-2*(i+r),o._m[6]=2*(h+y),o._m[7]=0,o._m[8]=2*(a+u),o._m[9]=2*(h-y),o._m[10]=1-2*(n+r),o._m[11]=0,o._m[12]=0,o._m[13]=0,o._m[14]=0,o._m[15]=1,o._markAsUpdated()},t._updateFlagSeed=0,t._identityReadOnly=t.Identity(),t}(),c=function(){function t(){}return t.Vector3=e.B.BuildArray(6,h.Zero),t.Matrix=e.B.BuildArray(2,_.Identity),t.Quaternion=e.B.BuildArray(3,f.Zero),t}(),p=function(){function t(){}return t.Vector2=e.B.BuildArray(3,u.Zero),t.Vector3=e.B.BuildArray(13,h.Zero),t.Vector4=e.B.BuildArray(3,y.Zero),t.Quaternion=e.B.BuildArray(2,f.Zero),t.Matrix=e.B.BuildArray(8,_.Identity),t}();s.Q.RegisteredTypes["BABYLON.Vector2"]=u,s.Q.RegisteredTypes["BABYLON.Vector3"]=h,s.Q.RegisteredTypes["BABYLON.Vector4"]=y,s.Q.RegisteredTypes["BABYLON.Matrix"]=_}}]);
//# sourceMappingURL=088d5a4e-75bcffe53719928ecf27.js.map