function update(){
var nextShowTimeSeconds = getCurrentShowTimeSeconds();
var nextHours = parseInt(nextShowTimeSeconds/3600)
, nextMinutes = parseInt( (nextShowTimeSeconds-nextHours*3600)/60 )
, nextSeconds = nextShowTimeSeconds % 60;
var curHours = parseInt(curShowTimeSeconds/3600)
, curMinutes = parseInt( (curShowTimeSeconds-curHours*3600)/60 )
, curSeconds = curShowTimeSeconds % 60;
if(nextSeconds != curSeconds){
if(parseInt(curHours/10) != parseInt(nextHours/10)){
addBalls(MARGIN_LEFT+0,MARGIN_TOP,parseInt(curHours/10));
}
if(parseInt(curHours%10) != parseInt(nextHours%10)){
addBalls(MARGIN_LEFT+15*(RADIUS+1),MARGIN_TOP,parseInt(curHours/10));
}
if(parseInt(curMinutes/10) != parseInt(nextMinutes/10)){
addBalls(MARGIN_LEFT+39*(RADIUS+1),MARGIN_TOP,parseInt(curMinutes/10));
}
if(parseInt(curMinutes%10) != parseInt(nextMinutes%10)){
addBalls(MARGIN_LEFT+54*(RADIUS+1),MARGIN_TOP,parseInt(curMinutes%10));
}
if(parseInt(curSeconds/10) != parseInt(nextSeconds/10)){
addBalls(MARGIN_LEFT+78*(RADIUS+1),MARGIN_TOP,parseInt(curSeconds/10));
}
if(parseInt(curSeconds%10) != parseInt(nextSeconds%10)){
addBalls(MARGIN_LEFT+93*(RADIUS+1),MARGIN_TOP,parseInt(nextSeconds%10));
}
curShowTimeSeconds = nextShowTimeSeconds;
}
updateBalls();
}
-
Notifications
You must be signed in to change notification settings - Fork 3
A small program canvas countdown project
xuqiang521/wechat
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A small program canvas countdown project
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published