/dowel

A toy library for learning WebGL2 concepts

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

dowel

A lightweight WebGL2 helper library

Features

  • Easily extended shader class
  • Screen quad for rendering
  • Built-in scene graph
  • Perspective and orthographic cameras

Installation and use

The library is designed as a set of ES6 modules so you can manage your own minification etc.

Example scene

Start a local webserver in the repository, then navigate to localhost:[port]/examples to see several sample projects.

Building the library

The npm script npm run build kicks off Rollup, and produces the file at dist/dowel.js.

Dependencies

dowel includes two libraries for its dependencies: gl-matrix for the math, and webgl-obj-loader for simple OBJ file parsing. They're both excellent libraries and I encourage you to check them out.

Example Models

Task list

  • documentation

Screenshots

Phong Blinn shading

PBR materials

Normal mapping

Environment mapping

Instancing

Shadow mapping