feat: make some shit more prettier
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
export let from: Node;
|
||||
export let to: Node;
|
||||
|
||||
let samples = 20;
|
||||
let samples = 25;
|
||||
|
||||
const curve = new CubicBezierCurve(
|
||||
new Vector2(from.position.x + 20, from.position.y),
|
||||
@@ -31,10 +31,10 @@
|
||||
last_from_x = new_x;
|
||||
last_from_y = new_y;
|
||||
}
|
||||
curve.v0.set(from.position.x + 5, from.position.y + 5 / 8);
|
||||
curve.v1.set(from.position.x + 7, from.position.y + 5 / 8);
|
||||
curve.v0.set(from.position.x + 5, from.position.y + 0.67);
|
||||
curve.v1.set(from.position.x + 7, from.position.y + 0.67);
|
||||
curve.v2.set(to.position.x - 2, to.position.y + 2.55);
|
||||
curve.v3.set(to.position.x + 0.2, to.position.y + 2.55);
|
||||
curve.v3.set(to.position.x, to.position.y + 2.55);
|
||||
points = curve.getPoints(samples).map((p) => new Vector3(p.x, 0, p.y));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,27 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<T.Mesh>
|
||||
<MeshLineGeometry {points} />
|
||||
<MeshLineMaterial width={1} attenuate={false} color={0xffffff} />
|
||||
<T.Mesh
|
||||
position.x={from.position.x + 5}
|
||||
position.z={from.position.y + 0.67}
|
||||
position.y={0.8}
|
||||
rotation.x={-Math.PI / 2}
|
||||
>
|
||||
<T.CircleGeometry args={[0.1, 32]} />
|
||||
<T.MeshBasicMaterial color={0xffffff} />
|
||||
</T.Mesh>
|
||||
|
||||
<T.Mesh
|
||||
position.x={to.position.x}
|
||||
position.z={to.position.y + 2.55}
|
||||
position.y={0.8}
|
||||
rotation.x={-Math.PI / 2}
|
||||
>
|
||||
<T.CircleGeometry args={[0.1, 32]} />
|
||||
<T.MeshBasicMaterial color={0xffffff} />
|
||||
</T.Mesh>
|
||||
|
||||
<T.Mesh position.y={0.5}>
|
||||
<MeshLineGeometry {points} />
|
||||
<MeshLineMaterial width={1} attenuate={false} color={0x555555} />
|
||||
</T.Mesh>
|
||||
|
||||
Reference in New Issue
Block a user