0.21.1 • Published 8 months ago

w-gl v0.21.1

Weekly downloads
44
License
MIT
Repository
github
Last release
8 months ago

w-gl

A simple renderer. I use this project to learn more about WebGL apps architecture.

It was mostly inspired by WebGL Insights book, and is not really meant to be a reusable library I use it for most of my 2D and 3D webgl rendering. I should probably document this more.

You can find its application in these repositories:

Basic usage

import {createScene, WireCollection} from 'w-gl';

// Scene needs a canvas element
let scene = createScene(document.querySelector('canvas'));

// let's draw a grid:
let lines = new WireCollection(22);
for (let row = 0; row <= 10; ++row) {
  lines.add({
    from: {x: 0, y: row},
    to: {x: 10, y: row}
  });
}
for (let col = 0; col <= 10; ++col) {
  lines.add({
    from: {x: col, y: 0},
    to: {x: col, y: 10}
  });
}
scene.appendChild(lines);

// Lets bring the grid into the view:
scene.setViewBox({
  left: 0,
  top: 10,
  right: 10,
  bottom: 0 
})

license

MIT

0.21.1

8 months ago

0.21.0

2 years ago

0.20.0

2 years ago

0.19.1

3 years ago

0.19.0

3 years ago

0.17.0

3 years ago

0.18.0

3 years ago

0.16.0

3 years ago

0.15.0

3 years ago

0.14.0

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.10.4

4 years ago

0.10.3

4 years ago

0.10.2

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.1

4 years ago

0.8.6

4 years ago

0.9.0

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

5 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago