D
D
d8m8n2018-04-12 14:14:58
JavaScript
d8m8n, 2018-04-12 14:14:58

JS building a route on a grid?

How best to implement the construction of a route on a grid. Example in the picture:
5acf3dbd55c17591624487.jpeg
The grid is generated and the route is built using the cursor. There can be several routes, but they do not intersect each other.
How to connect two center divs, and how to add the beginning and end of the arrow (route) to this, while maintaining the direction of the arrow?
Do you use css? Or canvas on top? Or maybe there are ready-made solutions and I didn’t search well?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2018-04-12
@d8m8n

1. The simplest - layers with transparent images of all superimposed parts of the arrow ("beginning", "end / arrow", "pass/straight" and "turn/angle" with the desired orientation) and JS.
2. SVG
3. Canvas

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question