Center in clip space
This commit is contained in:
		@@ -114,8 +114,9 @@ function main() {
 | 
			
		||||
  gl.clearColor(0.0, 0.0, 0.0, 1.0);
 | 
			
		||||
  gl.clear(gl.COLOR_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
  // make an equilateral triangle of radius 0.8
 | 
			
		||||
  var triangle = new triangle2({type: "equilateral", radius: 0.8});
 | 
			
		||||
  // make an equilateral triangle of radius 0.8, centered in the clip space
 | 
			
		||||
  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
 | 
			
		||||
  var i, p = triangle.get_vertex(0)?.copy();
 | 
			
		||||
  // loop for ten thousand years
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user