When we move the center point, same thing as before, is that we've changed that bend distance, but that Ben's distance, uh, is what allows us to create the circle. Like we, we have, or at least drive the position of those, those three points, the middle point. Um, so now we've changed to spend distance. Um, we do want to put the middle handle back in the middle. Um, next time I select this thing, I, I'm going to expect the middle handle to be in the middle. So there's one last step that we have to do, which is to find the middle of the, well, we angled to the start, the angle to the end, get the middle, uh, angle of that. And then that's where the handle is going to be next time. And then we have our nice arrow that we've adjusted by dragging the middle. So I'll show you what this actually looks like. And I've kind of added some debug information here so that we can, we can actually see it happening. Uh, as I move the two shapes, that's moving the start and end. Uh, point point to the handle when we're then using the kind of the end distance to find the middle middle point of the handle.
So finding the middle of the cord between the start and end and then offsetting it by that bend distance at a perpendicular, uh, that gives us the end handle, which allows us to create a circle, which allows us to create an arc, which allows us to create our arrow. And that is how much better looking arrow is born. I'm using, using a, uh, intersections based on the, uh, that circle. So in the end you have a, an arrow tool in teal job, which is pretty good. Um, like I said, the, when this works, it works because whatever you do, it's going to look good. Um, and, uh, teal draw is as a kind of a diagramming tool, I suppose, is all about giving you a limited set of options that will always look good no matter what you do. Um, try as you might, it'll still be good.
There are other things involved in arrows that we haven't talked about. We haven't talked about these arrowheads, like these little dots here that you see. Um, we haven't talked about, uh, how we kind of pick the anchor points for, uh, for shapes, although it's pretty straight forward. If you can, if you can guess, then you probably have the right answer. Um, and we haven't talked about the kind of the, the complex state management involved in making sure that the arrows update at the right time, um, based on what's changed, it's also pretty gnarly. Um, but yeah, that is arrows in teal draw. I feel like the, uh, the hard parts at least. So thanks again for watching. Uh, you can try out our arrows and two places. First of course, tealdraw.com, um, where you can, uh, try out the, the older set of arrows that I showed, including the kind of the bendy ones that didn't really bend to a way that you'd expect them to. Uh, but since you, uh, have been kind enough to watch this, uh, this talk video, um, you can also check out the new version of our arrows that are kind of, it says beta, it's more like an alpha.
Comments