<?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: Justin Mayhew</title>
    <description>The latest articles on DEV Community by Justin Mayhew (@justin_mayhew_eb3e90b50bc).</description>
    <link>https://dev.to/justin_mayhew_eb3e90b50bc</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%2F3584936%2Fc319d577-73e5-47a0-afda-1cbb773445de.jpg</url>
      <title>DEV Community: Justin Mayhew</title>
      <link>https://dev.to/justin_mayhew_eb3e90b50bc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/justin_mayhew_eb3e90b50bc"/>
    <language>en</language>
    <item>
      <title>My favourite Web API - Webgl</title>
      <dc:creator>Justin Mayhew</dc:creator>
      <pubDate>Mon, 27 Oct 2025 22:34:24 +0000</pubDate>
      <link>https://dev.to/justin_mayhew_eb3e90b50bc/my-favourite-web-api-webgl-519c</link>
      <guid>https://dev.to/justin_mayhew_eb3e90b50bc/my-favourite-web-api-webgl-519c</guid>
      <description>&lt;p&gt;If you’re anything like I was a year ago, you might never have heard of WebGL. It’s definitely not something you need in your day-to-day life as a frontend developer. But if you’re interested in doing some really cool things on the web — the kind that make you go &lt;em&gt;“oh wow”&lt;/em&gt; (seriously, Google &lt;em&gt;WebGL websites&lt;/em&gt; if you want to see what I mean) — and you’re willing to face a pretty steep learning curve, then you can create effects that CSS alone simply can’t achieve.&lt;/p&gt;

&lt;p&gt;So, let’s start from the top. &lt;strong&gt;WebGL is an API that lets you write low-level code that runs directly on the GPU.&lt;/strong&gt; It allows you to create both 2D and 3D graphics using the full power of your graphics card. This means things that would be impossible with CSS — like rendering millions of particles smoothly — become entirely possible.&lt;/p&gt;

&lt;p&gt;That idea of &lt;em&gt;rendering millions of particles smoothly&lt;/em&gt; is what first pulled me into WebGL. I was working on a website and wanted to add a flashy effect — a title made up of thousands of tiny dots that moved away from your mouse cursor. It looked awesome, but it lagged. And I don’t do lag. If it drops frames on a budget phone, I don’t want it. That performance obsession is what led me to WebGL.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; element in HTML can have two kinds of “contexts”: &lt;strong&gt;2D&lt;/strong&gt; and &lt;strong&gt;WebGL&lt;/strong&gt;. The 2D context is much more intuitive — you can draw a line between two points, fill a rectangle, and you’re done. It’s simple, and powerful enough for many projects. Think of it as the JavaScript of graphics APIs: high-level and friendly, but abstracting away all the tricky low-level details at the cost of raw performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebGL, on the other hand, is like talking directly to the hardware.&lt;/strong&gt; It gives you the control (and responsibility) to manage how things are drawn, and in return, it rewards you with incredible performance.&lt;/p&gt;

&lt;p&gt;What I love most about WebGL is that it lets you access that low-level power &lt;em&gt;from the comfort of JavaScript&lt;/em&gt;. As a web developer, graphics programming always felt like something outside my world — something reserved for C++ or game engines. But with WebGL, I could explore it without leaving the environment I’m comfortable in.&lt;/p&gt;

&lt;p&gt;If you’re a web developer who’s curious about making games, interactive visuals, or just taking your websites to the next level, &lt;strong&gt;WebGL is absolutely worth exploring.&lt;/strong&gt; It’s not easy, but the moment you see something you built moving at 60 FPS — powered by your own shaders — it’s all worth it.&lt;/p&gt;

&lt;p&gt;As I touched on it's not easy to learn from my experience - debugging Webgl can be very hard. I am thinking to write some basic tutorials in the hope they will help someone.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>webgl</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
