Update analog-clock.vue

This commit is contained in:
Acid Chicken (硫酸鶏) 2018-07-18 02:04:07 +09:00 committed by GitHub
parent 14b235e3a4
commit e10de62a7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,10 @@ export default Vue.extend({
dark: { dark: {
type: Boolean, type: Boolean,
default: false default: false
},
smooth: {
type: Boolean,
default: false
} }
}, },
@ -88,13 +92,13 @@ export default Vue.extend({
}, },
hAngle(): number { hAngle(): number {
return Math.PI * (this.h % 12 + (this.m + (this.s + this.ms / 1000) / 60) / 60) / 6; return Math.PI * (this.h % 12 + (this.m + (this.s + this.ms * this.smooth / 1000) / 60) / 60) / 6;
}, },
mAngle(): number { mAngle(): number {
return Math.PI * (this.m + (this.s + this.ms / 1000) / 60) / 30; return Math.PI * (this.m + (this.s + this.ms * this.smooth / 1000) / 60) / 30;
}, },
sAngle(): number { sAngle(): number {
return Math.PI * (this.s + this.ms / 1000) / 30; return Math.PI * (this.s + this.ms * this.smooth / 1000) / 30;
}, },
graduations(): any { graduations(): any {