set transparent (opacity: 0) to some faces of a sphere geometry
问题 I want to make half the faces of a sphere transparent and the other half colored. How can I do that? I've tried to set a transparent color, but it seems it doesn't work that way. geometry = new THREE.SphereGeometry(1.0, 17, 17); for (var i = 0; i < geometry.faces.length; i++) { let x = Math.random(); //Here I'm trying to set a transparent color to half the faces of the sphere. let color = 0 if (x < 0.5) { color = '0x000000'; } else { color = '0xffffff'; } geometry.faces[i].color.setHex(color)