`!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t=t||self).OIMO={})}(this,function(t){"use strict";void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:0<t?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),s=1;s<arguments.length;s++){var h=arguments[s];if(null!=h)for(var e in h)Object.prototype.hasOwnProperty.call(h,e)&&(i[e]=h[e])}return i});var s,h,e,a,o="1.0.9",n=0,r=1,l=2,c=3,m=0,p=0,v=.005,Bs={sqrt:Math.sqrt,abs:Math.abs,floor:Math.floor,cos:Math.cos,sin:Math.sin,acos:Math.acos,asin:Math.asin,atan2:Math.atan2,round:Math.round,pow:Math.pow,max:Math.max,min:Math.min,random:Math.random,degtorad:.017453292519943295,radtodeg:57.29577951308232,PI:3.141592653589793,TwoPI:6.283185307179586,PI90:1.570796326794896,PI270:4.712388980384689,INF:1/0,EPZ:1e-5,EPZ2:1e-6,lerp:function(t,i,s){return(1-s)*t+s*i},randInt:function(t,i){return t+Bs.floor(Bs.random()*(i-t+1))},rand:function(t,i){return t+Bs.random()*(i-t)},generateUUID:(h="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),a=0,function(){for(var t=0;t<36;t++)e[t]=8===t||13===t||18===t||23===t?"-":14===t?"4":(a<=2&&(a=33554432+16777216*Math.random()|0),s=15&a,a>>=4,h[19===t?3&s|8:s]);return e.join("")}),int:function(t){return Bs.floor(t)},fix:function(t,i){return t.toFixed(i||3,10)},clamp:function(t,i,s){return Bs.max(i,Bs.min(s,t))},distance:function(t,i){var s=i[0]-t[0],h=i[1]-t[1],e=i[2]-t[2];return Bs.sqrt(s*s+h*h+e*e)},acosClamp:function(t){return 1<t?0:t<-1?Bs.PI:Bs.acos(t)},distanceVector:function(t,i){var s=t.x-i.x,h=t.y-i.y,e=t.z-i.z;return s*s+h*h+e*e},dotVectors:function(t,i){return t.x*i.x+t.y*i.y+t.z*i.z}};function d(t,i){console.error("[OIMO] "+t+": "+i)}function u(t){this.parent=t,this.infos=new Float32Array(13),this.f=[0,0,0],this.times=[0,0,0,0],this.broadPhase=this.parent.broadPhaseType,this.version=o,this.fps=0,this.tt=0,this.broadPhaseTime=0,this.narrowPhaseTime=0,this.solvingTime=0,this.totalTime=0,this.updateTime=0,this.MaxBroadPhaseTime=0,this.MaxNarrowPhaseTime=0,this.MaxSolvingTime=0,this.MaxTotalTime=0,this.MaxUpdateTime=0}function yi(t,i,s){this.x=t||0,this.y=i||0,this.z=s||0}function x(t,i,s,h){this.x=t||0,this.y=i||0,this.z=s||0,this.w=void 0!==h?h:1}function y(t,i,s,h,e,a,o,n,r){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("OIMO.Mat33: the constructor no longer reads arguments. use .set() instead.")}function f(t,i,s,h,e,a){this.elements=new Float32Array(6);var o=this.elements;o[0]=t||0,o[1]=s||0,o[2]=e||0,o[3]=i||0,o[4]=h||0,o[5]=a||0}Object.assign(u.prototype,{setTime:function(t){this.times[t||0]=performance.now()},resetMax:function(){this.MaxBroadPhaseTime=0,this.MaxNarrowPhaseTime=0,this.MaxSolvingTime=0,this.MaxTotalTime=0,this.MaxUpdateTime=0},calcBroadPhase:function(){this.setTime(2),this.broadPhaseTime=this.times[2]-this.times[1]},calcNarrowPhase:function(){this.setTime(3),this.narrowPhaseTime=this.times[3]-this.times[2]},calcEnd:function(){this.setTime(2),this.solvingTime=this.times[2]-this.times[1],this.totalTime=this.times[2]-this.times[0],this.updateTime=this.totalTime-(this.broadPhaseTime+this.narrowPhaseTime+this.solvingTime),100===this.tt&&this.resetMax(),100<this.tt&&(this.broadPhaseTime>this.MaxBroadPhaseTime&&(this.MaxBroadPhaseTime=this.broadPhaseTime),this.narrowPhaseTime>this.MaxNarrowPhaseTime&&(this.MaxNarrowPhaseTime=this.narrowPhaseTime),this.solvingTime>this.MaxSolvingTime&&(this.MaxSolvingTime=this.solvingTime),this.totalTime>this.MaxTotalTime&&(this.MaxTotalTime=this.totalTime),this.updateTime>this.MaxUpdateTime&&(this.MaxUpdateTime=this.updateTime)),this.upfps(),this.tt++,500<this.tt&&(this.tt=0)},upfps:function(){this.f[1]=Date.now(),this.f[1]-1e3>this.f[0]&&(this.f[0]=this.f[1],this.fps=this.f[2],this.f[2]=0),this.f[2]++},show:function(){return["Oimo.js "+this.version+"<br>",this.broadPhase+"<br><br>","FPS: "+this.fps+" fps<br><br>","rigidbody "+this.parent.numRigidBodies+"<br>","contact "+this.parent.numContacts+"<br>","ct-point "+this.parent.numContactPoints+"<br>","paircheck "+this.parent.broadPhase.numPairChecks+"<br>","island "+this.parent.numIslands+"<br><br>","Time in milliseconds<br><br>","broadphase "+Bs.fix(this.broadPhaseTime)+" | "+Bs.fix(this.MaxBroadPhaseTime)+"<br>","narrowphase "+Bs.fix(this.narrowPhaseTime)+" | "+Bs.fix(this.MaxNarrowPhaseTime)+"<br>","solving "+Bs.fix(this.solvingTime)+" | "+Bs.fix(this.MaxSolvingTime)+"<br>","total "+Bs.fix(this.totalTime)+" | "+Bs.fix(this.MaxTotalTime)+"<br>","updating &n`

This file has been truncated. show original