如何使三维模型的边框在Three.js中平滑

时间:2015-12-26 11:21:43

标签: javascript three.js

渲染3D模型时出现问题,因为网格的边框不平滑。我在混合器中添加了使用three.js和相同的模型的图像。 这是3D模型的问题吗?

 Loader = new THREE.JSONLoader(true);
 Loader.load("models/test.json", function (geometry) {
    geometry.mergeVertices();
    geometry.computeVertexNormals();
    geometry.computeFaceNormals();
    Material = new THREE.MeshLambertMaterial();
    Material.side = THREE.DoubleSide;
    Material.shading = THREE.SmoothShading;
    Mesh= new THREE.Mesh(geometry,Material);
    Mesh.doubleSided = true;
    Material.map = new THREE.ImageUtils.loadTexture("textures/pattern3.jpg");
    Material.map.wrapS = THREE.RepeatWrapping;
    Material.map.wrapT = THREE.RepeatWrapping;
    Material.map.repeat.set(2,2);
     Scene.add(Mesh);

});

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

{ antialias: true }作为参数添加到渲染器。