From ce9bf0a88cc026516fc55245d9a5fa2bf66a6540 Mon Sep 17 00:00:00 2001 From: bmoren Date: Mon, 29 Jun 2020 19:09:21 +0000 Subject: [PATCH] Github Action: Auto Minified JS and CSS files --- p5.collide2d.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p5.collide2d.min.js b/p5.collide2d.min.js index 6ef7528..d8f8e62 100644 --- a/p5.collide2d.min.js +++ b/p5.collide2d.min.js @@ -1 +1 @@ -console.log("### p5.collide v0.7 ###"),p5.prototype._collideDebug=!1,p5.prototype.collideDebug=function(a){_collideDebug=a},p5.prototype.collideRectRect=function(a,b,c,d,e,f,g,h){return!!(a+c>=e&&a<=e+g&&b+d>=f&&b<=f+h)},p5.prototype.collideRectRectVector=function(a,b,c,d){return p5.prototype.collideRectRect(a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y)},p5.prototype.collideRectCircle=function(a,b,c,d,e,f,g){var h=e,i=f;ea+c&&(h=a+c),fb+d&&(i=b+d);var j=this.dist(e,f,h,i);return!!(j<=g/2)},p5.prototype.collideRectCircleVector=function(a,b,d,c){return p5.prototype.collideRectCircle(a.x,a.y,b.x,b.y,d.x,d.y,c)},p5.prototype.collideCircleCircle=function(a,b,c,d,e,f){return!!(this.dist(a,b,d,e)<=c/2+f/2)},p5.prototype.collideCircleCircleVector=function(a,b,c,d){return p5.prototype.collideCircleCircle(a.x,a.y,b,c.x,c.y,d)},p5.prototype.collidePointCircle=function(a,b,c,e,f){return!!(this.dist(a,b,c,e)<=f/2)},p5.prototype.collidePointCircleVector=function(a,b,c){return p5.prototype.collidePointCircle(a.x,a.y,b.x,b.y,c)},p5.prototype.collidePointEllipse=function(a,b,c,d,e,f){var g=e/2,h=f/2;if(a>c+g||ad+h||b=-k},p5.prototype.collidePointEllipseVector=function(a,b,c){return p5.prototype.collidePointEllipse(a.x,a.y,b.x,b.y,c.x,c.y)},p5.prototype.collidePointRect=function(a,b,c,d,e,f){return!!(a>=c&&a<=c+e&&b>=d&&b<=d+f)},p5.prototype.collidePointRectVector=function(a,b,c){return p5.prototype.collidePointRect(a.x,a.y,b.x,b.y,c.x,c.y)},p5.prototype.collidePointLine=function(a,b,c,d,e,f,g){var h=this.dist(a,b,c,d),i=this.dist(a,b,e,f),j=this.dist(c,d,e,f);return void 0===g&&(g=.1),!!(h+i>=j-g&&h+i<=j+g)},p5.prototype.collidePointLineVector=function(a,b,c,d){return p5.prototype.collidePointLine(a.x,a.y,b.x,b.y,c.x,c.y,d)},p5.prototype.collideLineCircle=function(a,b,c,d,e,f,g){var h=this.collidePointCircle(a,b,e,f,g),i=this.collidePointCircle(c,d,e,f,g);if(h||i)return!0;var j=a-c,k=b-d,l=this.sqrt(j*j+k*k),m=((e-a)*(c-a)+(f-b)*(d-b))/this.pow(l,2),n=a+m*(c-a),o=b+m*(d-b),p=this.collidePointLine(n,o,a,b,c,d);if(!p)return!1;this._collideDebug&&this.ellipse(n,o,10,10),j=n-e,k=o-f;var q=this.sqrt(j*j+k*k);return!!(q<=g/2)},p5.prototype.collideLineCircleVector=function(a,b,d,c){return p5.prototype.collideLineCircle(a.x,a.y,b.x,b.y,d.x,d.y,c)},p5.prototype.collideLineLine=function(a,b,c,d,e,f,g,h,i){var j,k=((g-e)*(b-f)-(h-f)*(a-e))/((h-f)*(c-a)-(g-e)*(d-b)),l=((c-a)*(b-f)-(d-b)*(a-e))/((h-f)*(c-a)-(g-e)*(d-b));if(0<=k&&1>=k&&0<=l&&1>=l){if(this._collideDebug||i)var m=a+k*(c-a),n=b+k*(d-b);return this._collideDebug&&this.ellipse(m,n,10,10),!i||(j={x:m,y:n},j)}return!!i&&(j={x:!1,y:!1},j)},p5.prototype.collideLineLineVector=function(a,b,c,d,e){return p5.prototype.collideLineLine(a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y,e)},p5.prototype.collideLineRect=function(a,b,c,d,e,f,g,h,i){var j,k,l,m,n;return i?(j=this.collideLineLine(a,b,c,d,e,f,e,f+h,!0),k=this.collideLineLine(a,b,c,d,e+g,f,e+g,f+h,!0),l=this.collideLineLine(a,b,c,d,e,f,e+g,f,!0),m=this.collideLineLine(a,b,c,d,e,f+h,e+g,f+h,!0),n={left:j,right:k,top:l,bottom:m}):(j=this.collideLineLine(a,b,c,d,e,f,e,f+h),k=this.collideLineLine(a,b,c,d,e+g,f,e+g,f+h),l=this.collideLineLine(a,b,c,d,e,f,e+g,f),m=this.collideLineLine(a,b,c,d,e,f+h,e+g,f+h)),!!(j||k||l||m)&&(!i||n)},p5.prototype.collideLineRectVector=function(a,b,c,d,e){return p5.prototype.collideLineRect(a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y,e)},p5.prototype.collidePointPoly=function(a,b,c){for(var d=!1,e=0,f=0;fb&&h.yb)&&a<(h.x-g.x)*(b-g.y)/(h.y-g.y)+g.x&&(d=!d)}return d},p5.prototype.collidePointPolyVector=function(a,b){return p5.prototype.collidePointPoly(a.x,a.y,b)},p5.prototype.collideCirclePoly=function(a,b,c,d,e){e===void 0&&(e=!1);for(var f=0,g=0;g=-g/2)return!0}return!1},p5.prototype.collidePointArcVector=function(b,c,a,d,e,f){return p5.prototype.collidePointArc(b.x,b.y,c.x,c.y,a,d,e,f)}; \ No newline at end of file +console.log("### p5.collide v0.7.1 ###"),p5.prototype._collideDebug=!1,p5.prototype.collideDebug=function(a){_collideDebug=a},p5.prototype.collideRectRect=function(a,b,c,d,e,f,g,h){return!!(a+c>=e&&a<=e+g&&b+d>=f&&b<=f+h)},p5.prototype.collideRectRectVector=function(a,b,c,d){return p5.prototype.collideRectRect(a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y)},p5.prototype.collideRectCircle=function(a,b,c,d,e,f,g){var h=e,i=f;ea+c&&(h=a+c),fb+d&&(i=b+d);var j=this.dist(e,f,h,i);return!!(j<=g/2)},p5.prototype.collideRectCircleVector=function(a,b,d,c){return p5.prototype.collideRectCircle(a.x,a.y,b.x,b.y,d.x,d.y,c)},p5.prototype.collideCircleCircle=function(a,b,c,d,e,f){return!!(this.dist(a,b,d,e)<=c/2+f/2)},p5.prototype.collideCircleCircleVector=function(a,b,c,d){return p5.prototype.collideCircleCircle(a.x,a.y,b,c.x,c.y,d)},p5.prototype.collidePointCircle=function(a,b,c,e,f){return!!(this.dist(a,b,c,e)<=f/2)},p5.prototype.collidePointCircleVector=function(a,b,c){return p5.prototype.collidePointCircle(a.x,a.y,b.x,b.y,c)},p5.prototype.collidePointEllipse=function(a,b,c,d,e,f){var g=e/2,h=f/2;if(a>c+g||ad+h||b=-k},p5.prototype.collidePointEllipseVector=function(a,b,c){return p5.prototype.collidePointEllipse(a.x,a.y,b.x,b.y,c.x,c.y)},p5.prototype.collidePointRect=function(a,b,c,d,e,f){return!!(a>=c&&a<=c+e&&b>=d&&b<=d+f)},p5.prototype.collidePointRectVector=function(a,b,c){return p5.prototype.collidePointRect(a.x,a.y,b.x,b.y,c.x,c.y)},p5.prototype.collidePointLine=function(a,b,c,d,e,f,g){var h=this.dist(a,b,c,d),i=this.dist(a,b,e,f),j=this.dist(c,d,e,f);return void 0===g&&(g=.1),!!(h+i>=j-g&&h+i<=j+g)},p5.prototype.collidePointLineVector=function(a,b,c,d){return p5.prototype.collidePointLine(a.x,a.y,b.x,b.y,c.x,c.y,d)},p5.prototype.collideLineCircle=function(a,b,c,d,e,f,g){var h=this.collidePointCircle(a,b,e,f,g),i=this.collidePointCircle(c,d,e,f,g);if(h||i)return!0;var j=a-c,k=b-d,l=this.sqrt(j*j+k*k),m=((e-a)*(c-a)+(f-b)*(d-b))/this.pow(l,2),n=a+m*(c-a),o=b+m*(d-b),p=this.collidePointLine(n,o,a,b,c,d);if(!p)return!1;this._collideDebug&&this.ellipse(n,o,10,10),j=n-e,k=o-f;var q=this.sqrt(j*j+k*k);return!!(q<=g/2)},p5.prototype.collideLineCircleVector=function(a,b,d,c){return p5.prototype.collideLineCircle(a.x,a.y,b.x,b.y,d.x,d.y,c)},p5.prototype.collideLineLine=function(a,b,c,d,e,f,g,h,i){var j,k=((g-e)*(b-f)-(h-f)*(a-e))/((h-f)*(c-a)-(g-e)*(d-b)),l=((c-a)*(b-f)-(d-b)*(a-e))/((h-f)*(c-a)-(g-e)*(d-b));if(0<=k&&1>=k&&0<=l&&1>=l){if(this._collideDebug||i)var m=a+k*(c-a),n=b+k*(d-b);return this._collideDebug&&this.ellipse(m,n,10,10),!i||(j={x:m,y:n},j)}return!!i&&(j={x:!1,y:!1},j)},p5.prototype.collideLineLineVector=function(a,b,c,d,e){return p5.prototype.collideLineLine(a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y,e)},p5.prototype.collideLineRect=function(a,b,c,d,e,f,g,h,i){var j,k,l,m,n;return i?(j=this.collideLineLine(a,b,c,d,e,f,e,f+h,!0),k=this.collideLineLine(a,b,c,d,e+g,f,e+g,f+h,!0),l=this.collideLineLine(a,b,c,d,e,f,e+g,f,!0),m=this.collideLineLine(a,b,c,d,e,f+h,e+g,f+h,!0),n={left:j,right:k,top:l,bottom:m}):(j=this.collideLineLine(a,b,c,d,e,f,e,f+h),k=this.collideLineLine(a,b,c,d,e+g,f,e+g,f+h),l=this.collideLineLine(a,b,c,d,e,f,e+g,f),m=this.collideLineLine(a,b,c,d,e,f+h,e+g,f+h)),!!(j||k||l||m)&&(!i||n)},p5.prototype.collideLineRectVector=function(a,b,c,d,e){return p5.prototype.collideLineRect(a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y,e)},p5.prototype.collidePointPoly=function(a,b,c){for(var d=!1,e=0,f=0;fb&&h.yb)&&a<(h.x-g.x)*(b-g.y)/(h.y-g.y)+g.x&&(d=!d)}return d},p5.prototype.collidePointPolyVector=function(a,b){return p5.prototype.collidePointPoly(a.x,a.y,b)},p5.prototype.collideCirclePoly=function(a,b,c,d,e){e===void 0&&(e=!1);for(var f=0,g=0;g=-g/2)return!0}return!1},p5.prototype.collidePointArcVector=function(b,c,a,d,e,f){return p5.prototype.collidePointArc(b.x,b.y,c.x,c.y,a,d,e,f)}; \ No newline at end of file