PF Villard d'après le cours de Eric Haines (Autodesk Inc.) disponible sur Udacity
var sphereMaterial=
new THREE.MeshLambertMaterial();
sphereMaterial.color.r = 1.0;
sphereMaterial.color.g = 0.0;
sphereMaterial.color.b = 0.0;
sphereMaterial.color.setRGB
(0.855, 0.647, 0.125);
sphereMaterial.color.setHex(0x1280FF);
Comment coder la couleur Magenta ?
var color1 = new THREE.Color( 0xF08000 );//orange
var color2 = new THREE.Color( 0x808000 );//olive
var color3 = new THREE.Color( 0x0982FF );//bright blue
geometry.faces[0].vertexColors =
[ color1, color2, color3 ];
material = new THREE.MeshBasicMaterial(
{ color: 0x80fc66, shading: THREE.FlatShading } );
material.color.setRGB( red, green, blue );
var newRed = material.color.r * 0.7;
material.ambient.setRGB( ... );
new THREE.MeshPhongMaterial( {
color: 0x996633,
specular: 0x050505,
shininess: 100
} )
var movingBoxMaterial = new
THREE.MeshLambertMaterial(
{ color: 0xE53319, opacity: 0.7,
transparent: true } );