0
對不起的方法「loadTexture」我的英語水平。 我在使用Three.js時遇到了問題。 在加載紋理的每一個例子,我看到這樣的代碼:three.js所 - 無法調用未定義
var map = THREE.ImageUtils.loadTexture("obj/textures/textures38.jpg");
map.wrapS = map.wrapT = THREE.RepeatWrapping;
map.repeat.set(3, 3);
你能告訴我,爲什麼我能得到這樣的
Uncaught TypeError: Cannot call method 'loadTexture' of undefined
的消息,該工作得很好:
var material=new THREE.MeshPhongMaterial({color:16777215,map:ImageUtils.loadTexture("obj/textures/textures38.jpg")});
PS我目前使用three.js所版本不是最後
謝謝。
@mdroob感謝。難道你不建議 - 我應該使用BinaryLoader而不是舊的'loader.loadbinary'函數嗎? – user1252381
因爲我在庫的'JSON.parse'區域出現了一些錯誤,同時將代碼更改爲新的 – user1252381