JavaScript Webgl_intro Guide
WebGL brings hardware-accelerated 3D graphics to the browser. It is used for games, visualization, and interactive 3D content. The guide walks through WebGL Basics. `canvas.getContext("webgl")` — get context. Clear: `gl.clearColor(0,0,0,1); gl.clear(gl.COLOR_BUFFER_BIT)`. Shaders: vertex shader (positions) + fragment shader (colors). Write in GLSL. Buffers: create vertex buffer, upload data, set vertex attributes. Draw: `gl.drawArrays(gl.TRIANGLES, 0, count)`. WebGL2 adds more features. Three.js simplifies 3D work. The guide is organized into 1 sections that build on each other, each pairing a prose explanation with runnable code. Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page. Practice what you learn in the JavaScript playground, and look up any unfamiliar term in the JavaScript glossary.