VellazCrochet🚀
Project published on my GitHub profile.
TypeScript★ —— commitsupdated ——

Project overview
Vellaz Crochet is an interactive web catalog that lets users explore hand‑crocheted bags in 3D. I built it so a client can showcase each model, rotate it, zoom with pinch gestures, and experiment with yarn colors and optional accessories before placing an order. The scene preserves the tactile details of the real bags—stitch inclination, yarn sheen, and the subtle bounce of charms—while keeping the UI responsive on desktop and touch devices.
Stack & decisions
- Astro for static site generation and routing; the catalog lives in a React island for client‑side interactivity.
- React‑Three‑Fiber bridges React with Three.js, allowing me to declare the canvas, camera, and lights declaratively and to use
useFramefor per‑frame updates. - TypeScript enforces shape of catalog data (bags, yarn palettes, colorways) and model recipes.
- Tailwind CSS handles layout styling; GSAP + ScrollTrigger animates page sections in sync with scrolling.
- I chose
THREE.InstancedMeshto render thousands of stitches with a single draw call, dramatically reducing GPU load.
Key mechanisms
- Stitch‑by‑stitch instancing – each stitch receives its own transformation matrix and a slight tone variation, then is batched into an
InstancedMeshwhose matrices and colors are flagged for update. - Smooth yarn‑tone transitions – two uniform tones are lerped each frame inside
useFrame, preserving the fine‑grain texture while the user switches between solid and bicolor yarns. - Interactive press & pendulum – a raycast detects pointer contact, feeding the hit point to a shader that depresses nearby vertices; accessories swing like pendulums, constrained by the bag’s motion.
Construir el tejido puntada a puntada
const mesh = new THREE.InstancedMesh(geometry, material, matrices.length);
const tone = new THREE.Color();
matrices.forEach((matrix, index) => {
mesh.setMatrixAt(index, matrix);
tone.setScalar(1 - random() * toneVariation);
mesh.setColorAt(index, tone);
});
mesh.instanceMatrix.needsUpdate = true;
if (mesh.instanceColor) mesh.instanceColor.needsUpdate = true;
Cambiar los colores y conservar el detalle del hilo
useFrame((_, delta) => {
targetA.set(tones[0]!);
targetB.set(tones[1] ?? tones[0]!);
const blend = 1 - Math.exp(-7 * delta);
built.yarnTones.uToneA.value.lerp(targetA, blend);
built.yarnTones.uToneB.value.lerp(targetB, blend);
});
## Keep exploring
👀
An animation inspired by the Fortnite x The Simpsons collaboration.
Astro
Tailwind
🎥
A web app that configures OBS Studio around the user's hardware.
React
Tailwind
Node