background preloader

Html 5

Facebook Twitter

HTML5 Presentation. In March 1936, an unusual confluence of forces occurred in Santa Clara County. A long cold winter delayed the blossoming of the millions of cherry, apricot, peach, and prune plum trees covering hundreds of square miles of the Valley floor. Then, unlike many years, the rains that followed were light and too early to knock the blossoms from their branches. Instead, by the billions, they all burst open at once.

Seemingly overnight, the ocean of green that was the Valley turned into a low, soft, dizzyingly perfumed cloud of pink and white. Uncounted bees and yellow jackets, newly born, raced out of their hives and holes, overwhelmed by this impossible banquet. Then came the wind. It roared off the Pacific Ocean, through the nearly uninhabited passes of the Santa Cruz Mountains and then, flattening out, poured down into the great alluvial plains of the Valley. The HTML5 test - How well does your browser support HTML5? Manipulating video using canvas. By combining the capabilities of the video element with a canvas, you can manipulate video data in real time to incorporate a variety of visual effects to the video being displayed.

This tutorial, adapted from this blog post by Paul Rouget, demonstrates how to perform chroma-keying (also known as the "green screen effect") using JavaScript code. View this live example. The document content The XHTML document used to render this content is shown below. The key bits to take away from this are: This document establishes two canvas elements, with the IDs c1 and c2. The JavaScript code The JavaScript code in main.js consists of three methods. Initializing the chroma-key player The doLoad() method is called when the XHTML document initially loads. This code grabs references to the elements in the XHTML document that are of particular interest, namely the video element and the two canvas elements.

The timer callback Manipulating the video frame data The resulting image looks like this: See also.

Dive Into HTML5.