-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-6Pin6mIy.js
More file actions
1 lines (1 loc) · 8.54 KB
/
Copy pathchunk-6Pin6mIy.js
File metadata and controls
1 lines (1 loc) · 8.54 KB
1
import{N as Y,r as h,j as s,L as U,b as q,a3 as F,be as W,bm as V,Q as J,ay as Q}from"../entries/pages.BZkyDMuN.js";import{S as X}from"./chunk-D8YfSULr.js";import{C as E}from"./chunk-Cb7tTquJ.js";import{C as w}from"./chunk-DEgOzCpR.js";import{C as L}from"./chunk-BE__v2Cg.js";import{B as Z}from"./chunk-CxCYcf40.js";import"./chunk-BXl3LOEh.js";/* empty css */import"./chunk-CTVhs4zQ.js";import"./chunk-BassnvpC.js";import"./chunk-DPK_ul2B.js";import"./chunk-B1EIeR-U.js";const K=[{value:"frosty",label:"FROSTY_GLASS"},{value:"neural",label:"NEURAL_SHELL"},{value:"cyber",label:"CYBER_FRAME"},{value:"void",label:"VOID_CORE"},{value:"blade",label:"TERMINAL_BLADE"}],H=[{value:"transparent",label:"TRANSPARENT"},{value:"gradient",label:"GLASSY_FLUX"},{value:"solid",label:"SOLID_VOID"}],pe=()=>{const{addToast:P}=Y(),N=h.useRef(null),[g,_]=h.useState("frosty"),[f,B]=h.useState("gradient"),[S,k]=h.useState(600),[j,x]=h.useState(400),[v,A]=h.useState(40),[u,R]=h.useState(.12),[c,D]=h.useState("#ffffff"),[T,O]=h.useState("#6366f1"),C=h.useCallback((e,d,n,m=!1)=>{const o=d/1e3;if(e.clearRect(0,0,d,n),!m&&f!=="transparent"){if(e.save(),f==="solid")e.fillStyle="#050505",e.fillRect(0,0,d,n);else{const t=e.createLinearGradient(0,0,d,n);t.addColorStop(0,T),t.addColorStop(1,"#ec4899"),e.fillStyle=t,e.fillRect(0,0,d,n);const b=($,z,G,M)=>{e.save(),e.beginPath(),e.arc($,z,G,0,Math.PI*2),e.fillStyle=M,e.filter="blur(80px)",e.globalAlpha=.4,e.fill(),e.restore()};b(d*.2,n*.2,300*o,"#c084fc"),b(d*.8,n*.1,250*o,"#facc15")}e.restore()}const i=S*o,r=j*o,l=(d-i)/2,a=(n-r)/2,p=v*o,y=t=>{t.beginPath(),t.moveTo(l+p,a),t.lineTo(l+i-p,a),t.quadraticCurveTo(l+i,a,l+i,a+p),t.lineTo(l+i,a+r-p),t.quadraticCurveTo(l+i,a+r,l+i-p,a+r),t.lineTo(l+p,a+r),t.quadraticCurveTo(l,a+r,l,a+r-p),t.lineTo(l,a+p),t.quadraticCurveTo(l,a,l+p,a),t.closePath()};if(e.save(),g==="frosty")e.shadowColor="rgba(0,0,0,0.3)",e.shadowBlur=40*o,e.shadowOffsetY=20*o,y(e),e.fillStyle=`rgba(255, 255, 255, ${u})`,e.fill(),e.strokeStyle=`rgba(255, 255, 255, ${u*2.5})`,e.lineWidth=2*o,e.stroke();else if(g==="neural"){y(e),e.fillStyle="rgba(10, 10, 10, 0.8)",e.fill(),e.strokeStyle=c,e.lineWidth=1*o,e.stroke(),e.shadowBlur=15*o,e.shadowColor=c;const t=30*o;e.beginPath(),e.moveTo(l,a+t),e.lineTo(l,a),e.lineTo(l+t,a),e.moveTo(l+i-t,a),e.lineTo(l+i,a),e.lineTo(l+i,a+t),e.moveTo(l,a+r-t),e.lineTo(l,a+r),e.lineTo(l+t,a+r),e.moveTo(l+i-t,a+r),e.lineTo(l+i,a+r),e.lineTo(l+i,a+r-t),e.stroke()}else if(g==="cyber")e.fillStyle="rgba(0, 255, 255, 0.05)",y(e),e.fill(),e.strokeStyle=c,e.lineWidth=4*o,e.setLineDash([40*o,20*o]),e.stroke(),e.lineWidth=1*o,e.setLineDash([]),e.strokeRect(l-10*o,a-10*o,i+20*o,r+20*o);else if(g==="void"){e.fillStyle="#000",y(e),e.fill(),e.strokeStyle=c,e.lineWidth=1*o,e.globalAlpha=.3;for(let t=0;t<3;t++)e.strokeRect(l-t*5*o,a-t*5*o,i+t*10*o,r+t*10*o)}else if(g==="blade"){const t=v*o;e.beginPath(),e.moveTo(l+t,a),e.lineTo(l+i-t,a),e.lineTo(l+i,a+t),e.lineTo(l+i,a+r-t),e.lineTo(l+i-t,a+r),e.lineTo(l+t,a+r),e.lineTo(l,a+r-t),e.lineTo(l,a+t),e.closePath(),e.fillStyle=`rgba(0, 0, 0, ${u})`,e.fill(),e.strokeStyle=c,e.lineWidth=2*o,e.stroke(),e.save(),e.fillStyle=c,e.font=`bold ${12*o}px "JetBrains Mono"`,e.textAlign="left",e.textBaseline="top";const b="////////////////////////////////////////////////////////////////////////////////////////////////////";e.save(),e.translate(l+t,a+2*o),e.globalAlpha=.5,e.fillText(b.slice(0,Math.floor(i/(10*o))),0,0),e.restore(),e.save(),e.translate(l+t,a+r-14*o),e.globalAlpha=.5,e.fillText(b.slice(0,Math.floor(i/(10*o))),0,0),e.restore(),e.restore()}e.restore()},[g,f,S,j,v,u,c,T]);h.useEffect(()=>{const e=N.current;if(!e)return;const d=e.getContext("2d"),n=window.devicePixelRatio||1,m=e.getBoundingClientRect();e.width=m.width*n,e.height=m.height*n,d.scale(n,n),C(d,m.width,m.height)},[C]);const I=()=>{const e=document.createElement("canvas"),d=e.getContext("2d"),n=3e3;e.width=n,e.height=n,C(d,n,n,!0);const m=document.createElement("a");m.download=`asset-${g}-${Date.now()}.png`,m.href=e.toDataURL("image/png",1),m.click(),P({title:"ASSET_RASTERIZED",message:"High-fidelity component saved to storage."})};return s.jsxs("div",{className:"min-h-screen bg-[#050505] text-white selection:bg-emerald-500/30 font-sans",children:[s.jsx(X,{title:"Asset Constructor | Fezcodex",description:"Construct high-fidelity digital assets, containers and UI components.",keywords:["asset creator","ui design","glassmorphism","container generator","fezcodex"]}),s.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 py-24 md:px-12 relative z-10",children:[s.jsxs("header",{className:"mb-24",children:[s.jsxs(U,{to:"/apps",className:"group mb-12 inline-flex items-center gap-2 text-xs font-mono text-gray-500 hover:text-white transition-colors uppercase tracking-[0.3em]",children:[s.jsx(q,{weight:"bold"}),s.jsx("span",{children:"Applications"})]}),s.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-12",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx(Z,{title:"Asset Constructor",slug:"asset-gen",variant:"brutalist"}),s.jsx("p",{className:"text-xl text-gray-400 max-w-2xl font-light leading-relaxed",children:"Component synthesis protocol. Construct high-fidelity UI containers with advanced glassmorphism and technical framing."})]}),s.jsxs("button",{onClick:I,className:"group relative inline-flex items-center gap-4 px-10 py-6 bg-white text-black hover:bg-emerald-400 transition-all duration-300 font-mono uppercase tracking-widest text-sm font-black rounded-sm shrink-0",children:[s.jsx(F,{weight:"bold",size:24}),s.jsx("span",{children:"Export Asset"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12",children:[s.jsxs("div",{className:"lg:col-span-3 space-y-8",children:[s.jsxs("div",{className:"border border-white/10 bg-white/[0.02] p-8 rounded-sm space-y-10",children:[s.jsxs("h3",{className:"font-mono text-[10px] font-bold text-emerald-500 uppercase tracking-widest flex items-center gap-2 border-b border-white/5 pb-6",children:[s.jsx(W,{weight:"fill"}),"Structural_Profile"]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(E,{label:"Container Style",options:K,value:g,onChange:_,variant:"brutalist",fullWidth:!0}),s.jsx(E,{label:"Preview Environment",options:H,value:f,onChange:B,variant:"brutalist",fullWidth:!0}),s.jsx(L,{label:"Accent Color",value:c,onChange:D}),f==="gradient"&&s.jsx(L,{label:"Environment Base",value:T,onChange:O})]})]}),s.jsxs("div",{className:"border border-white/10 bg-white/[0.02] p-8 rounded-sm space-y-10",children:[s.jsxs("h3",{className:"font-mono text-[10px] font-bold text-emerald-500 uppercase tracking-widest flex items-center gap-2 border-b border-white/5 pb-6",children:[s.jsx(V,{weight:"fill"}),"Geometry_Matrix"]}),s.jsxs("div",{className:"space-y-8",children:[s.jsx(w,{label:"Width",min:100,max:1e3,value:S,onChange:k}),s.jsx(w,{label:"Height",min:100,max:1e3,value:j,onChange:x}),s.jsx(w,{label:"Corner Radius",min:0,max:200,value:v,onChange:A}),s.jsx(w,{label:"Surface Opacity",min:0,max:1,step:.01,value:u,onChange:R})]})]})]}),s.jsx("div",{className:"lg:col-span-9",children:s.jsxs("div",{className:"lg:sticky lg:top-24 h-fit transition-all",children:[s.jsxs("div",{className:"relative border border-white/10 bg-[#0a0a0a] rounded-sm overflow-hidden flex items-center justify-center shadow-2xl group min-h-[800px]",children:[s.jsx("canvas",{ref:N,className:"w-full max-w-[900px] aspect-square object-contain",style:{imageRendering:"pixelated"}}),s.jsx("div",{className:"absolute top-8 right-8 z-30 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsxs("button",{onClick:()=>{k(600),x(400),A(40),R(.12)},className:"flex items-center gap-2 px-4 py-2 bg-black/60 backdrop-blur-md border border-white/10 text-[10px] font-mono uppercase tracking-widest text-red-400 hover:bg-red-500 hover:text-black transition-all",children:[s.jsx(J,{weight:"bold"})," Reset Geometry"]})})]}),s.jsxs("div",{className:"mt-12 p-8 border border-white/10 bg-white/[0.01] rounded-sm flex items-start gap-6",children:[s.jsx(Q,{size:32,className:"text-gray-700 shrink-0 mt-1"}),s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm font-mono uppercase tracking-[0.2em] leading-relaxed text-gray-500",children:"ASSET_PROTOCOL: High-fidelity rasterization active. Export process generates a 3000x3000px transparent PNG entity."})})]})]})})]}),s.jsxs("footer",{className:"mt-32 pt-12 border-t border-white/10 flex justify-between items-center text-gray-600 font-mono text-[10px] uppercase tracking-[0.3em]",children:[s.jsx("span",{children:"Fezcodex_Asset_Constructor_v1.0.0"}),s.jsx("span",{className:"text-gray-800",children:"STATUS // READY"})]})]})]})};export{pe as default};