Rubber ball follows mouse cursor

Here is code rubber ball, it follows mouse cursor when you move.

<!DOCTYPE HTML>
<html>
  <head>
    <title>Canvas-Animaci&oacute;n</title>
    
    <script type="text/javascript">
      var x=0; //coordenada x del objeto
      var incx=10; //incremento x 
      var y=0;  //coordenada y del objeto
      var incy=5; //incremental de y
      var mouseX=0;
      var mouseY=0;
      var delay=10;
      var timer=10;
      
      function init(){
          var canvas = document.getElementById('tutorial');
//loop calls dibuja each 20 ms setInterval(dibuja,20); canvas.addEventListener('mousemove', ev_mousemove, false);
} function ev_mousemove (ev) { mouseX = ev.layerX; mouseY = ev.layerY; } function dibuja(){ var canvas = document.getElementById('tutorial'); if (canvas.getContext){ var ctx = canvas.getContext('2d'); timer+=1; ctx.fillStyle ="rgba(200,30,10,1)"; ctx.strokeStyle="#000"; delay=20-(mouseY/100); accelX=mouseX-x; accelY=mouseY-y; x+=(accelX)/delay; y+=(accelY)/delay; x+=Math.sin(timer)*accelX/5; y+=Math.sin(timer)*accelY/5; //limpia el canvas ctx.clearRect(0,0,400,400); //dibuja linea ctx.beginPath(); ctx.moveTo(200,400); ctx.lineTo(x,y); ctx.stroke(); //dibuja el circulo ctx.beginPath(); ctx.arc(x,y,50,0,Math.PI*2,true); ctx.fill(); // ctx.translate((200-mouseX)/100,0);
} } </script> <style type="text/css"> canvas { border: 1px solid black; } </style> </head> <body onload="init();"> <canvas id="tutorial" width="400" height="400"></canvas> </body> </html>

DEMO:

10 Excellent HTML5 Examples

HTML5 is a reality. With the improvements in Microsoft’s Internet Explorer 9, every major browser vendor now supports significant portions of the standard.

With this in mind, I set out to find sites that were putting HTML5 to use to producing new effects or improved user experiences. Below are ten excellent examples of sites that are using HTML5 right now.

The Bifter

The Bifter takes advantage of HTML5 scalable vector graphic (SVG) capabilities to produce a monthly comic. Be sure to check out the source code.

The Bifter

Apple

MP3 player, smartphone, and tablet powerhouse, Apple, is running HTML5 on its site. It looks beautiful.

Apple

Microsoft IE 10 Test Drive

Microsoft’s Internet Explorer 10 Test Drive site is, as you might expect, running HTML5. Check out the “Fishbowl Benchmark” — in the lower left — in a few different browsers. The results might surprise you.

Microsoft Test Drive Site

Agent 008 Ball

Agent 008 Ball is a smooth running HTML5 game from the folks at Pixel Lab.

Agent 008 Ball

Google

Surprised? Google, the top search engine, has been running HTML5 for some time.

Google

Nike Better World

This Nike micro-site makes extensive use of HTML5.

Nike Better World

Mozilla

The Mozilla Foundation, which makes Firefox, Thunderbird, and several other open web products, uses HTML5 for its site. There is even a “Demo Studio” — on the lower right — that you’ll want to check out.

Mozilla

Lommé

This sleek and modern ecommerce site runs on HTML5.

Lomme

Cherry Blossom

Cherry Blossom is the portfolio site for a cake maker in Queenstown, New Zealand.

Cherry Blossom

Kevin Roast’s Asteroids

Kevin Roast wrote this Asteroids game to learn the HTML5 canvas API.

Asteriods

Copy from http://developer.practicalecommerce.com/articles/2729-10-Excellent-HTML5-Examples

30 Examples of Websites Using HTML5

HTML5 is certainly here to stay, from a numerous list of articles, events and buzz about this latest revision of the HTML standard. Some websites using HTML5 proudly show the official logo and state the sentence “support the future now”. So to support all this buzz and the technology we decided to gather a new list showcasing websites using HTML5.

NakshArt

html502

Mat Tomaszewski

html503

welcomebrand

html504

layer 51

html505

Stockholm Hairdresser

html506

Furnace

html507

Virtuti Design

html508

Lifefroots

html509

Float Left

html510

Daniel Scholten

html511

AX Visual Design Studio

html512

robedwards.org

html513

Festival Mundo

html514

The Squad

html515

S5 Style

html516

Bifter SVG Comic

html517

Fidiz

html518

Push

html519

re:play

html520

Blink Lab

html521

Joe Critchley

html522

Lexways

html523

ar-com.co.uk

html524

Kiran Owal

html501

Hallzzz

html525

Birrificio Irpino

html526

Empire State Recordings

html527

McKinney

html528

weluse

html529

Myke Preusss

html530

Source:

HTML5 Gallery
HTML5 Websites

Copy from http://webdesignledger.com/inspiration/30-examples-of-websites-using-html5

21 Ridiculously Impressive HTML5 Canvas Experiments

HTML5 is the thing to talk about these day. Today, we have a collection of some ridiculously impressive HTML5 canvas-based experiments that will make you say, “Wow!” Let’s take a peek at some of the latest, cutting edge examples out there.


1. 8 Bit Color Cycle

HTML5 Examples

2. Particle Letter Animation

HTML5 Examples

3. Cloth Experiment

This is one of the best canvas-based experiments.

HTML5 Examples

4. Particle System

This is one of my favorites — absolutely amazing!

HTML5 Examples

5. Strange Attractors

This example generates beautiful fractals, like the ones generated by Apophysis. Be sure to tick the composite :) .


6. Canvas Nebula

HTML5 Examples

7. Bomomo

HTML5 Examples

8. Liquid Particles

HTML5 Examples

9. Sinous

This is a really fun game; is it not as easy as it looks!

HTML5 Examples

10. Water in HTML5

HTML5 Examples

11. Blob

HTML5 Examples

12. Magnetic System

HTML5 Examples

13. Trail

HTML5 Examples

14. Particles

HTML5 Examples

15. Shattering Box Physics Simulation

This incredible example depicts real world physics in action.

HTML5 Examples

16. Flower Power

Try to guess the word. :P

HTML5 Examples

17. 9Elements Particle Play

This is a beautiful example which demonstrates audio and canvas in action.

HTML5 Examples

18. Beauty of Maths

HTML5 Examples

19. Tree

HTML5 Examples

20. Cloth Simulation

HTML5 Examples

21. Arcade Fire

HTML5 Examples

So what do you think? Getting your own ideas for a neat canvas application? Well, now you have more than one reason to create HTML5 appsCodeCanyon just launched an HTML5 category! Have fun!

Copy from http://net.tutsplus.com/articles/web-roundups/21-ridiculously-impressive-html5-canvas-experiments/

15 Amazing Free HTML5 Templates

HTML5 is now supported by all major browsers in some form. HTML5 brings us easy ways to add videos, audio, graphics, etc. HTML5 website templates are easy to use and can be modified according to your requirements, giving your website a professional look. In this post, I collected 15 Amazing Free HTML5 Templates for download. Enjoy!

1.Free HTML5 Website Template – Art of Business

Say hello to a new free HTML5 website template from TemplateMonster – this time it’s designed for a premium business website. As every other free website template we deliver this one also has all of the PSD source files included into the download package for you to be able to fine tune the result.

free html5 template 1

Download

2.Free HTML5 Template for Design Company Website

Today we are offering you a freebie that will be quite useful – the Free HTML5 Template for a Design Company Website.

free html5 template 2

Download

3.SocialStream HTML5 and CSS3 Template

This template is all about you and your social networking live stream. It’s perfect for displaying your Twitter or  Facebook stream, or any other social networking stream you want. Included is a sample script for the Twitter search stream, but you can just replace that with your stream widget of choice.

free html5 template 3

Download

4.Rock Your Music Project with Free HTML5 Website Template

For all music fans and all those who are death on music beats we present today’s freebie – Free HTML5 Website Template for Music Site. If you are keen on music and want to share your passion with everyone,
here is a good chance to do it.

free html5 template 4

Download

5.Free Business Website Template – Top-Notch Idea for Your Project

Today we launch another freebie – Free Business Website Template. It can be undoubtedly helpful for those who want to create the online web presence and share their business experience with others.

free html5 template 5

Download

6.CoffeeCols HTML5 and CSS3 Multi-Column Magazine Style Template

CoffeeCols is a fun, creative magazine style template that uses equal boxes on the home page to make content stand out. The boxes line themselves up and space themselves out regardless of how many you have,
so you never have to deal with that. Because the style of the home page can’t really be used on inner pages, this template also comes with a template for the inner pages.

free html5 template 6

Download

7.Free HTML5 Website Template for Industrial Business

Successful website often requires a well-done design concept that can be a good start and today we present you the really cool one – Free HTML5 Website Template for Industrial Business. Using it as a basis for your online project shows you how enjoyable your job of designer actually is.

free html5 template 7

Download

8.Free Architecture Website Template to Present Your Ideas Effectively

Today let’s speak about the success of your web presence. Its main goal is to communicate your business ideas to your customers in the effective way and a catchy design will be of a great use here. You know
that design is the key point of the online project and today’s Free Architecture Website Template features a good one.

free html5 template 8

Download

9.Free Charity Website Template. Share Your Kindness!

Today we launch this Free Charity Website Template that can be a good start for your charity project. You can make somebody’s life better and we’ll try to help you with this noble mission.

free html5 template 9

Download

10.Free Science HTML5 Template

Hurry up to get a brand new HTML5 freebie from TemplateMonster – the Free HTML5 template for a science project or science company. The free template that you download contains all PSD graphic sources for you to be able to customize the template into whatever you like.

free html5 template 10

Download

11.ElegantPress HTML5 and CSS3 Template

ElegantPress is a variable-column HTML5 and CSS3 template that just has to be seen to be appreciated. It comes with various layouts, a jquery slider, lightbox, inbuilt web fonts, jquery gallery, jquery
jportfolio, more goodies, and even a working contact form.

free html5 template 11

Download

12.Free Website Template – Clean Red

Clean Red is another free html5 and CSS based template suitable for blogs, web design portfolios, photographers websites or generic blogs. It has a minimal, clean and usable design that would look good for any
kind of website.

free html5 template 12

Download

13.A free HTML5 and CSS3 theme

HTML5 and CS3 is hot topics for web developers right now. Especially CSS3, because it’s so much easier to build beautiful websites. HTML5 is also so much nicer than HTML4.

free html5 template 13

Download

14.Create An Elegant Website With HTML 5 And CSS3

In his article on Design Informer titled “Web Design Iterations And Algorithm,” Adit Gupta explains how we can approach a web design work and how a website project can be processed in a number of iterations
following a main algorithm. Well, generally it’s just how Adit has described.

free html5 template 14

Download

15.Free HTML5 & CSS3 Website Template – OWMX-1

OWMX-1 is a two-column blog template made purely with HTML5 & CSS3. All images are royalty free. Feel free to use it.

free html5 template 15

Download

Ping your blog, website, or RSS feed for Free Sitetag