jeromeetienne/threex.planets

Problems with hex colors, and another question

Opened this issue · 3 comments

Hello, consider the follwing code snippet please :

var material4= new THREEx.createAtmosphereMaterial();
material4.uniforms.glowColor.value = new THREE.Color(0xffefaf);
material4.uniforms.coeficient.value= 1.065;
material4.uniforms.power.value = 1.350;
var sphere4 = new THREE.SphereGeometry(84.0 ;, 100, 100);
var mesh4 = new THREE.Mesh(sphere4, material4);
sphere4.position = new THREE.Vector3(100, 230, 140] );
mesh4.position = new THREE.Vector3(100, 230, 140] );
scene.add(mesh4);

Please notice the line
material4.uniforms.glowColor.value = new THREE.Color(0xffefaf);

if, instead of using a hex color, i used a named color, e.g. 'yellow', making the line :
material4.uniforms.glowColor.value = new THREE.Color('yellow');

The code would work, and my object rendered.

However, the code with the hex color (i tried to enclose it in single and double quotes too), Firefox does not even render the canvas itself.

Could you please help?

Also, is there a way to solve this question:
http://stackoverflow.com/questions/26431651/rendering-an-atmosphere-using-three-js ?

i cant find this code in threex.planets. can you point it to me ?

This is my own code, of course using the THREEx.planets library.

I dont understand your question sorry

On Tuesday, October 21, 2014, naturalmechanics notifications@github.com
wrote:

This is my own code, of course using the THREEx.planets library.


Reply to this email directly or view it on GitHub
#6 (comment)
.