Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer 更改纹理IExplorer上的三个JS显示黑色_Internet Explorer_Three.js_Textures - Fatal编程技术网

Internet explorer 更改纹理IExplorer上的三个JS显示黑色

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

我的项目在chrome和firefox上运行良好,但我在Explorer上遇到问题

我试图改变纹理,就像我在chrome上做的一样,但是对象变黑了,并且没有返回任何错误。。。我需要改变什么

我使用的代码

//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(…)