Archive for the 'canvas' Category

Custom animated cursor via canvas

Aug 9th, 2016

Warning: don’t do this. Stop it! Just. Don’t. So there’s this hack by Ben Foxall that shows how you can escape the browser window and draw outside the page. I had to try it myself. So here comes: the animated “progress” indicator mouse cursor. Wait what? There exists the ability for your web page to […]

 

Canvas pixels #3: getUserMedia

Jun 13th, 2012

getUserMedia() is a proposal for one of the most desired device APIs that can give HTML and JS access to the user’s camera and microphone. It’s already available in Chrome Canary in the form of navigator.webkitGetUserMedia(). It’s also available in Opera without a prefix. In part #1 of this miniseries I talked about manipulating pixels […]

 

Canvas pixels #2: convolution matrix

Jun 11th, 2012

In the previous post I talked about manipulating and changing pixels in an image (using JavaScript and canvas) one at a time. We took a single pixel and messed around with its R, G, B or A values. This time let’s look into taking account not only the single pixel but the pixels around it. […]

 

Pixel manipulation in canvas

Jun 10th, 2012

Done it before with PHP, but now that JavaScript is all-powerful, let’s see how we can manipulate images in an HTML <canvas>. The demo is here. Pixel manipulation The simplest way to fiddle with image data is to take each pixel and change the value of one or more of its channels: red, green, blue […]

 

Load a photo in a canvas, then flip

May 3rd, 2008

Today our family went to the yearly photo session with the girls. We took one shot that can be looked normally, as well as upside down, so I was wondering can you flip an image using a canvas tag. Turns out, yes, you can and it’s pretty easy. » Demo is here. How to load […]

 

Canvas pie with tooltips

Mar 8th, 2008

This is very flattering: Greg Houston took my script for DIY canvas pie and added tooltips and better colors logic. Here’s the result, it’s really nice, built with some MooTools. The tooltips are not supported in <canvas> but Creg used an image that overlays the pie and set the tooltips with an image map. Clever, […]

 

Canvas pie

Feb 5th, 2008

UPDATE: Translation in Brazilian Portuguese here, thanks Maujor! OK, so you have an HTML table. Let’s turn it into a pie chart with a bit of javascript. We’ll be using the canvas tag, so the browser has to support it. For IE – well, you still have the table. That’s why we’ll call it progressive […]