问题
I am working on a 3d dataviz. I need to show a world with data on it and I using the chrome experiments (chromeexperiments.com/globe) as a guide.
The issue is that this visualizations are made with Threejs r40 and it is hard to find docs about it so I tried to upgrade to r71.
I solved the compatibility issues rendering the world but cant make it show the atmosphere, in fact, when I try to show the atmosphere nothing is shown (is like the atmosphere is rendered black and it hides the world).
I think that the problem is the shader but I am not really sure.
Does anybody have a clue?
This is the code I am using:
gist.github.com/glena/0b2875044cd6c39ff150
Thanks
==========
Update:
if I remove the fragentShader, this is rendered as a red sphere but stills covers the world with a black background:
var mesh = new THREE.Mesh(new THREE.SphereGeometry(100, 40, 30),
new THREE.ShaderMaterial({
uniforms: uniforms,
vertexShader: shader.vertexShader
})
);
回答1:
The issue (as said by @WestLangley) was
mesh.flipSided = true; ==> mesh.material.side = THREE.BackSide;
来源:https://stackoverflow.com/questions/30538512/issue-upgrading-threejs-with-shaders