2013-05-11 47 views

回答

0

從r49遷移到r58,我遇到了同樣的問題。當您在這樣的問題面前的時候,只是看看圖書館的更新日誌(https://github.com/mrdoob/three.js/wiki/Migration#r52--r53),你會發現,在R53,紋理系統進行了修改:

幾何不再有材料屬性。現在MeshFaceMaterials用法是這樣的:新THREE.Mesh(幾何,新THREE.MeshFaceMaterials([material1,料2]))

所以,

var cube = new THREE.Mesh(new THREE.CubeGeometry(width, height, largeur, 1, 1, 1, materials), new THREE.MeshFaceMaterial()); 

成爲:

var cb = new THREE.CubeGeometry(width, height, largeur, 1, 1, 1); 
var cube = new THREE.Mesh(cb, new THREE.MeshFaceMaterial(faces)); 

/!\請注意THREE.MeshFaceMaterial是單數,儘管它在更改日誌中是複數

+1

堆棧溢出需要用英語發佈。這似乎是一個答案,所以如果你翻譯它應該沒問題。 – ChrisF 2013-05-22 08:53:29

+1

如果你沒有翻譯它,一切都會好起來的。 – 2013-05-22 10:53:26

+0

thx,沒關係:)如果你看我的工作:http://www.youtube.com/watch?v = hSYKtFSRMsU – user2372955 2013-05-22 13:16:58