mikeseven / node-webgl

WebGL bindings to desktop OpenGL
398 stars 60 forks source link

newest Three.js compatibilty #61

Open kid-wumeng opened 6 years ago

kid-wumeng commented 6 years ago

Hello, i'm use the three.js v0.90.0 and my node version is v8.9.3.

I can run the example's code successly and show the graph, but when i use three.js, it will happen error.

I try to find the question, at lease...

gl.MAX_VERTEX_UNIFORM_VECTORS gl.MAX_VARYING_VECTORS gl.MAX_VERTEX_ATTRIBS

three.js need the three attributes at init, and them is undefined.

I set them to a number temporarily, continue...

Then, the console tell me a new error:

THREE.WebGLProgram: shader error:  0 gl.VALIDATE_STATUS false gl.getProgramInfoLog ERROR: One or more attached shaders not successfully compiled ERROR: 0:52: 'highp' : syntax error: syntax error ERROR: 0:117: 'highp' : syntax error: syntax error

The README let us add the code in fragment shaders:

#ifdef GL_ES
precision highp float;
#endif

I don't know how to add it to the three.js, Is it related to this error?

The node-webgl is an amazing and valuable project, can you add an easy example to display how to run it with newest three.js ?

I hear you're busy in other issue, about this project, has a roadmap or plan ? :)

mikeseven commented 6 years ago

I will look at it this week and update the example and readme.

--mike


From: KID notifications@github.com Sent: Monday, February 19, 2018 10:29:40 AM To: mikeseven/node-webgl Cc: Subscribed Subject: [mikeseven/node-webgl] newest Three.js compatibilty (#61)

Hello, i'm use the three.js v0.90.0 and my node version is v8.9.3.

I can run the example's code successly and show the graph, but when i use three.js, it will happen error.

I try to find the question, at lease...

gl.MAX_VERTEX_UNIFORM_VECTORS gl.MAX_VARYING_VECTORS gl.MAX_VERTEX_ATTRIBS

three.js need the three attributes at init, and them is undefined.

I set them to a number temporarily, and continue...

Then, the console tell me a new error:

THREE.WebGLProgram: shader error: 0 gl.VALIDATE_STATUS false gl.getProgramInfoLog ERROR: One or more attached shaders not successfully compiled ERROR: 0:52: 'highp' : syntax error: syntax error ERROR: 0:117: 'highp' : syntax error: syntax error

The README let us add the code in fragment shaders:

ifdef GL_ES

precision highp float;

endif

I don't know how to add it to the three.js, Is it related to this error?

The node-webgl is an amazing and valuable project, can you add an easy example to display how to run it with three.js ?

I hear you're busy in other issue, about this project, is a roadmap or plan ? :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/mikeseven/node-webgl/issues/61, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAxYLCl9QLLnZKS1AlMmrkwVa6pOBhwrks5tWb2UgaJpZM4SK9CN.

kid-wumeng commented 6 years ago

thank you very much !

cedric-h commented 6 years ago

Were you ever able to find time to do the readme/example updates? Just judging by timestamps it looks like maybe not but maybe I'm not reading correctly. This sounds like a really useful tool, being able get more out of the GPU with JavaScript and three.js is a dream come true. It does look like it's a bit difficult to get working, if you could find time to outline the process better in the README/examples that would be perfect Thanks for making this!

mikeseven commented 6 years ago

oh sorry, I completely forgot. I put this issue on top my list for next week...gotta catch up with latest threejs.

darkf commented 5 years ago

@mikeseven Any update on this? :)