Center in clip space
This commit is contained in:
parent
cd059c967b
commit
b1936bdcb0
@ -114,8 +114,9 @@ function main() {
|
|||||||
gl.clearColor(0.0, 0.0, 0.0, 1.0);
|
gl.clearColor(0.0, 0.0, 0.0, 1.0);
|
||||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
gl.clear(gl.COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
// make an equilateral triangle of radius 0.8
|
// make an equilateral triangle of radius 0.8, centered in the clip space
|
||||||
var triangle = new triangle2({type: "equilateral", radius: 0.8});
|
const radius = 0.8;
|
||||||
|
var triangle = new triangle2({type: "equilateral", radius: radius, center: {x: 0, y: -radius/4}});
|
||||||
// initialize point p to a copy of one of the vectors
|
// initialize point p to a copy of one of the vectors
|
||||||
var i, p = triangle.get_vertex(0)?.copy();
|
var i, p = triangle.get_vertex(0)?.copy();
|
||||||
// loop for ten thousand years
|
// loop for ten thousand years
|
||||||
|
Loading…
Reference in New Issue
Block a user