[Pas2js] Terrain demo

Ryan Joseph ryan at thealchemistguild.com
Tue May 22 16:09:41 CEST 2018


I made another demo of random terrain generation and perlin noise (texture mapping finally) https://github.com/genericptr/Pas2JS-WebGL

I loaded the image from an <img> tag which works on the local browser but it’s giving me some security warning in Firefox which I don’t understand. The examples I saw where using an Image class but I didn’t see that in the RTL. Not sure if it would have helped the problem anyways. 

https://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/

Does anyone have an ideas on how I should do this?

Apparently JavaScript has background threads (“Web Workers") but I didn’t get them figured out so the simulation stutters when loading terrains. I may try to implement that later if I’m motivated.

Regards,
	Ryan Joseph



More information about the Pas2js mailing list