Wade Plus Three JS demo
Shri

Waders,

 

I took a shot at integrating wade with three.js. For those who don't know what three.js is, take a look here http://threejs.org/

 

The demo is up on my site www.ashatej.com.

 

Additinally, the demo and the code are up here on the share and fork section.

The project title is the same as the same as this topic title -  "Wade Plus Three JS Demo".

 

Anyway, if your browser supports webgl, you should see a rotating cube with a couple of different faces.

 

As I figure out more with three.js, I wil try to post more demos here for your amusement.

 

cheers,

Shri

 

 

NOTE ******************************************************************************

If you run the demo with the console open, you will see the following warning:

WebGL: INVALID_OPERATION: uniform3fv: location is not from current program

This is because both wade and three.js set some of the same variables.

The current program it is complaining about are the two you are already running

wade_1.6.js and three.min.js there is no malware or anything else fishy going on.

I have to look at the three.js documentation some more to figure out how to fix this.

**************************************************************************************

All 3 Comments
Gio

Really cool Shri :)

 

Like I said in the other thread, you should be able to get around that problem by copying wade_1.6.js and three.js into a single file. On Windows (from the command prompt):

copy /b wade_1.6.js+three.js all.js

Then include all.js instead of the other scripts from your index.html file.

 

Anyway, it's just a minor problem - this is very nice, well done

hermes
I didn't know this was even possible, it sure opens up lots of new possibilities for wade users. Looking forward to playing with it when I get some time
Shri

Gio,

 

Copying the two files into one does not seem to remove the warning ?

I have done some searches, but haven't found exactly how to fix this.

 

If you get a minute, check out the three.js doc -  http://threejs.org/docs/#Reference/Renderers.WebGL/WebGLProgram

And here is an example of how you roll your own shader - https://csantosbh.wordpress.com/2014/01/09/custom-shaders-with-three-js-uniforms-textures-and-lighting/

 

So it looks like you can set your own uniforms, but I'm not sure what / how  to set them to ?

 

Anyway, no big deal for now as the warning is really more of a nusiance than anything else.

 

cheers,

Shri

Post a reply
Add Attachment
Submit Reply
Login to Reply