Created
May 31, 2020 16:28
-
-
Save xeladotbe/6921dd98715f0d22932e69a804108e63 to your computer and use it in GitHub Desktop.
This file contains hidden or 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", | |
"settings": {}, | |
"theme": "dark", | |
"import": [], | |
"resources": [], | |
"styles": {}, | |
"onMount": [], | |
"graphics": {}, | |
"commands": { | |
"Countdown": { | |
"parameters": [ | |
{ | |
"name": "seconds", | |
"default": 99, | |
"type": "number" | |
} | |
], | |
"commands": [ | |
{ | |
"type": "SetValue", | |
"property": "text", | |
"value": "${seconds}" | |
}, | |
{ | |
"when": "${seconds > 0}", | |
"type": "Sequential", | |
"commands": [ | |
{ | |
"type": "Idle", | |
"delay": 1000 | |
}, | |
{ | |
"type": "Countdown", | |
"seconds": "${seconds - 1}" | |
} | |
] | |
} | |
] | |
} | |
}, | |
"layouts": {}, | |
"mainTemplate": { | |
"parameters": [ | |
"payload" | |
], | |
"items": [ | |
{ | |
"type": "Container", | |
"width": "100vw", | |
"height": "100vh", | |
"items": [ | |
{ | |
"type": "Text", | |
"text": "", | |
"onMount": [ | |
{ | |
"type": "Countdown" | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
} |
This file contains hidden or 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", | |
"settings": {}, | |
"theme": "dark", | |
"import": [], | |
"resources": [], | |
"styles": {}, | |
"onMount": [], | |
"graphics": {}, | |
"commands": {}, | |
"layouts": {}, | |
"mainTemplate": { | |
"parameters": [ | |
"payload" | |
], | |
"items": [ | |
{ | |
"type": "Container", | |
"width": "100vw", | |
"height": "100vh", | |
"items": [ | |
{ | |
"type": "Text", | |
"text": "${Math.max(99 - Math.floor(elapsedTime / 1000), 0)}" | |
} | |
] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment