<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged threejs</title>
<link>https://coderlegion.com/tag/threejs</link>
<description>Powered by Question2Answer</description>
<item>
<title>What If Software Could Ask: “Change the World, but Keep This Moment”?</title>
<link>https://coderlegion.com/29127/what-if-software-could-ask-change-the-world-but-keep-this-moment</link>
<description>&lt;p&gt;At 16:50, a photograph is supposed to happen in a small harbor plaza.&lt;/p&gt;
&lt;p&gt;The photographer is there. The couple is there. The flowers arrive at 16:30, the arrangement is ready at 16:40, and everything happens as planned.&lt;/p&gt;
&lt;p&gt;Then I close a bridge at 16:15.&lt;/p&gt;
&lt;p&gt;The courier can no longer take the original route.&lt;/p&gt;
&lt;p&gt;The flowers arrive at 16:55.&lt;/p&gt;
&lt;p&gt;Setup finishes at 17:05.&lt;/p&gt;
&lt;p&gt;The photograph never happens.&lt;/p&gt;
&lt;p&gt;That is the entire problem behind &lt;strong&gt;Butterfly&lt;/strong&gt;.&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=14992995714163178030&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;But I wasn't particularly interested in asking:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;What happens when I change the world?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Simulation already does that very well.&lt;/p&gt;
&lt;p&gt;The question I wanted to ask was different:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;What else would have to change so that one exact moment can still happen?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That distinction turned a small 3D experiment into something much stranger.&lt;/p&gt;
&lt;h3 id=&quot;the-photograph-is-not-allowed-to-move&quot;&gt;The photograph is not allowed to move&lt;/h3&gt;
&lt;p&gt;The easiest way to “fix” the scenario would be to move the photograph to 17:05.&lt;/p&gt;
&lt;p&gt;Butterfly is not allowed to do that.&lt;/p&gt;
&lt;p&gt;When I select &lt;strong&gt;Keep this moment&lt;/strong&gt;, the photograph becomes a constraint.&lt;br&gt;
&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=18327246006541616991&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;It must still happen at 16:50.&lt;/p&gt;
&lt;p&gt;In the same place.&lt;/p&gt;
&lt;p&gt;With the same people.&lt;/p&gt;
&lt;p&gt;With the required flowers ready.&lt;/p&gt;
&lt;p&gt;And the bridge must remain closed.&lt;/p&gt;
&lt;p&gt;A photograph at 17:05 is not an acceptable approximation.&lt;/p&gt;
&lt;p&gt;It is another moment.&lt;/p&gt;
&lt;p&gt;That rule became &lt;strong&gt;MomentFrame&lt;/strong&gt;, one of the central ideas in Butterfly.&lt;/p&gt;
&lt;p&gt;The system takes something that happened in the original history and freezes the parts that define it.&lt;/p&gt;
&lt;p&gt;Then it asks the changed world to find another path back to that exact state.&lt;/p&gt;
&lt;h3 id=&quot;the-world-has-to-earn-the-solution&quot;&gt;The world has to earn the solution&lt;/h3&gt;
&lt;p&gt;Butterfly doesn't switch between prewritten branches.&lt;/p&gt;
&lt;p&gt;There is no:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;if bridge_closed → flowers_late&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The delivery asks the world for a route.&lt;/p&gt;
&lt;p&gt;When the bridge becomes unavailable, the valid route changes.&lt;/p&gt;
&lt;p&gt;That changes the arrival time.&lt;/p&gt;
&lt;p&gt;The new arrival time changes when the flower arrangement can be completed.&lt;/p&gt;
&lt;p&gt;The photograph evaluates its requirements again.&lt;/p&gt;
&lt;p&gt;And it fails.&lt;/p&gt;
&lt;p&gt;The same thing happens when Butterfly searches for a recovery.&lt;/p&gt;
&lt;p&gt;The current world contains a bounded set of interventions that are actually permitted. Each candidate is applied to the changed world, the simulation runs again, and the result is checked against the MomentFrame.&lt;/p&gt;
&lt;p&gt;In the current scenario, two alternate histories survive.&lt;/p&gt;
&lt;p&gt;One activates an already-authored ferry connection.&lt;/p&gt;
&lt;p&gt;The other sends the courier earlier, allowing the crossing to happen before the bridge closes.&lt;/p&gt;
&lt;p&gt;Both restore the photograph at 16:50.&lt;/p&gt;
&lt;p&gt;Neither reopens the bridge.&lt;/p&gt;
&lt;p&gt;That last part matters.&lt;/p&gt;
&lt;p&gt;The system is not trying to undo the user's change. It is trying to find another history compatible with it.&lt;/p&gt;
&lt;h3 id=&quot;it-is-deliberately-a-very-small-world&quot;&gt;It is deliberately a very small world&lt;/h3&gt;
&lt;p&gt;Butterfly currently follows one afternoon in one small harbor town.&lt;/p&gt;
&lt;p&gt;That is intentional.&lt;/p&gt;
&lt;p&gt;I didn't want to hide the causal structure behind a large generated world and then point at an interesting output.&lt;/p&gt;
&lt;p&gt;I wanted the whole chain to remain inspectable.&lt;/p&gt;
&lt;p&gt;You can see the bridge.&lt;/p&gt;
&lt;p&gt;You can see the courier.&lt;/p&gt;
&lt;p&gt;You can see the route.&lt;/p&gt;
&lt;p&gt;You can see when the delivery arrives.&lt;/p&gt;
&lt;p&gt;You can see when setup completes.&lt;/p&gt;
&lt;p&gt;You can see exactly why the photograph disappears.&lt;/p&gt;
&lt;p&gt;And when Butterfly proposes a recovery, you can inspect why that works too.&lt;/p&gt;
&lt;p&gt;For this experiment, a small world with visible causality was more useful than a large world full of possibilities.&lt;/p&gt;
&lt;h3 id=&quot;then-the-simulator-started-lying-to-me&quot;&gt;Then the simulator started lying to me&lt;/h3&gt;
&lt;p&gt;The interesting part of building Butterfly was not getting the first scenario working.&lt;/p&gt;
&lt;p&gt;That happened relatively early.&lt;/p&gt;
&lt;p&gt;The interesting part was trying to break it afterward.&lt;/p&gt;
&lt;p&gt;One of the first problems was almost embarrassing.&lt;/p&gt;
&lt;p&gt;The original scenario produced the correct result, but parts of the engine were effectively using stable event IDs as a proxy for temporal ordering.&lt;/p&gt;
&lt;p&gt;Nothing looked wrong.&lt;/p&gt;
&lt;p&gt;Then I changed the IDs.&lt;/p&gt;
&lt;p&gt;The simulation broke.&lt;/p&gt;
&lt;p&gt;That meant the result had been correct for the wrong reason.&lt;/p&gt;
&lt;p&gt;The fix was not a UI patch. Time had to become explicit in fact resolution.&lt;/p&gt;
&lt;p&gt;Another bug was worse.&lt;/p&gt;
&lt;p&gt;A fact produced later in the afternoon could leak backward and satisfy a requirement earlier in the timeline.&lt;/p&gt;
&lt;p&gt;From the outside, the world could still look plausible.&lt;/p&gt;
&lt;p&gt;Internally, causality was broken.&lt;/p&gt;
&lt;p&gt;The engine now only accepts producers that can complete at or before the moment being evaluated. Real temporal self-dependencies are treated as cycles rather than quietly inventing an answer.&lt;/p&gt;
&lt;p&gt;Those two bugs changed how I approached the rest of the project.&lt;/p&gt;
&lt;p&gt;A working scenario was no longer enough.&lt;/p&gt;
&lt;p&gt;I started changing assumptions deliberately.&lt;/p&gt;
&lt;p&gt;Rename things.&lt;/p&gt;
&lt;p&gt;Remove coordinates.&lt;/p&gt;
&lt;p&gt;Introduce later transports.&lt;/p&gt;
&lt;p&gt;Change route modes.&lt;/p&gt;
&lt;p&gt;Move timing boundaries.&lt;/p&gt;
&lt;p&gt;If the simulation only works because the original fixture is friendly, I don't consider that a working simulation.&lt;/p&gt;
&lt;h3 id=&quot;the-renderer-had-its-own-version-of-reality&quot;&gt;The renderer had its own version of reality&lt;/h3&gt;
&lt;p&gt;There was another class of bugs that had nothing to do with causal logic.&lt;/p&gt;
&lt;p&gt;An actor could be correctly located at a destination according to the simulator while still appearing somewhere else in the 3D scene.&lt;/p&gt;
&lt;p&gt;The engine knew one thing.&lt;/p&gt;
&lt;p&gt;The renderer showed another.&lt;/p&gt;
&lt;p&gt;I eventually separated two concepts that initially looked almost identical:&lt;/p&gt;
&lt;p&gt;where something &lt;strong&gt;is semantically&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and where the renderer &lt;strong&gt;knows how to draw it&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;That sounds obvious afterward.&lt;/p&gt;
&lt;p&gt;It was not obvious while both were represented closely enough that the first scenario appeared to work.&lt;/p&gt;
&lt;p&gt;Butterfly kept producing these little cases where the visible result forced me to question the model underneath it.&lt;/p&gt;
&lt;p&gt;At one point I had a custom Three.js camera implementation that passed the DOM-level tests.&lt;/p&gt;
&lt;p&gt;The screenshot looked terrible.&lt;/p&gt;
&lt;p&gt;I removed it.&lt;/p&gt;
&lt;p&gt;That gave the project another rule:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;A passing test does not overrule visible evidence.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From then on, browser screenshots became part of the development loop instead of something generated at the end.&lt;/p&gt;
&lt;h3 id=&quot;the-recovery-is-deliberately-bounded&quot;&gt;The recovery is deliberately bounded&lt;/h3&gt;
&lt;p&gt;Butterfly does not invent an unlimited number of possible histories.&lt;/p&gt;
&lt;p&gt;The world already contains the interventions that are allowed to exist.&lt;/p&gt;
&lt;p&gt;The recovery engine searches that bounded domain, simulates each candidate, calculates the consequences and rejects anything that doesn't restore the fixed moment.&lt;/p&gt;
&lt;p&gt;This also means the engine has to distinguish between very different outcomes.&lt;/p&gt;
&lt;p&gt;Maybe a valid solution exists.&lt;/p&gt;
&lt;p&gt;Maybe the target was already satisfied.&lt;/p&gt;
&lt;p&gt;Maybe every configured intervention has been tested.&lt;/p&gt;
&lt;p&gt;Maybe the search budget was reached before the domain was exhausted.&lt;/p&gt;
&lt;p&gt;Maybe the available information is insufficient to decide.&lt;/p&gt;
&lt;p&gt;Those are not the same answer.&lt;/p&gt;
&lt;p&gt;In particular, exhausting the authored intervention set does &lt;strong&gt;not&lt;/strong&gt; prove that no solution could exist in every imaginable version of the world.&lt;/p&gt;
&lt;p&gt;It only tells us that the system did not find one inside the domain it was actually allowed to search.&lt;/p&gt;
&lt;p&gt;I wanted that boundary to remain explicit.&lt;/p&gt;
&lt;h3 id=&quot;the-world-itself-is-structured-data&quot;&gt;The world itself is structured data&lt;/h3&gt;
&lt;p&gt;The simulation is written in TypeScript and the visual world uses Three.js.&lt;/p&gt;
&lt;p&gt;Next.js provides the application around it.&lt;/p&gt;
&lt;p&gt;Sanity is used as the authored source for the world model: people, places, objects, routes, transport availability, events, requirements, facts, causal relationships and permitted interventions.&lt;/p&gt;
&lt;p&gt;Published world data is validated and frozen into a revision before visitors start creating variants.&lt;/p&gt;
&lt;p&gt;A visitor changing the bridge schedule is therefore not editing the shared world.&lt;/p&gt;
&lt;p&gt;They are creating another history from a known version of it.&lt;/p&gt;
&lt;p&gt;That separation became important very quickly because comparing histories is meaningless if the thing being compared is quietly changing underneath you.&lt;/p&gt;
&lt;h3 id=&quot;why-call-it-butterfly-&quot;&gt;Why call it Butterfly?&lt;/h3&gt;
&lt;p&gt;The obvious reference is the butterfly effect: change something small and consequences propagate outward.&lt;/p&gt;
&lt;p&gt;Butterfly starts there.&lt;/p&gt;
&lt;p&gt;Close a bridge.&lt;/p&gt;
&lt;p&gt;A route changes.&lt;/p&gt;
&lt;p&gt;A delivery moves.&lt;/p&gt;
&lt;p&gt;A setup moves.&lt;/p&gt;
&lt;p&gt;A photograph disappears.&lt;/p&gt;
&lt;p&gt;But I became more interested in the reverse problem.&lt;/p&gt;
&lt;p&gt;Once consequences have propagated, can we choose one thing we refuse to lose?&lt;/p&gt;
&lt;p&gt;And if we do, what does the rest of the world have to become?&lt;/p&gt;
&lt;p&gt;That gives Butterfly a slightly different shape from a normal “what if?” simulator.&lt;/p&gt;
&lt;p&gt;Most simulations ask:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;What happens if the world changes?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Butterfly asks:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;What must the world change so that one chosen thing doesn't?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For now, it is one bridge, one courier and one photograph.&lt;/p&gt;
&lt;p&gt;That is enough to make the question real.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Try Butterfly:&lt;/strong&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://butterfly-mu-orpin.vercel.app&quot;&gt;https://butterfly-mu-orpin.vercel.app&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code:&lt;/strong&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Daniele-Cangi/Butterfly&quot;&gt;https://github.com/Daniele-Cangi/Butterfly&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Butterfly is open source under the MIT License.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/29127/what-if-software-could-ask-change-the-world-but-keep-this-moment</guid>
<pubDate>Tue, 29 Sep 2026 17:00:44 +0000</pubDate>
</item>
<item>
<title>I built a real MNA circuit solver from scratch, then wrapped it in Three.js</title>
<link>https://coderlegion.com/27600/i-built-a-real-mna-circuit-solver-from-scratch-then-wrapped-it-in-three-js</link>
<description>&lt;p&gt;The problem with &quot;circuit simulators&quot; on the web&lt;/p&gt;
&lt;p&gt;Most browser-based circuit tools either fake it (animate current flow without real math) or wrap an existing SPICE engine. I wanted to actually implement the math myself — a Modified Nodal Analysis (MNA) solver, the same technique real SPICE tools use under the hood — and then give it a 3D interface instead of the usual flat 2D schematic.&lt;/p&gt;
&lt;p&gt;The result is CircuitForge: place components on a 3D breadboard, wire them up, and get real computed node voltages and branch currents — not an animation.&lt;/p&gt;
&lt;p&gt;The actual solver&lt;/p&gt;
&lt;p&gt;MNA builds a matrix from Kirchhoff's Current Law at every node, plus extra equations for voltage sources, then solves it. Stripped down, the core loop looks roughly like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const g = 1 / resistance;
matrix[nodeA][nodeA] += g;
matrix[nodeB][nodeB] += g;
matrix[nodeA][nodeB] -= g;
matrix[nodeB][nodeA] -= g;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Solve Ax = z for the node voltage vector, and you get exact values — not an approximation. I validated it against hand-calculated results on a few real circuits (simple divider, diode network, a series-parallel KCL cross-check) before trusting it in production. Full writeup with the actual worked numbers is here: luvaai.in/learn/circuit-simulator-accuracy-validation.&lt;/p&gt;
&lt;p&gt;Then the fun part: making it 3D&lt;/p&gt;
&lt;p&gt;Three.js handles the scene, camera, and raycasting for placing/wiring components. The tricky bit wasn't rendering — it was making wire connections feel physical: snapping to component pins, detecting valid connection points, and keeping the 3D positions in sync with the underlying circuit graph the solver actually operates on. Two completely separate data models (3D scene graph vs. circuit netlist) that have to stay perfectly consistent.&lt;/p&gt;
&lt;p&gt;What it can't do (yet)&lt;/p&gt;
&lt;p&gt;Being upfront: this is DC operating-point analysis only right now — no transient simulation, no AC frequency sweeps. If you need to see a capacitor charge curve over time, this isn't there yet. It's on the roadmap, but I'd rather ship an honestly-scoped DC solver than fake a transient one.&lt;/p&gt;
&lt;p&gt;Try it&lt;/p&gt;
&lt;p&gt;Live at luvaai.in — no signup needed, just start placing components. If you've built anything with raycasting-based node/wire editors, or have thoughts on extending MNA to transient analysis, I'd love to hear it in the comments.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/27600/i-built-a-real-mna-circuit-solver-from-scratch-then-wrapped-it-in-three-js</guid>
<pubDate>Fri, 18 Sep 2026 11:23:57 +0000</pubDate>
</item>
<item>
<title>Building an Immersive 3D Dice Roller with React and Three.js</title>
<link>https://coderlegion.com/26604/building-an-immersive-3d-dice-roller-with-react-and-three-js</link>
<description>&lt;p&gt;Hey RPG community! I wanted to share a tool I built for my tabletop sessions — &lt;strong&gt;Arcane-Dice&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Inspired by the immersive dice rolling experience in Baldur's Gate 3, I built this web-based 3D dice roller app to bring that same feeling to any browser.&lt;/p&gt;
&lt;h4 id=&quot;features-&quot;&gt;Features:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Physics-based Rolling:&lt;/strong&gt; Real 3D dice using Three.js and Cannon.js.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Immersive Effects:&lt;/strong&gt; Sound effects and animations to make every roll feel impactful.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy Integration:&lt;/strong&gt; Ready to be used in any web-based tabletop tool.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;tech-stack-&quot;&gt;Tech Stack:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Three.js (React Three Fiber)&lt;/li&gt;
&lt;li&gt;Cannon.js for physics&lt;/li&gt;
&lt;li&gt;Howler.js for audio&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Check it out on GitHub:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MahanKenway/Arcane-Dice&quot;&gt;GitHub Repository&lt;/a&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://mahankenway.github.io/Arcane-Dice/&quot;&gt;Live Demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'd love to hear your feedback or see what kind of dice skins you'd like to see next!&lt;/p&gt;
&lt;h2 id=&quot;showdev-gamedev-threejs-react-rpg&quot;&gt;showdev #gamedev #threejs #react #rpg&lt;/h2&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26604/building-an-immersive-3d-dice-roller-with-react-and-three-js</guid>
<pubDate>Wed, 09 Sep 2026 11:15:19 +0000</pubDate>
</item>
<item>
<title>Shader Budgeting For Web Games: Where Your Frame Time Actually Goes</title>
<link>https://coderlegion.com/25438/shader-budgeting-for-web-games-where-your-frame-time-actually-goes</link>
<description>&lt;p&gt;A lot of the WebGL questions that land here turn out to be performance questions wearing a syntax costume, so this is the profiling angle rather than the GLSL tutorial angle. If you have ever stripped a scene down to fewer triangles and watched the frame rate refuse to move, this is probably why.&lt;/p&gt;
&lt;h3 id=&quot;where-the-frame-time-actually-goes&quot;&gt;Where The Frame Time Actually Goes&lt;/h3&gt;
&lt;p&gt;A 1920x1080 canvas is a little over two million pixels. Every triangle covering a pixel runs the fragment shader for that pixel, and with overdraw, meaning several triangles stacked over the same pixel, the fragment shader can execute tens of millions of times in a single frame. The vertex shader runs once per vertex, which for most web scenes is a few thousand invocations.&lt;/p&gt;
&lt;p&gt;That ratio is the whole story. Cutting geometry shrinks the small number. Cutting per pixel work shrinks the large one.&lt;/p&gt;
&lt;h3 id=&quot;moving-work-up-a-stage&quot;&gt;Moving Work Up A Stage&lt;/h3&gt;
&lt;p&gt;Communication between the two programmable stages only flows one way. The vertex shader writes varyings, the rasterizer interpolates them across the triangle, and the fragment shader reads them as inputs. Anything that interpolates acceptably can be computed per vertex and handed down essentially for free, which is the difference between per vertex Gouraud lighting and per pixel Phong lighting: smoother results at real cost.&lt;/p&gt;
&lt;p&gt;Procedural animation is the other easy win. Grass sway, ocean waves and cloth flutter are vertex displacement driven by sine waves, noise and a time uniform, and that beats rewriting vertex buffers from JavaScript every frame because the GPU does the math in parallel across every vertex at once. The &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.abratabia.com/game-shaders/&quot;&gt;full guide to game shaders and visual effects&lt;/a&gt; walks through the GLSL for both stages if you want the code rather than the summary.&lt;/p&gt;
&lt;h3 id=&quot;branching-costs-more-than-you-expect&quot;&gt;Branching Costs More Than You Expect&lt;/h3&gt;
&lt;p&gt;GPUs execute fragments in groups, called warps or wavefronts depending on the vendor. If any fragment in a group takes a different branch, every fragment in that group executes both sides. So the if/else you wrote to skip expensive work often costs about the same as running it unconditionally. step(), mix() and clamp() usually beat the branch, and this is the single most common surprise for people coming from CPU code.&lt;/p&gt;
&lt;p&gt;Draw calls matter for a related reason. Each one can force a shader program switch, texture rebinds and uniform updates, so a pile of unique ShaderMaterial instances quietly defeats the automatic batching that Three.js and Babylon.js do for you.&lt;/p&gt;
&lt;h3 id=&quot;one-shader-source-for-webgl-and-webgpu&quot;&gt;One Shader Source For WebGL And WebGPU&lt;/h3&gt;
&lt;p&gt;Three.js now ships TSL, a JavaScript node graph that compiles to GLSL for the WebGL backend and WGSL for WebGPU from a single source, so you are not maintaining two shader codebases while WebGPU support fills in across browsers. Classic ShaderMaterial still works if you would rather write GLSL by hand or you are porting existing code. Babylon.js goes the parallel route with its own node material system plus a built in inspector.&lt;/p&gt;
&lt;h3 id=&quot;takeaway&quot;&gt;Takeaway&lt;/h3&gt;
&lt;p&gt;Profile first. Spector.js captures the WebGL calls and lets you inspect the shader program, textures and GPU state per draw call, and the Babylon.js inspector reports draw call counts and frame stats directly. Once you can see which stage is eating the frame, the fix is usually obvious, and it is usually not fewer triangles.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25438/shader-budgeting-for-web-games-where-your-frame-time-actually-goes</guid>
<pubDate>Wed, 26 Aug 2026 11:52:22 +0000</pubDate>
</item>
<item>
<title>Building HOLO.SYS — A Futuristic 3D Holographic Visualization System with React, Three.js &amp; GLSL</title>
<link>https://coderlegion.com/17092/building-holo-sys-futuristic-3d-holographic-visualization-system-with-react-three-glsl</link>
<description>&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Modern web development is rapidly evolving beyond traditional websites and static user interfaces. Today, developers are building immersive digital experiences directly inside the browser using technologies like WebGL, Three.js, GLSL shaders and advanced Web architectures.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;As a Full Stack Web Developer, I always wanted to explore the creative side of Web engineering — where design, interaction, animation, performance and GPU rendering come together to create something visually powerful.&lt;/p&gt;
&lt;p&gt;That vision led me to build &lt;strong&gt;HOLO.SYS&lt;/strong&gt; — a futuristic cyberpunk-inspired 3D holographic visualization system developed using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;React.js&lt;/li&gt;
&lt;li&gt;Three.js&lt;/li&gt;
&lt;li&gt;GLSL Shader Programming&lt;/li&gt;
&lt;li&gt;GSAP Animations&lt;/li&gt;
&lt;li&gt;WebGL Rendering&lt;/li&gt;
&lt;li&gt;Modern JavaScript Architecture&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This project is not just another Web experiment.&lt;br&gt;
It is a complete creative Web engineering project focused on immersive web experiences, real-time rendering, shader effects, and cinematic UI systems.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-is-holo-sys-&quot;&gt;What is HOLO.SYS?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;HOLO.SYS&lt;/strong&gt; is a real-time interactive holographic visualization system inspired by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cyberpunk interfaces&lt;/li&gt;
&lt;li&gt;Futuristic HUD systems&lt;/li&gt;
&lt;li&gt;Sci-fi holographic displays&lt;/li&gt;
&lt;li&gt;AI visualization panels&lt;/li&gt;
&lt;li&gt;Advanced UI/UX concepts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal of this project was to simulate a futuristic holographic rendering system directly inside the browser using modern Web technologies.&lt;/p&gt;
&lt;p&gt;The application features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Real-time 3D rendering&lt;/li&gt;
&lt;li&gt;Interactive camera controls&lt;/li&gt;
&lt;li&gt;Dynamic holographic shader effects&lt;/li&gt;
&lt;li&gt;Scanline visual systems&lt;/li&gt;
&lt;li&gt;Animated glitch transitions&lt;/li&gt;
&lt;li&gt;Fresnel rim glow lighting&lt;/li&gt;
&lt;li&gt;Smooth geometry morph transitions&lt;/li&gt;
&lt;li&gt;Live GUI customization controls&lt;/li&gt;
&lt;li&gt;Performance optimized rendering&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This project represents the combination of:&lt;/p&gt;
&lt;p&gt;✅ Creative Development&lt;/p&gt;
&lt;p&gt;✅ Modern Frontend Engineering&lt;/p&gt;
&lt;p&gt;✅ WebGL Rendering&lt;/p&gt;
&lt;p&gt;✅ Real-Time Graphics&lt;/p&gt;
&lt;p&gt;✅ Interactive UI Systems&lt;/p&gt;
&lt;p&gt;✅ Shader Programming&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;live-project&quot;&gt;Live Project&lt;/h2&gt;
&lt;h3 id=&quot;live-demo&quot;&gt;Live Demo&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://holographic-threejs.vercel.app/&quot;&gt;https://holographic-threejs.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;github-repository&quot;&gt;GitHub Repository&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/YasirAwan4831/holographic-shader-visualizer-three.Js&quot;&gt;https://github.com/YasirAwan4831/holographic-shader-visualizer-three.Js&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;github-profile&quot;&gt;GitHub Profile&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/YasirAwan4831&quot;&gt;https://github.com/YasirAwan4831&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;-technologies-used&quot;&gt;⚛️ Technologies Used&lt;/h2&gt;
&lt;p&gt;One of the most exciting parts of this project was combining multiple modern frontend technologies together.&lt;/p&gt;
&lt;h3 id=&quot;react-js&quot;&gt;React.js&lt;/h3&gt;
&lt;p&gt;React was used to structure the application into reusable and scalable components.&lt;/p&gt;
&lt;p&gt;It helped manage:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Component architecture&lt;/li&gt;
&lt;li&gt;UI organization&lt;/li&gt;
&lt;li&gt;Application structure&lt;/li&gt;
&lt;li&gt;Rendering lifecycle&lt;/li&gt;
&lt;li&gt;Future scalability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;React makes it much easier to build modern interactive web applications while keeping the codebase clean and maintainable.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;three-js&quot;&gt;Three.js&lt;/h3&gt;
&lt;p&gt;Three.js was responsible for handling:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3D scene creation&lt;/li&gt;
&lt;li&gt;Geometry rendering&lt;/li&gt;
&lt;li&gt;Camera systems&lt;/li&gt;
&lt;li&gt;Lighting setup&lt;/li&gt;
&lt;li&gt;Mesh transformations&lt;/li&gt;
&lt;li&gt;WebGL abstraction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of manually writing low-level WebGL code, Three.js provides a powerful abstraction layer that allows developers to create advanced 3D experiences much faster.&lt;/p&gt;
&lt;p&gt;The project includes multiple 3D geometries such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Torus Knot&lt;/li&gt;
&lt;li&gt;Icosahedron&lt;/li&gt;
&lt;li&gt;Torus Geometry&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These objects transition dynamically with holographic effects.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;glsl-shader-programming&quot;&gt;GLSL Shader Programming&lt;/h3&gt;
&lt;p&gt;One of the most advanced parts of this project is the custom GLSL shader system.&lt;/p&gt;
&lt;p&gt;The shaders were handwritten to create:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Holographic scanlines&lt;/li&gt;
&lt;li&gt;Dynamic glitch displacement&lt;/li&gt;
&lt;li&gt;Fresnel rim glow&lt;/li&gt;
&lt;li&gt;Transparency falloff&lt;/li&gt;
&lt;li&gt;Transition masking&lt;/li&gt;
&lt;li&gt;Animated distortion systems&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;vertex-shader-features&quot;&gt;Vertex Shader Features&lt;/h4&gt;
&lt;p&gt;The vertex shader manipulates geometry positions in real-time.&lt;/p&gt;
&lt;p&gt;It creates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Glitch wave displacement&lt;/li&gt;
&lt;li&gt;Randomized distortion&lt;/li&gt;
&lt;li&gt;Progress-based transition effects&lt;/li&gt;
&lt;li&gt;Animated geometry movement&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;fragment-shader-features&quot;&gt;Fragment Shader Features&lt;/h4&gt;
&lt;p&gt;The fragment shader controls:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pixel colouring&lt;/li&gt;
&lt;li&gt;Hologram transparency&lt;/li&gt;
&lt;li&gt;Glow intensity&lt;/li&gt;
&lt;li&gt;Fresnel lighting&lt;/li&gt;
&lt;li&gt;Scanline rendering&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This combination creates the cinematic holographic appearance visible in the final system.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;gsap-animations&quot;&gt;GSAP Animations&lt;/h3&gt;
&lt;p&gt;GSAP was used to create smooth and performant animations.&lt;/p&gt;
&lt;p&gt;It powers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Geometry transitions&lt;/li&gt;
&lt;li&gt;Shader progress animations&lt;/li&gt;
&lt;li&gt;Smooth effect timing&lt;/li&gt;
&lt;li&gt;UI interaction flow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;GSAP provides better control and smoother animations compared to many traditional animation libraries.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;webgl-rendering&quot;&gt;WebGL Rendering&lt;/h3&gt;
&lt;p&gt;WebGL is the foundation behind the entire rendering pipeline.&lt;/p&gt;
&lt;p&gt;It enables GPU acceleration directly inside the browser.&lt;/p&gt;
&lt;p&gt;This allows the project to render:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Real-time graphics&lt;/li&gt;
&lt;li&gt;Interactive 3D systems&lt;/li&gt;
&lt;li&gt;Shader effects&lt;/li&gt;
&lt;li&gt;Dynamic animations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;without needing external software.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;major-features-of-holo-sys&quot;&gt;Major Features of HOLO.SYS&lt;/h2&gt;
&lt;h3 id=&quot;real-time-holographic-rendering&quot;&gt;Real-Time Holographic Rendering&lt;/h3&gt;
&lt;p&gt;The project creates a futuristic holographic appearance using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Transparency blending&lt;/li&gt;
&lt;li&gt;Additive rendering&lt;/li&gt;
&lt;li&gt;Glow effects&lt;/li&gt;
&lt;li&gt;Scanline overlays&lt;/li&gt;
&lt;li&gt;Animated distortion&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The final output feels similar to sci-fi hologram systems seen in futuristic films and games.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;dynamic-glitch-effects&quot;&gt;Dynamic Glitch Effects&lt;/h3&gt;
&lt;p&gt;A custom glitch engine was developed using mathematical shader calculations.&lt;/p&gt;
&lt;p&gt;The glitch system includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Time-based sine waves&lt;/li&gt;
&lt;li&gt;Randomized displacement&lt;/li&gt;
&lt;li&gt;Transition distortion&lt;/li&gt;
&lt;li&gt;Multi-layered visual noise&lt;/li&gt;
&lt;li&gt;Animated geometry corruption&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These effects make the hologram feel alive and dynamic.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;fresnel-rim-glow&quot;&gt;Fresnel Rim Glow&lt;/h3&gt;
&lt;p&gt;A Fresnel lighting system was implemented to create edge glow effects based on viewing angle.&lt;/p&gt;
&lt;p&gt;This adds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Depth perception&lt;/li&gt;
&lt;li&gt;Futuristic glow&lt;/li&gt;
&lt;li&gt;Cinematic visuals&lt;/li&gt;
&lt;li&gt;Enhanced realism&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is one of the most visually impactful effects in the project.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;animated-object-transitions&quot;&gt;Animated Object Transitions&lt;/h3&gt;
&lt;p&gt;The application cycles through multiple 3D geometries using shader-based transition masking.&lt;/p&gt;
&lt;p&gt;Instead of instantly switching objects, the project creates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Smooth vertical sweep transitions&lt;/li&gt;
&lt;li&gt;Controlled visibility masking&lt;/li&gt;
&lt;li&gt;Cinematic object replacement&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This creates a much more polished and professional visual experience.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;interactive-gui-controls&quot;&gt;Interactive GUI Controls&lt;/h3&gt;
&lt;p&gt;A real-time GUI panel was implemented using lil-gui.&lt;/p&gt;
&lt;p&gt;Users can dynamically change:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hologram colors&lt;/li&gt;
&lt;li&gt;Stage colors&lt;/li&gt;
&lt;li&gt;Ambient lighting&lt;/li&gt;
&lt;li&gt;Directional lighting&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This makes the system interactive and customizable.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;performance-optimization&quot;&gt;Performance Optimization&lt;/h3&gt;
&lt;p&gt;Performance was a major focus during development.&lt;/p&gt;
&lt;p&gt;Optimization techniques include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;request Animation Frame loops&lt;/li&gt;
&lt;li&gt;Controlled DPR scaling&lt;/li&gt;
&lt;li&gt;Efficient shader calculations&lt;/li&gt;
&lt;li&gt;Proper clean-up systems&lt;/li&gt;
&lt;li&gt;Memory leak prevention&lt;/li&gt;
&lt;li&gt;Optimized rendering pipeline&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These improvements help maintain smooth rendering performance.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-i-learned-from-this-project&quot;&gt;What I Learned From This Project&lt;/h2&gt;
&lt;p&gt;This project significantly improved my understanding of:&lt;/p&gt;
&lt;h3 id=&quot;advanced-web-development&quot;&gt;Advanced Web Development&lt;/h3&gt;
&lt;p&gt;I learned how modern Web engineering goes far beyond simple layouts.&lt;/p&gt;
&lt;p&gt;Web development today includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Real-time rendering&lt;/li&gt;
&lt;li&gt;GPU acceleration&lt;/li&gt;
&lt;li&gt;Interactive systems&lt;/li&gt;
&lt;li&gt;Creative coding&lt;/li&gt;
&lt;li&gt;Visual programming&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;shader-programming-concepts&quot;&gt;Shader Programming Concepts&lt;/h3&gt;
&lt;p&gt;Before this project, shader programming felt complex.&lt;/p&gt;
&lt;p&gt;During development, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GLSL basics&lt;/li&gt;
&lt;li&gt;Vertex shader manipulation&lt;/li&gt;
&lt;li&gt;Fragment shader rendering&lt;/li&gt;
&lt;li&gt;Coordinate systems&lt;/li&gt;
&lt;li&gt;Lighting calculations&lt;/li&gt;
&lt;li&gt;Procedural visual effects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This project became a huge learning experience.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;three-js-architecture&quot;&gt;Three.js Architecture&lt;/h3&gt;
&lt;p&gt;I gained practical experience with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Scene management&lt;/li&gt;
&lt;li&gt;Camera systems&lt;/li&gt;
&lt;li&gt;Mesh rendering&lt;/li&gt;
&lt;li&gt;Materials&lt;/li&gt;
&lt;li&gt;Geometries&lt;/li&gt;
&lt;li&gt;WebGL pipelines&lt;/li&gt;
&lt;li&gt;Orbit Controls&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This helped me better understand 3D development for the web.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;modern-full-stack-development-journey&quot;&gt;Modern Full Stack Development Journey&lt;/h3&gt;
&lt;p&gt;As a Full Stack Developer, I believe modern web engineering should combine:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Functionality&lt;/li&gt;
&lt;li&gt;Performance&lt;/li&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;li&gt;Creativity&lt;/li&gt;
&lt;li&gt;User experience&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;HOLO.SYS represents that mindset.&lt;/p&gt;
&lt;p&gt;It is not only a frontend showcase — it demonstrates creative engineering and technical exploration.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;why-creative-frontend-development-matters&quot;&gt;Why Creative Frontend Development Matters&lt;/h2&gt;
&lt;p&gt;The future of web development is moving toward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Immersive experiences&lt;/li&gt;
&lt;li&gt;3D interfaces&lt;/li&gt;
&lt;li&gt;Interactive visual systems&lt;/li&gt;
&lt;li&gt;AI-powered UIs&lt;/li&gt;
&lt;li&gt;Real-time graphics&lt;/li&gt;
&lt;li&gt;WebXR and AR/VR&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Projects like HOLO.SYS help developers explore the next generation of web experiences.&lt;/p&gt;
&lt;p&gt;Creative frontend engineering is becoming one of the most exciting areas in software development.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;future-improvements&quot;&gt;Future Improvements&lt;/h2&gt;
&lt;p&gt;This project is still evolving.&lt;/p&gt;
&lt;p&gt;Future upgrades may include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bloom post-processing&lt;/li&gt;
&lt;li&gt;Audio reactive effects&lt;/li&gt;
&lt;li&gt;GLTF/GLB model loading&lt;/li&gt;
&lt;li&gt;Mobile touch optimization&lt;/li&gt;
&lt;li&gt;WebXR support&lt;/li&gt;
&lt;li&gt;AI visualization systems&lt;/li&gt;
&lt;li&gt;Advanced particle systems&lt;/li&gt;
&lt;li&gt;Dynamic environment lighting&lt;/li&gt;
&lt;li&gt;Procedural geometry systems&lt;/li&gt;
&lt;li&gt;Cyberpunk dashboard integrations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is to continue transforming HOLO.SYS into a more advanced interactive visualization framework.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;about-the-developer&quot;&gt;About the Developer&lt;/h2&gt;
&lt;p&gt;Hi, I’m Muhammad Yasir — also known online as YasirAwan4831.&lt;/p&gt;
&lt;p&gt;I’m a Full Stack Web Developer focused on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modern Web Development&lt;/li&gt;
&lt;li&gt;Creative Frontend Engineering&lt;/li&gt;
&lt;li&gt;React.js Applications&lt;/li&gt;
&lt;li&gt;JavaScript Ecosystems&lt;/li&gt;
&lt;li&gt;Three.js &amp;amp; WebGL&lt;/li&gt;
&lt;li&gt;UI/UX Development&lt;/li&gt;
&lt;li&gt;Interactive Web Experiences&lt;/li&gt;
&lt;li&gt;Performance Optimization&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I continuously work on improving my skills by building real-world projects and experimenting with modern technologies.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;final-thoughts&quot;&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;Building HOLO.SYS was an exciting journey into the world of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creative coding&lt;/li&gt;
&lt;li&gt;Real-time graphics&lt;/li&gt;
&lt;li&gt;WebGL rendering&lt;/li&gt;
&lt;li&gt;Shader programming&lt;/li&gt;
&lt;li&gt;Advanced frontend development&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Projects like this remind me how powerful the modern web has become.&lt;/p&gt;
&lt;p&gt;Today, browsers are capable of rendering cinematic experiences that once required dedicated graphics software.&lt;/p&gt;
&lt;p&gt;More futuristic projects, advanced UI systems and immersive web experiences are coming soon.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;connect-with-me&quot;&gt;Connect With Me&lt;/h2&gt;
&lt;h3 id=&quot;github&quot;&gt;GitHub&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/YasirAwan4831&quot;&gt;https://github.com/YasirAwan4831&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;project-repository&quot;&gt;Project Repository&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/YasirAwan4831/holographic-shader-visualizer-three.Js&quot;&gt;https://github.com/YasirAwan4831/holographic-shader-visualizer-three.Js&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;live-demo-1&quot;&gt;Live Demo&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://holographic-threejs.vercel.app/&quot;&gt;https://holographic-threejs.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;#ReactJS #ThreeJS #WebGL #GLSL #ShaderProgramming #FrontendDevelopment #CreativeCoding #CyberpunkUI #WebDevelopment #JavaScript #GSAP #ModernWebDevelopment #InteractiveWebDesign #FullStackDeveloper #CreativeFrontend #RealtimeRendering #HolographicUI #OpenSource #UIUX #Programming #WebDesign #ThreejsProjects #ReactDeveloper #WebGLProjects #YasirAwan4831 #MuhammadYasir&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/17092/building-holo-sys-futuristic-3d-holographic-visualization-system-with-react-three-glsl</guid>
<pubDate>Fri, 08 May 2026 18:36:53 +0000</pubDate>
</item>
<item>
<title>Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization</title>
<link>https://coderlegion.com/15031/quantum-neural-network-3d-a-deep-dive-into-interactive-webgl-visualization</link>
<description>&lt;h3 id=&quot;introduction-1&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In the modern era of web development, static interfaces are no longer enough. Users expect immersive, interactive, and visually engaging experiences. With this vision in mind, I developed &lt;strong&gt;Quantum Neural Network 3D&lt;/strong&gt; — an advanced real-time 3D neural network visualization built using &lt;strong&gt;Three.js and WebGL&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This project is not just about visuals; it represents a combination of &lt;strong&gt;mathematics, graphics programming and user interaction design&lt;/strong&gt;, creating a simulation that feels alive and responsive.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;project-overview&quot;&gt;Project Overview&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Quantum Neural Network 3D&lt;/strong&gt; is an interactive system that visually represents neural structures in a three-dimensional space. It allows users to explore different network formations, trigger energy pulses and interact with a dynamically animated environment.&lt;/p&gt;
&lt;p&gt;The goal of this project was to push beyond basic frontend development and explore &lt;strong&gt;advanced rendering techniques, shader programming and real-time interactivity&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;key-features&quot;&gt;Key Features&lt;/h3&gt;
&lt;h4 id=&quot;1-interactive-3d-neural-network&quot;&gt;1. Interactive 3D Neural Network&lt;/h4&gt;
&lt;p&gt;The core of the project is a fully dynamic neural network composed of nodes and connections. Each node behaves like an energy point and connections simulate data flow between them.&lt;/p&gt;
&lt;h4 id=&quot;2-multiple-network-formations&quot;&gt;2. Multiple Network Formations&lt;/h4&gt;
&lt;p&gt;The system supports different structural patterns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Crystalline Sphere&lt;/strong&gt; — based on mathematical distribution (golden ratio)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Helix Lattice&lt;/strong&gt; — inspired by DNA-like structures&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fractal Web&lt;/strong&gt; — recursive branching similar to AI networks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each formation provides a unique visual and structural experience.&lt;/p&gt;
&lt;h4 id=&quot;3-real-time-animations&quot;&gt;3. Real-Time Animations&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Breathing node effects&lt;/li&gt;
&lt;li&gt;Flowing connection lines&lt;/li&gt;
&lt;li&gt;Smooth transitions between formations&lt;/li&gt;
&lt;li&gt;Continuous rotation and motion&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These animations create a lifelike and futuristic feel.&lt;/p&gt;
&lt;h4 id=&quot;4-energy-pulse-interaction&quot;&gt;4. Energy Pulse Interaction&lt;/h4&gt;
&lt;p&gt;Users can click anywhere on the screen to generate &lt;strong&gt;energy pulses&lt;/strong&gt;, which travel across the network in real-time. This feature adds a layer of interaction and makes the system feel responsive and intelligent.&lt;/p&gt;
&lt;h4 id=&quot;5-advanced-visual-effects&quot;&gt;5. Advanced Visual Effects&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Bloom (glow) effects&lt;/li&gt;
&lt;li&gt;Particle-based starfield background&lt;/li&gt;
&lt;li&gt;Smooth camera controls&lt;/li&gt;
&lt;li&gt;Glass morphism UI design&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These elements combine to deliver a premium visual experience.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;user-interaction&quot;&gt;User Interaction&lt;/h3&gt;
&lt;p&gt;The project is designed to be fully interactive:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; → Send energy pulses&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drag&lt;/strong&gt; → Rotate and explore the network&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Morph Button&lt;/strong&gt; → Change network structure&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Freeze Button&lt;/strong&gt; → Pause animations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reset Button&lt;/strong&gt; → Reset camera view&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This makes the experience both exploratory and engaging.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;technology-stack&quot;&gt;Technology Stack&lt;/h3&gt;
&lt;p&gt;This project leverages modern web technologies:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Three.js&lt;/strong&gt; — 3D rendering engine&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WebGL&lt;/strong&gt; — hardware-accelerated graphics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GLSL Shaders&lt;/strong&gt; — custom animations and effects&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JavaScript (ES6)&lt;/strong&gt; — application logic&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTML5 &amp;amp; CSS3&lt;/strong&gt; — UI and layout&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No heavy frameworks were used, ensuring performance and control over rendering.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-it-works&quot;&gt;How It Works&lt;/h3&gt;
&lt;h4 id=&quot;1-scene-initialization&quot;&gt;1. Scene Initialization&lt;/h4&gt;
&lt;p&gt;The application starts by creating a 3D scene, camera, and renderer. Post-processing effects like bloom are applied to enhance visuals.&lt;/p&gt;
&lt;h4 id=&quot;2-network-generation&quot;&gt;2. Network Generation&lt;/h4&gt;
&lt;p&gt;Nodes and connections are generated using mathematical algorithms depending on the selected formation.&lt;/p&gt;
&lt;h4 id=&quot;3-shader-based-rendering&quot;&gt;3. Shader-Based Rendering&lt;/h4&gt;
&lt;p&gt;Custom shaders control:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node size and glow&lt;/li&gt;
&lt;li&gt;Connection animation&lt;/li&gt;
&lt;li&gt;Pulse wave propagation&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-interaction-system&quot;&gt;4. Interaction System&lt;/h4&gt;
&lt;p&gt;Using raycasting, the system detects user clicks and generates pulse waves that propagate through the network.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;design-philosophy&quot;&gt;Design Philosophy&lt;/h3&gt;
&lt;p&gt;The design focuses on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Minimalism + Futurism&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Smooth animations&lt;/li&gt;
&lt;li&gt;Glass morphism UI&lt;/li&gt;
&lt;li&gt;Neon-inspired colour palettes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Three main themes are included:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Purple Nebula&lt;/li&gt;
&lt;li&gt;Sunset Fire&lt;/li&gt;
&lt;li&gt;Ocean Aurora&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each theme changes the entire visual mood of the application.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;performance-optimization-1&quot;&gt;Performance Optimization&lt;/h3&gt;
&lt;p&gt;To ensure smooth performance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GPU-based rendering is used&lt;/li&gt;
&lt;li&gt;Buffer Geometry minimizes memory usage&lt;/li&gt;
&lt;li&gt;Animations are optimized with request Animation Frame&lt;/li&gt;
&lt;li&gt;Pixel ratio is controlled for mobile devices&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The result is a fast and responsive experience across devices.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;live-project-amp-source-code&quot;&gt;Live Project &amp;amp; Source Code&lt;/h3&gt;
&lt;p&gt; &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://yasirquantumneuralnetwork3d.vercel.app/&quot;&gt;https://yasirquantumneuralnetwork3d.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;GitHub Repository:&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;https-yasirquantumneuralnetwork3d-vercel-app-&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://yasirquantumneuralnetwork3d.vercel.app/&quot;&gt;https://yasirquantumneuralnetwork3d.vercel.app/&lt;/a&gt;&lt;/h3&gt;
&lt;h3 id=&quot;what-i-learned&quot;&gt;What I Learned&lt;/h3&gt;
&lt;p&gt;This project helped me gain deeper understanding of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3D graphics programming&lt;/li&gt;
&lt;li&gt;Shader development (GLSL)&lt;/li&gt;
&lt;li&gt;WebGL rendering pipeline&lt;/li&gt;
&lt;li&gt;Performance optimization&lt;/li&gt;
&lt;li&gt;Interactive UI/UX design&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It pushed me beyond traditional frontend development into &lt;strong&gt;advanced visualization engineering&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;future-improvements-1&quot;&gt;Future Improvements&lt;/h3&gt;
&lt;p&gt;Planned upgrades include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Audio-reactive visualization&lt;/li&gt;
&lt;li&gt;AI data integration&lt;/li&gt;
&lt;li&gt;Export as image/video&lt;/li&gt;
&lt;li&gt;VR/AR support&lt;/li&gt;
&lt;li&gt;Advanced physics simulation&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Quantum Neural Network 3D&lt;/strong&gt; is more than just a project — it’s a step toward building immersive web experiences that combine creativity with technology.&lt;/p&gt;
&lt;p&gt;It reflects my journey as a developer exploring new domains like &lt;strong&gt;3D web development, real-time rendering, and interactive systems&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;feedback-amp-support&quot;&gt;Feedback &amp;amp; Support&lt;/h3&gt;
&lt;p&gt;If you found this project interesting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;⭐ Star the repository&lt;/li&gt;
&lt;li&gt;Share your thoughts&lt;/li&gt;
&lt;li&gt;Suggest improvements&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Created by Muhammad Yasir &lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Full Stack Developer | Exploring AI &amp;amp; 3D Web&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;✨ &lt;em&gt;Building the future, one project at a time.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;#WebDevelopment #ThreeJS #WebGL #JavaScript #Frontend #3D #UI #FullStack #FullStackDeveloper #OpenSource #Portfolio #MuhammadYasir #YasirAwan4831&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15031/quantum-neural-network-3d-a-deep-dive-into-interactive-webgl-visualization</guid>
<pubDate>Fri, 17 Apr 2026 05:53:48 +0000</pubDate>
</item>
<item>
<title>Exploring the power of 3D experiences on the web</title>
<link>https://coderlegion.com/12896/exploring-the-power-of-3d-experiences-on-the-web</link>
<description>&lt;p&gt;This is an experimental 3D sports landing page built with modern frontend technologies. The goal was to create a more immersive and interactive experience compared to traditional flat landing pages.&lt;br&gt;
Inspired by a great tutorial from JS Mastery, I built this 3D Basketball Landing Page as a creative frontend experiment.&lt;/p&gt;
&lt;p&gt;Tech stack&lt;br&gt;
• Three.js – for rendering interactive 3D scenes&lt;br&gt;
• GSAP – for smooth, high-performance animations&lt;br&gt;
• Next.js – for modern React architecture and performance&lt;/p&gt;
&lt;p&gt;Three.js allows developers to render interactive 3D graphics directly in the browser using WebGL, enabling immersive web experiences and real-time animations.&lt;/p&gt;
&lt;p&gt;The page combines 3D elements, animated transitions, and camera movement to make the interface feel more alive and interactive.&lt;/p&gt;
&lt;p&gt;The idea was to move beyond static layouts and create a landing page where motion, depth, and interactivity become part of the user experience.&lt;/p&gt;
&lt;p&gt;I also used AI tools during development to speed up experimentation and explore different creative approaches.&lt;/p&gt;
&lt;p&gt;Live project:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://3d-basketball-template.vercel.app/&quot;&gt;https://3d-basketball-template.vercel.app/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/12896/exploring-the-power-of-3d-experiences-on-the-web</guid>
<pubDate>Sun, 15 Mar 2026 12:29:25 +0000</pubDate>
</item>
<item>
<title>Exploring the power of 3D experiences on the modern web</title>
<link>https://coderlegion.com/12895/exploring-the-power-of-3d-experiences-on-the-modern-web</link>
<description>&lt;p&gt;This is an experimental 3D sports landing page built with modern frontend technologies. The goal was to create a more immersive and interactive experience compared to traditional flat landing pages.&lt;br&gt;
Inspired by a great tutorial from JS Mastery, I built this 3D Basketball Landing Page as a creative frontend experiment.&lt;/p&gt;
&lt;p&gt;Tech stack&lt;br&gt;
• Three.js – for rendering interactive 3D scenes&lt;br&gt;
• GSAP – for smooth, high-performance animations&lt;br&gt;
• Next.js – for modern React architecture and performance&lt;/p&gt;
&lt;p&gt;Three.js allows developers to render interactive 3D graphics directly in the browser using WebGL, enabling immersive web experiences and real-time animations.&lt;/p&gt;
&lt;p&gt;The page combines 3D elements, animated transitions, and camera movement to make the interface feel more alive and interactive.&lt;/p&gt;
&lt;p&gt;The idea was to move beyond static layouts and create a landing page where motion, depth, and interactivity become part of the user experience.&lt;/p&gt;
&lt;p&gt;I also used AI tools during development to speed up experimentation and explore different creative approaches.&lt;/p&gt;
&lt;p&gt;Live project:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://3d-basketball-template.vercel.app/&quot;&gt;https://3d-basketball-template.vercel.app/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/12895/exploring-the-power-of-3d-experiences-on-the-modern-web</guid>
<pubDate>Sun, 15 Mar 2026 12:28:47 +0000</pubDate>
</item>
<item>
<title>Virtual 3D Museum - Three.js</title>
<link>https://coderlegion.com/9844/virtual-3d-museum-three-js</link>
<description>&lt;p&gt;So, I was shitcanned recently and said to myself: &quot;Hey, why not actually learn something new and interesting for once?&quot;&lt;/p&gt;
&lt;p&gt;Three.js has been high on my list for a long time. I tried to make a pinball game a couple of years back, failed miserably, and never quite forgot about it. This time, I wanted to see if I could turn Wikipedia entries into something more visual and &quot;walkable&quot;&lt;/p&gt;
&lt;p&gt;The result is a Virtual 3D Museum. It’s a 3D environment where the &quot;exhibits&quot; are pulled dynamically from the Wikipedia API, and gallery rooms are populated with that info on the fly&lt;/p&gt;
&lt;p&gt;&lt;iframe height=&quot;600&quot; style=&quot;width: 100%;&quot; scrolling=&quot;no&quot; title=&quot;Virtual 3D Museum&quot; src=&quot;https://codepen.io/notbigmuzzy/embed/dPXOmoq?default-tab=&quot; frameborder=&quot;no&quot;&gt;Virtual 3D Museum by NBM (&lt;a rel=&quot;nofollow&quot; href=&quot;https://codepen.io/notbigmuzzy&quot;&gt;@notbigmuzzy&lt;/a&gt;) on &lt;a rel=&quot;nofollow&quot; href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Tech:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Three.js: Handles the spatial layout and rendering.&lt;/li&gt;
&lt;li&gt;Vanilla JS: No frameworks. I wanted to keep it lightweight and see how far I could get with just the basics (spoiler: it can go really far).&lt;/li&gt;
&lt;li&gt;Wikipedia API: The source of all the data.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The Details:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multi-language support: You can toggle between different language versions of Wikipedia.&lt;/li&gt;
&lt;li&gt;Persistence: It uses basic local storage, so it remembers your session when you come back.&lt;/li&gt;
&lt;li&gt;Environment: I went for a &quot;faux 3D&quot; look—enough to feel immersive without being heavy on the hardware. I know it doesn't look &quot;well&quot; yet; I don't know how to use Blender properly, and I'm still learning exactly how far you can push a browser before the stuttering ruins the experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;It’s been a fun experiment in data visualization and spatial UI. If you’re into Three.js or just want to see a weird way to read about history or universe, check it out ;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Source Code: GitHub - &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/notbigmuzzy/linkwalk&quot;&gt;https://github.com/notbigmuzzy/linkwalk&lt;/a&gt;&lt;br&gt;
Live Demo: Full version with languages and persistence - &lt;a rel=&quot;nofollow&quot; href=&quot;https://notbigmuzzy.github.io/linkwalk/&quot;&gt;https://notbigmuzzy.github.io/linkwalk/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9844/virtual-3d-museum-three-js</guid>
<pubDate>Fri, 16 Jan 2026 15:50:33 +0000</pubDate>
</item>
</channel>
</rss>