From 98eb513e1164c1434e4d18952700e2ac27d01ce9 Mon Sep 17 00:00:00 2001 From: ruanwujing <1220792244@qq.com> Date: Tue, 30 Jan 2024 18:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=9C=E8=89=B2=E5=80=BC=E4=BC=A0=E5=8F=82?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=97=A0=E8=A7=86uv=E5=90=88=E6=89=B9?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E7=9A=84sdf=E5=9C=86=E5=BD=A2=E8=A3=81?= =?UTF-8?q?=E5=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/chunks.meta | 9 + assets/resources/chunks/sdf2d.chunk | 558 +++++++ assets/resources/chunks/sdf2d.chunk.meta | 9 + .../effects/color_sdf2d_circle.effect | 94 ++ .../effects/color_sdf2d_circle.effect.meta | 11 + .../materials/color_sdf2d_circle.mtl | 31 + .../materials/color_sdf2d_circle.mtl.meta | 11 + assets/resources/scenes/sdf2d.scene | 1386 +++++++++++++++++ assets/resources/scenes/sdf2d.scene.meta | 11 + assets/resources/ui/atlas.meta | 9 + assets/resources/ui/icons/abstractTile_26.png | Bin 0 -> 1190 bytes .../ui/icons/abstractTile_26.png.meta | 134 ++ assets/resources/ui/icons/abstractTile_27.png | Bin 0 -> 1185 bytes .../ui/icons/abstractTile_27.png.meta | 134 ++ assets/resources/ui/icons/abstractTile_28.png | Bin 0 -> 1611 bytes .../ui/icons/abstractTile_28.png.meta | 134 ++ assets/resources/ui/icons/abstractTile_29.png | Bin 0 -> 1614 bytes .../ui/icons/abstractTile_29.png.meta | 134 ++ assets/resources/ui/icons/abstractTile_30.png | Bin 0 -> 1187 bytes .../ui/icons/abstractTile_30.png.meta | 134 ++ .../scripts/components/ColorSDFAssembler.ts | 173 ++ .../components/ColorSDFAssembler.ts.meta | 9 + assets/scripts/components/ColorSDFSprite.ts | 273 ++++ .../scripts/components/ColorSDFSprite.ts.meta | 9 + 24 files changed, 3263 insertions(+) create mode 100644 assets/resources/chunks.meta create mode 100644 assets/resources/chunks/sdf2d.chunk create mode 100644 assets/resources/chunks/sdf2d.chunk.meta create mode 100644 assets/resources/effects/color_sdf2d_circle.effect create mode 100644 assets/resources/effects/color_sdf2d_circle.effect.meta create mode 100644 assets/resources/materials/color_sdf2d_circle.mtl create mode 100644 assets/resources/materials/color_sdf2d_circle.mtl.meta create mode 100644 assets/resources/scenes/sdf2d.scene create mode 100644 assets/resources/scenes/sdf2d.scene.meta create mode 100644 assets/resources/ui/atlas.meta create mode 100644 assets/resources/ui/icons/abstractTile_26.png create mode 100644 assets/resources/ui/icons/abstractTile_26.png.meta create mode 100644 assets/resources/ui/icons/abstractTile_27.png create mode 100644 assets/resources/ui/icons/abstractTile_27.png.meta create mode 100644 assets/resources/ui/icons/abstractTile_28.png create mode 100644 assets/resources/ui/icons/abstractTile_28.png.meta create mode 100644 assets/resources/ui/icons/abstractTile_29.png create mode 100644 assets/resources/ui/icons/abstractTile_29.png.meta create mode 100644 assets/resources/ui/icons/abstractTile_30.png create mode 100644 assets/resources/ui/icons/abstractTile_30.png.meta create mode 100644 assets/scripts/components/ColorSDFAssembler.ts create mode 100644 assets/scripts/components/ColorSDFAssembler.ts.meta create mode 100644 assets/scripts/components/ColorSDFSprite.ts create mode 100644 assets/scripts/components/ColorSDFSprite.ts.meta diff --git a/assets/resources/chunks.meta b/assets/resources/chunks.meta new file mode 100644 index 0000000..08ab55d --- /dev/null +++ b/assets/resources/chunks.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "b111b3ba-bc35-4e1b-a473-52d58150039c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/chunks/sdf2d.chunk b/assets/resources/chunks/sdf2d.chunk new file mode 100644 index 0000000..52d0d58 --- /dev/null +++ b/assets/resources/chunks/sdf2d.chunk @@ -0,0 +1,558 @@ +float sdCircle( vec2 p, float r ) +{ + return length(p) - r; +} + +float sdRoundedBox( in vec2 p, in vec2 b, in vec4 r ) +{ + r.xy = (p.x>0.0)?r.xy : r.zw; + r.x = (p.y>0.0)?r.x : r.y; + vec2 q = abs(p)-b+r.x; + return min(max(q.x,q.y),0.0) + length(max(q,0.0)) - r.x; +} + +float sdBox( in vec2 p, in vec2 b ) +{ + vec2 d = abs(p)-b; + return length(max(d,0.0)) + min(max(d.x,d.y),0.0); +} + +float sdOrientedBox( in vec2 p, in vec2 a, in vec2 b, float th ) +{ + float l = length(b-a); + vec2 d = (b-a)/l; + vec2 q = (p-(a+b)*0.5); + q = mat2(d.x,-d.y,d.y,d.x)*q; + q = abs(q)-vec2(l,th)*0.5; + return length(max(q,0.0)) + min(max(q.x,q.y),0.0); +} + +float sdSegment( in vec2 p, in vec2 a, in vec2 b ) +{ + vec2 pa = p-a, ba = b-a; + float h = clamp( dot(pa,ba)/dot(ba,ba), 0.0, 1.0 ); + return length( pa - ba*h ); +} + +float ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; } +float sdRhombus( in vec2 p, in vec2 b ) +{ + p = abs(p); + float h = clamp( ndot(b-2.0*p,b)/dot(b,b), -1.0, 1.0 ); + float d = length( p-0.5*b*vec2(1.0-h,1.0+h) ); + return d * sign( p.x*b.y + p.y*b.x - b.x*b.y ); +} + +float sdTrapezoid( in vec2 p, in float r1, float r2, float he ) +{ + vec2 k1 = vec2(r2,he); + vec2 k2 = vec2(r2-r1,2.0*he); + p.x = abs(p.x); + vec2 ca = vec2(p.x-min(p.x,(p.y<0.0)?r1:r2), abs(p.y)-he); + vec2 cb = p - k1 + k2*clamp( dot(k1-p,k2)/dot2(k2), 0.0, 1.0 ); + float s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0; + return s*sqrt( min(dot2(ca),dot2(cb)) ); +} + +float sdParallelogram( in vec2 p, float wi, float he, float sk ) +{ + vec2 e = vec2(sk,he); + p = (p.y<0.0)?-p:p; + vec2 w = p - e; w.x -= clamp(w.x,-wi,wi); + vec2 d = vec2(dot(w,w), -w.y); + float s = p.x*e.y - p.y*e.x; + p = (s<0.0)?-p:p; + vec2 v = p - vec2(wi,0); v -= e*clamp(dot(v,e)/dot(e,e),-1.0,1.0); + d = min( d, vec2(dot(v,v), wi*he-abs(s))); + return sqrt(d.x)*sign(-d.y); +} + +float sdEquilateralTriangle( in vec2 p, in float r ) +{ + const float k = sqrt(3.0); + p.x = abs(p.x) - r; + p.y = p.y + r/k; + if( p.x+k*p.y>0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0; + p.x -= clamp( p.x, -2.0*r, 0.0 ); + return -length(p)*sign(p.y); +} + +float sdTriangleIsosceles( in vec2 p, in vec2 q ) +{ + p.x = abs(p.x); + vec2 a = p - q*clamp( dot(p,q)/dot(q,q), 0.0, 1.0 ); + vec2 b = p - q*vec2( clamp( p.x/q.x, 0.0, 1.0 ), 1.0 ); + float s = -sign( q.y ); + vec2 d = min( vec2( dot(a,a), s*(p.x*q.y-p.y*q.x) ), + vec2( dot(b,b), s*(p.y-q.y) )); + return -sqrt(d.x)*sign(d.y); +} + +float sdTriangle( in vec2 p, in vec2 p0, in vec2 p1, in vec2 p2 ) +{ + vec2 e0 = p1-p0, e1 = p2-p1, e2 = p0-p2; + vec2 v0 = p -p0, v1 = p -p1, v2 = p -p2; + vec2 pq0 = v0 - e0*clamp( dot(v0,e0)/dot(e0,e0), 0.0, 1.0 ); + vec2 pq1 = v1 - e1*clamp( dot(v1,e1)/dot(e1,e1), 0.0, 1.0 ); + vec2 pq2 = v2 - e2*clamp( dot(v2,e2)/dot(e2,e2), 0.0, 1.0 ); + float s = sign( e0.x*e2.y - e0.y*e2.x ); + vec2 d = min(min(vec2(dot(pq0,pq0), s*(v0.x*e0.y-v0.y*e0.x)), + vec2(dot(pq1,pq1), s*(v1.x*e1.y-v1.y*e1.x))), + vec2(dot(pq2,pq2), s*(v2.x*e2.y-v2.y*e2.x))); + return -sqrt(d.x)*sign(d.y); +} + +float sdUnevenCapsule( vec2 p, float r1, float r2, float h ) +{ + p.x = abs(p.x); + float b = (r1-r2)/h; + float a = sqrt(1.0-b*b); + float k = dot(p,vec2(-b,a)); + if( k < 0.0 ) return length(p) - r1; + if( k > a*h ) return length(p-vec2(0.0,h)) - r2; + return dot(p, vec2(a,b) ) - r1; +} + +float sdPentagon( in vec2 p, in float r ) +{ + const vec3 k = vec3(0.809016994,0.587785252,0.726542528); + p.x = abs(p.x); + p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y); + p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y); + p -= vec2(clamp(p.x,-r*k.z,r*k.z),r); + return length(p)*sign(p.y); +} + +float sdHexagon( in vec2 p, in float r ) +{ + const vec3 k = vec3(-0.866025404,0.5,0.577350269); + p = abs(p); + p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; + p -= vec2(clamp(p.x, -k.z*r, k.z*r), r); + return length(p)*sign(p.y); +} + +float sdOctogon( in vec2 p, in float r ) +{ + const vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 ); + p = abs(p); + p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y); + p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y); + p -= vec2(clamp(p.x, -k.z*r, k.z*r), r); + return length(p)*sign(p.y); +} + +float sdHexagram( in vec2 p, in float r ) +{ + const vec4 k = vec4(-0.5,0.8660254038,0.5773502692,1.7320508076); + p = abs(p); + p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; + p -= 2.0*min(dot(k.yx,p),0.0)*k.yx; + p -= vec2(clamp(p.x,r*k.z,r*k.w),r); + return length(p)*sign(p.y); +} + +float sdStar5(in vec2 p, in float r, in float rf) +{ + const vec2 k1 = vec2(0.809016994375, -0.587785252292); + const vec2 k2 = vec2(-k1.x,k1.y); + p.x = abs(p.x); + p -= 2.0*max(dot(k1,p),0.0)*k1; + p -= 2.0*max(dot(k2,p),0.0)*k2; + p.x = abs(p.x); + p.y -= r; + vec2 ba = rf*vec2(-k1.y,k1.x) - vec2(0,1); + float h = clamp( dot(p,ba)/dot(ba,ba), 0.0, r ); + return length(p-ba*h) * sign(p.y*ba.x-p.x*ba.y); +} + +float sdStar( in vec2 p, in float r, in int n, in float m) +{ + // next 4 lines can be precomputed for a given shape + float an = 3.141593/float(n); + float en = 3.141593/m; // m is between 2 and n + vec2 acs = vec2(cos(an),sin(an)); + vec2 ecs = vec2(cos(en),sin(en)); // ecs=vec2(0,1) for regular polygon + + float bn = mod(atan(p.x,p.y),2.0*an) - an; + p = length(p)*vec2(cos(bn),abs(sin(bn))); + p -= r*acs; + p += ecs*clamp( -dot(p,ecs), 0.0, r*acs.y/ecs.y); + return length(p)*sign(p.x); +} + +float sdPie( in vec2 p, in vec2 c, in float r ) +{ + p.x = abs(p.x); + float l = length(p) - r; + float m = length(p-c*clamp(dot(p,c),0.0,r)); // c=sin/cos of aperture + return max(l,m*sign(c.y*p.x-c.x*p.y)); +} + +float sdCutDisk( in vec2 p, in float r, in float h ) +{ + float w = sqrt(r*r-h*h); // constant for any given shape + p.x = abs(p.x); + float s = max( (h-r)*p.x*p.x+w*w*(h+r-2.0*p.y), h*p.x-w*p.y ); + return (s<0.0) ? length(p)-r : + (p.xsc.x*p.y) ? length(p-sc*ra) : + abs(length(p)-ra)) - rb; +} + +float sdRing( in vec2 p, in vec2 n, in float r, float th ) +{ + p.x = abs(p.x); + + p = mat2x2(n.x,n.y,-n.y,n.x)*p; + + return max( abs(length(p)-r)-th*0.5, + length(vec2(p.x,max(0.0,abs(r-p.y)-th*0.5)))*sign(p.x) ); +} + +float sdHorseshoe( in vec2 p, in vec2 c, in float r, in vec2 w ) +{ + p.x = abs(p.x); + float l = length(p); + p = mat2(-c.x, c.y, c.y, c.x)*p; + p = vec2((p.y>0.0 || p.x>0.0)?p.x:l*sign(-c.x), + (p.x>0.0)?p.y:l ); + p = vec2(p.x,abs(p.y-r))-w; + return length(max(p,0.0)) + min(0.0,max(p.x,p.y)); +} + +float sdVesica(vec2 p, float r, float d) +{ + p = abs(p); + float b = sqrt(r*r-d*d); + return ((p.y-b)*d>p.x*b) ? length(p-vec2(0.0,b)) + : length(p-vec2(-d,0.0))-r; +} + +float sdOrientedVesica( vec2 p, vec2 a, vec2 b, float w ) +{ + float r = 0.5*length(b-a); + float d = 0.5*(r*r-w*w)/w; + vec2 v = (b-a)/r; + vec2 c = (b+a)*0.5; + vec2 q = 0.5*abs(mat2(v.y,v.x,-v.x,v.y)*(p-c)); + vec3 h = (r*q.x d*d*max(b-p.y,0.0) ) + return length(p-vec2(a,b)); + return max( (length(p )-ra), + -(length(p-vec2(d,0))-rb)); +} + +float sdRoundedCross( in vec2 p, in float h ) +{ + float k = 0.5*(h+1.0/h); + p = abs(p); + return ( p.x<1.0 && p.y1.0 ) + return sqrt(dot2(p-vec2(0.25,0.75))) - sqrt(2.0)/4.0; + return sqrt(min(dot2(p-vec2(0.00,1.00)), + dot2(p-0.5*max(p.x+p.y,0.0)))) * sign(p.x-p.y); +} + +float sdCross( in vec2 p, in vec2 b, float r ) +{ + p = abs(p); p = (p.y>p.x) ? p.yx : p.xy; + vec2 q = p - b; + float k = max(q.y,q.x); + vec2 w = (k>0.0) ? q : vec2(b.y-p.x,-k); + return sign(k)*length(max(w,0.0)) + r; +} + +float sdRoundedX( in vec2 p, in float w, in float r ) +{ + p = abs(p); + return length(p-min(p.x+p.y,w)*0.5) - r; +} + +float sdPolygon( in vec2[N] v, in vec2 p ) +{ + float d = dot(p-v[0],p-v[0]); + float s = 1.0; + for( int i=0, j=N-1; i=v[i].y,p.ye.y*w.x); + if( all(c) || all(not(c)) ) s*=-1.0; + } + return s*sqrt(d); +} + +float sdEllipse( in vec2 p, in vec2 ab ) +{ + p = abs(p); if( p.x > p.y ) {p=p.yx;ab=ab.yx;} + float l = ab.y*ab.y - ab.x*ab.x; + float m = ab.x*p.x/l; float m2 = m*m; + float n = ab.y*p.y/l; float n2 = n*n; + float c = (m2+n2-1.0)/3.0; float c3 = c*c*c; + float q = c3 + m2*n2*2.0; + float d = c3 + m2*n2; + float g = m + m*n2; + float co; + if( d<0.0 ) + { + float h = acos(q/c3)/3.0; + float s = cos(h); + float t = sin(h)*sqrt(3.0); + float rx = sqrt( -c*(s + t + 2.0) + m2 ); + float ry = sqrt( -c*(s - t + 2.0) + m2 ); + co = (ry+sign(l)*rx+abs(g)/(rx*ry)- m)/2.0; + } + else + { + float h = 2.0*m*n*sqrt( d ); + float s = sign(q+h)*pow(abs(q+h), 1.0/3.0); + float u = sign(q-h)*pow(abs(q-h), 1.0/3.0); + float rx = -s - u - c*4.0 + 2.0*m2; + float ry = (s - u)*sqrt(3.0); + float rm = sqrt( rx*rx + ry*ry ); + co = (ry/sqrt(rm-rx)+2.0*g/rm-m)/2.0; + } + vec2 r = ab * vec2(co, sqrt(1.0-co*co)); + return length(r-p) * sign(p.y-r.y); +} + +float sdParabola( in vec2 pos, in float k ) +{ + pos.x = abs(pos.x); + float ik = 1.0/k; + float p = ik*(pos.y - 0.5*ik)/3.0; + float q = 0.25*ik*ik*pos.x; + float h = q*q - p*p*p; + float r = sqrt(abs(h)); + float x = (h>0.0) ? + pow(q+r,1.0/3.0) - pow(abs(q-r),1.0/3.0)*sign(r-q) : + 2.0*cos(atan(r,q)/3.0)*sqrt(p); + return length(pos-vec2(x,k*x*x)) * sign(pos.x-x); +} + +float sdParabola( in vec2 pos, in float wi, in float he ) +{ + pos.x = abs(pos.x); + float ik = wi*wi/he; + float p = ik*(he-pos.y-0.5*ik)/3.0; + float q = pos.x*ik*ik*0.25; + float h = q*q - p*p*p; + float r = sqrt(abs(h)); + float x = (h>0.0) ? + pow(q+r,1.0/3.0) - pow(abs(q-r),1.0/3.0)*sign(r-q) : + 2.0*cos(atan(r/q)/3.0)*sqrt(p); + x = min(x,wi); + return length(pos-vec2(x,he-x*x/ik)) * + sign(ik*(pos.y-he)+pos.x*pos.x); +} + +float sdBezier( in vec2 pos, in vec2 A, in vec2 B, in vec2 C ) +{ + vec2 a = B - A; + vec2 b = A - 2.0*B + C; + vec2 c = a * 2.0; + vec2 d = A - pos; + float kk = 1.0/dot(b,b); + float kx = kk * dot(a,b); + float ky = kk * (2.0*dot(a,a)+dot(d,b)) / 3.0; + float kz = kk * dot(d,a); + float res = 0.0; + float p = ky - kx*kx; + float p3 = p*p*p; + float q = kx*(2.0*kx*kx-3.0*ky) + kz; + float h = q*q + 4.0*p3; + if( h >= 0.0) + { + h = sqrt(h); + vec2 x = (vec2(h,-h)-q)/2.0; + vec2 uv = sign(x)*pow(abs(x), vec2(1.0/3.0)); + float t = clamp( uv.x+uv.y-kx, 0.0, 1.0 ); + res = dot2(d + (c + b*t)*t); + } + else + { + float z = sqrt(-p); + float v = acos( q/(p*z*2.0) ) / 3.0; + float m = cos(v); + float n = sin(v)*1.732050808; + vec3 t = clamp(vec3(m+m,-n-m,n-m)*z-kx,0.0,1.0); + res = min( dot2(d+(c+b*t.x)*t.x), + dot2(d+(c+b*t.y)*t.y) ); + // the third root cannot be the closest + // res = min(res,dot2(d+(c+b*t.z)*t.z)); + } + return sqrt( res ); +} + +float sdBlobbyCross( in vec2 pos, float he ) +{ + pos = abs(pos); + pos = vec2(abs(pos.x-pos.y),1.0-pos.x-pos.y)/sqrt(2.0); + + float p = (he-pos.y-0.25/he)/(6.0*he); + float q = pos.x/(he*he*16.0); + float h = q*q - p*p*p; + + float x; + if( h>0.0 ) { float r = sqrt(h); x = pow(q+r,1.0/3.0)-pow(abs(q-r),1.0/3.0)*sign(r-q); } + else { float r = sqrt(p); x = 2.0*r*cos(acos(q/(p*r))/3.0); } + x = min(x,sqrt(2.0)/2.0); + + vec2 z = vec2(x,he*(1.0-2.0*x*x)) - pos; + return length(z) * sign(z.y); +} + +float sdTunnel( in vec2 p, in vec2 wh ) +{ + p.x = abs(p.x); p.y = -p.y; + vec2 q = p - wh; + + float d1 = dot2(vec2(max(q.x,0.0),q.y)); + q.x = (p.y>0.0) ? q.x : length(p)-wh.x; + float d2 = dot2(vec2(q.x,max(q.y,0.0))); + float d = sqrt( min(d1,d2) ); + + return (max(q.x,q.y)<0.0) ? -d : d; +} + +float sdStairs( in vec2 p, in vec2 wh, in float n ) +{ + vec2 ba = wh*n; + float d = min(dot2(p-vec2(clamp(p.x,0.0,ba.x),0.0)), + dot2(p-vec2(ba.x,clamp(p.y,0.0,ba.y))) ); + float s = sign(max(-p.y,p.x-ba.x) ); + + float dia = length(wh); + p = mat2(wh.x,-wh.y, wh.y,wh.x)*p/dia; + float id = clamp(round(p.x/dia),0.0,n-1.0); + p.x = p.x - id*dia; + p = mat2(wh.x, wh.y,-wh.y,wh.x)*p/dia; + + float hh = wh.y/2.0; + p.y -= hh; + if( p.y>hh*sign(p.x) ) s=1.0; + p = (id<0.5 || p.x>0.0) ? p : -p; + d = min( d, dot2(p-vec2(0.0,clamp(p.y,-hh,hh))) ); + d = min( d, dot2(p-vec2(clamp(p.x,0.0,wh.x),hh)) ); + + return sqrt(d)*s; +} + +float sdQuadraticCircle( in vec2 p ) +{ + p = abs(p); if( p.y>p.x ) p=p.yx; + + float a = p.x-p.y; + float b = p.x+p.y; + float c = (2.0*b-1.0)/3.0; + float h = a*a + c*c*c; + float t; + if( h>=0.0 ) + { + h = sqrt(h); + t = sign(h-a)*pow(abs(h-a),1.0/3.0) - pow(h+a,1.0/3.0); + } + else + { + float z = sqrt(-c); + float v = acos(a/(c*z))/3.0; + t = -z*(cos(v)+sin(v)*1.732050808); + } + t *= 0.5; + vec2 w = vec2(-t,t) + 0.75 - t*t - p; + return length(w) * sign( a*a*0.5+b-1.5 ); +} + +float sdHyberbola( in vec2 p, in float k, in float he ) // k in (0,inf) +{ + p = abs(p); + p = vec2(p.x-p.y,p.x+p.y)/sqrt(2.0); + + float x2 = p.x*p.x/16.0; + float y2 = p.y*p.y/16.0; + float r = k*(4.0*k - p.x*p.y)/12.0; + float q = (x2 - y2)*k*k; + float h = q*q + r*r*r; + float u; + if( h<0.0 ) + { + float m = sqrt(-r); + u = m*cos( acos(q/(r*m))/3.0 ); + } + else + { + float m = pow(sqrt(h)-q,1.0/3.0); + u = (m - r/m)/2.0; + } + float w = sqrt( u + x2 ); + float b = k*p.y - x2*p.x*2.0; + float t = p.x/4.0 - w + sqrt( 2.0*x2 - u + b/w/4.0 ); + t = max(t,sqrt(he*he*0.5+k)-he/sqrt(2.0)); + float d = length( p-vec2(t,k/t) ); + return p.x*p.y < k ? d : -d; +} + +float sdfCoolS( in vec2 p ) +{ + float six = (p.y<0.0) ? -p.x : p.x; + p.x = abs(p.x); + p.y = abs(p.y) - 0.2; + float rex = p.x - min(round(p.x/0.4),0.4); + float aby = abs(p.y-0.2)-0.6; + + float d = dot2(vec2(six,-p.y)-clamp(0.5*(six-p.y),0.0,0.2)); + d = min(d,dot2(vec2(p.x,-aby)-clamp(0.5*(p.x-aby),0.0,0.4))); + d = min(d,dot2(vec2(rex,p.y -clamp(p.y ,0.0,0.4)))); + + float s = 2.0*p.x + aby + abs(aby+0.4) - 0.4; + return sqrt(d) * sign(s); +} + +float sdCircleWave( in vec2 p, in float tb, in float ra ) +{ + tb = 3.1415927*5.0/6.0*max(tb,0.0001); + vec2 co = ra*vec2(sin(tb),cos(tb)); + p.x = abs(mod(p.x,co.x*4.0)-co.x*2.0); + vec2 p1 = p; + vec2 p2 = vec2(abs(p.x-2.0*co.x),-p.y+2.0*co.y); + float d1 = ((co.y*p1.x>co.x*p1.y) ? length(p1-co) : abs(length(p1)-ra)); + float d2 = ((co.y*p2.x>co.x*p2.y) ? length(p2-co) : abs(length(p2)-ra)); + return min(d1, d2); +} \ No newline at end of file diff --git a/assets/resources/chunks/sdf2d.chunk.meta b/assets/resources/chunks/sdf2d.chunk.meta new file mode 100644 index 0000000..1d3b3eb --- /dev/null +++ b/assets/resources/chunks/sdf2d.chunk.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.7", + "importer": "effect-header", + "imported": true, + "uuid": "cd5b10df-3814-4634-a1ec-4f1b03c1984b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/effects/color_sdf2d_circle.effect b/assets/resources/effects/color_sdf2d_circle.effect new file mode 100644 index 0000000..77b0544 --- /dev/null +++ b/assets/resources/effects/color_sdf2d_circle.effect @@ -0,0 +1,94 @@ +// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. +CCEffect %{ + techniques: + - passes: + - vert: sprite-vs:vert + frag: sprite-fs:frag + depthStencilState: + depthTest: false + depthWrite: false + blendState: + targets: + - blend: true + blendSrc: src_alpha + blendDst: one_minus_src_alpha + blendDstAlpha: one_minus_src_alpha + rasterizerState: + cullMode: none + properties: + alphaThreshold: { value: 0.5 } +}% + +CCProgram sprite-vs %{ + precision highp float; + #include + #if USE_LOCAL + #include + #endif + #if SAMPLE_FROM_RT + #include + #endif + in vec3 a_position; + in vec2 a_texCoord; + in vec4 a_color; + + out vec4 color; + out vec2 uv0; + + vec4 vert () { + vec4 pos = vec4(a_position, 1); + + #if USE_LOCAL + pos = cc_matWorld * pos; + #endif + + #if USE_PIXEL_ALIGNMENT + pos = cc_matView * pos; + pos.xyz = floor(pos.xyz); + pos = cc_matProj * pos; + #else + pos = cc_matViewProj * pos; + #endif + + uv0 = a_texCoord; + #if SAMPLE_FROM_RT + CC_HANDLE_RT_SAMPLE_FLIP(uv0); + #endif + color = a_color; + + return pos; + } +}% + +CCProgram sprite-fs %{ + precision highp float; + #include + #include + #include "../chunks/sdf2d" + in vec4 color; + + #if USE_TEXTURE + in vec2 uv0; + #pragma builtin(local) + layout(set = 2, binding = 12) uniform sampler2D cc_spriteTexture; + #endif + + vec4 frag () { + vec4 o = vec4(1, 1, 1, 1); + + #if USE_TEXTURE + o *= CCSampleWithAlphaSeparated(cc_spriteTexture, uv0); + #if IS_GRAY + float gray = 0.2126 * o.r + 0.7152 * o.g + 0.0722 * o.b; + o.r = o.g = o.b = gray; + #endif + #endif + + vec2 uv = (uv0 - color.xy) / color.zw; + float d = sdCircle(uv - 0.5, 0.5); + float c = smoothstep(0.01, -0.01, d); + o.a *= c; + ALPHA_TEST(o); + return o; + } +}% diff --git a/assets/resources/effects/color_sdf2d_circle.effect.meta b/assets/resources/effects/color_sdf2d_circle.effect.meta new file mode 100644 index 0000000..ee8bc66 --- /dev/null +++ b/assets/resources/effects/color_sdf2d_circle.effect.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.7.1", + "importer": "effect", + "imported": true, + "uuid": "53b86133-01bd-45ed-8cf8-94234cba4494", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/materials/color_sdf2d_circle.mtl b/assets/resources/materials/color_sdf2d_circle.mtl new file mode 100644 index 0000000..0a4dcab --- /dev/null +++ b/assets/resources/materials/color_sdf2d_circle.mtl @@ -0,0 +1,31 @@ +{ + "__type__": "cc.Material", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "_effectAsset": { + "__uuid__": "53b86133-01bd-45ed-8cf8-94234cba4494", + "__expectedType__": "cc.EffectAsset" + }, + "_techIdx": 0, + "_defines": [ + { + "USE_TEXTURE": true + } + ], + "_states": [ + { + "rasterizerState": {}, + "depthStencilState": {}, + "blendState": { + "targets": [ + {} + ] + } + } + ], + "_props": [ + {} + ] +} \ No newline at end of file diff --git a/assets/resources/materials/color_sdf2d_circle.mtl.meta b/assets/resources/materials/color_sdf2d_circle.mtl.meta new file mode 100644 index 0000000..550bdaf --- /dev/null +++ b/assets/resources/materials/color_sdf2d_circle.mtl.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.0.21", + "importer": "material", + "imported": true, + "uuid": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/scenes/sdf2d.scene b/assets/resources/scenes/sdf2d.scene new file mode 100644 index 0000000..5d216bf --- /dev/null +++ b/assets/resources/scenes/sdf2d.scene @@ -0,0 +1,1386 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "sdf2d", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_name": "sdf2d", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 7 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "autoReleaseAssets": false, + "_globals": { + "__id__": 34 + }, + "_id": "2d052f05-f3ae-4ade-a629-7dc0680a169b" + }, + { + "__type__": "cc.Node", + "_name": "Main Light", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": -0.06397656665577071, + "y": -0.44608233363525845, + "z": -0.8239028751062036, + "w": -0.3436591377065261 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": -117.894, + "y": -194.909, + "z": 38.562 + }, + "_id": "c0y6F5f+pAvI805TdmxIjx" + }, + { + "__type__": "cc.DirectionalLight", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 250, + "b": 240, + "a": 255 + }, + "_useColorTemperature": false, + "_colorTemperature": 6550, + "_staticSettings": { + "__id__": 4 + }, + "_visibility": -325058561, + "_illuminanceHDR": 65000, + "_illuminance": 65000, + "_illuminanceLDR": 1.6927083333333335, + "_shadowEnabled": false, + "_shadowPcf": 0, + "_shadowBias": 0.00001, + "_shadowNormalBias": 0, + "_shadowSaturation": 1, + "_shadowDistance": 50, + "_shadowInvisibleOcclusionRange": 200, + "_csmLevel": 4, + "_csmLayerLambda": 0.75, + "_csmOptimizationMode": 2, + "_csmAdvancedOptions": false, + "_csmLayersTransition": false, + "_csmTransitionRange": 0.05, + "_shadowFixedArea": false, + "_shadowNear": 0.1, + "_shadowFar": 10, + "_shadowOrthoSize": 5, + "_id": "597uMYCbhEtJQc0ffJlcgA" + }, + { + "__type__": "cc.StaticLightSettings", + "_baked": false, + "_editorOnly": false, + "_castShadow": false + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -10, + "y": 10, + "z": 10 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": -0.27781593346944056, + "y": -0.36497167621709875, + "z": -0.11507512748638377, + "w": 0.8811195706053617 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": -35, + "y": -45, + "z": 0 + }, + "_id": "c9DMICJLFO5IeO07EPon7U" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_projection": 1, + "_priority": 0, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 10, + "_near": 1, + "_far": 1000, + "_color": { + "__type__": "cc.Color", + "r": 51, + "g": 51, + "b": 51, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 14, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 1822425087, + "_targetTexture": null, + "_postProcess": null, + "_usePostProcess": false, + "_cameraType": -1, + "_trackingType": 0, + "_id": "7dWQTpwS5LrIHnc1zAPUtf" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 13 + }, + { + "__id__": 16 + }, + { + "__id__": 19 + }, + { + "__id__": 22 + }, + { + "__id__": 25 + }, + { + "__id__": 28 + } + ], + "_active": true, + "_components": [ + { + "__id__": 31 + }, + { + "__id__": 32 + }, + { + "__id__": 33 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 640, + "y": 360, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "ea3TZXdAtPhJ1+BzX5RknQ" + }, + { + "__type__": "cc.Node", + "_name": "Camera", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 1000 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "9aC5Dlg8BC8q1P5tc8bo/c" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": null, + "_projection": 0, + "_priority": 1073741824, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 513.8028169014085, + "_near": 1, + "_far": 2000, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 6, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 41943040, + "_targetTexture": null, + "_postProcess": null, + "_usePostProcess": false, + "_cameraType": -1, + "_trackingType": 0, + "_id": "76YOvG7BxNkq3d511Y/lsV" + }, + { + "__type__": "cc.Node", + "_name": "Sprite", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 12 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 429.649, + "y": 49.546, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "cdvHCabYRDU5eqoyx4sldw" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "64qwVXPXRNcJmqx2IER2T8" + }, + { + "__type__": "6845d+/NTJDrKyRKBO2mDiC", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": { + "__uuid__": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "__expectedType__": "cc.Material" + }, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 255, + "a": 255 + }, + "_sizeMode": 0, + "_atlas": null, + "_spriteFrame": { + "__uuid__": "bddc449e-6a35-46d7-9291-273646837fc2@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_id": "95xHA0UV5L9KSHxXGt/Cxv" + }, + { + "__type__": "cc.Node", + "_name": "Sprite", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + }, + { + "__id__": 15 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 235.297, + "y": -229.264, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "a0Lp8vE/hFur+hy+rzrSX0" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "96wxCEKIhAs7WFxUdt5L78" + }, + { + "__type__": "6845d+/NTJDrKyRKBO2mDiC", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": { + "__uuid__": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "__expectedType__": "cc.Material" + }, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 255, + "a": 255 + }, + "_sizeMode": 0, + "_atlas": null, + "_spriteFrame": { + "__uuid__": "1d73d268-60d8-4712-8012-d023bbc1cc94@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_id": "d5jeNNz0NAPICuJkf0ORiG" + }, + { + "__type__": "cc.Node", + "_name": "Sprite-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 18 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -27.15, + "y": -159.882, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "f9CcAHeUJFeo4jWMNonkf9" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "179NSf6eJNKrXUgnlxtQ/W" + }, + { + "__type__": "6845d+/NTJDrKyRKBO2mDiC", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": { + "__uuid__": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "__expectedType__": "cc.Material" + }, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 255, + "a": 255 + }, + "_sizeMode": 0, + "_atlas": null, + "_spriteFrame": { + "__uuid__": "de85f305-c99e-46fc-9079-93d1db81c7b4@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_id": "cbrutxVoNLxpDRIByP34kZ" + }, + { + "__type__": "cc.Node", + "_name": "Sprite-002", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 20 + }, + { + "__id__": 21 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -3.017, + "y": 241.331, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "f4/JIAzO1K/K5ZVIU5Cflt" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "842fKZyi5KPKkzTZtNpRSV" + }, + { + "__type__": "6845d+/NTJDrKyRKBO2mDiC", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": { + "__uuid__": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "__expectedType__": "cc.Material" + }, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 255, + "a": 255 + }, + "_sizeMode": 0, + "_atlas": null, + "_spriteFrame": { + "__uuid__": "d92e2d44-c554-4264-b30c-3c5a535e960b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_id": "4ajo5FG2BGFpb9cYzw83cg" + }, + { + "__type__": "cc.Node", + "_name": "Sprite-003", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 24 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -431.379, + "y": 159.882, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "e2RFd1qsVJmaEWRDNp1LKZ" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "1cFHYwqR5MLa0Bz/4EkqXW" + }, + { + "__type__": "6845d+/NTJDrKyRKBO2mDiC", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": { + "__uuid__": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "__expectedType__": "cc.Material" + }, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 255, + "a": 255 + }, + "_sizeMode": 0, + "_atlas": null, + "_spriteFrame": { + "__uuid__": "2833a55b-f13f-4692-92f1-d8a8213855c6@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_id": "dfir0HY8BMQaurQTHB/Bl4" + }, + { + "__type__": "cc.Node", + "_name": "Sprite-004", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + }, + { + "__id__": 27 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -232.281, + "y": 135.749, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "baFzjsZp1EYLH7/Teqe2vu" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 140, + "height": 140 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "1chW6b+aZMqq2xjj36w3mg" + }, + { + "__type__": "6845d+/NTJDrKyRKBO2mDiC", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": { + "__uuid__": "4ba0fcca-0f92-4795-af0a-f2076bcc63b5", + "__expectedType__": "cc.Material" + }, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 255, + "a": 255 + }, + "_sizeMode": 1, + "_atlas": null, + "_spriteFrame": { + "__uuid__": "890f043a-8cad-46e4-b5b1-584554c0cad1@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_id": "3b5tkeLwlFea1Ltig4iGFr" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 29 + }, + { + "__id__": 30 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "fdaYMch/NCsKNTTMH1NOt/" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 28 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 702.275390625, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "81WyTdS2xLK5HH23JFa2UE" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 28 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "使用shader进行圆形裁切,使用颜色值来传递变化后的uv数据。不受合批影响。", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "4aGTRjMNxCoqiUuq4OFYUi" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 1280, + "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "50mxIY/WFLFq3nQWWrSJYh" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_cameraComponent": { + "__id__": 9 + }, + "_alignCanvasWithScreen": true, + "_id": "19/CnwIVlPVpT/ZMr01dwz" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "37PdnGzVlL2Z6PcVfhlR/4" + }, + { + "__type__": "cc.SceneGlobals", + "ambient": { + "__id__": 35 + }, + "shadows": { + "__id__": 36 + }, + "_skybox": { + "__id__": 37 + }, + "fog": { + "__id__": 38 + }, + "octree": { + "__id__": 39 + }, + "skin": { + "__id__": 40 + }, + "lightProbeInfo": { + "__id__": 41 + }, + "postSettings": { + "__id__": 42 + }, + "bakedWithStationaryMainLight": false, + "bakedWithHighpLightmap": false + }, + { + "__type__": "cc.AmbientInfo", + "_skyColorHDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.5, + "z": 0.8, + "w": 0.520833125 + }, + "_skyColor": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.5, + "z": 0.8, + "w": 0.520833125 + }, + "_skyIllumHDR": 20000, + "_skyIllum": 20000, + "_groundAlbedoHDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.2, + "z": 0.2, + "w": 1 + }, + "_groundAlbedo": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.2, + "z": 0.2, + "w": 1 + }, + "_skyColorLDR": { + "__type__": "cc.Vec4", + "x": 0.452588, + "y": 0.607642, + "z": 0.755699, + "w": 0 + }, + "_skyIllumLDR": 0.8, + "_groundAlbedoLDR": { + "__type__": "cc.Vec4", + "x": 0.618555, + "y": 0.577848, + "z": 0.544564, + "w": 0 + } + }, + { + "__type__": "cc.ShadowsInfo", + "_enabled": false, + "_type": 0, + "_normal": { + "__type__": "cc.Vec3", + "x": 0, + "y": 1, + "z": 0 + }, + "_distance": 0, + "_shadowColor": { + "__type__": "cc.Color", + "r": 76, + "g": 76, + "b": 76, + "a": 255 + }, + "_maxReceived": 4, + "_size": { + "__type__": "cc.Vec2", + "x": 1024, + "y": 1024 + } + }, + { + "__type__": "cc.SkyboxInfo", + "_envLightingType": 0, + "_envmapHDR": { + "__uuid__": "d032ac98-05e1-4090-88bb-eb640dcb5fc1@b47c0", + "__expectedType__": "cc.TextureCube" + }, + "_envmap": { + "__uuid__": "d032ac98-05e1-4090-88bb-eb640dcb5fc1@b47c0", + "__expectedType__": "cc.TextureCube" + }, + "_envmapLDR": { + "__uuid__": "6f01cf7f-81bf-4a7e-bd5d-0afc19696480@b47c0", + "__expectedType__": "cc.TextureCube" + }, + "_diffuseMapHDR": null, + "_diffuseMapLDR": null, + "_enabled": true, + "_useHDR": true, + "_editableMaterial": null, + "_reflectionHDR": null, + "_reflectionLDR": null, + "_rotationAngle": 0 + }, + { + "__type__": "cc.FogInfo", + "_type": 0, + "_fogColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_enabled": false, + "_fogDensity": 0.3, + "_fogStart": 0.5, + "_fogEnd": 300, + "_fogAtten": 5, + "_fogTop": 1.5, + "_fogRange": 1.2, + "_accurate": false + }, + { + "__type__": "cc.OctreeInfo", + "_enabled": false, + "_minPos": { + "__type__": "cc.Vec3", + "x": -1024, + "y": -1024, + "z": -1024 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 1024, + "y": 1024, + "z": 1024 + }, + "_depth": 8 + }, + { + "__type__": "cc.SkinInfo", + "_enabled": true, + "_blurRadius": 0.01, + "_sssIntensity": 3 + }, + { + "__type__": "cc.LightProbeInfo", + "_giScale": 1, + "_giSamples": 1024, + "_bounces": 2, + "_reduceRinging": 0, + "_showProbe": true, + "_showWireframe": true, + "_showConvex": false, + "_data": null, + "_lightProbeSphereVolume": 1 + }, + { + "__type__": "cc.PostSettingsInfo", + "_toneMappingType": 0 + } +] \ No newline at end of file diff --git a/assets/resources/scenes/sdf2d.scene.meta b/assets/resources/scenes/sdf2d.scene.meta new file mode 100644 index 0000000..2573dce --- /dev/null +++ b/assets/resources/scenes/sdf2d.scene.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.1.49", + "importer": "scene", + "imported": true, + "uuid": "2d052f05-f3ae-4ade-a629-7dc0680a169b", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/ui/atlas.meta b/assets/resources/ui/atlas.meta new file mode 100644 index 0000000..bdf7e6f --- /dev/null +++ b/assets/resources/ui/atlas.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "95913e5b-473a-47bf-b9f4-6cd710dff9f2", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/ui/icons/abstractTile_26.png b/assets/resources/ui/icons/abstractTile_26.png new file mode 100644 index 0000000000000000000000000000000000000000..4b1b84a9d3a4ee915ec763847d0e2b81e940327c GIT binary patch literal 1190 zcmV;X1X=ruP)c0000(m)k&=+8uYmJCoTxl-fv|+(wz( zN1EI}mD)s@+c}ciN}Jpxd%`@F+Ch`mLYLbqfW|nH*)oUBN0`}4n%hg9+#q?tIE>FZ zlh{R|(j$GmCxW^pe!C`tx+{>+D2>q~hSV>W%`unEB#6@{i_$HU&MJktAbPzYdA=)# zxG00UB7D3hfV&}ky(xsb9(cYihqo+|&nJx0FqX|Dhtn>U&LxV{Dv!`dqtQ*B-5qzo zEs3``k=Y@I)iasQs|uCy0000fbW%=JzrVjvFF&vEKTnT8Z!eFpZy&$E&mRw;U!M#hQrhBb+qphvV zzOPvzBq1|2|NkEp62M6^A(45fr|%~}J#wxb?>$LO2)xAB=wg?4|8#gM7DOj+kC-m~ z(u@V+5BJ&ZSI6d$%XB>coQ?i`Wd8h)QZzjAfQ>$UZ<@bH5DnjC z4Etal_BVuRczlI1?01u}5e-i~V+{MF6E+1;ZtpXOeLM}@k8d)5{SJ=iVIwgkNm6Hy z$F~^6{%{_)EMfbeICzpV>@*p6qwd)Fg^e?YJ#vNJY+(Yw!Wi~jBJ6P{v(G)juQG=H zh6sCdZA{=M^AX={gt8bGCur1AT=*Zx8;wX@!u)U%bHrO5@iWX1ms`u@6}@0MSI`GE zyp5N`2mM~zB2VpAiyqt)N<@5Ms21&deG>2BCGfsx1zyQ0&hU;x!3QCqTD2CQdSc^p z4r2;#sr_JD*Q~G`o_4$4oPz22__rJMkKgZE;Wr%OptJGuX+FP_FIm>IxO66pVta;< zuUs>#x^q=Sv!WgaS48J;{5WPYo*%C_=FOQ|z zr~t0qV%4Z=&eaV4KVG@B_UEv2&)Xk<}%?)HaWxxV%XT)EWt zhg!Ko?GLeX|4IAvz%z&+uDCz=?j88{pWfbGK>%<6>D}KDqTv^6e<$rn_7g?u_P4{n zHGL8a-2RiWcjixUf!iOU^$mf*A=@9N?vanoLEC?K&Hbn!u>JRTo(e%YYx}RS`rfTT z;i;RHcS11ujWz1KEC~FyFKjsc`fAY2LuP#CTJTHHznbK_6nE2#B>(^b07*qoM6N<$ Ef|j^Q{Qv*} literal 0 HcmV?d00001 diff --git a/assets/resources/ui/icons/abstractTile_26.png.meta b/assets/resources/ui/icons/abstractTile_26.png.meta new file mode 100644 index 0000000..c74d4a2 --- /dev/null +++ b/assets/resources/ui/icons/abstractTile_26.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "bddc449e-6a35-46d7-9291-273646837fc2", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "bddc449e-6a35-46d7-9291-273646837fc2@6c48a", + "displayName": "abstractTile_26", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "bddc449e-6a35-46d7-9291-273646837fc2", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "bddc449e-6a35-46d7-9291-273646837fc2@f9941", + "displayName": "abstractTile_26", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 92, + "height": 80, + "rawWidth": 92, + "rawHeight": 80, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -46, + -40, + 0, + 46, + -40, + 0, + -46, + 40, + 0, + 46, + 40, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 80, + 92, + 80, + 0, + 0, + 92, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -46, + -40, + 0 + ], + "maxPos": [ + 46, + 40, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "bddc449e-6a35-46d7-9291-273646837fc2@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "redirect": "bddc449e-6a35-46d7-9291-273646837fc2@f9941" + } +} diff --git a/assets/resources/ui/icons/abstractTile_27.png b/assets/resources/ui/icons/abstractTile_27.png new file mode 100644 index 0000000000000000000000000000000000000000..0b1d63fdf127fa3117b9989c976b71dd0f2ddccd GIT binary patch literal 1185 zcmV;S1YY}zP)1MdOeb5Ql@%0 zj$t~4S~rVeIf`91j9xg6VLzR1Ql@%3jAJv1RZypTIFVyfrg=JzVj_1{QKx!Qr+ZMR zdNz+>O{RHDq;olqU^k0kQKoxDnPxYPU_YO400018t%O^wf>x=1SgU|yu!vx;hGDOV zTC0Ixu7y>pePghRK9Xlws()IkfLyJEM3-z}t%X#md`z8lWU-24uZTO4WKyDeTDXZ+ zs(n0_XFi#0JeFuZm}*0)bw#RoNV0uEpl?Bc7EpKeLCeo!f>v;Y7ADRfd!Q@_8zFHb+O?=O#UKd(<8k3Vm}zt0~JpI={}58uCk ze?K4Z-|r8S87|8eP6Rd z7BWNg|9?Uu0h}Zg5}9{;d_Vc=k#psE?@40mz)Nh6E_NCBPls1yL3HxYi0Lw~%~%kA zcc0CEb8P;&LdWAT+2}7v=C7Y9MZ**K+33R$rupYLqT$JH#<0Jc=GV^%(eQP~un)#z ze@BRh$5$A`em@Bt(eT6z#;`v*VN>wr_C90S$J4O=_&Vd)@8D=2HWIR;D0b&~e2X#c zkLO{_BDU|DgC`lo&X8d@>yC|I**Ig^BUjk97AElPjA6ec!X9Tb``i=!8e`aRiLfWv z!31tHAMwpbD2HKjf<{frh5u!|(TK!F%nuhZN4&)mKg0ZRxwSlA(F=xi1${unJ9s&K z&{s+pd8*PVdvH%E5%GbcTC`L8B;LhK;C;;sysA;2;a!P>4?;e*YArnV)W+pJ#uVIA z`@yuXSz$Lk>GgVf3DfcMZ#U>4zpq%~Hyq-iv+?n1KEG0|TGq0-cqRx!XNHfj)HWKr za}7hYq86bmF+AewUtbgT3kr(~HpW_|M$_=Fz zeZkr=N;AA8Q&w(RM}~FmiH%D+`pO+FC^JnDUtFi-4$aAdD|g{80a&@Z LfGfA$ zFxr}PZ9~7rD|goZ99Hgm`@^qXqW!^FF4_LjE7#Tj&@0#7{;(_8*ZzPjm)ibND>tb9 zAy)2xX@4Gg7V*O+_Xpp54B!6K+kKKwgSY?m9&M(h;TLLuC+&y!6GiCux5IugeG&@X z{*$nG=1*{e+aIBg%`|~Swm(YUCLfuDw*TIm`%yn&`|s{NPY2o_@(DRw~C*qPO;kP00000NkvXXu0mjfTpT?F literal 0 HcmV?d00001 diff --git a/assets/resources/ui/icons/abstractTile_27.png.meta b/assets/resources/ui/icons/abstractTile_27.png.meta new file mode 100644 index 0000000..ea16d1f --- /dev/null +++ b/assets/resources/ui/icons/abstractTile_27.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "d92e2d44-c554-4264-b30c-3c5a535e960b", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d92e2d44-c554-4264-b30c-3c5a535e960b@6c48a", + "displayName": "abstractTile_27", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "d92e2d44-c554-4264-b30c-3c5a535e960b", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "d92e2d44-c554-4264-b30c-3c5a535e960b@f9941", + "displayName": "abstractTile_27", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 92, + "height": 80, + "rawWidth": 92, + "rawHeight": 80, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -46, + -40, + 0, + 46, + -40, + 0, + -46, + 40, + 0, + 46, + 40, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 80, + 92, + 80, + 0, + 0, + 92, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -46, + -40, + 0 + ], + "maxPos": [ + 46, + 40, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "d92e2d44-c554-4264-b30c-3c5a535e960b@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "redirect": "d92e2d44-c554-4264-b30c-3c5a535e960b@f9941" + } +} diff --git a/assets/resources/ui/icons/abstractTile_28.png b/assets/resources/ui/icons/abstractTile_28.png new file mode 100644 index 0000000000000000000000000000000000000000..533fcf2d5b4c7dc75a14c5248338b149bbec0267 GIT binary patch literal 1611 zcmV-R2DJH!P)=hMS6qoQj8pb8CoZW`=WdcV<Y_yaBhfqcb$uegK%vC005+tkf4r>qLGfFkBz02k%e+^@UgVmQC7iVW3y>$ z^vB7eb#%&FUY&S%(^Of#V`Zv?g1!*g`G zKt;NEdBH?U(`aj=kd3rHL(_|n-^a+dKSbw+iLY#Jn0tB4ZE&DoU%5_E$8d6=jf$>; zfQWW;qmqxHkBp6bc%P1pre*E+F$4^w_Z*<#YXNYfXqKSsGK10Jq zN#onw_R`eALrBd?P18zHusuT0Yi_ksRHa;9<>lq6n3lvvO8@`=gmQ15jEUf2WyVHJ zlz)8PPE=X4t*QV3048)&PE)_Xzdw&}udhE(FYj+ZPmeDjU!Tt(4_^EWkt!{^Hze<^Bt3x4$8aB$_AHeQ$qpH~ji(BiZ^I)n4Sg%T}1|1^9)cR)iA zwV|*d1cQHm30in@0Sdc{hTf<~VYdf^Kfeot7M_m6uBHmR3WZ$@!~P)%T6ke5eBM?= zLm!l)u;)?Ou$ujYad>_P3cHCa>`D~&iWIgmW(A-*1}`pviEL3VzYTHuwGT^SkNN?u zfErIn%debj`L&|uSKBFty%_)?4lhJ|y_9PC)u83q@m>yl(Fx(u_EZ!v&Jg!H)$%Jx z%MXX$BF=h>+s1f-$-R!lwn>SAuN=24;pg(qoqqRm*iP9FaWa11=Y^ZXZ0oPHDGf)nR?PipW9Wb+HD!Ru0q zJNSxsDZ{&X$3n_*AKwjUPQF^k`*vW>&Jf`|@AL5$#CT6wDtA5E%wai5@#!$Gb)w8+ z^%CN)s2z6Ckj>l&2=P7@9_}&3d(p(ZN%18$K52-HCyR#=pApfW@ra}w;T~xBdjKKs zQsUSl!uugU0Z8$6DGry*O@t3bPsF4%e`bWkwK4#R@maMUo;AXGyz>e0SbH+U5?_z8 z-Nrj~Ai9B!@O5|0yl0HhmWew2bt-+R4vy_5bSh30{)Q^0^r1TVjxy&*$^1ZrxIR<| z$AR=w;J6Rf!Q~}B?HZ@RaUZIK*Gsr7x&JNkeW>1QnHJ|hPKC$zp{)LKsr%68RN<%( z9ZVGtt3_ahYxJRIo2>97eW-s_x>sa@$MvDsG3C;dc^~QwNVHINf_Wcm+mz^A7cCaX zeJH$SmFh~4MTN8IL#>N4U2;vlQDoSMIsOiNT*4ol*+c<=!_JPq>X-1>H1-R8^{0e=-J*rRv?p)dpU2|4Sx4Tj zFuAluVPDdCC&UK7kgfSHiv|AhNZ9P~Gg*2s4^88lXZ2rt{s$itxM2z1mFEBe002ov JPDHLkV1n#xCb$3q literal 0 HcmV?d00001 diff --git a/assets/resources/ui/icons/abstractTile_28.png.meta b/assets/resources/ui/icons/abstractTile_28.png.meta new file mode 100644 index 0000000..1a27f74 --- /dev/null +++ b/assets/resources/ui/icons/abstractTile_28.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "de85f305-c99e-46fc-9079-93d1db81c7b4", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "de85f305-c99e-46fc-9079-93d1db81c7b4@6c48a", + "displayName": "abstractTile_28", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "de85f305-c99e-46fc-9079-93d1db81c7b4", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "de85f305-c99e-46fc-9079-93d1db81c7b4@f9941", + "displayName": "abstractTile_28", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 92, + "height": 80, + "rawWidth": 92, + "rawHeight": 80, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -46, + -40, + 0, + 46, + -40, + 0, + -46, + 40, + 0, + 46, + 40, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 80, + 92, + 80, + 0, + 0, + 92, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -46, + -40, + 0 + ], + "maxPos": [ + 46, + 40, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "de85f305-c99e-46fc-9079-93d1db81c7b4@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "redirect": "de85f305-c99e-46fc-9079-93d1db81c7b4@f9941" + } +} diff --git a/assets/resources/ui/icons/abstractTile_29.png b/assets/resources/ui/icons/abstractTile_29.png new file mode 100644 index 0000000000000000000000000000000000000000..eba94a11e9994da2b2abfc473f34639d5bf4974d GIT binary patch literal 1614 zcmV-U2C?~xP)=hMS6qoQj8pb8CoZW`=WdgK}?oW>uVvhntFrl!Szxi-($u zhJtWxg>Y_yaBhfqcb$uegK%vC005+tkf4r>qLGfFkBz02k%e+^uinN@uziJye2Rs9 zbC!HtrhRFgea7e3WuSdht$mS{i9VZbJCbEyjBt~~tI*umgq?{!m}-fdiKdm3c&3Vg zpou(|XrhpfXR?Yvoo+gjWQe|_#@Nq0lV*>Ce1XfRcanT>tcqraZ%vqRbg7Dsmx-T^ zildT`h<0a8;>)U%ie#nQPqe=9tvBRJev$s(p>nu9cCArj?Uw zvW}g!j@mSihp!(nU0A%kYhle zZ`$D9K%a2Y?A|||Z9}GXMXY!^j$&)CicyttVu^6&<>jfEmO!6w|NsAla&MlDiCepi zL7{P!e|$-_ek_a#m;e9(CUjCxQ@_8zKaX#(uRkwO?{7bkPcI)|pU)o;U!M=Z-yeTJ z-+%89@4o=fK!?Nt00Z_(L_t(o!?oG>TN5!D2XNebF$82OQuiJxf(U}5Y($g|itJJL zZp&=TINB>cjQwj(Zlu@tu9xO=@2{7Bo;=?sY2RFuO}Dad9GR+b$CLEv{FCtcR^tIh z)y*LLP9RASKXn^EU)uOfQA=C!qxbp)%g40w+${LKw2y`sr`^&TnEfpjXyMtX;q#dT z8oI9uh5aB9`14E9!t--b*kv^IMmY+*IS}~yT@bYJWE6HeRoG=H>p1KYDG~6M<8~$de3rS>?>-LOA=_R~#?P5NSnuMnhk;VN z5O*UyV7kPxdwl??@y~z_juIIG>hi8~??wEd$vQd`1RSdU%|IuW<03ii?Y%A<$LhRQSjE_@P`zxN4k&!`=SLG90|!2J!Jd=`(vqxN026 z-CjlPY-`v2LidPl^*D^<8ujpex8_pZBeGTFV)1#N=f7y;^qUA5oH);~S%Z%vo1e1= zud))K=ZoK2hPUzabC%&Az8%h-e6@^q?ZBFzB*J;#?Ll1Y zM47|tB*dLzJLsAuo4E%N;$12{*kOowqKUVY;)`m0!VnivmNi0rQbc#gLXvKTuR*(e z4G`i^C5{~;yc^=9fD~Vs;&3`$M0ij5L`*pImqs{TD?NZ1pH|z!X(OD+JD&iLv?oF= z@%0GXWxPXs!W+m4Uw1{!d(!x98Lh%!r_zV&;MiV7r=p$kH&iL557ohUlsP|2{E-!JrbBqGVeW(szBjL`({Kl~q6edzFza%suD4|Vt@TF5)Wybm4Ol;~R* zZ8pYzD7<8q>T;${g|p~GhZkhJ;F@@&$gmG}_~k_MuE;l`?E27=K{@Q3_y(6%AKD-< zKOrO2rh%L3LmfEmtLiIr34d&66ZruSJ3aEMU&3F|*w69RpAz0bDsg-2NhF?; z7V~a}$)zO<`;x{xAvXAhbj^2JEbxahVY9=}r0KmpG>xa8)qm;vA9ioiNqt~E;Q#;t M07*qoM6N<$f=IGC3IG5A literal 0 HcmV?d00001 diff --git a/assets/resources/ui/icons/abstractTile_29.png.meta b/assets/resources/ui/icons/abstractTile_29.png.meta new file mode 100644 index 0000000..1427e38 --- /dev/null +++ b/assets/resources/ui/icons/abstractTile_29.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.26", + "importer": "image", + "imported": true, + "uuid": "2833a55b-f13f-4692-92f1-d8a8213855c6", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2833a55b-f13f-4692-92f1-d8a8213855c6@6c48a", + "displayName": "abstractTile_29", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "2833a55b-f13f-4692-92f1-d8a8213855c6", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2833a55b-f13f-4692-92f1-d8a8213855c6@f9941", + "displayName": "abstractTile_29", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 92, + "height": 80, + "rawWidth": 92, + "rawHeight": 80, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -46, + -40, + 0, + 46, + -40, + 0, + -46, + 40, + 0, + 46, + 40, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 80, + 92, + 80, + 0, + 0, + 92, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -46, + -40, + 0 + ], + "maxPos": [ + 46, + 40, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "2833a55b-f13f-4692-92f1-d8a8213855c6@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "hasAlpha": true, + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "redirect": "2833a55b-f13f-4692-92f1-d8a8213855c6@f9941" + } +} diff --git a/assets/resources/ui/icons/abstractTile_30.png b/assets/resources/ui/icons/abstractTile_30.png new file mode 100644 index 0000000000000000000000000000000000000000..8935664ae6d288e7701d193f8527f8b357d227ff GIT binary patch literal 1187 zcmV;U1YG-xP)XZWynNI-(F(L zMn=v>Ny0%z-(F+AIzq)oN#IOV&O$=pUu4WPMBiRx%tlMcMoPOgGv8ie-CtwfUt`~1 zV#h>E-(6wDL`&XUTEjz0-(O?hRaL}9N#RXY0002tX>Q?XY~W*P;ALv!ZF1skaN=xn z;bv>$YH#3TXX0*i$xBe+WNF)GYvE{Z%}`a}YjDz7UE*(a;cj!sNKN}^ZsTEQ)?Q=a zVP?@uPuWXR*Go~;Nl)-pTI*6--%eEgSYP;7UE@$z$wy4|Rb1aqQ|D1v%STP&O;p=V zQqM?E)k;v!NKM^LQ{zrm$3{!?R9op%So&99;ZIfeR$b*#SMF0<|7mdJadyT=OXW{i z;9zClPE`L{V7{N%zyJUMDRfd!Q@_8zuRl*O?{ANnEb&>21caznJFdj|kE5O~$Yf z#$kU&h=wOu8N+@%2^-Py)HBAgKe%C2@bvaRW7x;ju!Hy}+ZOMcGW<1LxaS`*w1~ zx79&7t!sAFjZXUgeqO?KeEi!D`o|wAcJz%#IP4sJd|JS-6|1(rEH0i4g3z7eYKHjK&)@5+>w8`Y6f9ed*7Qh~m5hYQL~)1w#H>9|7+a_GukxJv+5t{(8Kr5fPM zEw_w@=3c|l|KpWAYkv+a_oDsbS1!^1;47DGf9RF#X@BUI>urD7l^bY(z?DmFf2frk z*8UJH_n)*s4?KtX;ga`*?>&HT|LN`C%x1yce|onzvhnc0YJWHFN6r&P==OKQzB7Fi z3f%sauy^K9aDm$&q4kX{fkU=G%G@I#nS-|f-kSGOKVbXs?mW$g;jHbyz7lx10)=Pp zQ{D-|;5XK&@3J6pIS@7+eq|->