ThreeJS r75 bindTexture:纹理不能用于多个目标
ThreeJS r75 bindTexture: textures can not be used with multiple targets
我的代码在 ThreeJS r75 中触发了这个警告:
bindTexture:纹理不能用于多个目标。
我对错误有了基本的了解。
如果我删除我为反射目的创建的 2 个 cubeCameras,则不会触发警告。
我的问题是:警告是错误吗? cubeCameras 是否应该触发此警告?我是否以不适合 r75 的方式创建 cubeCameras?
这是我创建它们的方式:
gongRef = new THREE.CubeCamera(1, 32000, 1024);
这是我将它们添加到场景中的方式:
scene.add(gongRef );
我是这样应用它们的:
gongMat = new THREE.MeshPhongMaterial({
color:"rgb(240,240,240)",
specular:"rgb(240,240,240)",
shininess:200,
emissive:"rgb(140,140,140)",
visible:true,
wireframe:false,
envMap:gongRef.renderTarget,
reflectivity: 0.8,
emissiveIntensity: 1.0
});
这是我更新它们的方式:
gongRef.position.copy(theGong.position);
theGong.visible = false;
gongRef.updateCubeMap( renderer, scene );
theGong.visible = true;
在 GitHub,Doob 先生回复说,"I think this has already been fixed in the dev branch.."
所以,我猜这是 bindTexture 警告中的一个小错误。
我的代码在 ThreeJS r75 中触发了这个警告:
bindTexture:纹理不能用于多个目标。
我对错误有了基本的了解。
如果我删除我为反射目的创建的 2 个 cubeCameras,则不会触发警告。
我的问题是:警告是错误吗? cubeCameras 是否应该触发此警告?我是否以不适合 r75 的方式创建 cubeCameras?
这是我创建它们的方式:
gongRef = new THREE.CubeCamera(1, 32000, 1024);
这是我将它们添加到场景中的方式:
scene.add(gongRef );
我是这样应用它们的:
gongMat = new THREE.MeshPhongMaterial({
color:"rgb(240,240,240)",
specular:"rgb(240,240,240)",
shininess:200,
emissive:"rgb(140,140,140)",
visible:true,
wireframe:false,
envMap:gongRef.renderTarget,
reflectivity: 0.8,
emissiveIntensity: 1.0
});
这是我更新它们的方式:
gongRef.position.copy(theGong.position);
theGong.visible = false;
gongRef.updateCubeMap( renderer, scene );
theGong.visible = true;
在 GitHub,Doob 先生回复说,"I think this has already been fixed in the dev branch.."
所以,我猜这是 bindTexture 警告中的一个小错误。