标签:lock res image .com hit ide cti img cond
canvas.resize(600,400); var clkbg = new Sprite(‘https://rss.leaplearner.com/teachfiles/Media/clk_bg-03.jpg‘,0,0,600,400); var clockDial = new Circle(205,188,112); //将指针调整回零点 var hourHand = new Line(205,188,205,138); var minuteHand = new Line(205,188,205,108); var secondHand = new Line(205,188,205,88); var marks = new Sprite(‘https://rss.leaplearner.com/teachfiles/Media/clockDial1.png‘, 100, 83, 210, 210); var cat = new Sprite(‘https://rss.leaplearner.com/Image/Role/CAT3.png‘, 127, 110, 150, 160); var secondAngle = 0; var minuteAngle = 0; var hourAngle = 0; secondHand.strokeStyle = "orange"; secondHand.lineWidth = 3; minuteHand.strokeStyle = "blue"; minuteHand.lineWidth = 5; hourHand.strokeStyle = "red"; hourHand.lineWidth = 8; clockDial.strokeStyle = "black"; clockDial.fillStyle = "white"; clockDial.lineWidth = 7; secondHand.setAnchor(205,188); minuteHand.setAnchor(205,188); hourHand.setAnchor(205,188); function Main() { secondAngle += 6; if(secondAngle ==360) { secondAngle = 0; minuteAngle += 6; } if(minuteAngle == 360) { minuteAngle = 0; hourAngle += 30; } if(hourAngle == 360) { hourAngle = 0; } clkbg.draw(); clockDial.draw(); marks.draw(); cat.draw(); hourHand.rotate(hourAngle) hourHand.draw(); minuteHand.rotate(minuteAngle); minuteHand.draw(); secondHand.rotate(secondAngle); secondHand.draw(); } setInterval(Main,1000);
标签:lock res image .com hit ide cti img cond
原文地址:https://www.cnblogs.com/yan1314/p/9029431.html