Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.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

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
Google chrome 铬三色织构_Google Chrome_Three.js - Fatal编程技术网

Google chrome 铬三色织构

Google chrome 铬三色织构,google-chrome,three.js,Google Chrome,Three.js,我是新来的, 当我使用Chrome浏览器版本23.0.1271.95 m时,我遇到了纹理问题,实际上它没有正确加载,我得到了以下错误: 解释为图像但使用MIME类型text/html传输的资源:https://localhost:8181/images/texture1.jpg. 3.js 458 如果使用Firefox而不是正确加载纹理,则不会出现相同的问题 谢谢您的帮助。这可能也是您的web服务器的问题。也许.jpg的MIME类型没有设置为image/jpeg?谢谢Matthias,我解决

我是新来的, 当我使用Chrome浏览器版本23.0.1271.95 m时,我遇到了纹理问题,实际上它没有正确加载,我得到了以下错误:

解释为图像但使用MIME类型text/html传输的资源:https://localhost:8181/images/texture1.jpg. 3.js 458

如果使用Firefox而不是正确加载纹理,则不会出现相同的问题


谢谢您的帮助。

这可能也是您的web服务器的问题。也许.jpg的MIME类型没有设置为image/jpeg?谢谢Matthias,我解决了我的问题,我更改了:terrainMaterial THREE.MeshBasicMaterial var=new{map:terrainTexture}和var terrainMaterial=new THREE.MeshLambertMaterial{map:terrainTexture};就这样然而,我注意到,问题是每当我使用Chrome加载纹理时,模型Collada也会出现同样的问题。Dae和立方体地图。服务器配置正确,他不是问题所在。与Firefox一样,一切正常。我使用的是53版的ThreeJS。
 var terrainGeometry = new THREE.PlaneGeometry(3, 3);
 var terrainTexture = new THREE.ImageUtils.loadTexture("images/texture1.jpg");
 var terrainMaterial = new THREE.MeshBasicMaterial({map: terrainTexture}); 
 var terrain = new THREE.Mesh(terrainGeometry, terrainMaterial);
 scene.add(terrain);