3d transform in html 5 canvas
10,074
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 and
See a (stupid) JSFiddle example too!
Comments
-
Moshe Shaham almost 2 years
In html5 canvas, is it possible to take a regular 2d image and rotate it backwards so that it will create the effect of 3d surface?
I mean something very simple, just to change the angle of the perspective. Of course, I don't mean to really have a 3d surface