问题:我正在尝试创建(只是为了好玩)一张简单的扑克牌(背面有卡片,正面有卡片)。我有两个不同的图像,用于背面和正面。我很容易地为双方创建了一个带有单个纹理的平面几何图形,但我真的不知道如何为一侧分配一个纹理,为另一侧分配另一个纹理......我试过这个(没有成功:():
var textureBack = new THREE.ImageUtils.loadTexture( 'images/cardBack.png' );
var textureFront = new THREE.ImageUtils.loadTexture( 'images/cardFront.png' );
var material1 = new THREE.MeshBasicMaterial( { map: textureBack } );
var material2 = new THREE.MeshBasicMaterial( { map: textureFront } );
var geometry = new THREE.PlaneGeometry( 90, 110, 1, 1 );
geometry.faces[ 0 ].materials.push( material1 );
geometry.faces[ 1 ].materials.push( material2 );
var card = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial());
有什么帮助吗?:)