我有一个具有地图和颜色的网格。我想将地图中的透明部分设置为颜色。我试过了,但只有地图是渲染的。
var map = THREE.ImageUtils.loadTexture(url);
var material = new THREE.MeshPhongMaterial({
color: colors[Math.ceil(Math.random() * (colors.length - 1))],
transparent: true,
opacity: 1.0,
map: map,
blending: THREE.NormalBlending
});
target.mesh = new THREE.Mesh(
new THREE.CubeGeometry(target.size.x, target.size.y, target.size.z),
material);