Reputation: 105
I have a problem with my simple three.js code. The code contains a few lines for the setup and displays a few cubes. But the some cubes in the background are displayed in the foreground.
Did I forgot something to do?
I hosted the code on http://goo.gl/qUZKRt (press shift to rotate the camera).
Any sort of help would be great!
Thank you
Upvotes: 0
Views: 104
Reputation: 1489
First of all - you have 2 renderers in your code, both - WebGL
and Canvas
. Check it. Than, since you are using light
s in your scene
, setting just color
to your material
would not be enough. So check it as well. The rest - just a matter of playing around with your lights' values.
See this example: http://jsfiddle.net/FeMq7/1/
Hope that helps, Alex
Upvotes: 1