[Pas2js] for .. in loop

Ryan Joseph ryan at thealchemistguild.com
Sat May 19 10:32:14 CEST 2018



> On May 19, 2018, at 3:19 PM, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> 
> Yes. ;)
> I have no idea what model format is good for webgl.

.obj is pretty standard and the only one I know well. There’s lots more judging on the export options in Blender.

Without getting into an .obj loader the “stanford dragon” is probably a good example to have since it’s common starting point for OpenGL shaders and vertex data is easy to copy and paste into a file.

> 
> 
>> Getting the triangle is already the bulk of the mystery overcome.
> 
> I guess it would be nice to have several steps of the example with
> increasing complexity/features. 

Actually WebGL is like OpenGL 3 core so you must have vertex buffers and shaders, which comprise the bulk of the complexity. I could have removed the matrix transform and used OpenGL coords and removed the interleaved vertex data and colors which added some complexity. You’d probably want to actually learn OpenGL from one of the multitudes of sources before looking at demo program since the learning curve is pretty step.

Regards,
	Ryan Joseph



More information about the Pas2js mailing list