简单说一下理论:反射基本上是从某个位置拍摄场景的图像。因此,如果您希望平面网格充当镜子,则必须在该位置添加相机,让其在动画循环中将场景渲染到纹理中,然后在平面网格的材质中使用该纹理。我还建议参考http://stemkoski.github.io/Three.js/Reflection.html以及WestLangley提到的示例。
另外,尝试调整设置;例如,要获得较少的反射效果,请尝试:
var mirrorMaterial = new THREE.MeshBasicMaterial( { color: 0x111111, envMap: mirrorCamera.renderTarget } );
或者var mirrorMaterial = new THREE.MeshPhongMaterial( { emissive: 0x111111, envMap: mirrorCamera.renderTarget } );
https://threejs.org/examples/#webgl_materials_cubemap
new THREE.MeshLambertMaterial ({
map: texture,
envMap: scene.background,
combine: THREE.MixOperation,
reflectivity: .5
})
我理解的关键变量是 THREE.MixOperation。