https://github.com/waldyrious/minimal-webgl
The absolute minimal code to get a WebGL canvas showing something
https://github.com/waldyrious/minimal-webgl
Last synced: 4 months ago
JSON representation
The absolute minimal code to get a WebGL canvas showing something
- Host: GitHub
- URL: https://github.com/waldyrious/minimal-webgl
- Owner: waldyrious
- License: other
- Created: 2015-02-27T04:11:29.000Z (over 11 years ago)
- Default Branch: gh-pages
- Last Pushed: 2025-07-07T20:23:20.000Z (11 months ago)
- Last Synced: 2025-07-07T23:14:09.926Z (11 months ago)
- Language: HTML
- Homepage: https://waldyrious.github.io/minimal-webgl
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Minimal WebGL
The minimal code to get a WebGL canvas showing a simple object.
Most defaults are left alone
(perspective is orthographic, no transformations applied, etc.)
to make the code as approachable as possible.
A single square is shown, at the center of the canvas.
The `vertices` array can be changed to show a different shape,
and the `color` array edited to change the object's color.
This code was heavily inspired by [@guciek](https://github.com/guciek)'s
[Shortest WebGL example](https://sites.google.com/site/progyumming/javascript/shortest-webgl),
but aims to be a fully documented such example
(using [Docco](http://jashkenas.github.io/docco/),
[groc](https://github.com/nevir/groc) or
[this simple script](http://jsfiddle.net/D2nm4/12/)),
rather than just the code.
See [Issue #2](https://github.com/waldyrious/minimal-webgl/issues/2)
for the plans to actually implement the inline documentation view.