Internet explorer 更改纹理IExplorer上的三个JS显示黑色
我的项目在chrome和firefox上运行良好,但我在Explorer上遇到问题 我试图改变纹理,就像我在chrome上做的一样,但是对象变黑了,并且没有返回任何错误。。。我需要改变什么 我使用的代码Internet explorer 更改纹理IExplorer上的三个JS显示黑色,internet-explorer,three.js,textures,Internet Explorer,Three.js,Textures,我的项目在chrome和firefox上运行良好,但我在Explorer上遇到问题 我试图改变纹理,就像我在chrome上做的一样,但是对象变黑了,并且没有返回任何错误。。。我需要改变什么 我使用的代码 //create textureMaterial function CreateTextureMaterial(ImageName){ var Texture = new THREE.ImageUtils.loadTexture('texture/'+ImageName); v
//create textureMaterial
function CreateTextureMaterial(ImageName){
var Texture = new THREE.ImageUtils.loadTexture('texture/'+ImageName);
var Material = new THREE.MeshBasicMaterial({
map:Texture});
return Material;
}
//!!
//change Texture
function ChangeTexture(ObjectName, TextureMaterial){
obj = view3D.scene.getObjectByName(ObjectName);
obj.material = TextureMaterial;
}
您可能需要创建一个小提琴来测试它。我更好地检查了函数,问题是由路径。。。我从背景图像中获取路径,在IE上使用url(“…”),在chrome url(…)上,您可能需要创建一个小提琴来测试它。我更好地检查了函数,问题是由路径引起的。。。我从IE上使用url(“…”)的背景图像中获取路径,在chrome url(…)