<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mister Blocks</title>
    <description>The latest articles on DEV Community by Mister Blocks (misterblocks).</description>
    <link>https://dev.to/misterblocks</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F16013%2F93529e68-c342-4dd7-a2f1-f1c67b31e00d.png</url>
      <title>DEV Community: Mister Blocks</title>
      <link>https://dev.to/misterblocks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/misterblocks"/>
    <language>en</language>
    <item>
      <title>What do you call a LEGO stud in Ukrainian? Translating a whole site with Claude</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Wed, 18 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/what-do-you-call-a-lego-stud-in-ukrainian-translating-a-whole-site-with-claude-1kmg</link>
      <guid>https://dev.to/misterblocks/what-do-you-call-a-lego-stud-in-ukrainian-translating-a-whole-site-with-claude-1kmg</guid>
      <description>&lt;p&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; has a full Ukrainian version, and translating it turned out to be less about code and more about tone. A surprising amount of it came down to one small word: what do you call a &lt;strong&gt;stud&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;This post covers how the whole site, every page, every build and every printed booklet, became Ukrainian at &lt;a href="https://misterblocks.com/uk" rel="noopener noreferrer"&gt;misterblocks.com/uk&lt;/a&gt;, and the rules that keep the translation sounding like a real instruction book rather than a machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqzapbu623xta3wqsz7ql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqzapbu623xta3wqsz7ql.png" alt="The Ukrainian home page of Mister Blocks: &amp;quot;Сфотографуй Lego блоки і отримай варіанти білдів&amp;quot;, with a live 3D model of a van" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Same address, one prefix
&lt;/h2&gt;

&lt;p&gt;English has no prefix and Ukrainian lives under &lt;code&gt;/uk&lt;/code&gt;. &lt;strong&gt;Slugs stay the same in every language&lt;/strong&gt;, so a page's other version is found by swapping the prefix: &lt;code&gt;/builds/cars&lt;/code&gt; ↔ &lt;code&gt;/uk/builds/cars&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That makes the rest simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every page lists its other language with &lt;code&gt;hreflang&lt;/code&gt;, plus &lt;code&gt;x-default&lt;/code&gt; pointing to English. The sitemap repeats the full set for every URL, because Google wants every version to list all the others &lt;em&gt;and itself&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;As a final pass on every page, every internal link is moved into the page's language. Assets, API calls, absolute URLs and the language switcher are left alone.&lt;/li&gt;
&lt;li&gt;If a page doesn't exist in the other language yet, the language switch goes to that language's home page instead of a 404.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three kinds of text
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interface strings&lt;/strong&gt; are keyed by their English text, with &lt;code&gt;{placeholders}&lt;/code&gt; and real plural forms. Ukrainian has more of them than English: 1 деталь, 2 деталі, 5 деталей. They're handled with &lt;code&gt;Intl.PluralRules&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTML templates&lt;/strong&gt; are translated by a list of [English, Ukrainian] pairs applied in order, longest first, so a short phrase can't eat part of a longer one. A check script fails the build if a pair no longer matches, if three Latin words in a row survive on a Ukrainian page, or if any Russian-only letter appears.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search pages&lt;/strong&gt; (categories and landing pages) were written by hand &lt;strong&gt;for how people in Ukraine search&lt;/strong&gt;, not translated word for word. The gallery's Ukrainian title is "Лего інструкції безкоштовно", because that's what people type.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/uk/builds/volodymyr-zelenskyy-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3otbc8s7qf6nfmt4yl9a.jpg" alt="Volodymyr Zelenskyy as a brick figure in olive green on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Володимир Зеленський: 140 pieces, 17 steps. In &lt;a href="https://misterblocks.com/builds/famous-people" rel="noopener noreferrer"&gt;famous people&lt;/a&gt; (&lt;a href="https://misterblocks.com/uk/builds/famous-people" rel="noopener noreferrer"&gt;українською&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Translating 100+ builds with Claude
&lt;/h2&gt;

&lt;p&gt;Every build has a name, a tagline, piece names, colour names and dozens of step texts. That's done with Claude, in a fixed shape:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One call translates the &lt;strong&gt;"head"&lt;/strong&gt;: the title, the names, the taglines, every piece and colour name, and each distinct step heading &lt;strong&gt;once&lt;/strong&gt; (a voxel sculpture can have "Water shuriken" twenty times).&lt;/li&gt;
&lt;li&gt;The step texts go in batches of 40 in parallel, and each batch gets &lt;strong&gt;a glossary of the names chosen in step 1&lt;/strong&gt;, so the shuriken is called the same thing in step 3 and step 93.&lt;/li&gt;
&lt;li&gt;Checks, then one write to the database.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every call returns a strict JSON schema. If an id is missing, a &lt;code&gt;{placeholder}&lt;/code&gt; was lost, or a Russian-only letter slipped in, the model gets up to three attempts and is told exactly what was wrong last time.&lt;/p&gt;

&lt;p&gt;The translation stores a hash of the English it came from. If someone changes the build while it's being translated, the result is thrown away. If the English changes later, the old translation is still shown until it's redone, so a page never goes half-English.&lt;/p&gt;

&lt;p&gt;Builds that nobody has opened in Ukrainian yet are translated &lt;strong&gt;on the first visit&lt;/strong&gt;: that visitor sees English (and the page isn't indexed), and the next one gets Ukrainian.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rules in the prompt
&lt;/h2&gt;

&lt;p&gt;The system prompt is mostly about tone and vocabulary. A few of the rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Readers are kids and parents building brick by brick, so write natural, warm, simple Ukrainian, the way a good instruction book reads. &lt;strong&gt;Never a word-for-word calque.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Pure literary Ukrainian: &lt;strong&gt;no Russian words, no russisms, no surzhyk&lt;/strong&gt;, and never the letters ы, э, ъ, ё. (Those letters are also checked by code, not just asked for.)&lt;/li&gt;
&lt;li&gt;Speak to the builder as one friendly "ти": "Поклади", "Постав", "З'єднай". Never the formal "Покладіть".&lt;/li&gt;
&lt;li&gt;Sizes keep the × and go after the noun: "2×8 brick" becomes "цеглинка 2×8".&lt;/li&gt;
&lt;li&gt;Real people use their standard Ukrainian spelling (Володимир Зеленський, Еліна Світоліна, Дженсен Хуанг). Characters use their official Ukrainian names when there is one. Car and product names stay in Latin letters: Porsche Mission S, DeLorean, Waymo. "LEGO" stays "LEGO", and "MOC" stays "MOC".&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So what is a stud?
&lt;/h2&gt;

&lt;p&gt;The first version called studs &lt;strong&gt;шипи&lt;/strong&gt;. It's a real word, but it means &lt;em&gt;spikes&lt;/em&gt; or &lt;em&gt;thorns&lt;/em&gt;, and it isn't what kids building with LEGO say. The word families actually use is &lt;strong&gt;пупирки&lt;/strong&gt; (little bumps), so every string and every stored translation was changed to пупирка, with the grammar agreed. A small change, but it's the one that made the site sound like it was written by someone who has actually built with their kid.&lt;/p&gt;

&lt;p&gt;The same goes for the home page. The search title targets "lego ai", but the big heading on the page says it the way a kid would: &lt;strong&gt;"Сфотографуй Lego блоки і отримай варіанти білдів"&lt;/strong&gt;, "snap your Lego blocks and get build ideas".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/uk/builds/elina-svitolina-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7lhce0mdtsvidrgxw0qj.jpg" alt="Elina Svitolina as a brick figure on a green tennis court" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Еліна Світоліна: 135 pieces, 16 steps. More &lt;a href="https://misterblocks.com/builds/sports" rel="noopener noreferrer"&gt;sports builds&lt;/a&gt; (&lt;a href="https://misterblocks.com/uk/builds/sports" rel="noopener noreferrer"&gt;українською&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ukrainian on paper too
&lt;/h2&gt;

&lt;p&gt;The printed booklets and PDFs come in Ukrainian as well: the same headless-Edge pipeline prints &lt;code&gt;/uk/builds/&amp;lt;name&amp;gt;/print&lt;/code&gt; to Letter and A4 PDFs, skipping builds that aren't translated yet. The offline page, the app manifest and the "install the app" bar are translated too. English pages offer the Ukrainian version in a small bar to people whose browser prefers Ukrainian, and never redirect anyone on their own.&lt;/p&gt;

&lt;p&gt;If you read Ukrainian, try it at &lt;strong&gt;&lt;a href="https://misterblocks.com/uk" rel="noopener noreferrer"&gt;misterblocks.com/uk&lt;/a&gt;&lt;/strong&gt;: &lt;a href="https://misterblocks.com/uk/builds" rel="noopener noreferrer"&gt;лего інструкції&lt;/a&gt;, &lt;a href="https://misterblocks.com/uk/builds/pokemon" rel="noopener noreferrer"&gt;покемони&lt;/a&gt;, &lt;a href="https://misterblocks.com/uk/builds/famous-people" rel="noopener noreferrer"&gt;відомі люди&lt;/a&gt;. If you don't, the &lt;a href="https://misterblocks.com/builds" rel="noopener noreferrer"&gt;English gallery&lt;/a&gt; has the same builds.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Characters, people and brands belong to their owners.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>ai</category>
      <category>claude</category>
      <category>webdev</category>
    </item>
    <item>
      <title>SEO for a site made of 3D canvases: how 100+ LEGO builds became findable pages</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Tue, 17 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/seo-for-a-site-made-of-3d-canvases-how-100-lego-builds-became-findable-pages-4p48</link>
      <guid>https://dev.to/misterblocks/seo-for-a-site-made-of-3d-canvases-how-100-lego-builds-became-findable-pages-4p48</guid>
      <description>&lt;p&gt;A site whose main content is a 3D canvas has a problem: to a search engine, a canvas is an empty rectangle. &lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; has over a hundred LEGO building guides, and at first Google could see almost none of what makes them useful.&lt;/p&gt;

&lt;p&gt;This is what I changed so every build is a real, findable page, without giving up the 3D viewer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi4u8b6r8ulvmxka83p27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi4u8b6r8ulvmxka83p27.png" alt="The LEGO Truck MOCs category page: a heading, an intro, category chips with counts, and build cards on a wooden table" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Render the words on the server
&lt;/h2&gt;

&lt;p&gt;Every public page is built by one serverless function. It fills an HTML template with the title, description, headings, links and structured data, so &lt;strong&gt;everything a crawler needs is in the HTML, with no JavaScript&lt;/strong&gt;. Then the page's own script adds the 3D view on top.&lt;/p&gt;

&lt;p&gt;There are five kinds of page: the landing pages, the gallery hub, category pages, building guides, and the print booklet. The booklet is &lt;code&gt;noindex&lt;/code&gt;; everything else is indexable, cached at the edge for five minutes and served stale for a day while it refreshes.&lt;/p&gt;

&lt;p&gt;One early mistake: &lt;code&gt;robots.txt&lt;/code&gt; blocked &lt;code&gt;/api/&lt;/code&gt;, which is where the build data comes from. Google could fetch the page but not finish rendering it. Removing that line was the first fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. One address per build, made from its name
&lt;/h2&gt;

&lt;p&gt;Guides used to live at &lt;code&gt;/g/&amp;lt;random id&amp;gt;&lt;/code&gt;. Now the address follows the name: "Mega Greninja" lives at &lt;a href="https://misterblocks.com/builds/mega-greninja-lego-build" rel="noopener noreferrer"&gt;&lt;code&gt;/builds/mega-greninja-lego-build&lt;/code&gt;&lt;/a&gt;. Old &lt;code&gt;/g/&lt;/code&gt; and &lt;code&gt;/s/&lt;/code&gt; links, and old names after a rename, get a &lt;strong&gt;301 to the one current address&lt;/strong&gt; (keeping &lt;code&gt;?step=&lt;/code&gt; so deep links still work). Two builds with the same name get the id added to the second.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Titles people actually type
&lt;/h2&gt;

&lt;p&gt;The first titles looked like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mega Greninja LEGO build: free 3D instructions, 205 pieces | Mister Bricks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nobody searches for my brand. They search for "lego greninja". So titles now &lt;strong&gt;lead with the search phrase and drop the brand&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;LEGO Greninja MOC: Mega Greninja Free Instructions, 205 Pieces&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For each build, a small, cheap Claude call (low effort, 2,000 tokens) picks its categories and &lt;strong&gt;the exact phrase people type&lt;/strong&gt;: lowercase, starting with "lego", 2–4 words. The phrase leads the title, and the build's name follows: a green dragon becomes "LEGO Dragon MOC: Green Fire-Breathing Dragon…", and Freddy Fazbear becomes "LEGO FNAF MOC: Freddy Fazbear, Free Instructions".&lt;/p&gt;

&lt;p&gt;The model gets it wrong sometimes. It picks a character's full name when people search for the game, so 57 builds have hand-picked phrases from keyword research that the tagger is never allowed to overwrite. That's why Freddy is under "lego fnaf": that's the phrase people actually search, about 34,000 times a month.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/freddy-fazbear-five-nights-at-freddy-s-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc4u1innbkgadfid5f58q.jpg" alt="Freddy Fazbear from Five Nights at Freddy's as a brick figure" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Categories that earn their place
&lt;/h2&gt;

&lt;p&gt;There are 16 categories, from &lt;a href="https://misterblocks.com/builds/pokemon" rel="noopener noreferrer"&gt;Pokémon&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/cars" rel="noopener noreferrer"&gt;cars&lt;/a&gt; to &lt;a href="https://misterblocks.com/builds/anime" rel="noopener noreferrer"&gt;anime&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/video-games" rel="noopener noreferrer"&gt;video games&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/tv-shows" rel="noopener noreferrer"&gt;TV shows&lt;/a&gt;. Each one lists its target keywords with their monthly search volume right in the code, and its title and heading use them word for word.&lt;/p&gt;

&lt;p&gt;A category only goes into the sitemap and gets indexed &lt;strong&gt;once it has at least 3 builds&lt;/strong&gt;. Below that, the page works but is &lt;code&gt;noindex&lt;/code&gt;, so Google never sees thin pages.&lt;/p&gt;

&lt;p&gt;One category is a rule rather than a tag: &lt;a href="https://misterblocks.com/builds/easy" rel="noopener noreferrer"&gt;easy builds&lt;/a&gt; are anything with 100 pieces or fewer (or built from a photo of a real pile). No model needed for that one.&lt;/p&gt;

&lt;p&gt;There are also four keyword landing pages for what people search before they know the site exists: &lt;a href="https://misterblocks.com/lego-build-ideas" rel="noopener noreferrer"&gt;LEGO build ideas&lt;/a&gt;, &lt;a href="https://misterblocks.com/lego-scanner-app" rel="noopener noreferrer"&gt;LEGO scanner app&lt;/a&gt;, &lt;a href="https://misterblocks.com/custom-lego-instructions" rel="noopener noreferrer"&gt;custom LEGO instructions&lt;/a&gt;, and the home page for "lego ai".&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Structured data that matches the page
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Guides&lt;/strong&gt; are a &lt;code&gt;HowTo&lt;/code&gt;: total time from the piece count, up to 40 &lt;code&gt;HowToSupply&lt;/code&gt; items from the parts list, one &lt;code&gt;HowToStep&lt;/code&gt; per step (each with its own &lt;code&gt;?step=N&lt;/code&gt; URL), and the build's pictures as &lt;code&gt;ImageObject&lt;/code&gt;s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category pages&lt;/strong&gt; are a &lt;code&gt;CollectionPage&lt;/code&gt; with an &lt;code&gt;ItemList&lt;/code&gt; of builds, plus a &lt;code&gt;BreadcrumbList&lt;/code&gt; and an &lt;code&gt;FAQPage&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The home page&lt;/strong&gt; is a &lt;code&gt;WebSite&lt;/code&gt; and a free &lt;code&gt;WebApplication&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Breadcrumbs follow LEGO MOCs › category › build, and each guide ends with related builds from the same category and a link to its "twin" (the small playable version ↔ the big voxel sculpture).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/son-goku-dragon-ball-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj9gcxo1fi9e1j2ycnyhy.jpg" alt="Son Goku from Dragon Ball as a brick figure" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Son Goku: 143 pieces, 14 steps, in &lt;a href="https://misterblocks.com/builds/anime" rel="noopener noreferrer"&gt;anime&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Pictures for Google Images
&lt;/h2&gt;

&lt;p&gt;A 3D canvas has no image to index. So every build is rendered once by the real viewer, on a photo of a wooden table, at 1600×1200, and stored in R2. Those renders are the &lt;code&gt;og:image&lt;/code&gt;, they're in the JSON-LD, and they're in the &lt;strong&gt;image sitemap&lt;/strong&gt;, every picture of every build. The one picture that is never published is the photo someone uploaded with their idea; it might not be theirs to share.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Tell the search engines
&lt;/h2&gt;

&lt;p&gt;The sitemap lists every page once per language with the full set of &lt;code&gt;hreflang&lt;/code&gt; alternates (more on the &lt;a href="https://misterblocks.com/uk" rel="noopener noreferrer"&gt;Ukrainian version&lt;/a&gt; in another post). A tiny script posts every URL to &lt;strong&gt;IndexNow&lt;/strong&gt;, so Bing and the others hear about new builds the same day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/kirby-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsbq82tfsyejqdnuogqu2.jpg" alt="Kirby as a pink brick figure on green grass" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell myself on day one
&lt;/h2&gt;

&lt;p&gt;Treat every 3D object as a page first and a canvas second: a name, an address, a title in the words people search, a picture, and a few honest lines of text. The 3D view is what makes people stay. The page around it is what lets them find it.&lt;/p&gt;

&lt;p&gt;Browse it the way Google does: start at the &lt;a href="https://misterblocks.com/builds" rel="noopener noreferrer"&gt;full gallery&lt;/a&gt; or any category, like &lt;a href="https://misterblocks.com/builds/robots" rel="noopener noreferrer"&gt;robots&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/movies" rel="noopener noreferrer"&gt;movies&lt;/a&gt; or &lt;a href="https://misterblocks.com/builds/famous-people" rel="noopener noreferrer"&gt;famous people&lt;/a&gt;. Or snap your own bricks at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Characters and brands belong to their owners.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Running a free AI app without going broke: dollars per call, a daily budget and per-IP limits</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Mon, 16 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/running-a-free-ai-app-without-going-broke-dollars-per-call-a-daily-budget-and-per-ip-limits-484</link>
      <guid>https://dev.to/misterblocks/running-a-free-ai-app-without-going-broke-dollars-per-call-a-daily-budget-and-per-ip-limits-484</guid>
      <description>&lt;p&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; is free, needs no account, and every build is a few minutes of Claude Opus thinking about bricks. That's a couple of dollars a build. Put that on the open internet and one bored person with a script can spend your month's budget before lunch.&lt;/p&gt;

&lt;p&gt;Here is the plumbing that keeps it free &lt;em&gt;and&lt;/em&gt; affordable. None of it is clever, but all of it was needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/amazon-delivery-van-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9atgbln7mv7li5fdq8i6.jpg" alt="Amazon delivery van as a white and blue brick model on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Amazon Delivery Van: 102 pieces, 11 steps. More &lt;a href="https://misterblocks.com/builds/trucks" rel="noopener noreferrer"&gt;LEGO trucks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Log every call, in dollars
&lt;/h2&gt;

&lt;p&gt;Every Claude call goes through one function, and every call writes one row to MongoDB: which run, which step, the model, input and output tokens, cache reads and writes, &lt;strong&gt;the cost in USD&lt;/strong&gt;, and how many seconds it took.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;PRICE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cacheRead&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cacheWrite&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// USD per million tokens&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;usd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;input_tokens&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;PRICE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output_tokens&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;PRICE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cache_read_input_tokens&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;PRICE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cacheRead&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cache_creation_input_tokens&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;PRICE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cacheWrite&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1e6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details that matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The row is written &lt;strong&gt;before&lt;/strong&gt; checking whether the call was refused or cut off. A failed call still costs money, so it still counts.&lt;/li&gt;
&lt;li&gt;A database error is logged and ignored. Accounting must never be the reason a build fails.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A small admin endpoint shows tokens and dollars for one run, for today and for all time. That's how I know a build costs "a couple of dollars" rather than guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A site-wide daily budget, checked first
&lt;/h2&gt;

&lt;p&gt;With every call in dollars, a budget is one query: sum &lt;code&gt;usd&lt;/code&gt; since midnight UTC. Before any expensive action, that's checked against &lt;code&gt;DAILY_BUDGET_USD&lt;/code&gt; (25 by default). If it's spent, the site says so plainly ("Mister Blocks has used up today's building budget. Please come back tomorrow.") and the 3D guides keep working, since they cost nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Per-visitor limits, without accounts
&lt;/h2&gt;

&lt;p&gt;Then a per-visitor counter: one Mongo document per &lt;code&gt;kind|ip|date&lt;/code&gt;, incremented with an upsert. The limits:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Per IP per day&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;New build from a photo&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New build from an idea&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chat messages&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each limit has its own human message ("You can start 5 new builds a day. Try again tomorrow, or keep chatting in a build you already started."), returned with HTTP 429.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/coco-2-delivery-robot-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9drfahu7ydx3u4d0na4q.jpg" alt="Coco 2 delivery robot as a pink and white brick robot on wheels" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Coco 2 delivery robot: 61 pieces, 10 steps. More &lt;a href="https://misterblocks.com/builds/robots" rel="noopener noreferrer"&gt;robot builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Knowing the visitor's real IP
&lt;/h2&gt;

&lt;p&gt;Per-IP limits only work if you know the IP. The site runs on Vercel, but &lt;code&gt;misterblocks.com&lt;/code&gt; is served through a &lt;strong&gt;Cloudflare Worker&lt;/strong&gt; that forwards to Vercel (the domain's DNS lives in a Cloudflare zone, and a Worker custom domain was the cleanest way in).&lt;/p&gt;

&lt;p&gt;That means Vercel sees Cloudflare's IP, not the visitor's. So the Worker adds two headers: the visitor's IP from &lt;code&gt;cf-connecting-ip&lt;/code&gt;, and a shared secret. The site trusts the IP header &lt;strong&gt;only when the secret matches&lt;/strong&gt;; otherwise it falls back to &lt;code&gt;x-forwarded-for&lt;/code&gt;. Without the secret check, anyone could send a fake IP header and get unlimited builds.&lt;/p&gt;

&lt;p&gt;The same Worker redirects &lt;code&gt;www&lt;/code&gt; to the bare domain and rewrites any redirect that names the Vercel address. Old &lt;code&gt;*.vercel.app&lt;/code&gt; names get a permanent redirect to &lt;code&gt;misterblocks.com&lt;/code&gt;, except for requests that came from the Worker itself, which would otherwise loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Spend tokens where they matter
&lt;/h2&gt;

&lt;p&gt;Not every call needs the same effort:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Call&lt;/th&gt;
&lt;th&gt;Effort&lt;/th&gt;
&lt;th&gt;Max tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Reading the photo of your pieces&lt;/td&gt;
&lt;td&gt;high&lt;/td&gt;
&lt;td&gt;64,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Designing a model&lt;/td&gt;
&lt;td&gt;medium&lt;/td&gt;
&lt;td&gt;24,000 (photo) / 64,000 (idea)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fixing reported problems&lt;/td&gt;
&lt;td&gt;medium&lt;/td&gt;
&lt;td&gt;32,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Translating a build&lt;/td&gt;
&lt;td&gt;medium&lt;/td&gt;
&lt;td&gt;32,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tagging categories for SEO&lt;/td&gt;
&lt;td&gt;low&lt;/td&gt;
&lt;td&gt;2,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Recognising pieces in a messy photo is where mistakes are most expensive, so it gets the most thinking. Picking two category tags gets almost none.&lt;/p&gt;

&lt;p&gt;Other habits that keep the bill down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured output&lt;/strong&gt; (a JSON schema on every call), so there's no retry because the answer didn't parse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt caching&lt;/strong&gt; on the long, fixed system prompt of the idea designer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patches, not rewrites.&lt;/strong&gt; When the stud checker finds problems, the model answers with a patch (remove these pieces, add these) instead of the whole model again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A deadline.&lt;/strong&gt; The photo designer gets up to three rounds, but a new round only starts if it's still under 170 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-side fallback&lt;/strong&gt;: if the model declines, the API falls back to another model instead of failing the whole build.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/pancake-chef-robot-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fir1yf11aczm8vyfqhc8w.jpg" alt="Pancake chef robot as a white brick robot at a stove" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Pancake Chef Robot: 142 pieces, 20 steps.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Long jobs without long requests
&lt;/h2&gt;

&lt;p&gt;An idea build can take ten minutes. The request that starts it answers right away; the work continues with &lt;code&gt;waitUntil&lt;/code&gt; and writes its progress onto the build document (throttled to one write per 1.2 seconds). The page polls a tiny, uncached endpoint every 2 seconds. If a job stops reporting for 150 seconds, it's shown as failed with a retry button, rather than a progress bar that never moves.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it costs to look
&lt;/h2&gt;

&lt;p&gt;The 3D guides, the printable booklets and the PDFs cost nothing per visit: the models are stored, the pictures are drawn in your browser, and the files sit in Cloudflare R2 with a one-year cache. Only &lt;em&gt;making&lt;/em&gt; something new costs money. That's why the limits only apply there.&lt;/p&gt;

&lt;p&gt;Browse the free guides as much as you like: &lt;a href="https://misterblocks.com/builds/robots" rel="noopener noreferrer"&gt;robots&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/trucks" rel="noopener noreferrer"&gt;trucks&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/easy" rel="noopener noreferrer"&gt;easy builds&lt;/a&gt;, or &lt;a href="https://misterblocks.com/lego-build-ideas" rel="noopener noreferrer"&gt;LEGO build ideas&lt;/a&gt;. And when you want your own, snap your bricks at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;, which works like a &lt;a href="https://misterblocks.com/lego-scanner-app" rel="noopener noreferrer"&gt;LEGO scanner app&lt;/a&gt; with no install.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/hover-courier-drone-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd504uzgtxk9m1dobqapa.jpg" alt="Hover courier drone as a brick quadcopter on a landing pad" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>serverless</category>
      <category>cloudflare</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Printable LEGO instructions from a three.js viewer: cqw units, headless Edge and a page count</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Sun, 15 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/printable-lego-instructions-from-a-threejs-viewer-cqw-units-headless-edge-and-a-page-count-5bbh</link>
      <guid>https://dev.to/misterblocks/printable-lego-instructions-from-a-threejs-viewer-cqw-units-headless-edge-and-a-page-count-5bbh</guid>
      <description>&lt;p&gt;A 3D viewer is great on a laptop. On the living-room floor, with a kid and a pile of bricks, you want paper. So every guide on &lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; prints as a real instruction booklet, comes as a PDF, and works offline once you've opened it.&lt;/p&gt;

&lt;p&gt;This is how that works, with no PDF library and no server-side rendering of 3D.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0vizbb3l4wmsdwfdov91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0vizbb3l4wmsdwfdov91.png" alt="Page 6 of the printed booklet for the Ladder 9 Fire Engine: a big step number, a blue box with the pieces needed, and the model so far" width="800" height="608"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The booklet is just a web page
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;/builds/&amp;lt;name&amp;gt;-lego-build/print&lt;/code&gt; lays the guide out like a LEGO booklet: a cover, &lt;strong&gt;one step per page&lt;/strong&gt; (the number, a blue box of the pieces it needs, what to do, and the model so far as big as the page allows), then the parts list.&lt;/p&gt;

&lt;p&gt;The trick that makes it look the same on screen and on paper: everything inside a page is sized in &lt;strong&gt;&lt;code&gt;cqw&lt;/code&gt;&lt;/strong&gt;, 1% of the sheet's width (CSS container query units). The sheet on screen and the sheet in the print dialog are the same shape, so the text and pictures land in the same places.&lt;/p&gt;

&lt;p&gt;Paper size is a toggle. US Letter landscape is the default and A4 is one click away. The toggle swaps an &lt;code&gt;@page&lt;/code&gt; rule and a class on &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;, and remembers your choice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/ladder-9-fire-engine-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjldj5in9igsc24rkqhvi.jpg" alt="The Ladder 9 Fire Engine as a red six-wheel brick model with a silver ladder" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Ladder 9 Fire Engine: 127 pieces, 15 steps, 18 printed pages. More &lt;a href="https://misterblocks.com/builds/trucks" rel="noopener noreferrer"&gt;LEGO trucks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Every picture is drawn in your browser
&lt;/h2&gt;

&lt;p&gt;There are no stored step images. The print page runs the same three.js viewer off screen and takes snapshots:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The cover&lt;/strong&gt;: the finished model in its own lighting, framed a little wider than tight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each step&lt;/strong&gt;: the model so far, on white, framed on &lt;em&gt;what's built so far&lt;/em&gt;. The camera is never closer than 60% of the distance that fits the whole model, so step 1 (four plates) doesn't fill the page like a close-up. Then the white edges are cropped off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each kind of piece&lt;/strong&gt;: drawn on its own, &lt;strong&gt;all from the same camera distance&lt;/strong&gt;, so a 1×1 plate looks small next to a 2×4 brick, just like in a real booklet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wheels are the exception: they're drawn flat in 2D, because the viewer can't draw a wheel without the plate it sits on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotwx2cuc1ra5aswuj0qa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotwx2cuc1ra5aswuj0qa.png" alt="The cover page of the printed booklet with the piece, step and parts counts" width="800" height="608"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  PDFs: headless Edge and a page count
&lt;/h2&gt;

&lt;p&gt;A PDF is the print page printed by &lt;strong&gt;headless Edge&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;msedge --headless=new --no-pdf-header-footer --virtual-time-budget=&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;ms&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --print-to-pdf=out.pdf &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;url&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;?paper=a4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The time budget grows with the model (40 s plus a bit per piece and per step), because a 1,400-piece sculpture takes a while to draw 120 times.&lt;/p&gt;

&lt;p&gt;Before anything is uploaded, the script &lt;strong&gt;counts the pages in the PDF&lt;/strong&gt;: it should be 1 cover + 1 page per step + 1 page per 40 kinds of piece. If the count is off, a picture didn't finish drawing, so that PDF is skipped instead of shipping a booklet with a blank step. Good ones go to Cloudflare R2, Letter and A4, in English and Ukrainian, and only get redone when the guide changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/sky-hook-tower-crane-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi5qoes5ucy41vrsvov2n.jpg" alt="Sky Hook tower crane as a yellow brick crane lifting a blue load" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Sky Hook Tower Crane: 112 pieces, 12 steps. One of the &lt;a href="https://misterblocks.com/builds/easy" rel="noopener noreferrer"&gt;easy builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Offline: guides you've opened keep working
&lt;/h2&gt;

&lt;p&gt;The site is a PWA. The service worker uses a different strategy per kind of request:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request&lt;/th&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pages&lt;/td&gt;
&lt;td&gt;network first; the saved copy if offline &lt;strong&gt;or after 4 s with no answer&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A build's data&lt;/td&gt;
&lt;td&gt;network first, saved copy offline: a guide opened once works offline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/app.js?v=&amp;lt;deploy&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;cache first (that address never changes)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;three.js, fonts&lt;/td&gt;
&lt;td&gt;cache first, but only CORS responses (opaque ones can cost ~7 MB of quota each)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New designs, chat&lt;/td&gt;
&lt;td&gt;network only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you open a page that isn't saved, the offline page lists the guides that &lt;em&gt;are&lt;/em&gt;, newest first, titled from their cached pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug that taught me to version everything
&lt;/h2&gt;

&lt;p&gt;One morning a fan build wouldn't open on my phone. The page was new, but the phone still had yesterday's &lt;code&gt;build.js&lt;/code&gt; cached (Cloudflare's browser cache keeps it for hours), and yesterday's script didn't know the new &lt;code&gt;/builds/&amp;lt;name&amp;gt;&lt;/code&gt; addresses.&lt;/p&gt;

&lt;p&gt;Now every script and stylesheet is linked as &lt;code&gt;/&amp;lt;file&amp;gt;?v=&amp;lt;deploy id&amp;gt;&lt;/code&gt;, the deploy id taken from the commit SHA. The service worker is served from an API route with the same id baked in, so &lt;strong&gt;every deploy changes the worker&lt;/strong&gt;, browsers install the new one, and it deletes the old deploy's caches. Pages themselves are never served stale.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/dig-dog-excavator-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5s3cias2fec5qe33tjck.jpg" alt="Dig Dog excavator as a yellow brick excavator digging on a sand base" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pick any guide, press &lt;strong&gt;Print or save as PDF&lt;/strong&gt;, and see how it comes out: &lt;a href="https://misterblocks.com/builds/trucks" rel="noopener noreferrer"&gt;trucks&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/robots" rel="noopener noreferrer"&gt;robots&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/cars" rel="noopener noreferrer"&gt;cars&lt;/a&gt; or the full list of &lt;a href="https://misterblocks.com/lego-build-ideas" rel="noopener noreferrer"&gt;LEGO build ideas&lt;/a&gt;. Everything is free at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>pwa</category>
      <category>webdev</category>
    </item>
    <item>
      <title>From a text prompt to a stud-checked LEGO model: research, design, look, fix</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Sat, 14 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/from-a-text-prompt-to-a-stud-checked-lego-model-research-design-look-fix-23f5</link>
      <guid>https://dev.to/misterblocks/from-a-text-prompt-to-a-stud-checked-lego-model-research-design-look-fix-23f5</guid>
      <description>&lt;p&gt;On &lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; you can type "Breaking Bad RV" or "a capybara in a hot spring" and, a few minutes later, get a LEGO model with step-by-step instructions where every stud is checked.&lt;/p&gt;

&lt;p&gt;The first version was one big prompt: "design this in bricks". It worked about as well as you'd expect. This post is about the pipeline that replaced it: &lt;strong&gt;research, plan, design, check the shape, look at it, fix every stud&lt;/strong&gt;, and how it shows its progress so a long wait doesn't feel like a hang.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/breaking-bad-rv-fleetwood-bounder-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feo7uuokvwllws1jhv18l.jpg" alt="The Breaking Bad RV as a cream and brown brick model on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Breaking Bad RV (Fleetwood Bounder): 123 pieces, 13 steps. More &lt;a href="https://misterblocks.com/builds/tv-shows" rel="noopener noreferrer"&gt;TV show builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Research first, with a search budget
&lt;/h2&gt;

&lt;p&gt;The planner gets web search, capped at three searches. It decides whether the idea is buildable (it declines hateful symbols, sexual content and real-world gore), then writes a short plan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;name&lt;/strong&gt; (which becomes the page address, &lt;code&gt;/builds/&amp;lt;name&amp;gt;-lego-build&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;piece target&lt;/strong&gt;: vehicles 70–160, characters and creatures 120–250, buildings and scenes 100–220&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;size&lt;/strong&gt; in studs&lt;/li&gt;
&lt;li&gt;a brief of 8–14 steps, with the colours of every visible part&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The colours rule came from a real failure. Asked for a Waymo Ojai, the pipeline drew it white with a glass band all the way round. That's the &lt;em&gt;older&lt;/em&gt; Waymo, a Jaguar. The planner now has to take colours from the research "for the exact version asked for, never from an older or related model of the same brand", and name the colour of the body, the face, the glass and the roof.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/waymo-ojai-robotaxi-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9gucx9xfcc14bfas86b1.jpg" alt="Waymo Ojai robotaxi as a pale blue brick van with a black face and roof sensor" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The Waymo Ojai, after the fix: pale blue with a black face. 112 pieces. More &lt;a href="https://misterblocks.com/builds/cars" rel="noopener noreferrer"&gt;LEGO cars&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The same incident added a design rule: the windscreen part is a low, raked car windscreen, but &lt;strong&gt;vans, buses and robotaxis have an upright one&lt;/strong&gt;, built as a wall of clear bricks, with solid pillars holding the roof up and something inside (seats, a dashboard) so the glass doesn't look empty.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. One line per piece
&lt;/h2&gt;

&lt;p&gt;The designer writes the model as plain text, one line per piece:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ID KIND X Y Z LX LZ H STEP COLOR DIR ON
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nine kinds of part (plate, brick, slope, axle plate, wheel, fender, windscreen, steering wheel, chain) on a stud grid. It's wrapped in a strict JSON schema, so the response always parses, and the long fixed system prompt is cached between calls.&lt;/p&gt;

&lt;p&gt;Plain lines beat nested JSON objects here for one practical reason: &lt;strong&gt;you can count them while they stream&lt;/strong&gt;. More on that below.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Shape check: did it build the right size?
&lt;/h2&gt;

&lt;p&gt;The most common failure wasn't broken studs. It was a model that was technically fine and far too small. The comment in the code still says it: &lt;em&gt;"a Waymo robotaxi came out as a low 62-piece box"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So before anything else, the design is compared with the plan. If it has fewer than 75% of the target pieces, a footprint under 75% of the planned size, or a height under 75% of the planned height, it goes back with exactly those numbers. Up to two rounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Look review: draw it in ASCII and ask
&lt;/h2&gt;

&lt;p&gt;Then the model looks at its own work. The design is drawn as &lt;strong&gt;ASCII side, front and top views&lt;/strong&gt;: one letter per colour, one character per stud. Those drawings go back with the research brief and one question: compare it with the real thing, the way a kid holding the real thing would.&lt;/p&gt;

&lt;p&gt;It's crude, but it catches the things a stud checker can't: a car whose face is the wrong colour, a character with no arms, a stadium with no stands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/dodger-stadium-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F61lne97zixz0kslgmkcg.jpg" alt="Dodger Stadium as a 1,394-piece brick diorama with blue seats and green field" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Dodger Stadium: 1,394 pieces, 118 steps. More &lt;a href="https://misterblocks.com/builds/sports" rel="noopener noreferrer"&gt;sports builds&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/buildings" rel="noopener noreferrer"&gt;LEGO buildings&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Fix every stud
&lt;/h2&gt;

&lt;p&gt;Finally, the stud checker: unknown sizes, colours missing from the palette, empty steps, pieces held by nothing, overlaps, wheels that can't turn. Up to 40 problems go back per round, and the model answers with a &lt;strong&gt;patch&lt;/strong&gt; (remove these ids, add or replace these lines), not a whole new design. Up to six rounds.&lt;/p&gt;

&lt;p&gt;If anything is still wrong at the end, the build is saved anyway, and the chat says so plainly and offers "say 'fix it'" instead of pretending it's perfect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Progress that means something
&lt;/h2&gt;

&lt;p&gt;A Vercel function can run for 800 seconds, so the pipeline gets 11 minutes and leaves the rest to save. The request that starts it answers immediately; the work continues in the background (&lt;code&gt;waitUntil&lt;/code&gt;) and writes its progress onto the build itself. The page polls a tiny endpoint every 2 seconds.&lt;/p&gt;

&lt;p&gt;The progress bar is real:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Planning (12–35%)&lt;/strong&gt;: the model's thinking is streamed as a summary, and the page shows its &lt;strong&gt;last finished sentence&lt;/strong&gt; after "Planning:". Never half a thought.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Placing (35–92%)&lt;/strong&gt;: because every piece is one line, the server counts lines as they stream and shows &lt;strong&gt;"Placing piece 84 of about 120…"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checking&lt;/strong&gt;: "Checking every stud: fixing 6 problems (round 2)…".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stages that won't fit are skipped: a shape or look round only starts if more than 5 minutes are left, a fix round if more than 2.5. And if a job stops reporting for 150 seconds, the page says the designer stopped and offers a retry, instead of spinning forever.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/the-knight-hollow-knight-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi5sz9hadg4178af7f1g0.jpg" alt="The Knight from Hollow Knight as a small white and blue brick figure" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The Knight (Hollow Knight): 74 pieces, 9 steps. More &lt;a href="https://misterblocks.com/builds/video-games" rel="noopener noreferrer"&gt;video game builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Then you can talk to it
&lt;/h2&gt;

&lt;p&gt;Every build has a chat. "Make the roof red" or "add a trailer" sends the current design, the remaining problems and the last few messages, and asks for a patch, which goes through the same checks. Your first message makes your own copy, so nobody else's build changes.&lt;/p&gt;

&lt;p&gt;Try it with your own idea at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;, see what others asked for on &lt;a href="https://misterblocks.com/custom-lego-instructions" rel="noopener noreferrer"&gt;custom LEGO instructions&lt;/a&gt;, or browse &lt;a href="https://misterblocks.com/builds/easy" rel="noopener noreferrer"&gt;easy builds&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/buildings" rel="noopener noreferrer"&gt;buildings&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/capybara-in-a-hot-spring-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcikedpld2qv3wcxlszx9.jpg" alt="A capybara relaxing in a hot spring, as a brick diorama" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Characters and brands belong to their owners.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>llm</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Sculpting 1,300-piece LEGO models in code: ellipsoids, voxels and clear supports</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Fri, 13 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/sculpting-1300-piece-lego-models-in-code-ellipsoids-voxels-and-clear-supports-2enn</link>
      <guid>https://dev.to/misterblocks/sculpting-1300-piece-lego-models-in-code-ellipsoids-voxels-and-clear-supports-2enn</guid>
      <description>&lt;p&gt;Most builds on &lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; are small and playable: a truck, a robot, a figure you can hold. But I also wanted big display pieces, the kind that sit on a shelf: a 1,300-piece Dragonite, a portrait of Jensen Huang, a tennis player mid-serve.&lt;/p&gt;

&lt;p&gt;Nobody is going to draw those layer by layer. So I sculpt them in code: describe the shape with a few geometric primitives, sample it at brick resolution, and let a packer turn it into real bricks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/mega-dragonite-voxel-sculpture-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu08olz96tp63als8gkso.jpg" alt="Mega Dragonite as a 1,297-piece voxel sculpture on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Mega Dragonite: 1,297 pieces, 125 steps. See all &lt;a href="https://misterblocks.com/builds/sculptures" rel="noopener noreferrer"&gt;LEGO sculptures&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/dragons" rel="noopener noreferrer"&gt;dragon builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  A sculpture is a list of rules
&lt;/h2&gt;

&lt;p&gt;Each rule is a body region, a colour, and a test that says whether a point is inside. The first rule that matches a point wins, so details (eyes, stripes) go first and the big body shapes last:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'head'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s1"&gt;'yellow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;ell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;14.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;22.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;7.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                              &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;ell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;19.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;22.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;7.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// eyes&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'head'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="nf"&gt;ell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;4.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;4.3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'crests'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'azure'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="nf"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;15.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;24.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;12.5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;12.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;25.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;16.5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;9.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;26.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.55&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'body'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="nf"&gt;ell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;13.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;12.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;4.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;4.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;3.3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'legs'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s1"&gt;'black'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;L&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ankle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;L&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;knee&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ankle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;knee&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'feet'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s1"&gt;'dkblue'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;ell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;10.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;8.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;3.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;4.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;ell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;23.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;8.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;3.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;4.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's a slice of Mega Greninja. There are only a handful of primitives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ell&lt;/code&gt;: an ellipsoid (heads, bodies, eyes)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cap&lt;/code&gt;: a capsule between two points (a limb)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chain&lt;/code&gt;: a bent tube through several points (a tail, a crest, an arm with an elbow)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;box&lt;/code&gt;: for stands and bases&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mirrorAbout(x)&lt;/code&gt;: the other side of a symmetric figure, so you only write one arm&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anything else is a plain function. Greninja's water shuriken is a small polar test: a hub, a rim and four blades twisted into a pinwheel.&lt;/p&gt;

&lt;h2&gt;
  
  
  From shape to voxels
&lt;/h2&gt;

&lt;p&gt;Units are studs, and one brick is 1.2 studs tall (a LEGO brick is 9.6 mm high on an 8 mm grid). A &lt;code&gt;scale&lt;/code&gt; knob sets how many voxels per model unit. That one number is the piece-count dial: at 1.4, Greninja lands on a 48×40 base at around 1,200 pieces.&lt;/p&gt;

&lt;p&gt;Every voxel centre is tested against the rules. Each voxel is one stud wide and one brick tall. A lone voxel with nothing above or below gets a copy underneath, so single studs don't hang in the air.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/jensen-huang-voxel-sculpture-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg48g27m71gzdhb6a8wtj.jpg" alt="Jensen Huang voxel sculpture in his black leather jacket, holding a chip" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Jensen Huang: 1,360 pieces, 142 steps. More &lt;a href="https://misterblocks.com/builds/famous-people" rel="noopener noreferrer"&gt;famous people&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  From voxels to bricks
&lt;/h2&gt;

&lt;p&gt;Each layer is packed greedily with the biggest same-colour brick that fits, from 2×8 down to 1×1. The long side runs along x on even layers and along z on odd ones, so the layers interlock like a real build instead of forming loose columns.&lt;/p&gt;

&lt;p&gt;The display base is two layers of plates laid crosswise: 16×16s underneath, and on top a pattern of 4-wide and 8-wide plates offset by 4 studs, so &lt;strong&gt;no top seam ever sits on a bottom seam&lt;/strong&gt;. The base must be a multiple of 8 studs on each side, or the script refuses to run.&lt;/p&gt;
&lt;h2&gt;
  
  
  Clear supports, until it's one piece
&lt;/h2&gt;

&lt;p&gt;Here's the part that makes it work in real plastic. A sculpted arm or a wing tip is often attached to nothing below it. After packing, the model goes through the same stud checker the site uses for every build. Anything that "falls apart" or "is not attached to anything" gets a &lt;strong&gt;trans-clear voxel under every empty cell beneath it&lt;/strong&gt;, and the whole thing is packed and checked again. It repeats (up to 40 rounds) until the checker says the model is a single connected piece.&lt;/p&gt;

&lt;p&gt;Clear supports are what real display models use too: you barely see them in a photo, and the model doesn't sag. When Mega Dragonite was first built it needed only three, because its wings hold each other up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/coco-gauff-voxel-sculpture-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcbzr3qrukulr26opdmm.jpg" alt="Coco Gauff voxel sculpture mid-serve on a blue tennis court base" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Coco Gauff: 1,188 pieces, 124 steps. More &lt;a href="https://misterblocks.com/builds/sports" rel="noopener noreferrer"&gt;sports builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1,200 pieces, in steps a person can follow
&lt;/h2&gt;

&lt;p&gt;A 1,200-piece model with one step per layer would have steps of 80 bricks. Nobody can follow that. So the steps are cut like a real instruction book:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The first three steps are always the base: the bottom layer, then the top layer's left half, then its right half.&lt;/li&gt;
&lt;li&gt;After that, each layer is grouped by body region (head, arms, legs…), and regions marked as "sided" are split into left and right.&lt;/li&gt;
&lt;li&gt;A group of more than 18 pieces is split front to back into "(1 of 3)", "(2 of 3)"…&lt;/li&gt;
&lt;li&gt;A tiny group of fewer than 5 is merged with a neighbour, as long as the result stays at 18 or fewer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The step text writes itself: &lt;em&gt;"Layer 14 of 29, part 2 of 3: 12 bricks for the arms."&lt;/em&gt; Finally the model is mirrored front to back, so the 3D guide opens on the face.&lt;/p&gt;
&lt;h2&gt;
  
  
  Running one
&lt;/h2&gt;

&lt;p&gt;Every sculpture is a single file that exports its rules and runs on its own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node scripts/data/mega-greninja.js --steps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It prints how many supports were added, the piece and step count, the colours used, the smallest and largest step, and either "ok: holds together" or what doesn't.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/porsche-mission-s-voxel-sculpture-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fujjipn3wl6wndvsl11o1.jpg" alt="Porsche Mission S as a white voxel sculpture" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Porsche Mission S: 965 pieces, 73 steps. More &lt;a href="https://misterblocks.com/builds/cars" rel="noopener noreferrer"&gt;LEGO cars&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Same character, two sizes
&lt;/h2&gt;

&lt;p&gt;Many sculptures also have a small brick-built version for kids, made with the hand-drawn layer packer instead: &lt;a href="https://misterblocks.com/builds/mega-dragonite-lego-build" rel="noopener noreferrer"&gt;Mega Dragonite&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/mega-greninja-lego-build" rel="noopener noreferrer"&gt;Mega Greninja&lt;/a&gt; are both around 200 pieces, next to their 1,200-piece display versions. Browse the &lt;a href="https://misterblocks.com/builds/pokemon" rel="noopener noreferrer"&gt;Pokémon builds&lt;/a&gt; to see both.&lt;/p&gt;

&lt;p&gt;Every guide is free, turns in 3D and prints as a booklet. Or start from your own pile at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Characters, people and brands belong to their owners.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>3d</category>
      <category>algorithms</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Making three.js bricks look like real LEGO: studio light, hollow undersides and a real wooden table</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Thu, 12 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/misterblocks/making-threejs-bricks-look-like-real-lego-studio-light-hollow-undersides-and-a-real-wooden-table-2h4</link>
      <guid>https://dev.to/misterblocks/making-threejs-bricks-look-like-real-lego-studio-light-hollow-undersides-and-a-real-wooden-table-2h4</guid>
      <description>&lt;p&gt;The first 3D viewer on &lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt; drew bricks as coloured boxes with little cylinders on top. It was technically correct and looked like a spreadsheet. Kids building from instructions need to &lt;em&gt;recognise&lt;/em&gt; the piece in their hand, so I spent a surprising amount of time making three.js bricks look like real plastic.&lt;/p&gt;

&lt;p&gt;Here's what made the difference, roughly from biggest to smallest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/tesla-cybertruck-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh9gi8tty7a76x5k0d0o5.jpg" alt="Tesla Cybertruck as a brick model on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Tesla Cybertruck: 61 pieces, 9 steps. More &lt;a href="https://misterblocks.com/builds/cars" rel="noopener noreferrer"&gt;LEGO cars&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Light it like a product photo
&lt;/h2&gt;

&lt;p&gt;Flat lighting is what makes 3D bricks look like boxes. Real ABS plastic has a soft sheen and bright edges, because in every product photo it's sitting in a studio.&lt;/p&gt;

&lt;p&gt;So the viewer builds one: an environment map of a soft grey room with a big softbox overhead and strip lights at the sides. Every brick reflects it a little, which gives the tops a gentle sheen and catches a highlight along every edge. That one change did more than everything else in this post.&lt;/p&gt;

&lt;p&gt;Two smaller fixes made it read correctly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Colour space.&lt;/strong&gt; Colours are picked in sRGB (that's what LEGO colour charts give you), converted to linear for the renderer to mix light, and the picture goes back to sRGB at the end. Skip that and the lighting mixes the wrong numbers, so colours come out muddy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seam lines that work on dark bricks.&lt;/strong&gt; Joins between bricks get a thin line: dark on light bricks, &lt;strong&gt;light on dark bricks&lt;/strong&gt;. Without the second half, a black wall looked like one solid slab.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Put it on a real table
&lt;/h2&gt;

&lt;p&gt;A model floating in a blue void reads as a render. The same model on a wooden table reads as &lt;em&gt;something you could build&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The table is a top-down photo of our own wooden table, scaled so 1,125 pixels = 34 studs (27 cm), mirrored so it tiles without seams, and fading into a dim room behind the model like a close-up photo. A soft dark patch right under the model grounds it, and the sun's shadow box is fitted tightly around the model, so its shadow is sharp where it touches the table and soft further out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/shelby-cobra-427-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Funeqi6afq82w28iys7iu.jpg" alt="Shelby Cobra 427 in blue and white racing stripes, on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Shelby Cobra 427: 69 pieces, 8 steps. One of the &lt;a href="https://misterblocks.com/builds/easy" rel="noopener noreferrer"&gt;easy builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every build's picture on the site (the gallery cards, Open Graph images, the image sitemap) is the real viewer, drawn by a headless browser at 1600×1200 on that table and stored in R2. Same renderer, same look, everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Bricks are hollow underneath
&lt;/h2&gt;

&lt;p&gt;When you open a piece from the parts list, it slowly tips over to show its underside, because that's how you tell a brick from a stack of plates, and a 2×4 from a 2×4 &lt;em&gt;tile&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzlfodhistsfdkz72p29a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzlfodhistsfdkz72p29a.png" alt="A white 2×4 brick in the piece viewer, tipped over to show the open cavity and three hollow tubes underneath" width="800" height="943"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The underside is real LEGO geometry (1 unit = 8 mm): a 1 mm top and 1.2 mm walls around an open cavity. Pieces 2 wide or more get a hollow tube (6.5 mm outside, 4.8 mm hole) between every four studs; 1-wide pieces get a thin pin. The cavity ceiling and tube holes are drawn dark so you see them as holes, not as a flat bottom.&lt;/p&gt;

&lt;p&gt;Only the single-piece viewer draws this. A 1,000-piece model stays solid, because nobody sees the bottom of a brick that's sitting on another brick.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Draw less, so 1,300 pieces stay fast
&lt;/h2&gt;

&lt;p&gt;Some of the &lt;a href="https://misterblocks.com/builds/sculptures" rel="noopener noreferrer"&gt;sculptures&lt;/a&gt; have more than 1,300 pieces, and they have to animate on a phone.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geometry is &lt;strong&gt;shared by every piece of the same size&lt;/strong&gt;, and outlines are computed once per size.&lt;/li&gt;
&lt;li&gt;All the studs of one piece are &lt;strong&gt;one mesh&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Covered studs aren't drawn.&lt;/strong&gt; For each stud, the viewer knows the step at which something will sit on it, and hides it from that step on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one had a bug that only showed in the exploded view. With the layers pulled apart, the covered studs were still hidden, so every layer looked smooth on top with nothing to connect to. Now, exploded, every piece shows all its studs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/robocop-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgiy8ce84qrkd886tcibj.jpg" alt="RoboCop as a gray brick figure" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;RoboCop: 91 pieces, 9 steps. In &lt;a href="https://misterblocks.com/builds/robots" rel="noopener noreferrer"&gt;robots&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/movies" rel="noopener noreferrer"&gt;movie builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Small things that make it feel right
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scrubbing never bounces.&lt;/strong&gt; Pressing Next drops the new pieces in with a little fall. Dragging the step slider is instant, and a hidden piece cancels any half-finished drop. Before that, scrubbing back and forth made the whole model jitter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The slider doesn't resize under your finger.&lt;/strong&gt; The step label used to sit next to the slider; its changing length resized the slider while you dragged it. It moved to its own line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tall figures keep their heads.&lt;/strong&gt; The camera frames the whole model as seen from its viewing angle, not from straight ahead, so tall figures fit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Degrees vs radians.&lt;/strong&gt; Some stored builds had their camera angles saved in degrees (&lt;code&gt;az 30, el 35&lt;/code&gt;) and the viewer read them as radians, so a few models opened looking up from under the table. Now any angle that's clearly degrees is read as degrees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Night mode&lt;/strong&gt; turns the lights down and lets neon pieces glow with a soft bloom, for the city and sci-fi builds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hover to explain.&lt;/strong&gt; Point at a brick and a card says what it is; point at a step in the list and its pieces light up while everything else fades.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/sans-undertale-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2For8swefbcu8d0dj0gx0a.jpg" alt="Sans from Undertale as a brick figure on a white base" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Sans (Undertale): 116 pieces, 10 steps. More &lt;a href="https://misterblocks.com/builds/video-games" rel="noopener noreferrer"&gt;video game builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Every build on the site uses this viewer, and every guide prints as a booklet or a PDF. A few to turn around:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://misterblocks.com/builds/rick-s-space-cruiser-rick-and-morty-lego-build" rel="noopener noreferrer"&gt;Rick's Space Cruiser&lt;/a&gt; from &lt;a href="https://misterblocks.com/builds/tv-shows" rel="noopener noreferrer"&gt;TV shows&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/space" rel="noopener noreferrer"&gt;space&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://misterblocks.com/builds/xbox-series-x-lego-build" rel="noopener noreferrer"&gt;Xbox Series X with a controller&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://misterblocks.com/builds/bluey-s-queenslander-house-lego-build" rel="noopener noreferrer"&gt;Bluey's Queenslander house&lt;/a&gt; from &lt;a href="https://misterblocks.com/builds/buildings" rel="noopener noreferrer"&gt;buildings&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/rick-s-space-cruiser-rick-and-morty-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1kc7v5jtgw7vtzie4yvh.jpg" alt="Rick's Space Cruiser from Rick and Morty as a brick model" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or snap a photo of your own loose bricks at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;: it works like a &lt;a href="https://misterblocks.com/lego-scanner-app" rel="noopener noreferrer"&gt;LEGO scanner app&lt;/a&gt; and gives you &lt;a href="https://misterblocks.com/custom-lego-instructions" rel="noopener noreferrer"&gt;custom instructions&lt;/a&gt; for builds made from exactly what you have.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Characters and brands belong to their owners.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>threejs</category>
      <category>webgl</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Voxels aren't LEGO: teaching a brick packer to build like a person</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Wed, 11 Nov 2026 22:29:18 +0000</pubDate>
      <link>https://dev.to/misterblocks/voxels-arent-lego-teaching-a-brick-packer-to-build-like-a-person-4jdh</link>
      <guid>https://dev.to/misterblocks/voxels-arent-lego-teaching-a-brick-packer-to-build-like-a-person-4jdh</guid>
      <description>&lt;p&gt;When you ask an AI for "SpongeBob's house in LEGO", the hard part isn't the shape. The hard part is that &lt;strong&gt;a shape made of cubes isn't a LEGO model.&lt;/strong&gt; Real builders don't stack 1×1 bricks into a block. They cross the layers so they lock, use one big plate for a base, leave the inside hollow, and use as few &lt;em&gt;kinds&lt;/em&gt; of parts as possible, so you can actually collect them.&lt;/p&gt;

&lt;p&gt;This post covers the packer I wrote for &lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;Mister Blocks&lt;/a&gt;, and the rules it learned, mostly from me looking at a build and saying "nobody would build it like that".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/bluey-s-queenslander-house-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmb04h7oe66hth0xc9l1k.jpg" alt="Bluey's Queenslander house as a brick model on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Bluey's Queenslander house: 128 pieces, 15 steps. One of the &lt;a href="https://misterblocks.com/builds/buildings" rel="noopener noreferrer"&gt;LEGO buildings&lt;/a&gt; the packer made.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: draw it like a top view, layer by layer
&lt;/h2&gt;

&lt;p&gt;A build is described as a stack of layers. Each one is a top-down drawing where every character is one stud of a colour:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;brickGrid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;W&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;D&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'#f2cd37'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Yellow'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;W&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'#ffffff'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'White'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;G&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'#4b9f4a'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Green'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'#c91a09'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Red'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;base&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'G'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                                &lt;span class="c1"&gt;// one base, from the biggest real plates&lt;/span&gt;
&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'brick'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'..YYYY..'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'..YWWY..'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// rows of studs, '.' = empty&lt;/span&gt;
&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slope&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'+z'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'R'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;             &lt;span class="c1"&gt;// hand-placed parts take their cells first&lt;/span&gt;
&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'W'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;                 &lt;span class="c1"&gt;// one tall brick instead of three layers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then &lt;code&gt;pack()&lt;/code&gt; turns each layer into real bricks. That's where all the rules live.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: cross the layers, stagger the seams
&lt;/h2&gt;

&lt;p&gt;The first version filled each layer greedily with the biggest brick that fit. It looked right in 3D and would have fallen apart in your hands: every layer had its seams in the same place, so the model was really a set of loose columns.&lt;/p&gt;

&lt;p&gt;So odd layers prefer pieces along one axis and even layers along the other. And when several pieces fit, the packer scores them by area &lt;strong&gt;plus half again if the piece bridges two or more pieces of the layer below&lt;/strong&gt;. That's what builders do without thinking: put the 2×4 across the join.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: one base, from real plates
&lt;/h2&gt;

&lt;p&gt;A base is one layer of the biggest plates LEGO actually makes (16×16, 8×16, 6×16…), never two thin layers glued together. And a plate never sits exactly on an identical plate, because that pair only holds itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/gundam-rx-78-2-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4wl4hw5k1cyz2h26slp5.jpg" alt="Gundam RX-78-2 as a brick figure on a gray base" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Gundam RX-78-2: 91 pieces. More in &lt;a href="https://misterblocks.com/builds/mechs" rel="noopener noreferrer"&gt;LEGO mechs&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/anime" rel="noopener noreferrer"&gt;anime builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 3: nothing rests on air
&lt;/h2&gt;

&lt;p&gt;This one took the longest. A drawing happily puts a brick where there is nothing underneath it: an arm sticking out, the brim of a roof. In 3D it looks fine. In plastic it falls off.&lt;/p&gt;

&lt;p&gt;The fix has two parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Overhangs are packed first&lt;/strong&gt;, in a piece that also covers a cell that &lt;em&gt;does&lt;/em&gt; sit on a stud. The overhanging piece is held from below, the way you'd build it.&lt;/li&gt;
&lt;li&gt;If a lone overhang still can't be bridged, its colour is &lt;strong&gt;carried inward&lt;/strong&gt; along the shortest path of drawn cells to the nearest supported cell, and the layer is packed again. Those inside cells are almost always hidden, so the look doesn't change, but now one piece spans from the support to the overhang.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A cell that one overhang has already claimed for its colour is never taken back. Without that rule, two overhangs side by side kept trading colours forever.&lt;/p&gt;

&lt;p&gt;The report at the end fails the build if &lt;em&gt;any&lt;/em&gt; piece has nothing under it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 4: hollow inside
&lt;/h2&gt;

&lt;p&gt;A solid 2,000-piece sculpture is a 2,000-piece sculpture nobody will build. Real display models are hollow.&lt;/p&gt;

&lt;p&gt;After packing, the packer flood-fills "outside air" from beyond the grid and above the top layer. Every drawn piece that touches no outside air (from the sides, above or below) can't be seen, so it's removed, &lt;strong&gt;one at a time, as long as the model still holds together&lt;/strong&gt;. It only ever removes pieces, so a build never gets bigger.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/mega-greninja-voxel-sculpture-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fen3omozgn4j3pz01ywgd.jpg" alt="Mega Greninja voxel sculpture with its water shuriken, on a wooden table" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Mega Greninja as a 1,183-piece sculpture, with clear supports added until the whole model is one connected piece. See all &lt;a href="https://misterblocks.com/builds/sculptures" rel="noopener noreferrer"&gt;LEGO sculptures&lt;/a&gt; and &lt;a href="https://misterblocks.com/builds/pokemon" rel="noopener noreferrer"&gt;Pokémon builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 5: a short parts list
&lt;/h2&gt;

&lt;p&gt;My first review of a small build was blunt: it was hard to collect and hard to build when such a simple model needed 25 different kinds of parts.&lt;/p&gt;

&lt;p&gt;So after packing, the packer keeps trying to &lt;strong&gt;drop the rarest part type&lt;/strong&gt; (one shape in one colour) and repack, as long as the list gets shorter and the model still holds together. One fewer kind of part is worth up to 4 extra pieces. 1×1s always stay as the fallback.&lt;/p&gt;

&lt;p&gt;There's one guard: if a ban only works because the repair recoloured cells (an eye turned into face colour), it's rejected. A shorter list isn't worth erasing the design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 6: tall bricks, like a person would use
&lt;/h2&gt;

&lt;p&gt;Then came the second round of review: &lt;em&gt;why three stacked 1×2 bricks when there's a 3-high block?&lt;/em&gt; Why three plates when a brick is the same height?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;restack&lt;/code&gt; walks every straight vertical run of pieces with the same footprint and colour, and re-cuts it into the fewest real pieces: tall bricks first (1×2×5, 1×2×3, 2×2×3…), then bricks, then plates. Only parts that really exist are allowed; asking for a tall brick LEGO doesn't make throws an error that lists the ones it does.&lt;/p&gt;

&lt;p&gt;It's always safe, which is why it runs on every build: inside a run, every face is covered by the run itself, so nothing else was touching those faces. The top and bottom of the run (what it clips onto, and what clips onto it) stay exactly the same. A chimney becomes a 2×2×3; a wall becomes one 1×6×5.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/totoro-my-neighbor-totoro-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6p1jmjdsbdfxzb8lv9sl.jpg" alt="Totoro brick figure on green grass" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Totoro: 156 pieces, 13 steps. Also in &lt;a href="https://misterblocks.com/builds/movies" rel="noopener noreferrer"&gt;movie builds&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 7: every step must be buildable
&lt;/h2&gt;

&lt;p&gt;Finally the steps. Layers are grouped into instruction steps of at most 18 pieces, and arms or tails can be named sub-assemblies with their own step. Then a build-order pass checks each step: if new pieces would only be held by a piece that arrives &lt;em&gt;later&lt;/em&gt;, that piece is brought forward. Moving a piece earlier can't break an earlier step, and a later step only gains support, so it repeats until nothing changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it adds up to
&lt;/h2&gt;

&lt;p&gt;Each rule came from looking at a finished build and asking whether a person would really build it that way. None of them are clever on their own. Together they're the difference between "a 3D shape in LEGO colours" and something my son can actually put together on the table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/builds/mcdonald-s-restaurant-lego-build" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzzmcbw4dj1qs3u94t071.jpg" alt="McDonald's restaurant as a small brick model with the golden arches sign" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to see the results, every build has free &lt;a href="https://misterblocks.com/custom-lego-instructions" rel="noopener noreferrer"&gt;step-by-step instructions&lt;/a&gt; you can turn in 3D and print. Browse by category: &lt;a href="https://misterblocks.com/builds/buildings" rel="noopener noreferrer"&gt;buildings&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/anime" rel="noopener noreferrer"&gt;anime&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/mechs" rel="noopener noreferrer"&gt;mechs&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/sculptures" rel="noopener noreferrer"&gt;sculptures&lt;/a&gt;, &lt;a href="https://misterblocks.com/builds/tv-shows" rel="noopener noreferrer"&gt;TV shows&lt;/a&gt; or &lt;a href="https://misterblocks.com/builds/easy" rel="noopener noreferrer"&gt;easy builds&lt;/a&gt;. Or snap your own pile of bricks at &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt; and get &lt;a href="https://misterblocks.com/lego-build-ideas" rel="noopener noreferrer"&gt;build ideas&lt;/a&gt; from exactly what you have.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan builds. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Characters and brands belong to their owners.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>algorithms</category>
      <category>showdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>I built a LEGO builder for my son with Claude. The hard part was making sure no brick floats</title>
      <dc:creator>Oleksandr Gamanyuk</dc:creator>
      <pubDate>Wed, 11 Nov 2026 06:53:19 +0000</pubDate>
      <link>https://dev.to/misterblocks/i-built-a-lego-builder-for-my-son-with-claude-the-hard-part-was-making-sure-no-brick-floats-am6</link>
      <guid>https://dev.to/misterblocks/i-built-a-lego-builder-for-my-son-with-claude-the-hard-part-was-making-sure-no-brick-floats-am6</guid>
      <description>&lt;p&gt;I built Mister Blocks for my son. We have the classic giant box of mixed LEGO: sets long broken up, instructions long gone. Every time he asked "what can I build?", I didn't have a good answer.&lt;/p&gt;

&lt;p&gt;Now he takes a photo of the pile, and a few minutes later there are a few builds made only from the bricks in that photo, with 3D step-by-step instructions he can turn, zoom and print.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw3ja5182vmrgykkx4p46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw3ja5182vmrgykkx4p46.png" alt="Mister Blocks: dump the pile, get a build that actually clicks" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first working version came out of the very first prompt to Claude. The next few days went into the part nobody warns you about: &lt;strong&gt;making sure the build actually holds together in real plastic.&lt;/strong&gt; This post is about that part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline
&lt;/h2&gt;

&lt;p&gt;There is no framework. It's a handful of Vercel serverless functions in plain Node, MongoDB for sessions, Cloudflare R2 for images and PDFs, and three.js for the 3D view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api/sessions/[id]/recognize   photo  -&amp;gt; inventory (every piece: kind, size in studs, color)
api/sessions/[id]/design      inventory -&amp;gt; one model (parts with x/y/z positions + steps)
api/sessions/[id]/chat        "make it a tow truck" -&amp;gt; a changed model, same checks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Recognize.&lt;/strong&gt; Claude (Opus 5.5) looks at the photo and returns structured JSON. Each piece gets an id (&lt;code&gt;B3&lt;/code&gt; is a brick, &lt;code&gt;P7&lt;/code&gt; a plate, &lt;code&gt;W1&lt;/code&gt; a wheel), its size in studs, its height in plates and its color. If it miscounts, you can correct it in the chat ("there are 48 of the 2×4s") and the inventory is reconciled without breaking the ids the models already use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design.&lt;/strong&gt; Claude gets the inventory and returns a model: every part placed on a grid (x and z in studs, y in plates, where a brick is 3 plates tall), plus which step it goes in.&lt;/p&gt;

&lt;p&gt;And that's where it gets interesting, because a language model's first answer is &lt;em&gt;almost&lt;/em&gt; right very often. Almost right in LEGO means a brick floating in mid-air.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stud checker
&lt;/h2&gt;

&lt;p&gt;Every model goes through a checker before anyone sees it. It's one plain JS file (&lt;code&gt;core.js&lt;/code&gt;), and the server and the browser load the exact same file, so what the page shows and what the server accepts can't disagree.&lt;/p&gt;

&lt;p&gt;It checks the things that make a build fail in your hands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every piece is held by studs.&lt;/strong&gt; A piece's bottom cells have to land on studs of something below it, or the piece has to sit on the table. Slopes only have studs on their top row, so the checker knows that too.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No two pieces occupy the same space.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only pieces you actually have.&lt;/strong&gt; Every part has to exist in the inventory, be of the same kind, and be used only once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wheels can turn.&lt;/strong&gt; Nothing may come lower than the deck inside a tire's zone, except the mudguard over its own tire.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The checker returns problems &lt;strong&gt;in plain English&lt;/strong&gt;, and they go straight back to Claude:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lib/designer.js (simplified)&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rounds&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;MAX_ROUNDS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;rounds&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;askJSON&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;schema&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;toModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inventory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;problems&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inventory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// "B4 is held by nothing", "P2 overlaps P5", ...&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'assistant'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'user'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sb"&gt;`The checker found these problems:\n- ${issues.join('\n- ')}\n\nFix every one and answer again in full. Same rules.`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Up to three rounds. In practice most models pass in one or two. This loop does more for quality than any amount of prompt tuning did: the model is good at fixing a specific, named problem, and much worse at avoiding every possible problem up front.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps you can actually build
&lt;/h2&gt;

&lt;p&gt;The next surprise was in the &lt;em&gt;instructions&lt;/em&gt;, not the model. A model can be perfectly valid at the end and still impossible to build in the given order, for example when step 3 places a piece that is only held by a plate that arrives in step 5. You'd be holding that piece in the air.&lt;/p&gt;

&lt;p&gt;So there's a second pass (&lt;code&gt;fixOrder&lt;/code&gt;) that walks the steps. For every group of new pieces in a step, it checks that they clip onto something already built or stand on the table. If they don't, it pulls the holding piece forward into that step, the way a real builder would put the plate on over the pieces it holds. Moving a piece earlier never breaks an earlier step, and a later step can only gain support, so the pass is safe to repeat until nothing changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules learned from a kid's truck
&lt;/h2&gt;

&lt;p&gt;The prompt has a section of rules that came from real builds, mostly from my son's own truck. For example, the chassis that works: two wheel plates in a row, joined by a 2-wide strip of plates, a mudguard over each wheel set one stud outward, and the deck resting on the mudguards plus a center block. Before that rule existed, a lot of generated cars had decks that sat on the tires.&lt;/p&gt;

&lt;p&gt;The rules are written as plain sentences, the same way you'd explain them to a person.&lt;/p&gt;

&lt;h2&gt;
  
  
  The viewer
&lt;/h2&gt;

&lt;p&gt;The 3D viewer is a small three.js file shared by the build page, the guides and the print view. Every brick gets a gentle sheen and highlighted edges, so it reads as plastic rather than as flat boxes. You drag to turn, scroll to zoom, and step through the build one step at a time; pointing at a step in the list lights up its pieces and fades everything else back. Every guide can be printed as a booklet or saved as a PDF, and the guides you've opened work offline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6a8fabh5z1qvm6bvsw0j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6a8fabh5z1qvm6bvsw0j.png" alt="The step-by-step viewer: Porsche Mission S, step 36 of 73" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt mode and bigger builds
&lt;/h2&gt;

&lt;p&gt;Not everyone has a pile handy, so you can also describe a build in words. A few of my favourites, each a free guide you can turn in 3D, step through and print:&lt;/p&gt;

&lt;h3&gt;
  
  
  Boston Dynamics Spot, with its arm
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/g/boston-dynamics-spot-brick" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fho4x6uqwcs80mvxsbajv.png" alt="Boston Dynamics Spot as a brick model, on a factory floor with hazard tape" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The yellow-and-black robot dog on four backward-bending legs, reaching for a valve on a factory floor. 150 pieces, 13 steps. &lt;strong&gt;&lt;a href="https://misterblocks.com/g/boston-dynamics-spot-brick" rel="noopener noreferrer"&gt;Build it →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  SpongeBob's Pineapple House
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/g/spongebob-pineapple-house-brick" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Freomd2ml06ybbgr74jxs.png" alt="SpongeBob's pineapple house in bricks, with the blue door and green leaves on top" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The pineapple under the sea: round, wider in the middle, with the blue door and a crown of leaves. 237 pieces, 18 steps. &lt;strong&gt;&lt;a href="https://misterblocks.com/g/spongebob-pineapple-house-brick" rel="noopener noreferrer"&gt;Build it →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Porsche Mission S
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/g/porsche-mission-s" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyvovcw3dasnzv8dp1po9.png" alt="Porsche Mission S as a white voxel sculpture" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Porsche's vision car in white, with the black canopy and the full-width red light bar. The big one: 965 pieces in 73 steps. &lt;strong&gt;&lt;a href="https://misterblocks.com/g/porsche-mission-s" rel="noopener noreferrer"&gt;Build it →&lt;/a&gt;&lt;/strong&gt; (Want something quicker? There's also a &lt;a href="https://misterblocks.com/g/porsche-mission-s-brick" rel="noopener noreferrer"&gt;69-piece version&lt;/a&gt;.)&lt;/p&gt;

&lt;h3&gt;
  
  
  Mega Dragonite
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://misterblocks.com/g/mega-dragonite" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpik1jhxzc8cey2vyev1d.png" alt="Mega Dragonite as an orange voxel sculpture with cream wings, on a gray base" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A voxel sculpture of the dragon Pokémon: 1,315 pieces in 121 steps. &lt;strong&gt;&lt;a href="https://misterblocks.com/g/mega-dragonite" rel="noopener noreferrer"&gt;Build it →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;More in the &lt;a href="https://misterblocks.com/builds" rel="noopener noreferrer"&gt;gallery&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The large sculptures go through a different path. A 3D shape is described as ellipsoids, limbs and tubes, packed into standard bricks on a plate base, and given clear supports until it holds. Then it goes through the same stud check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost
&lt;/h2&gt;

&lt;p&gt;Each build takes a few minutes and costs a couple of dollars in API calls. Every Claude call's tokens and cost are logged to MongoDB, and there's a per-visitor daily limit plus a site-wide daily budget, so a busy day can't turn into a surprise bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;It's free: &lt;strong&gt;&lt;a href="https://misterblocks.com" rel="noopener noreferrer"&gt;misterblocks.com&lt;/a&gt;&lt;/strong&gt;. Snap your pile and see what it comes up with. I'd love to hear what you build, and especially what it got wrong.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unofficial fan project. LEGO® is a trademark of the LEGO Group, which does not sponsor or endorse this site. Spot, SpongeBob SquarePants, Porsche and Pokémon belong to their owners; these are fan builds.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>showdev</category>
      <category>javascript</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
