| 131 | const box = gl.domElement.getBoundingClientRect(); |
| 132 | const blockers = screenBlockers(host); |
| 133 | const toScreen = (node: GraphNode) => { |
| 134 | scratch.point.set(node.x, node.y, node.z).project(camera); |
| 135 | return { x: box.left + ((scratch.point.x + 1) / 2) * box.width, y: box.top + ((1 - scratch.point.y) / 2) * box.height }; |
| 136 | }; |
| 137 | const measured = labelled.flatMap(({ step, index, from, to }) => { |
| 138 | const group = groups.current.get(index), label = labels.current.get(index); |
| 139 | if (!group || !label) return []; |