MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / addConnection

Function addConnection

public/src/ex_file/scripts/dna.js:81–98  ·  view source on GitHub ↗
({
    pa,
    pb
  })

Source from the content-addressed store, hash-verified

79 };
80
81 const addConnection = ({
82 pa,
83 pb
84 }) => {
85 const connectionDensity = 100
86 const connectionPoints = range(connectionDensity).reduce(
87 (acc, i) => [
88 ...acc,
89 ...getPoints({
90 x: lerpMap(i, 0, connectionDensity, pa.x, pb.x),
91 y: pa.y,
92 z: lerpMap(i, 0, connectionDensity, pa.z, pb.z)
93 })
94 ],
95 []
96 );
97 allPoints = allPoints.concat(connectionPoints)
98 };
99
100 const calculateDnaPoints = () => {
101 range(360).forEach(a => {

Callers 1

calculateDnaPointsFunction · 0.85

Calls 3

rangeFunction · 0.85
getPointsFunction · 0.85
lerpMapFunction · 0.85

Tested by

no test coverage detected