{
 "slug": "ogl-examples",
 "name": "OGL examples",
 "author": "oframe",
 "density": "full",
 "status": "active",
 "status_note": null,
 "alternatives_page": null,
 "one_liner": "Minimal WebGL library with a large commented example set (particles, flowmaps, post effects, text, shaders) that works well for light hero backgrounds.",
 "category": {
  "slug": "motion-examples",
  "name": "Web animation examples and effects"
 },
 "tags": [
  "Code library",
  "Open source"
 ],
 "styles": [
  "abstract",
  "3d",
  "minimal"
 ],
 "logo_url": "https://agentgid.com/media/avatars/oframe.png",
 "logo_letter": "O",
 "links": {
  "repo": "https://github.com/oframe/ogl",
  "website": "https://oframe.github.io/ogl/examples",
  "api_docs": null
 },
 "preview": {
  "kind": "image_grid",
  "src": "https://agentgid.com/assets/ogl-examples/demo.jpg",
  "alt": "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.",
  "caption": "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."
 },
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free",
   "status": "yes",
   "sub": "No paid plan",
   "quote": null,
   "note": "Fully free.",
   "source": {
    "label": "oframe.github.io/ogl/examples",
    "url": "https://oframe.github.io/ogl/examples"
   },
   "n": 1
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "Yes",
   "status": "yes",
   "sub": "Unlicense",
   "quote": "This is free and unencumbered software released into the public domain.",
   "note": "Public domain; any purpose, commercial or not.",
   "source": {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
   },
   "n": 2
  },
  {
   "key": "credit",
   "label": "Credit the author",
   "value": "Not needed",
   "status": "yes",
   "sub": null,
   "quote": "This is free and unencumbered software released into the public domain.",
   "note": null,
   "source": {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
   },
   "n": 3
  },
  {
   "key": "agent_access",
   "label": "Agent access",
   "value": "npm package",
   "status": "info",
   "sub": "Installs without a key",
   "quote": null,
   "note": "An agent can install it by itself with npm install ogl. No key or account is needed.",
   "source": {
    "label": "github.com/oframe/ogl",
    "url": "https://github.com/oframe/ogl"
   },
   "n": 4
  }
 ],
 "license": {
  "name": "Unlicense (public domain)",
  "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md",
  "summary": "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.",
  "pages_read": 1,
  "rules": [
   "No attribution needed (public domain dedication).",
   "Example image/model assets are separate files; check before reuse."
  ],
  "rows": [
   {
    "label": "Commercial use",
    "value": "Yes",
    "status": "yes",
    "quote": "This is free and unencumbered software released into the public domain.",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
    },
    "note": null
   },
   {
    "label": "Credit",
    "value": "Not needed",
    "status": "yes",
    "quote": "This is free and unencumbered software released into the public domain.",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
    },
    "note": null
   },
   {
    "label": "Inside your app or game",
    "value": "Can ship inside your app",
    "status": "yes",
    "quote": "This is free and unencumbered software released into the public domain.",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
    },
    "note": null
   },
   {
    "label": "Pass the files on to your users",
    "value": "Allowed",
    "status": "yes",
    "quote": "This is free and unencumbered software released into the public domain.",
    "source": {
     "label": "raw.githubusercontent.com",
     "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
    },
    "note": null
   },
   {
    "label": "AI training",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Bots and bulk downloads",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   }
  ],
  "checked_at": "2026-11-05",
  "commercial_use_page": "https://agentgid.com/assets/ogl-examples/commercial-use/"
 },
 "overview": {
  "heading": "OGL: a small 3D graphics library with examples",
  "body": "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."
 },
 "uses": [
  {
   "title": "A moving background behind a headline",
   "text": "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.",
   "idea": false,
   "image": "https://agentgid.com/assets/ogl-examples/demo.jpg"
  },
  {
   "title": "Floating dots and particles",
   "text": "Scatter hundreds of soft dots that drift slowly, for a calm background on a hero, a sign-up page or a loading screen.",
   "idea": false,
   "image": null
  },
  {
   "title": "Effects that follow the mouse",
   "text": "Make a picture or the page background ripple and bend where the visitor moves the pointer, as an eye-catching first screen.",
   "idea": false,
   "image": null
  },
  {
   "title": "A 3D model people can turn",
   "text": "Show a product or object as a 3D model that visitors rotate with the mouse, loaded from a common 3D file format.",
   "idea": false,
   "image": null
  },
  {
   "title": "Learning how WebGL works",
   "text": "Read short, commented examples to understand how browser 3D drawing works, without a large engine hiding the details.",
   "idea": false,
   "image": null
  }
 ],
 "start": {
  "prompt": "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.",
  "install": "npm i ogl",
  "install_note": null,
  "code": [
   {
    "tab": "Step 1",
    "intro": "Import from 'ogl' when you use a bundler or an import map. The library has no other packages it depends on.",
    "source": "import { Renderer, Camera, Transform, Box, Program, Mesh } from 'ogl';"
   }
  ]
 },
 "mistakes": [
  {
   "dont": "import ... from 'https://cdn.jsdelivr.net/npm/ogl' (no version)",
   "fix": "Install ogl@1.0.11, or pin it in the address, e.g. https://cdn.jsdelivr.net/npm/ogl@1.0.11",
   "why": "An unpinned address always fetches the newest release, and the README warns this can break code.",
   "dont_code": true,
   "fix_code": false
  },
  {
   "dont": "import { Renderer } from 'ogl' in a plain page with no bundler and no import map",
   "fix": "Use a bundler (Vite), add an import map entry for 'ogl', or import the file path ./node_modules/ogl/src/index.js",
   "why": "The bare name 'ogl' only resolves through a bundler or an import map.",
   "dont_code": true,
   "fix_code": false
  },
  {
   "dont": "Building a full-screen background from a Plane with a Camera and projection matrices",
   "fix": "Use the Triangle class (or one big triangle) and render the mesh directly with no camera",
   "why": "A full-screen shader needs neither the scene graph nor the camera.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Calling renderer.render twice per frame (background, then dots) with default settings",
   "fix": "Pass clear: false to the second render call",
   "why": "The renderer clears the canvas before each render by default; in our demo the dots pass would otherwise wipe the background.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Copying an example together with its texture or font files into a product",
   "fix": "Copy the code (public domain) and use your own images, or check the credited author's terms first",
   "why": "Some example pages credit outside authors for their textures and shaders.",
   "dont_code": false,
   "fix_code": false
  }
 ],
 "agent": {
  "self_serve": true,
  "self_serve_text": "Agent copies the code, snippet or prompt from the page (no account)",
  "install": "npm install ogl",
  "repo": "https://github.com/oframe/ogl",
  "api_docs": null,
  "api_account": "Not needed. Everything runs on your side.",
  "get_files": "Open an example on oframe.github.io/ogl/examples and copy its source (commented); npm install ogl.",
  "formats": [
   "js",
   "html",
   "glsl"
  ],
  "limits": null,
  "mcp": null,
  "mcp_url": null,
  "credit_line": "Background made with OGL (public domain)",
  "rules_text": "- 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.\n  Connect: npm ogl.\n  Get files: Open an example on oframe.github.io/ogl/examples and copy its source (commented); npm install ogl (js, html, glsl).\n  Rule: No attribution needed (public domain dedication).\n  Rule: Example image/model assets are separate files; check before reuse.\n  License: https://raw.githubusercontent.com/oframe/ogl/master/README.md (checked 2026-11-05; details: https://agentgid.com/assets/ogl-examples/)",
  "agent_md": "https://agentgid.com/assets/ogl-examples/agent.md",
  "card_json": "https://agentgid.com/assets/ogl-examples/card.json"
 },
 "popularity": {
  "gid_score": 49,
  "stars": 4759,
  "downloads_7d": 1083034,
  "downloads_7d_label": "1.1M",
  "downloads_change_4w_pct": 45.4,
  "eco": "npm",
  "package": "ogl",
  "repo": "oframe/ogl",
  "agent_projects": 15,
  "agent_projects_total": 4817,
  "downloads_unconfirmed": false,
  "series": {
   "downloads_weekly": [
    [
     "2025-11-17",
     126670
    ],
    [
     "2025-11-24",
     117363
    ],
    [
     "2025-12-01",
     136089
    ],
    [
     "2025-12-08",
     139355
    ],
    [
     "2025-12-15",
     134959
    ],
    [
     "2025-12-22",
     94853
    ],
    [
     "2025-12-29",
     107265
    ],
    [
     "2026-01-05",
     143275
    ],
    [
     "2026-01-12",
     149942
    ],
    [
     "2026-01-19",
     155223
    ],
    [
     "2026-01-26",
     163349
    ],
    [
     "2026-02-02",
     176535
    ],
    [
     "2026-02-09",
     176291
    ],
    [
     "2026-02-16",
     181433
    ],
    [
     "2026-02-23",
     203608
    ],
    [
     "2026-03-02",
     219644
    ],
    [
     "2026-03-09",
     249598
    ],
    [
     "2026-03-16",
     242823
    ],
    [
     "2026-03-23",
     277510
    ],
    [
     "2026-03-30",
     283365
    ],
    [
     "2026-04-06",
     280852
    ],
    [
     "2026-04-13",
     292797
    ],
    [
     "2026-04-20",
     311414
    ],
    [
     "2026-04-27",
     306476
    ],
    [
     "2026-05-04",
     313852
    ],
    [
     "2026-05-11",
     338127
    ],
    [
     "2026-05-18",
     336834
    ],
    [
     "2026-05-25",
     345754
    ],
    [
     "2026-06-01",
     387991
    ],
    [
     "2026-06-08",
     415944
    ],
    [
     "2026-06-15",
     434660
    ],
    [
     "2026-06-22",
     437187
    ],
    [
     "2026-06-29",
     431524
    ],
    [
     "2026-07-06",
     537379
    ],
    [
     "2026-07-13",
     544289
    ],
    [
     "2026-07-20",
     542747
    ],
    [
     "2026-07-27",
     567097
    ],
    [
     "2026-08-03",
     599210
    ],
    [
     "2026-08-10",
     604111
    ],
    [
     "2026-08-17",
     598688
    ],
    [
     "2026-08-24",
     632178
    ],
    [
     "2026-08-31",
     702714
    ],
    [
     "2026-09-07",
     462276
    ],
    [
     "2026-09-14",
     607795
    ],
    [
     "2026-09-21",
     738258
    ],
    [
     "2026-09-28",
     802720
    ],
    [
     "2026-10-05",
     702775
    ],
    [
     "2026-10-12",
     613828
    ],
    [
     "2026-10-19",
     711667
    ],
    [
     "2026-10-26",
     1172935
    ],
    [
     "2026-11-02",
     1186864
    ],
    [
     "2026-11-09",
     1083034
    ]
   ],
   "stars": [
    [
     "2026-11-07",
     4750
    ],
    [
     "2026-11-08",
     4750
    ],
    [
     "2026-11-09",
     4751
    ],
    [
     "2026-11-10",
     4754
    ],
    [
     "2026-11-11",
     4754
    ],
    [
     "2026-11-12",
     4754
    ],
    [
     "2026-11-13",
     4755
    ],
    [
     "2026-11-14",
     4755
    ],
    [
     "2026-11-15",
     4758
    ],
    [
     "2026-11-16",
     4758
    ],
    [
     "2026-11-17",
     4759
    ]
   ]
  },
  "stars_flat_since": null,
  "updated_at": "2026-11-17"
 },
 "alternatives": [
  {
   "slug": "ogl-examples",
   "name": "OGL examples",
   "why": null,
   "current": true,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "threejs-examples",
   "name": "three.js examples",
   "why": "Pick three.js when you need many ready features such as model loaders, lights and post effects, and hundreds of official examples.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "paper-shaders",
   "name": "Paper Shaders",
   "why": "Pick Paper Shaders for ready background effects such as mesh gradients, grain and halftone without writing shader code.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "react-three-fiber-examples",
   "name": "React Three Fiber examples",
   "why": "Pick React Three Fiber when your site is a React app and you want 3D scenes written as React components.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "lenis",
   "name": "Lenis",
   "why": "Lightweight smooth-scroll library often paired with GSAP ScrollTrigger and WebGL scroll effects.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "npm"
  },
  {
   "slug": "animate-css",
   "name": "Animate.css",
   "why": "Ready-made CSS keyframe animations (bounce, fade, slide, zoom, attention seekers) added with one class name.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "With conditions",
    "status": "cond"
   },
   "access": "npm"
  }
 ],
 "faq": [
  {
   "q": "Do I need to credit OGL?",
   "a": "No. It is released into the public domain under the Unlicense, so no credit is needed."
  },
  {
   "q": "How is it different from three.js?",
   "a": "It works in a similar way but is tied closely to WebGL and has far fewer features, which keeps it small."
  },
  {
   "q": "Can I just copy an example?",
   "a": "Yes, the examples are meant as reference and their source has comments. Check the credited textures and fonts before reusing those files."
  },
  {
   "q": "Do I need a camera for a simple background?",
   "a": "No. A full-screen shader needs no scene graph and no camera; one triangle covering the screen is enough."
  }
 ],
 "at_a_glance": {
  "latest_version": "1.0.11",
  "last_commit": "2025-04-13",
  "runtime": "A browser with WebGL (the Renderer asks for WebGL 2 and falls back to WebGL 1); ES modules, so a bundler or an import map for the bare 'ogl' import; no other packages.",
  "key_needed": false,
  "formats": "js, html, glsl"
 },
 "good_to_know": [
  "You or your AI assistant write the visual effect code (shaders) yourself. OGL has far fewer ready features than three.js.",
  "The license is written at the end of the README; the LICENSE file the README links to does not exist, and the package lists Unlicense.",
  "The latest release, 1.0.11, came out in January 2025. Pin that version.",
  "Example pages credit outside authors for some textures and shader ideas. Copy the code freely, but not those files without checking their own terms.",
  "Loading it from a public file host is possible; pin an exact version there, or updates can break your page."
 ],
 "stack_snippets": [],
 "claims": [
  "The whole library is about 29 kB minzipped (Core 8 kB, Math 6 kB, Extras 15 kB)"
 ],
 "checked": {
  "license_read": "2026-11-05",
  "overview_checked": "2026-11-09",
  "numbers_updated": "2026-11-17",
  "sources": [
   {
    "label": "oframe.github.io/ogl",
    "url": "https://oframe.github.io/ogl/"
   },
   {
    "label": "oframe.github.io/ogl/examples",
    "url": "https://oframe.github.io/ogl/examples/"
   },
   {
    "label": "oframe.github.io",
    "url": "https://oframe.github.io/ogl/examples/triangle-screen-shader.html"
   },
   {
    "label": "oframe.github.io",
    "url": "https://oframe.github.io/ogl/examples/particles.html"
   },
   {
    "label": "oframe.github.io",
    "url": "https://oframe.github.io/ogl/examples/mouse-flowmap.html"
   },
   {
    "label": "oframe.github.io",
    "url": "https://oframe.github.io/ogl/examples/post-fluid-distortion.html"
   },
   {
    "label": "oframe.github.io",
    "url": "https://oframe.github.io/ogl/examples/msdf-text.html"
   },
   {
    "label": "github.com/oframe/ogl",
    "url": "https://github.com/oframe/ogl"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/oframe/ogl/blob/master/README.md"
   },
   {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/oframe/ogl/master/package.json"
   },
   {
    "label": "npm: ogl/latest",
    "url": "https://registry.npmjs.org/ogl/latest"
   },
   {
    "label": "npm: ogl",
    "url": "https://registry.npmjs.org/ogl"
   },
   {
    "label": "oframe.github.io/ogl/examples",
    "url": "https://oframe.github.io/ogl/examples"
   },
   {
    "label": "raw.githubusercontent.com",
    "url": "https://raw.githubusercontent.com/oframe/ogl/master/README.md"
   }
  ],
  "unverified": null
 },
 "user_reports": null,
 "url": "https://agentgid.com/assets/ogl-examples/",
 "note": "Written by AgentGid from the official pages in checked.sources; quotes are copied from those pages. status: yes | cond | no | unknown | info. Prices and vendor claims are as reported on the checked date. Not legal advice."
}
