idk
This commit is contained in:
1 parent
40fdf2a04e
commit
cdba43e8ec
175 files changed
+35233
No files matched your search
@@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* @pixi/graphics-extras - v7.3.1
|
||||
* Compiled Fri, 22 Sep 2023 18:50:32 UTC
|
||||
*
|
||||
* @pixi/graphics-extras is licensed under the MIT License.
|
||||
* http://www.opensource.org/licenses/mit-license
|
||||
*/
|
||||
(function(v,T){"use strict";function R(e,a,i,o,s){if(s<=0)return this.drawRect(e,a,i,o);const r=Math.min(s,Math.min(i,o)/2),M=e+i,n=a+o,t=[e+r,a,M-r,a,M,a+r,M,n-r,M-r,n,e+r,n,e,n-r,e,a+r];for(let h=t.length-1;h>=2;h-=2)t[h]===t[h-2]&&t[h-1]===t[h-3]&&t.splice(h-1,2);return this.drawPolygon(t)}function p(e,a,i,o,s){if(s===0)return this.drawRect(e,a,i,o);const r=Math.min(i,o)/2,M=Math.min(r,Math.max(-r,s)),n=e+i,t=a+o,h=M<0?-M:0,l=Math.abs(M);return this.moveTo(e,a+l).arcTo(e+h,a+h,e+l,a,l).lineTo(n-l,a).arcTo(n-h,a+h,n,a+l,l).lineTo(n,t-l).arcTo(n-h,t-h,e+i-l,t,l).lineTo(e+l,t).arcTo(e+h,t-h,e,t-l,l).closePath()}function b(e,a,i,o,s=0){o=Math.max(o|0,3);const r=-1*Math.PI/2+s,M=Math.PI*2/o,n=[];for(let t=0;t<o;t++){const h=t*M+r;n.push(e+i*Math.cos(h),a+i*Math.sin(h))}return this.drawPolygon(n)}function C(e,a,i,o,s,r=0){if(o=Math.max(o|0,3),s<=0)return this.drawRegularPolygon(e,a,i,o,r);const M=i*Math.sin(Math.PI/o)-.001;s=Math.min(s,M);const n=-1*Math.PI/2+r,t=Math.PI*2/o,h=(o-2)*Math.PI/o/2;for(let l=0;l<o;l++){const c=l*t+n,u=e+i*Math.cos(c),y=a+i*Math.sin(c),d=c+Math.PI+h,P=c-Math.PI-h,x=u+s*Math.cos(d),f=y+s*Math.sin(d),w=u+s*Math.cos(P),g=y+s*Math.sin(P);l===0?this.moveTo(x,f):this.lineTo(x,f),this.quadraticCurveTo(u,y,w,g)}return this.closePath()}function q(e,a,i){var o;const s=(n,t)=>{const h=t.x-n.x,l=t.y-n.y,c=Math.sqrt(h*h+l*l),u=h/c,y=l/c;return{len:c,nx:u,ny:y}},r=(n,t)=>{n===0?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)};let M=a[a.length-1];for(let n=0;n<a.length;n++){const t=a[n%a.length],h=(o=t.radius)!=null?o:i;if(h<=0){r(n,t),M=t;continue}const l=a[(n+1)%a.length],c=s(t,M),u=s(t,l);if(c.len<1e-4||u.len<1e-4){r(n,t),M=t;continue}let y=Math.asin(c.nx*u.ny-c.ny*u.nx),d=1,P=!1;c.nx*u.nx-c.ny*-u.ny<0?y<0?y=Math.PI+y:(y=Math.PI-y,d=-1,P=!0):y>0&&(d=-1,P=!0);const x=y/2;let f,w=Math.abs(Math.cos(x)*h/Math.sin(x));w>Math.min(c.len/2,u.len/2)?(w=Math.min(c.len/2,u.len/2),f=Math.abs(w*Math.sin(x)/Math.cos(x))):f=h;const g=t.x+u.nx*w+-u.ny*f*d,m=t.y+u.ny*w+u.nx*f*d,I=Math.atan2(c.ny,c.nx)+Math.PI/2*d,D=Math.atan2(u.ny,u.nx)-Math.PI/2*d;n===0&&e.moveTo(g+Math.cos(I)*f,m+Math.sin(I)*f),e.arc(g,m,f,I,D,P),M=t}}function S(e,a,i){var o;const s=(n,t)=>Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2),r=(n,t,h)=>({x:n.x+(t.x-n.x)*h,y:n.y+(t.y-n.y)*h}),M=a.length;for(let n=0;n<M;n++){const t=a[(n+1)%M],h=(o=t.radius)!=null?o:i;if(h<=0){n===0?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y);continue}const l=a[n],c=a[(n+2)%M],u=s(l,t);let y;if(u<1e-4)y=t;else{const x=Math.min(u/2,h);y=r(t,l,x/u)}const d=s(c,t);let P;if(d<1e-4)P=t;else{const x=Math.min(d/2,h);P=r(t,c,x/d)}n===0?e.moveTo(y.x,y.y):e.lineTo(y.x,y.y),e.quadraticCurveTo(t.x,t.y,P.x,P.y)}}function F(e,a,i){return e.length<3?this:(i?S(this,e,a):q(this,e,a),this.closePath())}class H extends T.Polygon{constructor(a,i,o,s,r,M=0){r=r||s/2;const n=-1*Math.PI/2+M,t=o*2,h=T.PI_2/t,l=[];for(let c=0;c<t;c++){const u=c%2?r:s,y=c*h+n;l.push(a+u*Math.cos(y),i+u*Math.sin(y))}super(l)}}function X(e,a,i,o,s,r=0){return this.drawPolygon(new H(e,a,i,o,s,r))}function j(e,a,i,o,s=0,r=Math.PI*2){return Math.abs(r-s)>=Math.PI*2?this.drawCircle(e,a,o).beginHole().drawCircle(e,a,i).endHole():(this.finishPoly(),this.arc(e,a,i,r,s,!0).arc(e,a,o,s,r,!1).finishPoly(),this)}Object.defineProperties(v.Graphics.prototype,{drawTorus:{value:j},drawChamferRect:{value:R},drawFilletRect:{value:p},drawRegularPolygon:{value:b},drawRoundedPolygon:{value:C},drawRoundedShape:{value:F},drawStar:{value:X}})})(PIXI,PIXI);
|
||||
// Disabled to avoid warnings in Chrome (see https://github.com/4ian/GDevelop/pull/3947)
|
||||
// //# sourceMappingURL=graphics-extras.min.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
var gdjs;(function(l){const n=class{constructor(t,i){this._positionXIsUpToDate=!1;this._positionYIsUpToDate=!1;this._transformationIsUpToDate=!1;this._antialiasingFilter=null;this._object=t,this._graphics=new PIXI.Graphics,i.getLayer("").getRenderer().addRendererObject(this._graphics,t.getZOrder()),this.updateAntialiasing()}getRendererObject(){return this._graphics}clear(){this._graphics.clear(),this.invalidateBounds()}drawRectangle(t,i,a,s){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawRect(t,i,a-t,s-i),this._graphics.endFill(),this.invalidateBounds()}drawCircle(t,i,a){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawCircle(t,i,a),this._graphics.endFill(),this.invalidateBounds()}drawLine(t,i,a,s,e){if(this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),s===i)this._graphics.drawRect(t,i-e/2,a-t,e);else{const o=Math.atan2(s-i,a-t),h=Math.sin(o)*e,r=Math.cos(o)*e;this._graphics.drawPolygon(t+h,i-r,t-h,i+r,a-h,s+r,a+h,s-r)}this._graphics.endFill(),this.invalidateBounds()}drawLineV2(t,i,a,s,e){this._graphics.lineStyle(e,this._object._outlineColor,this._object._outlineOpacity/255),this._graphics.moveTo(t,i),this._graphics.lineTo(a,s),this._graphics.endFill(),this.invalidateBounds()}drawEllipse(t,i,a,s){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawEllipse(t,i,a/2,s/2),this._graphics.endFill(),this.invalidateBounds()}drawRoundedRectangle(t,i,a,s,e){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawRoundedRect(t,i,a-t,s-i,e),this._graphics.closePath(),this._graphics.endFill(),this.invalidateBounds()}drawChamferRectangle(t,i,a,s,e){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawChamferRect(t,i,a-t,s-i,e),this._graphics.closePath(),this._graphics.endFill(),this.invalidateBounds()}drawRegularPolygon(t,i,a,s,e){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawRegularPolygon(t,i,s,a,e?l.toRad(e):0),this._graphics.closePath(),this._graphics.endFill(),this.invalidateBounds()}drawStar(t,i,a,s,e,o){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.drawStar(t,i,a,s,e||s/2,o?l.toRad(o):0),this._graphics.closePath(),this._graphics.endFill(),this.invalidateBounds()}drawArc(t,i,a,s,e,o,h){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.moveTo(t+a*Math.cos(l.toRad(s)),i+a*Math.sin(l.toRad(s))),this._graphics.arc(t,i,a,l.toRad(s),l.toRad(e),!!o),h&&this._graphics.closePath(),this._graphics.endFill(),this.invalidateBounds()}drawBezierCurve(t,i,a,s,e,o,h,r){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.moveTo(t,i),this._graphics.bezierCurveTo(a,s,e,o,h,r),this._graphics.endFill(),this.invalidateBounds()}drawQuadraticCurve(t,i,a,s,e,o){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255),this._graphics.moveTo(t,i),this._graphics.quadraticCurveTo(a,s,e,o),this._graphics.endFill(),this.invalidateBounds()}beginFillPath(){this.updateOutline(),this._graphics.beginFill(this._object._fillColor,this._object._fillOpacity/255)}endFillPath(){this._graphics.endFill(),this.invalidateBounds()}drawPathMoveTo(t,i){this._graphics.moveTo(t,i)}drawPathLineTo(t,i){this._graphics.lineTo(t,i),this.invalidateBounds()}drawPathBezierCurveTo(t,i,a,s,e,o){this._graphics.bezierCurveTo(t,i,a,s,e,o),this.invalidateBounds()}drawPathArc(t,i,a,s,e,o){this._graphics.arc(t,i,a,l.toRad(s),l.toRad(e),!!o),this.invalidateBounds()}drawPathQuadraticCurveTo(t,i,a,s){this._graphics.quadraticCurveTo(t,i,a,s),this.invalidateBounds()}closePath(){this._graphics.closePath(),this.invalidateBounds()}updateOutline(){this._graphics.lineStyle(this._object._outlineSize,this._object._outlineColor,this._object._outlineOpacity/255)}invalidateBounds(){this._object.invalidateBounds(),this._positionXIsUpToDate=!1,this._positionYIsUpToDate=!1}updatePreRender(){this.updatePositionIfNeeded()}updatePositionX(){this._object._useAbsoluteCoordinates?(this._graphics.pivot.x=0,this._graphics.position.x=0):(this._graphics.pivot.x=this._object.getRotationCenterX(),this._graphics.position.x=this._object.x+this._graphics.pivot.x*Math.abs(this._graphics.scale.x)),this._transformationIsUpToDate=!1}updatePositionY(){this._object._useAbsoluteCoordinates?(this._graphics.pivot.y=0,this._graphics.position.y=0):(this._graphics.pivot.y=this._object.getRotationCenterY(),this._graphics.position.y=this._object.y+this._graphics.pivot.y*Math.abs(this._graphics.scale.y)),this._transformationIsUpToDate=!1}updatePositioLine truncated
|
||||
//# sourceMappingURL=shapepainterruntimeobject-pixi-renderer.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
var gdjs;(function(s){const n=class extends s.RuntimeObject{constructor(e,t){super(e,t);this._scaleX=1;this._scaleY=1;this._blendMode=0;this._flippedX=!1;this._flippedY=!1;this._customCenter=null;this._customCollisionMask=null;this._fillColor=parseInt(s.rgbToHex(t.fillColor.r,t.fillColor.g,t.fillColor.b),16),this._outlineColor=parseInt(s.rgbToHex(t.outlineColor.r,t.outlineColor.g,t.outlineColor.b),16),this._fillOpacity=t.fillOpacity,this._outlineOpacity=t.outlineOpacity,this._outlineSize=t.outlineSize,this._useAbsoluteCoordinates=t.absoluteCoordinates,this._clearBetweenFrames=t.clearBetweenFrames,this._antialiasing=t.antialiasing,this._renderer=new s.ShapePainterRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(e,t){return(e.fillColor.r!==t.fillColor.r||e.fillColor.g!==t.fillColor.g||e.fillColor.b!==t.fillColor.b)&&this.setFillColor(""+t.fillColor.r+";"+t.fillColor.g+";"+t.fillColor.b),(e.outlineColor.r!==t.outlineColor.r||e.outlineColor.g!==t.outlineColor.g||e.outlineColor.b!==t.outlineColor.b)&&this.setOutlineColor(""+t.outlineColor.r+";"+t.outlineColor.g+";"+t.outlineColor.b),e.fillOpacity!==t.fillOpacity&&this.setFillOpacity(t.fillOpacity),e.outlineOpacity!==t.outlineOpacity&&this.setOutlineOpacity(t.outlineOpacity),e.outlineSize!==t.outlineSize&&this.setOutlineSize(t.outlineSize),e.absoluteCoordinates!==t.absoluteCoordinates&&(this._useAbsoluteCoordinates=t.absoluteCoordinates,this._renderer.updatePositionX(),this._renderer.updatePositionY(),this._renderer.updateAngle(),this._renderer.updateScaleX(),this._renderer.updateScaleY()),e.clearBetweenFrames!==t.clearBetweenFrames&&(this._clearBetweenFrames=t.clearBetweenFrames),!0}stepBehaviorsPreEvents(e){this._clearBetweenFrames&&this.clear(),super.stepBehaviorsPreEvents(e)}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}clear(){this._renderer.clear()}getVisibilityAABB(){return this._useAbsoluteCoordinates?null:this.getAABB()}drawRectangle(e,t,i,o){this._renderer.drawRectangle(e,t,i,o)}drawCircle(e,t,i){this._renderer.drawCircle(e,t,i)}drawLine(e,t,i,o,r){this._renderer.drawLine(e,t,i,o,r)}drawLineV2(e,t,i,o,r){this._renderer.drawLineV2(e,t,i,o,r)}drawEllipse(e,t,i,o){this._renderer.drawEllipse(e,t,i,o)}drawRoundedRectangle(e,t,i,o,r){this._renderer.drawRoundedRectangle(e,t,i,o,r)}drawChamferRectangle(e,t,i,o,r){this._renderer.drawChamferRectangle(e,t,i,o,r)}drawRegularPolygon(e,t,i,o,r){this._renderer.drawRegularPolygon(e,t,i,o,r)}drawStar(e,t,i,o,r,l){this._renderer.drawStar(e,t,i,o,r,l)}drawArc(e,t,i,o,r,l,a){this._renderer.drawArc(e,t,i,o,r,l,a)}drawBezierCurve(e,t,i,o,r,l,a,h){this._renderer.drawBezierCurve(e,t,i,o,r,l,a,h)}drawQuadraticCurve(e,t,i,o,r,l){this._renderer.drawQuadraticCurve(e,t,i,o,r,l)}beginFillPath(e,t){this._renderer.beginFillPath(),this._renderer.drawPathMoveTo(e,t)}endFillPath(){this._renderer.endFillPath()}drawPathMoveTo(e,t){this._renderer.drawPathMoveTo(e,t)}drawPathLineTo(e,t){this._renderer.drawPathLineTo(e,t)}drawPathBezierCurveTo(e,t,i,o,r,l){this._renderer.drawPathBezierCurveTo(e,t,i,o,r,l)}drawPathArc(e,t,i,o,r,l){this._renderer.drawPathArc(e,t,i,o,r,l)}drawPathQuadraticCurveTo(e,t,i,o){this._renderer.drawPathQuadraticCurveTo(e,t,i,o)}closePath(){this._renderer.closePath()}setClearBetweenFrames(e){this._clearBetweenFrames=e}isClearedBetweenFrames(){return this._clearBetweenFrames}setAntialiasing(e){this._antialiasing=e,this._renderer.updateAntialiasing()}getAntialiasing(){return this._antialiasing}checkAntialiasing(e){return this._antialiasing===e}setCoordinatesRelative(e){this._useAbsoluteCoordinates=!e}areCoordinatesRelative(){return!this._useAbsoluteCoordinates}setFillColor(e){const t=e.split(";");t.length<3||(this._fillColor=parseInt(s.rgbToHex(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)),16))}getFillColorR(){return s.hexNumberToRGB(this._fillColor).r}getFillColorG(){return s.hexNumberToRGB(this._fillColor).g}getFillColorB(){return s.hexNumberToRGB(this._fillColor).b}setOutlineColor(e){const t=e.split(";");t.length<3||(this._outlineColor=parseInt(s.rgbToHex(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)),16),this._renderer.updateOutline())}getOutlineColorR(){return s.hexNumberToRGB(this._outlineColor).r}getOutlineColorG(){return s.hexNumberToRGB(this._outlineColor).g}getOutlineColorB(){return s.hexNumberToRGB(this._outlineColor).b}setOutlineSize(e){this._outlineSize=e,this._renderer.updateOutline()}getOutlineSize(){return this._outlineSize}setFillOpacity(e){this._fillOpacity=e}getFillOpacity(){return this._fillOpacity}setOutlineOpacity(e){this._outlineOpacity=e,this._renderer.updateOutline()}getOutlineOpacity(){return this._outlineOpacity}setX(e){e!==this.x&&(super.setX(e),this._renderer.updatePositionX())}setY(e){e!==this.y&&(super.setY(e),this._renderer.updatePositionY())}setAngle(e){e!==this.angle&&(super.setAngle(e),this._renderer.updateAngle(),this.invalidateHitboxes())}setRotationCenter(e,t){this._customCenLine truncated
|
||||
//# sourceMappingURL=shapepainterruntimeobject.js.map
|
||||
Reference in new issue
Block a user