DHTML Lab - dhtmlab.com - Smooth animation using DHTML | 12 | WebReference

DHTML Lab - dhtmlab.com - Smooth animation using DHTML | 12

Logo

Smooth animation using DHTML
all tests


This page holds links to all test I've used. They will open in a small browser window sized to give approximately the same canvas size that I used in my tests.

Date() creation test

A small script that times how quickly the system creates 10,000 Date() objects. "Start test" starts the test, when it's finished the time elapsed is shown in the input field.

Open in sized window

setTimeout() animation test

This is the first test I created, using setTimeout() to do the delay/animation. The delay setting in this example test is set to 10ms.

Open in sized window

setInterval() animation test

This is the second test, using setInterval() to do the same delay/animation as the first test. Again I've set the delay setting to 10ms.

Open in sized window

setInterval() speed test

This is the third test which uses setInterval() and a form to do a quick test of how short a delay I can get. In this test the delay is set to 1ms.

Open in sized window

for()-loop test

This is the fourth test which uses a for()-loop to move the layer around the browser window as quickly as possible. There's no delay. Unfortunately there's no visible movement in MSIE v4 or v5.

Open in sized window

myDelay() test

This is the last test I created. It uses my own delay function (aptly named "myDelay()") to create a delay. In this example test, the delay is set to 10ms. This specific test proved to be very unreliable across platforms and browsers. Again, there's no visible movement in MSIE.

Open in sized window

DirectAnimation test

This test was created by Jim Ley and mailed to me during the draft period of my article. It uses Microsoft DirectAnimation as a timer to control the movement of the layer, calling stepLayer() at specific intervals. Because it uses DirectAnimation it's (naturally) only usable in Microsoft Internet Explorer with the DirectAnimation component installed.

Open in sized window

Next I'll give you detailed information on all systems used.


Produced by Morten Wang and

All Rights Reserved. Legal Notices.
Created: Jan 03, 2000
Revised: Jan 03, 2000

URL: http://www.webreference.com/dhtml/column28/tests.html