soulwire / sketch.js

Cross-Platform JavaScript Creative Coding Framework
MIT License
4.09k stars 431 forks source link

Three.js shader material not working with Sketch #62

Closed cmisura closed 10 years ago

cmisura commented 10 years ago

I have a setup that uses Sketch, Three.js and some custom shaders. Outside of the Sketch environment, everything works — THREE.ShaderMaterial is rendered properly. However, when I pull my project into Sketch, THREE.ShaderMaterial no longer works, and there are no errors. Is there any reason why THREE.ShaderMaterial wouldn't be working in conjunction with Sketch ?

On a side note, your work is very inspiring ! Thanks

soulwire commented 10 years ago

Hi. Thanks for trying Sketch. Are you passing the THREE canvas and context to Sketch like in the example? If you could post a fiddle of something like your setup that'd help me debug it and figure out what's going on.

cmisura commented 10 years ago

Yes, I'm passing the THREE canvas and context, the scene is rendered when I just use a basic material, but when I employ THREE.ShaderMaterial there's nothing in the scene, but the objects do exist. I'll try to setup a fiddle later today. Thanks for your help.

cmisura commented 10 years ago

After going over the entire file in detail again (it's in Coffeescript) and the compiled JS, it looks like there was an issue with indentation on one object at the top. After fixing that, it seems to be working fine. Sorry to waste your time.

soulwire commented 10 years ago

No time wasted at all! Glad you got it sorted :)