Blog about (Web-) Programming, Graphics and Games.

02.11.2010

Div sparks - Html decoration

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipisici elit
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
On the right is a Div-spark example shown, demonstrating a decoration for Html-DOM-elements. This might be used to indicate that data is generated or just for esthetic reason. :) Technically div-elements are dynamically generated via javascript, with flashing background colors. The appearance of this div-elements, the "div-sparks", is defined by following structure:
var data=[
{t:50, r:0,g:250,b:0,a:1 },
{t:200, r:0,g:0, b:0,a:0 ,spawn:1},
{t:0, r:0,g:250,b:0,a:0 }
];
where "t" stands for a duration, "r,g,b,a" define a color and the "spawn" flag starts creation of new sparks beside a current element.

Keine Kommentare: