A
A
AleBenEtoDanilaIneedHelp2019-09-18 01:07:47
css
AleBenEtoDanilaIneedHelp, 2019-09-18 01:07:47

How to make lines in perspective (formula)?

Svg etc. not suitable for performance reasons. The problem is that svg is too heavy for such "sticks", it takes a long time to load, loads the processor, the animation skips if you use the img tag, for example. The image is not cached in the object tag if you ask for help from JS. I would like to do it somehow in automatic mode, without placing each stick with my hands :)
My futile attempts https://codepen.io/AleBenEtoDa...
5d815868caecb505680680.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Rustam Bainazarov, 2019-09-18
@AleBenEtoDanilaIneedHelp

But it’s better through canvas, because everything depends on the width + very dreary positioning, dimensions, adaptability, etc. But you can solve these problems with the help of media queries, fixed dimensions, of course, but this is crutches and dreary.
Well, you can trick it a bit, but it's still not very good:
You can, of course, do something from this, but it's better to do it on canvas, as I said above.

V
Vladimir Solntsev, 2019-09-18
@vladdimir

On css it will not work automatically.
You can insert a picture through the background-image property, draw svg for example.
You can draw on canvas.

X
xmoonlight, 2019-09-18
@xmoonlight

Through the canvas, definitely, it will be the easiest.
Cycle with increments in X and Y and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question