background preloader

Demo

Facebook Twitter

HTML5 Demos and Examples. Tutorials. Tutorials explain how to use the HTML canvas element in order to achieve a certain effect. Tutorials are grouped in to 3 skill levels: Beginner, Intermediate and Advanced. Want to get started with Mr. doob’s 3D library Three.js? Paul Lewis has created this great tutorial which will help you do just that.

In this tutorial, Paul covers the basics of three.js including setting a scene; making a mesh and adding materials and lights. If you want to get started with three.js, now’s your chance! A first step in to WebGL! Make your games perform better Get started with game programming in canvas Get started with game creation. Learn how to make awesome procedural patterns in canvas with this tutorial Build your own drawing application. Join the dots to reveal the picture, then learn how to make one yourself! Quarter circles, gradients and rounded rectangles A handy cheatsheet for WebGL Avoid your tail while eating the tasty green dots. Wave back. <html5> par l'exemple - Le site de démo des balises HTML5 et de test du support des navigateurs. 5 awesome HTML5 demos. You’ve probably seen a bunch of tutorials or articles about HTML5 on design blogs recently, but didn’t try to use it because most users will not be able to view it anyway.

Now to motivate you, I compiled a few HTML5 demos that should make you want to start learning this new markup. Be aware that you may not be able to see some of the demos. To know what elements of HTML5 your browser supports, take a look at this chart. 1. APIrocks HTML5 slideshow If you only have time to watch one of the demos suggested in this article, take a look at this great slideshow by APIrocks. 2.

Ready to see some videos in your browser with no plugin or flash required? 3. This will probably not only blow a video in your browser, it will also blow your mind. 4. The screenshot that you see under this text is taken from the Tetris 3D created in javascript by Ben Joffe using the HTML5 canvas element. 5. Another HTML5 demo using canvas, it shows you some molecules in a rotation. And much more Getting started with HTML5. My JS1K Demo - The Making Of. Now, whenever size is an issue, the best way to make a small program is to generate all data on the fly, i.e. procedurally.

This saves valuable storage space. While this might seem like a black art, often it just comes down to clever use of (high school) math. And as is often the case, the best tricks are also the simplest, as they use the least amount of code. To illustrate this, I'm going to break down my demo and show you all the major pieces and shortcuts used. Initialization JS1K's rules give you a Canvas tag to work with, so the first piece of code initializes it and makes it fill the window.

From then on, it just renders frames of the demo. Animating the wiresRotating and projecting the wires into the camera viewColoring the wiresAnimating the camera All of this is done 30 times per second, using a normal setInterval timer: setInterval(function () { ... }, 33); Drawing Wires I add a correction ratio for non-square windows and calculate a reference line width lineWidthFactor for later. Strange Attraction.