使用three.js
我正在将图像img.svg
加载到网格/行星/球体上:
function createPlanet(){
var texture = THREE.ImageUtils.loadTexture("img.svg");
texture.repeat.set( 4, 2 );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
moonMat = new THREE.MeshLambertMaterial ({
color: 0x4c00b4,
wireframe: false,
shading:THREE.FlatShading,
map:texture
});
var moonGeometry = new THREE.IcosahedronGeometry(530, 1 );
moon = new THREE.Mesh(moonGeometry, moonMat);
scene.add( moon );
}
如何添加CSS以仅应用映射到网格上的图像?