简体   繁体   English

线框立方体几何

[英]Wireframe cube geometry

I have just upgraded from r59 to r62 and noticed that the wireframe CubeGeometry has now rendered an extra diagonal line on each face. 我刚刚从r59升级到r62并注意到线框CubeGeometry现在在每个面上渲染了一条额外的对角线。 Is there a way to fix this? 有没有办法解决这个问题?

volumeGeometry = new THREE.CubeGeometry(w, h, depth);
volumeMaterial = new THREE.MeshBasicMaterial({
      color : 0x0099ff,
      wireframe : true
    });
volumeMesh = new THREE.Mesh(volumeGeometry, volumeMaterial);
scene.add(volumeMesh);

If all you want is a simple wireframe cube you can do this: 如果你想要的只是一个简单的线框立方体,你可以这样做:

var cube = new THREE.BoxHelper();
cube.material.color.setRGB( 1, 0, 0 );
cube.scale.set( 10, 10, 10 );
scene.add( cube );

From the shape example : 形状示例

var points = shape.createPointsGeometry();
var line = new THREE.Line( points, new THREE.LineBasicMaterial({
            color: 0xffffff
        }));
scene.add(line);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM