So you started moving an object on your canvas by manipulating vx and vy, i.e., velocity on the x and y axis. But then, you just realized that in real world scenarios the speed of an object reduces with time, if there’s no continuous acceleration. Even with an acceleration of X, there will be some friction faced counter-affecting the acceleration.
Author: Rishabh
Controlling the Frame Rate with requestAnimationFrame
Limiting the frame rate while using requestAnimationFrame can be a common want especially when coding Games where you want your animations and mechanics to not exceed a particular mark of frames per second. Let’s go through 2 ways of doing it.
Continue reading “Controlling the Frame Rate with requestAnimationFrame”
Basics of Implementing Gravity with HTML5 Canvas

When creating some canvas experiments like a particle emission system or a game, gravity can be a key feature to implement. Figuring out how to implement gravity on an object in terms of coding can be a bit confusing. We’ll try to comprehend it, by putting it into code in a simplified manner. I liek simplicity!
Continue reading “Basics of Implementing Gravity with HTML5 Canvas”
HTML5 Canvas Particles Fountain Explosion with Gravity
One of my previous posts talked about implementing gravity in our canvas experiments. Eventually, we made a realistic bouncing ball. We’ll kind of extend that experiment to make a quick fountain explosion on canvas obeying gravity.
Continue reading “HTML5 Canvas Particles Fountain Explosion with Gravity”
Drawing Text on HTML5 Canvas

Writing Text on canvas is pretty straightforward. All we need to know about is certain properties and methods that are pre-defined on the canvas’s context. You can draw/write all unicode characters using the related methods.
WebSocket Traffic Inspection in Chrome Developer Tools
Just like debugging any other thing, doing the same for websocket traffic can be really useful. Not sure if firebug does that, but inspecting your websocket traffic in chrome dev tools is definitely possible.
Continue reading “WebSocket Traffic Inspection in Chrome Developer Tools”
Image Zoom Magnifying Glass Effect with CSS3 and jQuery

Ever wanted to add a magnifying glass effect to your product images for an awesome zoom-in and a great user experience ? You’ll be surprised to know that using CSS3 and jQuery, it’s really easy to integrate this effect to your website or webapp.
Continue reading “Image Zoom Magnifying Glass Effect with CSS3 and jQuery”
