最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

為什么不出星星

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標(biāo)題文檔</title>
</head>

<body>
<canvas id="mycanvas"></canvas>
<script>
var canvas=document.getElementById("mycanvas");
canvas.width=400;
canvas.height=400;
var context=canvas.getContext("2d");
context.fillRect(0,0,canvas.width,canvas.height);
for(var i=0;i<100;i++){
r=Math.random()*10+10;
x=Math.random()*c.width;
y=Math.random()*c.height;
rot=Math.random()*360;
drawstar(context,x,y,r,rot);
}
function drawstar(cxt,x,y,r,rot){
cxt.save();
cxt.translate(x,y);
cxt.rotate(rot/180*Math.PI);
starPath(cxt);
cxt.fillStyle="#fb3";
? ? cxt.strokeStyle="#fd5";
? ? cxt.lineWidth=3;
? ? cxt.lineJoin="round";
? ? cxt.fill();
? ? cxt.stroke();

cxt.restore();
}
function starPath(cxt){
?cxt.beginPath();
? ? ?for(var i=0;i<10;i++){
?cxt.lineTo(Math.cos((18+(i*72))*Math.PI/180)*20,-Math.sin((18+(i*72))*Math.PI/180)*0.5*20);
?cxt.lineTo(Math.cos((54+(i*72))*Math.PI/180)*20,-Math.sin((54+(i*72))*Math.PI/180)*0.5*20);

?}
? cxt.closePath();
}
</script>
</body>
</html>


正在回答

1 回答

知道了,謝謝大家


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為什么不出星星

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)