Link scaling
This commit is contained in:
parent
c8b3f1902a
commit
6728908d18
@ -48,8 +48,8 @@ class FourDShape extends THREE.Group {
|
||||
makeLink(basematerial, link) {
|
||||
const n1 = this.nodes3[link.source];
|
||||
const n2 = this.nodes3[link.target];
|
||||
const s1 = n1.scale;
|
||||
const s2 = n2.scale;
|
||||
const s1 = this.link_scale * n1.scale;
|
||||
const s2 = this.link_scale * n2.scale;
|
||||
const length = n1.v3.distanceTo(n2.v3);
|
||||
const centre = new THREE.Vector3();
|
||||
centre.lerpVectors(n1.v3, n2.v3, 0.5);
|
||||
@ -65,8 +65,8 @@ class FourDShape extends THREE.Group {
|
||||
updateLink(link, links_show) {
|
||||
const n1 = this.nodes3[link.source];
|
||||
const n2 = this.nodes3[link.target];
|
||||
const s1 = n1.scale;
|
||||
const s2 = n2.scale;
|
||||
const s1 = this.link_scale * n1.scale;
|
||||
const s2 = this.link_scale * n2.scale;
|
||||
const length = n1.v3.distanceTo(n2.v3);
|
||||
const centre = new THREE.Vector3();
|
||||
centre.lerpVectors(n1.v3, n2.v3, 0.5);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user