We have octahedron
parent
aa9cd3af6e
commit
43f4d7a1cc
11
main.js
11
main.js
|
@ -11,11 +11,12 @@ function makeLink(link_m, n1, n2) {
|
||||||
const geometry = new THREE.CylinderGeometry(LINK_SIZE, LINK_SIZE,length);
|
const geometry = new THREE.CylinderGeometry(LINK_SIZE, LINK_SIZE,length);
|
||||||
// const geometry = new THREE.SphereGeometry(LINK_SIZE);
|
// const geometry = new THREE.SphereGeometry(LINK_SIZE);
|
||||||
const cyl = new THREE.Mesh(geometry, link_m);
|
const cyl = new THREE.Mesh(geometry, link_m);
|
||||||
cyl.position.x = centre.x;
|
const pivot = new THREE.Group();
|
||||||
cyl.position.y = centre.y;
|
pivot.add(cyl);
|
||||||
cyl.position.z = centre.z;
|
pivot.position.copy(centre);
|
||||||
cyl.lookAt(n2);
|
pivot.lookAt(n2);
|
||||||
return cyl;
|
cyl.rotation.x = Math.PI / 2.0;
|
||||||
|
return pivot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue