Basically, the mechanism how the animation or something like art is working in JavaScript, in HTML. First thing, it's the same thing like how it works, the CSS in web. Basically, they will load CSS, but instead of CSS, they use the JavaScript as the input on to load it. And then it will parse the JavaScript. We created the DOM. And then from that, if you're using the canvas, the canvas will transform into something like bitmap style, bitmap type, something. And then obviously, from support, the graphical card, it will tell you it will render more smoothly, more versatile, and more faster.
And the technology behind the software in the animation that render in browser, there are two tools. One is WebGL. WebGL is just like web graphical library that can be rendered the high performance of interactivity. 2D version and 3D graphics. And then the canvas is only part of the HTML that allow for dynamic scriptable rendering of the 2D and 3D shapes, curves, something like that. And the difference between those tools, when you use the canvas, you can just imagine like when you painting in white paper canvas, something like that. You can just imagine, make some imagination. But if you know how to use your paint, use your pencil, the paint will be going to be good. If you trying to understand WebGL, WebGL is something like when you make some animation, but in WebGL, it has more a lot of effects.
It's more like to the next level or the next effect in Hollywood cinematic, something like that. Which means that both is kind of having the same mission to make some animation, but it's going to have two different styles. How they render the animation in the browser as well. The art in JavaScript is getting more and more diverse. The tools, these days, are getting more and more rich, versatile and so diverse. For example, if you want to create some animation for the animate style, you can just use the Animate.js. And then the newer version came out, the new tools, Trash.js is coming from Vue. You can create animation, 3D animation using the Vue.js with Trash.js. But obviously, in here, we are using the canvas only. How to see we can create something beautiful with only the canvas. And obviously, GSAP is also really powerful as well.
Comments