Hello guys, there is a task: We need to create 2 screens on the canvas, one view from above, another perspective. In the top view you can make different shapes: parallelepiped cylinder hemisphere Also in the top view there are layers. And in the future, just the first screen is shown in 3d. So, I think that only the canvas with such functionality can not cope, can you tell me where to poke, see if anyone has come across this, thank you!

You also need to organize the functions of displacement, rotation and scaling: I chose more than 2 well-known libraries: paper.js and jcanvas? Does anyone know if they will pull on such a functional?

  • To display in 3D, and so that you can rotate the shapes, you need to use WebGL, for example, Babylon JS or Three.js , and the canvas can draw only 2D images. In one of the projects I used it like this: on canvas, figures were placed in 2D mode, and on Babylon JS they were drawn, but in 3D, the same JSON object was used for drawing (in my case, fences). - MrFylypenko 2:22 pm
  • And which library did you use to draw 2d? Do you know about paper.js can it cope with such functionality? - Konstantin Kudelko
  • @MrFylypenko does not necessarily draw three-dimensional objects only using webGL and libraries like three.js, etc., webGL and 2D context API from HTML5 are just tools for rasterizing primitives on a plane. You can safely project three-dimensional objects on the same two-dimensional canvas. you just need to be able to correctly project 3D points in 2D using, for example, matrix transformations - ampawd
  • We used AngularJS + EaselJS , I didn’t cross them ((but everything works. I didn’t hear about paper.js and jcanvas, thanks for the tip. Drawing shapes on any canvas library will not be hard 2 angles - MrFylypenko
  • I very much agree about the layers, now on the way to understanding this = / - Konstantin Kudelko

0