1
0
Fork 0

Merge pull request #787 from ihewitt/master

Adjust hand lengths to be relative to tick marks
master
Gordon Williams 2021-08-12 10:31:55 +01:00 committed by GitHub
commit ac1ea15bd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ tick5.fillRect(0,0,tick5.getWidth()-1, tick5.getHeight()-1);
let tick1 = Graphics.createArrayBuffer(8,4,1,{msb:true});
tick1.fillRect(0,0,tick1.getWidth()-1, tick1.getHeight()-1);
// Adjust hand lengths to be within 'tick' points
minute_hand.width=radius-tick1.getWidth()-6;
hour_hand.width=radius-tick5.getWidth()-6;
function big_wheel_x(angle){
return clock_center.x + radius * Math.cos(angle*p180);
}