Answer the question
In order to leave comments, you need to log in
How to make line thinning in canvas?
Good evening.
How can I achieve imitation of a line in three-dimensional space.
Those. so that at first the line is wider, and the further, the thinner.
I came up with the idea to write the equation of a straight line using 2 points (the beginning and end of the line), get the coordinates of all points in the range from y1 to y2, and draw a circle at the obtained points, reducing the radius by a certain number.
But maybe there is an easier way?
Answer the question
In order to leave comments, you need to log in
1) If you need 3D simulation, then maybe you need 3D (WebGL)?
2) https://projects.mariusgundersen.net/OnGameStart/#1
https://jsfiddle.net/6cnLaqnw/2/
Uses a cylinder as a primitive. In the example, MeshNormalMaterial is chosen for clarity. Take materials from here -
https://threejs.org/docs/#api/materials/Material
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question