Three.js太棒了!我在向earth.html demo添加静态背景场景时遇到了麻烦。我尝试过使用CSS,这段代码
var texture = new THREE.ImageUtils.loadTexture( 'rainier.jpg' );
var backgroundMesh = new THREE.Mesh(
new THREE.PlaneGeometry(2, 2, 0),
new THREE.MeshBasicMaterial({ map: texture
}));
backgroundMesh .material.depthTest - false;
backgroundMesh .material.depthWrite - false;
//Background Scene
var backgroundScene - new THREE.Scene();
var backgroundCamera - new THREE.Camera();
backgroundScene .add(backgroundCamera );
backgroundScene .add(backgroundMesh );
无济于事!到目前为止,我已经成功地改变了球体的纹理。当我添加上面的代码时,它显示背景而没有球体?这是我第一次体验THREE.js。我开始修改演示以获得语法和操作的感觉。任何帮助将不胜感激!