feature-tapered-links-2 #22
@ -48,8 +48,8 @@ class FourDShape extends THREE.Group {
|
|||||||
makeLink(basematerial, link) {
|
makeLink(basematerial, link) {
|
||||||
const n1 = this.nodes3[link.source];
|
const n1 = this.nodes3[link.source];
|
||||||
const n2 = this.nodes3[link.target];
|
const n2 = this.nodes3[link.target];
|
||||||
const s1 = n1.scale;
|
const s1 = this.link_scale * n1.scale;
|
||||||
const s2 = n2.scale;
|
const s2 = this.link_scale * n2.scale;
|
||||||
const length = n1.v3.distanceTo(n2.v3);
|
const length = n1.v3.distanceTo(n2.v3);
|
||||||
const centre = new THREE.Vector3();
|
const centre = new THREE.Vector3();
|
||||||
centre.lerpVectors(n1.v3, n2.v3, 0.5);
|
centre.lerpVectors(n1.v3, n2.v3, 0.5);
|
||||||
@ -65,8 +65,8 @@ class FourDShape extends THREE.Group {
|
|||||||
updateLink(link, links_show) {
|
updateLink(link, links_show) {
|
||||||
const n1 = this.nodes3[link.source];
|
const n1 = this.nodes3[link.source];
|
||||||
const n2 = this.nodes3[link.target];
|
const n2 = this.nodes3[link.target];
|
||||||
const s1 = n1.scale;
|
const s1 = this.link_scale * n1.scale;
|
||||||
const s2 = n2.scale;
|
const s2 = this.link_scale * n2.scale;
|
||||||
const length = n1.v3.distanceTo(n2.v3);
|
const length = n1.v3.distanceTo(n2.v3);
|
||||||
const centre = new THREE.Vector3();
|
const centre = new THREE.Vector3();
|
||||||
centre.lerpVectors(n1.v3, n2.v3, 0.5);
|
centre.lerpVectors(n1.v3, n2.v3, 0.5);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user