Created
March 27, 2020 21:42
-
-
Save arunjeetsingh/186335e9b92e1e2be778417d4d5148a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "APL", | |
"version": "1.3", | |
"graphics": { | |
"clock": { | |
"type": "AVG", | |
"version": "1.0", | |
"parameters": [ | |
"time" | |
], | |
"width": 100, | |
"height": 100, | |
"items": [ | |
{ | |
"type": "group", | |
"description": "MinuteHand", | |
"rotation": "${Time.minutes(time) * 6}", | |
"pivotX": 50, | |
"pivotY": 50, | |
"items": { | |
"type": "path", | |
"pathData": "M48.5,7 L51.5,7 L51.5,50 L48.5,50 L48.5,7 Z", | |
"fill": "darkgray" | |
} | |
}, | |
{ | |
"type": "group", | |
"description": "HourHand", | |
"rotation": "${Time.hours(time) * 30}", | |
"pivotX": 50, | |
"pivotY": 50, | |
"items": { | |
"type": "path", | |
"pathData": "M48.5,17 L51.5,17 L51.5,50 L48.5,50 L48.5,17 Z", | |
"fill": "darkgray" | |
} | |
}, | |
{ | |
"type": "group", | |
"description": "SecondHand", | |
"rotation": "${Time.seconds(time) * 6}", | |
"pivotX": 50, | |
"pivotY": 50, | |
"items": { | |
"type": "path", | |
"pathData": "M49.5,15 L50.5,15 L50.5,60 L49.5,60 L49.5,15 Z", | |
"fill": "red" | |
} | |
}, | |
{ | |
"type": "path", | |
"description": "Cap", | |
"pathData": "M50,53 C51.656854,53 53,51.6568542 53,50 C53,48.3431458 51.656854,47 50,47 C48.343146,47 47,48.3431458 47,50 C47,51.6568542 48.343146,53 50,53 Z", | |
"fill": "#d8d8d8ff", | |
"stroke": "#e6e6e6ff", | |
"strokeWidth": 1 | |
} | |
] | |
} | |
}, | |
"mainTemplate": { | |
"parameters": [ | |
"payload" | |
], | |
"items": { | |
"type": "VectorGraphic", | |
"source": "clock", | |
"width": "100%", | |
"height": "100%", | |
"scale": "best-fit", | |
"align": "center", | |
"time": "${localTime}" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment