|
<HTML>
<HEAD><TITLE>Cone lighting</TITLE></HEAD>
<SCRIPT LANGUAGE = "JavaScript">
var upDown = true;
var count = 0;
function setLight()
{ // (x,y) height light (x,y) cone target (R,G,B) %
light strong degree 0..90
// light 0: duoi_trai
pic.filters( "light" ).addCone( 0, pic.height, 0,
pic.width, pic.height/2-30, 255, 255, 255, 10, 15 );
// light 1: duoi phai
pic.filters( "light" ).addCone( pic.width,
pic.height, 0, 0, pic.height/2-30, 255, 255,0, 10, 15 );
// light 2: tren_trai
pic.filters( "light" ).addCone( 0, 0, 0,
pic.width, pic.height/2+10, 0, 255, 255, 10, 15 );
// light 3: tren phai
pic.filters( "light" ).addCone( pic.width, 0, 0,
0,pic.height/2+10, 0, 255, 0, 10, 15 );
window.setInterval( "moveLight()", 50 );
}
function moveLight()
{
count+=2;
if ( ( count % 40 ) == 0 ) upDown = !upDown;
// light source number - x,y move the light - height to
move – Absolute??
if ( upDown ) {
pic.filters( "light" ).moveLight( 0,-5,-3,0,0 );
pic.filters( "light" ).moveLight( 1,5,-3,0,0 );
}
else {
pic.filters( "light" ).moveLight( 0,5,3,0,0 );
pic.filters( "light" ).moveLight( 1,-5,3,0,0 );
}
}
</SCRIPT>
<BODY STYLE = "background-color: #000000" ONLOAD =
"setLight()">
<IMG ID = "pic" SRC = "marquee.jpg"
STYLE = "filter: light; position: absolute; left: 30;
top: 30" >
</BODY>
</HTML> |