MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / _triangle

Function _triangle

libraries/p5.js:34912–34920  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34910 x3+'|'+y3;
34911 if(!this.geometryInHash(gId)){
34912 var _triangle = function(){
34913 var vertices = [];
34914 vertices.push(new p5.Vector(x1,y1,0));
34915 vertices.push(new p5.Vector(x2,y2,0));
34916 vertices.push(new p5.Vector(x3,y3,0));
34917 this.vertices = vertices;
34918 this.faces = [[0,1,2]];
34919 this.uvs = [[0,0],[0,1],[1,1]];
34920 };
34921 var triGeom = new p5.Geometry(1,1,_triangle);
34922 triGeom.computeNormals();
34923 this.createBuffers(gId, triGeom);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected