I’m looking for a pure JS library that allows to draw the mouse trail, but I cannot find anything pure but using canvas. Is there is a reason for that it could not be achieved? I’m on the wrong thoughts?
2
The reason you require Canvas is because the HTML DOM is an object model. There is not one element in HTML that allows arbitrary drawing (such as lines, per pixel, non-rectangular shapes) hence the requirement for using Canvas.
Is there is a reason that I could not be achieved?
You could achieve this by creating an image at intervals of mouse movement that is a circle with a transparent background, for example, to simulate this. But canvas makes much more sense.
11