4

I'm trying to render my geometries without the diagonals. Here is a plane example (attached) to explain: enter image description here Left plane is what I get, right plane is what I am looking for. Is this possible anyhow?

Mia
  • 6,220
  • 12
  • 47
  • 81
  • Can't be done directly (as far as I know), but it can be done. For a plane like that a [GridHelper](http://threejs.org/docs/#Reference/Extras.Helpers/GridHelper) should do the job. Also see [Three.JS wireframe material - all polygons vs. just edges](http://stackoverflow.com/questions/20153705/three-js-wireframe-material-all-polygons-vs-just-edges) for information on doing this for box geometries. – Ken Herbert Oct 15 '14 at 00:32
  • I also found "EdgesHelper" but can't seem to got it working. – Mia Oct 15 '14 at 00:35
  • Have never used EdgesHelper myself, but I've found a few places saying that it won't work with r68. It did work up until r67 though. – Ken Herbert Oct 15 '14 at 00:51
  • Yeah, `EdgesHelper` is broken in r68, because it uses the old `Float32Attribute`. It has been [fixed for the next release](https://github.com/mrdoob/three.js/issues/5098); you can [make the fix yourself](https://github.com/mrdoob/three.js/commit/e5b1d38e1e90bc9f7b16da7c1e53e66c5e8c2178) in the meantime. – caseygrun Oct 20 '14 at 00:23

1 Answers1

2

if you going to use plane geometry, you can try out the following link...

EdgeHelper

var geometry = new THREE.PlaneGeometry(10, 10, 10,10);

var material = new THREE.MeshLambertMaterial({color:0xff0000,opacity:0.2,transparent:true,overdraw:0.5});

for (var i = 0; i < 1; i ++) { var mesh = new THREE.Mesh(geometry, material);

mesh.position.x = i*20; mesh.position.y = 0;//Math.random()*20-(1*i); mesh.position.z = 0//-59;//Math.random()*20 - 100; mesh.rotation.x = Math.random(); mesh.rotation.y = Math.random(); scene.add(mesh);

check the link..

Iam Coder
  • 993
  • 9
  • 22