Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

OGL examples

by oframe

Minimal WebGL library with a large commented example set (particles, flowmaps, post effects, text, shaders) that works well for light hero backgrounds.

Web animation examples and effects Code libraryOpen sourceabstract3dminimal

GitHub repoWebsite
A landing-page hero whose background is drawn by OGL in two passes, soft pastel color waves and 260 seeded drifting dots, behind ordinary page text.
Made by AgentGid with ogl 1.0.11 (npm tarball, sha512 checked against the registry). OGL is public domain (Unlicense), so no credit is needed; the shaders, colors and text are our own, no example images or fonts were used.

2. Commercial use: raw.githubusercontent.com

“This is free and unencumbered software released into the public domain.”

Public domain; any purpose, commercial or not.

raw.githubusercontent.com

License checked Nov 5, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

OGL: a small 3D graphics library with examples

OGL is a free, very small code library for drawing moving graphics in the browser with WebGL, plus a long list of example pages with commented code. People use it for light animated backgrounds, particle effects and simple 3D scenes when a big 3D engine would be too heavy. It is public domain, so you can use it anywhere without credit, but you write the visual effects (shaders) yourself or adapt them from the examples.

Where you can use it

A moving background behind a headline

A moving background behind a headline

Fill the top of a landing page with soft moving color behind the headline. One shape covers the whole screen, so it stays light and needs no 3D camera.

Floating dots and particles

Scatter hundreds of soft dots that drift slowly, for a calm background on a hero, a sign-up page or a loading screen.

Effects that follow the mouse

Make a picture or the page background ripple and bend where the visitor moves the pointer, as an eye-catching first screen.

A 3D model people can turn

Show a product or object as a 3D model that visitors rotate with the mouse, loaded from a common 3D file format.

Learning how WebGL works

Read short, commented examples to understand how browser 3D drawing works, without a large engine hiding the details.

As reported by oframe: The whole library is about 29 kB minzipped (Core 8 kB, Math 6 kB, Extras 15 kB).

OGL examples popularity

49 / 100
Gid Score, same scale as developer tools
4,759
GitHub stars
1.1M
npm downloads, last 7 days
+45.4% in 4 weeks
15
AI-agent projects using it, from our repo scan of 4,817
OGL examples: downloads per weeknpm, ogl 1,083,034
OGL examples: GitHub starsoframe/ogl 4,759

Downloads from api.npmjs.org, stars from GitHub, checked Nov 17, 2026. How the Gid Score is calculated

How to start

Tell your AI assistant

“Add a full-screen animated background to the hero section with ogl 1.0.11 (Renderer, Triangle, Program, Mesh), keep the colors soft so the text stays readable, and stop the animation when the user prefers reduced motion.”

Or install it yourself.

npm i ogl
Show code

Import from 'ogl' when you use a bundler or an import map. The library has no other packages it depends on.

import { Renderer, Camera, Transform, Box, Program, Mesh } from 'ogl';

Mistakes to avoid

import ... from 'https://cdn.jsdelivr.net/npm/ogl' (no version)
Install ogl@1.0.11, or pin it in the address, e.g. https://cdn.jsdelivr.net/npm/ogl@1.0.11

An unpinned address always fetches the newest release, and the README warns this can break code.

import { Renderer } from 'ogl' in a plain page with no bundler and no import map
Use a bundler (Vite), add an import map entry for 'ogl', or import the file path ./node_modules/ogl/src/index.js

The bare name 'ogl' only resolves through a bundler or an import map.

Building a full-screen background from a Plane with a Camera and projection matrices
Use the Triangle class (or one big triangle) and render the mesh directly with no camera

A full-screen shader needs neither the scene graph nor the camera.

Calling renderer.render twice per frame (background, then dots) with default settings
Pass clear: false to the second render call

The renderer clears the canvas before each render by default; in our demo the dots pass would otherwise wipe the background.

Copying an example together with its texture or font files into a product
Copy the code (public domain) and use your own images, or check the credited author's terms first

Some example pages credit outside authors for their textures and shaders.

License

Unlicense (public domain). Public domain (the Unlicense) for the library code. Use it in free or paid work, change it and share it, with no credit needed. Pictures and fonts used inside some examples come from other people, so check them separately.

Commercial use
Yes

“This is free and unencumbered software released into the public domain.” raw.githubusercontent.com

Credit
Not needed

“This is free and unencumbered software released into the public domain.” raw.githubusercontent.com

Inside your app or game
Can ship inside your app

“This is free and unencumbered software released into the public domain.” raw.githubusercontent.com

Pass the files on to your users
Allowed

“This is free and unencumbered software released into the public domain.” raw.githubusercontent.com

AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is OGL examples free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with OGL examples. Paste them into your prompt or AGENTS.md.

License rules
- OGL examples (Web animation examples and effects, Video references and motion backgrounds). Minimal WebGL library with a large commented example set (particles, flowmaps, post effects, text, shaders) that works well for light hero backgrounds. Price: free; commercial use OK; no credit needed. Style: abstract, 3d, minimal.
  Connect: npm ogl.
  Get files: Open an example on oframe.github.io/ogl/examples and copy its source (commented); npm install ogl (js, html, glsl).
  Rule: No attribution needed (public domain dedication).
  Rule: Example image/model assets are separate files; check before reuse.
  License: https://raw.githubusercontent.com/oframe/ogl/master/README.md (checked 2026-11-05; details: https://agentgid.com/assets/ogl-examples/)
Can an agent use it by itself?
Yes.

Agent copies the code, snippet or prompt from the page (no account).

Install
npm install ogl
How an agent gets files
Open an example on oframe.github.io/ogl/examples and copy its source (commented); npm install ogl.

Formats: js, html, glsl

Repository
API, key or account
Not needed. Everything runs on your side.
MCP server
None found
Credit line, if you want one
Background made with OGL (public domain)
This card for machines

Alternatives

OGL examples This page

Free Commercial OK npm

three.js examples

Pick three.js when you need many ready features such as model loaders, lights and post effects, and hundreds of official examples.

Free Commercial OK npm

Paper Shaders

Pick Paper Shaders for ready background effects such as mesh gradients, grain and halftone without writing shader code.

Free Commercial OK npm

React Three Fiber examples

Pick React Three Fiber when your site is a React app and you want 3D scenes written as React components.

Free Commercial OK npm

Lenis

Lightweight smooth-scroll library often paired with GSAP ScrollTrigger and WebGL scroll effects.

Free Commercial OK npm

Animate.css

Ready-made CSS keyframe animations (bounce, fade, slide, zoom, attention seekers) added with one class name.

Free With conditions npm

All web animation examples and effects

Questions

Do I need to credit OGL?

No. It is released into the public domain under the Unlicense, so no credit is needed.

How is it different from three.js?

It works in a similar way but is tied closely to WebGL and has far fewer features, which keeps it small.

Can I just copy an example?

Yes, the examples are meant as reference and their source has comments. Check the credited textures and fonts before reusing those files.

Do I need a camera for a simple background?

No. A full-screen shader needs no scene graph and no camera; one triangle covering the screen is enough.