How to draw a triangle?

See from the Collection of examples from discourse.threejs.org
BufferGeometryNormals

and
BufferGeometry
//buffergeometry
Indexed BufferGeometry
//indexed buffergeometry

Note!
addAttribute is now setAttribute


Addendum:
This dynamic example clearly shows the place where you can set the coordinates arbitrarily.

ColorWave

			// --- calculate here the coordinates according to your wishes ---
			
			x = j / 10 - 2;
			y = c * Math.sin(  2 * Math.PI * j / 100  + t );
			z = i  ;