Is it possible to apply 3D transforms for the canvas? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 10

Is it possible to apply 3D transforms for the canvas?

The title is self-explanatory.

11th Dec 2018, 6:07 AM
Rowsej
Rowsej - avatar
3 Answers
+ 6
Yes it is possible. I assume that you are not talking about WebGL here soooo... For 2D canvas graphics, you should try playing with the canvas transform methods. Although there is no way to get a true perspective transform out of them, you can use shearing (the b and c components of the transform matrix). See Wikipedia to get an idea of what you can do with a shear transform. Here's the Wikipedia link: https://en.m.wikipedia.org/wiki/Transformation_matrix#Shearing
11th Dec 2018, 9:49 AM
Mad Clown
Mad Clown - avatar
+ 6
Thanks Mad Clown!
11th Dec 2018, 8:02 PM
Rowsej
Rowsej - avatar
0
yes
11th Dec 2018, 8:26 AM
Chaim
Chaim - avatar