现在的位置: 首页 > 综合 > 正文

js – 龙进运动游戏

2013年09月14日 ⁄ 综合 ⁄ 共 1596字 ⁄ 字号 评论关闭
这代码真不错,而且浏览器一点都不会卡,如何当做桌面也挺酷的。

来自: 最简论坛

<HTML>

<HEAD>
<title>beyond - Interactive DHTML art-demos</title>
<meta name="Author" content="Gerard Ferrandez at http://www.dhteumeuleu.com">
<meta http-equiv="imagetoolbar" content="no">
</HEAD>

<BODY bgColor=#000000 onresize=resize() scroll=no onload=zyva()>

<SCRIPT>
// ======================================================
//
 script: Gerard Ferrandez - Ge-1-doot - June 9, 2001
//
 news://news.leibowitz.org/nzn.fr.html
//
 We chameleon, we chameleon, we (oui!)
//
 ======================================================
window.onerror = new Function("return true")
object 
= new Array()
window.screen.bufferDepth 
= 16
var nx=0
var ny=0
var R=0
var K=0
var Oi=0
var Om=32
function ChteuMeulEu(){
with(this)with(obj){
   left
=x-r
   top
=y-r
   width
=height=r*2
   mc
=Math.cos(Oi/10)
   ms
=Math.sin(Oi/12)
   border
="RGB("+(r*.8)+","+(2*r*ms)+","+(2*r*mc)+") dotted "+(r/1.8)//+"px"
   r *= 1.06
   
if(N==0)if(++R%2==0){
    
with(object[Oi%Om]){
     r
=20
     x
=nx*0.5+mc*nx*0.25
     y
=ny*0.5+ms*ny*0.25
     obj.zIndex
=-Oi
     obj.left
=-1E6
    }

    Oi
++
   }

}

}

function resize(){
nx
=document.body.offsetWidth
ny
=document.body.offsetHeight
}

function CObj(N){
document.body.insertAdjacentHTML(
"AfterBegin","<span style='left=-10000;position:absolute;font-size:1pt'></span>")
obj 
= document.getElementsByTagName("span")
this.obj = obj[0].style
this.r=0
this.x=0
this.y=0
this.N=N
this.ChteuMeulEu = ChteuMeulEu
setInterval(
"object["+N+"].ChteuMeulEu()",64)
}


function zyva(){
resize()
for(i=0;i<Om;i++)object[i] = new CObj(i)
document.body.style.cursor
="crosshair"
}

</SCRIPT>
</BODY></HTML>

 

抱歉!评论已关闭.