Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "SLOBS": {
- "setupItems": [
- ],
- "contentItems": [
- {"type":"text","variable":"questionText","label":"Question"},
- {"type":"text","variable":"selectedFont","label":"Font"},
- {"type":"range","variable":"fontSize","label":"Font Size","min":10,"max":100,"description":"Font Size"},
- {"type":"text","variable":"backgroundColor","label":"Background Color"},
- {"type":"text","variable":"tickerSpeed","label":"Ticker speed"},
- {"type":"range","variable":"bucketCount","label":"Buckets","min":1,"max":10,"description":""},
- {"type":"repeater","count":"$bucketCount","variablePrefix":"bucket","variable":"index","items":[
- {"type":"text","variable":"options","label":"Accaptable options(s)"},
- {"type":"text","variable":"name","label":"Name"},
- {"type":"text","variable":"color","label":"Color"},
- {"type":"boolean","variable":"correct","label":"Is this correct?"}
- ]}
- ],
- "playbackItems": [
- {"type":"commandButton","command":"question","name":"QUESTION","description":"Demo: QUESTION."},
- {"type":"commandButton","command":"raffle","name":"RAFFLE","description":"Demo: RAFFLE."}
- ]
- },
- "variables": {
- "bucketCount": 2,
- "tickerSpeed": "40",
- "backgroundColor": "red",
- "fontSize": 15,
- "questionText": "Write a question",
- "selectedFont": "Roboto",
- "bucket-0-options": "a",
- "bucket-0-name": "First bucket",
- "bucket-0-color": "green",
- "bucket-0-correct": "true",
- "bucket-1-options": "b",
- "bucket-1-name": "Second bucket",
- "bucket-1-color": "red",
- "bucket-1-correct": "true"
- },
- "width":800,
- "height":450,
- "slots":{
- "background":{"z":0,"x":0,"y":0,"width":800,"height":450},
- "overlay":{"z":1,"x":200,"y":150,"width":400,"height":150}
- },
- "assets":[],
- "fonts":[
- {"family":"${variable('selectedFont')}","url":""}
- ],
- "scripts": {
- "testi": "var str = ''; for (var i=0 ; i<variable('bucketCount') ; i++) { str = str + variable('bucket-' + i + '-name'); } return str;"
- },
- "contents": {
- "c1_updater": "${ widget('questionChart',{'question':'q','layout':'horizontal','bucketWidth': 100, 'bucketHeight': 100, 'content':content('bucket')})}",
- "testi": "${ state('questionBucket', {'question':'q','index':0}).percentage }",
- "bucket":"${ variable('bucket-' + args.bucket + '-name') }",
- "bucket2":"<span style='font-family:${variable('selectFont')};'>${variable('questionText')}</span> ${ script('testi') }"
- },
- "commands":{"": {
- "script":"action('next',{'command':'question'})",
- "slots": {}
- },
- "question": {
- "script":"action('transition',{'out':{'effect':'fade','time':1},'in':{'effect':'fade','time':1}});action('startQuestion',{'id':'q','bucketCount':variable('bucketCount'),'buckets':[{'score':0,'options':variable('bucket-0-options')},{'score':0,'options':variable('bucket-1-options')},{'score':0,'options':variable('bucket-2-options')},{'score':0,'options':variable('bucket-3-options')},{'score':0,'options':variable('bucket-4-options')},{'score':0,'options':variable('bucket-5-options')},{'score':0,'options':variable('bucket-6-options')},{'score':0,'options':variable('bucket-7-options')},{'score':0,'options':variable('bucket-8-options')},{'score':0,'options':variable('bucket-9-options')}]})",
- "slots": {
- "background": "${ widget('questionChart',{'question':'q','layout':'vertical','content':content('bucket')})}",
- "overlay": "<div style= 'font-size:${variable('fontSize')}px; position: fixed; left: 0; bottom: 0%; width: 100%; background-color:${variable('backgroundColor')}; padding: 20px;'>${ widget('ticker',{'content':content('bucket2'), 'speed': 40}) }</div>"
- }
- },
- "raffle": {
- "script":"action('transition',{'out':{'effect':'fade','time':1},'in':{'effect':'fade','time':1}});action('shuffle',{'id':'answerers','selection':[{'question':'q','type':'answered'}]});",
- "slots": {
- "background": "${ widget('raffle',{'shuffle':'answerers'}) }",
- "overlay": "${ state('shufflePlayer',{'shuffle':'answerers','index':0}).name }"
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement