<?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>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>
