Р?РРРAne.jsРvar aneObj = function(){Р?this.rootx = [];Р?this.headx=[];Р?this.heady=[];Р?this.amp=" /> Р?РРРAne.jsРvar aneObj = function(){Р?this.rootx = [];Р?this.headx=[];Р?this.heady=[];Р?this.amp=" />

全文预览

多媒体技术实验报告

上传者:菩提 |  格式:doc  |  页数:24 |  大小:1200KB

文档介绍
script" src="js/halo.js"></script>Р?<script type="text/javascript" src="js/UI.js"></script>Р</body>Р</html>РAne.jsРvar aneObj = function(){Р?this.rootx = [];Р?this.headx=[];Р?this.heady=[];Р?this.amp=[];Р?this.alpha=0;Р?this.num = 50;Р}Р// 初始化РaneObj.prototype.init = function(){Р?for (var i = 0; i < this.num; i++) {Р this.rootx[i] = i * 20 + Math.random()*20;Р this.headx[i]=this.rootx[i];Р this.heady[i]=canHeight-200+Math.random()*50;Р this.amp[i]=Math.random()*50+50;Р?}Р};Р// 绘制海葵РaneObj.prototype.draw = function(){Р?this.alpha+=deltaTime*0.001;Р?var l=Math.sin(this.alpha);//Р?ctx2.save();Р?ctx2.globalAlpha = 0.6;Р?ctx2.strokeStyle = "#3b154e";Р?ctx2.lineWidth = 20;Р?ctx2.lineCap = "round";Р?for (var i = 0; i < this.num; i++) {Р //Р ctx2.beginPath();Р ctx2.moveTo(this.rootx[i],canHeight);

收藏

分享

举报
下载此文档