<?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: Michael Baný</title>
    <description>The latest articles on DEV Community by Michael Baný (@michaelbany).</description>
    <link>https://dev.to/michaelbany</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3753206%2F603e6144-2f95-4e2c-995a-d162cfbfc6da.jpeg</url>
      <title>DEV Community: Michael Baný</title>
      <link>https://dev.to/michaelbany</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michaelbany"/>
    <language>en</language>
    <item>
      <title>Sandbox: A Tiny WebGL Library That Just Runs Your Shaders</title>
      <dc:creator>Michael Baný</dc:creator>
      <pubDate>Wed, 04 Feb 2026 14:56:27 +0000</pubDate>
      <link>https://dev.to/michaelbany/sandbox-a-tiny-webgl-library-that-just-runs-your-shaders-5eab</link>
      <guid>https://dev.to/michaelbany/sandbox-a-tiny-webgl-library-that-just-runs-your-shaders-5eab</guid>
      <description>&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/rosalana" rel="noopener noreferrer"&gt;
        rosalana
      &lt;/a&gt; / &lt;a href="https://github.com/rosalana/sandbox" rel="noopener noreferrer"&gt;
        sandbox
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Lightweight WebGL wrapper for simple, beautiful shader effects
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a href="https://github.com/rosalana" 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%2Fraw.githubusercontent.com%2Frosalana%2F.github%2Fmain%2FSandbox_Banner.png" alt="Rosalana"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@rosalana/sandbox" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e5a3df1848bdf7ac5611448d025abf117fb09c980587f6a02b344a111bce64c4/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f40726f73616c616e612f73616e64626f783f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d323843463844" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/@rosalana/sandbox" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6c6e5ceb880c57313dc4de867455bd0ce8149fa70fa3ba24bebfbb78e1b4bb18/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f40726f73616c616e612f73616e64626f783f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d323843463844" alt="npm downloads"&gt;&lt;/a&gt;
&lt;a href="https://github.com/rosalana/sandbox/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/248e8684c980a60383d3e24040baff614cfa9daf12bcb7ea9273f091a936a716/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f726f73616c616e612f73616e64626f783f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d323843463844" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/rosalana/sandbox/blob/master/LICENCE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/12276951bc363f2b4ce6b1dabf1607f312399dd8055c85110fe819a7e4d39c75/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f40726f73616c616e612f73616e64626f783f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d323843463844" alt="License"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://codesandbox.io/p/sandbox/nervous-greider-76wsrk" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e3c3d3bced2356225809c47bbfc14f6051ae9ae39e7a24df90c7bf1db31d3182/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e253230696e2d436f646553616e64626f782d3238434638443f7374796c653d666f722d7468652d6261646765266c6f676f3d636f646573616e64626f78266c6f676f436f6c6f723d776869746526636f6c6f72413d313831383142" alt="Open in CodeSandbox"&gt;&lt;/a&gt;
&lt;a href="https://github.com/rosalana/sandbox/issues" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f6be777c1d749793a1c9203917b2911d01ebe41b4bd6f13743b2ec94d2d7462c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5265706f72742d49737375652d4646364236423f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d776869746526636f6c6f72413d313831383142" alt="Report Issue"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Rosalana Sandbox&lt;/strong&gt; is a lightweight WebGL wrapper for &lt;strong&gt;simple, beautiful shader effects&lt;/strong&gt;. It focuses on a clean API, type safety, and fast setup so you can go from idea to a shader in minutes.&lt;/p&gt;
&lt;p&gt;It's &lt;strong&gt;DX‑friendly&lt;/strong&gt;, small, and intentionally minimal — perfect for gradients, ambient backgrounds, and animated GLSL experiments. If you're not building a full 3D engine, Sandbox is a delightful alternative to larger libraries like three.js or p5.js.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Bundle size comparison&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Library&lt;/th&gt;
&lt;th&gt;Minified&lt;/th&gt;
&lt;th&gt;Gzipped&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sandbox&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;85 KB&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;23 KB&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;three.js&lt;/td&gt;
&lt;td&gt;694 KB&lt;/td&gt;
&lt;td&gt;175 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;p5.js&lt;/td&gt;
&lt;td&gt;1.1 MB&lt;/td&gt;
&lt;td&gt;351 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Sandbox is &lt;strong&gt;~8x smaller&lt;/strong&gt; than three.js and &lt;strong&gt;~15x smaller&lt;/strong&gt; than p5.js.&lt;/p&gt;
&lt;p&gt;It works in both &lt;strong&gt;WebGL1 and WebGL2&lt;/strong&gt; contexts, with automatic fallback and detection.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Table of Contents&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#installation" rel="noopener noreferrer"&gt;Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#quick-setup" rel="noopener noreferrer"&gt;Quick setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/rosalana/sandbox#playback-control" rel="noopener noreferrer"&gt;Playback control&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#time-control" rel="noopener noreferrer"&gt;Time control&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#static-rendering" rel="noopener noreferrer"&gt;Static rendering&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#sandbox-shaders" rel="noopener noreferrer"&gt;Sandbox Shaders&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/rosalana/sandbox#hooks" rel="noopener noreferrer"&gt;Hooks&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#self-removing-hooks" rel="noopener noreferrer"&gt;Self-removing hooks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/rosalana/sandbox#textures" rel="noopener noreferrer"&gt;Textures&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#texture-options" rel="noopener noreferrer"&gt;Texture options&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#dynamic-textures" rel="noopener noreferrer"&gt;Dynamic textures&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/rosalana/sandbox#export" rel="noopener noreferrer"&gt;Export&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#streaming" rel="noopener noreferrer"&gt;Streaming&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#chaining" rel="noopener noreferrer"&gt;Chaining&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#error-handling" rel="noopener noreferrer"&gt;Error handling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#vue-integration" rel="noopener noreferrer"&gt;Vue integration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#cleanup" rel="noopener noreferrer"&gt;Cleanup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rosalana/sandbox#options" rel="noopener noreferrer"&gt;Options&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/rosalana/sandbox#limitations-by-design" rel="noopener noreferrer"&gt;Limitations (by&lt;/a&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/rosalana/sandbox" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;




&lt;p&gt;WebGL is a powerful tool that opens up a world of possibilities for what we can do on the web. But it's not easy to master. Even getting to the point where you can render anything takes dozens of lines of boilerplate code — even for something as simple as a static image or a basic effect.&lt;/p&gt;

&lt;p&gt;What if it didn't have to be this way? What if simple things could stay simple? We have three.js for complex 3D scenes, but why should we go through the same setup hell when all we want is a simple shader animation?&lt;/p&gt;

&lt;p&gt;That's why &lt;strong&gt;Sandbox&lt;/strong&gt; was created. A tiny WebGL library, &lt;strong&gt;22 times smaller than three.js&lt;/strong&gt;, with one job: skip the WebGL ceremony and just run your shader. And that's exactly what it does.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Sandbox&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@rosalana/sandbox&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Sandbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;fragment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`// your shader here`&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Everything is set up and rendering starts immediately.&lt;/p&gt;

&lt;p&gt;How? Sandbox handles all the WebGL setup for you, so you can focus on what matters: writing your shader.&lt;/p&gt;

&lt;p&gt;It supports both WebGL1 and WebGL2, automatically detecting which one to use based on your shader code. It even switches contexts at runtime if needed — you won't even notice it happened.&lt;/p&gt;

&lt;p&gt;The defaults are carefully chosen to work out of the box, so often the simple example above is all you need. But there's still flexibility when you want it: custom uniforms, FPS limiting, time manipulation, mouse interaction, and more. It automatically pauses when the canvas is out of view and syncs state with reactive JavaScript frameworks.&lt;/p&gt;

&lt;p&gt;Most things are handled automatically, including built-in uniforms that Sandbox injects into your shader for you. This lets you focus on the creative work in GLSL while the library takes care of the rest.&lt;/p&gt;

&lt;p&gt;Writing shaders can be challenging too. We're working on smart shader preprocessing to make that easier as well. Share your thoughts and feedback on GitHub and help us make Sandbox exactly what we've all been searching for.&lt;/p&gt;

&lt;p&gt;You'll find detailed documentation and interactive demos at &lt;a href="https://github.com/rosalana/sandbox" rel="noopener noreferrer"&gt;Github&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
