three.js - Setting face colors in fiddle -


It looks like I can not set the face color in a bela

I like this Setting face color

  var faces = new three Face 3 (inx 1, in 3, inx2); Face color = color; Face.ambient = Color; Face.normal.set (0,0, -1); Geometry.faces.push (face);   

Facials and Norms are inverted because I am cutting the shadow and the face does not work if the face is not set in such a way. But I set the double side face:

  var pMaterial = new three.MeshPhongMaterial ({vertexColors: THREE.VertexColors, shininess: 100, side: THREE.DoubleSide});   

The end result is that the faces are black

The exact same type of installation is working fine in the local. (Well, I think thinks this is the same). I can not understand what the problem is ...

Three.js version that comes Try including the latest "bundle" in Jsfiddle is a little too old.

  & lt; Script src = "http://threejs.org/build/three.min.js" & gt; & Lt; / Script & gt;   



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -