diff --git a/dist/pixi-graphics-smooth.js b/dist/pixi-graphics-smooth.js new file mode 100644 index 0000000..7f00e5f --- /dev/null +++ b/dist/pixi-graphics-smooth.js @@ -0,0 +1,492 @@ +/*! + * @pixi/graphics-smooth - v1.1.1 + * Compiled Fri, 20 Dec 2024 18:57:14 UTC + * + * @pixi/graphics-smooth is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + * + * Copyright 2024, Ivan Popelyshev, All Rights Reserved + */this.PIXI=this.PIXI||{},this.PIXI.smooth=function(P,x,O,$){"use strict";function K(n,t,s=.001){return n===t||Math.abs(n.a-t.a)=l.maxStyles?-1:(r[u]=t,c[u]=s,p[u*2]=e,p[u*2+1]=a,this.count++,u)}}class Z{constructor(){this.texArray=new x.BatchTextureArray,this.styleArray=new at,this.shader=null,this.blend=x.BLEND_MODES.NORMAL,this.start=0,this.size=0,this.TICK=0,this.settings=null,this.data=null}clear(){this.texArray.clear(),this.styleArray.clear(),this.settings=null,this.data=null,this.shader=null}begin(t,s){this.TICK=++x.BaseTexture._globalBatch,this.settings=t,this.shader=s,this.start=0,this.size=0,this.data=null,s&&s.settings&&(this.settings=s.settings)}check(t){return this.size===0?(this.shader=t,!0):this.shader===t}add(t,s,e,a,i){const{texArray:l,TICK:r,styleArray:c,settings:p}=this,{baseTexture:u}=t;if(u._batchEnabled!==r&&l.count===p.maxTextures)return-1;const h=u._batchEnabled!==r?l.count:u._batchLocation,o=c.add(h,s||x.Matrix.IDENTITY,e,a,i,p);return o>=0&&u._batchEnabled!==r&&(u._batchEnabled=r,u._batchLocation=l.count,l.elements[l.count++]=u),o}}class rt{constructor(){this.reset()}begin(t,s,e){this.reset(),this.style=t,this.start=s,this.attribStart=e,this.jointEnd=0}end(t,s){this.attribSize=s-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0,this.styleId=-1,this.rgba=0,this.jointEnd=0}}class lt{constructor(){this.verts=[],this.joints=[],this.vertexSize=0,this.indexSize=0,this.closePointEps=1e-4}clear(){this.verts.length=0,this.joints.length=0,this.vertexSize=0,this.indexSize=0}destroy(){this.verts.length=0,this.joints.length=0}}var f=(n=>(n[n.NONE=0]="NONE",n[n.FILL=1]="FILL",n[n.JOINT_BEVEL=4]="JOINT_BEVEL",n[n.JOINT_MITER=8]="JOINT_MITER",n[n.JOINT_ROUND=12]="JOINT_ROUND",n[n.JOINT_CAP_BUTT=16]="JOINT_CAP_BUTT",n[n.JOINT_CAP_SQUARE=18]="JOINT_CAP_SQUARE",n[n.JOINT_CAP_ROUND=20]="JOINT_CAP_ROUND",n[n.FILL_EXPAND=24]="FILL_EXPAND",n[n.CAP_BUTT=32]="CAP_BUTT",n[n.CAP_SQUARE=64]="CAP_SQUARE",n[n.CAP_ROUND=96]="CAP_ROUND",n[n.CAP_BUTT2=128]="CAP_BUTT2",n))(f||{});class z{constructor(){this.reset()}toJSON(){return this.copyTo({})}clone(){return this.copyTo(new z)}copyTo(t){return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.shader=this.shader,t.visible=this.visible,t.smooth=this.smooth,t.matrixTex=null,t}packLineScale(){return 0}reset(){this.color=16777215,this.alpha=1,this.texture=x.Texture.WHITE,this.matrix=null,this.shader=null,this.visible=!1,this.smooth=!1,this.matrixTex=null}destroy(){this.texture=null,this.matrix=null,this.matrixTex=null}getTextureMatrix(){const t=this.texture;return this.matrix?t.frame.width===t.baseTexture.width&&t.frame.height===t.baseTexture.height?this.matrix:(this.matrixTex?this.matrixTex.copyFrom(this.matrix):this.matrixTex=this.matrix.clone(),this.matrixTex.translate(Number(t.frame.x),Number(t.frame.y)),this.matrixTex):null}}var M=(n=>(n.NONE="none",n.NORMAL="normal",n.HORIZONTAL="horizontal",n.VERTICAL="vertical",n))(M||{});class Y extends z{clone(){return this.copyTo(new Y)}copyTo(t){return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.shader=this.shader,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t.scaleMode=this.scaleMode,t}packLineScale(){switch(this.scaleMode){case"normal":return 1;case"horizontal":return 2;case"vertical":return 3;default:return 0}}reset(){super.reset(),this.smooth=!0,this.color=0,this.width=0,this.alignment=.5,this.cap=O.LINE_CAP.BUTT,this.join=O.LINE_JOIN.MITER,this.miterLimit=10,this.scaleMode="normal"}}const R=class{constructor(){this.strideFloats=12,this.bufferPos=0,this.indexPos=0}updateBufferSize(n,t,s,e){const{joints:a}=e;let i=!1,l=0,r=0;for(let c=n;c=f.FILL_EXPAND){l+=3,r+=3;continue}const h=R.vertsByJoint[u]+R.vertsByJoint[p];h>=4&&(l+=h,r+=6+3*Math.max(h-6,0))}i&&(r+=s),e.vertexSize+=l,e.indexSize+=r}beginPack(n,t,s,e,a=0,i=0){this.buildData=n,this.bufFloat=t,this.bufUint=s,this.indices=e,this.bufferPos=a,this.indexPos=i}endPack(){this.buildData=null,this.bufFloat=null,this.bufUint=null,this.indices=null}packInterleavedGeometry(n,t,s,e,a){const{bufFloat:i,bufUint:l,indices:r,buildData:c,strideFloats:p}=this,{joints:u,verts:h}=c;let o=this.bufferPos,d=this.indexPos,v=this.bufferPos/this.strideFloats,m,y,b,_,E,S,I,T,g=!1,A=0;for(let L=n;L=f.FILL_EXPAND){E=h[L*2],S=h[L*2+1],m=h[L*2+2],y=h[L*2+3],b=h[L*2+4],_=h[L*2+5];const C=L+3;for(let H=0;H<3;H++)i[o]=E,i[o+1]=S,i[o+2]=m,i[o+3]=y,i[o+4]=b,i[o+5]=_,i[o+6]=h[(C+H)*2],i[o+7]=h[(C+H)*2+1],i[o+8]=A,i[o+9]=16*B+H,i[o+10]=e,l[o+11]=a,o+=p;r[d]=v,r[d+1]=v+1,r[d+2]=v+2,d+=3,v+=3;continue}const w=R.vertsByJoint[D]+R.vertsByJoint[q];if(w===0)continue;m=h[L*2],y=h[L*2+1],b=h[L*2+2],_=h[L*2+3],E=h[L*2-2],S=h[L*2-1];const V=Math.sqrt((b-m)*(b-m)+(_-y)*(_-y));R.vertsByJoint[D]===0&&(A-=V),(D&-3)!==f.JOINT_CAP_BUTT?(I=h[L*2+4],T=h[L*2+5]):(I=m,T=y);for(let C=0;C 0.5) { + if (len < len2) { + if (abs(dy * (bisect.x * norm.y - bisect.y * norm.x)) > len) { + return dy * norm; + } + } else { + if (abs(dy * (bisect.x * norm2.y - bisect.y * norm2.x)) > len2) { + return dy * norm; + } + } + } + return dy * bisect; +} + +void main(void){ + vec2 pointA = (translationMatrix * vec3(aPoint1, 1.0)).xy; + vec2 pointB = (translationMatrix * vec3(aPoint2, 1.0)).xy; + + vec2 xBasis = pointB - pointA; + float len = length(xBasis); + vec2 forward = xBasis / len; + vec2 norm = vec2(forward.y, -forward.x); + + float type = floor(aVertexJoint / 16.0); + float vertexNum = aVertexJoint - type * 16.0; + float dx = 0.0, dy = 1.0; + + float capType = floor(type / 32.0); + type -= capType * 32.0; + + int styleId = int(aStyleId + 0.5); + float lineWidth = styleLine[styleId].x; + vTextureId = floor(styleTextureId[styleId] / 4.0); + float scaleMode = styleTextureId[styleId] - vTextureId * 4.0; + float avgScale = 1.0; + if (scaleMode > 2.5) { + avgScale = length(translationMatrix * vec3(1.0, 0.0, 0.0)); + } else if (scaleMode > 1.5) { + avgScale = length(translationMatrix * vec3(0.0, 1.0, 0.0)); + } else if (scaleMode > 0.5) { + vec2 avgDiag = (translationMatrix * vec3(1.0, 1.0, 0.0)).xy; + avgScale = sqrt(dot(avgDiag, avgDiag) * 0.5); + } + lineWidth *= 0.5 * avgScale; + float lineAlignment = 2.0 * styleLine[styleId].y - 1.0; + vTextureCoord = vec2(0.0); + + vec2 pos; + + if (capType == CAP_ROUND) { + vertexNum += 4.0; + type = JOINT_CAP_ROUND; + capType = 0.0; + lineAlignment = -lineAlignment; + } + + vLine1 = vec4(0.0, 10.0, 1.0, 0.0); + vLine2 = vec4(0.0, 10.0, 1.0, 0.0); + vArc = vec4(0.0); + if (type == FILL) { + pos = pointA; + vType = 0.0; + vLine2 = vec4(-2.0, -2.0, -2.0, 0.0); + vec2 vTexturePixel; + vTexturePixel.x = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2]); + vTexturePixel.y = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2 + 1]); + vTextureCoord = vTexturePixel / samplerSize[int(vTextureId)]; + } else if (type >= FILL_EXPAND && type < FILL_EXPAND + 7.5) { + // expand vertices + float flags = type - FILL_EXPAND; + float flag3 = floor(flags / 4.0); + float flag2 = floor((flags - flag3 * 4.0) / 2.0); + float flag1 = flags - flag3 * 4.0 - flag2 * 2.0; + + vec2 prev = (translationMatrix * vec3(aPrev, 1.0)).xy; + + if (vertexNum < 0.5) { + pos = prev; + } else if (vertexNum < 1.5) { + pos = pointA; + } else { + pos = pointB; + } + float len2 = length(aNext); + vec2 bisect = (translationMatrix * vec3(aNext, 0.0)).xy; + if (len2 > 0.01) { + bisect = normalize(bisect) * len2; + } + + vec2 n1 = normalize(vec2(pointA.y - prev.y, -(pointA.x - prev.x))); + vec2 n2 = normalize(vec2(pointB.y - pointA.y, -(pointB.x - pointA.x))); + vec2 n3 = normalize(vec2(prev.y - pointB.y, -(prev.x - pointB.x))); + + if (n1.x * n2.y - n1.y * n2.x < 0.0) { + n1 = -n1; + n2 = -n2; + n3 = -n3; + } + pos += bisect * expand; + + vLine1 = vec4(16.0, 16.0, 16.0, -1.0); + if (flag1 > 0.5) { + vLine1.x = -dot(pos - prev, n1); + } + if (flag2 > 0.5) { + vLine1.y = -dot(pos - pointA, n2); + } + if (flag3 > 0.5) { + vLine1.z = -dot(pos - pointB, n3); + } + vLine1.xyz *= resolution; + vType = 2.0; + } else if (type >= BEVEL) { + float dy = lineWidth + expand; + float shift = lineWidth * lineAlignment; + float inner = 0.0; + if (vertexNum >= 1.5) { + dy = -dy; + inner = 1.0; + } + + vec2 base, next, xBasis2, bisect; + float flag = 0.0; + float side2 = 1.0; + if (vertexNum < 0.5 || vertexNum > 2.5 && vertexNum < 3.5) { + next = (translationMatrix * vec3(aPrev, 1.0)).xy; + base = pointA; + flag = type - floor(type / 2.0) * 2.0; + side2 = -1.0; + } else { + next = (translationMatrix * vec3(aNext, 1.0)).xy; + base = pointB; + if (type >= MITER && type < MITER + 3.5) { + flag = step(MITER + 1.5, type); + // check miter limit here? + } + } + xBasis2 = next - base; + float len2 = length(xBasis2); + vec2 norm2 = vec2(xBasis2.y, -xBasis2.x) / len2; + float D = norm.x * norm2.y - norm.y * norm2.x; + if (D < 0.0) { + inner = 1.0 - inner; + } + + norm2 *= side2; + + float collinear = step(0.0, dot(norm, norm2)); + + vType = 0.0; + float dy2 = -1000.0; + + if (abs(D) < 0.01 && collinear < 0.5) { + if (type >= ROUND && type < ROUND + 1.5) { + type = JOINT_CAP_ROUND; + } + //TODO: BUTT here too + } + + vLine1 = vec4(0.0, lineWidth, max(abs(norm.x), abs(norm.y)), min(abs(norm.x), abs(norm.y))); + vLine2 = vec4(0.0, lineWidth, max(abs(norm2.x), abs(norm2.y)), min(abs(norm2.x), abs(norm2.y))); + + if (vertexNum < 3.5) { + if (abs(D) < 0.01 && collinear < 0.5) { + pos = (shift + dy) * norm; + } else { + if (flag < 0.5 && inner < 0.5) { + pos = (shift + dy) * norm; + } else { + pos = doBisect(norm, len, norm2, len2, shift + dy, inner); + } + } + vLine2.y = -1000.0; + if (capType >= CAP_BUTT && capType < CAP_ROUND) { + float extra = step(CAP_SQUARE, capType) * lineWidth; + vec2 back = -forward; + if (vertexNum < 0.5 || vertexNum > 2.5) { + pos += back * (expand + extra); + dy2 = expand; + } else { + dy2 = dot(pos + base - pointA, back) - extra; + } + } + if (type >= JOINT_CAP_BUTT && type < JOINT_CAP_SQUARE + 0.5) { + float extra = step(JOINT_CAP_SQUARE, type) * lineWidth; + if (vertexNum < 0.5 || vertexNum > 2.5) { + vLine2.y = dot(pos + base - pointB, forward) - extra; + } else { + pos += forward * (expand + extra); + vLine2.y = expand; + if (capType >= CAP_BUTT) { + dy2 -= expand + extra; + } + } + } + } else if (type >= JOINT_CAP_ROUND && type < JOINT_CAP_ROUND + 1.5) { + base += shift * norm; + if (inner > 0.5) { + dy = -dy; + inner = 0.0; + } + vec2 d2 = abs(dy) * forward; + if (vertexNum < 4.5) { + dy = -dy; + pos = dy * norm; + } else if (vertexNum < 5.5) { + pos = dy * norm; + } else if (vertexNum < 6.5) { + pos = dy * norm + d2; + vArc.x = abs(dy); + } else { + dy = -dy; + pos = dy * norm + d2; + vArc.x = abs(dy); + } + vLine2 = vec4(0.0, lineWidth * 2.0 + 10.0, 1.0 , 0.0); // forget about line2 with type=3 + vArc.y = dy; + vArc.z = 0.0; + vArc.w = lineWidth; + vType = 3.0; + } else if (abs(D) < 0.01 && collinear < 0.5) { + pos = dy * norm; + } else { + if (inner > 0.5) { + dy = -dy; + inner = 0.0; + } + float side = sign(dy); + vec2 norm3 = normalize(norm + norm2); + + if (type >= MITER && type < MITER + 3.5) { + vec2 farVertex = doBisect(norm, len, norm2, len2, shift + dy, 0.0); + if (length(farVertex) > abs(shift + dy) * MITER_LIMIT) { + type = BEVEL; + } + } + + if (vertexNum < 4.5) { + pos = doBisect(norm, len, norm2, len2, shift - dy, 1.0); + } else if (vertexNum < 5.5) { + pos = (shift + dy) * norm; + } else if (vertexNum > 7.5) { + pos = (shift + dy) * norm2; + } else { + if (type >= ROUND && type < ROUND + 1.5) { + pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0); + float d2 = abs(shift + dy); + if (length(pos) > abs(shift + dy) * 1.5) { + if (vertexNum < 6.5) { + pos.x = (shift + dy) * norm.x - d2 * norm.y; + pos.y = (shift + dy) * norm.y + d2 * norm.x; + } else { + pos.x = (shift + dy) * norm2.x + d2 * norm2.y; + pos.y = (shift + dy) * norm2.y - d2 * norm2.x; + } + } + } else if (type >= MITER && type < MITER + 3.5) { + pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0); //farVertex + } else if (type >= BEVEL && type < BEVEL + 1.5) { + float d2 = side / resolution; + if (vertexNum < 6.5) { + pos = (shift + dy) * norm + d2 * norm3; + } else { + pos = (shift + dy) * norm2 + d2 * norm3; + } + } + } + + if (type >= ROUND && type < ROUND + 1.5) { + vArc.x = side * dot(pos, norm3); + vArc.y = pos.x * norm3.y - pos.y * norm3.x; + vArc.z = dot(norm, norm3) * (lineWidth + side * shift); + vArc.w = lineWidth + side * shift; + vType = 3.0; + } else if (type >= MITER && type < MITER + 3.5) { + vType = 1.0; + } else if (type >= BEVEL && type < BEVEL + 1.5) { + vType = 4.0; + vArc.z = dot(norm, norm3) * (lineWidth + side * shift) - side * dot(pos, norm3); + } + + dy = side * (dot(pos, norm) - shift); + dy2 = side * (dot(pos, norm2) - shift); + } + + pos += base; + vLine1.xy = vec2(dy, vLine1.y) * resolution; + vLine2.xy = vec2(dy2, vLine2.y) * resolution; + vArc = vArc * resolution; + vTravel = vec2(aTravel * avgScale + dot(pos - pointA, vec2(-norm.y, norm.x)), avgScale); + } + + gl_Position = vec4((projectionMatrix * vec3(pos, 1.0)).xy, 0.0, 1.0); + + vColor = aColor * tint; +}`,ft=`#version 100 +#ifdef GL_FRAGMENT_PRECISION_HIGH + precision highp float; +#else + precision mediump float; +#endif +`,ot=`%PRECISION% +varying vec4 vColor; +varying vec4 vLine1; +varying vec4 vLine2; +varying vec4 vArc; +varying float vType; +varying float vTextureId; +varying vec2 vTextureCoord; +varying vec2 vTravel; +uniform sampler2D uSamplers[%MAX_TEXTURES%]; + +%PIXEL_LINE% + +void main(void){ + %PIXEL_COVERAGE% + + vec4 texColor; + float textureId = floor(vTextureId+0.5); + %FOR_LOOP% + + gl_FragColor = vColor * texColor * alpha; +} +`,yt=[` +float pixelLine(float x, float A, float B) { + return clamp(x + 0.5, 0.0, 1.0); +} +`,` +float pixelLine(float x, float A, float B) { + float y = abs(x), s = sign(x); + if (y * 2.0 < A - B) { + return 0.5 + s * y / A; + } + y -= (A - B) * 0.5; + y = max(1.0 - y / B, 0.0); + return (1.0 + s * (1.0 - y * y)) * 0.5; + //return clamp(x + 0.5, 0.0, 1.0); +} +`],xt=`float alpha = 1.0; +if (vType < 0.5) { + float left = pixelLine(-vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float right = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float near = vLine2.x - 0.5; + float far = min(vLine2.x + 0.5, 0.0); + float top = vLine2.y - 0.5; + float bottom = min(vLine2.y + 0.5, 0.0); + alpha = (right - left) * max(bottom - top, 0.0) * max(far - near, 0.0); +} else if (vType < 1.5) { + float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w); + alpha = a2 * b2 - a1 * b1; +} else if (vType < 2.5) { + alpha *= max(min(vLine1.x + 0.5, 1.0), 0.0); + alpha *= max(min(vLine1.y + 0.5, 1.0), 0.0); + alpha *= max(min(vLine1.z + 0.5, 1.0), 0.0); +} else if (vType < 3.5) { + float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float alpha_miter = a2 * b2 - a1 * b1; + float alpha_plane = clamp(vArc.z - vArc.x + 0.5, 0.0, 1.0); + float d = length(vArc.xy); + float circle_hor = max(min(vArc.w, d + 0.5) - max(-vArc.w, d - 0.5), 0.0); + float circle_vert = min(vArc.w * 2.0, 1.0); + float alpha_circle = circle_hor * circle_vert; + alpha = min(alpha_miter, max(alpha_circle, alpha_plane)); +} else { + float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w); + alpha = a2 * b2 - a1 * b1; + alpha *= clamp(vArc.z + 0.5, 0.0, 1.0); +} +`;class U extends x.Shader{constructor(t,s=ht,e=ot,a={}){s=U.generateVertexSrc(t,s),e=U.generateFragmentSrc(t,e);const{maxStyles:i,maxTextures:l}=t,r=new Int32Array(l);for(let c=0;c0&&(s+=` +else `),e 0.0) { + float g = gap * vTravel.y; + if (g > 0.0) { + float t = mod(vTravel.x, d + g); + alpha *= mix( + min(0.5 * d + 0.5 - abs(t - 0.5 * d), 1.0), + max(abs(t - 0.5 * g - d) - 0.5 * g + 0.5, 0.0), + step(d, t) + ); + } + } else { + alpha = 0.0; + } + + vec4 texColor; + float textureId = floor(vTextureId+0.5); + %FOR_LOOP% + + gl_FragColor = vColor * texColor * alpha; +} +`;class mt extends U{constructor(t){const s={maxStyles:16,maxTextures:1,pixelLine:1};super(s,void 0,vt,t||{dash:8,gap:5})}}const F={LINE_SCALE_MODE:M.NORMAL,SHADER_MAX_STYLES:24,SHADER_MAX_TEXTURES:4,PIXEL_LINE:0};class W{path(t,s){const e=t.points;let a,i,l,r,c,p;if(t.type===x.SHAPES.CIRC){const y=t.shape;a=y.x,i=y.y,c=p=y.radius,l=r=0}else if(t.type===x.SHAPES.ELIP){const y=t.shape;a=y.x,i=y.y,c=y.width,p=y.height,l=r=0}else{const y=t.shape,b=y.width/2,_=y.height/2;a=y.x+b,i=y.y+_,c=p=Math.max(0,Math.min(y.radius,Math.min(b,_))),l=b-c,r=_-p}if(!(c>=0&&p>=0&&l>=0&&r>=0)){e.length=0;return}const u=Math.ceil(2.3*Math.sqrt(c+p)),h=u*8+(l?4:0)+(r?4:0);if(e.length=h,h===0)return;if(u===0){e.length=8,e[0]=e[6]=a+l,e[1]=e[3]=i+r,e[2]=e[4]=a-l,e[5]=e[7]=i-r;return}let o=0,d=u*4+(l?2:0)+2,v=d,m=h;{const y=l+c,b=r,_=a+y,E=a-y,S=i+b;if(e[o++]=_,e[o++]=S,e[--d]=S,e[--d]=E,r){const I=i-b;e[v++]=E,e[v++]=I,e[--m]=I,e[--m]=_}}for(let y=1;y0?(e.push(D),e.push(w)):(S=D,I=w),e.push(u),e.push(h),e.push(m),e.push(y),e.push(g),e.push(A),e.push(0),e.push(0),e.push(D),e.push(w),a.push(f.FILL_EXPAND+2),a.push(f.NONE),a.push(f.NONE),a.push(f.NONE),a.push(f.NONE),a.push(f.NONE),m=g,y=A,b=L,_=B}e.push(S),e.push(I)}line(t,s){const{verts:e,joints:a}=s,{points:i}=t,l=i.length===8?t.goodJointType():f.JOINT_MITER+3,r=i.length;if(r!==0){e.push(i[r-2],i[r-1]),a.push(f.NONE);for(let c=0;c0||t&&e<=0){const a=s/2;for(let i=a+a%2;i=i?e||(y=f.NONE):d+4>=i&&(e||(p===f.CAP_ROUND&&(y=f.JOINT_CAP_ROUND),p===f.CAP_BUTT&&(y=f.JOINT_CAP_BUTT),p===f.CAP_SQUARE&&(y=f.JOINT_CAP_SQUARE))),y+=u,u=0,l.push(v,m),r.push(y),h=v,o=m}e?(l.push(a[0],a[1]),r.push(f.NONE),l.push(a[2],a[3]),r.push(f.NONE)):(l.push(a[i-4],a[i-3]),r.push(f.NONE))}fill(t,s){let e=t.points;const a=t.holes,i=s.closePointEps,{verts:l,joints:r}=s;if(e.length<6)return;const c=[];let p=e.length;ct(e,!1);for(let d=0;d0&&(d>1),u[h*2]=v-1,u[(v-1)*2+1]=h;for(let m=h;m+10&&(I=2);for(let T=0;T<3;T++){const g=o[d+T*I%3];l.push(e[g*2],e[g*2+1])}for(let T=0;T<3;T++){const g=o[d+T*I%3];l.push(u[g*2],u[g*2+1])}}}}class ut{constructor(){this._polyBuilder=new tt}path(t,s){const e=t.shape,a=e.x,i=e.y,l=e.width,r=e.height,c=t.points;c.length=0,c.push(a,i,a+l,i,a+l,i+r,a,i+r)}line(t,s){const{verts:e,joints:a}=s,{points:i}=t,l=t.goodJointType(),r=i.length;e.push(i[r-2],i[r-1]),a.push(f.NONE);for(let c=0;c0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(t,s=null,e=null,a=null){const i=new J(t,s,e,a);return this.graphicsData.push(i),this.dirty++,this}drawHole(t,s=null){if(!this.graphicsData.length)return null;const e=new J(t,null,null,s),a=this.graphicsData[this.graphicsData.length-1];return e.lineStyle=a.lineStyle,a.holes.push(e),this.dirty++,this}destroy(){super.destroy();for(let t=0;t=.99&&i.lineStyle.width*Math.min(i.lineStyle.alignment,1-i.lineStyle.alignment)>=.495),i.fillStart=s.joints.length,c.length?X[x.SHAPES.POLY].fill(i,s):p.fill(i,s),i.fillLen=s.joints.length-i.fillStart),r.visible)){i.strokeStart=s.joints.length,p.line(i,s);for(let u=0;u0&&(i=this.batches[this.batches.length-1],l=i.style);for(let r=this.shapeBatchIndex;r65535&&this.pack32index?c.data=new Uint32Array(s):c.data=new Uint16Array(s)),a.beginPack(i,this._bufferFloats,this._bufferUint,c.data);let u=0;for(let h=0;h0&&n.alpha>0;return t?(n.matrix&&(n.matrix=n.matrix.clone(),n.matrix.invert()),Object.assign(this._lineStyle,{visible:t},n)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const n=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new x.Polygon,this.currentPath.closeStroke=!1,this.currentPath.points.push(n[t-2],n[t-1]))}else this.currentPath=new x.Polygon,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(n,t){return this.startPoly(),this.currentPath.points[0]=n,this.currentPath.points[1]=t,this}lineTo(n,t){this.currentPath||this.moveTo(0,0);const s=this.currentPath.points,e=s[s.length-2],a=s[s.length-1];return(e!==n||a!==t)&&s.push(n,t),this}_initCurve(n=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[n,t]):this.moveTo(n,t)}quadraticCurveTo(n,t,s,e){this._initCurve();const a=this.currentPath.points;return a.length===0&&this.moveTo(0,0),Lt.curveTo(n,t,s,e,a),this}bezierCurveTo(n,t,s,e,a,i){return this._initCurve(),Tt.curveTo(n,t,s,e,a,i,this.currentPath.points),this}arcTo(n,t,s,e,a){this._initCurve(n,t);const i=this.currentPath.points,l=pt.curveTo(n,t,s,e,a,i);if(l){const{cx:r,cy:c,radius:p,startAngle:u,endAngle:h,anticlockwise:o}=l;this.arc(r,c,p,u,h,o)}return this}arc(n,t,s,e,a,i=!1){if(e===a)return this;if(!i&&a<=e?a+=x.PI_2:i&&e<=a&&(e+=x.PI_2),a-e===0)return this;const l=n+Math.cos(e)*s,r=t+Math.sin(e)*s,c=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const u=Math.abs(p[p.length-2]-l),h=Math.abs(p[p.length-1]-r);u0;return t?(n.matrix&&(n.matrix=n.matrix.clone(),n.matrix.invert()),Object.assign(this._fillStyle,{visible:t},n)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(n,t,s,e){return this.drawShape(new x.Rectangle(n,t,s,e))}drawRoundedRect(n,t,s,e,a){return this.drawShape(new x.RoundedRectangle(n,t,s,e,a))}drawCircle(n,t,s){return this.drawShape(new x.Circle(n,t,s))}drawEllipse(n,t,s,e){return this.drawShape(new x.Ellipse(n,t,s,e))}drawPolygon(...n){let t,s=!0;const e=n[0];e.points?(s=e.closeStroke,t=e.points):Array.isArray(n[0])?t=n[0]:t=n;const a=new x.Polygon(t);return a.closeStroke=s,this.drawShape(a),this}drawShape(n){return this._holeMode?this._geometry.drawHole(n,this._matrix):this._geometry.drawShape(n,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const n=this._geometry.graphicsData;return n.length===1&&n[0].shape.type===x.SHAPES.RECT&&!n[0].matrix&&!n[0].holes.length&&!(n[0].lineStyle.visible&&n[0].lineStyle.width)}_renderCanvas(n){_t.prototype._renderCanvas.call(this,n)}_render(n){this.finishPoly();const t=this._geometry,s=n.context.supports.uint32Indices;t.checkInstancing(n.geometry.hasInstance,s),t.updateBatches(this.shaderSettings),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(n)):(n.batch.flush(),this._renderDirect(n))}_populateBatches(){const n=this._geometry,t=this.blendMode,s=n.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=n.batchDirty,this.batches.length=s,this.vertexData=new Float32Array(n.points);for(let e=0;e= settings.maxStyles)\n {\n return -1;\n }\n textureIds[count] = textureId;\n matrices[count] = matrix;\n lines[count * 2] = lineWidth;\n lines[(count * 2) + 1] = lineAlignment;\n this.count++;\n\n return count;\n }\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class BatchDrawCall\n{\n texArray: BatchTextureArray;\n styleArray: BatchStyleArray;\n blend: BLEND_MODES;\n start: number;\n size: number;\n data: any;\n shader: Shader;\n TICK: number;\n settings: IGraphicsBatchSettings;\n\n constructor()\n {\n this.texArray = new BatchTextureArray();\n this.styleArray = new BatchStyleArray();\n this.shader = null;\n this.blend = BLEND_MODES.NORMAL;\n\n this.start = 0;\n this.size = 0;\n this.TICK = 0; // for filling textures\n this.settings = null;\n /**\n * data for uniforms or custom webgl state\n * @member {object}\n */\n this.data = null;\n }\n\n clear()\n {\n this.texArray.clear();\n this.styleArray.clear();\n this.settings = null;\n this.data = null;\n this.shader = null;\n }\n\n begin(settings: IGraphicsBatchSettings, shader: Shader)\n {\n this.TICK = ++BaseTexture._globalBatch;\n this.settings = settings;\n this.shader = shader;\n // start and size calculated outside\n this.start = 0;\n this.size = 0;\n this.data = null;\n if (shader && (shader as any).settings)\n {\n this.settings = (shader as any).settings;\n }\n }\n\n check(shader: Shader): boolean\n {\n if (this.size === 0)\n {\n this.shader = shader;\n\n return true;\n }\n\n return (this.shader === shader);\n }\n\n add(texture: Texture, matrix: Matrix, lineWidth: number,\n lineAlignment: number, lineScaleMode: number): number\n {\n const { texArray, TICK, styleArray, settings } = this;\n const { baseTexture } = texture;\n // check tex\n\n if (baseTexture._batchEnabled !== TICK && texArray.count === settings.maxTextures)\n {\n return -1;\n }\n const loc = baseTexture._batchEnabled !== TICK ? texArray.count : baseTexture._batchLocation;\n // check and add style\n // add1 -> add2 only works in chain, not when there are several adds inside\n const res = styleArray.add(loc, matrix || Matrix.IDENTITY,\n lineWidth, lineAlignment, lineScaleMode, settings);\n\n if (res >= 0)\n {\n // SUCCESS here\n // add tex\n if (baseTexture._batchEnabled !== TICK)\n {\n baseTexture._batchEnabled = TICK;\n baseTexture._batchLocation = texArray.count;\n texArray.elements[texArray.count++] = baseTexture;\n }\n }\n\n return res;\n }\n}\n","import { FillStyle } from './FillStyle';\nimport { LineStyle } from './LineStyle';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class BatchPart\n{\n public style: LineStyle | FillStyle;\n public start: number;\n public size: number;\n public jointEnd: number;\n public attribStart: number;\n public attribSize: number;\n public styleId: number;\n public rgba: number;\n\n constructor()\n {\n this.reset();\n }\n\n public begin(style: LineStyle | FillStyle, startIndex: number, attribStart: number): void\n {\n this.reset();\n this.style = style;\n this.start = startIndex;\n this.attribStart = attribStart;\n this.jointEnd = 0;\n }\n\n public end(endIndex: number, endAttrib: number): void\n {\n this.attribSize = endAttrib - this.attribStart;\n this.size = endIndex - this.start;\n }\n\n public reset(): void\n {\n this.style = null;\n this.size = 0;\n this.start = 0;\n this.attribStart = 0;\n this.attribSize = 0;\n this.styleId = -1;\n this.rgba = 0;\n this.jointEnd = 0;\n }\n}\n","/**\n * @memberof PIXI.smooth\n */\nexport class BuildData\n{\n verts: Array = [];\n joints: Array = [];\n vertexSize = 0;\n indexSize = 0;\n closePointEps = 1e-4;\n\n clear()\n {\n this.verts.length = 0;\n this.joints.length = 0;\n this.vertexSize = 0;\n this.indexSize = 0;\n }\n\n destroy()\n {\n this.verts.length = 0;\n this.joints.length = 0;\n }\n}\n","export enum JOINT_TYPE\n {\n NONE = 0,\n FILL = 1,\n JOINT_BEVEL = 4,\n JOINT_MITER = 8,\n JOINT_ROUND = 12,\n JOINT_CAP_BUTT = 16,\n JOINT_CAP_SQUARE = 18,\n JOINT_CAP_ROUND = 20,\n FILL_EXPAND = 24,\n CAP_BUTT = 1 << 5,\n CAP_SQUARE = 2 << 5,\n CAP_ROUND = 3 << 5,\n CAP_BUTT2 = 4 << 5,\n}\n","import { Shader, Texture } from '@pixi/core';\n\nimport type { Matrix } from '@pixi/core';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class FillStyle\n{\n constructor()\n {\n this.reset();\n }\n\n color: number;\n alpha: number;\n texture: Texture;\n matrix: Matrix;\n matrixTex: Matrix;\n shader: Shader;\n visible: boolean;\n smooth: boolean;\n\n toJSON()\n {\n return this.copyTo({});\n }\n\n clone(): FillStyle\n {\n return this.copyTo(new FillStyle());\n }\n\n copyTo(obj: any): any\n {\n obj.color = this.color;\n obj.alpha = this.alpha;\n obj.texture = this.texture;\n obj.matrix = this.matrix;\n obj.shader = this.shader;\n obj.visible = this.visible;\n obj.smooth = this.smooth;\n obj.matrixTex = null;\n\n return obj;\n }\n\n packLineScale()\n {\n return 0;\n }\n\n reset()\n {\n this.color = 0xFFFFFF;\n\n this.alpha = 1;\n\n this.texture = Texture.WHITE;\n\n this.matrix = null;\n\n this.shader = null;\n\n this.visible = false;\n\n this.smooth = false;\n\n this.matrixTex = null;\n }\n\n destroy()\n {\n this.texture = null;\n this.matrix = null;\n this.matrixTex = null;\n }\n\n getTextureMatrix()\n {\n const tex = this.texture;\n\n if (!this.matrix)\n {\n return null;\n }\n\n if (tex.frame.width === tex.baseTexture.width\n && tex.frame.height === tex.baseTexture.height)\n {\n return this.matrix;\n }\n\n if (!this.matrixTex)\n {\n this.matrixTex = this.matrix.clone();\n }\n else\n {\n this.matrixTex.copyFrom(this.matrix);\n }\n this.matrixTex.translate(Number(tex.frame.x), Number(tex.frame.y));\n\n return this.matrixTex;\n }\n}\n","import { LINE_CAP, LINE_JOIN } from '@pixi/graphics';\nimport { FillStyle } from './FillStyle';\n\n/**\n * @memberof PIXI.smooth\n */\nexport enum LINE_SCALE_MODE\n {\n NONE = 'none',\n NORMAL = 'normal',\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class LineStyle extends FillStyle\n{\n width: number;\n alignment: number;\n\n cap: LINE_CAP;\n join: LINE_JOIN;\n miterLimit: number;\n scaleMode: LINE_SCALE_MODE;\n\n clone(): LineStyle\n {\n return this.copyTo(new LineStyle());\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n copyTo(obj: any): LineStyle\n {\n obj.color = this.color;\n obj.alpha = this.alpha;\n obj.texture = this.texture;\n obj.matrix = this.matrix;\n obj.shader = this.shader;\n obj.visible = this.visible;\n obj.width = this.width;\n obj.alignment = this.alignment;\n obj.cap = this.cap;\n obj.join = this.join;\n obj.miterLimit = this.miterLimit;\n obj.scaleMode = this.scaleMode;\n\n return obj;\n }\n\n /**\n * returns width multiplied by scaleMode\n */\n packLineScale(): number\n {\n switch (this.scaleMode)\n {\n case LINE_SCALE_MODE.NORMAL: return 1;\n case LINE_SCALE_MODE.HORIZONTAL: return 2;\n case LINE_SCALE_MODE.VERTICAL: return 3;\n default: return 0;\n }\n }\n\n reset(): void\n {\n super.reset();\n\n this.smooth = true;\n\n this.color = 0x0;\n\n this.width = 0;\n\n this.alignment = 0.5;\n\n this.cap = LINE_CAP.BUTT;\n this.join = LINE_JOIN.MITER;\n this.miterLimit = 10;\n this.scaleMode = LINE_SCALE_MODE.NORMAL;\n }\n}\n","import { BuildData } from './BuildData';\nimport { JOINT_TYPE } from './const';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SegmentPacker\n{\n static vertsByJoint: Array = [];\n\n strideFloats = 12;\n\n updateBufferSize(jointStart: number, jointLen: number, triangles: number, target: BuildData): void\n {\n const { joints } = target;\n let foundTriangle = false;\n\n let vertexSize = 0;\n let indexSize = 0;\n\n for (let i = jointStart; i < jointStart + jointLen; i++)\n {\n const prevCap = joints[i] & ~31;\n const joint = joints[i] & 31;\n\n if (joint === JOINT_TYPE.FILL)\n {\n foundTriangle = true;\n vertexSize++;\n continue;\n }\n\n if (joint >= JOINT_TYPE.FILL_EXPAND)\n {\n vertexSize += 3;\n indexSize += 3;\n continue;\n }\n\n const vs = SegmentPacker.vertsByJoint[joint] + SegmentPacker.vertsByJoint[prevCap];\n\n if (vs >= 4)\n {\n vertexSize += vs;\n indexSize += 6 + (3 * Math.max(vs - 6, 0));\n }\n }\n if (foundTriangle)\n {\n indexSize += triangles;\n }\n\n target.vertexSize += vertexSize;\n target.indexSize += indexSize;\n }\n\n bufferPos = 0;\n indexPos = 0;\n bufFloat: Float32Array;\n bufUint: Uint32Array;\n indices: Uint16Array;\n buildData: BuildData;\n\n beginPack(buildData: BuildData, bufFloat: Float32Array, bufUint: Uint32Array,\n indices: Uint16Array, bufferPos = 0, indexPos = 0): void\n {\n this.buildData = buildData;\n this.bufFloat = bufFloat;\n this.bufUint = bufUint;\n this.indices = indices;\n this.bufferPos = bufferPos;\n this.indexPos = indexPos;\n }\n\n endPack(): void\n {\n this.buildData = null;\n this.bufFloat = null;\n this.bufUint = null;\n this.indices = null;\n }\n\n packInterleavedGeometry(jointStart: number, jointLen: number, triangles: number[],\n lineStyle: number, color: number): void\n {\n const { bufFloat, bufUint, indices, buildData, strideFloats } = this;\n const { joints, verts } = buildData;\n\n let bufPos = this.bufferPos;\n let indPos = this.indexPos;\n let index = this.bufferPos / this.strideFloats;\n\n // eslint-disable-next-line max-len\n let x1: number; let y1: number;\n let x2: number; let y2: number;\n let prevX: number; let prevY: number;\n let nextX: number; let nextY: number;\n // let type: number;\n let hasTriangle = false;\n\n let travel = 0;\n\n for (let j = jointStart; j < jointStart + jointLen; j++)\n {\n const fullJoint = joints[j];\n const prevCap = joints[j] & ~31;\n const joint = joints[j] & 31;\n\n if (joint === JOINT_TYPE.FILL)\n {\n // just one vertex\n hasTriangle = true;\n x1 = verts[(j * 2)];\n y1 = verts[(j * 2) + 1];\n bufFloat[bufPos] = x1;\n bufFloat[bufPos + 1] = y1;\n bufFloat[bufPos + 2] = x1;\n bufFloat[bufPos + 3] = y1;\n bufFloat[bufPos + 4] = x1;\n bufFloat[bufPos + 5] = y1;\n bufFloat[bufPos + 6] = x1;\n bufFloat[bufPos + 7] = y1;\n bufFloat[bufPos + 8] = travel;\n bufFloat[bufPos + 9] = 16 * joint;\n bufFloat[bufPos + 10] = lineStyle;\n bufUint[bufPos + 11] = color;\n bufPos += strideFloats;\n continue;\n }\n\n if (joint >= JOINT_TYPE.FILL_EXPAND)\n {\n prevX = verts[j * 2];\n prevY = verts[(j * 2) + 1];\n x1 = verts[(j * 2) + 2];\n y1 = verts[(j * 2) + 3];\n x2 = verts[(j * 2) + 4];\n y2 = verts[(j * 2) + 5];\n\n const bis = j + 3;\n\n for (let i = 0; i < 3; i++)\n {\n bufFloat[bufPos] = prevX;\n bufFloat[bufPos + 1] = prevY;\n bufFloat[bufPos + 2] = x1;\n bufFloat[bufPos + 3] = y1;\n bufFloat[bufPos + 4] = x2;\n bufFloat[bufPos + 5] = y2;\n bufFloat[bufPos + 6] = verts[(bis + i) * 2];\n bufFloat[bufPos + 7] = verts[((bis + i) * 2) + 1];\n\n bufFloat[bufPos + 8] = travel;\n bufFloat[bufPos + 9] = (16 * fullJoint) + i;\n bufFloat[bufPos + 10] = lineStyle;\n bufUint[bufPos + 11] = color;\n bufPos += strideFloats;\n }\n\n indices[indPos] = index;\n indices[indPos + 1] = index + 1;\n indices[indPos + 2] = index + 2;\n indPos += 3;\n index += 3;\n continue;\n }\n\n const vs = SegmentPacker.vertsByJoint[joint] + SegmentPacker.vertsByJoint[prevCap];\n\n if (vs === 0)\n {\n continue;\n }\n x1 = verts[j * 2];\n y1 = verts[(j * 2) + 1];\n x2 = verts[(j * 2) + 2];\n y2 = verts[(j * 2) + 3];\n // TODO: caps here\n prevX = verts[(j * 2) - 2];\n prevY = verts[(j * 2) - 1];\n\n const dist = Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\n\n if (SegmentPacker.vertsByJoint[joint] === 0)\n {\n travel -= dist;\n }\n\n if ((joint & ~2) !== JOINT_TYPE.JOINT_CAP_BUTT)\n {\n nextX = verts[(j * 2) + 4];\n nextY = verts[(j * 2) + 5];\n }\n else\n {\n nextX = x1;\n nextY = y1;\n }\n // type = joint;\n\n for (let i = 0; i < vs; i++)\n {\n bufFloat[bufPos] = prevX;\n bufFloat[bufPos + 1] = prevY;\n bufFloat[bufPos + 2] = x1;\n bufFloat[bufPos + 3] = y1;\n bufFloat[bufPos + 4] = x2;\n bufFloat[bufPos + 5] = y2;\n bufFloat[bufPos + 6] = nextX;\n bufFloat[bufPos + 7] = nextY;\n bufFloat[bufPos + 8] = travel;\n bufFloat[bufPos + 9] = (16 * fullJoint) + i;\n bufFloat[bufPos + 10] = lineStyle;\n bufUint[bufPos + 11] = color;\n bufPos += strideFloats;\n }\n\n travel += dist;\n\n indices[indPos] = index;\n indices[indPos + 1] = index + 1;\n indices[indPos + 2] = index + 2;\n indices[indPos + 3] = index;\n indices[indPos + 4] = index + 2;\n indices[indPos + 5] = index + 3;\n indPos += 6;\n for (let j = 5; j + 1 < vs; j++)\n {\n indices[indPos] = index + 4;\n indices[indPos + 1] = index + j;\n indices[indPos + 2] = index + j + 1;\n indPos += 3;\n }\n index += vs;\n }\n\n if (hasTriangle)\n {\n for (let i = 0; i < triangles.length; i++)\n {\n indices[indPos + i] = triangles[i] + index;\n }\n indPos += triangles.length;\n }\n\n this.bufferPos = bufPos;\n this.indexPos = indPos;\n }\n}\n\nconst verts = SegmentPacker.vertsByJoint;\n\nfor (let i = 0; i < 256; i++)\n{ verts.push(0); }\n// simple fill\nverts[JOINT_TYPE.FILL] = 1;\n\nfor (let i = 0; i < 8; i++)\n{\n verts[JOINT_TYPE.FILL_EXPAND + i] = 3;\n}\n\n// no caps for now\nverts[JOINT_TYPE.JOINT_BEVEL] = 4 + 5;\nverts[JOINT_TYPE.JOINT_BEVEL + 1] = 4 + 5;\nverts[JOINT_TYPE.JOINT_BEVEL + 2] = 4 + 5;\nverts[JOINT_TYPE.JOINT_BEVEL + 3] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND + 1] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND + 2] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND + 3] = 4 + 5;\nverts[JOINT_TYPE.JOINT_MITER] = 4 + 5;\nverts[JOINT_TYPE.JOINT_MITER + 1] = 4 + 5;\nverts[JOINT_TYPE.JOINT_MITER + 2] = 4;\nverts[JOINT_TYPE.JOINT_MITER + 3] = 4;\nverts[JOINT_TYPE.JOINT_CAP_BUTT] = 4;\nverts[JOINT_TYPE.JOINT_CAP_BUTT + 1] = 4;\nverts[JOINT_TYPE.JOINT_CAP_SQUARE] = 4;\nverts[JOINT_TYPE.JOINT_CAP_SQUARE + 1] = 4;\nverts[JOINT_TYPE.JOINT_CAP_ROUND] = 4 + 5;\nverts[JOINT_TYPE.JOINT_CAP_ROUND + 1] = 4 + 5;\n\nverts[JOINT_TYPE.CAP_ROUND] = 4;\n","import { LINE_CAP, LINE_JOIN } from '@pixi/graphics';\nimport { JOINT_TYPE } from './const';\nimport { FillStyle } from './FillStyle';\nimport { LineStyle } from './LineStyle';\n\nimport type { IShape, Matrix, SHAPES } from '@pixi/core';\n\n/**\n * A class to contain data useful for Graphics objects\n *\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphicsData\n{\n shape: IShape;\n lineStyle: LineStyle;\n fillStyle: FillStyle;\n matrix: Matrix;\n type: SHAPES;\n holes: Array;\n\n // result of simplification\n closeStroke: boolean;\n points: number[];\n triangles: number[];\n // indices in build\n attribStart: number;\n fillStart: number;\n fillLen: number;\n strokeStart: number;\n strokeLen: number;\n fillAA: boolean;\n\n constructor(shape: IShape, fillStyle: FillStyle = null, lineStyle: LineStyle = null, matrix: Matrix = null)\n {\n this.shape = shape;\n\n this.lineStyle = lineStyle;\n\n this.fillStyle = fillStyle;\n\n this.matrix = matrix;\n\n this.type = shape.type;\n\n this.points = [];\n\n this.holes = [];\n\n this.triangles = [];\n\n this.closeStroke = false;\n\n this.clearBuild();\n }\n\n public clearPath()\n {\n this.points.length = 0;\n this.closeStroke = true;\n }\n\n public clearBuild()\n {\n this.triangles.length = 0;\n this.fillStart = 0;\n this.fillLen = 0;\n this.strokeStart = 0;\n this.strokeLen = 0;\n this.fillAA = false;\n }\n\n public clone(): SmoothGraphicsData\n {\n return new SmoothGraphicsData(\n this.shape,\n this.fillStyle,\n this.lineStyle,\n this.matrix\n );\n }\n\n public capType()\n {\n let cap: number;\n\n switch (this.lineStyle.cap)\n {\n case LINE_CAP.SQUARE:\n cap = JOINT_TYPE.CAP_SQUARE;\n break;\n case LINE_CAP.ROUND:\n cap = JOINT_TYPE.CAP_ROUND;\n break;\n default:\n cap = JOINT_TYPE.CAP_BUTT;\n break;\n }\n\n return cap;\n }\n\n public goodJointType()\n {\n let joint: number;\n\n switch (this.lineStyle.join)\n {\n case LINE_JOIN.BEVEL:\n joint = JOINT_TYPE.JOINT_BEVEL;\n break;\n case LINE_JOIN.ROUND:\n joint = JOINT_TYPE.JOINT_ROUND;\n break;\n default:\n joint = JOINT_TYPE.JOINT_MITER + 3;\n break;\n }\n\n return joint;\n }\n\n public jointType()\n {\n let joint: number;\n\n switch (this.lineStyle.join)\n {\n case LINE_JOIN.BEVEL:\n joint = JOINT_TYPE.JOINT_BEVEL;\n break;\n case LINE_JOIN.ROUND:\n joint = JOINT_TYPE.JOINT_ROUND;\n break;\n default:\n joint = JOINT_TYPE.JOINT_MITER;\n break;\n }\n\n return joint;\n }\n\n public destroy(): void\n {\n this.shape = null;\n this.holes.length = 0;\n this.holes = null;\n this.points.length = 0;\n this.points = null;\n this.lineStyle = null;\n this.fillStyle = null;\n this.triangles = null;\n }\n}\n","import { Program, Shader } from '@pixi/core';\nimport { IGraphicsBatchSettings } from './core/BatchDrawCall';\n\nconst smoothVert = `#version 100\nprecision highp float;\nconst float FILL = 1.0;\nconst float BEVEL = 4.0;\nconst float MITER = 8.0;\nconst float ROUND = 12.0;\nconst float JOINT_CAP_BUTT = 16.0;\nconst float JOINT_CAP_SQUARE = 18.0;\nconst float JOINT_CAP_ROUND = 20.0;\n\nconst float FILL_EXPAND = 24.0;\n\nconst float CAP_BUTT = 1.0;\nconst float CAP_SQUARE = 2.0;\nconst float CAP_ROUND = 3.0;\nconst float CAP_BUTT2 = 4.0;\n\nconst float MITER_LIMIT = 10.0;\n\n// === geom ===\nattribute vec2 aPrev;\nattribute vec2 aPoint1;\nattribute vec2 aPoint2;\nattribute vec2 aNext;\nattribute float aVertexJoint;\nattribute float aTravel;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec4 vLine1;\nvarying vec4 vLine2;\nvarying vec4 vArc;\nvarying float vType;\n\nuniform float resolution;\nuniform float expand;\n\n// === style ===\nattribute float aStyleId;\nattribute vec4 aColor;\n\nvarying float vTextureId;\nvarying vec4 vColor;\nvarying vec2 vTextureCoord;\nvarying vec2 vTravel;\n\nuniform vec2 styleLine[%MAX_STYLES%];\nuniform vec3 styleMatrix[2 * %MAX_STYLES%];\nuniform float styleTextureId[%MAX_STYLES%];\nuniform vec2 samplerSize[%MAX_TEXTURES%];\n\nvec2 doBisect(vec2 norm, float len, vec2 norm2, float len2,\n float dy, float inner) {\n vec2 bisect = (norm + norm2) / 2.0;\n bisect /= dot(norm, bisect);\n vec2 shift = dy * bisect;\n if (inner > 0.5) {\n if (len < len2) {\n if (abs(dy * (bisect.x * norm.y - bisect.y * norm.x)) > len) {\n return dy * norm;\n }\n } else {\n if (abs(dy * (bisect.x * norm2.y - bisect.y * norm2.x)) > len2) {\n return dy * norm;\n }\n }\n }\n return dy * bisect;\n}\n\nvoid main(void){\n vec2 pointA = (translationMatrix * vec3(aPoint1, 1.0)).xy;\n vec2 pointB = (translationMatrix * vec3(aPoint2, 1.0)).xy;\n\n vec2 xBasis = pointB - pointA;\n float len = length(xBasis);\n vec2 forward = xBasis / len;\n vec2 norm = vec2(forward.y, -forward.x);\n\n float type = floor(aVertexJoint / 16.0);\n float vertexNum = aVertexJoint - type * 16.0;\n float dx = 0.0, dy = 1.0;\n\n float capType = floor(type / 32.0);\n type -= capType * 32.0;\n\n int styleId = int(aStyleId + 0.5);\n float lineWidth = styleLine[styleId].x;\n vTextureId = floor(styleTextureId[styleId] / 4.0);\n float scaleMode = styleTextureId[styleId] - vTextureId * 4.0;\n float avgScale = 1.0;\n if (scaleMode > 2.5) {\n avgScale = length(translationMatrix * vec3(1.0, 0.0, 0.0));\n } else if (scaleMode > 1.5) {\n avgScale = length(translationMatrix * vec3(0.0, 1.0, 0.0));\n } else if (scaleMode > 0.5) {\n vec2 avgDiag = (translationMatrix * vec3(1.0, 1.0, 0.0)).xy;\n avgScale = sqrt(dot(avgDiag, avgDiag) * 0.5);\n }\n lineWidth *= 0.5 * avgScale;\n float lineAlignment = 2.0 * styleLine[styleId].y - 1.0;\n vTextureCoord = vec2(0.0);\n\n vec2 pos;\n\n if (capType == CAP_ROUND) {\n vertexNum += 4.0;\n type = JOINT_CAP_ROUND;\n capType = 0.0;\n lineAlignment = -lineAlignment;\n }\n\n vLine1 = vec4(0.0, 10.0, 1.0, 0.0);\n vLine2 = vec4(0.0, 10.0, 1.0, 0.0);\n vArc = vec4(0.0);\n if (type == FILL) {\n pos = pointA;\n vType = 0.0;\n vLine2 = vec4(-2.0, -2.0, -2.0, 0.0);\n vec2 vTexturePixel;\n vTexturePixel.x = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2]);\n vTexturePixel.y = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2 + 1]);\n vTextureCoord = vTexturePixel / samplerSize[int(vTextureId)];\n } else if (type >= FILL_EXPAND && type < FILL_EXPAND + 7.5) {\n // expand vertices\n float flags = type - FILL_EXPAND;\n float flag3 = floor(flags / 4.0);\n float flag2 = floor((flags - flag3 * 4.0) / 2.0);\n float flag1 = flags - flag3 * 4.0 - flag2 * 2.0;\n\n vec2 prev = (translationMatrix * vec3(aPrev, 1.0)).xy;\n\n if (vertexNum < 0.5) {\n pos = prev;\n } else if (vertexNum < 1.5) {\n pos = pointA;\n } else {\n pos = pointB;\n }\n float len2 = length(aNext);\n vec2 bisect = (translationMatrix * vec3(aNext, 0.0)).xy;\n if (len2 > 0.01) {\n bisect = normalize(bisect) * len2;\n }\n\n vec2 n1 = normalize(vec2(pointA.y - prev.y, -(pointA.x - prev.x)));\n vec2 n2 = normalize(vec2(pointB.y - pointA.y, -(pointB.x - pointA.x)));\n vec2 n3 = normalize(vec2(prev.y - pointB.y, -(prev.x - pointB.x)));\n\n if (n1.x * n2.y - n1.y * n2.x < 0.0) {\n n1 = -n1;\n n2 = -n2;\n n3 = -n3;\n }\n pos += bisect * expand;\n\n vLine1 = vec4(16.0, 16.0, 16.0, -1.0);\n if (flag1 > 0.5) {\n vLine1.x = -dot(pos - prev, n1);\n }\n if (flag2 > 0.5) {\n vLine1.y = -dot(pos - pointA, n2);\n }\n if (flag3 > 0.5) {\n vLine1.z = -dot(pos - pointB, n3);\n }\n vLine1.xyz *= resolution;\n vType = 2.0;\n } else if (type >= BEVEL) {\n float dy = lineWidth + expand;\n float shift = lineWidth * lineAlignment;\n float inner = 0.0;\n if (vertexNum >= 1.5) {\n dy = -dy;\n inner = 1.0;\n }\n\n vec2 base, next, xBasis2, bisect;\n float flag = 0.0;\n float side2 = 1.0;\n if (vertexNum < 0.5 || vertexNum > 2.5 && vertexNum < 3.5) {\n next = (translationMatrix * vec3(aPrev, 1.0)).xy;\n base = pointA;\n flag = type - floor(type / 2.0) * 2.0;\n side2 = -1.0;\n } else {\n next = (translationMatrix * vec3(aNext, 1.0)).xy;\n base = pointB;\n if (type >= MITER && type < MITER + 3.5) {\n flag = step(MITER + 1.5, type);\n // check miter limit here?\n }\n }\n xBasis2 = next - base;\n float len2 = length(xBasis2);\n vec2 norm2 = vec2(xBasis2.y, -xBasis2.x) / len2;\n float D = norm.x * norm2.y - norm.y * norm2.x;\n if (D < 0.0) {\n inner = 1.0 - inner;\n }\n\n norm2 *= side2;\n\n float collinear = step(0.0, dot(norm, norm2));\n\n vType = 0.0;\n float dy2 = -1000.0;\n\n if (abs(D) < 0.01 && collinear < 0.5) {\n if (type >= ROUND && type < ROUND + 1.5) {\n type = JOINT_CAP_ROUND;\n }\n //TODO: BUTT here too\n }\n\n vLine1 = vec4(0.0, lineWidth, max(abs(norm.x), abs(norm.y)), min(abs(norm.x), abs(norm.y)));\n vLine2 = vec4(0.0, lineWidth, max(abs(norm2.x), abs(norm2.y)), min(abs(norm2.x), abs(norm2.y)));\n\n if (vertexNum < 3.5) {\n if (abs(D) < 0.01 && collinear < 0.5) {\n pos = (shift + dy) * norm;\n } else {\n if (flag < 0.5 && inner < 0.5) {\n pos = (shift + dy) * norm;\n } else {\n pos = doBisect(norm, len, norm2, len2, shift + dy, inner);\n }\n }\n vLine2.y = -1000.0;\n if (capType >= CAP_BUTT && capType < CAP_ROUND) {\n float extra = step(CAP_SQUARE, capType) * lineWidth;\n vec2 back = -forward;\n if (vertexNum < 0.5 || vertexNum > 2.5) {\n pos += back * (expand + extra);\n dy2 = expand;\n } else {\n dy2 = dot(pos + base - pointA, back) - extra;\n }\n }\n if (type >= JOINT_CAP_BUTT && type < JOINT_CAP_SQUARE + 0.5) {\n float extra = step(JOINT_CAP_SQUARE, type) * lineWidth;\n if (vertexNum < 0.5 || vertexNum > 2.5) {\n vLine2.y = dot(pos + base - pointB, forward) - extra;\n } else {\n pos += forward * (expand + extra);\n vLine2.y = expand;\n if (capType >= CAP_BUTT) {\n dy2 -= expand + extra;\n }\n }\n }\n } else if (type >= JOINT_CAP_ROUND && type < JOINT_CAP_ROUND + 1.5) {\n base += shift * norm;\n if (inner > 0.5) {\n dy = -dy;\n inner = 0.0;\n }\n vec2 d2 = abs(dy) * forward;\n if (vertexNum < 4.5) {\n dy = -dy;\n pos = dy * norm;\n } else if (vertexNum < 5.5) {\n pos = dy * norm;\n } else if (vertexNum < 6.5) {\n pos = dy * norm + d2;\n vArc.x = abs(dy);\n } else {\n dy = -dy;\n pos = dy * norm + d2;\n vArc.x = abs(dy);\n }\n vLine2 = vec4(0.0, lineWidth * 2.0 + 10.0, 1.0 , 0.0); // forget about line2 with type=3\n vArc.y = dy;\n vArc.z = 0.0;\n vArc.w = lineWidth;\n vType = 3.0;\n } else if (abs(D) < 0.01 && collinear < 0.5) {\n pos = dy * norm;\n } else {\n if (inner > 0.5) {\n dy = -dy;\n inner = 0.0;\n }\n float side = sign(dy);\n vec2 norm3 = normalize(norm + norm2);\n\n if (type >= MITER && type < MITER + 3.5) {\n vec2 farVertex = doBisect(norm, len, norm2, len2, shift + dy, 0.0);\n if (length(farVertex) > abs(shift + dy) * MITER_LIMIT) {\n type = BEVEL;\n }\n }\n\n if (vertexNum < 4.5) {\n pos = doBisect(norm, len, norm2, len2, shift - dy, 1.0);\n } else if (vertexNum < 5.5) {\n pos = (shift + dy) * norm;\n } else if (vertexNum > 7.5) {\n pos = (shift + dy) * norm2;\n } else {\n if (type >= ROUND && type < ROUND + 1.5) {\n pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0);\n float d2 = abs(shift + dy);\n if (length(pos) > abs(shift + dy) * 1.5) {\n if (vertexNum < 6.5) {\n pos.x = (shift + dy) * norm.x - d2 * norm.y;\n pos.y = (shift + dy) * norm.y + d2 * norm.x;\n } else {\n pos.x = (shift + dy) * norm2.x + d2 * norm2.y;\n pos.y = (shift + dy) * norm2.y - d2 * norm2.x;\n }\n }\n } else if (type >= MITER && type < MITER + 3.5) {\n pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0); //farVertex\n } else if (type >= BEVEL && type < BEVEL + 1.5) {\n float d2 = side / resolution;\n if (vertexNum < 6.5) {\n pos = (shift + dy) * norm + d2 * norm3;\n } else {\n pos = (shift + dy) * norm2 + d2 * norm3;\n }\n }\n }\n\n if (type >= ROUND && type < ROUND + 1.5) {\n vArc.x = side * dot(pos, norm3);\n vArc.y = pos.x * norm3.y - pos.y * norm3.x;\n vArc.z = dot(norm, norm3) * (lineWidth + side * shift);\n vArc.w = lineWidth + side * shift;\n vType = 3.0;\n } else if (type >= MITER && type < MITER + 3.5) {\n vType = 1.0;\n } else if (type >= BEVEL && type < BEVEL + 1.5) {\n vType = 4.0;\n vArc.z = dot(norm, norm3) * (lineWidth + side * shift) - side * dot(pos, norm3);\n }\n\n dy = side * (dot(pos, norm) - shift);\n dy2 = side * (dot(pos, norm2) - shift);\n }\n\n pos += base;\n vLine1.xy = vec2(dy, vLine1.y) * resolution;\n vLine2.xy = vec2(dy2, vLine2.y) * resolution;\n vArc = vArc * resolution;\n vTravel = vec2(aTravel * avgScale + dot(pos - pointA, vec2(-norm.y, norm.x)), avgScale);\n }\n\n gl_Position = vec4((projectionMatrix * vec3(pos, 1.0)).xy, 0.0, 1.0);\n\n vColor = aColor * tint;\n}`;\n\nconst precision = `#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n#else\n precision mediump float;\n#endif\n`;\n\nconst smoothFrag = `%PRECISION%\nvarying vec4 vColor;\nvarying vec4 vLine1;\nvarying vec4 vLine2;\nvarying vec4 vArc;\nvarying float vType;\nvarying float vTextureId;\nvarying vec2 vTextureCoord;\nvarying vec2 vTravel;\nuniform sampler2D uSamplers[%MAX_TEXTURES%];\n\n%PIXEL_LINE%\n\nvoid main(void){\n %PIXEL_COVERAGE%\n\n vec4 texColor;\n float textureId = floor(vTextureId+0.5);\n %FOR_LOOP%\n\n gl_FragColor = vColor * texColor * alpha;\n}\n`;\n\nconst pixelLineFunc = [`\nfloat pixelLine(float x, float A, float B) {\n return clamp(x + 0.5, 0.0, 1.0);\n}\n`, `\nfloat pixelLine(float x, float A, float B) {\n float y = abs(x), s = sign(x);\n if (y * 2.0 < A - B) {\n return 0.5 + s * y / A;\n }\n y -= (A - B) * 0.5;\n y = max(1.0 - y / B, 0.0);\n return (1.0 + s * (1.0 - y * y)) * 0.5;\n //return clamp(x + 0.5, 0.0, 1.0);\n}\n`];\n\nconst pixelCoverage = `float alpha = 1.0;\nif (vType < 0.5) {\n float left = pixelLine(-vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float right = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float near = vLine2.x - 0.5;\n float far = min(vLine2.x + 0.5, 0.0);\n float top = vLine2.y - 0.5;\n float bottom = min(vLine2.y + 0.5, 0.0);\n alpha = (right - left) * max(bottom - top, 0.0) * max(far - near, 0.0);\n} else if (vType < 1.5) {\n float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n alpha = a2 * b2 - a1 * b1;\n} else if (vType < 2.5) {\n alpha *= max(min(vLine1.x + 0.5, 1.0), 0.0);\n alpha *= max(min(vLine1.y + 0.5, 1.0), 0.0);\n alpha *= max(min(vLine1.z + 0.5, 1.0), 0.0);\n} else if (vType < 3.5) {\n float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float alpha_miter = a2 * b2 - a1 * b1;\n float alpha_plane = clamp(vArc.z - vArc.x + 0.5, 0.0, 1.0);\n float d = length(vArc.xy);\n float circle_hor = max(min(vArc.w, d + 0.5) - max(-vArc.w, d - 0.5), 0.0);\n float circle_vert = min(vArc.w * 2.0, 1.0);\n float alpha_circle = circle_hor * circle_vert;\n alpha = min(alpha_miter, max(alpha_circle, alpha_plane));\n} else {\n float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n alpha = a2 * b2 - a1 * b1;\n alpha *= clamp(vArc.z + 0.5, 0.0, 1.0);\n}\n`;\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphicsShader extends Shader\n{\n settings: IGraphicsBatchSettings;\n\n constructor(settings: IGraphicsBatchSettings,\n vert = smoothVert,\n frag = smoothFrag,\n uniforms = {})\n {\n vert = SmoothGraphicsShader.generateVertexSrc(settings, vert);\n frag = SmoothGraphicsShader.generateFragmentSrc(settings, frag);\n\n const { maxStyles, maxTextures } = settings;\n const sampleValues = new Int32Array(maxTextures);\n\n for (let i = 0; i < maxTextures; i++)\n {\n sampleValues[i] = i;\n }\n super(Program.from(vert, frag), (Object as any).assign(uniforms, {\n styleMatrix: new Float32Array(6 * maxStyles),\n styleTextureId: new Float32Array(maxStyles),\n styleLine: new Float32Array(2 * maxStyles),\n samplerSize: new Float32Array(2 * maxTextures),\n uSamplers: sampleValues,\n tint: new Float32Array([1, 1, 1, 1]),\n resolution: 1,\n expand: 1,\n }));\n this.settings = settings;\n }\n\n static generateVertexSrc(settings: IGraphicsBatchSettings, vertexSrc = smoothVert): string\n {\n const { maxStyles, maxTextures } = settings;\n\n vertexSrc = vertexSrc.replace(/%MAX_TEXTURES%/gi, `${maxTextures}`)\n .replace(/%MAX_STYLES%/gi, `${maxStyles}`);\n\n return vertexSrc;\n }\n\n static generateFragmentSrc(settings: IGraphicsBatchSettings, fragmentSrc = smoothFrag): string\n {\n const { maxTextures, pixelLine } = settings;\n\n fragmentSrc = fragmentSrc.replace(/%PRECISION%/gi, precision)\n .replace(/%PIXEL_LINE%/gi, pixelLineFunc[pixelLine])\n .replace(/%PIXEL_COVERAGE%/gi, pixelCoverage)\n .replace(/%MAX_TEXTURES%/gi, `${maxTextures}`)\n .replace(/%FOR_LOOP%/gi, this.generateSampleSrc(maxTextures));\n\n return fragmentSrc;\n }\n\n static generateSampleSrc(maxTextures: number): string\n {\n let src = '';\n\n src += '\\n';\n src += '\\n';\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i > 0)\n {\n src += '\\nelse ';\n }\n\n if (i < maxTextures - 1)\n {\n src += `if(textureId < ${i}.5)`;\n }\n\n src += '\\n{';\n src += `\\n\\ttexColor = texture2D(uSamplers[${i}], vTextureCoord);`;\n src += '\\n}';\n }\n\n src += '\\n';\n src += '\\n';\n\n return src;\n }\n}\n","import { SmoothGraphicsShader } from './SmoothShader';\n\nconst dashFrag = `%PRECISION%\nvarying vec4 vColor;\nvarying vec4 vLine1;\nvarying vec4 vLine2;\nvarying vec4 vArc;\nvarying float vType;\nvarying float vTextureId;\nvarying vec2 vTextureCoord;\nvarying vec2 vTravel;\nuniform sampler2D uSamplers[%MAX_TEXTURES%];\nuniform float dash;\nuniform float gap;\n\n%PIXEL_LINE%\n\nvoid main(void){\n %PIXEL_COVERAGE%\n\n float d = dash * vTravel.y;\n if (d > 0.0) {\n float g = gap * vTravel.y;\n if (g > 0.0) {\n float t = mod(vTravel.x, d + g);\n alpha *= mix(\n min(0.5 * d + 0.5 - abs(t - 0.5 * d), 1.0),\n max(abs(t - 0.5 * g - d) - 0.5 * g + 0.5, 0.0),\n step(d, t)\n );\n }\n } else {\n alpha = 0.0;\n }\n\n vec4 texColor;\n float textureId = floor(vTextureId+0.5);\n %FOR_LOOP%\n\n gl_FragColor = vColor * texColor * alpha;\n}\n`;\n\n/**\n * @memberof PIXI.smooth\n */\nexport interface IDashParams\n{\n dash: number;\n gap: number;\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class DashLineShader extends SmoothGraphicsShader\n{\n constructor(dashParams?: IDashParams)\n {\n const settings = { maxStyles: 16, maxTextures: 1, pixelLine: 1 };\n\n super(settings, undefined, dashFrag,\n dashParams || {\n dash: 8.0,\n gap: 5.0\n });\n }\n}\n","import { LINE_SCALE_MODE } from './core/LineStyle';\n\nexport interface ISettings\n{\n LINE_SCALE_MODE: string;\n SHADER_MAX_STYLES: number;\n SHADER_MAX_TEXTURES: number;\n PIXEL_LINE: number;\n}\n\nexport const settings: ISettings = {\n LINE_SCALE_MODE: LINE_SCALE_MODE.NORMAL,\n SHADER_MAX_STYLES: 24,\n SHADER_MAX_TEXTURES: 4,\n PIXEL_LINE: 0,\n};\n","// for type only\nimport { SHAPES } from '@pixi/core';\nimport { BuildData } from '../core/BuildData';\nimport { JOINT_TYPE } from '../core/const';\nimport { SmoothGraphicsData } from '../core/SmoothGraphicsData';\n\nimport type { Circle, Ellipse, RoundedRectangle } from '@pixi/core';\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class CircleBuilder implements IShapeBuilder\n{\n path(graphicsData: SmoothGraphicsData, _target: BuildData)\n {\n // need to convert points to a nice regular data\n const points = graphicsData.points;\n\n let x;\n let y;\n let dx;\n let dy;\n let rx;\n let ry;\n\n if (graphicsData.type === SHAPES.CIRC)\n {\n const circle = graphicsData.shape as Circle;\n\n x = circle.x;\n y = circle.y;\n rx = ry = circle.radius;\n dx = dy = 0;\n }\n else if (graphicsData.type === SHAPES.ELIP)\n {\n const ellipse = graphicsData.shape as Ellipse;\n\n x = ellipse.x;\n y = ellipse.y;\n rx = ellipse.width;\n ry = ellipse.height;\n dx = dy = 0;\n }\n else\n {\n const roundedRect = graphicsData.shape as RoundedRectangle;\n const halfWidth = roundedRect.width / 2;\n const halfHeight = roundedRect.height / 2;\n\n x = roundedRect.x + halfWidth;\n y = roundedRect.y + halfHeight;\n rx = ry = Math.max(0, Math.min(roundedRect.radius, Math.min(halfWidth, halfHeight)));\n dx = halfWidth - rx;\n dy = halfHeight - ry;\n }\n\n if (!(rx >= 0 && ry >= 0 && dx >= 0 && dy >= 0))\n {\n points.length = 0;\n\n return;\n }\n\n // Choose a number of segments such that the maximum absolute deviation from the circle is approximately 0.029\n const n = Math.ceil(2.3 * Math.sqrt(rx + ry));\n const m = (n * 8) + (dx ? 4 : 0) + (dy ? 4 : 0);\n\n points.length = m;\n\n if (m === 0)\n {\n return;\n }\n\n if (n === 0)\n {\n points.length = 8;\n points[0] = points[6] = x + dx;\n points[1] = points[3] = y + dy;\n points[2] = points[4] = x - dx;\n points[5] = points[7] = y - dy;\n\n return;\n }\n\n let j1 = 0;\n let j2 = (n * 4) + (dx ? 2 : 0) + 2;\n let j3 = j2;\n let j4 = m;\n\n {\n const x0 = dx + rx;\n const y0 = dy;\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n\n if (dy)\n {\n const y2 = y - y0;\n\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n }\n\n for (let i = 1; i < n; i++)\n {\n const a = Math.PI / 2 * (i / n);\n const x0 = dx + (Math.cos(a) * rx);\n const y0 = dy + (Math.sin(a) * ry);\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n\n {\n const x0 = dx;\n const y0 = dy + ry;\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x1;\n\n if (dx)\n {\n points[j1++] = x2;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x2;\n }\n }\n }\n\n fill(graphicsData: SmoothGraphicsData, target: BuildData)\n {\n const { verts, joints } = target;\n const { points, triangles } = graphicsData;\n\n if (points.length === 0)\n {\n return;\n }\n\n let x;\n let y;\n\n if (graphicsData.type !== SHAPES.RREC)\n {\n const circle = graphicsData.shape as Circle;\n\n x = circle.x;\n y = circle.y;\n }\n else\n {\n const roundedRect = graphicsData.shape as RoundedRectangle;\n\n x = roundedRect.x + (roundedRect.width / 2);\n y = roundedRect.y + (roundedRect.height / 2);\n }\n\n const matrix = graphicsData.matrix;\n const cx = matrix ? (matrix.a * x) + (matrix.c * y) + matrix.tx : x;\n const cy = matrix ? (matrix.b * x) + (matrix.d * y) + matrix.ty : y;\n\n let vertPos = 1;\n const center = 0;\n\n if (!graphicsData.fillAA)\n {\n verts.push(cx, cy);\n joints.push(JOINT_TYPE.FILL);\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.FILL);\n\n for (let i = 2; i < points.length; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(JOINT_TYPE.FILL);\n\n triangles.push(vertPos++, center, vertPos);\n }\n\n triangles.push(center + 1, center, vertPos);\n\n return;\n }\n\n const len = points.length;\n\n let x1 = points[len - 2];\n let y1 = points[len - 1];\n\n let nx1 = y1 - points[len - 3];\n let ny1 = points[len - 4] - x1;\n const n1 = Math.sqrt((nx1 * nx1) + (ny1 * ny1));\n\n nx1 /= n1;\n ny1 /= n1;\n\n let bx1;\n let by1;\n\n for (let i = 0; i < len; i += 2)\n {\n const x2 = points[i];\n const y2 = points[i + 1];\n\n let nx2 = y2 - y1;\n let ny2 = x1 - x2;\n const n2 = Math.sqrt((nx2 * nx2) + (ny2 * ny2));\n\n nx2 /= n2;\n ny2 /= n2;\n\n let bx2 = nx1 + nx2;\n let by2 = ny1 + ny2;\n const b2 = (nx2 * bx2) + (ny2 * by2);\n\n bx2 /= b2;\n by2 /= b2;\n\n if (i > 0)\n {\n verts.push(bx2);\n verts.push(by2);\n }\n else\n {\n bx1 = bx2;\n by1 = by2;\n }\n\n verts.push(cx);\n verts.push(cy);\n verts.push(x1);\n verts.push(y1);\n verts.push(x2);\n verts.push(y2);\n\n verts.push(0);\n verts.push(0);\n verts.push(bx2);\n verts.push(by2);\n\n joints.push(JOINT_TYPE.FILL_EXPAND + 2);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n\n x1 = x2;\n y1 = y2;\n nx1 = nx2;\n ny1 = ny2;\n }\n\n verts.push(bx1);\n verts.push(by1);\n }\n\n line(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n const { verts, joints } = target;\n const { points } = graphicsData;\n const joint = points.length === 8 // we dont need joints for arcs\n ? graphicsData.goodJointType() : JOINT_TYPE.JOINT_MITER + 3;\n const len = points.length;\n\n if (len === 0)\n {\n return;\n }\n\n verts.push(points[len - 2], points[len - 1]);\n joints.push(JOINT_TYPE.NONE);\n for (let i = 0; i < len; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(joint);\n }\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n verts.push(points[2], points[3]);\n joints.push(JOINT_TYPE.NONE);\n }\n}\n","import { Point, Polygon, utils } from '@pixi/core';\nimport { BuildData } from '../core/BuildData';\nimport { JOINT_TYPE } from '../core/const';\nimport { SmoothGraphicsData } from '../core/SmoothGraphicsData';\n\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\n\nconst tempArr: Array = [];\n\nfunction fixOrientation(points: number[], hole = false)\n{\n const m = points.length;\n\n if (m < 6)\n {\n return;\n }\n\n let area = 0;\n\n for (let i = 0, x1 = points[m - 2], y1 = points[m - 1]; i < m; i += 2)\n {\n const x2 = points[i];\n const y2 = points[i + 1];\n\n area += (x2 - x1) * (y2 + y1);\n\n x1 = x2;\n y1 = y2;\n }\n\n if ((!hole && area > 0) || (hole && area <= 0))\n {\n const n = m / 2;\n\n for (let i = n + (n % 2); i < m; i += 2)\n {\n const i1 = m - i - 2;\n const i2 = m - i - 1;\n const i3 = i;\n const i4 = i + 1;\n\n [points[i1], points[i3]] = [points[i3], points[i1]];\n [points[i2], points[i4]] = [points[i4], points[i2]];\n }\n }\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class PolyBuilder implements IShapeBuilder\n{\n path(graphicsData: SmoothGraphicsData, buildData: BuildData)\n {\n const shape = graphicsData.shape as Polygon;\n const points = graphicsData.points = shape.points.slice();\n const eps = buildData.closePointEps;\n const eps2 = eps * eps;\n\n if (points.length === 0)\n {\n return;\n }\n\n const firstPoint = new Point(points[0], points[1]);\n const lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n const closedShape = graphicsData.closeStroke = shape.closeStroke;\n\n let len = points.length;\n let newLen = 2;\n\n // 1. remove equal points\n for (let i = 2; i < len; i += 2)\n {\n const x1 = points[i - 2];\n const y1 = points[i - 1];\n const x2 = points[i];\n const y2 = points[i + 1];\n let flag = true;\n\n if (Math.abs(x1 - x2) < eps\n && Math.abs(y1 - y2) < eps)\n {\n flag = false;\n }\n\n if (flag)\n {\n points[newLen] = points[i];\n points[newLen + 1] = points[i + 1];\n newLen += 2;\n }\n }\n points.length = len = newLen;\n\n newLen = 2;\n // 2. remove middle points\n for (let i = 2; i + 2 < len; i += 2)\n {\n let x1 = points[i - 2];\n let y1 = points[i - 1];\n const x2 = points[i];\n const y2 = points[i + 1];\n let x3 = points[i + 2];\n let y3 = points[i + 3];\n\n x1 -= x2;\n y1 -= y2;\n x3 -= x2;\n y3 -= y2;\n let flag = true;\n\n if (Math.abs((x3 * y1) - (y3 * x1)) < eps2)\n {\n if ((x1 * x3) + (y1 * y3) < -eps2)\n {\n flag = false;\n }\n }\n\n if (flag)\n {\n points[newLen] = points[i];\n points[newLen + 1] = points[i + 1];\n newLen += 2;\n }\n }\n points[newLen] = points[len - 2];\n points[newLen + 1] = points[len - 1];\n newLen += 2;\n\n points.length = len = newLen;\n\n if (len <= 2)\n {\n // suddenly, nothing\n return;\n }\n\n if (closedShape)\n {\n // first point should be last point in closed line!\n const closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps\n && Math.abs(firstPoint.y - lastPoint.y) < eps;\n\n if (closedPath)\n {\n points.pop();\n points.pop();\n }\n }\n }\n\n line(graphicsData: SmoothGraphicsData, buildData: BuildData)\n {\n const { closeStroke, points } = graphicsData;\n // const eps = buildData.closePointEps;\n // const eps2 = eps * eps;\n const len = points.length;\n // const style = graphicsData.lineStyle;\n\n if (len <= 2)\n {\n return;\n }\n const { verts, joints } = buildData;\n\n // TODO: alignment\n\n const joint = graphicsData.jointType();\n const cap = graphicsData.capType();\n let prevCap = 0;\n\n let prevX: number; let\n prevY: number;\n\n if (closeStroke)\n {\n prevX = points[len - 2];\n prevY = points[len - 1];\n joints.push(JOINT_TYPE.NONE);\n }\n else\n {\n prevX = points[2];\n prevY = points[3];\n if (cap === JOINT_TYPE.CAP_ROUND)\n {\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.CAP_ROUND);\n prevCap = 0;\n }\n else\n {\n prevCap = cap;\n joints.push(JOINT_TYPE.NONE);\n }\n }\n verts.push(prevX, prevY);\n\n /* Line segments of interest where (x1,y1) forms the corner. */\n for (let i = 0; i < len; i += 2)\n {\n const x1 = points[i]; const\n y1 = points[i + 1];\n\n // let x2: number; let\n // y2: number;\n\n // if (i + 2 < len)\n // {\n // x2 = points[i + 2];\n // y2 = points[i + 3];\n // }\n // else\n // {\n // x2 = points[0];\n // y2 = points[1];\n // }\n\n // const dx = x2 - x1;\n // const dy = y2 - y1;\n // let nextX: number; let\n // nextY: number;\n\n let endJoint = joint;\n\n if (i + 2 >= len)\n {\n // nextX = points[2];\n // nextY = points[3];\n if (!closeStroke)\n {\n endJoint = JOINT_TYPE.NONE;\n }\n }\n else if (i + 4 >= len)\n {\n // nextX = points[0];\n // nextY = points[1];\n if (!closeStroke)\n {\n if (cap === JOINT_TYPE.CAP_ROUND)\n {\n endJoint = JOINT_TYPE.JOINT_CAP_ROUND;\n }\n if (cap === JOINT_TYPE.CAP_BUTT)\n {\n endJoint = JOINT_TYPE.JOINT_CAP_BUTT;\n }\n if (cap === JOINT_TYPE.CAP_SQUARE)\n {\n endJoint = JOINT_TYPE.JOINT_CAP_SQUARE;\n }\n }\n }\n // else\n // {\n // nextX = points[i + 4];\n // nextY = points[i + 5];\n // }\n\n // const dx3 = x1 - prevX;\n // const dy3 = y1 - prevY;\n\n endJoint += prevCap;\n prevCap = 0;\n\n verts.push(x1, y1);\n joints.push(endJoint);\n\n prevX = x1;\n prevY = y1;\n }\n\n if (closeStroke)\n {\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n verts.push(points[2], points[3]);\n joints.push(JOINT_TYPE.NONE);\n }\n else\n {\n verts.push(points[len - 4], points[len - 3]);\n joints.push(JOINT_TYPE.NONE);\n }\n }\n\n fill(graphicsData: SmoothGraphicsData, buildData: BuildData)\n {\n let points = graphicsData.points;\n // TODO: simplify holes too!\n const holes = graphicsData.holes;\n const eps = buildData.closePointEps;\n\n const { verts, joints } = buildData;\n\n if (points.length < 6)\n {\n return;\n }\n const holeArray = [];\n let len = points.length;\n\n fixOrientation(points, false);\n\n // Process holes..\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n\n fixOrientation(hole.points, true);\n\n holeArray.push(points.length / 2);\n points = points.concat(hole.points);\n }\n\n // TODO: reduce size later?\n const pn = tempArr;\n\n if (pn.length < points.length)\n {\n pn.length = points.length;\n }\n let start = 0;\n\n for (let i = 0; i <= holeArray.length; i++)\n {\n let finish = len / 2;\n\n if (i > 0)\n {\n if (i < holeArray.length)\n {\n finish = holeArray[i];\n }\n else\n {\n finish = (points.length >> 1);\n }\n }\n pn[start * 2] = finish - 1;\n pn[((finish - 1) * 2) + 1] = start;\n for (let j = start; j + 1 < finish; j++)\n {\n pn[(j * 2) + 1] = j + 1;\n pn[(j * 2) + 2] = j;\n }\n start = finish;\n }\n\n // sort color\n graphicsData.triangles = utils.earcut(points, holeArray, 2);\n\n if (!graphicsData.triangles)\n {\n return;\n }\n\n if (!graphicsData.fillAA)\n {\n for (let i = 0; i < points.length; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(JOINT_TYPE.FILL);\n }\n\n return;\n }\n\n const { triangles } = graphicsData;\n\n len = points.length;\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n // TODO: holes prev/next!!!\n let flag = 0;\n\n for (let j = 0; j < 3; j++)\n {\n const ind1 = triangles[i + j];\n const ind2 = triangles[i + ((j + 1) % 3)];\n\n if (pn[ind1 * 2] === ind2 || pn[(ind1 * 2) + 1] === ind2)\n {\n flag |= (1 << j);\n }\n }\n joints.push(JOINT_TYPE.FILL_EXPAND + flag);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n }\n\n // bisect, re-using pn\n for (let ind = 0; ind < len / 2; ind++)\n {\n const prev = pn[ind * 2];\n const next = pn[(ind * 2) + 1];\n let nx1 = (points[(next * 2) + 1] - points[(ind * 2) + 1]); let\n ny1 = -(points[next * 2] - points[ind * 2]);\n let nx2 = (points[(ind * 2) + 1] - points[(prev * 2) + 1]); let\n ny2 = -(points[ind * 2] - points[prev * 2]);\n const D1 = Math.sqrt((nx1 * nx1) + (ny1 * ny1));\n\n nx1 /= D1;\n ny1 /= D1;\n const D2 = Math.sqrt((nx2 * nx2) + (ny2 * ny2));\n\n nx2 /= D2;\n ny2 /= D2;\n\n let bx = (nx1 + nx2);\n let by = (ny1 + ny2);\n const D = (bx * nx1) + (by * ny1);\n\n if (Math.abs(D) < eps)\n {\n bx = nx1;\n by = ny1;\n }\n else\n {\n bx /= D;\n by /= D;\n }\n pn[ind * 2] = bx;\n pn[(ind * 2) + 1] = by;\n }\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n const prev = triangles[i];\n const ind = triangles[i + 1];\n const next = triangles[i + 2];\n const nx1 = (points[(next * 2) + 1] - points[(ind * 2) + 1]); const\n ny1 = -(points[next * 2] - points[ind * 2]);\n const nx2 = (points[(ind * 2) + 1] - points[(prev * 2) + 1]); const\n ny2 = -(points[ind * 2] - points[prev * 2]);\n\n let j1 = 1;\n\n if ((nx1 * ny2) - (nx2 * ny1) > 0.0)\n {\n j1 = 2;\n }\n\n for (let j = 0; j < 3; j++)\n {\n const ind = triangles[i + ((j * j1) % 3)];\n\n verts.push(points[ind * 2], points[(ind * 2) + 1]);\n }\n for (let j = 0; j < 3; j++)\n {\n const ind = triangles[i + ((j * j1) % 3)];\n\n verts.push(pn[ind * 2], pn[(ind * 2) + 1]);\n }\n }\n }\n}\n","import { BuildData } from '../core/BuildData';\nimport { JOINT_TYPE } from '../core/const';\nimport { SmoothGraphicsData } from '../core/SmoothGraphicsData';\nimport { PolyBuilder } from './PolyBuilder';\n\nimport type { Rectangle } from '@pixi/core';\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class RectangleBuilder implements IShapeBuilder\n{\n _polyBuilder = new PolyBuilder();\n\n path(graphicsData: SmoothGraphicsData, _target: BuildData)\n {\n // --- //\n // need to convert points to a nice regular data\n //\n const rectData = graphicsData.shape as Rectangle;\n const x = rectData.x;\n const y = rectData.y;\n const width = rectData.width;\n const height = rectData.height;\n const points = graphicsData.points;\n\n points.length = 0;\n\n points.push(x, y,\n x + width, y,\n x + width, y + height,\n x, y + height);\n }\n\n line(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n const { verts, joints } = target;\n const { points } = graphicsData;\n\n const joint = graphicsData.goodJointType();\n const len = points.length;\n\n verts.push(points[len - 2], points[len - 1]);\n joints.push(JOINT_TYPE.NONE);\n for (let i = 0; i < len; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(joint);\n }\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n verts.push(points[2], points[3]);\n joints.push(JOINT_TYPE.NONE);\n }\n\n fill(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n const { verts, joints } = target;\n const { points, triangles } = graphicsData;\n\n triangles.length = 0;\n\n if (!graphicsData.fillAA)\n {\n verts.push(points[0], points[1],\n points[2], points[3],\n points[4], points[5],\n points[6], points[7]);\n\n joints.push(JOINT_TYPE.FILL, JOINT_TYPE.FILL, JOINT_TYPE.FILL, JOINT_TYPE.FILL);\n triangles.push(0, 1, 2, 0, 2, 3);\n\n return;\n }\n\n this._polyBuilder.fill(graphicsData, target);\n }\n}\n","import { CircleBuilder } from './CircleBuilder';\n\nimport type { BuildData } from '../core/BuildData';\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\nimport type { SmoothGraphicsData } from '../core/SmoothGraphicsData';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class RoundedRectangleBuilder implements IShapeBuilder\n{\n _circleBuilder = new CircleBuilder();\n\n path(graphicsData: SmoothGraphicsData, target: BuildData)\n {\n this._circleBuilder.path(graphicsData, target);\n }\n\n line(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n this._circleBuilder.line(graphicsData, target);\n }\n\n fill(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n this._circleBuilder.fill(graphicsData, target);\n }\n}\n","import { SHAPES } from '@pixi/core';\nimport { IShapeBuilder } from '../core/IShapeBuilder';\nimport { CircleBuilder } from './CircleBuilder';\nimport { PolyBuilder } from './PolyBuilder';\nimport { RectangleBuilder } from './RectangleBuilder';\nimport { RoundedRectangleBuilder } from './RoundedRectangleBuilder';\n\nexport const FILL_COMMANDS: Record = {\n [SHAPES.POLY]: new PolyBuilder(),\n [SHAPES.CIRC]: new CircleBuilder(),\n [SHAPES.ELIP]: new CircleBuilder(),\n [SHAPES.RECT]: new RectangleBuilder(),\n [SHAPES.RREC]: new RoundedRectangleBuilder()\n};\n\nexport { CircleBuilder, PolyBuilder, RectangleBuilder, RoundedRectangleBuilder };\n","import {\n Buffer,\n Color,\n Geometry,\n Matrix,\n Point,\n SHAPES,\n Texture,\n TYPES,\n WRAP_MODES,\n} from '@pixi/core';\nimport { Bounds } from '@pixi/display';\nimport { BatchDrawCall, IGraphicsBatchSettings, matrixEquals } from './core/BatchDrawCall';\nimport { BatchPart } from './core/BatchPart';\nimport { BuildData } from './core/BuildData';\nimport { FillStyle } from './core/FillStyle';\nimport { LineStyle } from './core/LineStyle';\nimport { SegmentPacker } from './core/SegmentPacker';\nimport { SmoothGraphicsData } from './core/SmoothGraphicsData';\nimport { FILL_COMMANDS } from './shapes';\n\nimport type { Circle, Ellipse, IPointData, Polygon, Rectangle, RoundedRectangle } from '@pixi/core';\n\n/*\n * Complex shape type\n * @todo Move to Math shapes\n */\nexport type IShape = Circle | Ellipse | Polygon | Rectangle | RoundedRectangle;\n\nexport const BATCH_POOL: Array = [];\nexport const DRAW_CALL_POOL: Array = [];\n\nconst tmpPoint = new Point();\nconst tmpBounds = new Bounds();\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphicsGeometry extends Geometry\n{\n public static BATCHABLE_SIZE = 100;\n\n public boundsPadding: number;\n\n indicesUint16: Uint16Array | Uint32Array = null;\n batchable: boolean;\n\n buildData: BuildData;\n\n get points()\n {\n return this.buildData.verts;\n }\n\n get closePointEps()\n {\n return this.buildData.closePointEps;\n }\n\n graphicsData: Array;\n drawCalls: Array;\n batchDirty: number;\n batches: Array;\n packer: SegmentPacker;\n packSize: number;\n pack32index: boolean;\n strideFloats: number;\n\n protected dirty: number;\n protected cacheDirty: number;\n protected clearDirty: number;\n protected shapeBuildIndex: number;\n protected shapeBatchIndex: number;\n protected _bounds: Bounds;\n protected boundsDirty: number;\n\n _buffer: Buffer;\n _indexBuffer: Buffer;\n _bufferFloats: Float32Array;\n _bufferUint: Uint32Array;\n\n initAttributes(_static: boolean)\n {\n this._buffer = new Buffer(null, _static, false);\n this._bufferFloats = new Float32Array();\n this._bufferUint = new Uint32Array();\n\n this._indexBuffer = new Buffer(null, _static, true);\n this.addAttribute('aPrev', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aPoint1', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aPoint2', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aNext', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aTravel', this._buffer, 1, false, TYPES.FLOAT)\n // number of vertex\n .addAttribute('aVertexJoint', this._buffer, 1, false, TYPES.FLOAT)\n // line width, alignment\n .addAttribute('aStyleId', this._buffer, 1, false, TYPES.FLOAT)\n // the usual\n .addAttribute('aColor', this._buffer, 4, true, TYPES.UNSIGNED_BYTE)\n .addIndex(this._indexBuffer);\n\n this.strideFloats = 12;\n }\n\n constructor()\n {\n super();\n\n this.initAttributes(false);\n\n this.buildData = new BuildData();\n\n this.graphicsData = [];\n\n this.dirty = 0;\n\n this.batchDirty = -1;\n\n this.cacheDirty = -1;\n\n this.clearDirty = 0;\n\n this.drawCalls = [];\n\n this.batches = [];\n\n this.shapeBuildIndex = 0;\n\n this.shapeBatchIndex = 0;\n\n this._bounds = new Bounds();\n\n this.boundsDirty = -1;\n\n this.boundsPadding = 0;\n\n this.batchable = false;\n\n this.indicesUint16 = null;\n\n this.packer = null;\n this.packSize = 0;\n this.pack32index = null;\n }\n\n public checkInstancing(instanced: boolean, allow32Indices: boolean)\n {\n if (this.packer)\n {\n return;\n }\n this.packer = new SegmentPacker();\n this.pack32index = allow32Indices;\n }\n\n /**\n * Get the current bounds of the graphic geometry.\n *\n * @member {PIXI.Bounds}\n * @readonly\n */\n public get bounds(): Bounds\n {\n if (this.boundsDirty !== this.dirty)\n {\n this.boundsDirty = this.dirty;\n this.calculateBounds();\n }\n\n return this._bounds;\n }\n\n /**\n * Call if you changed graphicsData manually.\n * Empties all batch buffers.\n */\n protected invalidate(): void\n {\n this.boundsDirty = -1;\n this.dirty++;\n this.batchDirty++;\n this.shapeBuildIndex = 0;\n this.shapeBatchIndex = 0;\n this.packSize = 0;\n\n this.buildData.clear();\n\n for (let i = 0; i < this.drawCalls.length; i++)\n {\n this.drawCalls[i].clear();\n DRAW_CALL_POOL.push(this.drawCalls[i]);\n }\n\n this.drawCalls.length = 0;\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batchPart = this.batches[i];\n\n batchPart.reset();\n BATCH_POOL.push(batchPart);\n }\n\n this.batches.length = 0;\n }\n\n public clear(): SmoothGraphicsGeometry\n {\n if (this.graphicsData.length > 0)\n {\n this.invalidate();\n this.clearDirty++;\n this.graphicsData.length = 0;\n }\n\n return this;\n }\n\n public drawShape(\n shape: IShape,\n fillStyle: FillStyle = null,\n lineStyle: LineStyle = null,\n matrix: Matrix = null): SmoothGraphicsGeometry\n {\n const data = new SmoothGraphicsData(shape, fillStyle, lineStyle, matrix);\n\n this.graphicsData.push(data);\n this.dirty++;\n\n return this;\n }\n\n public drawHole(shape: IShape, matrix: Matrix = null): SmoothGraphicsGeometry\n {\n if (!this.graphicsData.length)\n {\n return null;\n }\n\n const data = new SmoothGraphicsData(shape, null, null, matrix);\n\n const lastShape = this.graphicsData[this.graphicsData.length - 1];\n\n data.lineStyle = lastShape.lineStyle;\n\n lastShape.holes.push(data);\n\n this.dirty++;\n\n return this;\n }\n\n public destroy(): void\n {\n super.destroy();\n\n // destroy each of the SmoothGraphicsData objects\n for (let i = 0; i < this.graphicsData.length; ++i)\n {\n this.graphicsData[i].destroy();\n }\n\n this.buildData.destroy();\n this.buildData = null;\n this.indexBuffer.destroy();\n this.indexBuffer = null;\n this.graphicsData.length = 0;\n this.graphicsData = null;\n this.drawCalls.length = 0;\n this.drawCalls = null;\n this.batches.length = 0;\n this.batches = null;\n this._bounds = null;\n }\n\n /**\n * Check to see if a point is contained within this geometry.\n *\n * @param {PIXI.IPointData} point - Point to check if it's contained.\n * @return {Boolean} `true` if the point is contained within geometry.\n */\n public containsPoint(point: IPointData): boolean\n {\n const graphicsData = this.graphicsData;\n\n for (let i = 0; i < graphicsData.length; ++i)\n {\n const data = graphicsData[i];\n\n if (!data.fillStyle.visible)\n {\n continue;\n }\n\n // only deal with fills..\n if (data.shape)\n {\n if (data.matrix)\n {\n data.matrix.applyInverse(point, tmpPoint);\n }\n else\n {\n tmpPoint.copyFrom(point);\n }\n\n if (data.shape.contains(tmpPoint.x, tmpPoint.y))\n {\n let hitHole = false;\n\n if (data.holes)\n {\n for (let i = 0; i < data.holes.length; i++)\n {\n const hole = data.holes[i];\n\n if (hole.shape.contains(tmpPoint.x, tmpPoint.y))\n {\n hitHole = true;\n break;\n }\n }\n }\n\n if (!hitHole)\n {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n updatePoints(): void\n {\n // do nothing\n }\n\n updateBufferSize(): void\n {\n this._buffer.update(new Float32Array());\n }\n\n updateBuild(): void\n {\n const { graphicsData, buildData } = this;\n const len = graphicsData.length;\n\n for (let i = this.shapeBuildIndex; i < len; i++)\n {\n const data = graphicsData[i];\n\n data.strokeStart = 0;\n data.strokeLen = 0;\n data.fillStart = 0;\n data.fillLen = 0;\n const { fillStyle, lineStyle, holes } = data;\n\n if (!fillStyle.visible && !lineStyle.visible)\n {\n continue;\n }\n\n const command = FILL_COMMANDS[data.type];\n\n data.clearPath();\n\n command.path(data, buildData);\n if (data.matrix)\n {\n this.transformPoints(data.points, data.matrix);\n }\n\n data.clearBuild();\n if (data.points.length <= 2)\n {\n continue;\n }\n if (fillStyle.visible || lineStyle.visible)\n {\n this.processHoles(holes);\n }\n if (fillStyle.visible)\n {\n data.fillAA = (data.fillStyle as any).smooth\n && data.fillStyle.texture === Texture.WHITE\n && holes.length === 0\n && !(data.closeStroke\n && data.lineStyle.visible\n && !data.lineStyle.shader\n && data.lineStyle.alpha >= 0.99\n && data.lineStyle.width * Math.min(data.lineStyle.alignment, 1 - data.lineStyle.alignment) >= 0.495);\n\n data.fillStart = buildData.joints.length;\n\n if (holes.length)\n {\n FILL_COMMANDS[SHAPES.POLY].fill(data, buildData);\n }\n else\n {\n command.fill(data, buildData);\n }\n\n data.fillLen = buildData.joints.length - data.fillStart;\n }\n if (lineStyle.visible)\n {\n data.strokeStart = buildData.joints.length;\n command.line(data, buildData);\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n\n FILL_COMMANDS[hole.type].line(hole, buildData);\n }\n data.strokeLen = buildData.joints.length - data.strokeStart;\n }\n }\n this.shapeBuildIndex = len;\n }\n\n updateBatches(shaderSettings?: IGraphicsBatchSettings): void\n {\n if (!this.graphicsData.length)\n {\n this.batchable = true;\n\n return;\n }\n this.updateBuild();\n\n if (!this.validateBatching())\n {\n return;\n }\n\n const { buildData, graphicsData } = this;\n const len = graphicsData.length;\n\n this.cacheDirty = this.dirty;\n\n let batchPart: BatchPart = null;\n\n let currentStyle = null;\n\n if (this.batches.length > 0)\n {\n batchPart = this.batches[this.batches.length - 1];\n currentStyle = batchPart.style;\n }\n\n for (let i = this.shapeBatchIndex; i < len; i++)\n {\n const data = graphicsData[i];\n const fillStyle = data.fillStyle;\n const lineStyle = data.lineStyle;\n\n if (data.matrix)\n {\n this.transformPoints(data.points, data.matrix);\n }\n if (!fillStyle.visible && !lineStyle.visible)\n {\n continue;\n }\n for (let j = 0; j < 2; j++)\n {\n const style = (j === 0) ? fillStyle : lineStyle;\n\n if (!style.visible) continue;\n\n const nextTexture = style.texture.baseTexture;\n const attribOld = buildData.vertexSize;\n const indexOld = buildData.indexSize;\n\n nextTexture.wrapMode = WRAP_MODES.REPEAT;\n if (j === 0)\n {\n this.packer.updateBufferSize(data.fillStart, data.fillLen, data.triangles.length, buildData);\n }\n else\n {\n this.packer.updateBufferSize(data.strokeStart, data.strokeLen, data.triangles.length, buildData);\n }\n\n const attribSize = buildData.vertexSize;\n\n if (attribSize === attribOld) continue;\n // close batch if style is different\n if (batchPart && !this._compareStyles(currentStyle, style))\n {\n batchPart.end(indexOld, attribOld);\n batchPart = null;\n }\n // spawn new batch if its first batch or previous was closed\n if (!batchPart)\n {\n batchPart = BATCH_POOL.pop() || new BatchPart();\n batchPart.begin(style, indexOld, attribOld);\n this.batches.push(batchPart);\n currentStyle = style;\n }\n\n if (j === 0)\n {\n batchPart.jointEnd = data.fillStart + data.fillLen;\n }\n else\n {\n batchPart.jointEnd = data.strokeStart + data.strokeLen;\n }\n }\n }\n this.shapeBatchIndex = len;\n\n if (batchPart)\n {\n batchPart.end(buildData.indexSize, buildData.vertexSize);\n }\n\n if (this.batches.length === 0)\n {\n // there are no visible styles in SmoothGraphicsData\n // its possible that someone wants Graphics just for the bounds\n this.batchable = true;\n\n return;\n }\n\n // TODO make this a const..\n this.batchable = this.isBatchable();\n\n if (this.batchable)\n {\n this.packBatches();\n }\n else\n {\n this.buildDrawCalls(shaderSettings);\n this.updatePack();\n }\n }\n\n updatePack()\n {\n const { vertexSize, indexSize } = this.buildData;\n\n if (this.packSize === vertexSize)\n {\n return;\n }\n\n const { strideFloats, packer, buildData, batches } = this;\n const buffer = this._buffer;\n const index = this._indexBuffer;\n const floatsSize = vertexSize * strideFloats;\n\n if (buffer.data.length !== floatsSize)\n {\n const arrBuf = new ArrayBuffer(floatsSize * 4);\n\n this._bufferFloats = new Float32Array(arrBuf);\n this._bufferUint = new Uint32Array(arrBuf);\n buffer.data = this._bufferFloats;\n }\n if (index.data.length !== indexSize)\n {\n if (vertexSize > 0xffff && this.pack32index)\n {\n index.data = new Uint32Array(indexSize);\n }\n else\n {\n index.data = new Uint16Array(indexSize);\n }\n }\n\n packer.beginPack(buildData, this._bufferFloats, this._bufferUint, index.data as Uint16Array);\n\n let j = 0;\n\n for (let i = 0; i < this.graphicsData.length; i++)\n {\n const data = this.graphicsData[i];\n\n if (data.fillLen)\n {\n while (batches[j].jointEnd <= data.fillStart)\n {\n j++;\n }\n packer.packInterleavedGeometry(data.fillStart, data.fillLen, data.triangles,\n batches[j].styleId, batches[j].rgba);\n }\n if (data.strokeLen)\n {\n while (batches[j].jointEnd <= data.strokeStart)\n {\n j++;\n }\n packer.packInterleavedGeometry(data.strokeStart, data.strokeLen, data.triangles,\n batches[j].styleId, batches[j].rgba);\n }\n }\n\n buffer.update();\n index.update();\n this.packSize = vertexSize;\n }\n\n /**\n * Affinity check\n *\n * @param {PIXI.FillStyle | PIXI.LineStyle} styleA\n * @param {PIXI.FillStyle | PIXI.LineStyle} styleB\n */\n protected _compareStyles(styleA: FillStyle | LineStyle, styleB: FillStyle | LineStyle): boolean\n {\n if (!styleA || !styleB)\n {\n return false;\n }\n\n if (styleA.texture.baseTexture !== styleB.texture.baseTexture)\n {\n return false;\n }\n\n if (styleA.color + styleA.alpha !== styleB.color + styleB.alpha)\n {\n return false;\n }\n\n if (styleA.shader !== styleB.shader)\n {\n return false;\n }\n // TODO: propagate width for FillStyle\n if ((styleA as LineStyle).width !== (styleB as LineStyle).width)\n {\n return false;\n }\n if ((styleA as LineStyle).scaleMode !== (styleB as LineStyle).scaleMode)\n {\n return false;\n }\n if ((styleA as LineStyle).alignment !== (styleB as LineStyle).alignment)\n {\n return false;\n }\n\n const mat1 = styleA.matrix || Matrix.IDENTITY;\n const mat2 = styleB.matrix || Matrix.IDENTITY;\n\n return matrixEquals(mat1, mat2);\n }\n\n /**\n * Test geometry for batching process.\n *\n * @protected\n */\n protected validateBatching(): boolean\n {\n if (this.dirty === this.cacheDirty || !this.graphicsData.length)\n {\n return false;\n }\n\n for (let i = 0, l = this.graphicsData.length; i < l; i++)\n {\n const data = this.graphicsData[i];\n const fill = data.fillStyle;\n const line = data.lineStyle;\n\n if (fill && !fill.texture.baseTexture.valid) return false;\n if (line && !line.texture.baseTexture.valid) return false;\n }\n\n return true;\n }\n\n /**\n * Offset the indices so that it works with the batcher.\n *\n * @protected\n */\n protected packBatches(): void\n {\n this.batchDirty++;\n const batches = this.batches;\n\n for (let i = 0, l = batches.length; i < l; i++)\n {\n const batch = batches[i];\n\n for (let j = 0; j < batch.size; j++)\n {\n const index = batch.start + j;\n\n this.indicesUint16[index] = this.indicesUint16[index] - batch.attribStart;\n }\n }\n }\n\n protected isBatchable(): boolean\n {\n return false;\n\n // prevent heavy mesh batching\n // if (this.points.length > 0xffff * 2) {\n // return false;\n // }\n //\n // const batches = this.batches;\n //\n // for (let i = 0; i < batches.length; i++) {\n // if ((batches[i].style as LineStyle).native) {\n // return false;\n // }\n // }\n //\n // return (this.points.length < SmoothGraphicsGeometry.BATCHABLE_SIZE * 2);\n }\n\n /**\n * Converts intermediate batches data to drawCalls.\n *\n * @protected\n */\n protected buildDrawCalls(shaderSettings?: IGraphicsBatchSettings)\n {\n for (let i = 0; i < this.drawCalls.length; i++)\n {\n this.drawCalls[i].clear();\n DRAW_CALL_POOL.push(this.drawCalls[i]);\n }\n\n this.drawCalls.length = 0;\n\n let currentGroup = DRAW_CALL_POOL.pop() || new BatchDrawCall();\n\n currentGroup.begin(shaderSettings, null);\n\n let index = 0;\n\n this.drawCalls.push(currentGroup);\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batchData = this.batches[i];\n const style = batchData.style as LineStyle;\n\n if (batchData.attribSize === 0)\n {\n // I don't know how why do we have size=0 sometimes\n continue;\n }\n\n let styleId = -1;\n const mat = style.getTextureMatrix();\n\n if (currentGroup.check(style.shader))\n {\n styleId = currentGroup.add(style.texture, mat,\n style.width, style.alignment || 0, style.packLineScale());\n }\n if (styleId < 0)\n {\n currentGroup = DRAW_CALL_POOL.pop() || new BatchDrawCall();\n this.drawCalls.push(currentGroup);\n currentGroup.begin(shaderSettings, style.shader);\n currentGroup.start = index;\n styleId = currentGroup.add(style.texture, mat,\n style.width, style.alignment || 0, style.packLineScale());\n }\n currentGroup.size += batchData.size;\n index += batchData.size;\n\n const { color, alpha } = style;\n const bgr = Color.shared\n .setValue(color)\n .toLittleEndianNumber();\n\n batchData.rgba = Color.shared\n .setValue(bgr)\n .toPremultiplied(alpha);\n batchData.styleId = styleId;\n }\n }\n\n protected processHoles(holes: Array): void\n {\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n const command = FILL_COMMANDS[hole.type];\n\n hole.clearPath();\n\n command.path(hole, this.buildData);\n\n if (hole.matrix)\n {\n this.transformPoints(hole.points, hole.matrix);\n }\n }\n }\n\n /**\n * Update the local bounds of the object. Expensive to use performance-wise.\n *\n * @protected\n */\n protected calculateBounds(): void\n {\n const bounds = this._bounds;\n const sequenceBounds = tmpBounds;\n let curMatrix = Matrix.IDENTITY;\n\n this._bounds.clear();\n sequenceBounds.clear();\n\n for (let i = 0; i < this.graphicsData.length; i++)\n {\n const data = this.graphicsData[i];\n const shape = data.shape;\n const type = data.type;\n const lineStyle = data.lineStyle;\n const nextMatrix = data.matrix || Matrix.IDENTITY;\n let lineWidth = 0.0;\n\n if (lineStyle && lineStyle.visible)\n {\n lineWidth = lineStyle.width;\n\n if (type !== SHAPES.POLY || data.fillStyle.visible)\n {\n lineWidth *= Math.max(0, lineStyle.alignment);\n }\n else\n {\n lineWidth *= Math.max(lineStyle.alignment, 1 - lineStyle.alignment);\n }\n }\n\n if (curMatrix !== nextMatrix)\n {\n if (!sequenceBounds.isEmpty())\n {\n bounds.addBoundsMatrix(sequenceBounds, curMatrix);\n sequenceBounds.clear();\n }\n curMatrix = nextMatrix;\n }\n\n if (type === SHAPES.RECT || type === SHAPES.RREC)\n {\n const rect = shape as Rectangle | RoundedRectangle;\n\n sequenceBounds.addFramePad(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height,\n lineWidth, lineWidth);\n }\n else if (type === SHAPES.CIRC)\n {\n const circle = shape as Circle;\n\n sequenceBounds.addFramePad(circle.x, circle.y, circle.x, circle.y,\n circle.radius + lineWidth, circle.radius + lineWidth);\n }\n else if (type === SHAPES.ELIP)\n {\n const ellipse = shape as Ellipse;\n\n sequenceBounds.addFramePad(ellipse.x, ellipse.y, ellipse.x, ellipse.y,\n ellipse.width + lineWidth, ellipse.height + lineWidth);\n }\n else\n {\n const poly = shape as Polygon;\n // adding directly to the bounds\n\n bounds.addVerticesMatrix(curMatrix, (poly.points as any), 0, poly.points.length, lineWidth, lineWidth);\n }\n }\n\n if (!sequenceBounds.isEmpty())\n {\n bounds.addBoundsMatrix(sequenceBounds, curMatrix);\n }\n\n bounds.pad(this.boundsPadding, this.boundsPadding);\n }\n\n /**\n * Transform points using matrix.\n *\n * @protected\n * @param {number[]} points - Points to transform\n * @param {PIXI.Matrix} matrix - Transform matrix\n */\n protected transformPoints(points: Array, matrix: Matrix): void\n {\n for (let i = 0; i < points.length / 2; i++)\n {\n const x = points[(i * 2)];\n const y = points[(i * 2) + 1];\n\n points[(i * 2)] = (matrix.a * x) + (matrix.c * y) + matrix.tx;\n points[(i * 2) + 1] = (matrix.b * x) + (matrix.d * y) + matrix.ty;\n }\n }\n}\n","import {\n BLEND_MODES,\n Circle,\n Color,\n DRAW_MODES,\n Ellipse,\n Matrix,\n MSAA_QUALITY,\n PI_2,\n Point,\n Polygon,\n Rectangle,\n Renderer,\n RoundedRectangle,\n Shader,\n SHAPES,\n State,\n Texture,\n utils,\n} from '@pixi/core';\nimport { Container } from '@pixi/display';\nimport { curves, Graphics, graphicsUtils, LINE_CAP, LINE_JOIN } from '@pixi/graphics';\nimport { IGraphicsBatchSettings } from './core/BatchDrawCall';\nimport { FillStyle } from './core/FillStyle';\nimport { LINE_SCALE_MODE, LineStyle } from './core/LineStyle';\nimport { settings } from './settings';\nimport { SmoothGraphicsGeometry } from './SmoothGraphicsGeometry';\nimport { SmoothGraphicsShader } from './SmoothShader';\n\nimport type { ColorSource, IPointData, IShape } from '@pixi/core';\nimport type { IDestroyOptions } from '@pixi/display';\n\nconst UnsmoothGraphics = Graphics;\nconst { BezierUtils, QuadraticUtils, ArcUtils } = graphicsUtils;\n\n// a default shaders map used by graphics..\nconst DEFAULT_SHADERS: { [key: string]: Shader } = {};\n\nexport interface IFillStyleOptions\n{\n color?: ColorSource;\n alpha?: number;\n texture?: Texture;\n matrix?: Matrix;\n smooth?: boolean;\n shader?: Shader;\n}\n\nexport interface ILineStyleOptions extends IFillStyleOptions\n{\n width?: number;\n alignment?: number;\n scaleMode?: LINE_SCALE_MODE;\n cap?: LINE_CAP;\n join?: LINE_JOIN;\n miterLimit?: number;\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphics extends Container\n{\n public static readonly curves = curves;\n\n static _TEMP_POINT = new Point();\n\n public shader: Shader;\n public shaderSettings: IGraphicsBatchSettings;\n public pluginName: string;\n public currentPath: Polygon;\n\n protected batches: Array;\n protected batchTint: number;\n protected batchDirty: number;\n protected vertexData: Float32Array;\n\n protected _fillStyle: FillStyle;\n protected _lineStyle: LineStyle;\n protected _matrix: Matrix;\n protected _holeMode: boolean;\n protected _transformID: number;\n protected _tintColor: Color;\n\n private state: State;\n private _geometry: SmoothGraphicsGeometry;\n\n public get geometry(): SmoothGraphicsGeometry\n {\n return this._geometry;\n }\n\n constructor(geometry: SmoothGraphicsGeometry = null)\n {\n super();\n\n this._geometry = geometry || new SmoothGraphicsGeometry();\n this._geometry.refCount++;\n\n this.shader = null;\n\n this.shaderSettings = {\n maxStyles: settings.SHADER_MAX_STYLES,\n maxTextures: settings.SHADER_MAX_TEXTURES,\n pixelLine: settings.PIXEL_LINE,\n };\n\n this.state = State.for2d();\n\n this._fillStyle = new FillStyle();\n\n this._lineStyle = new LineStyle();\n\n this._matrix = null;\n\n this._holeMode = false;\n\n this.currentPath = null;\n\n this.batches = [];\n\n this.batchTint = -1;\n\n this.batchDirty = -1;\n\n this.vertexData = null;\n\n this.pluginName = 'smooth';\n\n this._transformID = -1;\n\n // Set default\n this._tintColor = new Color(0xFFFFFF);\n this.blendMode = BLEND_MODES.NORMAL;\n }\n\n public clone(): SmoothGraphics\n {\n this.finishPoly();\n\n return new SmoothGraphics(this._geometry);\n }\n\n public set blendMode(value: BLEND_MODES)\n {\n this.state.blendMode = value;\n }\n\n public get blendMode(): BLEND_MODES\n {\n return this.state.blendMode;\n }\n\n public get tint(): ColorSource\n {\n return this._tintColor.value;\n }\n\n public set tint(value: ColorSource)\n {\n this._tintColor.setValue(value);\n }\n\n public get fill(): FillStyle\n {\n return this._fillStyle;\n }\n\n public get line(): LineStyle\n {\n return this._lineStyle;\n }\n\n public lineStyle(\n width: number,\n color?: ColorSource,\n alpha?: number,\n alignment?: number,\n scaleMode?: LINE_SCALE_MODE): this;\n\n public lineStyle(options?: ILineStyleOptions): this;\n\n public lineStyle(options: ILineStyleOptions | number = null,\n color: ColorSource = 0x0, alpha = 1, alignment = 0.5, scaleMode = settings.LINE_SCALE_MODE): this\n {\n // Support non-object params: (width, color, alpha, alignment, native)\n if (typeof options === 'number')\n {\n if (typeof scaleMode === 'boolean')\n {\n scaleMode = scaleMode ? LINE_SCALE_MODE.NONE : LINE_SCALE_MODE.NORMAL;\n }\n options = { width: options, color, alpha, alignment, scaleMode } as ILineStyleOptions;\n }\n else\n {\n const native: boolean = (options as any).native;\n\n if (native !== undefined)\n {\n options.scaleMode = native ? LINE_SCALE_MODE.NONE : LINE_SCALE_MODE.NORMAL;\n }\n }\n\n return this.lineTextureStyle(options);\n }\n\n public lineTextureStyle(options: ILineStyleOptions): this\n {\n // Apply defaults\n options = Object.assign({\n width: 0,\n texture: Texture.WHITE,\n color: (options && options.texture) ? 0xFFFFFF : 0x0,\n alpha: 1,\n matrix: null,\n alignment: 0.5,\n native: false,\n cap: LINE_CAP.BUTT,\n join: LINE_JOIN.MITER,\n miterLimit: 10,\n shader: null,\n scaleMode: settings.LINE_SCALE_MODE,\n }, options);\n\n this.normalizeColor(options);\n\n if (this.currentPath)\n {\n this.startPoly();\n }\n\n const visible = options.width > 0 && options.alpha > 0;\n\n if (!visible)\n {\n this._lineStyle.reset();\n }\n else\n {\n if (options.matrix)\n {\n options.matrix = options.matrix.clone();\n options.matrix.invert();\n }\n\n Object.assign(this._lineStyle, { visible }, options);\n }\n\n return this;\n }\n\n protected startPoly(): void\n {\n if (this.currentPath)\n {\n const points = this.currentPath.points;\n const len = this.currentPath.points.length;\n\n if (len > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = new Polygon();\n this.currentPath.closeStroke = false;\n this.currentPath.points.push(points[len - 2], points[len - 1]);\n }\n }\n else\n {\n this.currentPath = new Polygon();\n this.currentPath.closeStroke = false;\n }\n }\n\n finishPoly(): void\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = null;\n }\n else\n {\n this.currentPath.points.length = 0;\n }\n }\n }\n\n public moveTo(x: number, y: number): this\n {\n this.startPoly();\n this.currentPath.points[0] = x;\n this.currentPath.points[1] = y;\n\n return this;\n }\n\n public lineTo(x: number, y: number): this\n {\n if (!this.currentPath)\n {\n this.moveTo(0, 0);\n }\n\n // remove duplicates..\n const points = this.currentPath.points;\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n if (fromX !== x || fromY !== y)\n {\n points.push(x, y);\n }\n\n return this;\n }\n\n protected _initCurve(x = 0, y = 0): void\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length === 0)\n {\n this.currentPath.points = [x, y];\n }\n }\n else\n {\n this.moveTo(x, y);\n }\n }\n\n public quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): this\n {\n this._initCurve();\n\n const points = this.currentPath.points;\n\n if (points.length === 0)\n {\n this.moveTo(0, 0);\n }\n\n QuadraticUtils.curveTo(cpX, cpY, toX, toY, points);\n\n return this;\n }\n\n public bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): this\n {\n this._initCurve();\n\n BezierUtils.curveTo(cpX, cpY, cpX2, cpY2, toX, toY, this.currentPath.points);\n\n return this;\n }\n\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._initCurve(x1, y1);\n\n const points = this.currentPath.points;\n\n const result = ArcUtils.curveTo(x1, y1, x2, y2, radius, points);\n\n if (result)\n {\n const { cx, cy, radius, startAngle, endAngle, anticlockwise } = result;\n\n this.arc(cx, cy, radius, startAngle, endAngle, anticlockwise);\n }\n\n return this;\n }\n\n public arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise = false): this\n {\n if (startAngle === endAngle)\n {\n return this;\n }\n\n if (!anticlockwise && endAngle <= startAngle)\n {\n endAngle += PI_2;\n }\n else if (anticlockwise && startAngle <= endAngle)\n {\n startAngle += PI_2;\n }\n\n const sweep = endAngle - startAngle;\n\n if (sweep === 0)\n {\n return this;\n }\n\n const startX = cx + (Math.cos(startAngle) * radius);\n const startY = cy + (Math.sin(startAngle) * radius);\n const eps = this._geometry.closePointEps;\n\n // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path.\n let points = this.currentPath ? this.currentPath.points : null;\n\n if (points)\n {\n // TODO: make a better fix.\n\n // We check how far our start is from the last existing point\n const xDiff = Math.abs(points[points.length - 2] - startX);\n const yDiff = Math.abs(points[points.length - 1] - startY);\n\n if (xDiff < eps && yDiff < eps)\n {\n // If the point is very close, we don't add it, since this would lead to artifacts\n // during tessellation due to floating point imprecision.\n }\n else\n {\n points.push(startX, startY);\n }\n }\n else\n {\n this.moveTo(startX, startY);\n points = this.currentPath.points;\n }\n\n ArcUtils.arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points);\n\n return this;\n }\n\n public beginFill(color: ColorSource = 0, alpha = 1, smooth = false): this\n {\n return this.beginTextureFill({ texture: Texture.WHITE, color, alpha, smooth });\n }\n\n private normalizeColor(options: Pick): void\n {\n const temp = Color.shared.setValue(options.color ?? 0);\n\n options.color = temp.toNumber();\n options.alpha ??= temp.alpha;\n }\n\n beginTextureFill(options?: IFillStyleOptions): this\n {\n // Apply defaults\n options = Object.assign({\n texture: Texture.WHITE,\n color: 0xFFFFFF,\n alpha: 1,\n matrix: null,\n smooth: false,\n }, options) as IFillStyleOptions;\n\n this.normalizeColor(options);\n\n if (this.currentPath)\n {\n this.startPoly();\n }\n\n const visible = options.alpha > 0;\n\n if (!visible)\n {\n this._fillStyle.reset();\n }\n else\n {\n if (options.matrix)\n {\n options.matrix = options.matrix.clone();\n options.matrix.invert();\n }\n\n Object.assign(this._fillStyle, { visible }, options);\n }\n\n return this;\n }\n\n public endFill(): this\n {\n this.finishPoly();\n\n this._fillStyle.reset();\n\n return this;\n }\n\n public drawRect(x: number, y: number, width: number, height: number): this\n {\n return this.drawShape(new Rectangle(x, y, width, height));\n }\n\n public drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): this\n {\n return this.drawShape(new RoundedRectangle(x, y, width, height, radius));\n }\n\n public drawCircle(x: number, y: number, radius: number): this\n {\n return this.drawShape(new Circle(x, y, radius));\n }\n\n public drawEllipse(x: number, y: number, width: number, height: number): this\n {\n return this.drawShape(new Ellipse(x, y, width, height));\n }\n\n public drawPolygon(...path: Array | Array): this;\n public drawPolygon(path: Array | Array | Polygon): this;\n\n public drawPolygon(...path: any[]): this\n {\n let points: Array | Array;\n let closeStroke = true;// !!this._fillStyle;\n\n const poly = path[0] as Polygon;\n\n // check if data has points..\n if (poly.points)\n {\n closeStroke = poly.closeStroke;\n points = poly.points;\n }\n else if (Array.isArray(path[0]))\n {\n points = path[0];\n }\n else\n {\n points = path;\n }\n\n const shape = new Polygon(points);\n\n shape.closeStroke = closeStroke;\n\n this.drawShape(shape);\n\n return this;\n }\n\n public drawShape(shape: IShape): this\n {\n if (!this._holeMode)\n {\n this._geometry.drawShape(\n shape,\n this._fillStyle.clone(),\n this._lineStyle.clone(),\n this._matrix\n );\n }\n else\n {\n this._geometry.drawHole(shape, this._matrix);\n }\n\n return this;\n }\n\n public clear(): this\n {\n this._geometry.clear();\n this._lineStyle.reset();\n this._fillStyle.reset();\n\n this._boundsID++;\n this._matrix = null;\n this._holeMode = false;\n this.currentPath = null;\n\n return this;\n }\n\n public isFastRect(): boolean\n {\n const data = this._geometry.graphicsData;\n\n return data.length === 1\n && data[0].shape.type === SHAPES.RECT\n && !data[0].matrix\n && !data[0].holes.length\n && !(data[0].lineStyle.visible && data[0].lineStyle.width);\n }\n\n protected _renderCanvas(renderer: any): void\n {\n (UnsmoothGraphics.prototype as any)._renderCanvas.call(this, renderer);\n }\n\n protected _render(renderer: Renderer): void\n {\n this.finishPoly();\n\n const geometry = this._geometry;\n const hasuint32 = renderer.context.supports.uint32Indices;\n // batch part..\n // batch it!\n\n geometry.checkInstancing(renderer.geometry.hasInstance, hasuint32);\n\n geometry.updateBatches(this.shaderSettings);\n\n if (geometry.batchable)\n {\n if (this.batchDirty !== geometry.batchDirty)\n {\n this._populateBatches();\n }\n\n this._renderBatched(renderer);\n }\n else\n {\n // no batching...\n renderer.batch.flush();\n\n this._renderDirect(renderer);\n }\n }\n\n protected _populateBatches(): void\n {\n const geometry = this._geometry;\n const blendMode = this.blendMode;\n const len = geometry.batches.length;\n\n this.batchTint = -1;\n this._transformID = -1;\n this.batchDirty = geometry.batchDirty;\n this.batches.length = len;\n\n this.vertexData = new Float32Array(geometry.points);\n\n for (let i = 0; i < len; i++)\n {\n const gI = geometry.batches[i];\n const color = gI.style.color;\n const vertexData = new Float32Array(this.vertexData.buffer,\n gI.attribStart * 4 * 2,\n gI.attribSize * 2);\n\n // const uvs = new Float32Array(geometry.uvsFloat32.buffer,\n // gI.attribStart * 4 * 2,\n // gI.attribSize * 2);\n\n // const indices = new Uint16Array(geometry.indicesUint16.buffer,\n // gI.start * 2,\n // gI.size);\n\n const batch = {\n vertexData,\n blendMode,\n // indices,\n // uvs,\n _batchRGB: utils.hex2rgb(color) as Array,\n _tintRGB: color,\n _texture: gI.style.texture,\n alpha: gI.style.alpha,\n worldAlpha: 1\n };\n\n this.batches[i] = batch;\n }\n }\n\n protected _renderBatched(renderer: Renderer): void\n {\n if (!this.batches.length)\n {\n return;\n }\n\n renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n\n this.calculateVertices();\n this.calculateTints();\n\n for (let i = 0, l = this.batches.length; i < l; i++)\n {\n const batch = this.batches[i];\n\n batch.worldAlpha = this.worldAlpha * batch.alpha;\n\n renderer.plugins[this.pluginName].render(batch);\n }\n }\n\n protected _renderDirect(renderer: Renderer): void\n {\n const directShader = this._resolveDirectShader(renderer);\n let shader: Shader = directShader;\n\n const geometry = this._geometry;\n const worldAlpha = this.worldAlpha;\n const uniforms = shader.uniforms;\n const drawCalls = geometry.drawCalls;\n\n // lets set the transfomr\n uniforms.translationMatrix = this.transform.worldTransform;\n\n // and then lets set the tint..\n Color.shared.setValue(this._tintColor)\n .premultiply(worldAlpha)\n .toArray(uniforms.tint);\n\n uniforms.resolution = renderer.renderTexture.current\n ? renderer.renderTexture.current.resolution : renderer.resolution;\n\n const projTrans = renderer.projection.transform;\n\n if (projTrans)\n {\n // only uniform scale is supported!\n const scale = Math.sqrt((projTrans.a * projTrans.a) + (projTrans.b * projTrans.b));\n\n uniforms.resolution *= scale;\n }\n\n const multisample = renderer.renderTexture.current\n ? renderer.renderTexture.current.multisample : renderer.multisample;\n\n uniforms.expand = (multisample !== MSAA_QUALITY.NONE ? 2 : 1) / uniforms.resolution;\n\n // the first draw call, we can set the uniforms of the shader directly here.\n\n // this means that we can tack advantage of the sync function of pixi!\n // bind and sync uniforms..\n // there is a way to optimise this..\n renderer.shader.bind(shader);\n renderer.geometry.bind(geometry, shader);\n\n // set state..\n renderer.state.set(this.state);\n\n shader = null;\n // then render the rest of them...\n for (let i = 0, l = drawCalls.length; i < l; i++)\n {\n // TODO: refactor it to another class, that fills uniforms of this shader\n const drawCall = geometry.drawCalls[i];\n\n const shaderChange = shader !== drawCall.shader;\n\n if (shaderChange)\n {\n shader = drawCall.shader;\n if (shader)\n {\n shader.uniforms.translationMatrix = this.transform.worldTransform;\n if (shader.uniforms.tint)\n {\n shader.uniforms.tint[0] = uniforms.tint[0];\n shader.uniforms.tint[1] = uniforms.tint[1];\n shader.uniforms.tint[2] = uniforms.tint[2];\n shader.uniforms.tint[3] = uniforms.tint[3];\n }\n }\n }\n\n const { texArray, styleArray, size, start } = drawCall;\n const groupTextureCount = texArray.count;\n const shaderHere = shader || directShader;\n\n const texs = shaderHere.uniforms.styleTextureId;\n const mats = shaderHere.uniforms.styleMatrix;\n const lines = shaderHere.uniforms.styleLine;\n\n for (let i = 0; i < styleArray.count; i++)\n {\n texs[i] = styleArray.textureIds[i];\n lines[i * 2] = styleArray.lines[i * 2];\n lines[(i * 2) + 1] = styleArray.lines[(i * 2) + 1];\n const m = styleArray.matrices[i];\n\n mats[i * 6] = m.a;\n mats[(i * 6) + 1] = m.c;\n mats[(i * 6) + 2] = m.tx;\n mats[(i * 6) + 3] = m.b;\n mats[(i * 6) + 4] = m.d;\n mats[(i * 6) + 5] = m.ty;\n }\n const sizes = shaderHere.uniforms.samplerSize;\n\n for (let i = 0; i < groupTextureCount; i++)\n {\n sizes[i * 2] = texArray.elements[i].width;\n sizes[(i * 2) + 1] = texArray.elements[i].height;\n }\n\n renderer.shader.bind(shaderHere);\n if (shaderChange)\n {\n renderer.geometry.bind(geometry);\n }\n\n // TODO: bind styles!\n for (let j = 0; j < groupTextureCount; j++)\n {\n renderer.texture.bind(texArray.elements[j], j);\n }\n\n // bind the geometry...\n renderer.geometry.draw(DRAW_MODES.TRIANGLES, size, start);\n }\n }\n\n protected _resolveDirectShader(_renderer: Renderer): Shader\n {\n let shader = this.shader;\n\n const pluginName = this.pluginName;\n\n if (!shader)\n {\n if (!DEFAULT_SHADERS[pluginName])\n {\n DEFAULT_SHADERS[pluginName] = new SmoothGraphicsShader(this.shaderSettings);\n }\n shader = DEFAULT_SHADERS[pluginName];\n }\n\n return shader;\n }\n\n protected _calculateBounds(): void\n {\n this.finishPoly();\n\n const geometry = this._geometry;\n\n // skipping when graphics is empty, like a container\n if (!geometry.graphicsData.length)\n {\n return;\n }\n\n const { minX, minY, maxX, maxY } = geometry.bounds;\n\n this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n }\n\n public containsPoint(point: IPointData): boolean\n {\n this.worldTransform.applyInverse(point, SmoothGraphics._TEMP_POINT);\n\n return this._geometry.containsPoint(SmoothGraphics._TEMP_POINT);\n }\n\n protected calculateTints(): void\n {\n if (this.batchTint !== this.tint)\n {\n this.batchTint = this._tintColor.toNumber();\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batch = this.batches[i];\n\n batch._tintRGB = Color.shared\n .setValue(this._tintColor)\n .multiply(batch._batchRGB)\n .toLittleEndianNumber();\n }\n }\n }\n\n protected calculateVertices(): void\n {\n const wtID = this.transform._worldID;\n\n if (this._transformID === wtID)\n {\n return;\n }\n\n this._transformID = wtID;\n\n const wt = this.transform.worldTransform;\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const data = this._geometry.points;// batch.vertexDataOriginal;\n const vertexData = this.vertexData;\n\n let count = 0;\n\n for (let i = 0; i < data.length; i += 2)\n {\n const x = data[i];\n const y = data[i + 1];\n\n vertexData[count++] = (a * x) + (c * y) + tx;\n vertexData[count++] = (d * y) + (b * x) + ty;\n }\n }\n\n public closePath(): this\n {\n const currentPath = this.currentPath;\n\n if (currentPath)\n {\n // we don't need to add extra point in the end because buildLine will take care of that\n currentPath.closeStroke = true;\n }\n\n return this;\n }\n\n public setMatrix(matrix: Matrix): this\n {\n this._matrix = matrix;\n\n return this;\n }\n\n public beginHole(): this\n {\n this.finishPoly();\n this._holeMode = true;\n\n return this;\n }\n\n public endHole(): this\n {\n this.finishPoly();\n this._holeMode = false;\n\n return this;\n }\n\n public destroy(options?: IDestroyOptions | boolean): void\n {\n this._geometry.refCount--;\n if (this._geometry.refCount === 0)\n {\n this._geometry.dispose();\n }\n\n this._matrix = null;\n this.currentPath = null;\n this._lineStyle.destroy();\n this._lineStyle = null;\n this._fillStyle.destroy();\n this._fillStyle = null;\n this._geometry = null;\n this.shader = null;\n this.vertexData = null;\n this.batches.length = 0;\n this.batches = null;\n\n super.destroy(options);\n }\n}\n"],"names":["matrixEquals","th","matrix","eps","BatchStyleArray","i","textureId","lineWidth","lineAlignment","lineScaleMode","settings","textureIds","matrices","lines","count","BatchDrawCall","BatchTextureArray","BLEND_MODES","shader","BaseTexture","texture","texArray","TICK","styleArray","baseTexture","loc","res","Matrix","BatchPart","style","startIndex","attribStart","endIndex","endAttrib","BuildData","JOINT_TYPE","A","FillStyle","obj","Texture","tex","LINE_SCALE_MODE","LineStyle","LINE_CAP","LINE_JOIN","_SegmentPacker","jointStart","jointLen","triangles","target","joints","foundTriangle","vertexSize","indexSize","prevCap","joint","vs","buildData","bufFloat","bufUint","indices","bufferPos","indexPos","lineStyle","color","strideFloats","verts","bufPos","indPos","index","x1","y1","x2","y2","prevX","prevY","nextX","nextY","hasTriangle","travel","j","fullJoint","bis","dist","SegmentPacker","SmoothGraphicsData","shape","fillStyle","cap","smoothVert","precision","smoothFrag","pixelLineFunc","pixelCoverage","SmoothGraphicsShader","Shader","vert","frag","uniforms","maxStyles","maxTextures","sampleValues","Program","vertexSrc","fragmentSrc","pixelLine","src","dashFrag","DashLineShader","dashParams","CircleBuilder","graphicsData","_target","points","x","y","dx","dy","rx","ry","SHAPES","circle","ellipse","roundedRect","halfWidth","halfHeight","n","m","j1","j2","j3","j4","x0","y0","a","cx","cy","vertPos","center","len","nx1","ny1","n1","bx1","by1","nx2","ny2","n2","bx2","by2","b2","tempArr","fixOrientation","hole","area","i1","i2","i3","i4","PolyBuilder","eps2","firstPoint","Point","lastPoint","closedShape","newLen","flag","x3","y3","closeStroke","endJoint","holes","holeArray","pn","start","finish","utils","ind1","ind2","ind","prev","next","D1","D2","bx","by","D","RectangleBuilder","rectData","width","height","RoundedRectangleBuilder","FILL_COMMANDS","BATCH_POOL","DRAW_CALL_POOL","tmpPoint","tmpBounds","Bounds","SmoothGraphicsGeometry","Geometry","_static","Buffer","TYPES","instanced","allow32Indices","batchPart","data","lastShape","point","hitHole","command","shaderSettings","currentStyle","nextTexture","attribOld","indexOld","WRAP_MODES","packer","batches","buffer","floatsSize","arrBuf","styleA","styleB","mat1","mat2","l","fill","line","batch","currentGroup","batchData","styleId","mat","alpha","bgr","Color","bounds","sequenceBounds","curMatrix","type","nextMatrix","rect","poly","UnsmoothGraphics","Graphics","BezierUtils","QuadraticUtils","ArcUtils","graphicsUtils","DEFAULT_SHADERS","_SmoothGraphics","Container","geometry","State","value","options","alignment","scaleMode","native","visible","Polygon","fromX","fromY","cpX","cpY","toX","toY","cpX2","cpY2","radius","result","startAngle","endAngle","anticlockwise","PI_2","startX","startY","xDiff","yDiff","smooth","_a","_b","temp","Rectangle","RoundedRectangle","Circle","Ellipse","path","renderer","hasuint32","blendMode","gI","directShader","worldAlpha","drawCalls","projTrans","scale","multisample","MSAA_QUALITY","drawCall","shaderChange","size","groupTextureCount","shaderHere","texs","mats","sizes","DRAW_MODES","_renderer","pluginName","minX","minY","maxX","maxY","wtID","wt","b","c","d","tx","ty","vertexData","currentPath","SmoothGraphics","curves"],"mappings":";;;;;;;;oFAcgBA,EAAaC,EAAYC,EAAgBC,EAAM,KAC/D,CACI,OAAOF,IAAOC,GAAW,KAAK,IAAID,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC9C,KAAK,IAAIF,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC5B,KAAK,IAAIF,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC5B,KAAK,IAAIF,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC5B,KAAK,IAAIF,EAAG,GAAKC,EAAO,EAAE,EAAIC,GAC9B,KAAK,IAAIF,EAAG,GAAKC,EAAO,EAAE,EAAIC,CACzC,OAKaC,EACb,CAMI,aACA,CACI,KAAK,WAAa,CAAC,EACnB,KAAK,SAAW,CAAA,EAChB,KAAK,MAAQ,GACb,KAAK,MAAQ,CAGjB,CAEA,OACA,CACI,QAASC,EAAI,EAAGA,EAAI,KAAK,MAAOA,IAE5B,KAAK,WAAWA,CAAC,EAAI,KACrB,KAAK,SAASA,CAAC,EAAI,KAEvB,KAAK,MAAQ,CACjB,CAEA,IAAIC,EAAmBJ,EACnBK,EAAmBC,EAAuBC,EAC1CC,EACJ,CACI,KAAM,CAAE,WAA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AU,eACpBtL,EAAIsL,EAAG,EACPC,EAAID,EAAG,EACPE,EAAIF,EAAG,EACPG,EAAIH,EAAG,EACPI,EAAKJ,EAAG,GACRK,EAAKL,EAAG,GAER9G,EAAO,KAAK,UAAU,OACtBoH,EAAa,KAAK,WAExB,IAAIpT,EAAQ,EAEZ,QAAST,EAAI,EAAGA,EAAIyM,EAAK,OAAQzM,GAAK,EACtC,CACI,MAAM6G,EAAI4F,EAAKzM,CAAC,EACV8G,EAAI2F,EAAKzM,EAAI,CAAC,EAEpB6T,EAAWpT,GAAO,EAAKwH,EAAIpB,EAAM4M,EAAI3M,EAAK6M,EAC1CE,EAAWpT,GAAO,EAAKiT,EAAI5M,EAAM0M,EAAI3M,EAAK+M,EAElD,CAEO,WACP,CACI,MAAME,EAAc,KAAK,YAEzB,OAAIA,IAGAA,EAAY,YAAc,IAGvB,IACX,CAEO,UAAUjU,EACjB,CACI,OAAA,KAAK,QAAUA,EAER,IACX,CAEO,WACP,CACI,OAAK,KAAA,aACL,KAAK,UAAY,GAEV,IACX,CAEO,SACP,CACI,OAAK,KAAA,WAAA,EACL,KAAK,UAAY,GAEV,IACX,CAEO,QAAQ8P,EACf,CACI,KAAK,UAAU,WACX,KAAK,UAAU,WAAa,GAE5B,KAAK,UAAU,QAAQ,EAG3B,KAAK,QAAU,KACf,KAAK,YAAc,KACnB,KAAK,WAAW,QAAQ,EACxB,KAAK,WAAa,KAClB,KAAK,WAAW,QAChB,EAAA,KAAK,WAAa,KAClB,KAAK,UAAY,KACjB,KAAK,OAAS,KACd,KAAK,WAAa,KAClB,KAAK,QAAQ,OAAS,EACtB,KAAK,QAAU,KAEf,MAAM,QAAQA,CAAO,CACzB,CACJ,EA34Ba,IAAAoE,GAANzE,EAAM,OAAAyE,GAEc,OAASC,EAAAA,OAFvBD,GAIF,YAAc,IAAIlK,EAAAA"} \ No newline at end of file diff --git a/dist/pixi-graphics-smooth.mjs b/dist/pixi-graphics-smooth.mjs new file mode 100644 index 0000000..ded2bba --- /dev/null +++ b/dist/pixi-graphics-smooth.mjs @@ -0,0 +1,492 @@ +/*! + * @pixi/graphics-smooth - v1.1.1 + * Compiled Fri, 20 Dec 2024 18:57:14 UTC + * + * @pixi/graphics-smooth is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + * + * Copyright 2024, Ivan Popelyshev, All Rights Reserved + */import{BatchTextureArray as Et,BLEND_MODES as ct,BaseTexture as It,Matrix as j,Texture as V,Shader as St,Program as Nt,SHAPES as P,Point as q,utils as ut,Geometry as Pt,Buffer as dt,TYPES as C,WRAP_MODES as At,Color as B,State as Ot,Polygon as it,PI_2 as pt,Rectangle as Dt,RoundedRectangle as wt,Circle as Ct,Ellipse as Mt,MSAA_QUALITY as Bt,DRAW_MODES as Rt}from"@pixi/core";import{LINE_CAP as $,LINE_JOIN as R,Graphics as Ut,graphicsUtils as Ft,curves as kt}from"@pixi/graphics";import{Bounds as ft,Container as zt}from"@pixi/display";function st(n,t,s=.001){return n===t||Math.abs(n.a-t.a)=l.maxStyles?-1:(a[u]=t,c[u]=s,p[u*2]=e,p[u*2+1]=r,this.count++,u)}}class nt{constructor(){this.texArray=new Et,this.styleArray=new yt,this.shader=null,this.blend=ct.NORMAL,this.start=0,this.size=0,this.TICK=0,this.settings=null,this.data=null}clear(){this.texArray.clear(),this.styleArray.clear(),this.settings=null,this.data=null,this.shader=null}begin(t,s){this.TICK=++It._globalBatch,this.settings=t,this.shader=s,this.start=0,this.size=0,this.data=null,s&&s.settings&&(this.settings=s.settings)}check(t){return this.size===0?(this.shader=t,!0):this.shader===t}add(t,s,e,r,i){const{texArray:l,TICK:a,styleArray:c,settings:p}=this,{baseTexture:u}=t;if(u._batchEnabled!==a&&l.count===p.maxTextures)return-1;const o=u._batchEnabled!==a?l.count:u._batchLocation,h=c.add(o,s||j.IDENTITY,e,r,i,p);return h>=0&&u._batchEnabled!==a&&(u._batchEnabled=a,u._batchLocation=l.count,l.elements[l.count++]=u),h}}class xt{constructor(){this.reset()}begin(t,s,e){this.reset(),this.style=t,this.start=s,this.attribStart=e,this.jointEnd=0}end(t,s){this.attribSize=s-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0,this.styleId=-1,this.rgba=0,this.jointEnd=0}}class vt{constructor(){this.verts=[],this.joints=[],this.vertexSize=0,this.indexSize=0,this.closePointEps=1e-4}clear(){this.verts.length=0,this.joints.length=0,this.vertexSize=0,this.indexSize=0}destroy(){this.verts.length=0,this.joints.length=0}}var f=(n=>(n[n.NONE=0]="NONE",n[n.FILL=1]="FILL",n[n.JOINT_BEVEL=4]="JOINT_BEVEL",n[n.JOINT_MITER=8]="JOINT_MITER",n[n.JOINT_ROUND=12]="JOINT_ROUND",n[n.JOINT_CAP_BUTT=16]="JOINT_CAP_BUTT",n[n.JOINT_CAP_SQUARE=18]="JOINT_CAP_SQUARE",n[n.JOINT_CAP_ROUND=20]="JOINT_CAP_ROUND",n[n.FILL_EXPAND=24]="FILL_EXPAND",n[n.CAP_BUTT=32]="CAP_BUTT",n[n.CAP_SQUARE=64]="CAP_SQUARE",n[n.CAP_ROUND=96]="CAP_ROUND",n[n.CAP_BUTT2=128]="CAP_BUTT2",n))(f||{});class Y{constructor(){this.reset()}toJSON(){return this.copyTo({})}clone(){return this.copyTo(new Y)}copyTo(t){return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.shader=this.shader,t.visible=this.visible,t.smooth=this.smooth,t.matrixTex=null,t}packLineScale(){return 0}reset(){this.color=16777215,this.alpha=1,this.texture=V.WHITE,this.matrix=null,this.shader=null,this.visible=!1,this.smooth=!1,this.matrixTex=null}destroy(){this.texture=null,this.matrix=null,this.matrixTex=null}getTextureMatrix(){const t=this.texture;return this.matrix?t.frame.width===t.baseTexture.width&&t.frame.height===t.baseTexture.height?this.matrix:(this.matrixTex?this.matrixTex.copyFrom(this.matrix):this.matrixTex=this.matrix.clone(),this.matrixTex.translate(Number(t.frame.x),Number(t.frame.y)),this.matrixTex):null}}var M=(n=>(n.NONE="none",n.NORMAL="normal",n.HORIZONTAL="horizontal",n.VERTICAL="vertical",n))(M||{});class et extends Y{clone(){return this.copyTo(new et)}copyTo(t){return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.shader=this.shader,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t.scaleMode=this.scaleMode,t}packLineScale(){switch(this.scaleMode){case"normal":return 1;case"horizontal":return 2;case"vertical":return 3;default:return 0}}reset(){super.reset(),this.smooth=!0,this.color=0,this.width=0,this.alignment=.5,this.cap=$.BUTT,this.join=R.MITER,this.miterLimit=10,this.scaleMode="normal"}}const U=class{constructor(){this.strideFloats=12,this.bufferPos=0,this.indexPos=0}updateBufferSize(n,t,s,e){const{joints:r}=e;let i=!1,l=0,a=0;for(let c=n;c=f.FILL_EXPAND){l+=3,a+=3;continue}const o=U.vertsByJoint[u]+U.vertsByJoint[p];o>=4&&(l+=o,a+=6+3*Math.max(o-6,0))}i&&(a+=s),e.vertexSize+=l,e.indexSize+=a}beginPack(n,t,s,e,r=0,i=0){this.buildData=n,this.bufFloat=t,this.bufUint=s,this.indices=e,this.bufferPos=r,this.indexPos=i}endPack(){this.buildData=null,this.bufFloat=null,this.bufUint=null,this.indices=null}packInterleavedGeometry(n,t,s,e,r){const{bufFloat:i,bufUint:l,indices:a,buildData:c,strideFloats:p}=this,{joints:u,verts:o}=c;let h=this.bufferPos,d=this.indexPos,x=this.bufferPos/this.strideFloats,v,y,g,b,L,E,I,_,m=!1,N=0;for(let T=n;T=f.FILL_EXPAND){L=o[T*2],E=o[T*2+1],v=o[T*2+2],y=o[T*2+3],g=o[T*2+4],b=o[T*2+5];const O=T+3;for(let X=0;X<3;X++)i[h]=L,i[h+1]=E,i[h+2]=v,i[h+3]=y,i[h+4]=g,i[h+5]=b,i[h+6]=o[(O+X)*2],i[h+7]=o[(O+X)*2+1],i[h+8]=N,i[h+9]=16*w+X,i[h+10]=e,l[h+11]=r,h+=p;a[d]=x,a[d+1]=x+1,a[d+2]=x+2,d+=3,x+=3;continue}const D=U.vertsByJoint[A]+U.vertsByJoint[Q];if(D===0)continue;v=o[T*2],y=o[T*2+1],g=o[T*2+2],b=o[T*2+3],L=o[T*2-2],E=o[T*2-1];const J=Math.sqrt((g-v)*(g-v)+(b-y)*(b-y));U.vertsByJoint[A]===0&&(N-=J),(A&-3)!==f.JOINT_CAP_BUTT?(I=o[T*2+4],_=o[T*2+5]):(I=v,_=y);for(let O=0;O 0.5) { + if (len < len2) { + if (abs(dy * (bisect.x * norm.y - bisect.y * norm.x)) > len) { + return dy * norm; + } + } else { + if (abs(dy * (bisect.x * norm2.y - bisect.y * norm2.x)) > len2) { + return dy * norm; + } + } + } + return dy * bisect; +} + +void main(void){ + vec2 pointA = (translationMatrix * vec3(aPoint1, 1.0)).xy; + vec2 pointB = (translationMatrix * vec3(aPoint2, 1.0)).xy; + + vec2 xBasis = pointB - pointA; + float len = length(xBasis); + vec2 forward = xBasis / len; + vec2 norm = vec2(forward.y, -forward.x); + + float type = floor(aVertexJoint / 16.0); + float vertexNum = aVertexJoint - type * 16.0; + float dx = 0.0, dy = 1.0; + + float capType = floor(type / 32.0); + type -= capType * 32.0; + + int styleId = int(aStyleId + 0.5); + float lineWidth = styleLine[styleId].x; + vTextureId = floor(styleTextureId[styleId] / 4.0); + float scaleMode = styleTextureId[styleId] - vTextureId * 4.0; + float avgScale = 1.0; + if (scaleMode > 2.5) { + avgScale = length(translationMatrix * vec3(1.0, 0.0, 0.0)); + } else if (scaleMode > 1.5) { + avgScale = length(translationMatrix * vec3(0.0, 1.0, 0.0)); + } else if (scaleMode > 0.5) { + vec2 avgDiag = (translationMatrix * vec3(1.0, 1.0, 0.0)).xy; + avgScale = sqrt(dot(avgDiag, avgDiag) * 0.5); + } + lineWidth *= 0.5 * avgScale; + float lineAlignment = 2.0 * styleLine[styleId].y - 1.0; + vTextureCoord = vec2(0.0); + + vec2 pos; + + if (capType == CAP_ROUND) { + vertexNum += 4.0; + type = JOINT_CAP_ROUND; + capType = 0.0; + lineAlignment = -lineAlignment; + } + + vLine1 = vec4(0.0, 10.0, 1.0, 0.0); + vLine2 = vec4(0.0, 10.0, 1.0, 0.0); + vArc = vec4(0.0); + if (type == FILL) { + pos = pointA; + vType = 0.0; + vLine2 = vec4(-2.0, -2.0, -2.0, 0.0); + vec2 vTexturePixel; + vTexturePixel.x = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2]); + vTexturePixel.y = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2 + 1]); + vTextureCoord = vTexturePixel / samplerSize[int(vTextureId)]; + } else if (type >= FILL_EXPAND && type < FILL_EXPAND + 7.5) { + // expand vertices + float flags = type - FILL_EXPAND; + float flag3 = floor(flags / 4.0); + float flag2 = floor((flags - flag3 * 4.0) / 2.0); + float flag1 = flags - flag3 * 4.0 - flag2 * 2.0; + + vec2 prev = (translationMatrix * vec3(aPrev, 1.0)).xy; + + if (vertexNum < 0.5) { + pos = prev; + } else if (vertexNum < 1.5) { + pos = pointA; + } else { + pos = pointB; + } + float len2 = length(aNext); + vec2 bisect = (translationMatrix * vec3(aNext, 0.0)).xy; + if (len2 > 0.01) { + bisect = normalize(bisect) * len2; + } + + vec2 n1 = normalize(vec2(pointA.y - prev.y, -(pointA.x - prev.x))); + vec2 n2 = normalize(vec2(pointB.y - pointA.y, -(pointB.x - pointA.x))); + vec2 n3 = normalize(vec2(prev.y - pointB.y, -(prev.x - pointB.x))); + + if (n1.x * n2.y - n1.y * n2.x < 0.0) { + n1 = -n1; + n2 = -n2; + n3 = -n3; + } + pos += bisect * expand; + + vLine1 = vec4(16.0, 16.0, 16.0, -1.0); + if (flag1 > 0.5) { + vLine1.x = -dot(pos - prev, n1); + } + if (flag2 > 0.5) { + vLine1.y = -dot(pos - pointA, n2); + } + if (flag3 > 0.5) { + vLine1.z = -dot(pos - pointB, n3); + } + vLine1.xyz *= resolution; + vType = 2.0; + } else if (type >= BEVEL) { + float dy = lineWidth + expand; + float shift = lineWidth * lineAlignment; + float inner = 0.0; + if (vertexNum >= 1.5) { + dy = -dy; + inner = 1.0; + } + + vec2 base, next, xBasis2, bisect; + float flag = 0.0; + float side2 = 1.0; + if (vertexNum < 0.5 || vertexNum > 2.5 && vertexNum < 3.5) { + next = (translationMatrix * vec3(aPrev, 1.0)).xy; + base = pointA; + flag = type - floor(type / 2.0) * 2.0; + side2 = -1.0; + } else { + next = (translationMatrix * vec3(aNext, 1.0)).xy; + base = pointB; + if (type >= MITER && type < MITER + 3.5) { + flag = step(MITER + 1.5, type); + // check miter limit here? + } + } + xBasis2 = next - base; + float len2 = length(xBasis2); + vec2 norm2 = vec2(xBasis2.y, -xBasis2.x) / len2; + float D = norm.x * norm2.y - norm.y * norm2.x; + if (D < 0.0) { + inner = 1.0 - inner; + } + + norm2 *= side2; + + float collinear = step(0.0, dot(norm, norm2)); + + vType = 0.0; + float dy2 = -1000.0; + + if (abs(D) < 0.01 && collinear < 0.5) { + if (type >= ROUND && type < ROUND + 1.5) { + type = JOINT_CAP_ROUND; + } + //TODO: BUTT here too + } + + vLine1 = vec4(0.0, lineWidth, max(abs(norm.x), abs(norm.y)), min(abs(norm.x), abs(norm.y))); + vLine2 = vec4(0.0, lineWidth, max(abs(norm2.x), abs(norm2.y)), min(abs(norm2.x), abs(norm2.y))); + + if (vertexNum < 3.5) { + if (abs(D) < 0.01 && collinear < 0.5) { + pos = (shift + dy) * norm; + } else { + if (flag < 0.5 && inner < 0.5) { + pos = (shift + dy) * norm; + } else { + pos = doBisect(norm, len, norm2, len2, shift + dy, inner); + } + } + vLine2.y = -1000.0; + if (capType >= CAP_BUTT && capType < CAP_ROUND) { + float extra = step(CAP_SQUARE, capType) * lineWidth; + vec2 back = -forward; + if (vertexNum < 0.5 || vertexNum > 2.5) { + pos += back * (expand + extra); + dy2 = expand; + } else { + dy2 = dot(pos + base - pointA, back) - extra; + } + } + if (type >= JOINT_CAP_BUTT && type < JOINT_CAP_SQUARE + 0.5) { + float extra = step(JOINT_CAP_SQUARE, type) * lineWidth; + if (vertexNum < 0.5 || vertexNum > 2.5) { + vLine2.y = dot(pos + base - pointB, forward) - extra; + } else { + pos += forward * (expand + extra); + vLine2.y = expand; + if (capType >= CAP_BUTT) { + dy2 -= expand + extra; + } + } + } + } else if (type >= JOINT_CAP_ROUND && type < JOINT_CAP_ROUND + 1.5) { + base += shift * norm; + if (inner > 0.5) { + dy = -dy; + inner = 0.0; + } + vec2 d2 = abs(dy) * forward; + if (vertexNum < 4.5) { + dy = -dy; + pos = dy * norm; + } else if (vertexNum < 5.5) { + pos = dy * norm; + } else if (vertexNum < 6.5) { + pos = dy * norm + d2; + vArc.x = abs(dy); + } else { + dy = -dy; + pos = dy * norm + d2; + vArc.x = abs(dy); + } + vLine2 = vec4(0.0, lineWidth * 2.0 + 10.0, 1.0 , 0.0); // forget about line2 with type=3 + vArc.y = dy; + vArc.z = 0.0; + vArc.w = lineWidth; + vType = 3.0; + } else if (abs(D) < 0.01 && collinear < 0.5) { + pos = dy * norm; + } else { + if (inner > 0.5) { + dy = -dy; + inner = 0.0; + } + float side = sign(dy); + vec2 norm3 = normalize(norm + norm2); + + if (type >= MITER && type < MITER + 3.5) { + vec2 farVertex = doBisect(norm, len, norm2, len2, shift + dy, 0.0); + if (length(farVertex) > abs(shift + dy) * MITER_LIMIT) { + type = BEVEL; + } + } + + if (vertexNum < 4.5) { + pos = doBisect(norm, len, norm2, len2, shift - dy, 1.0); + } else if (vertexNum < 5.5) { + pos = (shift + dy) * norm; + } else if (vertexNum > 7.5) { + pos = (shift + dy) * norm2; + } else { + if (type >= ROUND && type < ROUND + 1.5) { + pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0); + float d2 = abs(shift + dy); + if (length(pos) > abs(shift + dy) * 1.5) { + if (vertexNum < 6.5) { + pos.x = (shift + dy) * norm.x - d2 * norm.y; + pos.y = (shift + dy) * norm.y + d2 * norm.x; + } else { + pos.x = (shift + dy) * norm2.x + d2 * norm2.y; + pos.y = (shift + dy) * norm2.y - d2 * norm2.x; + } + } + } else if (type >= MITER && type < MITER + 3.5) { + pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0); //farVertex + } else if (type >= BEVEL && type < BEVEL + 1.5) { + float d2 = side / resolution; + if (vertexNum < 6.5) { + pos = (shift + dy) * norm + d2 * norm3; + } else { + pos = (shift + dy) * norm2 + d2 * norm3; + } + } + } + + if (type >= ROUND && type < ROUND + 1.5) { + vArc.x = side * dot(pos, norm3); + vArc.y = pos.x * norm3.y - pos.y * norm3.x; + vArc.z = dot(norm, norm3) * (lineWidth + side * shift); + vArc.w = lineWidth + side * shift; + vType = 3.0; + } else if (type >= MITER && type < MITER + 3.5) { + vType = 1.0; + } else if (type >= BEVEL && type < BEVEL + 1.5) { + vType = 4.0; + vArc.z = dot(norm, norm3) * (lineWidth + side * shift) - side * dot(pos, norm3); + } + + dy = side * (dot(pos, norm) - shift); + dy2 = side * (dot(pos, norm2) - shift); + } + + pos += base; + vLine1.xy = vec2(dy, vLine1.y) * resolution; + vLine2.xy = vec2(dy2, vLine2.y) * resolution; + vArc = vArc * resolution; + vTravel = vec2(aTravel * avgScale + dot(pos - pointA, vec2(-norm.y, norm.x)), avgScale); + } + + gl_Position = vec4((projectionMatrix * vec3(pos, 1.0)).xy, 0.0, 1.0); + + vColor = aColor * tint; +}`,Jt=`#version 100 +#ifdef GL_FRAGMENT_PRECISION_HIGH + precision highp float; +#else + precision mediump float; +#endif +`,gt=`%PRECISION% +varying vec4 vColor; +varying vec4 vLine1; +varying vec4 vLine2; +varying vec4 vArc; +varying float vType; +varying float vTextureId; +varying vec2 vTextureCoord; +varying vec2 vTravel; +uniform sampler2D uSamplers[%MAX_TEXTURES%]; + +%PIXEL_LINE% + +void main(void){ + %PIXEL_COVERAGE% + + vec4 texColor; + float textureId = floor(vTextureId+0.5); + %FOR_LOOP% + + gl_FragColor = vColor * texColor * alpha; +} +`,Xt=[` +float pixelLine(float x, float A, float B) { + return clamp(x + 0.5, 0.0, 1.0); +} +`,` +float pixelLine(float x, float A, float B) { + float y = abs(x), s = sign(x); + if (y * 2.0 < A - B) { + return 0.5 + s * y / A; + } + y -= (A - B) * 0.5; + y = max(1.0 - y / B, 0.0); + return (1.0 + s * (1.0 - y * y)) * 0.5; + //return clamp(x + 0.5, 0.0, 1.0); +} +`],jt=`float alpha = 1.0; +if (vType < 0.5) { + float left = pixelLine(-vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float right = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float near = vLine2.x - 0.5; + float far = min(vLine2.x + 0.5, 0.0); + float top = vLine2.y - 0.5; + float bottom = min(vLine2.y + 0.5, 0.0); + alpha = (right - left) * max(bottom - top, 0.0) * max(far - near, 0.0); +} else if (vType < 1.5) { + float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w); + alpha = a2 * b2 - a1 * b1; +} else if (vType < 2.5) { + alpha *= max(min(vLine1.x + 0.5, 1.0), 0.0); + alpha *= max(min(vLine1.y + 0.5, 1.0), 0.0); + alpha *= max(min(vLine1.z + 0.5, 1.0), 0.0); +} else if (vType < 3.5) { + float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float alpha_miter = a2 * b2 - a1 * b1; + float alpha_plane = clamp(vArc.z - vArc.x + 0.5, 0.0, 1.0); + float d = length(vArc.xy); + float circle_hor = max(min(vArc.w, d + 0.5) - max(-vArc.w, d - 0.5), 0.0); + float circle_vert = min(vArc.w * 2.0, 1.0); + float alpha_circle = circle_hor * circle_vert; + alpha = min(alpha_miter, max(alpha_circle, alpha_plane)); +} else { + float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w); + float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w); + float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w); + alpha = a2 * b2 - a1 * b1; + alpha *= clamp(vArc.z + 0.5, 0.0, 1.0); +} +`;class z extends St{constructor(t,s=mt,e=gt,r={}){s=z.generateVertexSrc(t,s),e=z.generateFragmentSrc(t,e);const{maxStyles:i,maxTextures:l}=t,a=new Int32Array(l);for(let c=0;c0&&(s+=` +else `),e 0.0) { + float g = gap * vTravel.y; + if (g > 0.0) { + float t = mod(vTravel.x, d + g); + alpha *= mix( + min(0.5 * d + 0.5 - abs(t - 0.5 * d), 1.0), + max(abs(t - 0.5 * g - d) - 0.5 * g + 0.5, 0.0), + step(d, t) + ); + } + } else { + alpha = 0.0; + } + + vec4 texColor; + float textureId = floor(vTextureId+0.5); + %FOR_LOOP% + + gl_FragColor = vColor * texColor * alpha; +} +`;class Ht extends z{constructor(t){const s={maxStyles:16,maxTextures:1,pixelLine:1};super(s,void 0,Vt,t||{dash:8,gap:5})}}const F={LINE_SCALE_MODE:M.NORMAL,SHADER_MAX_STYLES:24,SHADER_MAX_TEXTURES:4,PIXEL_LINE:0};class Z{path(t,s){const e=t.points;let r,i,l,a,c,p;if(t.type===P.CIRC){const y=t.shape;r=y.x,i=y.y,c=p=y.radius,l=a=0}else if(t.type===P.ELIP){const y=t.shape;r=y.x,i=y.y,c=y.width,p=y.height,l=a=0}else{const y=t.shape,g=y.width/2,b=y.height/2;r=y.x+g,i=y.y+b,c=p=Math.max(0,Math.min(y.radius,Math.min(g,b))),l=g-c,a=b-p}if(!(c>=0&&p>=0&&l>=0&&a>=0)){e.length=0;return}const u=Math.ceil(2.3*Math.sqrt(c+p)),o=u*8+(l?4:0)+(a?4:0);if(e.length=o,o===0)return;if(u===0){e.length=8,e[0]=e[6]=r+l,e[1]=e[3]=i+a,e[2]=e[4]=r-l,e[5]=e[7]=i-a;return}let h=0,d=u*4+(l?2:0)+2,x=d,v=o;{const y=l+c,g=a,b=r+y,L=r-y,E=i+g;if(e[h++]=b,e[h++]=E,e[--d]=E,e[--d]=L,a){const I=i-g;e[x++]=L,e[x++]=I,e[--v]=I,e[--v]=b}}for(let y=1;y0?(e.push(A),e.push(D)):(E=A,I=D),e.push(u),e.push(o),e.push(v),e.push(y),e.push(m),e.push(N),e.push(0),e.push(0),e.push(A),e.push(D),r.push(f.FILL_EXPAND+2),r.push(f.NONE),r.push(f.NONE),r.push(f.NONE),r.push(f.NONE),r.push(f.NONE),v=m,y=N,g=T,b=w}e.push(E),e.push(I)}line(t,s){const{verts:e,joints:r}=s,{points:i}=t,l=i.length===8?t.goodJointType():f.JOINT_MITER+3,a=i.length;if(a!==0){e.push(i[a-2],i[a-1]),r.push(f.NONE);for(let c=0;c0||t&&e<=0){const r=s/2;for(let i=r+r%2;i=i?e||(y=f.NONE):d+4>=i&&(e||(p===f.CAP_ROUND&&(y=f.JOINT_CAP_ROUND),p===f.CAP_BUTT&&(y=f.JOINT_CAP_BUTT),p===f.CAP_SQUARE&&(y=f.JOINT_CAP_SQUARE))),y+=u,u=0,l.push(x,v),a.push(y),o=x,h=v}e?(l.push(r[0],r[1]),a.push(f.NONE),l.push(r[2],r[3]),a.push(f.NONE)):(l.push(r[i-4],r[i-3]),a.push(f.NONE))}fill(t,s){let e=t.points;const r=t.holes,i=s.closePointEps,{verts:l,joints:a}=s;if(e.length<6)return;const c=[];let p=e.length;bt(e,!1);for(let d=0;d0&&(d>1),u[o*2]=x-1,u[(x-1)*2+1]=o;for(let v=o;v+10&&(I=2);for(let _=0;_<3;_++){const m=h[d+_*I%3];l.push(e[m*2],e[m*2+1])}for(let _=0;_<3;_++){const m=h[d+_*I%3];l.push(u[m*2],u[m*2+1])}}}}class _t{constructor(){this._polyBuilder=new rt}path(t,s){const e=t.shape,r=e.x,i=e.y,l=e.width,a=e.height,c=t.points;c.length=0,c.push(r,i,r+l,i,r+l,i+a,r,i+a)}line(t,s){const{verts:e,joints:r}=s,{points:i}=t,l=t.goodJointType(),a=i.length;e.push(i[a-2],i[a-1]),r.push(f.NONE);for(let c=0;c0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(t,s=null,e=null,r=null){const i=new G(t,s,e,r);return this.graphicsData.push(i),this.dirty++,this}drawHole(t,s=null){if(!this.graphicsData.length)return null;const e=new G(t,null,null,s),r=this.graphicsData[this.graphicsData.length-1];return e.lineStyle=r.lineStyle,r.holes.push(e),this.dirty++,this}destroy(){super.destroy();for(let t=0;t=.99&&i.lineStyle.width*Math.min(i.lineStyle.alignment,1-i.lineStyle.alignment)>=.495),i.fillStart=s.joints.length,c.length?H[P.POLY].fill(i,s):p.fill(i,s),i.fillLen=s.joints.length-i.fillStart),a.visible)){i.strokeStart=s.joints.length,p.line(i,s);for(let u=0;u0&&(i=this.batches[this.batches.length-1],l=i.style);for(let a=this.shapeBatchIndex;a65535&&this.pack32index?c.data=new Uint32Array(s):c.data=new Uint16Array(s)),r.beginPack(i,this._bufferFloats,this._bufferUint,c.data);let u=0;for(let o=0;o0&&n.alpha>0;return t?(n.matrix&&(n.matrix=n.matrix.clone(),n.matrix.invert()),Object.assign(this._lineStyle,{visible:t},n)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const n=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new it,this.currentPath.closeStroke=!1,this.currentPath.points.push(n[t-2],n[t-1]))}else this.currentPath=new it,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(n,t){return this.startPoly(),this.currentPath.points[0]=n,this.currentPath.points[1]=t,this}lineTo(n,t){this.currentPath||this.moveTo(0,0);const s=this.currentPath.points,e=s[s.length-2],r=s[s.length-1];return(e!==n||r!==t)&&s.push(n,t),this}_initCurve(n=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[n,t]):this.moveTo(n,t)}quadraticCurveTo(n,t,s,e){this._initCurve();const r=this.currentPath.points;return r.length===0&&this.moveTo(0,0),qt.curveTo(n,t,s,e,r),this}bezierCurveTo(n,t,s,e,r,i){return this._initCurve(),Qt.curveTo(n,t,s,e,r,i,this.currentPath.points),this}arcTo(n,t,s,e,r){this._initCurve(n,t);const i=this.currentPath.points,l=Lt.curveTo(n,t,s,e,r,i);if(l){const{cx:a,cy:c,radius:p,startAngle:u,endAngle:o,anticlockwise:h}=l;this.arc(a,c,p,u,o,h)}return this}arc(n,t,s,e,r,i=!1){if(e===r)return this;if(!i&&r<=e?r+=pt:i&&e<=r&&(e+=pt),r-e===0)return this;const l=n+Math.cos(e)*s,a=t+Math.sin(e)*s,c=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const u=Math.abs(p[p.length-2]-l),o=Math.abs(p[p.length-1]-a);u0;return t?(n.matrix&&(n.matrix=n.matrix.clone(),n.matrix.invert()),Object.assign(this._fillStyle,{visible:t},n)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(n,t,s,e){return this.drawShape(new Dt(n,t,s,e))}drawRoundedRect(n,t,s,e,r){return this.drawShape(new wt(n,t,s,e,r))}drawCircle(n,t,s){return this.drawShape(new Ct(n,t,s))}drawEllipse(n,t,s,e){return this.drawShape(new Mt(n,t,s,e))}drawPolygon(...n){let t,s=!0;const e=n[0];e.points?(s=e.closeStroke,t=e.points):Array.isArray(n[0])?t=n[0]:t=n;const r=new it(t);return r.closeStroke=s,this.drawShape(r),this}drawShape(n){return this._holeMode?this._geometry.drawHole(n,this._matrix):this._geometry.drawShape(n,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const n=this._geometry.graphicsData;return n.length===1&&n[0].shape.type===P.RECT&&!n[0].matrix&&!n[0].holes.length&&!(n[0].lineStyle.visible&&n[0].lineStyle.width)}_renderCanvas(n){Gt.prototype._renderCanvas.call(this,n)}_render(n){this.finishPoly();const t=this._geometry,s=n.context.supports.uint32Indices;t.checkInstancing(n.geometry.hasInstance,s),t.updateBatches(this.shaderSettings),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(n)):(n.batch.flush(),this._renderDirect(n))}_populateBatches(){const n=this._geometry,t=this.blendMode,s=n.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=n.batchDirty,this.batches.length=s,this.vertexData=new Float32Array(n.points);for(let e=0;e= settings.maxStyles)\n {\n return -1;\n }\n textureIds[count] = textureId;\n matrices[count] = matrix;\n lines[count * 2] = lineWidth;\n lines[(count * 2) + 1] = lineAlignment;\n this.count++;\n\n return count;\n }\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class BatchDrawCall\n{\n texArray: BatchTextureArray;\n styleArray: BatchStyleArray;\n blend: BLEND_MODES;\n start: number;\n size: number;\n data: any;\n shader: Shader;\n TICK: number;\n settings: IGraphicsBatchSettings;\n\n constructor()\n {\n this.texArray = new BatchTextureArray();\n this.styleArray = new BatchStyleArray();\n this.shader = null;\n this.blend = BLEND_MODES.NORMAL;\n\n this.start = 0;\n this.size = 0;\n this.TICK = 0; // for filling textures\n this.settings = null;\n /**\n * data for uniforms or custom webgl state\n * @member {object}\n */\n this.data = null;\n }\n\n clear()\n {\n this.texArray.clear();\n this.styleArray.clear();\n this.settings = null;\n this.data = null;\n this.shader = null;\n }\n\n begin(settings: IGraphicsBatchSettings, shader: Shader)\n {\n this.TICK = ++BaseTexture._globalBatch;\n this.settings = settings;\n this.shader = shader;\n // start and size calculated outside\n this.start = 0;\n this.size = 0;\n this.data = null;\n if (shader && (shader as any).settings)\n {\n this.settings = (shader as any).settings;\n }\n }\n\n check(shader: Shader): boolean\n {\n if (this.size === 0)\n {\n this.shader = shader;\n\n return true;\n }\n\n return (this.shader === shader);\n }\n\n add(texture: Texture, matrix: Matrix, lineWidth: number,\n lineAlignment: number, lineScaleMode: number): number\n {\n const { texArray, TICK, styleArray, settings } = this;\n const { baseTexture } = texture;\n // check tex\n\n if (baseTexture._batchEnabled !== TICK && texArray.count === settings.maxTextures)\n {\n return -1;\n }\n const loc = baseTexture._batchEnabled !== TICK ? texArray.count : baseTexture._batchLocation;\n // check and add style\n // add1 -> add2 only works in chain, not when there are several adds inside\n const res = styleArray.add(loc, matrix || Matrix.IDENTITY,\n lineWidth, lineAlignment, lineScaleMode, settings);\n\n if (res >= 0)\n {\n // SUCCESS here\n // add tex\n if (baseTexture._batchEnabled !== TICK)\n {\n baseTexture._batchEnabled = TICK;\n baseTexture._batchLocation = texArray.count;\n texArray.elements[texArray.count++] = baseTexture;\n }\n }\n\n return res;\n }\n}\n","import { FillStyle } from './FillStyle';\nimport { LineStyle } from './LineStyle';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class BatchPart\n{\n public style: LineStyle | FillStyle;\n public start: number;\n public size: number;\n public jointEnd: number;\n public attribStart: number;\n public attribSize: number;\n public styleId: number;\n public rgba: number;\n\n constructor()\n {\n this.reset();\n }\n\n public begin(style: LineStyle | FillStyle, startIndex: number, attribStart: number): void\n {\n this.reset();\n this.style = style;\n this.start = startIndex;\n this.attribStart = attribStart;\n this.jointEnd = 0;\n }\n\n public end(endIndex: number, endAttrib: number): void\n {\n this.attribSize = endAttrib - this.attribStart;\n this.size = endIndex - this.start;\n }\n\n public reset(): void\n {\n this.style = null;\n this.size = 0;\n this.start = 0;\n this.attribStart = 0;\n this.attribSize = 0;\n this.styleId = -1;\n this.rgba = 0;\n this.jointEnd = 0;\n }\n}\n","/**\n * @memberof PIXI.smooth\n */\nexport class BuildData\n{\n verts: Array = [];\n joints: Array = [];\n vertexSize = 0;\n indexSize = 0;\n closePointEps = 1e-4;\n\n clear()\n {\n this.verts.length = 0;\n this.joints.length = 0;\n this.vertexSize = 0;\n this.indexSize = 0;\n }\n\n destroy()\n {\n this.verts.length = 0;\n this.joints.length = 0;\n }\n}\n","export enum JOINT_TYPE\n {\n NONE = 0,\n FILL = 1,\n JOINT_BEVEL = 4,\n JOINT_MITER = 8,\n JOINT_ROUND = 12,\n JOINT_CAP_BUTT = 16,\n JOINT_CAP_SQUARE = 18,\n JOINT_CAP_ROUND = 20,\n FILL_EXPAND = 24,\n CAP_BUTT = 1 << 5,\n CAP_SQUARE = 2 << 5,\n CAP_ROUND = 3 << 5,\n CAP_BUTT2 = 4 << 5,\n}\n","import { Shader, Texture } from '@pixi/core';\n\nimport type { Matrix } from '@pixi/core';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class FillStyle\n{\n constructor()\n {\n this.reset();\n }\n\n color: number;\n alpha: number;\n texture: Texture;\n matrix: Matrix;\n matrixTex: Matrix;\n shader: Shader;\n visible: boolean;\n smooth: boolean;\n\n toJSON()\n {\n return this.copyTo({});\n }\n\n clone(): FillStyle\n {\n return this.copyTo(new FillStyle());\n }\n\n copyTo(obj: any): any\n {\n obj.color = this.color;\n obj.alpha = this.alpha;\n obj.texture = this.texture;\n obj.matrix = this.matrix;\n obj.shader = this.shader;\n obj.visible = this.visible;\n obj.smooth = this.smooth;\n obj.matrixTex = null;\n\n return obj;\n }\n\n packLineScale()\n {\n return 0;\n }\n\n reset()\n {\n this.color = 0xFFFFFF;\n\n this.alpha = 1;\n\n this.texture = Texture.WHITE;\n\n this.matrix = null;\n\n this.shader = null;\n\n this.visible = false;\n\n this.smooth = false;\n\n this.matrixTex = null;\n }\n\n destroy()\n {\n this.texture = null;\n this.matrix = null;\n this.matrixTex = null;\n }\n\n getTextureMatrix()\n {\n const tex = this.texture;\n\n if (!this.matrix)\n {\n return null;\n }\n\n if (tex.frame.width === tex.baseTexture.width\n && tex.frame.height === tex.baseTexture.height)\n {\n return this.matrix;\n }\n\n if (!this.matrixTex)\n {\n this.matrixTex = this.matrix.clone();\n }\n else\n {\n this.matrixTex.copyFrom(this.matrix);\n }\n this.matrixTex.translate(Number(tex.frame.x), Number(tex.frame.y));\n\n return this.matrixTex;\n }\n}\n","import { LINE_CAP, LINE_JOIN } from '@pixi/graphics';\nimport { FillStyle } from './FillStyle';\n\n/**\n * @memberof PIXI.smooth\n */\nexport enum LINE_SCALE_MODE\n {\n NONE = 'none',\n NORMAL = 'normal',\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class LineStyle extends FillStyle\n{\n width: number;\n alignment: number;\n\n cap: LINE_CAP;\n join: LINE_JOIN;\n miterLimit: number;\n scaleMode: LINE_SCALE_MODE;\n\n clone(): LineStyle\n {\n return this.copyTo(new LineStyle());\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n copyTo(obj: any): LineStyle\n {\n obj.color = this.color;\n obj.alpha = this.alpha;\n obj.texture = this.texture;\n obj.matrix = this.matrix;\n obj.shader = this.shader;\n obj.visible = this.visible;\n obj.width = this.width;\n obj.alignment = this.alignment;\n obj.cap = this.cap;\n obj.join = this.join;\n obj.miterLimit = this.miterLimit;\n obj.scaleMode = this.scaleMode;\n\n return obj;\n }\n\n /**\n * returns width multiplied by scaleMode\n */\n packLineScale(): number\n {\n switch (this.scaleMode)\n {\n case LINE_SCALE_MODE.NORMAL: return 1;\n case LINE_SCALE_MODE.HORIZONTAL: return 2;\n case LINE_SCALE_MODE.VERTICAL: return 3;\n default: return 0;\n }\n }\n\n reset(): void\n {\n super.reset();\n\n this.smooth = true;\n\n this.color = 0x0;\n\n this.width = 0;\n\n this.alignment = 0.5;\n\n this.cap = LINE_CAP.BUTT;\n this.join = LINE_JOIN.MITER;\n this.miterLimit = 10;\n this.scaleMode = LINE_SCALE_MODE.NORMAL;\n }\n}\n","import { BuildData } from './BuildData';\nimport { JOINT_TYPE } from './const';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SegmentPacker\n{\n static vertsByJoint: Array = [];\n\n strideFloats = 12;\n\n updateBufferSize(jointStart: number, jointLen: number, triangles: number, target: BuildData): void\n {\n const { joints } = target;\n let foundTriangle = false;\n\n let vertexSize = 0;\n let indexSize = 0;\n\n for (let i = jointStart; i < jointStart + jointLen; i++)\n {\n const prevCap = joints[i] & ~31;\n const joint = joints[i] & 31;\n\n if (joint === JOINT_TYPE.FILL)\n {\n foundTriangle = true;\n vertexSize++;\n continue;\n }\n\n if (joint >= JOINT_TYPE.FILL_EXPAND)\n {\n vertexSize += 3;\n indexSize += 3;\n continue;\n }\n\n const vs = SegmentPacker.vertsByJoint[joint] + SegmentPacker.vertsByJoint[prevCap];\n\n if (vs >= 4)\n {\n vertexSize += vs;\n indexSize += 6 + (3 * Math.max(vs - 6, 0));\n }\n }\n if (foundTriangle)\n {\n indexSize += triangles;\n }\n\n target.vertexSize += vertexSize;\n target.indexSize += indexSize;\n }\n\n bufferPos = 0;\n indexPos = 0;\n bufFloat: Float32Array;\n bufUint: Uint32Array;\n indices: Uint16Array;\n buildData: BuildData;\n\n beginPack(buildData: BuildData, bufFloat: Float32Array, bufUint: Uint32Array,\n indices: Uint16Array, bufferPos = 0, indexPos = 0): void\n {\n this.buildData = buildData;\n this.bufFloat = bufFloat;\n this.bufUint = bufUint;\n this.indices = indices;\n this.bufferPos = bufferPos;\n this.indexPos = indexPos;\n }\n\n endPack(): void\n {\n this.buildData = null;\n this.bufFloat = null;\n this.bufUint = null;\n this.indices = null;\n }\n\n packInterleavedGeometry(jointStart: number, jointLen: number, triangles: number[],\n lineStyle: number, color: number): void\n {\n const { bufFloat, bufUint, indices, buildData, strideFloats } = this;\n const { joints, verts } = buildData;\n\n let bufPos = this.bufferPos;\n let indPos = this.indexPos;\n let index = this.bufferPos / this.strideFloats;\n\n // eslint-disable-next-line max-len\n let x1: number; let y1: number;\n let x2: number; let y2: number;\n let prevX: number; let prevY: number;\n let nextX: number; let nextY: number;\n // let type: number;\n let hasTriangle = false;\n\n let travel = 0;\n\n for (let j = jointStart; j < jointStart + jointLen; j++)\n {\n const fullJoint = joints[j];\n const prevCap = joints[j] & ~31;\n const joint = joints[j] & 31;\n\n if (joint === JOINT_TYPE.FILL)\n {\n // just one vertex\n hasTriangle = true;\n x1 = verts[(j * 2)];\n y1 = verts[(j * 2) + 1];\n bufFloat[bufPos] = x1;\n bufFloat[bufPos + 1] = y1;\n bufFloat[bufPos + 2] = x1;\n bufFloat[bufPos + 3] = y1;\n bufFloat[bufPos + 4] = x1;\n bufFloat[bufPos + 5] = y1;\n bufFloat[bufPos + 6] = x1;\n bufFloat[bufPos + 7] = y1;\n bufFloat[bufPos + 8] = travel;\n bufFloat[bufPos + 9] = 16 * joint;\n bufFloat[bufPos + 10] = lineStyle;\n bufUint[bufPos + 11] = color;\n bufPos += strideFloats;\n continue;\n }\n\n if (joint >= JOINT_TYPE.FILL_EXPAND)\n {\n prevX = verts[j * 2];\n prevY = verts[(j * 2) + 1];\n x1 = verts[(j * 2) + 2];\n y1 = verts[(j * 2) + 3];\n x2 = verts[(j * 2) + 4];\n y2 = verts[(j * 2) + 5];\n\n const bis = j + 3;\n\n for (let i = 0; i < 3; i++)\n {\n bufFloat[bufPos] = prevX;\n bufFloat[bufPos + 1] = prevY;\n bufFloat[bufPos + 2] = x1;\n bufFloat[bufPos + 3] = y1;\n bufFloat[bufPos + 4] = x2;\n bufFloat[bufPos + 5] = y2;\n bufFloat[bufPos + 6] = verts[(bis + i) * 2];\n bufFloat[bufPos + 7] = verts[((bis + i) * 2) + 1];\n\n bufFloat[bufPos + 8] = travel;\n bufFloat[bufPos + 9] = (16 * fullJoint) + i;\n bufFloat[bufPos + 10] = lineStyle;\n bufUint[bufPos + 11] = color;\n bufPos += strideFloats;\n }\n\n indices[indPos] = index;\n indices[indPos + 1] = index + 1;\n indices[indPos + 2] = index + 2;\n indPos += 3;\n index += 3;\n continue;\n }\n\n const vs = SegmentPacker.vertsByJoint[joint] + SegmentPacker.vertsByJoint[prevCap];\n\n if (vs === 0)\n {\n continue;\n }\n x1 = verts[j * 2];\n y1 = verts[(j * 2) + 1];\n x2 = verts[(j * 2) + 2];\n y2 = verts[(j * 2) + 3];\n // TODO: caps here\n prevX = verts[(j * 2) - 2];\n prevY = verts[(j * 2) - 1];\n\n const dist = Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\n\n if (SegmentPacker.vertsByJoint[joint] === 0)\n {\n travel -= dist;\n }\n\n if ((joint & ~2) !== JOINT_TYPE.JOINT_CAP_BUTT)\n {\n nextX = verts[(j * 2) + 4];\n nextY = verts[(j * 2) + 5];\n }\n else\n {\n nextX = x1;\n nextY = y1;\n }\n // type = joint;\n\n for (let i = 0; i < vs; i++)\n {\n bufFloat[bufPos] = prevX;\n bufFloat[bufPos + 1] = prevY;\n bufFloat[bufPos + 2] = x1;\n bufFloat[bufPos + 3] = y1;\n bufFloat[bufPos + 4] = x2;\n bufFloat[bufPos + 5] = y2;\n bufFloat[bufPos + 6] = nextX;\n bufFloat[bufPos + 7] = nextY;\n bufFloat[bufPos + 8] = travel;\n bufFloat[bufPos + 9] = (16 * fullJoint) + i;\n bufFloat[bufPos + 10] = lineStyle;\n bufUint[bufPos + 11] = color;\n bufPos += strideFloats;\n }\n\n travel += dist;\n\n indices[indPos] = index;\n indices[indPos + 1] = index + 1;\n indices[indPos + 2] = index + 2;\n indices[indPos + 3] = index;\n indices[indPos + 4] = index + 2;\n indices[indPos + 5] = index + 3;\n indPos += 6;\n for (let j = 5; j + 1 < vs; j++)\n {\n indices[indPos] = index + 4;\n indices[indPos + 1] = index + j;\n indices[indPos + 2] = index + j + 1;\n indPos += 3;\n }\n index += vs;\n }\n\n if (hasTriangle)\n {\n for (let i = 0; i < triangles.length; i++)\n {\n indices[indPos + i] = triangles[i] + index;\n }\n indPos += triangles.length;\n }\n\n this.bufferPos = bufPos;\n this.indexPos = indPos;\n }\n}\n\nconst verts = SegmentPacker.vertsByJoint;\n\nfor (let i = 0; i < 256; i++)\n{ verts.push(0); }\n// simple fill\nverts[JOINT_TYPE.FILL] = 1;\n\nfor (let i = 0; i < 8; i++)\n{\n verts[JOINT_TYPE.FILL_EXPAND + i] = 3;\n}\n\n// no caps for now\nverts[JOINT_TYPE.JOINT_BEVEL] = 4 + 5;\nverts[JOINT_TYPE.JOINT_BEVEL + 1] = 4 + 5;\nverts[JOINT_TYPE.JOINT_BEVEL + 2] = 4 + 5;\nverts[JOINT_TYPE.JOINT_BEVEL + 3] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND + 1] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND + 2] = 4 + 5;\nverts[JOINT_TYPE.JOINT_ROUND + 3] = 4 + 5;\nverts[JOINT_TYPE.JOINT_MITER] = 4 + 5;\nverts[JOINT_TYPE.JOINT_MITER + 1] = 4 + 5;\nverts[JOINT_TYPE.JOINT_MITER + 2] = 4;\nverts[JOINT_TYPE.JOINT_MITER + 3] = 4;\nverts[JOINT_TYPE.JOINT_CAP_BUTT] = 4;\nverts[JOINT_TYPE.JOINT_CAP_BUTT + 1] = 4;\nverts[JOINT_TYPE.JOINT_CAP_SQUARE] = 4;\nverts[JOINT_TYPE.JOINT_CAP_SQUARE + 1] = 4;\nverts[JOINT_TYPE.JOINT_CAP_ROUND] = 4 + 5;\nverts[JOINT_TYPE.JOINT_CAP_ROUND + 1] = 4 + 5;\n\nverts[JOINT_TYPE.CAP_ROUND] = 4;\n","import { LINE_CAP, LINE_JOIN } from '@pixi/graphics';\nimport { JOINT_TYPE } from './const';\nimport { FillStyle } from './FillStyle';\nimport { LineStyle } from './LineStyle';\n\nimport type { IShape, Matrix, SHAPES } from '@pixi/core';\n\n/**\n * A class to contain data useful for Graphics objects\n *\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphicsData\n{\n shape: IShape;\n lineStyle: LineStyle;\n fillStyle: FillStyle;\n matrix: Matrix;\n type: SHAPES;\n holes: Array;\n\n // result of simplification\n closeStroke: boolean;\n points: number[];\n triangles: number[];\n // indices in build\n attribStart: number;\n fillStart: number;\n fillLen: number;\n strokeStart: number;\n strokeLen: number;\n fillAA: boolean;\n\n constructor(shape: IShape, fillStyle: FillStyle = null, lineStyle: LineStyle = null, matrix: Matrix = null)\n {\n this.shape = shape;\n\n this.lineStyle = lineStyle;\n\n this.fillStyle = fillStyle;\n\n this.matrix = matrix;\n\n this.type = shape.type;\n\n this.points = [];\n\n this.holes = [];\n\n this.triangles = [];\n\n this.closeStroke = false;\n\n this.clearBuild();\n }\n\n public clearPath()\n {\n this.points.length = 0;\n this.closeStroke = true;\n }\n\n public clearBuild()\n {\n this.triangles.length = 0;\n this.fillStart = 0;\n this.fillLen = 0;\n this.strokeStart = 0;\n this.strokeLen = 0;\n this.fillAA = false;\n }\n\n public clone(): SmoothGraphicsData\n {\n return new SmoothGraphicsData(\n this.shape,\n this.fillStyle,\n this.lineStyle,\n this.matrix\n );\n }\n\n public capType()\n {\n let cap: number;\n\n switch (this.lineStyle.cap)\n {\n case LINE_CAP.SQUARE:\n cap = JOINT_TYPE.CAP_SQUARE;\n break;\n case LINE_CAP.ROUND:\n cap = JOINT_TYPE.CAP_ROUND;\n break;\n default:\n cap = JOINT_TYPE.CAP_BUTT;\n break;\n }\n\n return cap;\n }\n\n public goodJointType()\n {\n let joint: number;\n\n switch (this.lineStyle.join)\n {\n case LINE_JOIN.BEVEL:\n joint = JOINT_TYPE.JOINT_BEVEL;\n break;\n case LINE_JOIN.ROUND:\n joint = JOINT_TYPE.JOINT_ROUND;\n break;\n default:\n joint = JOINT_TYPE.JOINT_MITER + 3;\n break;\n }\n\n return joint;\n }\n\n public jointType()\n {\n let joint: number;\n\n switch (this.lineStyle.join)\n {\n case LINE_JOIN.BEVEL:\n joint = JOINT_TYPE.JOINT_BEVEL;\n break;\n case LINE_JOIN.ROUND:\n joint = JOINT_TYPE.JOINT_ROUND;\n break;\n default:\n joint = JOINT_TYPE.JOINT_MITER;\n break;\n }\n\n return joint;\n }\n\n public destroy(): void\n {\n this.shape = null;\n this.holes.length = 0;\n this.holes = null;\n this.points.length = 0;\n this.points = null;\n this.lineStyle = null;\n this.fillStyle = null;\n this.triangles = null;\n }\n}\n","import { Program, Shader } from '@pixi/core';\nimport { IGraphicsBatchSettings } from './core/BatchDrawCall';\n\nconst smoothVert = `#version 100\nprecision highp float;\nconst float FILL = 1.0;\nconst float BEVEL = 4.0;\nconst float MITER = 8.0;\nconst float ROUND = 12.0;\nconst float JOINT_CAP_BUTT = 16.0;\nconst float JOINT_CAP_SQUARE = 18.0;\nconst float JOINT_CAP_ROUND = 20.0;\n\nconst float FILL_EXPAND = 24.0;\n\nconst float CAP_BUTT = 1.0;\nconst float CAP_SQUARE = 2.0;\nconst float CAP_ROUND = 3.0;\nconst float CAP_BUTT2 = 4.0;\n\nconst float MITER_LIMIT = 10.0;\n\n// === geom ===\nattribute vec2 aPrev;\nattribute vec2 aPoint1;\nattribute vec2 aPoint2;\nattribute vec2 aNext;\nattribute float aVertexJoint;\nattribute float aTravel;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec4 vLine1;\nvarying vec4 vLine2;\nvarying vec4 vArc;\nvarying float vType;\n\nuniform float resolution;\nuniform float expand;\n\n// === style ===\nattribute float aStyleId;\nattribute vec4 aColor;\n\nvarying float vTextureId;\nvarying vec4 vColor;\nvarying vec2 vTextureCoord;\nvarying vec2 vTravel;\n\nuniform vec2 styleLine[%MAX_STYLES%];\nuniform vec3 styleMatrix[2 * %MAX_STYLES%];\nuniform float styleTextureId[%MAX_STYLES%];\nuniform vec2 samplerSize[%MAX_TEXTURES%];\n\nvec2 doBisect(vec2 norm, float len, vec2 norm2, float len2,\n float dy, float inner) {\n vec2 bisect = (norm + norm2) / 2.0;\n bisect /= dot(norm, bisect);\n vec2 shift = dy * bisect;\n if (inner > 0.5) {\n if (len < len2) {\n if (abs(dy * (bisect.x * norm.y - bisect.y * norm.x)) > len) {\n return dy * norm;\n }\n } else {\n if (abs(dy * (bisect.x * norm2.y - bisect.y * norm2.x)) > len2) {\n return dy * norm;\n }\n }\n }\n return dy * bisect;\n}\n\nvoid main(void){\n vec2 pointA = (translationMatrix * vec3(aPoint1, 1.0)).xy;\n vec2 pointB = (translationMatrix * vec3(aPoint2, 1.0)).xy;\n\n vec2 xBasis = pointB - pointA;\n float len = length(xBasis);\n vec2 forward = xBasis / len;\n vec2 norm = vec2(forward.y, -forward.x);\n\n float type = floor(aVertexJoint / 16.0);\n float vertexNum = aVertexJoint - type * 16.0;\n float dx = 0.0, dy = 1.0;\n\n float capType = floor(type / 32.0);\n type -= capType * 32.0;\n\n int styleId = int(aStyleId + 0.5);\n float lineWidth = styleLine[styleId].x;\n vTextureId = floor(styleTextureId[styleId] / 4.0);\n float scaleMode = styleTextureId[styleId] - vTextureId * 4.0;\n float avgScale = 1.0;\n if (scaleMode > 2.5) {\n avgScale = length(translationMatrix * vec3(1.0, 0.0, 0.0));\n } else if (scaleMode > 1.5) {\n avgScale = length(translationMatrix * vec3(0.0, 1.0, 0.0));\n } else if (scaleMode > 0.5) {\n vec2 avgDiag = (translationMatrix * vec3(1.0, 1.0, 0.0)).xy;\n avgScale = sqrt(dot(avgDiag, avgDiag) * 0.5);\n }\n lineWidth *= 0.5 * avgScale;\n float lineAlignment = 2.0 * styleLine[styleId].y - 1.0;\n vTextureCoord = vec2(0.0);\n\n vec2 pos;\n\n if (capType == CAP_ROUND) {\n vertexNum += 4.0;\n type = JOINT_CAP_ROUND;\n capType = 0.0;\n lineAlignment = -lineAlignment;\n }\n\n vLine1 = vec4(0.0, 10.0, 1.0, 0.0);\n vLine2 = vec4(0.0, 10.0, 1.0, 0.0);\n vArc = vec4(0.0);\n if (type == FILL) {\n pos = pointA;\n vType = 0.0;\n vLine2 = vec4(-2.0, -2.0, -2.0, 0.0);\n vec2 vTexturePixel;\n vTexturePixel.x = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2]);\n vTexturePixel.y = dot(vec3(aPoint1, 1.0), styleMatrix[styleId * 2 + 1]);\n vTextureCoord = vTexturePixel / samplerSize[int(vTextureId)];\n } else if (type >= FILL_EXPAND && type < FILL_EXPAND + 7.5) {\n // expand vertices\n float flags = type - FILL_EXPAND;\n float flag3 = floor(flags / 4.0);\n float flag2 = floor((flags - flag3 * 4.0) / 2.0);\n float flag1 = flags - flag3 * 4.0 - flag2 * 2.0;\n\n vec2 prev = (translationMatrix * vec3(aPrev, 1.0)).xy;\n\n if (vertexNum < 0.5) {\n pos = prev;\n } else if (vertexNum < 1.5) {\n pos = pointA;\n } else {\n pos = pointB;\n }\n float len2 = length(aNext);\n vec2 bisect = (translationMatrix * vec3(aNext, 0.0)).xy;\n if (len2 > 0.01) {\n bisect = normalize(bisect) * len2;\n }\n\n vec2 n1 = normalize(vec2(pointA.y - prev.y, -(pointA.x - prev.x)));\n vec2 n2 = normalize(vec2(pointB.y - pointA.y, -(pointB.x - pointA.x)));\n vec2 n3 = normalize(vec2(prev.y - pointB.y, -(prev.x - pointB.x)));\n\n if (n1.x * n2.y - n1.y * n2.x < 0.0) {\n n1 = -n1;\n n2 = -n2;\n n3 = -n3;\n }\n pos += bisect * expand;\n\n vLine1 = vec4(16.0, 16.0, 16.0, -1.0);\n if (flag1 > 0.5) {\n vLine1.x = -dot(pos - prev, n1);\n }\n if (flag2 > 0.5) {\n vLine1.y = -dot(pos - pointA, n2);\n }\n if (flag3 > 0.5) {\n vLine1.z = -dot(pos - pointB, n3);\n }\n vLine1.xyz *= resolution;\n vType = 2.0;\n } else if (type >= BEVEL) {\n float dy = lineWidth + expand;\n float shift = lineWidth * lineAlignment;\n float inner = 0.0;\n if (vertexNum >= 1.5) {\n dy = -dy;\n inner = 1.0;\n }\n\n vec2 base, next, xBasis2, bisect;\n float flag = 0.0;\n float side2 = 1.0;\n if (vertexNum < 0.5 || vertexNum > 2.5 && vertexNum < 3.5) {\n next = (translationMatrix * vec3(aPrev, 1.0)).xy;\n base = pointA;\n flag = type - floor(type / 2.0) * 2.0;\n side2 = -1.0;\n } else {\n next = (translationMatrix * vec3(aNext, 1.0)).xy;\n base = pointB;\n if (type >= MITER && type < MITER + 3.5) {\n flag = step(MITER + 1.5, type);\n // check miter limit here?\n }\n }\n xBasis2 = next - base;\n float len2 = length(xBasis2);\n vec2 norm2 = vec2(xBasis2.y, -xBasis2.x) / len2;\n float D = norm.x * norm2.y - norm.y * norm2.x;\n if (D < 0.0) {\n inner = 1.0 - inner;\n }\n\n norm2 *= side2;\n\n float collinear = step(0.0, dot(norm, norm2));\n\n vType = 0.0;\n float dy2 = -1000.0;\n\n if (abs(D) < 0.01 && collinear < 0.5) {\n if (type >= ROUND && type < ROUND + 1.5) {\n type = JOINT_CAP_ROUND;\n }\n //TODO: BUTT here too\n }\n\n vLine1 = vec4(0.0, lineWidth, max(abs(norm.x), abs(norm.y)), min(abs(norm.x), abs(norm.y)));\n vLine2 = vec4(0.0, lineWidth, max(abs(norm2.x), abs(norm2.y)), min(abs(norm2.x), abs(norm2.y)));\n\n if (vertexNum < 3.5) {\n if (abs(D) < 0.01 && collinear < 0.5) {\n pos = (shift + dy) * norm;\n } else {\n if (flag < 0.5 && inner < 0.5) {\n pos = (shift + dy) * norm;\n } else {\n pos = doBisect(norm, len, norm2, len2, shift + dy, inner);\n }\n }\n vLine2.y = -1000.0;\n if (capType >= CAP_BUTT && capType < CAP_ROUND) {\n float extra = step(CAP_SQUARE, capType) * lineWidth;\n vec2 back = -forward;\n if (vertexNum < 0.5 || vertexNum > 2.5) {\n pos += back * (expand + extra);\n dy2 = expand;\n } else {\n dy2 = dot(pos + base - pointA, back) - extra;\n }\n }\n if (type >= JOINT_CAP_BUTT && type < JOINT_CAP_SQUARE + 0.5) {\n float extra = step(JOINT_CAP_SQUARE, type) * lineWidth;\n if (vertexNum < 0.5 || vertexNum > 2.5) {\n vLine2.y = dot(pos + base - pointB, forward) - extra;\n } else {\n pos += forward * (expand + extra);\n vLine2.y = expand;\n if (capType >= CAP_BUTT) {\n dy2 -= expand + extra;\n }\n }\n }\n } else if (type >= JOINT_CAP_ROUND && type < JOINT_CAP_ROUND + 1.5) {\n base += shift * norm;\n if (inner > 0.5) {\n dy = -dy;\n inner = 0.0;\n }\n vec2 d2 = abs(dy) * forward;\n if (vertexNum < 4.5) {\n dy = -dy;\n pos = dy * norm;\n } else if (vertexNum < 5.5) {\n pos = dy * norm;\n } else if (vertexNum < 6.5) {\n pos = dy * norm + d2;\n vArc.x = abs(dy);\n } else {\n dy = -dy;\n pos = dy * norm + d2;\n vArc.x = abs(dy);\n }\n vLine2 = vec4(0.0, lineWidth * 2.0 + 10.0, 1.0 , 0.0); // forget about line2 with type=3\n vArc.y = dy;\n vArc.z = 0.0;\n vArc.w = lineWidth;\n vType = 3.0;\n } else if (abs(D) < 0.01 && collinear < 0.5) {\n pos = dy * norm;\n } else {\n if (inner > 0.5) {\n dy = -dy;\n inner = 0.0;\n }\n float side = sign(dy);\n vec2 norm3 = normalize(norm + norm2);\n\n if (type >= MITER && type < MITER + 3.5) {\n vec2 farVertex = doBisect(norm, len, norm2, len2, shift + dy, 0.0);\n if (length(farVertex) > abs(shift + dy) * MITER_LIMIT) {\n type = BEVEL;\n }\n }\n\n if (vertexNum < 4.5) {\n pos = doBisect(norm, len, norm2, len2, shift - dy, 1.0);\n } else if (vertexNum < 5.5) {\n pos = (shift + dy) * norm;\n } else if (vertexNum > 7.5) {\n pos = (shift + dy) * norm2;\n } else {\n if (type >= ROUND && type < ROUND + 1.5) {\n pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0);\n float d2 = abs(shift + dy);\n if (length(pos) > abs(shift + dy) * 1.5) {\n if (vertexNum < 6.5) {\n pos.x = (shift + dy) * norm.x - d2 * norm.y;\n pos.y = (shift + dy) * norm.y + d2 * norm.x;\n } else {\n pos.x = (shift + dy) * norm2.x + d2 * norm2.y;\n pos.y = (shift + dy) * norm2.y - d2 * norm2.x;\n }\n }\n } else if (type >= MITER && type < MITER + 3.5) {\n pos = doBisect(norm, len, norm2, len2, shift + dy, 0.0); //farVertex\n } else if (type >= BEVEL && type < BEVEL + 1.5) {\n float d2 = side / resolution;\n if (vertexNum < 6.5) {\n pos = (shift + dy) * norm + d2 * norm3;\n } else {\n pos = (shift + dy) * norm2 + d2 * norm3;\n }\n }\n }\n\n if (type >= ROUND && type < ROUND + 1.5) {\n vArc.x = side * dot(pos, norm3);\n vArc.y = pos.x * norm3.y - pos.y * norm3.x;\n vArc.z = dot(norm, norm3) * (lineWidth + side * shift);\n vArc.w = lineWidth + side * shift;\n vType = 3.0;\n } else if (type >= MITER && type < MITER + 3.5) {\n vType = 1.0;\n } else if (type >= BEVEL && type < BEVEL + 1.5) {\n vType = 4.0;\n vArc.z = dot(norm, norm3) * (lineWidth + side * shift) - side * dot(pos, norm3);\n }\n\n dy = side * (dot(pos, norm) - shift);\n dy2 = side * (dot(pos, norm2) - shift);\n }\n\n pos += base;\n vLine1.xy = vec2(dy, vLine1.y) * resolution;\n vLine2.xy = vec2(dy2, vLine2.y) * resolution;\n vArc = vArc * resolution;\n vTravel = vec2(aTravel * avgScale + dot(pos - pointA, vec2(-norm.y, norm.x)), avgScale);\n }\n\n gl_Position = vec4((projectionMatrix * vec3(pos, 1.0)).xy, 0.0, 1.0);\n\n vColor = aColor * tint;\n}`;\n\nconst precision = `#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n#else\n precision mediump float;\n#endif\n`;\n\nconst smoothFrag = `%PRECISION%\nvarying vec4 vColor;\nvarying vec4 vLine1;\nvarying vec4 vLine2;\nvarying vec4 vArc;\nvarying float vType;\nvarying float vTextureId;\nvarying vec2 vTextureCoord;\nvarying vec2 vTravel;\nuniform sampler2D uSamplers[%MAX_TEXTURES%];\n\n%PIXEL_LINE%\n\nvoid main(void){\n %PIXEL_COVERAGE%\n\n vec4 texColor;\n float textureId = floor(vTextureId+0.5);\n %FOR_LOOP%\n\n gl_FragColor = vColor * texColor * alpha;\n}\n`;\n\nconst pixelLineFunc = [`\nfloat pixelLine(float x, float A, float B) {\n return clamp(x + 0.5, 0.0, 1.0);\n}\n`, `\nfloat pixelLine(float x, float A, float B) {\n float y = abs(x), s = sign(x);\n if (y * 2.0 < A - B) {\n return 0.5 + s * y / A;\n }\n y -= (A - B) * 0.5;\n y = max(1.0 - y / B, 0.0);\n return (1.0 + s * (1.0 - y * y)) * 0.5;\n //return clamp(x + 0.5, 0.0, 1.0);\n}\n`];\n\nconst pixelCoverage = `float alpha = 1.0;\nif (vType < 0.5) {\n float left = pixelLine(-vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float right = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float near = vLine2.x - 0.5;\n float far = min(vLine2.x + 0.5, 0.0);\n float top = vLine2.y - 0.5;\n float bottom = min(vLine2.y + 0.5, 0.0);\n alpha = (right - left) * max(bottom - top, 0.0) * max(far - near, 0.0);\n} else if (vType < 1.5) {\n float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n alpha = a2 * b2 - a1 * b1;\n} else if (vType < 2.5) {\n alpha *= max(min(vLine1.x + 0.5, 1.0), 0.0);\n alpha *= max(min(vLine1.y + 0.5, 1.0), 0.0);\n alpha *= max(min(vLine1.z + 0.5, 1.0), 0.0);\n} else if (vType < 3.5) {\n float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float alpha_miter = a2 * b2 - a1 * b1;\n float alpha_plane = clamp(vArc.z - vArc.x + 0.5, 0.0, 1.0);\n float d = length(vArc.xy);\n float circle_hor = max(min(vArc.w, d + 0.5) - max(-vArc.w, d - 0.5), 0.0);\n float circle_vert = min(vArc.w * 2.0, 1.0);\n float alpha_circle = circle_hor * circle_vert;\n alpha = min(alpha_miter, max(alpha_circle, alpha_plane));\n} else {\n float a1 = pixelLine(- vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float a2 = pixelLine(vLine1.y - vLine1.x, vLine1.z, vLine1.w);\n float b1 = pixelLine(- vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n float b2 = pixelLine(vLine2.y - vLine2.x, vLine2.z, vLine2.w);\n alpha = a2 * b2 - a1 * b1;\n alpha *= clamp(vArc.z + 0.5, 0.0, 1.0);\n}\n`;\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphicsShader extends Shader\n{\n settings: IGraphicsBatchSettings;\n\n constructor(settings: IGraphicsBatchSettings,\n vert = smoothVert,\n frag = smoothFrag,\n uniforms = {})\n {\n vert = SmoothGraphicsShader.generateVertexSrc(settings, vert);\n frag = SmoothGraphicsShader.generateFragmentSrc(settings, frag);\n\n const { maxStyles, maxTextures } = settings;\n const sampleValues = new Int32Array(maxTextures);\n\n for (let i = 0; i < maxTextures; i++)\n {\n sampleValues[i] = i;\n }\n super(Program.from(vert, frag), (Object as any).assign(uniforms, {\n styleMatrix: new Float32Array(6 * maxStyles),\n styleTextureId: new Float32Array(maxStyles),\n styleLine: new Float32Array(2 * maxStyles),\n samplerSize: new Float32Array(2 * maxTextures),\n uSamplers: sampleValues,\n tint: new Float32Array([1, 1, 1, 1]),\n resolution: 1,\n expand: 1,\n }));\n this.settings = settings;\n }\n\n static generateVertexSrc(settings: IGraphicsBatchSettings, vertexSrc = smoothVert): string\n {\n const { maxStyles, maxTextures } = settings;\n\n vertexSrc = vertexSrc.replace(/%MAX_TEXTURES%/gi, `${maxTextures}`)\n .replace(/%MAX_STYLES%/gi, `${maxStyles}`);\n\n return vertexSrc;\n }\n\n static generateFragmentSrc(settings: IGraphicsBatchSettings, fragmentSrc = smoothFrag): string\n {\n const { maxTextures, pixelLine } = settings;\n\n fragmentSrc = fragmentSrc.replace(/%PRECISION%/gi, precision)\n .replace(/%PIXEL_LINE%/gi, pixelLineFunc[pixelLine])\n .replace(/%PIXEL_COVERAGE%/gi, pixelCoverage)\n .replace(/%MAX_TEXTURES%/gi, `${maxTextures}`)\n .replace(/%FOR_LOOP%/gi, this.generateSampleSrc(maxTextures));\n\n return fragmentSrc;\n }\n\n static generateSampleSrc(maxTextures: number): string\n {\n let src = '';\n\n src += '\\n';\n src += '\\n';\n\n for (let i = 0; i < maxTextures; i++)\n {\n if (i > 0)\n {\n src += '\\nelse ';\n }\n\n if (i < maxTextures - 1)\n {\n src += `if(textureId < ${i}.5)`;\n }\n\n src += '\\n{';\n src += `\\n\\ttexColor = texture2D(uSamplers[${i}], vTextureCoord);`;\n src += '\\n}';\n }\n\n src += '\\n';\n src += '\\n';\n\n return src;\n }\n}\n","import { SmoothGraphicsShader } from './SmoothShader';\n\nconst dashFrag = `%PRECISION%\nvarying vec4 vColor;\nvarying vec4 vLine1;\nvarying vec4 vLine2;\nvarying vec4 vArc;\nvarying float vType;\nvarying float vTextureId;\nvarying vec2 vTextureCoord;\nvarying vec2 vTravel;\nuniform sampler2D uSamplers[%MAX_TEXTURES%];\nuniform float dash;\nuniform float gap;\n\n%PIXEL_LINE%\n\nvoid main(void){\n %PIXEL_COVERAGE%\n\n float d = dash * vTravel.y;\n if (d > 0.0) {\n float g = gap * vTravel.y;\n if (g > 0.0) {\n float t = mod(vTravel.x, d + g);\n alpha *= mix(\n min(0.5 * d + 0.5 - abs(t - 0.5 * d), 1.0),\n max(abs(t - 0.5 * g - d) - 0.5 * g + 0.5, 0.0),\n step(d, t)\n );\n }\n } else {\n alpha = 0.0;\n }\n\n vec4 texColor;\n float textureId = floor(vTextureId+0.5);\n %FOR_LOOP%\n\n gl_FragColor = vColor * texColor * alpha;\n}\n`;\n\n/**\n * @memberof PIXI.smooth\n */\nexport interface IDashParams\n{\n dash: number;\n gap: number;\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class DashLineShader extends SmoothGraphicsShader\n{\n constructor(dashParams?: IDashParams)\n {\n const settings = { maxStyles: 16, maxTextures: 1, pixelLine: 1 };\n\n super(settings, undefined, dashFrag,\n dashParams || {\n dash: 8.0,\n gap: 5.0\n });\n }\n}\n","import { LINE_SCALE_MODE } from './core/LineStyle';\n\nexport interface ISettings\n{\n LINE_SCALE_MODE: string;\n SHADER_MAX_STYLES: number;\n SHADER_MAX_TEXTURES: number;\n PIXEL_LINE: number;\n}\n\nexport const settings: ISettings = {\n LINE_SCALE_MODE: LINE_SCALE_MODE.NORMAL,\n SHADER_MAX_STYLES: 24,\n SHADER_MAX_TEXTURES: 4,\n PIXEL_LINE: 0,\n};\n","// for type only\nimport { SHAPES } from '@pixi/core';\nimport { BuildData } from '../core/BuildData';\nimport { JOINT_TYPE } from '../core/const';\nimport { SmoothGraphicsData } from '../core/SmoothGraphicsData';\n\nimport type { Circle, Ellipse, RoundedRectangle } from '@pixi/core';\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class CircleBuilder implements IShapeBuilder\n{\n path(graphicsData: SmoothGraphicsData, _target: BuildData)\n {\n // need to convert points to a nice regular data\n const points = graphicsData.points;\n\n let x;\n let y;\n let dx;\n let dy;\n let rx;\n let ry;\n\n if (graphicsData.type === SHAPES.CIRC)\n {\n const circle = graphicsData.shape as Circle;\n\n x = circle.x;\n y = circle.y;\n rx = ry = circle.radius;\n dx = dy = 0;\n }\n else if (graphicsData.type === SHAPES.ELIP)\n {\n const ellipse = graphicsData.shape as Ellipse;\n\n x = ellipse.x;\n y = ellipse.y;\n rx = ellipse.width;\n ry = ellipse.height;\n dx = dy = 0;\n }\n else\n {\n const roundedRect = graphicsData.shape as RoundedRectangle;\n const halfWidth = roundedRect.width / 2;\n const halfHeight = roundedRect.height / 2;\n\n x = roundedRect.x + halfWidth;\n y = roundedRect.y + halfHeight;\n rx = ry = Math.max(0, Math.min(roundedRect.radius, Math.min(halfWidth, halfHeight)));\n dx = halfWidth - rx;\n dy = halfHeight - ry;\n }\n\n if (!(rx >= 0 && ry >= 0 && dx >= 0 && dy >= 0))\n {\n points.length = 0;\n\n return;\n }\n\n // Choose a number of segments such that the maximum absolute deviation from the circle is approximately 0.029\n const n = Math.ceil(2.3 * Math.sqrt(rx + ry));\n const m = (n * 8) + (dx ? 4 : 0) + (dy ? 4 : 0);\n\n points.length = m;\n\n if (m === 0)\n {\n return;\n }\n\n if (n === 0)\n {\n points.length = 8;\n points[0] = points[6] = x + dx;\n points[1] = points[3] = y + dy;\n points[2] = points[4] = x - dx;\n points[5] = points[7] = y - dy;\n\n return;\n }\n\n let j1 = 0;\n let j2 = (n * 4) + (dx ? 2 : 0) + 2;\n let j3 = j2;\n let j4 = m;\n\n {\n const x0 = dx + rx;\n const y0 = dy;\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n\n if (dy)\n {\n const y2 = y - y0;\n\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n }\n\n for (let i = 1; i < n; i++)\n {\n const a = Math.PI / 2 * (i / n);\n const x0 = dx + (Math.cos(a) * rx);\n const y0 = dy + (Math.sin(a) * ry);\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j2] = y1;\n points[--j2] = x2;\n points[j3++] = x2;\n points[j3++] = y2;\n points[--j4] = y2;\n points[--j4] = x1;\n }\n\n {\n const x0 = dx;\n const y0 = dy + ry;\n const x1 = x + x0;\n const x2 = x - x0;\n const y1 = y + y0;\n const y2 = y - y0;\n\n points[j1++] = x1;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x1;\n\n if (dx)\n {\n points[j1++] = x2;\n points[j1++] = y1;\n points[--j4] = y2;\n points[--j4] = x2;\n }\n }\n }\n\n fill(graphicsData: SmoothGraphicsData, target: BuildData)\n {\n const { verts, joints } = target;\n const { points, triangles } = graphicsData;\n\n if (points.length === 0)\n {\n return;\n }\n\n let x;\n let y;\n\n if (graphicsData.type !== SHAPES.RREC)\n {\n const circle = graphicsData.shape as Circle;\n\n x = circle.x;\n y = circle.y;\n }\n else\n {\n const roundedRect = graphicsData.shape as RoundedRectangle;\n\n x = roundedRect.x + (roundedRect.width / 2);\n y = roundedRect.y + (roundedRect.height / 2);\n }\n\n const matrix = graphicsData.matrix;\n const cx = matrix ? (matrix.a * x) + (matrix.c * y) + matrix.tx : x;\n const cy = matrix ? (matrix.b * x) + (matrix.d * y) + matrix.ty : y;\n\n let vertPos = 1;\n const center = 0;\n\n if (!graphicsData.fillAA)\n {\n verts.push(cx, cy);\n joints.push(JOINT_TYPE.FILL);\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.FILL);\n\n for (let i = 2; i < points.length; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(JOINT_TYPE.FILL);\n\n triangles.push(vertPos++, center, vertPos);\n }\n\n triangles.push(center + 1, center, vertPos);\n\n return;\n }\n\n const len = points.length;\n\n let x1 = points[len - 2];\n let y1 = points[len - 1];\n\n let nx1 = y1 - points[len - 3];\n let ny1 = points[len - 4] - x1;\n const n1 = Math.sqrt((nx1 * nx1) + (ny1 * ny1));\n\n nx1 /= n1;\n ny1 /= n1;\n\n let bx1;\n let by1;\n\n for (let i = 0; i < len; i += 2)\n {\n const x2 = points[i];\n const y2 = points[i + 1];\n\n let nx2 = y2 - y1;\n let ny2 = x1 - x2;\n const n2 = Math.sqrt((nx2 * nx2) + (ny2 * ny2));\n\n nx2 /= n2;\n ny2 /= n2;\n\n let bx2 = nx1 + nx2;\n let by2 = ny1 + ny2;\n const b2 = (nx2 * bx2) + (ny2 * by2);\n\n bx2 /= b2;\n by2 /= b2;\n\n if (i > 0)\n {\n verts.push(bx2);\n verts.push(by2);\n }\n else\n {\n bx1 = bx2;\n by1 = by2;\n }\n\n verts.push(cx);\n verts.push(cy);\n verts.push(x1);\n verts.push(y1);\n verts.push(x2);\n verts.push(y2);\n\n verts.push(0);\n verts.push(0);\n verts.push(bx2);\n verts.push(by2);\n\n joints.push(JOINT_TYPE.FILL_EXPAND + 2);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n\n x1 = x2;\n y1 = y2;\n nx1 = nx2;\n ny1 = ny2;\n }\n\n verts.push(bx1);\n verts.push(by1);\n }\n\n line(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n const { verts, joints } = target;\n const { points } = graphicsData;\n const joint = points.length === 8 // we dont need joints for arcs\n ? graphicsData.goodJointType() : JOINT_TYPE.JOINT_MITER + 3;\n const len = points.length;\n\n if (len === 0)\n {\n return;\n }\n\n verts.push(points[len - 2], points[len - 1]);\n joints.push(JOINT_TYPE.NONE);\n for (let i = 0; i < len; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(joint);\n }\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n verts.push(points[2], points[3]);\n joints.push(JOINT_TYPE.NONE);\n }\n}\n","import { Point, Polygon, utils } from '@pixi/core';\nimport { BuildData } from '../core/BuildData';\nimport { JOINT_TYPE } from '../core/const';\nimport { SmoothGraphicsData } from '../core/SmoothGraphicsData';\n\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\n\nconst tempArr: Array = [];\n\nfunction fixOrientation(points: number[], hole = false)\n{\n const m = points.length;\n\n if (m < 6)\n {\n return;\n }\n\n let area = 0;\n\n for (let i = 0, x1 = points[m - 2], y1 = points[m - 1]; i < m; i += 2)\n {\n const x2 = points[i];\n const y2 = points[i + 1];\n\n area += (x2 - x1) * (y2 + y1);\n\n x1 = x2;\n y1 = y2;\n }\n\n if ((!hole && area > 0) || (hole && area <= 0))\n {\n const n = m / 2;\n\n for (let i = n + (n % 2); i < m; i += 2)\n {\n const i1 = m - i - 2;\n const i2 = m - i - 1;\n const i3 = i;\n const i4 = i + 1;\n\n [points[i1], points[i3]] = [points[i3], points[i1]];\n [points[i2], points[i4]] = [points[i4], points[i2]];\n }\n }\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class PolyBuilder implements IShapeBuilder\n{\n path(graphicsData: SmoothGraphicsData, buildData: BuildData)\n {\n const shape = graphicsData.shape as Polygon;\n const points = graphicsData.points = shape.points.slice();\n const eps = buildData.closePointEps;\n const eps2 = eps * eps;\n\n if (points.length === 0)\n {\n return;\n }\n\n const firstPoint = new Point(points[0], points[1]);\n const lastPoint = new Point(points[points.length - 2], points[points.length - 1]);\n const closedShape = graphicsData.closeStroke = shape.closeStroke;\n\n let len = points.length;\n let newLen = 2;\n\n // 1. remove equal points\n for (let i = 2; i < len; i += 2)\n {\n const x1 = points[i - 2];\n const y1 = points[i - 1];\n const x2 = points[i];\n const y2 = points[i + 1];\n let flag = true;\n\n if (Math.abs(x1 - x2) < eps\n && Math.abs(y1 - y2) < eps)\n {\n flag = false;\n }\n\n if (flag)\n {\n points[newLen] = points[i];\n points[newLen + 1] = points[i + 1];\n newLen += 2;\n }\n }\n points.length = len = newLen;\n\n newLen = 2;\n // 2. remove middle points\n for (let i = 2; i + 2 < len; i += 2)\n {\n let x1 = points[i - 2];\n let y1 = points[i - 1];\n const x2 = points[i];\n const y2 = points[i + 1];\n let x3 = points[i + 2];\n let y3 = points[i + 3];\n\n x1 -= x2;\n y1 -= y2;\n x3 -= x2;\n y3 -= y2;\n let flag = true;\n\n if (Math.abs((x3 * y1) - (y3 * x1)) < eps2)\n {\n if ((x1 * x3) + (y1 * y3) < -eps2)\n {\n flag = false;\n }\n }\n\n if (flag)\n {\n points[newLen] = points[i];\n points[newLen + 1] = points[i + 1];\n newLen += 2;\n }\n }\n points[newLen] = points[len - 2];\n points[newLen + 1] = points[len - 1];\n newLen += 2;\n\n points.length = len = newLen;\n\n if (len <= 2)\n {\n // suddenly, nothing\n return;\n }\n\n if (closedShape)\n {\n // first point should be last point in closed line!\n const closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps\n && Math.abs(firstPoint.y - lastPoint.y) < eps;\n\n if (closedPath)\n {\n points.pop();\n points.pop();\n }\n }\n }\n\n line(graphicsData: SmoothGraphicsData, buildData: BuildData)\n {\n const { closeStroke, points } = graphicsData;\n // const eps = buildData.closePointEps;\n // const eps2 = eps * eps;\n const len = points.length;\n // const style = graphicsData.lineStyle;\n\n if (len <= 2)\n {\n return;\n }\n const { verts, joints } = buildData;\n\n // TODO: alignment\n\n const joint = graphicsData.jointType();\n const cap = graphicsData.capType();\n let prevCap = 0;\n\n let prevX: number; let\n prevY: number;\n\n if (closeStroke)\n {\n prevX = points[len - 2];\n prevY = points[len - 1];\n joints.push(JOINT_TYPE.NONE);\n }\n else\n {\n prevX = points[2];\n prevY = points[3];\n if (cap === JOINT_TYPE.CAP_ROUND)\n {\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.CAP_ROUND);\n prevCap = 0;\n }\n else\n {\n prevCap = cap;\n joints.push(JOINT_TYPE.NONE);\n }\n }\n verts.push(prevX, prevY);\n\n /* Line segments of interest where (x1,y1) forms the corner. */\n for (let i = 0; i < len; i += 2)\n {\n const x1 = points[i]; const\n y1 = points[i + 1];\n\n // let x2: number; let\n // y2: number;\n\n // if (i + 2 < len)\n // {\n // x2 = points[i + 2];\n // y2 = points[i + 3];\n // }\n // else\n // {\n // x2 = points[0];\n // y2 = points[1];\n // }\n\n // const dx = x2 - x1;\n // const dy = y2 - y1;\n // let nextX: number; let\n // nextY: number;\n\n let endJoint = joint;\n\n if (i + 2 >= len)\n {\n // nextX = points[2];\n // nextY = points[3];\n if (!closeStroke)\n {\n endJoint = JOINT_TYPE.NONE;\n }\n }\n else if (i + 4 >= len)\n {\n // nextX = points[0];\n // nextY = points[1];\n if (!closeStroke)\n {\n if (cap === JOINT_TYPE.CAP_ROUND)\n {\n endJoint = JOINT_TYPE.JOINT_CAP_ROUND;\n }\n if (cap === JOINT_TYPE.CAP_BUTT)\n {\n endJoint = JOINT_TYPE.JOINT_CAP_BUTT;\n }\n if (cap === JOINT_TYPE.CAP_SQUARE)\n {\n endJoint = JOINT_TYPE.JOINT_CAP_SQUARE;\n }\n }\n }\n // else\n // {\n // nextX = points[i + 4];\n // nextY = points[i + 5];\n // }\n\n // const dx3 = x1 - prevX;\n // const dy3 = y1 - prevY;\n\n endJoint += prevCap;\n prevCap = 0;\n\n verts.push(x1, y1);\n joints.push(endJoint);\n\n prevX = x1;\n prevY = y1;\n }\n\n if (closeStroke)\n {\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n verts.push(points[2], points[3]);\n joints.push(JOINT_TYPE.NONE);\n }\n else\n {\n verts.push(points[len - 4], points[len - 3]);\n joints.push(JOINT_TYPE.NONE);\n }\n }\n\n fill(graphicsData: SmoothGraphicsData, buildData: BuildData)\n {\n let points = graphicsData.points;\n // TODO: simplify holes too!\n const holes = graphicsData.holes;\n const eps = buildData.closePointEps;\n\n const { verts, joints } = buildData;\n\n if (points.length < 6)\n {\n return;\n }\n const holeArray = [];\n let len = points.length;\n\n fixOrientation(points, false);\n\n // Process holes..\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n\n fixOrientation(hole.points, true);\n\n holeArray.push(points.length / 2);\n points = points.concat(hole.points);\n }\n\n // TODO: reduce size later?\n const pn = tempArr;\n\n if (pn.length < points.length)\n {\n pn.length = points.length;\n }\n let start = 0;\n\n for (let i = 0; i <= holeArray.length; i++)\n {\n let finish = len / 2;\n\n if (i > 0)\n {\n if (i < holeArray.length)\n {\n finish = holeArray[i];\n }\n else\n {\n finish = (points.length >> 1);\n }\n }\n pn[start * 2] = finish - 1;\n pn[((finish - 1) * 2) + 1] = start;\n for (let j = start; j + 1 < finish; j++)\n {\n pn[(j * 2) + 1] = j + 1;\n pn[(j * 2) + 2] = j;\n }\n start = finish;\n }\n\n // sort color\n graphicsData.triangles = utils.earcut(points, holeArray, 2);\n\n if (!graphicsData.triangles)\n {\n return;\n }\n\n if (!graphicsData.fillAA)\n {\n for (let i = 0; i < points.length; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(JOINT_TYPE.FILL);\n }\n\n return;\n }\n\n const { triangles } = graphicsData;\n\n len = points.length;\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n // TODO: holes prev/next!!!\n let flag = 0;\n\n for (let j = 0; j < 3; j++)\n {\n const ind1 = triangles[i + j];\n const ind2 = triangles[i + ((j + 1) % 3)];\n\n if (pn[ind1 * 2] === ind2 || pn[(ind1 * 2) + 1] === ind2)\n {\n flag |= (1 << j);\n }\n }\n joints.push(JOINT_TYPE.FILL_EXPAND + flag);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n joints.push(JOINT_TYPE.NONE);\n }\n\n // bisect, re-using pn\n for (let ind = 0; ind < len / 2; ind++)\n {\n const prev = pn[ind * 2];\n const next = pn[(ind * 2) + 1];\n let nx1 = (points[(next * 2) + 1] - points[(ind * 2) + 1]); let\n ny1 = -(points[next * 2] - points[ind * 2]);\n let nx2 = (points[(ind * 2) + 1] - points[(prev * 2) + 1]); let\n ny2 = -(points[ind * 2] - points[prev * 2]);\n const D1 = Math.sqrt((nx1 * nx1) + (ny1 * ny1));\n\n nx1 /= D1;\n ny1 /= D1;\n const D2 = Math.sqrt((nx2 * nx2) + (ny2 * ny2));\n\n nx2 /= D2;\n ny2 /= D2;\n\n let bx = (nx1 + nx2);\n let by = (ny1 + ny2);\n const D = (bx * nx1) + (by * ny1);\n\n if (Math.abs(D) < eps)\n {\n bx = nx1;\n by = ny1;\n }\n else\n {\n bx /= D;\n by /= D;\n }\n pn[ind * 2] = bx;\n pn[(ind * 2) + 1] = by;\n }\n\n for (let i = 0; i < triangles.length; i += 3)\n {\n const prev = triangles[i];\n const ind = triangles[i + 1];\n const next = triangles[i + 2];\n const nx1 = (points[(next * 2) + 1] - points[(ind * 2) + 1]); const\n ny1 = -(points[next * 2] - points[ind * 2]);\n const nx2 = (points[(ind * 2) + 1] - points[(prev * 2) + 1]); const\n ny2 = -(points[ind * 2] - points[prev * 2]);\n\n let j1 = 1;\n\n if ((nx1 * ny2) - (nx2 * ny1) > 0.0)\n {\n j1 = 2;\n }\n\n for (let j = 0; j < 3; j++)\n {\n const ind = triangles[i + ((j * j1) % 3)];\n\n verts.push(points[ind * 2], points[(ind * 2) + 1]);\n }\n for (let j = 0; j < 3; j++)\n {\n const ind = triangles[i + ((j * j1) % 3)];\n\n verts.push(pn[ind * 2], pn[(ind * 2) + 1]);\n }\n }\n }\n}\n","import { BuildData } from '../core/BuildData';\nimport { JOINT_TYPE } from '../core/const';\nimport { SmoothGraphicsData } from '../core/SmoothGraphicsData';\nimport { PolyBuilder } from './PolyBuilder';\n\nimport type { Rectangle } from '@pixi/core';\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class RectangleBuilder implements IShapeBuilder\n{\n _polyBuilder = new PolyBuilder();\n\n path(graphicsData: SmoothGraphicsData, _target: BuildData)\n {\n // --- //\n // need to convert points to a nice regular data\n //\n const rectData = graphicsData.shape as Rectangle;\n const x = rectData.x;\n const y = rectData.y;\n const width = rectData.width;\n const height = rectData.height;\n const points = graphicsData.points;\n\n points.length = 0;\n\n points.push(x, y,\n x + width, y,\n x + width, y + height,\n x, y + height);\n }\n\n line(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n const { verts, joints } = target;\n const { points } = graphicsData;\n\n const joint = graphicsData.goodJointType();\n const len = points.length;\n\n verts.push(points[len - 2], points[len - 1]);\n joints.push(JOINT_TYPE.NONE);\n for (let i = 0; i < len; i += 2)\n {\n verts.push(points[i], points[i + 1]);\n joints.push(joint);\n }\n verts.push(points[0], points[1]);\n joints.push(JOINT_TYPE.NONE);\n verts.push(points[2], points[3]);\n joints.push(JOINT_TYPE.NONE);\n }\n\n fill(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n const { verts, joints } = target;\n const { points, triangles } = graphicsData;\n\n triangles.length = 0;\n\n if (!graphicsData.fillAA)\n {\n verts.push(points[0], points[1],\n points[2], points[3],\n points[4], points[5],\n points[6], points[7]);\n\n joints.push(JOINT_TYPE.FILL, JOINT_TYPE.FILL, JOINT_TYPE.FILL, JOINT_TYPE.FILL);\n triangles.push(0, 1, 2, 0, 2, 3);\n\n return;\n }\n\n this._polyBuilder.fill(graphicsData, target);\n }\n}\n","import { CircleBuilder } from './CircleBuilder';\n\nimport type { BuildData } from '../core/BuildData';\nimport type { IShapeBuilder } from '../core/IShapeBuilder';\nimport type { SmoothGraphicsData } from '../core/SmoothGraphicsData';\n\n/**\n * @memberof PIXI.smooth\n */\nexport class RoundedRectangleBuilder implements IShapeBuilder\n{\n _circleBuilder = new CircleBuilder();\n\n path(graphicsData: SmoothGraphicsData, target: BuildData)\n {\n this._circleBuilder.path(graphicsData, target);\n }\n\n line(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n this._circleBuilder.line(graphicsData, target);\n }\n\n fill(graphicsData: SmoothGraphicsData, target: BuildData): void\n {\n this._circleBuilder.fill(graphicsData, target);\n }\n}\n","import { SHAPES } from '@pixi/core';\nimport { IShapeBuilder } from '../core/IShapeBuilder';\nimport { CircleBuilder } from './CircleBuilder';\nimport { PolyBuilder } from './PolyBuilder';\nimport { RectangleBuilder } from './RectangleBuilder';\nimport { RoundedRectangleBuilder } from './RoundedRectangleBuilder';\n\nexport const FILL_COMMANDS: Record = {\n [SHAPES.POLY]: new PolyBuilder(),\n [SHAPES.CIRC]: new CircleBuilder(),\n [SHAPES.ELIP]: new CircleBuilder(),\n [SHAPES.RECT]: new RectangleBuilder(),\n [SHAPES.RREC]: new RoundedRectangleBuilder()\n};\n\nexport { CircleBuilder, PolyBuilder, RectangleBuilder, RoundedRectangleBuilder };\n","import {\n Buffer,\n Color,\n Geometry,\n Matrix,\n Point,\n SHAPES,\n Texture,\n TYPES,\n WRAP_MODES,\n} from '@pixi/core';\nimport { Bounds } from '@pixi/display';\nimport { BatchDrawCall, IGraphicsBatchSettings, matrixEquals } from './core/BatchDrawCall';\nimport { BatchPart } from './core/BatchPart';\nimport { BuildData } from './core/BuildData';\nimport { FillStyle } from './core/FillStyle';\nimport { LineStyle } from './core/LineStyle';\nimport { SegmentPacker } from './core/SegmentPacker';\nimport { SmoothGraphicsData } from './core/SmoothGraphicsData';\nimport { FILL_COMMANDS } from './shapes';\n\nimport type { Circle, Ellipse, IPointData, Polygon, Rectangle, RoundedRectangle } from '@pixi/core';\n\n/*\n * Complex shape type\n * @todo Move to Math shapes\n */\nexport type IShape = Circle | Ellipse | Polygon | Rectangle | RoundedRectangle;\n\nexport const BATCH_POOL: Array = [];\nexport const DRAW_CALL_POOL: Array = [];\n\nconst tmpPoint = new Point();\nconst tmpBounds = new Bounds();\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphicsGeometry extends Geometry\n{\n public static BATCHABLE_SIZE = 100;\n\n public boundsPadding: number;\n\n indicesUint16: Uint16Array | Uint32Array = null;\n batchable: boolean;\n\n buildData: BuildData;\n\n get points()\n {\n return this.buildData.verts;\n }\n\n get closePointEps()\n {\n return this.buildData.closePointEps;\n }\n\n graphicsData: Array;\n drawCalls: Array;\n batchDirty: number;\n batches: Array;\n packer: SegmentPacker;\n packSize: number;\n pack32index: boolean;\n strideFloats: number;\n\n protected dirty: number;\n protected cacheDirty: number;\n protected clearDirty: number;\n protected shapeBuildIndex: number;\n protected shapeBatchIndex: number;\n protected _bounds: Bounds;\n protected boundsDirty: number;\n\n _buffer: Buffer;\n _indexBuffer: Buffer;\n _bufferFloats: Float32Array;\n _bufferUint: Uint32Array;\n\n initAttributes(_static: boolean)\n {\n this._buffer = new Buffer(null, _static, false);\n this._bufferFloats = new Float32Array();\n this._bufferUint = new Uint32Array();\n\n this._indexBuffer = new Buffer(null, _static, true);\n this.addAttribute('aPrev', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aPoint1', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aPoint2', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aNext', this._buffer, 2, false, TYPES.FLOAT)\n .addAttribute('aTravel', this._buffer, 1, false, TYPES.FLOAT)\n // number of vertex\n .addAttribute('aVertexJoint', this._buffer, 1, false, TYPES.FLOAT)\n // line width, alignment\n .addAttribute('aStyleId', this._buffer, 1, false, TYPES.FLOAT)\n // the usual\n .addAttribute('aColor', this._buffer, 4, true, TYPES.UNSIGNED_BYTE)\n .addIndex(this._indexBuffer);\n\n this.strideFloats = 12;\n }\n\n constructor()\n {\n super();\n\n this.initAttributes(false);\n\n this.buildData = new BuildData();\n\n this.graphicsData = [];\n\n this.dirty = 0;\n\n this.batchDirty = -1;\n\n this.cacheDirty = -1;\n\n this.clearDirty = 0;\n\n this.drawCalls = [];\n\n this.batches = [];\n\n this.shapeBuildIndex = 0;\n\n this.shapeBatchIndex = 0;\n\n this._bounds = new Bounds();\n\n this.boundsDirty = -1;\n\n this.boundsPadding = 0;\n\n this.batchable = false;\n\n this.indicesUint16 = null;\n\n this.packer = null;\n this.packSize = 0;\n this.pack32index = null;\n }\n\n public checkInstancing(instanced: boolean, allow32Indices: boolean)\n {\n if (this.packer)\n {\n return;\n }\n this.packer = new SegmentPacker();\n this.pack32index = allow32Indices;\n }\n\n /**\n * Get the current bounds of the graphic geometry.\n *\n * @member {PIXI.Bounds}\n * @readonly\n */\n public get bounds(): Bounds\n {\n if (this.boundsDirty !== this.dirty)\n {\n this.boundsDirty = this.dirty;\n this.calculateBounds();\n }\n\n return this._bounds;\n }\n\n /**\n * Call if you changed graphicsData manually.\n * Empties all batch buffers.\n */\n protected invalidate(): void\n {\n this.boundsDirty = -1;\n this.dirty++;\n this.batchDirty++;\n this.shapeBuildIndex = 0;\n this.shapeBatchIndex = 0;\n this.packSize = 0;\n\n this.buildData.clear();\n\n for (let i = 0; i < this.drawCalls.length; i++)\n {\n this.drawCalls[i].clear();\n DRAW_CALL_POOL.push(this.drawCalls[i]);\n }\n\n this.drawCalls.length = 0;\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batchPart = this.batches[i];\n\n batchPart.reset();\n BATCH_POOL.push(batchPart);\n }\n\n this.batches.length = 0;\n }\n\n public clear(): SmoothGraphicsGeometry\n {\n if (this.graphicsData.length > 0)\n {\n this.invalidate();\n this.clearDirty++;\n this.graphicsData.length = 0;\n }\n\n return this;\n }\n\n public drawShape(\n shape: IShape,\n fillStyle: FillStyle = null,\n lineStyle: LineStyle = null,\n matrix: Matrix = null): SmoothGraphicsGeometry\n {\n const data = new SmoothGraphicsData(shape, fillStyle, lineStyle, matrix);\n\n this.graphicsData.push(data);\n this.dirty++;\n\n return this;\n }\n\n public drawHole(shape: IShape, matrix: Matrix = null): SmoothGraphicsGeometry\n {\n if (!this.graphicsData.length)\n {\n return null;\n }\n\n const data = new SmoothGraphicsData(shape, null, null, matrix);\n\n const lastShape = this.graphicsData[this.graphicsData.length - 1];\n\n data.lineStyle = lastShape.lineStyle;\n\n lastShape.holes.push(data);\n\n this.dirty++;\n\n return this;\n }\n\n public destroy(): void\n {\n super.destroy();\n\n // destroy each of the SmoothGraphicsData objects\n for (let i = 0; i < this.graphicsData.length; ++i)\n {\n this.graphicsData[i].destroy();\n }\n\n this.buildData.destroy();\n this.buildData = null;\n this.indexBuffer.destroy();\n this.indexBuffer = null;\n this.graphicsData.length = 0;\n this.graphicsData = null;\n this.drawCalls.length = 0;\n this.drawCalls = null;\n this.batches.length = 0;\n this.batches = null;\n this._bounds = null;\n }\n\n /**\n * Check to see if a point is contained within this geometry.\n *\n * @param {PIXI.IPointData} point - Point to check if it's contained.\n * @return {Boolean} `true` if the point is contained within geometry.\n */\n public containsPoint(point: IPointData): boolean\n {\n const graphicsData = this.graphicsData;\n\n for (let i = 0; i < graphicsData.length; ++i)\n {\n const data = graphicsData[i];\n\n if (!data.fillStyle.visible)\n {\n continue;\n }\n\n // only deal with fills..\n if (data.shape)\n {\n if (data.matrix)\n {\n data.matrix.applyInverse(point, tmpPoint);\n }\n else\n {\n tmpPoint.copyFrom(point);\n }\n\n if (data.shape.contains(tmpPoint.x, tmpPoint.y))\n {\n let hitHole = false;\n\n if (data.holes)\n {\n for (let i = 0; i < data.holes.length; i++)\n {\n const hole = data.holes[i];\n\n if (hole.shape.contains(tmpPoint.x, tmpPoint.y))\n {\n hitHole = true;\n break;\n }\n }\n }\n\n if (!hitHole)\n {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n updatePoints(): void\n {\n // do nothing\n }\n\n updateBufferSize(): void\n {\n this._buffer.update(new Float32Array());\n }\n\n updateBuild(): void\n {\n const { graphicsData, buildData } = this;\n const len = graphicsData.length;\n\n for (let i = this.shapeBuildIndex; i < len; i++)\n {\n const data = graphicsData[i];\n\n data.strokeStart = 0;\n data.strokeLen = 0;\n data.fillStart = 0;\n data.fillLen = 0;\n const { fillStyle, lineStyle, holes } = data;\n\n if (!fillStyle.visible && !lineStyle.visible)\n {\n continue;\n }\n\n const command = FILL_COMMANDS[data.type];\n\n data.clearPath();\n\n command.path(data, buildData);\n if (data.matrix)\n {\n this.transformPoints(data.points, data.matrix);\n }\n\n data.clearBuild();\n if (data.points.length <= 2)\n {\n continue;\n }\n if (fillStyle.visible || lineStyle.visible)\n {\n this.processHoles(holes);\n }\n if (fillStyle.visible)\n {\n data.fillAA = (data.fillStyle as any).smooth\n && data.fillStyle.texture === Texture.WHITE\n && holes.length === 0\n && !(data.closeStroke\n && data.lineStyle.visible\n && !data.lineStyle.shader\n && data.lineStyle.alpha >= 0.99\n && data.lineStyle.width * Math.min(data.lineStyle.alignment, 1 - data.lineStyle.alignment) >= 0.495);\n\n data.fillStart = buildData.joints.length;\n\n if (holes.length)\n {\n FILL_COMMANDS[SHAPES.POLY].fill(data, buildData);\n }\n else\n {\n command.fill(data, buildData);\n }\n\n data.fillLen = buildData.joints.length - data.fillStart;\n }\n if (lineStyle.visible)\n {\n data.strokeStart = buildData.joints.length;\n command.line(data, buildData);\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n\n FILL_COMMANDS[hole.type].line(hole, buildData);\n }\n data.strokeLen = buildData.joints.length - data.strokeStart;\n }\n }\n this.shapeBuildIndex = len;\n }\n\n updateBatches(shaderSettings?: IGraphicsBatchSettings): void\n {\n if (!this.graphicsData.length)\n {\n this.batchable = true;\n\n return;\n }\n this.updateBuild();\n\n if (!this.validateBatching())\n {\n return;\n }\n\n const { buildData, graphicsData } = this;\n const len = graphicsData.length;\n\n this.cacheDirty = this.dirty;\n\n let batchPart: BatchPart = null;\n\n let currentStyle = null;\n\n if (this.batches.length > 0)\n {\n batchPart = this.batches[this.batches.length - 1];\n currentStyle = batchPart.style;\n }\n\n for (let i = this.shapeBatchIndex; i < len; i++)\n {\n const data = graphicsData[i];\n const fillStyle = data.fillStyle;\n const lineStyle = data.lineStyle;\n\n if (data.matrix)\n {\n this.transformPoints(data.points, data.matrix);\n }\n if (!fillStyle.visible && !lineStyle.visible)\n {\n continue;\n }\n for (let j = 0; j < 2; j++)\n {\n const style = (j === 0) ? fillStyle : lineStyle;\n\n if (!style.visible) continue;\n\n const nextTexture = style.texture.baseTexture;\n const attribOld = buildData.vertexSize;\n const indexOld = buildData.indexSize;\n\n nextTexture.wrapMode = WRAP_MODES.REPEAT;\n if (j === 0)\n {\n this.packer.updateBufferSize(data.fillStart, data.fillLen, data.triangles.length, buildData);\n }\n else\n {\n this.packer.updateBufferSize(data.strokeStart, data.strokeLen, data.triangles.length, buildData);\n }\n\n const attribSize = buildData.vertexSize;\n\n if (attribSize === attribOld) continue;\n // close batch if style is different\n if (batchPart && !this._compareStyles(currentStyle, style))\n {\n batchPart.end(indexOld, attribOld);\n batchPart = null;\n }\n // spawn new batch if its first batch or previous was closed\n if (!batchPart)\n {\n batchPart = BATCH_POOL.pop() || new BatchPart();\n batchPart.begin(style, indexOld, attribOld);\n this.batches.push(batchPart);\n currentStyle = style;\n }\n\n if (j === 0)\n {\n batchPart.jointEnd = data.fillStart + data.fillLen;\n }\n else\n {\n batchPart.jointEnd = data.strokeStart + data.strokeLen;\n }\n }\n }\n this.shapeBatchIndex = len;\n\n if (batchPart)\n {\n batchPart.end(buildData.indexSize, buildData.vertexSize);\n }\n\n if (this.batches.length === 0)\n {\n // there are no visible styles in SmoothGraphicsData\n // its possible that someone wants Graphics just for the bounds\n this.batchable = true;\n\n return;\n }\n\n // TODO make this a const..\n this.batchable = this.isBatchable();\n\n if (this.batchable)\n {\n this.packBatches();\n }\n else\n {\n this.buildDrawCalls(shaderSettings);\n this.updatePack();\n }\n }\n\n updatePack()\n {\n const { vertexSize, indexSize } = this.buildData;\n\n if (this.packSize === vertexSize)\n {\n return;\n }\n\n const { strideFloats, packer, buildData, batches } = this;\n const buffer = this._buffer;\n const index = this._indexBuffer;\n const floatsSize = vertexSize * strideFloats;\n\n if (buffer.data.length !== floatsSize)\n {\n const arrBuf = new ArrayBuffer(floatsSize * 4);\n\n this._bufferFloats = new Float32Array(arrBuf);\n this._bufferUint = new Uint32Array(arrBuf);\n buffer.data = this._bufferFloats;\n }\n if (index.data.length !== indexSize)\n {\n if (vertexSize > 0xffff && this.pack32index)\n {\n index.data = new Uint32Array(indexSize);\n }\n else\n {\n index.data = new Uint16Array(indexSize);\n }\n }\n\n packer.beginPack(buildData, this._bufferFloats, this._bufferUint, index.data as Uint16Array);\n\n let j = 0;\n\n for (let i = 0; i < this.graphicsData.length; i++)\n {\n const data = this.graphicsData[i];\n\n if (data.fillLen)\n {\n while (batches[j].jointEnd <= data.fillStart)\n {\n j++;\n }\n packer.packInterleavedGeometry(data.fillStart, data.fillLen, data.triangles,\n batches[j].styleId, batches[j].rgba);\n }\n if (data.strokeLen)\n {\n while (batches[j].jointEnd <= data.strokeStart)\n {\n j++;\n }\n packer.packInterleavedGeometry(data.strokeStart, data.strokeLen, data.triangles,\n batches[j].styleId, batches[j].rgba);\n }\n }\n\n buffer.update();\n index.update();\n this.packSize = vertexSize;\n }\n\n /**\n * Affinity check\n *\n * @param {PIXI.FillStyle | PIXI.LineStyle} styleA\n * @param {PIXI.FillStyle | PIXI.LineStyle} styleB\n */\n protected _compareStyles(styleA: FillStyle | LineStyle, styleB: FillStyle | LineStyle): boolean\n {\n if (!styleA || !styleB)\n {\n return false;\n }\n\n if (styleA.texture.baseTexture !== styleB.texture.baseTexture)\n {\n return false;\n }\n\n if (styleA.color + styleA.alpha !== styleB.color + styleB.alpha)\n {\n return false;\n }\n\n if (styleA.shader !== styleB.shader)\n {\n return false;\n }\n // TODO: propagate width for FillStyle\n if ((styleA as LineStyle).width !== (styleB as LineStyle).width)\n {\n return false;\n }\n if ((styleA as LineStyle).scaleMode !== (styleB as LineStyle).scaleMode)\n {\n return false;\n }\n if ((styleA as LineStyle).alignment !== (styleB as LineStyle).alignment)\n {\n return false;\n }\n\n const mat1 = styleA.matrix || Matrix.IDENTITY;\n const mat2 = styleB.matrix || Matrix.IDENTITY;\n\n return matrixEquals(mat1, mat2);\n }\n\n /**\n * Test geometry for batching process.\n *\n * @protected\n */\n protected validateBatching(): boolean\n {\n if (this.dirty === this.cacheDirty || !this.graphicsData.length)\n {\n return false;\n }\n\n for (let i = 0, l = this.graphicsData.length; i < l; i++)\n {\n const data = this.graphicsData[i];\n const fill = data.fillStyle;\n const line = data.lineStyle;\n\n if (fill && !fill.texture.baseTexture.valid) return false;\n if (line && !line.texture.baseTexture.valid) return false;\n }\n\n return true;\n }\n\n /**\n * Offset the indices so that it works with the batcher.\n *\n * @protected\n */\n protected packBatches(): void\n {\n this.batchDirty++;\n const batches = this.batches;\n\n for (let i = 0, l = batches.length; i < l; i++)\n {\n const batch = batches[i];\n\n for (let j = 0; j < batch.size; j++)\n {\n const index = batch.start + j;\n\n this.indicesUint16[index] = this.indicesUint16[index] - batch.attribStart;\n }\n }\n }\n\n protected isBatchable(): boolean\n {\n return false;\n\n // prevent heavy mesh batching\n // if (this.points.length > 0xffff * 2) {\n // return false;\n // }\n //\n // const batches = this.batches;\n //\n // for (let i = 0; i < batches.length; i++) {\n // if ((batches[i].style as LineStyle).native) {\n // return false;\n // }\n // }\n //\n // return (this.points.length < SmoothGraphicsGeometry.BATCHABLE_SIZE * 2);\n }\n\n /**\n * Converts intermediate batches data to drawCalls.\n *\n * @protected\n */\n protected buildDrawCalls(shaderSettings?: IGraphicsBatchSettings)\n {\n for (let i = 0; i < this.drawCalls.length; i++)\n {\n this.drawCalls[i].clear();\n DRAW_CALL_POOL.push(this.drawCalls[i]);\n }\n\n this.drawCalls.length = 0;\n\n let currentGroup = DRAW_CALL_POOL.pop() || new BatchDrawCall();\n\n currentGroup.begin(shaderSettings, null);\n\n let index = 0;\n\n this.drawCalls.push(currentGroup);\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batchData = this.batches[i];\n const style = batchData.style as LineStyle;\n\n if (batchData.attribSize === 0)\n {\n // I don't know how why do we have size=0 sometimes\n continue;\n }\n\n let styleId = -1;\n const mat = style.getTextureMatrix();\n\n if (currentGroup.check(style.shader))\n {\n styleId = currentGroup.add(style.texture, mat,\n style.width, style.alignment || 0, style.packLineScale());\n }\n if (styleId < 0)\n {\n currentGroup = DRAW_CALL_POOL.pop() || new BatchDrawCall();\n this.drawCalls.push(currentGroup);\n currentGroup.begin(shaderSettings, style.shader);\n currentGroup.start = index;\n styleId = currentGroup.add(style.texture, mat,\n style.width, style.alignment || 0, style.packLineScale());\n }\n currentGroup.size += batchData.size;\n index += batchData.size;\n\n const { color, alpha } = style;\n const bgr = Color.shared\n .setValue(color)\n .toLittleEndianNumber();\n\n batchData.rgba = Color.shared\n .setValue(bgr)\n .toPremultiplied(alpha);\n batchData.styleId = styleId;\n }\n }\n\n protected processHoles(holes: Array): void\n {\n for (let i = 0; i < holes.length; i++)\n {\n const hole = holes[i];\n const command = FILL_COMMANDS[hole.type];\n\n hole.clearPath();\n\n command.path(hole, this.buildData);\n\n if (hole.matrix)\n {\n this.transformPoints(hole.points, hole.matrix);\n }\n }\n }\n\n /**\n * Update the local bounds of the object. Expensive to use performance-wise.\n *\n * @protected\n */\n protected calculateBounds(): void\n {\n const bounds = this._bounds;\n const sequenceBounds = tmpBounds;\n let curMatrix = Matrix.IDENTITY;\n\n this._bounds.clear();\n sequenceBounds.clear();\n\n for (let i = 0; i < this.graphicsData.length; i++)\n {\n const data = this.graphicsData[i];\n const shape = data.shape;\n const type = data.type;\n const lineStyle = data.lineStyle;\n const nextMatrix = data.matrix || Matrix.IDENTITY;\n let lineWidth = 0.0;\n\n if (lineStyle && lineStyle.visible)\n {\n lineWidth = lineStyle.width;\n\n if (type !== SHAPES.POLY || data.fillStyle.visible)\n {\n lineWidth *= Math.max(0, lineStyle.alignment);\n }\n else\n {\n lineWidth *= Math.max(lineStyle.alignment, 1 - lineStyle.alignment);\n }\n }\n\n if (curMatrix !== nextMatrix)\n {\n if (!sequenceBounds.isEmpty())\n {\n bounds.addBoundsMatrix(sequenceBounds, curMatrix);\n sequenceBounds.clear();\n }\n curMatrix = nextMatrix;\n }\n\n if (type === SHAPES.RECT || type === SHAPES.RREC)\n {\n const rect = shape as Rectangle | RoundedRectangle;\n\n sequenceBounds.addFramePad(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height,\n lineWidth, lineWidth);\n }\n else if (type === SHAPES.CIRC)\n {\n const circle = shape as Circle;\n\n sequenceBounds.addFramePad(circle.x, circle.y, circle.x, circle.y,\n circle.radius + lineWidth, circle.radius + lineWidth);\n }\n else if (type === SHAPES.ELIP)\n {\n const ellipse = shape as Ellipse;\n\n sequenceBounds.addFramePad(ellipse.x, ellipse.y, ellipse.x, ellipse.y,\n ellipse.width + lineWidth, ellipse.height + lineWidth);\n }\n else\n {\n const poly = shape as Polygon;\n // adding directly to the bounds\n\n bounds.addVerticesMatrix(curMatrix, (poly.points as any), 0, poly.points.length, lineWidth, lineWidth);\n }\n }\n\n if (!sequenceBounds.isEmpty())\n {\n bounds.addBoundsMatrix(sequenceBounds, curMatrix);\n }\n\n bounds.pad(this.boundsPadding, this.boundsPadding);\n }\n\n /**\n * Transform points using matrix.\n *\n * @protected\n * @param {number[]} points - Points to transform\n * @param {PIXI.Matrix} matrix - Transform matrix\n */\n protected transformPoints(points: Array, matrix: Matrix): void\n {\n for (let i = 0; i < points.length / 2; i++)\n {\n const x = points[(i * 2)];\n const y = points[(i * 2) + 1];\n\n points[(i * 2)] = (matrix.a * x) + (matrix.c * y) + matrix.tx;\n points[(i * 2) + 1] = (matrix.b * x) + (matrix.d * y) + matrix.ty;\n }\n }\n}\n","import {\n BLEND_MODES,\n Circle,\n Color,\n DRAW_MODES,\n Ellipse,\n Matrix,\n MSAA_QUALITY,\n PI_2,\n Point,\n Polygon,\n Rectangle,\n Renderer,\n RoundedRectangle,\n Shader,\n SHAPES,\n State,\n Texture,\n utils,\n} from '@pixi/core';\nimport { Container } from '@pixi/display';\nimport { curves, Graphics, graphicsUtils, LINE_CAP, LINE_JOIN } from '@pixi/graphics';\nimport { IGraphicsBatchSettings } from './core/BatchDrawCall';\nimport { FillStyle } from './core/FillStyle';\nimport { LINE_SCALE_MODE, LineStyle } from './core/LineStyle';\nimport { settings } from './settings';\nimport { SmoothGraphicsGeometry } from './SmoothGraphicsGeometry';\nimport { SmoothGraphicsShader } from './SmoothShader';\n\nimport type { ColorSource, IPointData, IShape } from '@pixi/core';\nimport type { IDestroyOptions } from '@pixi/display';\n\nconst UnsmoothGraphics = Graphics;\nconst { BezierUtils, QuadraticUtils, ArcUtils } = graphicsUtils;\n\n// a default shaders map used by graphics..\nconst DEFAULT_SHADERS: { [key: string]: Shader } = {};\n\nexport interface IFillStyleOptions\n{\n color?: ColorSource;\n alpha?: number;\n texture?: Texture;\n matrix?: Matrix;\n smooth?: boolean;\n shader?: Shader;\n}\n\nexport interface ILineStyleOptions extends IFillStyleOptions\n{\n width?: number;\n alignment?: number;\n scaleMode?: LINE_SCALE_MODE;\n cap?: LINE_CAP;\n join?: LINE_JOIN;\n miterLimit?: number;\n}\n\n/**\n * @memberof PIXI.smooth\n */\nexport class SmoothGraphics extends Container\n{\n public static readonly curves = curves;\n\n static _TEMP_POINT = new Point();\n\n public shader: Shader;\n public shaderSettings: IGraphicsBatchSettings;\n public pluginName: string;\n public currentPath: Polygon;\n\n protected batches: Array;\n protected batchTint: number;\n protected batchDirty: number;\n protected vertexData: Float32Array;\n\n protected _fillStyle: FillStyle;\n protected _lineStyle: LineStyle;\n protected _matrix: Matrix;\n protected _holeMode: boolean;\n protected _transformID: number;\n protected _tintColor: Color;\n\n private state: State;\n private _geometry: SmoothGraphicsGeometry;\n\n public get geometry(): SmoothGraphicsGeometry\n {\n return this._geometry;\n }\n\n constructor(geometry: SmoothGraphicsGeometry = null)\n {\n super();\n\n this._geometry = geometry || new SmoothGraphicsGeometry();\n this._geometry.refCount++;\n\n this.shader = null;\n\n this.shaderSettings = {\n maxStyles: settings.SHADER_MAX_STYLES,\n maxTextures: settings.SHADER_MAX_TEXTURES,\n pixelLine: settings.PIXEL_LINE,\n };\n\n this.state = State.for2d();\n\n this._fillStyle = new FillStyle();\n\n this._lineStyle = new LineStyle();\n\n this._matrix = null;\n\n this._holeMode = false;\n\n this.currentPath = null;\n\n this.batches = [];\n\n this.batchTint = -1;\n\n this.batchDirty = -1;\n\n this.vertexData = null;\n\n this.pluginName = 'smooth';\n\n this._transformID = -1;\n\n // Set default\n this._tintColor = new Color(0xFFFFFF);\n this.blendMode = BLEND_MODES.NORMAL;\n }\n\n public clone(): SmoothGraphics\n {\n this.finishPoly();\n\n return new SmoothGraphics(this._geometry);\n }\n\n public set blendMode(value: BLEND_MODES)\n {\n this.state.blendMode = value;\n }\n\n public get blendMode(): BLEND_MODES\n {\n return this.state.blendMode;\n }\n\n public get tint(): ColorSource\n {\n return this._tintColor.value;\n }\n\n public set tint(value: ColorSource)\n {\n this._tintColor.setValue(value);\n }\n\n public get fill(): FillStyle\n {\n return this._fillStyle;\n }\n\n public get line(): LineStyle\n {\n return this._lineStyle;\n }\n\n public lineStyle(\n width: number,\n color?: ColorSource,\n alpha?: number,\n alignment?: number,\n scaleMode?: LINE_SCALE_MODE): this;\n\n public lineStyle(options?: ILineStyleOptions): this;\n\n public lineStyle(options: ILineStyleOptions | number = null,\n color: ColorSource = 0x0, alpha = 1, alignment = 0.5, scaleMode = settings.LINE_SCALE_MODE): this\n {\n // Support non-object params: (width, color, alpha, alignment, native)\n if (typeof options === 'number')\n {\n if (typeof scaleMode === 'boolean')\n {\n scaleMode = scaleMode ? LINE_SCALE_MODE.NONE : LINE_SCALE_MODE.NORMAL;\n }\n options = { width: options, color, alpha, alignment, scaleMode } as ILineStyleOptions;\n }\n else\n {\n const native: boolean = (options as any).native;\n\n if (native !== undefined)\n {\n options.scaleMode = native ? LINE_SCALE_MODE.NONE : LINE_SCALE_MODE.NORMAL;\n }\n }\n\n return this.lineTextureStyle(options);\n }\n\n public lineTextureStyle(options: ILineStyleOptions): this\n {\n // Apply defaults\n options = Object.assign({\n width: 0,\n texture: Texture.WHITE,\n color: (options && options.texture) ? 0xFFFFFF : 0x0,\n alpha: 1,\n matrix: null,\n alignment: 0.5,\n native: false,\n cap: LINE_CAP.BUTT,\n join: LINE_JOIN.MITER,\n miterLimit: 10,\n shader: null,\n scaleMode: settings.LINE_SCALE_MODE,\n }, options);\n\n this.normalizeColor(options);\n\n if (this.currentPath)\n {\n this.startPoly();\n }\n\n const visible = options.width > 0 && options.alpha > 0;\n\n if (!visible)\n {\n this._lineStyle.reset();\n }\n else\n {\n if (options.matrix)\n {\n options.matrix = options.matrix.clone();\n options.matrix.invert();\n }\n\n Object.assign(this._lineStyle, { visible }, options);\n }\n\n return this;\n }\n\n protected startPoly(): void\n {\n if (this.currentPath)\n {\n const points = this.currentPath.points;\n const len = this.currentPath.points.length;\n\n if (len > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = new Polygon();\n this.currentPath.closeStroke = false;\n this.currentPath.points.push(points[len - 2], points[len - 1]);\n }\n }\n else\n {\n this.currentPath = new Polygon();\n this.currentPath.closeStroke = false;\n }\n }\n\n finishPoly(): void\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = null;\n }\n else\n {\n this.currentPath.points.length = 0;\n }\n }\n }\n\n public moveTo(x: number, y: number): this\n {\n this.startPoly();\n this.currentPath.points[0] = x;\n this.currentPath.points[1] = y;\n\n return this;\n }\n\n public lineTo(x: number, y: number): this\n {\n if (!this.currentPath)\n {\n this.moveTo(0, 0);\n }\n\n // remove duplicates..\n const points = this.currentPath.points;\n const fromX = points[points.length - 2];\n const fromY = points[points.length - 1];\n\n if (fromX !== x || fromY !== y)\n {\n points.push(x, y);\n }\n\n return this;\n }\n\n protected _initCurve(x = 0, y = 0): void\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length === 0)\n {\n this.currentPath.points = [x, y];\n }\n }\n else\n {\n this.moveTo(x, y);\n }\n }\n\n public quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): this\n {\n this._initCurve();\n\n const points = this.currentPath.points;\n\n if (points.length === 0)\n {\n this.moveTo(0, 0);\n }\n\n QuadraticUtils.curveTo(cpX, cpY, toX, toY, points);\n\n return this;\n }\n\n public bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): this\n {\n this._initCurve();\n\n BezierUtils.curveTo(cpX, cpY, cpX2, cpY2, toX, toY, this.currentPath.points);\n\n return this;\n }\n\n public arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this\n {\n this._initCurve(x1, y1);\n\n const points = this.currentPath.points;\n\n const result = ArcUtils.curveTo(x1, y1, x2, y2, radius, points);\n\n if (result)\n {\n const { cx, cy, radius, startAngle, endAngle, anticlockwise } = result;\n\n this.arc(cx, cy, radius, startAngle, endAngle, anticlockwise);\n }\n\n return this;\n }\n\n public arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise = false): this\n {\n if (startAngle === endAngle)\n {\n return this;\n }\n\n if (!anticlockwise && endAngle <= startAngle)\n {\n endAngle += PI_2;\n }\n else if (anticlockwise && startAngle <= endAngle)\n {\n startAngle += PI_2;\n }\n\n const sweep = endAngle - startAngle;\n\n if (sweep === 0)\n {\n return this;\n }\n\n const startX = cx + (Math.cos(startAngle) * radius);\n const startY = cy + (Math.sin(startAngle) * radius);\n const eps = this._geometry.closePointEps;\n\n // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path.\n let points = this.currentPath ? this.currentPath.points : null;\n\n if (points)\n {\n // TODO: make a better fix.\n\n // We check how far our start is from the last existing point\n const xDiff = Math.abs(points[points.length - 2] - startX);\n const yDiff = Math.abs(points[points.length - 1] - startY);\n\n if (xDiff < eps && yDiff < eps)\n {\n // If the point is very close, we don't add it, since this would lead to artifacts\n // during tessellation due to floating point imprecision.\n }\n else\n {\n points.push(startX, startY);\n }\n }\n else\n {\n this.moveTo(startX, startY);\n points = this.currentPath.points;\n }\n\n ArcUtils.arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points);\n\n return this;\n }\n\n public beginFill(color: ColorSource = 0, alpha = 1, smooth = false): this\n {\n return this.beginTextureFill({ texture: Texture.WHITE, color, alpha, smooth });\n }\n\n private normalizeColor(options: Pick): void\n {\n const temp = Color.shared.setValue(options.color ?? 0);\n\n options.color = temp.toNumber();\n options.alpha ??= temp.alpha;\n }\n\n beginTextureFill(options?: IFillStyleOptions): this\n {\n // Apply defaults\n options = Object.assign({\n texture: Texture.WHITE,\n color: 0xFFFFFF,\n alpha: 1,\n matrix: null,\n smooth: false,\n }, options) as IFillStyleOptions;\n\n this.normalizeColor(options);\n\n if (this.currentPath)\n {\n this.startPoly();\n }\n\n const visible = options.alpha > 0;\n\n if (!visible)\n {\n this._fillStyle.reset();\n }\n else\n {\n if (options.matrix)\n {\n options.matrix = options.matrix.clone();\n options.matrix.invert();\n }\n\n Object.assign(this._fillStyle, { visible }, options);\n }\n\n return this;\n }\n\n public endFill(): this\n {\n this.finishPoly();\n\n this._fillStyle.reset();\n\n return this;\n }\n\n public drawRect(x: number, y: number, width: number, height: number): this\n {\n return this.drawShape(new Rectangle(x, y, width, height));\n }\n\n public drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): this\n {\n return this.drawShape(new RoundedRectangle(x, y, width, height, radius));\n }\n\n public drawCircle(x: number, y: number, radius: number): this\n {\n return this.drawShape(new Circle(x, y, radius));\n }\n\n public drawEllipse(x: number, y: number, width: number, height: number): this\n {\n return this.drawShape(new Ellipse(x, y, width, height));\n }\n\n public drawPolygon(...path: Array | Array): this;\n public drawPolygon(path: Array | Array | Polygon): this;\n\n public drawPolygon(...path: any[]): this\n {\n let points: Array | Array;\n let closeStroke = true;// !!this._fillStyle;\n\n const poly = path[0] as Polygon;\n\n // check if data has points..\n if (poly.points)\n {\n closeStroke = poly.closeStroke;\n points = poly.points;\n }\n else if (Array.isArray(path[0]))\n {\n points = path[0];\n }\n else\n {\n points = path;\n }\n\n const shape = new Polygon(points);\n\n shape.closeStroke = closeStroke;\n\n this.drawShape(shape);\n\n return this;\n }\n\n public drawShape(shape: IShape): this\n {\n if (!this._holeMode)\n {\n this._geometry.drawShape(\n shape,\n this._fillStyle.clone(),\n this._lineStyle.clone(),\n this._matrix\n );\n }\n else\n {\n this._geometry.drawHole(shape, this._matrix);\n }\n\n return this;\n }\n\n public clear(): this\n {\n this._geometry.clear();\n this._lineStyle.reset();\n this._fillStyle.reset();\n\n this._boundsID++;\n this._matrix = null;\n this._holeMode = false;\n this.currentPath = null;\n\n return this;\n }\n\n public isFastRect(): boolean\n {\n const data = this._geometry.graphicsData;\n\n return data.length === 1\n && data[0].shape.type === SHAPES.RECT\n && !data[0].matrix\n && !data[0].holes.length\n && !(data[0].lineStyle.visible && data[0].lineStyle.width);\n }\n\n protected _renderCanvas(renderer: any): void\n {\n (UnsmoothGraphics.prototype as any)._renderCanvas.call(this, renderer);\n }\n\n protected _render(renderer: Renderer): void\n {\n this.finishPoly();\n\n const geometry = this._geometry;\n const hasuint32 = renderer.context.supports.uint32Indices;\n // batch part..\n // batch it!\n\n geometry.checkInstancing(renderer.geometry.hasInstance, hasuint32);\n\n geometry.updateBatches(this.shaderSettings);\n\n if (geometry.batchable)\n {\n if (this.batchDirty !== geometry.batchDirty)\n {\n this._populateBatches();\n }\n\n this._renderBatched(renderer);\n }\n else\n {\n // no batching...\n renderer.batch.flush();\n\n this._renderDirect(renderer);\n }\n }\n\n protected _populateBatches(): void\n {\n const geometry = this._geometry;\n const blendMode = this.blendMode;\n const len = geometry.batches.length;\n\n this.batchTint = -1;\n this._transformID = -1;\n this.batchDirty = geometry.batchDirty;\n this.batches.length = len;\n\n this.vertexData = new Float32Array(geometry.points);\n\n for (let i = 0; i < len; i++)\n {\n const gI = geometry.batches[i];\n const color = gI.style.color;\n const vertexData = new Float32Array(this.vertexData.buffer,\n gI.attribStart * 4 * 2,\n gI.attribSize * 2);\n\n // const uvs = new Float32Array(geometry.uvsFloat32.buffer,\n // gI.attribStart * 4 * 2,\n // gI.attribSize * 2);\n\n // const indices = new Uint16Array(geometry.indicesUint16.buffer,\n // gI.start * 2,\n // gI.size);\n\n const batch = {\n vertexData,\n blendMode,\n // indices,\n // uvs,\n _batchRGB: utils.hex2rgb(color) as Array,\n _tintRGB: color,\n _texture: gI.style.texture,\n alpha: gI.style.alpha,\n worldAlpha: 1\n };\n\n this.batches[i] = batch;\n }\n }\n\n protected _renderBatched(renderer: Renderer): void\n {\n if (!this.batches.length)\n {\n return;\n }\n\n renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]);\n\n this.calculateVertices();\n this.calculateTints();\n\n for (let i = 0, l = this.batches.length; i < l; i++)\n {\n const batch = this.batches[i];\n\n batch.worldAlpha = this.worldAlpha * batch.alpha;\n\n renderer.plugins[this.pluginName].render(batch);\n }\n }\n\n protected _renderDirect(renderer: Renderer): void\n {\n const directShader = this._resolveDirectShader(renderer);\n let shader: Shader = directShader;\n\n const geometry = this._geometry;\n const worldAlpha = this.worldAlpha;\n const uniforms = shader.uniforms;\n const drawCalls = geometry.drawCalls;\n\n // lets set the transfomr\n uniforms.translationMatrix = this.transform.worldTransform;\n\n // and then lets set the tint..\n Color.shared.setValue(this._tintColor)\n .premultiply(worldAlpha)\n .toArray(uniforms.tint);\n\n uniforms.resolution = renderer.renderTexture.current\n ? renderer.renderTexture.current.resolution : renderer.resolution;\n\n const projTrans = renderer.projection.transform;\n\n if (projTrans)\n {\n // only uniform scale is supported!\n const scale = Math.sqrt((projTrans.a * projTrans.a) + (projTrans.b * projTrans.b));\n\n uniforms.resolution *= scale;\n }\n\n const multisample = renderer.renderTexture.current\n ? renderer.renderTexture.current.multisample : renderer.multisample;\n\n uniforms.expand = (multisample !== MSAA_QUALITY.NONE ? 2 : 1) / uniforms.resolution;\n\n // the first draw call, we can set the uniforms of the shader directly here.\n\n // this means that we can tack advantage of the sync function of pixi!\n // bind and sync uniforms..\n // there is a way to optimise this..\n renderer.shader.bind(shader);\n renderer.geometry.bind(geometry, shader);\n\n // set state..\n renderer.state.set(this.state);\n\n shader = null;\n // then render the rest of them...\n for (let i = 0, l = drawCalls.length; i < l; i++)\n {\n // TODO: refactor it to another class, that fills uniforms of this shader\n const drawCall = geometry.drawCalls[i];\n\n const shaderChange = shader !== drawCall.shader;\n\n if (shaderChange)\n {\n shader = drawCall.shader;\n if (shader)\n {\n shader.uniforms.translationMatrix = this.transform.worldTransform;\n if (shader.uniforms.tint)\n {\n shader.uniforms.tint[0] = uniforms.tint[0];\n shader.uniforms.tint[1] = uniforms.tint[1];\n shader.uniforms.tint[2] = uniforms.tint[2];\n shader.uniforms.tint[3] = uniforms.tint[3];\n }\n }\n }\n\n const { texArray, styleArray, size, start } = drawCall;\n const groupTextureCount = texArray.count;\n const shaderHere = shader || directShader;\n\n const texs = shaderHere.uniforms.styleTextureId;\n const mats = shaderHere.uniforms.styleMatrix;\n const lines = shaderHere.uniforms.styleLine;\n\n for (let i = 0; i < styleArray.count; i++)\n {\n texs[i] = styleArray.textureIds[i];\n lines[i * 2] = styleArray.lines[i * 2];\n lines[(i * 2) + 1] = styleArray.lines[(i * 2) + 1];\n const m = styleArray.matrices[i];\n\n mats[i * 6] = m.a;\n mats[(i * 6) + 1] = m.c;\n mats[(i * 6) + 2] = m.tx;\n mats[(i * 6) + 3] = m.b;\n mats[(i * 6) + 4] = m.d;\n mats[(i * 6) + 5] = m.ty;\n }\n const sizes = shaderHere.uniforms.samplerSize;\n\n for (let i = 0; i < groupTextureCount; i++)\n {\n sizes[i * 2] = texArray.elements[i].width;\n sizes[(i * 2) + 1] = texArray.elements[i].height;\n }\n\n renderer.shader.bind(shaderHere);\n if (shaderChange)\n {\n renderer.geometry.bind(geometry);\n }\n\n // TODO: bind styles!\n for (let j = 0; j < groupTextureCount; j++)\n {\n renderer.texture.bind(texArray.elements[j], j);\n }\n\n // bind the geometry...\n renderer.geometry.draw(DRAW_MODES.TRIANGLES, size, start);\n }\n }\n\n protected _resolveDirectShader(_renderer: Renderer): Shader\n {\n let shader = this.shader;\n\n const pluginName = this.pluginName;\n\n if (!shader)\n {\n if (!DEFAULT_SHADERS[pluginName])\n {\n DEFAULT_SHADERS[pluginName] = new SmoothGraphicsShader(this.shaderSettings);\n }\n shader = DEFAULT_SHADERS[pluginName];\n }\n\n return shader;\n }\n\n protected _calculateBounds(): void\n {\n this.finishPoly();\n\n const geometry = this._geometry;\n\n // skipping when graphics is empty, like a container\n if (!geometry.graphicsData.length)\n {\n return;\n }\n\n const { minX, minY, maxX, maxY } = geometry.bounds;\n\n this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n }\n\n public containsPoint(point: IPointData): boolean\n {\n this.worldTransform.applyInverse(point, SmoothGraphics._TEMP_POINT);\n\n return this._geometry.containsPoint(SmoothGraphics._TEMP_POINT);\n }\n\n protected calculateTints(): void\n {\n if (this.batchTint !== this.tint)\n {\n this.batchTint = this._tintColor.toNumber();\n\n for (let i = 0; i < this.batches.length; i++)\n {\n const batch = this.batches[i];\n\n batch._tintRGB = Color.shared\n .setValue(this._tintColor)\n .multiply(batch._batchRGB)\n .toLittleEndianNumber();\n }\n }\n }\n\n protected calculateVertices(): void\n {\n const wtID = this.transform._worldID;\n\n if (this._transformID === wtID)\n {\n return;\n }\n\n this._transformID = wtID;\n\n const wt = this.transform.worldTransform;\n const a = wt.a;\n const b = wt.b;\n const c = wt.c;\n const d = wt.d;\n const tx = wt.tx;\n const ty = wt.ty;\n\n const data = this._geometry.points;// batch.vertexDataOriginal;\n const vertexData = this.vertexData;\n\n let count = 0;\n\n for (let i = 0; i < data.length; i += 2)\n {\n const x = data[i];\n const y = data[i + 1];\n\n vertexData[count++] = (a * x) + (c * y) + tx;\n vertexData[count++] = (d * y) + (b * x) + ty;\n }\n }\n\n public closePath(): this\n {\n const currentPath = this.currentPath;\n\n if (currentPath)\n {\n // we don't need to add extra point in the end because buildLine will take care of that\n currentPath.closeStroke = true;\n }\n\n return this;\n }\n\n public setMatrix(matrix: Matrix): this\n {\n this._matrix = matrix;\n\n return this;\n }\n\n public beginHole(): this\n {\n this.finishPoly();\n this._holeMode = true;\n\n return this;\n }\n\n public endHole(): this\n {\n this.finishPoly();\n this._holeMode = false;\n\n return this;\n }\n\n public destroy(options?: IDestroyOptions | boolean): void\n {\n this._geometry.refCount--;\n if (this._geometry.refCount === 0)\n {\n this._geometry.dispose();\n }\n\n this._matrix = null;\n this.currentPath = null;\n this._lineStyle.destroy();\n this._lineStyle = null;\n this._fillStyle.destroy();\n this._fillStyle = null;\n this._geometry = null;\n this.shader = null;\n this.vertexData = null;\n this.batches.length = 0;\n this.batches = null;\n\n super.destroy(options);\n }\n}\n"],"names":["matrixEquals","th","matrix","eps","BatchStyleArray","i","textureId","lineWidth","lineAlignment","lineScaleMode","settings","textureIds","matrices","lines","count","BatchDrawCall","BatchTextureArray","BLEND_MODES","shader","BaseTexture","texture","texArray","TICK","styleArray","baseTexture","loc","res","Matrix","BatchPart","style","startIndex","attribStart","endIndex","endAttrib","BuildData","JOINT_TYPE","A","FillStyle","obj","Texture","tex","LINE_SCALE_MODE","LineStyle","LINE_CAP","LINE_JOIN","_SegmentPacker","jointStart","jointLen","triangles","target","joints","foundTriangle","vertexSize","indexSize","prevCap","joint","vs","buildData","bufFloat","bufUint","indices","bufferPos","indexPos","lineStyle","color","strideFloats","verts","bufPos","indPos","index","x1","y1","x2","y2","prevX","prevY","nextX","nextY","hasTriangle","travel","j","fullJoint","bis","dist","SegmentPacker","SmoothGraphicsData","shape","fillStyle","cap","smoothVert","precision","smoothFrag","pixelLineFunc","pixelCoverage","SmoothGraphicsShader","Shader","vert","frag","uniforms","maxStyles","maxTextures","sampleValues","Program","vertexSrc","fragmentSrc","pixelLine","src","dashFrag","DashLineShader","dashParams","CircleBuilder","graphicsData","_target","points","x","y","dx","dy","rx","ry","SHAPES","circle","ellipse","roundedRect","halfWidth","halfHeight","n","m","j1","j2","j3","j4","x0","y0","a","cx","cy","vertPos","center","len","nx1","ny1","n1","bx1","by1","nx2","ny2","n2","bx2","by2","b2","tempArr","fixOrientation","hole","area","i1","i2","i3","i4","PolyBuilder","eps2","firstPoint","Point","lastPoint","closedShape","newLen","flag","x3","y3","closeStroke","endJoint","holes","holeArray","pn","start","finish","utils","ind1","ind2","ind","prev","next","D1","D2","bx","by","D","RectangleBuilder","rectData","width","height","RoundedRectangleBuilder","FILL_COMMANDS","BATCH_POOL","DRAW_CALL_POOL","tmpPoint","tmpBounds","Bounds","SmoothGraphicsGeometry","Geometry","_static","Buffer","TYPES","instanced","allow32Indices","batchPart","data","lastShape","point","hitHole","command","shaderSettings","currentStyle","nextTexture","attribOld","indexOld","WRAP_MODES","packer","batches","buffer","floatsSize","arrBuf","styleA","styleB","mat1","mat2","l","fill","line","batch","currentGroup","batchData","styleId","mat","alpha","bgr","Color","bounds","sequenceBounds","curMatrix","type","nextMatrix","rect","poly","UnsmoothGraphics","Graphics","BezierUtils","QuadraticUtils","ArcUtils","graphicsUtils","DEFAULT_SHADERS","_SmoothGraphics","Container","geometry","State","value","options","alignment","scaleMode","native","visible","Polygon","fromX","fromY","cpX","cpY","toX","toY","cpX2","cpY2","radius","result","startAngle","endAngle","anticlockwise","PI_2","startX","startY","xDiff","yDiff","smooth","_a","_b","temp","Rectangle","RoundedRectangle","Circle","Ellipse","path","renderer","hasuint32","blendMode","gI","directShader","worldAlpha","drawCalls","projTrans","scale","multisample","MSAA_QUALITY","drawCall","shaderChange","size","groupTextureCount","shaderHere","texs","mats","sizes","DRAW_MODES","_renderer","pluginName","minX","minY","maxX","maxY","wtID","wt","b","c","d","tx","ty","vertexData","currentPath","SmoothGraphics","curves"],"mappings":";;;;;;;;siBAcgBA,GAAaC,EAAYC,EAAgBC,EAAM,KAC/D,CACI,OAAOF,IAAOC,GAAW,KAAK,IAAID,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC9C,KAAK,IAAIF,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC5B,KAAK,IAAIF,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC5B,KAAK,IAAIF,EAAG,EAAIC,EAAO,CAAC,EAAIC,GAC5B,KAAK,IAAIF,EAAG,GAAKC,EAAO,EAAE,EAAIC,GAC9B,KAAK,IAAIF,EAAG,GAAKC,EAAO,EAAE,EAAIC,CACzC,OAKaC,EACb,CAMI,aACA,CACI,KAAK,WAAa,CAAC,EACnB,KAAK,SAAW,CAAA,EAChB,KAAK,MAAQ,GACb,KAAK,MAAQ,CAGjB,CAEA,OACA,CACI,QAASC,EAAI,EAAGA,EAAI,KAAK,MAAOA,IAE5B,KAAK,WAAWA,CAAC,EAAI,KACrB,KAAK,SAASA,CA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,EAAM4M,EAAI3M,EAAK6M,EAC1CE,EAAWpT,GAAO,EAAKiT,EAAI5M,EAAM0M,EAAI3M,EAAK+M,EAElD,CAEO,WACP,CACI,MAAME,EAAc,KAAK,YAEzB,OAAIA,IAGAA,EAAY,YAAc,IAGvB,IACX,CAEO,UAAUjU,EACjB,CACI,OAAA,KAAK,QAAUA,EAER,IACX,CAEO,WACP,CACI,OAAK,KAAA,aACL,KAAK,UAAY,GAEV,IACX,CAEO,SACP,CACI,OAAK,KAAA,WAAA,EACL,KAAK,UAAY,GAEV,IACX,CAEO,QAAQ8P,EACf,CACI,KAAK,UAAU,WACX,KAAK,UAAU,WAAa,GAE5B,KAAK,UAAU,QAAQ,EAG3B,KAAK,QAAU,KACf,KAAK,YAAc,KACnB,KAAK,WAAW,QAAQ,EACxB,KAAK,WAAa,KAClB,KAAK,WAAW,QAChB,EAAA,KAAK,WAAa,KAClB,KAAK,UAAY,KACjB,KAAK,OAAS,KACd,KAAK,WAAa,KAClB,KAAK,QAAQ,OAAS,EACtB,KAAK,QAAU,KAEf,MAAM,QAAQA,CAAO,CACzB,CACJ,EA34Ba,IAAAoE,GAANzE,GAAMyE,GAEc,OAASC,GAFvBD,GAIF,YAAc,IAAIlK"} \ No newline at end of file diff --git a/docs/PIXI.html b/docs/PIXI.html new file mode 100644 index 0000000..2ae73e7 --- /dev/null +++ b/docs/PIXI.html @@ -0,0 +1,862 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Namespace: PIXI

+ + + +
+ +
+
+

+ PIXI + + +

+ + + +

Browser namespace for PixiJS.

+ +
+
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + +

Namespaces

+ +
+
smooth
+ + +
+ + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.BatchDrawCall.html b/docs/PIXI.smooth.BatchDrawCall.html new file mode 100644 index 0000000..b2f3cec --- /dev/null +++ b/docs/PIXI.smooth.BatchDrawCall.html @@ -0,0 +1,913 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: BatchDrawCall

+ + + +
+ +
+
+

+ + PIXI.smooth.BatchDrawCall + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + +

Members

+ + + +
+
+

+ + data + object + + + + +

+
+
+
+ + +
+

data for uniforms or custom webgl state

+
+ + + +
+ + + + + + + + + + + + + + + +
Default Value:
+
  • undefined
+ + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.BatchPart.html b/docs/PIXI.smooth.BatchPart.html new file mode 100644 index 0000000..ce15d11 --- /dev/null +++ b/docs/PIXI.smooth.BatchPart.html @@ -0,0 +1,854 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: BatchPart

+ + + +
+ +
+
+

+ + PIXI.smooth.BatchPart + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.BatchStyleArray.html b/docs/PIXI.smooth.BatchStyleArray.html new file mode 100644 index 0000000..1ae4281 --- /dev/null +++ b/docs/PIXI.smooth.BatchStyleArray.html @@ -0,0 +1,854 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: BatchStyleArray

+ + + +
+ +
+
+

+ + PIXI.smooth.BatchStyleArray + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.BuildData.html b/docs/PIXI.smooth.BuildData.html new file mode 100644 index 0000000..98d6dfe --- /dev/null +++ b/docs/PIXI.smooth.BuildData.html @@ -0,0 +1,924 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: BuildData

+ + + +
+ +
+
+

+ + PIXI.smooth.BuildData + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.BuildData + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.CircleBuilder.html b/docs/PIXI.smooth.CircleBuilder.html new file mode 100644 index 0000000..943a7bd --- /dev/null +++ b/docs/PIXI.smooth.CircleBuilder.html @@ -0,0 +1,933 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: CircleBuilder

+ + + +
+ +
+
+

+ + PIXI.smooth.CircleBuilder + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.CircleBuilder + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + +

Implements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.DashLineShader.html b/docs/PIXI.smooth.DashLineShader.html new file mode 100644 index 0000000..752e808 --- /dev/null +++ b/docs/PIXI.smooth.DashLineShader.html @@ -0,0 +1,863 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: DashLineShader

+ + + +
+ +
+
+

+ + PIXI.smooth.DashLineShader + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.FillStyle.html b/docs/PIXI.smooth.FillStyle.html new file mode 100644 index 0000000..44b7966 --- /dev/null +++ b/docs/PIXI.smooth.FillStyle.html @@ -0,0 +1,854 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: FillStyle

+ + + +
+ +
+
+

+ + PIXI.smooth.FillStyle + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.IDashParams.html b/docs/PIXI.smooth.IDashParams.html new file mode 100644 index 0000000..ce2f70e --- /dev/null +++ b/docs/PIXI.smooth.IDashParams.html @@ -0,0 +1,853 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Interface: IDashParams

+ + + +
+ +
+
+

+ + PIXI.smooth.IDashParams + + +

+ + + +
+
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.IGraphicsBatchSettings.html b/docs/PIXI.smooth.IGraphicsBatchSettings.html new file mode 100644 index 0000000..75254ea --- /dev/null +++ b/docs/PIXI.smooth.IGraphicsBatchSettings.html @@ -0,0 +1,853 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Interface: IGraphicsBatchSettings

+ + + +
+ +
+
+

+ + PIXI.smooth.IGraphicsBatchSettings + + +

+ + + +
+
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.IShapeBuilder.html b/docs/PIXI.smooth.IShapeBuilder.html new file mode 100644 index 0000000..5c2e47c --- /dev/null +++ b/docs/PIXI.smooth.IShapeBuilder.html @@ -0,0 +1,853 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Interface: IShapeBuilder

+ + + +
+ +
+
+

+ + PIXI.smooth.IShapeBuilder + + +

+ + + +
+
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.LineStyle.html b/docs/PIXI.smooth.LineStyle.html new file mode 100644 index 0000000..c71c52d --- /dev/null +++ b/docs/PIXI.smooth.LineStyle.html @@ -0,0 +1,1038 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: LineStyle

+ + + +
+ +
+
+

+ + PIXI.smooth.LineStyle + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.LineStyle + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + + +

Methods

+ + + +
+
+

+ + + + packLineScale + + + () number + + + + +

+ + +
+
+
+ +

returns width multiplied by scaleMode

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + number + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.PolyBuilder.html b/docs/PIXI.smooth.PolyBuilder.html new file mode 100644 index 0000000..aead434 --- /dev/null +++ b/docs/PIXI.smooth.PolyBuilder.html @@ -0,0 +1,933 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: PolyBuilder

+ + + +
+ +
+
+

+ + PIXI.smooth.PolyBuilder + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.PolyBuilder + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + +

Implements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.RectangleBuilder.html b/docs/PIXI.smooth.RectangleBuilder.html new file mode 100644 index 0000000..bd5f853 --- /dev/null +++ b/docs/PIXI.smooth.RectangleBuilder.html @@ -0,0 +1,933 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: RectangleBuilder

+ + + +
+ +
+
+

+ + PIXI.smooth.RectangleBuilder + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.RectangleBuilder + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + +

Implements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.RoundedRectangleBuilder.html b/docs/PIXI.smooth.RoundedRectangleBuilder.html new file mode 100644 index 0000000..d87424c --- /dev/null +++ b/docs/PIXI.smooth.RoundedRectangleBuilder.html @@ -0,0 +1,933 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: RoundedRectangleBuilder

+ + + +
+ +
+
+

+ + PIXI.smooth.RoundedRectangleBuilder + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.RoundedRectangleBuilder + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + +

Implements

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.SegmentPacker.html b/docs/PIXI.smooth.SegmentPacker.html new file mode 100644 index 0000000..03db8e1 --- /dev/null +++ b/docs/PIXI.smooth.SegmentPacker.html @@ -0,0 +1,924 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: SegmentPacker

+ + + +
+ +
+
+

+ + PIXI.smooth.SegmentPacker + + +

+ + + +
+
+ +
+
+ + +
+
+

+ + + + new PIXI.smooth.SegmentPacker + + + () + + + + +

+ + +
+
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.SmoothGraphics.html b/docs/PIXI.smooth.SmoothGraphics.html new file mode 100644 index 0000000..fec55d9 --- /dev/null +++ b/docs/PIXI.smooth.SmoothGraphics.html @@ -0,0 +1,863 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: SmoothGraphics

+ + + +
+ +
+
+

+ + PIXI.smooth.SmoothGraphics + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +

Extends

+ +
    + + +
  • Container
  • + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.SmoothGraphicsData.html b/docs/PIXI.smooth.SmoothGraphicsData.html new file mode 100644 index 0000000..af1ca32 --- /dev/null +++ b/docs/PIXI.smooth.SmoothGraphicsData.html @@ -0,0 +1,856 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: SmoothGraphicsData

+ + + +
+ +
+
+

+ + PIXI.smooth.SmoothGraphicsData + + +

+ + +

A class to contain data useful for Graphics objects

+ + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.SmoothGraphicsGeometry.html b/docs/PIXI.smooth.SmoothGraphicsGeometry.html new file mode 100644 index 0000000..dda32d5 --- /dev/null +++ b/docs/PIXI.smooth.SmoothGraphicsGeometry.html @@ -0,0 +1,1831 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: SmoothGraphicsGeometry

+ + + +
+ +
+
+

+ + PIXI.smooth.SmoothGraphicsGeometry + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +

Extends

+ +
    + + +
  • Geometry
  • + +
+ + + + + + + + + + + + + + + + + +

Members

+ + + +
+
+

+ + bounds + PIXI.Bounds + + readonly + + +

+
+
+
+ +

Get the current bounds of the graphic geometry.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + +

Methods

+ + + +
+
+

+ + + + containsPoint + + + (point) Boolean + + + + +

+ + +
+
+
+ +

Check to see if a point is contained within this geometry.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
point + + PIXI.IPointData + + +

Point to check if it's contained.

+ +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + Boolean + + true if the point is contained within geometry.
+ + + + + +
+ + + +
+
+

+ + + + _compareStyles + + + (styleA, styleB) boolean + + protected + + +

+ + +
+
+
+ +

Affinity check

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
styleA + + PIXI.FillStyle | PIXI.LineStyle + + + + +
styleB + + PIXI.FillStyle | PIXI.LineStyle + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + boolean + +
+ + + + + +
+ + + +
+
+

+ + + + buildDrawCalls + + + (shaderSettings) + + protected + + +

+ + +
+
+
+ +

Converts intermediate batches data to drawCalls.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
shaderSettings + + PIXI.smooth.IGraphicsBatchSettings + + + + <optional>
+ + + + + +
+ + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+
+

+ + + + calculateBounds + + + () void + + protected + + +

+ + +
+
+
+ +

Update the local bounds of the object. Expensive to use performance-wise.

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+
+

+ + + + invalidate + + + () void + + protected + + +

+ + +
+
+
+ + +
+

Call if you changed graphicsData manually. +Empties all batch buffers.

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+
+

+ + + + packBatches + + + () void + + protected + + +

+ + +
+
+
+ +

Offset the indices so that it works with the batcher.

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+
+

+ + + + transformPoints + + + (points, matrix) void + + protected + + +

+ + +
+
+
+ +

Transform points using matrix.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
points + + Array<number> + + +

Points to transform

+ +
matrix + + PIXI.Matrix + + +

Transform matrix

+ +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + +
+
+

+ + + + validateBatching + + + () boolean + + protected + + +

+ + +
+
+
+ +

Test geometry for batching process.

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Returns:
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + boolean + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.SmoothGraphicsShader.html b/docs/PIXI.smooth.SmoothGraphicsShader.html new file mode 100644 index 0000000..d1dc193 --- /dev/null +++ b/docs/PIXI.smooth.SmoothGraphicsShader.html @@ -0,0 +1,863 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Class: SmoothGraphicsShader

+ + + +
+ +
+
+

+ + PIXI.smooth.SmoothGraphicsShader + + +

+ + + +
+
+ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +

Extends

+ +
    + + +
  • Shader
  • + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/PIXI.smooth.html b/docs/PIXI.smooth.html new file mode 100644 index 0000000..1cf27b5 --- /dev/null +++ b/docs/PIXI.smooth.html @@ -0,0 +1,1285 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Namespace: smooth

+ + + +
+ +
+
+

+ + PIXI.smooth + + +

+ + + +

Browser namespace for SmoothGraphics.

+ +
+
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + +

Classes

+ +
+
BatchDrawCall
+ + +
BatchPart
+ + +
BatchStyleArray
+ + +
BuildData
+ + +
CircleBuilder
+ + +
DashLineShader
+ + +
FillStyle
+ + +
LineStyle
+ + +
PolyBuilder
+ + +
RectangleBuilder
+ + +
RoundedRectangleBuilder
+ + +
SegmentPacker
+ + +
SmoothGraphics
+ + +
SmoothGraphicsData
+ + +
SmoothGraphicsGeometry
+ + +
SmoothGraphicsShader
+ +
+ + + +

Interface Definitions

+ +
+ +
+
+

+ + IDashParams + + + + + +

+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

+ + IGraphicsBatchSettings + + + + + +

+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

+ + IShapeBuilder + + + + + +

+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + +

Enums

+ + + + +
+

+ PIXI.smooth.LINE_SCALE_MODE +

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +

Methods

+ + + +
+
+

+ + + + matrixEquals + + + (th, matrix, eps) + + + + +

+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
th + + Matrix + + + + + + +
matrix + + Matrix + + + + + + +
eps + + number + + + + 1e-3 + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/fonts/OpenSans-Bold.svg b/docs/fonts/OpenSans-Bold.svg new file mode 100644 index 0000000..464e984 --- /dev/null +++ b/docs/fonts/OpenSans-Bold.svg @@ -0,0 +1,958 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 20102011 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Bold.ttf b/docs/fonts/OpenSans-Bold.ttf new file mode 100644 index 0000000..cf53e6e Binary files /dev/null and b/docs/fonts/OpenSans-Bold.ttf differ diff --git a/docs/fonts/OpenSans-Bold.woff b/docs/fonts/OpenSans-Bold.woff new file mode 100644 index 0000000..c668e45 Binary files /dev/null and b/docs/fonts/OpenSans-Bold.woff differ diff --git a/docs/fonts/OpenSans-Bold.woff2 b/docs/fonts/OpenSans-Bold.woff2 new file mode 100644 index 0000000..c80b2d2 Binary files /dev/null and b/docs/fonts/OpenSans-Bold.woff2 differ diff --git a/docs/fonts/OpenSans-BoldItalic.svg b/docs/fonts/OpenSans-BoldItalic.svg new file mode 100644 index 0000000..cc73325 --- /dev/null +++ b/docs/fonts/OpenSans-BoldItalic.svg @@ -0,0 +1,958 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 20102011 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-BoldItalic.ttf b/docs/fonts/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000..11d107b Binary files /dev/null and b/docs/fonts/OpenSans-BoldItalic.ttf differ diff --git a/docs/fonts/OpenSans-BoldItalic.woff b/docs/fonts/OpenSans-BoldItalic.woff new file mode 100644 index 0000000..ced8f69 Binary files /dev/null and b/docs/fonts/OpenSans-BoldItalic.woff differ diff --git a/docs/fonts/OpenSans-BoldItalic.woff2 b/docs/fonts/OpenSans-BoldItalic.woff2 new file mode 100644 index 0000000..60d8de4 Binary files /dev/null and b/docs/fonts/OpenSans-BoldItalic.woff2 differ diff --git a/docs/fonts/OpenSans-Italic.svg b/docs/fonts/OpenSans-Italic.svg new file mode 100644 index 0000000..f773016 --- /dev/null +++ b/docs/fonts/OpenSans-Italic.svg @@ -0,0 +1,958 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 20102011 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Italic.ttf b/docs/fonts/OpenSans-Italic.ttf new file mode 100644 index 0000000..a309327 Binary files /dev/null and b/docs/fonts/OpenSans-Italic.ttf differ diff --git a/docs/fonts/OpenSans-Italic.woff b/docs/fonts/OpenSans-Italic.woff new file mode 100644 index 0000000..1ed8ab9 Binary files /dev/null and b/docs/fonts/OpenSans-Italic.woff differ diff --git a/docs/fonts/OpenSans-Italic.woff2 b/docs/fonts/OpenSans-Italic.woff2 new file mode 100644 index 0000000..440b74c Binary files /dev/null and b/docs/fonts/OpenSans-Italic.woff2 differ diff --git a/docs/fonts/OpenSans-Light.svg b/docs/fonts/OpenSans-Light.svg new file mode 100644 index 0000000..e481f2c --- /dev/null +++ b/docs/fonts/OpenSans-Light.svg @@ -0,0 +1,958 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 20102011 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Light.ttf b/docs/fonts/OpenSans-Light.ttf new file mode 100644 index 0000000..dddcc62 Binary files /dev/null and b/docs/fonts/OpenSans-Light.ttf differ diff --git a/docs/fonts/OpenSans-Light.woff b/docs/fonts/OpenSans-Light.woff new file mode 100644 index 0000000..937323d Binary files /dev/null and b/docs/fonts/OpenSans-Light.woff differ diff --git a/docs/fonts/OpenSans-Light.woff2 b/docs/fonts/OpenSans-Light.woff2 new file mode 100644 index 0000000..d0b43e0 Binary files /dev/null and b/docs/fonts/OpenSans-Light.woff2 differ diff --git a/docs/fonts/OpenSans-LightItalic.svg b/docs/fonts/OpenSans-LightItalic.svg new file mode 100644 index 0000000..162f95c --- /dev/null +++ b/docs/fonts/OpenSans-LightItalic.svg @@ -0,0 +1,958 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 20102011 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-LightItalic.ttf b/docs/fonts/OpenSans-LightItalic.ttf new file mode 100644 index 0000000..9338bd9 Binary files /dev/null and b/docs/fonts/OpenSans-LightItalic.ttf differ diff --git a/docs/fonts/OpenSans-LightItalic.woff b/docs/fonts/OpenSans-LightItalic.woff new file mode 100644 index 0000000..bc83d1d Binary files /dev/null and b/docs/fonts/OpenSans-LightItalic.woff differ diff --git a/docs/fonts/OpenSans-LightItalic.woff2 b/docs/fonts/OpenSans-LightItalic.woff2 new file mode 100644 index 0000000..21a92a7 Binary files /dev/null and b/docs/fonts/OpenSans-LightItalic.woff2 differ diff --git a/docs/fonts/OpenSans-Regular.svg b/docs/fonts/OpenSans-Regular.svg new file mode 100644 index 0000000..067c09c --- /dev/null +++ b/docs/fonts/OpenSans-Regular.svg @@ -0,0 +1,958 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Digitized data copyright 20102011 Google Corporation +Foundry : Ascender Corporation +Foundry URL : httpwwwascendercorpcom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/OpenSans-Regular.ttf b/docs/fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..a135120 Binary files /dev/null and b/docs/fonts/OpenSans-Regular.ttf differ diff --git a/docs/fonts/OpenSans-Regular.woff b/docs/fonts/OpenSans-Regular.woff new file mode 100644 index 0000000..bd0f824 Binary files /dev/null and b/docs/fonts/OpenSans-Regular.woff differ diff --git a/docs/fonts/OpenSans-Regular.woff2 b/docs/fonts/OpenSans-Regular.woff2 new file mode 100644 index 0000000..f778f9c Binary files /dev/null and b/docs/fonts/OpenSans-Regular.woff2 differ diff --git a/docs/fonts/glyphicons-halflings-regular.eot b/docs/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.eot differ diff --git a/docs/fonts/glyphicons-halflings-regular.svg b/docs/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/docs/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/glyphicons-halflings-regular.ttf b/docs/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.ttf differ diff --git a/docs/fonts/glyphicons-halflings-regular.woff b/docs/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.woff differ diff --git a/docs/fonts/glyphicons-halflings-regular.woff2 b/docs/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/docs/icons/chevron-down.svg b/docs/icons/chevron-down.svg new file mode 100644 index 0000000..0ba78a5 --- /dev/null +++ b/docs/icons/chevron-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..99460b9 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,868 @@ + + + + + PixiJS Smooth Graphics API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+

Home

+ + + + + + + +
+

PixiJS Smooth Graphics

+

PixiJS v7 plugin for making smooth shapes using HHAA shader.

+

Build npm version

+

:link: Links

+ +

Features

+

This is very early version of the plugin.

+

Here's how it looks, compared to pixi graphics (antialias=false)

+

img_1.png

+

You can find examples in examples folder, you have to start the local webserver in repo folder to view them.

+

How to draw lines

+

This is drop-in replacement of PIXI.Graphics, API is compatible.

+
import { SmoothGraphics as Graphics } from '@pixi/graphics-smooth';
+
+const graphics = new Graphics();
+
+graphics.moveTo(100, 100);
+graphics.lineTo(200, 200);
+
+

LineScaleMode

+

For lines, native mode is renamed to scaleMode, you can ignore scale of element or even set default value for it!

+
import { SmoothGraphics, LINE_SCALE_MODE, settings } from '@pixi/graphics-smooth';
+
+graphics.lineStyle({ width: 2.0, scaleMode: LINE_SCALE_MODE.NONE }); // now its always 2 independent from scale
+
+//alternatively
+settings.LINE_SCALE_MODE = LINE_SCALE_MODE.NONE;
+
+const graphics2 = new SmoothGraphics();
+graphics.lineStyle(2.0, 0xffffff, 1.0); //the usual, but scaleMode works by default
+
+settings.LINE_SCALE_MODE = LINE_SCALE_MODE.NORMAL;
+graphics.lineStyle(2.0, 0xffffff, 1.0); //its normal again
+
+

Note: NONE was the only option for graphics-smooth <= 0.0.6. Please update your code if you used early versions!

+

How to draw fills

+

Fills have a bit of a problem - smoothing works good only on concave objects. +It works only on circles and polygons. It is not implemented for rects and rounded rects yet.

+
graphics.beginFill(0xffffff, 1.0, true); //third param for beginFill
+
+

HHAA doesn't work with texture fill yet.

+

drawStar and other graphics-extras

+

That's what you have to do if you need functions from graphics-extras package:

+
import { SmoothGraphics } from '@pixi/graphics-smooth';
+import { Graphics } from '@pixi/graphics';
+import '@pixi/graphics-extras';
+
+Object.assign(SmoothGraphics.prototype, {
+    drawTorus: Graphics.prototype.drawTorus,
+    drawChamferRect: Graphics.prototype.drawChamferRect,
+    drawFilletRect: Graphics.prototype.drawFilletRect,
+    drawRegularPolygon: Graphics.prototype.drawRegularPolygon,
+    drawRoundedPolygon: Graphics.prototype.drawRoundedPolygon,
+    drawStar: Graphics.prototype.drawStar,
+});
+
+

For UMD:

+
PIXI.smooth.SmoothGraphics.prototype.drawStar = PIXI.Graphics.prototype.drawStar;
+
+

Pixel Perfect

+

You might notice that for diagonal lines, coverage differs from canvas2d a lot, especially if you do line animations. Solution is easy:

+
import { settings } from '@pixi/graphics-smooth';
+settings.PIXEL_LINE = 1;
+
+

It has to be done before first GraphicsSmooth is created.

+

This setting is disabled by default because it adds extra computations in coverage calculation. It is not researched yet how it will affect performance.

+

What are we working on

+
    +
  • better AA on fills
  • +
  • support for line textures
  • +
  • rope mode for line textures
  • +
+

Performance

+

Currently graphics geometry uses 11 floats per vertex, when original graphics used only 8. Number of vertices also differ, it might use up to 2x of original.

+

Uniforms are used to store styles depends on (lineWidth * scaleMode, lineAlignment, texture, matrix).

+

If style buffer is too big (for now its max 24), one more drawcall will spawn.

+

What are we working on

+
    +
  • support instancing
  • +
  • support Uniform Buffer Objects
  • +
  • support batching of multiple graphics elements
  • +
+

Build & Test

+
npm install
+npm start
+
+
+
+ + + + + + + + + +
+ +
+
+
+ + + + + + + + diff --git a/docs/scripts/Apache-License-2.0.txt b/docs/scripts/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/scripts/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/scripts/bootstrap.min.js b/docs/scripts/bootstrap.min.js new file mode 100644 index 0000000..1a6258e --- /dev/null +++ b/docs/scripts/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.0.3 (http://getbootstrap.com) + * Copyright 2013 Twitter, Inc. + * Licensed under http://www.apache.org/licenses/LICENSE-2.0 + */ + +if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/docs/scripts/jquery.min.js b/docs/scripts/jquery.min.js new file mode 100644 index 0000000..9a85bd3 --- /dev/null +++ b/docs/scripts/jquery.min.js @@ -0,0 +1,6 @@ +/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/ +(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) +};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*\s*$/g,ct={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("