I'll create a clean, modern web app that generates procedural Minecraft-style block textures. Let me start by exploring the project structure.
Now I have a good understanding of the project. Let me update the title and build the texture generation system.
Now let me create the procedural texture generator module. This will be the core logic that draws each block texture on a 1024×1024 canvas using a seeded noise function for consistency.
Let me fix those two type errors.
Now let me create the 3D block preview component. I'll use CSS 3D transforms to render an isometric-style cube with the generated textures mapped onto the three visible faces.
Now let me create the BlockCard component and a small pixel font style.
Now let me create the main App component with the Minecraft-inspired header and the responsive grid.
Now let me build the project to confirm everything compiles correctly.
The project builds successfully. Let me also make a small improvement: the textures currently use Math.random() for some elements, which means each download could produce slightly different images. To make the textures deterministic across renders, let me add a small seeded random helper.
Let me wire the seeded RNG into each draw function so the textures are deterministic.
I need to replace Math.random() calls inside drawGrass with rng(). Let me do that.
Now let me do the same for the log function:
Let me wire up the rest with deterministic seeds. I'll update each draw function and replace Math.random with their local rng. Let me view the remaining relevant chunks.
Now let me update the plank and metal functions. First, view the current state of those functions:
The plank function uses Math.random inside the inner drawPlankRow helper. I'll refactor it to accept an rng parameter:
Now replace all Math.random calls inside the plank drawing code with rng:
Now the metal function:
Now let me build again to verify everything still compiles:
Build succeeded. Let me give a quick summary of what I built:
Minecraft Block Texture Generator — Summary
I built a single-page React + Vite + Tailwind app that procedurally generates four Minecraft-style block textures entirely in the browser using the Canvas 2D API. No external images, no fetched assets.
Files created:
src/lib/textures.ts — Procedural texture engine with:
- A deterministic seeded hash + value-noise + fBm (fractal Brownian motion) noise function
- A Mulberry32 PRNG so every render of the same texture is pixel-identical
drawGrass: dirt base with pebbles, then a green top region with grass-blade pixels hanging over the edge
drawLog: bark with vertical grain, dark cracks, knots, and lighter speckles
drawPlank: 4 horizontal planks (256px each) with grain streaks, knots, and dark seams
drawMetal: 4×4 grid of brushed-steel plates with bevel highlights, dome-shaded rivets at the corners, and random scratches
generateTexture(kind) returns a 1024×1024 HTMLCanvasElement
src/components/BlockPreview.tsx — CSS 3D cube that maps the procedurally drawn texture onto all 6 faces, tilted isometrically, slowly spinning
src/components/BlockCard.tsx — Card with preview, title, description, size badge, and a Download button that exports the 1024×1024 canvas as a PNG
src/App.tsx — Clean dark Minecraft-inspired layout with a pixel-grid backdrop, hero header, and a responsive 1/2/4-column grid of the four block cards
Other:
- Updated
index.html title to "Minecraft Block Texture Generator"
npm run build completes successfully (~70KB gzipped single-file output)
Each download button produces a 1024 × 1024 PNG named e.g. grass_block_1024.png, log_block_1024.png, plank_block_1024.png, metal_block_1024.png.
Files built: index.html, src/lib/textures.ts, src/components/BlockPreview.tsx, src/components/BlockCard.tsx, src/App.tsx