var statistics = {
    labels: [{"Value":"Fake","Count":1175},{"Value":"Real","Count":823}],
    types: [{"Value":"bs","Count":623},{"Value":"bias","Count":460},{"Value":"conspiracy","Count":406},{"Value":"hate","Count":242},{"Value":"satire","Count":146},{"Value":"state","Count":121}],
    // cat conspiracy_usethis.json |jq .[].Title_without_stopwords|jq -s '.'
    titles: [  "impeachmentera,evidence,bill,clinton,still,sealed",
    "man,spoke,softly,carried,big,stick",
    "yes,creationists,real,scientists",
    "man,spoke,softly,carried,big,stick",
    "federal,judge,charges,sheriff,joe,contempt",
    "federal,judge,charges,sheriff,joe,contempt",
    "jesus,shirt,sparks,school,uproar",
    "loretta,lynch,takes,killer,cops,except,dc",
    "representative,government,thugocracy",
    "hillarys,scandals,early,years",
    "never,trumpers,must,reconsider",
    "election,crossroads,socialism,capitalism",
    "reasons,ill,vote,trump",
    "new,country,women,minorities,hit,hardest",
    "trump,vs,clinton,risk,vs,disaster",
    "gingrich,slutshames,megyn,kelly",
    "clinton,transmitted,classified,info,lawyers",
    "youtube,bans,clintons,black,son",
    "loretta,lynch,takes,killer,cops,except,dc",
    "representative,government,thugocracy",
    "hillarys,scandals,early,years",
    "never,trumpers,must,reconsider",
    "election,crossroads,socialism,capitalism",
    "reasons,ill,vote,trump",
    "new,country,women,minorities,hit,hardest",
    "trump,vs,clinton,risk,vs,disaster",
    "gingrich,slutshames,megyn,kelly",
    "youtube,bans,clintons,black,son",
    "wikileaks,bombshells,hillary,need,know",
    "fascinated,sex",
    "hillarys,emails,might,missing",
    "hillarys,emails,might,missing",
    "wikileaks,bombshells,hillary,need,know",
    "fascinated,sex",
    "meteor,space,junk,rocket,mysterious,flash,hits,siberia",
    "democrats,really,stuff,ballot,heres,answer",
    "men,cry,rape,irans,top,quran,reader",
    "democrats,really,stuff,ballot,heres,answer",
    "men,cry,rape,irans,top,quran,reader",
    "meteor,space,junk,rocket,mysterious,flash,hits,siberia",
    "bellwether,trump,kippas,outselling,hillary,yarmulkes",
    "grand,slam,fatherson,film,smash,hit,families",
    "judge,warns,dangers,appointed,judiciary",
    "grand,slam,fatherson,film,smash,hit,families",
    "judge,warns,dangers,appointed,judiciary",
    "bellwether,trump,kippas,outselling,hillary,yarmulkes",
    "show,biz,business,breakthroughs",
    "paintings,almost,one,else,seemed",
    "nato,calls,troops,faceoff,putin",
    "exrep,trump,loses,im,grabbing,musket",
    "rand,paul,returns,us,treasury",
    "nato,calls,troops,faceoff,putin",
    "exrep,trump,loses,im,grabbing,musket",
    "rand,paul,returns,us,treasury",
    "show,biz,business,breakthroughs",
    "paintings,almost,one,else,seemed",
    "world,wildlife,falls,years",
    "boycott,targets,trump,family,retail,front",
    "obamacare,tax,penalty,ill,take,millions,say",
    "yearold,hebrew,mention,jerusalem,found",
    "world,wildlife,falls,years",
    "dems,sue,gop,trumps,rigged,complaints",
    "yearold,hebrew,mention,jerusalem,found",
    "boycott,targets,trump,family,retail,front",
    "obamacare,tax,penalty,ill,take,millions,say",
    "dems,sue,gop,trumps,rigged,complaints",
    "hillary,emails,whitelisted,obamas,blackberry",
    "support,assaultweapon,ban,hits,record,low",
    "pope,god,promised,land,people,israel",
    "christs,burial,place,exposed,st,time,centuries",
    "prof,canoes,reek,genocide,white,privilege",
    "teens,walk,free,gangrape,conviction",
    "school,named,munichmassacre,mastermind",
    "russia,unveils,satan,missile",
    "check,hillarythemed,haunted,house",
    "good,samaritan,wearing,indian,headdress,disarms,gunman",
    "skype,sex,scam,fortune,built,shame",
    "cannabis,aficionados,develop,thca,crystalline,strongest,hash,world,thc",
    "egypt,says,saudi,drafts,generals,pilots,fight,alongside,syrian,army,isis",
    "readers,enraged,msm,election,reporting,misled,readers,blinded,journalistic,bigotry",
    "president,obama,makes,massive,call,illegals,vote,repercussions,sickening",
    "rosie,odonnell,leaving,country,good,shes,never,coming,back",
    "breaking,hillary,lost,black,vote,trump,going,way,white,house",
    "breaking,wikileaks,reveals,hillarys,campaign,chair,engages,satanic,rituals",
    "breaking,trump,gave,obama,horrible,news,check,pentagon",
    "blacks,liberals,want,abolish,science",
    "lot,people,us,suddenly,identifying,white",
    "feds,born,illegals,one,year,would,fill,city,size,orlando",
    "surge,migrants,illegally,crossing,usmexico,border,ahead,election",
    "hispanic,crowd,boos,marco,rubio,stage",
    "dont,root,root,root,racist,redface,team,cleveland",
    "students,protest,mikado,lack,engagement,controversial,past",
    "japans,population,declines,first,time,since",
    "chinese,immigrants,demand,protection,paris,muggers",
    "facebook,lets,advertisers,exclude,users,race",
    "media,selfdestruct,trump",
    "trump,reaches,blacks,blacks,riot,philadelphia",
    "cities,want,noncitizen,immigrants,vote",
    "illinois,senator,draws,fire,racially,charged,attack,opponents,family",
    "go,back,claim,home,kansas,lawmaker,tells,protester"
  ],
  authors: [{"date":1477440000000,"Author":1,"author_amounts":10},{"date":1477440000000,"Author":12,"author_amounts":1},{"date":1477440000000,"Author":14,"author_amounts":1},{"date":1477440000000,"Author":15,"author_amounts":1},{"date":1477440000000,"Author":21,"author_amounts":1},{"date":1477440000000,"Author":28,"author_amounts":9},{"date":1477440000000,"Author":31,"author_amounts":1},{"date":1477440000000,"Author":37,"author_amounts":2},{"date":1477440000000,"Author":38,"author_amounts":1},{"date":1477440000000,"Author":39,"author_amounts":1},{"date":1477440000000,"Author":40,"author_amounts":1},{"date":1477440000000,"Author":42,"author_amounts":1},{"date":1477440000000,"Author":44,"author_amounts":1},{"date":1477440000000,"Author":47,"author_amounts":1},{"date":1477440000000,"Author":49,"author_amounts":4},{"date":1477440000000,"Author":50,"author_amounts":1},{"date":1477440000000,"Author":51,"author_amounts":1},{"date":1477440000000,"Author":53,"author_amounts":1},{"date":1477440000000,"Author":55,"author_amounts":1},{"date":1477440000000,"Author":62,"author_amounts":1},{"date":1477440000000,"Author":63,"author_amounts":1},{"date":1477440000000,"Author":66,"author_amounts":1},{"date":1477440000000,"Author":67,"author_amounts":1},{"date":1477440000000,"Author":73,"author_amounts":1},{"date":1477440000000,"Author":74,"author_amounts":1},{"date":1477440000000,"Author":81,"author_amounts":1},{"date":1477440000000,"Author":83,"author_amounts":1},{"date":1477440000000,"Author":84,"author_amounts":1},{"date":1477440000000,"Author":86,"author_amounts":1},{"date":1477440000000,"Author":87,"author_amounts":1},{"date":1477440000000,"Author":90,"author_amounts":1},{"date":1477440000000,"Author":98,"author_amounts":1},{"date":1477440000000,"Author":99,"author_amounts":1},{"date":1477440000000,"Author":100,"author_amounts":1},{"date":1477440000000,"Author":104,"author_amounts":3},{"date":1477440000000,"Author":107,"author_amounts":1},{"date":1477440000000,"Author":108,"author_amounts":1},{"date":1477440000000,"Author":111,"author_amounts":2},{"date":1477440000000,"Author":112,"author_amounts":1},{"date":1477440000000,"Author":114,"author_amounts":1},{"date":1477440000000,"Author":116,"author_amounts":1},{"date":1477440000000,"Author":122,"author_amounts":1},{"date":1477440000000,"Author":124,"author_amounts":1},{"date":1477440000000,"Author":137,"author_amounts":1},{"date":1477440000000,"Author":140,"author_amounts":1},{"date":1477440000000,"Author":155,"author_amounts":1},{"date":1477440000000,"Author":164,"author_amounts":1},{"date":1477440000000,"Author":166,"author_amounts":1},{"date":1477440000000,"Author":167,"author_amounts":1},{"date":1477440000000,"Author":169,"author_amounts":1},{"date":1477440000000,"Author":173,"author_amounts":2},{"date":1477440000000,"Author":176,"author_amounts":1},{"date":1477440000000,"Author":178,"author_amounts":2},{"date":1477440000000,"Author":181,"author_amounts":1},{"date":1477440000000,"Author":182,"author_amounts":1},{"date":1477440000000,"Author":183,"author_amounts":2},{"date":1477440000000,"Author":185,"author_amounts":1},{"date":1477440000000,"Author":186,"author_amounts":1},{"date":1477440000000,"Author":190,"author_amounts":1},{"date":1477440000000,"Author":192,"author_amounts":1},{"date":1477440000000,"Author":197,"author_amounts":1},{"date":1477440000000,"Author":198,"author_amounts":1},{"date":1477440000000,"Author":203,"author_amounts":5},{"date":1477440000000,"Author":208,"author_amounts":1},{"date":1477440000000,"Author":212,"author_amounts":1},{"date":1477440000000,"Author":214,"author_amounts":1},{"date":1477440000000,"Author":219,"author_amounts":1},{"date":1477440000000,"Author":221,"author_amounts":1},{"date":1477440000000,"Author":225,"author_amounts":12},{"date":1477440000000,"Author":227,"author_amounts":1},{"date":1477440000000,"Author":228,"author_amounts":1},{"date":1477440000000,"Author":229,"author_amounts":1},{"date":1477440000000,"Author":234,"author_amounts":1},{"date":1477440000000,"Author":237,"author_amounts":1},{"date":1477440000000,"Author":238,"author_amounts":5},{"date":1477440000000,"Author":239,"author_amounts":1},{"date":1477440000000,"Author":247,"author_amounts":1},{"date":1477440000000,"Author":256,"author_amounts":2},{"date":1477440000000,"Author":262,"author_amounts":1},{"date":1477440000000,"Author":263,"author_amounts":1},{"date":1477440000000,"Author":265,"author_amounts":1},{"date":1477440000000,"Author":266,"author_amounts":1},{"date":1477440000000,"Author":271,"author_amounts":1},{"date":1477440000000,"Author":272,"author_amounts":62},{"date":1477440000000,"Author":276,"author_amounts":1},{"date":1477440000000,"Author":280,"author_amounts":1},{"date":1477440000000,"Author":281,"author_amounts":1},{"date":1477440000000,"Author":287,"author_amounts":1},{"date":1477440000000,"Author":292,"author_amounts":1},{"date":1477440000000,"Author":300,"author_amounts":1},{"date":1477440000000,"Author":303,"author_amounts":2},{"date":1477440000000,"Author":305,"author_amounts":1},{"date":1477440000000,"Author":306,"author_amounts":2},{"date":1477440000000,"Author":307,"author_amounts":2},{"date":1477440000000,"Author":310,"author_amounts":1},{"date":1477440000000,"Author":311,"author_amounts":1},{"date":1477440000000,"Author":315,"author_amounts":1},{"date":1477440000000,"Author":317,"author_amounts":1},{"date":1477440000000,"Author":318,"author_amounts":1},{"date":1477440000000,"Author":320,"author_amounts":2},{"date":1477440000000,"Author":322,"author_amounts":1},{"date":1477440000000,"Author":325,"author_amounts":2},{"date":1477440000000,"Author":333,"author_amounts":1},{"date":1477440000000,"Author":341,"author_amounts":1},{"date":1477440000000,"Author":342,"author_amounts":1},{"date":1477440000000,"Author":348,"author_amounts":1},{"date":1477440000000,"Author":359,"author_amounts":1},{"date":1477440000000,"Author":360,"author_amounts":1},{"date":1477440000000,"Author":365,"author_amounts":1},{"date":1477440000000,"Author":366,"author_amounts":1},{"date":1477440000000,"Author":368,"author_amounts":1},{"date":1477440000000,"Author":374,"author_amounts":1},{"date":1477440000000,"Author":377,"author_amounts":1},{"date":1477440000000,"Author":381,"author_amounts":1},{"date":1477440000000,"Author":387,"author_amounts":1},{"date":1477440000000,"Author":390,"author_amounts":18},{"date":1477440000000,"Author":420,"author_amounts":1},{"date":1477440000000,"Author":426,"author_amounts":1},{"date":1477526400000,"Author":1,"author_amounts":48},{"date":1477526400000,"Author":9,"author_amounts":8},{"date":1477526400000,"Author":10,"author_amounts":1},{"date":1477526400000,"Author":13,"author_amounts":2},{"date":1477526400000,"Author":14,"author_amounts":1},{"date":1477526400000,"Author":17,"author_amounts":6},{"date":1477526400000,"Author":18,"author_amounts":1},{"date":1477526400000,"Author":24,"author_amounts":1},{"date":1477526400000,"Author":26,"author_amounts":3},{"date":1477526400000,"Author":28,"author_amounts":9},{"date":1477526400000,"Author":36,"author_amounts":1},{"date":1477526400000,"Author":43,"author_amounts":2},{"date":1477526400000,"Author":45,"author_amounts":1},{"date":1477526400000,"Author":49,"author_amounts":2},{"date":1477526400000,"Author":60,"author_amounts":1},{"date":1477526400000,"Author":68,"author_amounts":1},{"date":1477526400000,"Author":70,"author_amounts":1},{"date":1477526400000,"Author":80,"author_amounts":2},{"date":1477526400000,"Author":81,"author_amounts":7},{"date":1477526400000,"Author":82,"author_amounts":1},{"date":1477526400000,"Author":92,"author_amounts":2},{"date":1477526400000,"Author":93,"author_amounts":4},{"date":1477526400000,"Author":110,"author_amounts":1},{"date":1477526400000,"Author":111,"author_amounts":4},{"date":1477526400000,"Author":117,"author_amounts":1},{"date":1477526400000,"Author":119,"author_amounts":2},{"date":1477526400000,"Author":122,"author_amounts":1},{"date":1477526400000,"Author":129,"author_amounts":1},{"date":1477526400000,"Author":134,"author_amounts":2},{"date":1477526400000,"Author":136,"author_amounts":1},{"date":1477526400000,"Author":144,"author_amounts":1},{"date":1477526400000,"Author":146,"author_amounts":8},{"date":1477526400000,"Author":149,"author_amounts":1},{"date":1477526400000,"Author":152,"author_amounts":1},{"date":1477526400000,"Author":155,"author_amounts":1},{"date":1477526400000,"Author":157,"author_amounts":1},{"date":1477526400000,"Author":158,"author_amounts":1},{"date":1477526400000,"Author":162,"author_amounts":2},{"date":1477526400000,"Author":171,"author_amounts":2},{"date":1477526400000,"Author":173,"author_amounts":7},{"date":1477526400000,"Author":174,"author_amounts":2},{"date":1477526400000,"Author":175,"author_amounts":1},{"date":1477526400000,"Author":177,"author_amounts":2},{"date":1477526400000,"Author":179,"author_amounts":1},{"date":1477526400000,"Author":180,"author_amounts":1},{"date":1477526400000,"Author":193,"author_amounts":2},{"date":1477526400000,"Author":205,"author_amounts":1},{"date":1477526400000,"Author":207,"author_amounts":1},{"date":1477526400000,"Author":216,"author_amounts":1},{"date":1477526400000,"Author":220,"author_amounts":2},{"date":1477526400000,"Author":223,"author_amounts":1},{"date":1477526400000,"Author":224,"author_amounts":2},{"date":1477526400000,"Author":225,"author_amounts":1},{"date":1477526400000,"Author":240,"author_amounts":2},{"date":1477526400000,"Author":242,"author_amounts":1},{"date":1477526400000,"Author":244,"author_amounts":2},{"date":1477526400000,"Author":248,"author_amounts":1},{"date":1477526400000,"Author":251,"author_amounts":2},{"date":1477526400000,"Author":253,"author_amounts":1},{"date":1477526400000,"Author":256,"author_amounts":1},{"date":1477526400000,"Author":258,"author_amounts":1},{"date":1477526400000,"Author":268,"author_amounts":1},{"date":1477526400000,"Author":272,"author_amounts":103},{"date":1477526400000,"Author":277,"author_amounts":1},{"date":1477526400000,"Author":279,"author_amounts":1},{"date":1477526400000,"Author":285,"author_amounts":3},{"date":1477526400000,"Author":286,"author_amounts":1},{"date":1477526400000,"Author":290,"author_amounts":1},{"date":1477526400000,"Author":293,"author_amounts":1},{"date":1477526400000,"Author":295,"author_amounts":2},{"date":1477526400000,"Author":313,"author_amounts":1},{"date":1477526400000,"Author":316,"author_amounts":1},{"date":1477526400000,"Author":321,"author_amounts":1},{"date":1477526400000,"Author":323,"author_amounts":1},{"date":1477526400000,"Author":324,"author_amounts":1},{"date":1477526400000,"Author":326,"author_amounts":2},{"date":1477526400000,"Author":330,"author_amounts":4},{"date":1477526400000,"Author":334,"author_amounts":1},{"date":1477526400000,"Author":335,"author_amounts":1},{"date":1477526400000,"Author":343,"author_amounts":8},{"date":1477526400000,"Author":345,"author_amounts":1},{"date":1477526400000,"Author":349,"author_amounts":1},{"date":1477526400000,"Author":354,"author_amounts":1},{"date":1477526400000,"Author":356,"author_amounts":1},{"date":1477526400000,"Author":375,"author_amounts":2},{"date":1477526400000,"Author":385,"author_amounts":1},{"date":1477526400000,"Author":386,"author_amounts":1},{"date":1477526400000,"Author":390,"author_amounts":30},{"date":1477526400000,"Author":391,"author_amounts":1},{"date":1477526400000,"Author":393,"author_amounts":1},{"date":1477526400000,"Author":396,"author_amounts":1},{"date":1477526400000,"Author":398,"author_amounts":1},{"date":1477526400000,"Author":399,"author_amounts":1},{"date":1477526400000,"Author":400,"author_amounts":1},{"date":1477526400000,"Author":401,"author_amounts":1},{"date":1477526400000,"Author":403,"author_amounts":1},{"date":1477526400000,"Author":404,"author_amounts":1},{"date":1477526400000,"Author":405,"author_amounts":1},{"date":1477526400000,"Author":407,"author_amounts":1},{"date":1477526400000,"Author":409,"author_amounts":1},{"date":1477526400000,"Author":410,"author_amounts":1},{"date":1477526400000,"Author":411,"author_amounts":1},{"date":1477526400000,"Author":413,"author_amounts":2},{"date":1477526400000,"Author":414,"author_amounts":1},{"date":1477526400000,"Author":416,"author_amounts":2},{"date":1477526400000,"Author":417,"author_amounts":3},{"date":1477526400000,"Author":423,"author_amounts":2},{"date":1477526400000,"Author":424,"author_amounts":1},{"date":1477526400000,"Author":425,"author_amounts":1},{"date":1477526400000,"Author":427,"author_amounts":1},{"date":1477526400000,"Author":429,"author_amounts":1},{"date":1477526400000,"Author":430,"author_amounts":1},{"date":1477526400000,"Author":431,"author_amounts":1},{"date":1477526400000,"Author":432,"author_amounts":1},{"date":1477526400000,"Author":434,"author_amounts":1},{"date":1477526400000,"Author":436,"author_amounts":1},{"date":1477526400000,"Author":437,"author_amounts":1},{"date":1477612800000,"Author":9,"author_amounts":3},{"date":1477612800000,"Author":10,"author_amounts":2},{"date":1477612800000,"Author":12,"author_amounts":3},{"date":1477612800000,"Author":13,"author_amounts":2},{"date":1477612800000,"Author":17,"author_amounts":1},{"date":1477612800000,"Author":18,"author_amounts":2},{"date":1477612800000,"Author":25,"author_amounts":1},{"date":1477612800000,"Author":28,"author_amounts":2},{"date":1477612800000,"Author":29,"author_amounts":1},{"date":1477612800000,"Author":30,"author_amounts":1},{"date":1477612800000,"Author":34,"author_amounts":1},{"date":1477612800000,"Author":39,"author_amounts":1},{"date":1477612800000,"Author":51,"author_amounts":1},{"date":1477612800000,"Author":54,"author_amounts":2},{"date":1477612800000,"Author":64,"author_amounts":1},{"date":1477612800000,"Author":65,"author_amounts":1},{"date":1477612800000,"Author":75,"author_amounts":1},{"date":1477612800000,"Author":78,"author_amounts":1},{"date":1477612800000,"Author":81,"author_amounts":5},{"date":1477612800000,"Author":88,"author_amounts":2},{"date":1477612800000,"Author":96,"author_amounts":1},{"date":1477612800000,"Author":111,"author_amounts":1},{"date":1477612800000,"Author":115,"author_amounts":1},{"date":1477612800000,"Author":122,"author_amounts":4},{"date":1477612800000,"Author":132,"author_amounts":1},{"date":1477612800000,"Author":135,"author_amounts":1},{"date":1477612800000,"Author":138,"author_amounts":1},{"date":1477612800000,"Author":146,"author_amounts":8},{"date":1477612800000,"Author":149,"author_amounts":3},{"date":1477612800000,"Author":152,"author_amounts":1},{"date":1477612800000,"Author":153,"author_amounts":1},{"date":1477612800000,"Author":154,"author_amounts":5},{"date":1477612800000,"Author":155,"author_amounts":6},{"date":1477612800000,"Author":160,"author_amounts":1},{"date":1477612800000,"Author":163,"author_amounts":1},{"date":1477612800000,"Author":170,"author_amounts":1},{"date":1477612800000,"Author":173,"author_amounts":13},{"date":1477612800000,"Author":179,"author_amounts":1},{"date":1477612800000,"Author":184,"author_amounts":3},{"date":1477612800000,"Author":188,"author_amounts":1},{"date":1477612800000,"Author":189,"author_amounts":2},{"date":1477612800000,"Author":199,"author_amounts":1},{"date":1477612800000,"Author":201,"author_amounts":1},{"date":1477612800000,"Author":211,"author_amounts":5},{"date":1477612800000,"Author":216,"author_amounts":3},{"date":1477612800000,"Author":231,"author_amounts":1},{"date":1477612800000,"Author":241,"author_amounts":1},{"date":1477612800000,"Author":248,"author_amounts":1},{"date":1477612800000,"Author":253,"author_amounts":1},{"date":1477612800000,"Author":255,"author_amounts":1},{"date":1477612800000,"Author":256,"author_amounts":1},{"date":1477612800000,"Author":272,"author_amounts":79},{"date":1477612800000,"Author":275,"author_amounts":1},{"date":1477612800000,"Author":282,"author_amounts":1},{"date":1477612800000,"Author":285,"author_amounts":4},{"date":1477612800000,"Author":288,"author_amounts":1},{"date":1477612800000,"Author":291,"author_amounts":1},{"date":1477612800000,"Author":292,"author_amounts":1},{"date":1477612800000,"Author":297,"author_amounts":1},{"date":1477612800000,"Author":299,"author_amounts":1},{"date":1477612800000,"Author":308,"author_amounts":1},{"date":1477612800000,"Author":316,"author_amounts":1},{"date":1477612800000,"Author":321,"author_amounts":1},{"date":1477612800000,"Author":326,"author_amounts":2},{"date":1477612800000,"Author":330,"author_amounts":4},{"date":1477612800000,"Author":336,"author_amounts":1},{"date":1477612800000,"Author":340,"author_amounts":1},{"date":1477612800000,"Author":343,"author_amounts":6},{"date":1477612800000,"Author":349,"author_amounts":2},{"date":1477612800000,"Author":351,"author_amounts":2},{"date":1477612800000,"Author":352,"author_amounts":1},{"date":1477612800000,"Author":364,"author_amounts":1},{"date":1477612800000,"Author":370,"author_amounts":1},{"date":1477612800000,"Author":378,"author_amounts":1},{"date":1477612800000,"Author":386,"author_amounts":1},{"date":1477612800000,"Author":388,"author_amounts":1},{"date":1477612800000,"Author":394,"author_amounts":1},{"date":1477612800000,"Author":397,"author_amounts":1},{"date":1477612800000,"Author":415,"author_amounts":1},{"date":1477612800000,"Author":417,"author_amounts":1},{"date":1477612800000,"Author":421,"author_amounts":1},{"date":1477612800000,"Author":430,"author_amounts":3},{"date":1477612800000,"Author":437,"author_amounts":2},{"date":1477699200000,"Author":0,"author_amounts":3},{"date":1477699200000,"Author":9,"author_amounts":6},{"date":1477699200000,"Author":10,"author_amounts":1},{"date":1477699200000,"Author":13,"author_amounts":2},{"date":1477699200000,"Author":19,"author_amounts":1},{"date":1477699200000,"Author":25,"author_amounts":1},{"date":1477699200000,"Author":28,"author_amounts":17},{"date":1477699200000,"Author":81,"author_amounts":2},{"date":1477699200000,"Author":103,"author_amounts":2},{"date":1477699200000,"Author":113,"author_amounts":2},{"date":1477699200000,"Author":125,"author_amounts":1},{"date":1477699200000,"Author":143,"author_amounts":1},{"date":1477699200000,"Author":145,"author_amounts":1},{"date":1477699200000,"Author":146,"author_amounts":12},{"date":1477699200000,"Author":149,"author_amounts":2},{"date":1477699200000,"Author":172,"author_amounts":4},{"date":1477699200000,"Author":173,"author_amounts":6},{"date":1477699200000,"Author":184,"author_amounts":1},{"date":1477699200000,"Author":200,"author_amounts":1},{"date":1477699200000,"Author":206,"author_amounts":1},{"date":1477699200000,"Author":210,"author_amounts":2},{"date":1477699200000,"Author":211,"author_amounts":1},{"date":1477699200000,"Author":216,"author_amounts":1},{"date":1477699200000,"Author":249,"author_amounts":1},{"date":1477699200000,"Author":250,"author_amounts":1},{"date":1477699200000,"Author":256,"author_amounts":4},{"date":1477699200000,"Author":259,"author_amounts":1},{"date":1477699200000,"Author":272,"author_amounts":15},{"date":1477699200000,"Author":278,"author_amounts":1},{"date":1477699200000,"Author":283,"author_amounts":1},{"date":1477699200000,"Author":313,"author_amounts":1},{"date":1477699200000,"Author":326,"author_amounts":6},{"date":1477699200000,"Author":332,"author_amounts":1},{"date":1477699200000,"Author":343,"author_amounts":2},{"date":1477699200000,"Author":373,"author_amounts":1},{"date":1477699200000,"Author":376,"author_amounts":1},{"date":1477699200000,"Author":391,"author_amounts":1},{"date":1477699200000,"Author":417,"author_amounts":3},{"date":1477699200000,"Author":422,"author_amounts":2},{"date":1477699200000,"Author":430,"author_amounts":3},{"date":1477699200000,"Author":436,"author_amounts":1},{"date":1477785600000,"Author":9,"author_amounts":2},{"date":1477785600000,"Author":10,"author_amounts":1},{"date":1477785600000,"Author":11,"author_amounts":1},{"date":1477785600000,"Author":28,"author_amounts":7},{"date":1477785600000,"Author":79,"author_amounts":1},{"date":1477785600000,"Author":81,"author_amounts":8},{"date":1477785600000,"Author":109,"author_amounts":1},{"date":1477785600000,"Author":113,"author_amounts":1},{"date":1477785600000,"Author":125,"author_amounts":1},{"date":1477785600000,"Author":127,"author_amounts":1},{"date":1477785600000,"Author":142,"author_amounts":1},{"date":1477785600000,"Author":149,"author_amounts":2},{"date":1477785600000,"Author":156,"author_amounts":1},{"date":1477785600000,"Author":173,"author_amounts":5},{"date":1477785600000,"Author":213,"author_amounts":1},{"date":1477785600000,"Author":217,"author_amounts":1},{"date":1477785600000,"Author":222,"author_amounts":1},{"date":1477785600000,"Author":272,"author_amounts":7},{"date":1477785600000,"Author":277,"author_amounts":1},{"date":1477785600000,"Author":284,"author_amounts":1},{"date":1477785600000,"Author":302,"author_amounts":3},{"date":1477785600000,"Author":313,"author_amounts":1},{"date":1477785600000,"Author":314,"author_amounts":1},{"date":1477785600000,"Author":350,"author_amounts":1},{"date":1477785600000,"Author":363,"author_amounts":2},{"date":1477785600000,"Author":367,"author_amounts":1},{"date":1477785600000,"Author":417,"author_amounts":2},{"date":1477785600000,"Author":430,"author_amounts":2},{"date":1477872000000,"Author":9,"author_amounts":3},{"date":1477872000000,"Author":11,"author_amounts":1},{"date":1477872000000,"Author":17,"author_amounts":2},{"date":1477872000000,"Author":27,"author_amounts":1},{"date":1477872000000,"Author":28,"author_amounts":5},{"date":1477872000000,"Author":37,"author_amounts":2},{"date":1477872000000,"Author":65,"author_amounts":1},{"date":1477872000000,"Author":68,"author_amounts":1},{"date":1477872000000,"Author":70,"author_amounts":1},{"date":1477872000000,"Author":72,"author_amounts":1},{"date":1477872000000,"Author":77,"author_amounts":1},{"date":1477872000000,"Author":79,"author_amounts":2},{"date":1477872000000,"Author":81,"author_amounts":9},{"date":1477872000000,"Author":88,"author_amounts":1},{"date":1477872000000,"Author":91,"author_amounts":1},{"date":1477872000000,"Author":94,"author_amounts":1},{"date":1477872000000,"Author":111,"author_amounts":2},{"date":1477872000000,"Author":113,"author_amounts":1},{"date":1477872000000,"Author":118,"author_amounts":1},{"date":1477872000000,"Author":126,"author_amounts":1},{"date":1477872000000,"Author":149,"author_amounts":3},{"date":1477872000000,"Author":173,"author_amounts":3},{"date":1477872000000,"Author":191,"author_amounts":1},{"date":1477872000000,"Author":196,"author_amounts":1},{"date":1477872000000,"Author":215,"author_amounts":1},{"date":1477872000000,"Author":230,"author_amounts":1},{"date":1477872000000,"Author":254,"author_amounts":2},{"date":1477872000000,"Author":267,"author_amounts":1},{"date":1477872000000,"Author":272,"author_amounts":10},{"date":1477872000000,"Author":289,"author_amounts":1},{"date":1477872000000,"Author":296,"author_amounts":1},{"date":1477872000000,"Author":313,"author_amounts":2},{"date":1477872000000,"Author":316,"author_amounts":1},{"date":1477872000000,"Author":321,"author_amounts":1},{"date":1477872000000,"Author":326,"author_amounts":2},{"date":1477872000000,"Author":327,"author_amounts":1},{"date":1477872000000,"Author":347,"author_amounts":1},{"date":1477872000000,"Author":358,"author_amounts":1},{"date":1477872000000,"Author":371,"author_amounts":1},{"date":1477872000000,"Author":382,"author_amounts":1},{"date":1477872000000,"Author":408,"author_amounts":1},{"date":1477872000000,"Author":413,"author_amounts":4},{"date":1477872000000,"Author":417,"author_amounts":3},{"date":1477872000000,"Author":419,"author_amounts":1},{"date":1477872000000,"Author":430,"author_amounts":3},{"date":1477872000000,"Author":435,"author_amounts":1},{"date":1477958400000,"Author":28,"author_amounts":8},{"date":1477958400000,"Author":58,"author_amounts":1},{"date":1477958400000,"Author":70,"author_amounts":3},{"date":1477958400000,"Author":71,"author_amounts":1},{"date":1477958400000,"Author":76,"author_amounts":1},{"date":1477958400000,"Author":81,"author_amounts":8},{"date":1477958400000,"Author":89,"author_amounts":1},{"date":1477958400000,"Author":95,"author_amounts":1},{"date":1477958400000,"Author":101,"author_amounts":1},{"date":1477958400000,"Author":111,"author_amounts":1},{"date":1477958400000,"Author":113,"author_amounts":1},{"date":1477958400000,"Author":121,"author_amounts":4},{"date":1477958400000,"Author":149,"author_amounts":2},{"date":1477958400000,"Author":151,"author_amounts":1},{"date":1477958400000,"Author":161,"author_amounts":1},{"date":1477958400000,"Author":173,"author_amounts":6},{"date":1477958400000,"Author":195,"author_amounts":1},{"date":1477958400000,"Author":243,"author_amounts":2},{"date":1477958400000,"Author":248,"author_amounts":1},{"date":1477958400000,"Author":253,"author_amounts":1},{"date":1477958400000,"Author":272,"author_amounts":16},{"date":1477958400000,"Author":299,"author_amounts":1},{"date":1477958400000,"Author":301,"author_amounts":1},{"date":1477958400000,"Author":304,"author_amounts":1},{"date":1477958400000,"Author":313,"author_amounts":1},{"date":1477958400000,"Author":321,"author_amounts":1},{"date":1477958400000,"Author":326,"author_amounts":3},{"date":1477958400000,"Author":330,"author_amounts":3},{"date":1477958400000,"Author":344,"author_amounts":1},{"date":1477958400000,"Author":346,"author_amounts":1},{"date":1477958400000,"Author":350,"author_amounts":1},{"date":1477958400000,"Author":361,"author_amounts":1},{"date":1477958400000,"Author":395,"author_amounts":1},{"date":1477958400000,"Author":417,"author_amounts":2},{"date":1477958400000,"Author":428,"author_amounts":1},{"date":1477958400000,"Author":430,"author_amounts":6},{"date":1478044800000,"Author":3,"author_amounts":1},{"date":1478044800000,"Author":16,"author_amounts":1},{"date":1478044800000,"Author":17,"author_amounts":12},{"date":1478044800000,"Author":22,"author_amounts":1},{"date":1478044800000,"Author":28,"author_amounts":1},{"date":1478044800000,"Author":30,"author_amounts":1},{"date":1478044800000,"Author":37,"author_amounts":2},{"date":1478044800000,"Author":39,"author_amounts":1},{"date":1478044800000,"Author":58,"author_amounts":1},{"date":1478044800000,"Author":64,"author_amounts":1},{"date":1478044800000,"Author":81,"author_amounts":5},{"date":1478044800000,"Author":88,"author_amounts":1},{"date":1478044800000,"Author":101,"author_amounts":1},{"date":1478044800000,"Author":103,"author_amounts":1},{"date":1478044800000,"Author":111,"author_amounts":3},{"date":1478044800000,"Author":113,"author_amounts":8},{"date":1478044800000,"Author":120,"author_amounts":1},{"date":1478044800000,"Author":149,"author_amounts":2},{"date":1478044800000,"Author":159,"author_amounts":1},{"date":1478044800000,"Author":173,"author_amounts":3},{"date":1478044800000,"Author":226,"author_amounts":1},{"date":1478044800000,"Author":230,"author_amounts":1},{"date":1478044800000,"Author":235,"author_amounts":1},{"date":1478044800000,"Author":259,"author_amounts":2},{"date":1478044800000,"Author":272,"author_amounts":6},{"date":1478044800000,"Author":273,"author_amounts":1},{"date":1478044800000,"Author":284,"author_amounts":1},{"date":1478044800000,"Author":319,"author_amounts":1},{"date":1478044800000,"Author":324,"author_amounts":2},{"date":1478044800000,"Author":326,"author_amounts":1},{"date":1478044800000,"Author":350,"author_amounts":1},{"date":1478044800000,"Author":369,"author_amounts":1},{"date":1478044800000,"Author":389,"author_amounts":2},{"date":1478044800000,"Author":402,"author_amounts":1},{"date":1478044800000,"Author":417,"author_amounts":2},{"date":1478044800000,"Author":430,"author_amounts":2},{"date":1478131200000,"Author":9,"author_amounts":4},{"date":1478131200000,"Author":10,"author_amounts":2},{"date":1478131200000,"Author":17,"author_amounts":2},{"date":1478131200000,"Author":24,"author_amounts":1},{"date":1478131200000,"Author":71,"author_amounts":1},{"date":1478131200000,"Author":81,"author_amounts":6},{"date":1478131200000,"Author":111,"author_amounts":2},{"date":1478131200000,"Author":113,"author_amounts":5},{"date":1478131200000,"Author":128,"author_amounts":1},{"date":1478131200000,"Author":146,"author_amounts":7},{"date":1478131200000,"Author":150,"author_amounts":1},{"date":1478131200000,"Author":175,"author_amounts":1},{"date":1478131200000,"Author":188,"author_amounts":1},{"date":1478131200000,"Author":272,"author_amounts":9},{"date":1478131200000,"Author":337,"author_amounts":1},{"date":1478131200000,"Author":379,"author_amounts":1},{"date":1478131200000,"Author":380,"author_amounts":1},{"date":1478131200000,"Author":391,"author_amounts":1},{"date":1478131200000,"Author":417,"author_amounts":3},{"date":1478217600000,"Author":7,"author_amounts":1},{"date":1478217600000,"Author":9,"author_amounts":7},{"date":1478217600000,"Author":10,"author_amounts":1},{"date":1478217600000,"Author":17,"author_amounts":5},{"date":1478217600000,"Author":30,"author_amounts":1},{"date":1478217600000,"Author":32,"author_amounts":1},{"date":1478217600000,"Author":35,"author_amounts":1},{"date":1478217600000,"Author":39,"author_amounts":1},{"date":1478217600000,"Author":51,"author_amounts":1},{"date":1478217600000,"Author":59,"author_amounts":1},{"date":1478217600000,"Author":71,"author_amounts":1},{"date":1478217600000,"Author":81,"author_amounts":4},{"date":1478217600000,"Author":102,"author_amounts":1},{"date":1478217600000,"Author":103,"author_amounts":1},{"date":1478217600000,"Author":111,"author_amounts":1},{"date":1478217600000,"Author":113,"author_amounts":3},{"date":1478217600000,"Author":121,"author_amounts":2},{"date":1478217600000,"Author":194,"author_amounts":1},{"date":1478217600000,"Author":230,"author_amounts":1},{"date":1478217600000,"Author":252,"author_amounts":1},{"date":1478217600000,"Author":257,"author_amounts":1},{"date":1478217600000,"Author":259,"author_amounts":1},{"date":1478217600000,"Author":264,"author_amounts":1},{"date":1478217600000,"Author":272,"author_amounts":10},{"date":1478217600000,"Author":309,"author_amounts":1},{"date":1478217600000,"Author":316,"author_amounts":1},{"date":1478217600000,"Author":329,"author_amounts":2},{"date":1478217600000,"Author":332,"author_amounts":1},{"date":1478217600000,"Author":340,"author_amounts":1},{"date":1478217600000,"Author":372,"author_amounts":1},{"date":1478217600000,"Author":391,"author_amounts":1},{"date":1478217600000,"Author":417,"author_amounts":3},{"date":1478304000000,"Author":9,"author_amounts":5},{"date":1478304000000,"Author":17,"author_amounts":1},{"date":1478304000000,"Author":24,"author_amounts":1},{"date":1478304000000,"Author":56,"author_amounts":1},{"date":1478304000000,"Author":105,"author_amounts":1},{"date":1478304000000,"Author":113,"author_amounts":1},{"date":1478304000000,"Author":121,"author_amounts":2},{"date":1478304000000,"Author":130,"author_amounts":1},{"date":1478304000000,"Author":131,"author_amounts":2},{"date":1478304000000,"Author":146,"author_amounts":3},{"date":1478304000000,"Author":272,"author_amounts":11},{"date":1478304000000,"Author":328,"author_amounts":1},{"date":1478304000000,"Author":338,"author_amounts":1},{"date":1478304000000,"Author":355,"author_amounts":2},{"date":1478304000000,"Author":383,"author_amounts":1},{"date":1478304000000,"Author":391,"author_amounts":1},{"date":1478304000000,"Author":417,"author_amounts":3},{"date":1478390400000,"Author":5,"author_amounts":1},{"date":1478390400000,"Author":9,"author_amounts":5},{"date":1478390400000,"Author":10,"author_amounts":1},{"date":1478390400000,"Author":46,"author_amounts":1},{"date":1478390400000,"Author":71,"author_amounts":2},{"date":1478390400000,"Author":88,"author_amounts":1},{"date":1478390400000,"Author":113,"author_amounts":1},{"date":1478390400000,"Author":121,"author_amounts":2},{"date":1478390400000,"Author":131,"author_amounts":6},{"date":1478390400000,"Author":141,"author_amounts":1},{"date":1478390400000,"Author":168,"author_amounts":1},{"date":1478390400000,"Author":222,"author_amounts":1},{"date":1478390400000,"Author":270,"author_amounts":1},{"date":1478390400000,"Author":272,"author_amounts":7},{"date":1478390400000,"Author":391,"author_amounts":2},{"date":1478390400000,"Author":417,"author_amounts":2},{"date":1478476800000,"Author":3,"author_amounts":1},{"date":1478476800000,"Author":9,"author_amounts":7},{"date":1478476800000,"Author":17,"author_amounts":13},{"date":1478476800000,"Author":71,"author_amounts":1},{"date":1478476800000,"Author":72,"author_amounts":1},{"date":1478476800000,"Author":82,"author_amounts":1},{"date":1478476800000,"Author":111,"author_amounts":2},{"date":1478476800000,"Author":113,"author_amounts":2},{"date":1478476800000,"Author":121,"author_amounts":2},{"date":1478476800000,"Author":131,"author_amounts":3},{"date":1478476800000,"Author":148,"author_amounts":1},{"date":1478476800000,"Author":213,"author_amounts":1},{"date":1478476800000,"Author":272,"author_amounts":6},{"date":1478476800000,"Author":296,"author_amounts":1},{"date":1478476800000,"Author":301,"author_amounts":1},{"date":1478476800000,"Author":339,"author_amounts":1},{"date":1478476800000,"Author":417,"author_amounts":3},{"date":1478563200000,"Author":9,"author_amounts":4},{"date":1478563200000,"Author":10,"author_amounts":1},{"date":1478563200000,"Author":17,"author_amounts":2},{"date":1478563200000,"Author":20,"author_amounts":2},{"date":1478563200000,"Author":69,"author_amounts":1},{"date":1478563200000,"Author":71,"author_amounts":2},{"date":1478563200000,"Author":88,"author_amounts":1},{"date":1478563200000,"Author":111,"author_amounts":2},{"date":1478563200000,"Author":113,"author_amounts":5},{"date":1478563200000,"Author":146,"author_amounts":6},{"date":1478563200000,"Author":172,"author_amounts":1},{"date":1478563200000,"Author":175,"author_amounts":1},{"date":1478563200000,"Author":218,"author_amounts":1},{"date":1478563200000,"Author":259,"author_amounts":1},{"date":1478563200000,"Author":272,"author_amounts":10},{"date":1478563200000,"Author":294,"author_amounts":1},{"date":1478563200000,"Author":321,"author_amounts":1},{"date":1478563200000,"Author":338,"author_amounts":1},{"date":1478563200000,"Author":353,"author_amounts":1},{"date":1478563200000,"Author":392,"author_amounts":1},{"date":1478563200000,"Author":417,"author_amounts":3},{"date":1478649600000,"Author":9,"author_amounts":6},{"date":1478649600000,"Author":51,"author_amounts":2},{"date":1478649600000,"Author":71,"author_amounts":1},{"date":1478649600000,"Author":88,"author_amounts":1},{"date":1478649600000,"Author":111,"author_amounts":2},{"date":1478649600000,"Author":113,"author_amounts":3},{"date":1478649600000,"Author":121,"author_amounts":2},{"date":1478649600000,"Author":235,"author_amounts":1},{"date":1478649600000,"Author":261,"author_amounts":1},{"date":1478649600000,"Author":272,"author_amounts":24},{"date":1478649600000,"Author":274,"author_amounts":1},{"date":1478649600000,"Author":321,"author_amounts":2},{"date":1478649600000,"Author":327,"author_amounts":1},{"date":1478649600000,"Author":417,"author_amounts":5},{"date":1478736000000,"Author":20,"author_amounts":2},{"date":1478736000000,"Author":41,"author_amounts":1},{"date":1478736000000,"Author":71,"author_amounts":2},{"date":1478736000000,"Author":111,"author_amounts":1},{"date":1478736000000,"Author":113,"author_amounts":4},{"date":1478736000000,"Author":121,"author_amounts":6},{"date":1478736000000,"Author":188,"author_amounts":1},{"date":1478736000000,"Author":204,"author_amounts":1},{"date":1478736000000,"Author":253,"author_amounts":1},{"date":1478736000000,"Author":272,"author_amounts":14},{"date":1478736000000,"Author":298,"author_amounts":1},{"date":1478736000000,"Author":417,"author_amounts":3},{"date":1478822400000,"Author":8,"author_amounts":1},{"date":1478822400000,"Author":24,"author_amounts":1},{"date":1478822400000,"Author":33,"author_amounts":1},{"date":1478822400000,"Author":71,"author_amounts":2},{"date":1478822400000,"Author":111,"author_amounts":1},{"date":1478822400000,"Author":113,"author_amounts":3},{"date":1478822400000,"Author":121,"author_amounts":2},{"date":1478822400000,"Author":141,"author_amounts":1},{"date":1478822400000,"Author":152,"author_amounts":1},{"date":1478822400000,"Author":272,"author_amounts":9},{"date":1478822400000,"Author":321,"author_amounts":1},{"date":1478822400000,"Author":391,"author_amounts":1},{"date":1478822400000,"Author":417,"author_amounts":2},{"date":1478908800000,"Author":48,"author_amounts":1},{"date":1478908800000,"Author":103,"author_amounts":1},{"date":1478908800000,"Author":113,"author_amounts":6},{"date":1478908800000,"Author":123,"author_amounts":1},{"date":1478908800000,"Author":188,"author_amounts":1},{"date":1478908800000,"Author":259,"author_amounts":4},{"date":1478908800000,"Author":272,"author_amounts":8},{"date":1478908800000,"Author":412,"author_amounts":1},{"date":1478908800000,"Author":417,"author_amounts":2},{"date":1478995200000,"Author":6,"author_amounts":1},{"date":1478995200000,"Author":113,"author_amounts":5},{"date":1478995200000,"Author":222,"author_amounts":1},{"date":1478995200000,"Author":259,"author_amounts":2},{"date":1478995200000,"Author":272,"author_amounts":4},{"date":1478995200000,"Author":391,"author_amounts":1},{"date":1478995200000,"Author":417,"author_amounts":2},{"date":1479081600000,"Author":71,"author_amounts":1},{"date":1479081600000,"Author":72,"author_amounts":1},{"date":1479081600000,"Author":82,"author_amounts":1},{"date":1479081600000,"Author":113,"author_amounts":4},{"date":1479081600000,"Author":213,"author_amounts":1},{"date":1479081600000,"Author":254,"author_amounts":1},{"date":1479081600000,"Author":272,"author_amounts":18},{"date":1479081600000,"Author":296,"author_amounts":1},{"date":1479081600000,"Author":321,"author_amounts":1},{"date":1479081600000,"Author":417,"author_amounts":3},{"date":1479168000000,"Author":61,"author_amounts":1},{"date":1479168000000,"Author":71,"author_amounts":1},{"date":1479168000000,"Author":111,"author_amounts":1},{"date":1479168000000,"Author":113,"author_amounts":2},{"date":1479168000000,"Author":236,"author_amounts":1},{"date":1479168000000,"Author":272,"author_amounts":11},{"date":1479168000000,"Author":301,"author_amounts":1},{"date":1479168000000,"Author":321,"author_amounts":1},{"date":1479168000000,"Author":338,"author_amounts":2},{"date":1479168000000,"Author":417,"author_amounts":3},{"date":1479254400000,"Author":2,"author_amounts":1},{"date":1479254400000,"Author":39,"author_amounts":1},{"date":1479254400000,"Author":65,"author_amounts":1},{"date":1479254400000,"Author":71,"author_amounts":1},{"date":1479254400000,"Author":85,"author_amounts":1},{"date":1479254400000,"Author":111,"author_amounts":2},{"date":1479254400000,"Author":113,"author_amounts":1},{"date":1479254400000,"Author":188,"author_amounts":1},{"date":1479254400000,"Author":213,"author_amounts":1},{"date":1479254400000,"Author":236,"author_amounts":1},{"date":1479254400000,"Author":272,"author_amounts":11},{"date":1479254400000,"Author":321,"author_amounts":1},{"date":1479254400000,"Author":364,"author_amounts":1},{"date":1479254400000,"Author":417,"author_amounts":3},{"date":1479254400000,"Author":433,"author_amounts":1},{"date":1479340800000,"Author":48,"author_amounts":1},{"date":1479340800000,"Author":57,"author_amounts":1},{"date":1479340800000,"Author":71,"author_amounts":1},{"date":1479340800000,"Author":113,"author_amounts":1},{"date":1479340800000,"Author":142,"author_amounts":1},{"date":1479340800000,"Author":175,"author_amounts":1},{"date":1479340800000,"Author":202,"author_amounts":1},{"date":1479340800000,"Author":235,"author_amounts":1},{"date":1479340800000,"Author":259,"author_amounts":1},{"date":1479340800000,"Author":272,"author_amounts":11},{"date":1479340800000,"Author":321,"author_amounts":1},{"date":1479340800000,"Author":417,"author_amounts":3},{"date":1479427200000,"Author":13,"author_amounts":1},{"date":1479427200000,"Author":71,"author_amounts":1},{"date":1479427200000,"Author":111,"author_amounts":1},{"date":1479427200000,"Author":113,"author_amounts":1},{"date":1479427200000,"Author":245,"author_amounts":1},{"date":1479427200000,"Author":253,"author_amounts":1},{"date":1479427200000,"Author":259,"author_amounts":1},{"date":1479427200000,"Author":272,"author_amounts":11},{"date":1479427200000,"Author":284,"author_amounts":1},{"date":1479427200000,"Author":338,"author_amounts":1},{"date":1479427200000,"Author":384,"author_amounts":1},{"date":1479427200000,"Author":391,"author_amounts":1},{"date":1479427200000,"Author":406,"author_amounts":1},{"date":1479427200000,"Author":417,"author_amounts":4},{"date":1479513600000,"Author":13,"author_amounts":1},{"date":1479513600000,"Author":24,"author_amounts":1},{"date":1479513600000,"Author":65,"author_amounts":1},{"date":1479513600000,"Author":71,"author_amounts":1},{"date":1479513600000,"Author":88,"author_amounts":1},{"date":1479513600000,"Author":111,"author_amounts":1},{"date":1479513600000,"Author":133,"author_amounts":1},{"date":1479513600000,"Author":209,"author_amounts":1},{"date":1479513600000,"Author":259,"author_amounts":2},{"date":1479513600000,"Author":272,"author_amounts":3},{"date":1479513600000,"Author":417,"author_amounts":2},{"date":1479600000000,"Author":71,"author_amounts":1},{"date":1479600000000,"Author":106,"author_amounts":1},{"date":1479600000000,"Author":113,"author_amounts":5},{"date":1479600000000,"Author":272,"author_amounts":2},{"date":1479600000000,"Author":321,"author_amounts":2},{"date":1479600000000,"Author":338,"author_amounts":1},{"date":1479600000000,"Author":417,"author_amounts":2},{"date":1479686400000,"Author":13,"author_amounts":1},{"date":1479686400000,"Author":23,"author_amounts":1},{"date":1479686400000,"Author":71,"author_amounts":2},{"date":1479686400000,"Author":111,"author_amounts":3},{"date":1479686400000,"Author":113,"author_amounts":3},{"date":1479686400000,"Author":147,"author_amounts":1},{"date":1479686400000,"Author":152,"author_amounts":1},{"date":1479686400000,"Author":188,"author_amounts":1},{"date":1479686400000,"Author":222,"author_amounts":1},{"date":1479686400000,"Author":233,"author_amounts":1},{"date":1479686400000,"Author":246,"author_amounts":1},{"date":1479686400000,"Author":259,"author_amounts":1},{"date":1479686400000,"Author":260,"author_amounts":1},{"date":1479686400000,"Author":261,"author_amounts":1},{"date":1479686400000,"Author":269,"author_amounts":1},{"date":1479686400000,"Author":272,"author_amounts":7},{"date":1479686400000,"Author":294,"author_amounts":1},{"date":1479686400000,"Author":296,"author_amounts":1},{"date":1479686400000,"Author":357,"author_amounts":1},{"date":1479686400000,"Author":417,"author_amounts":3},{"date":1479772800000,"Author":4,"author_amounts":1},{"date":1479772800000,"Author":13,"author_amounts":1},{"date":1479772800000,"Author":71,"author_amounts":2},{"date":1479772800000,"Author":88,"author_amounts":1},{"date":1479772800000,"Author":111,"author_amounts":2},{"date":1479772800000,"Author":113,"author_amounts":5},{"date":1479772800000,"Author":121,"author_amounts":1},{"date":1479772800000,"Author":232,"author_amounts":1},{"date":1479772800000,"Author":272,"author_amounts":6},{"date":1479772800000,"Author":321,"author_amounts":1},{"date":1479772800000,"Author":338,"author_amounts":1},{"date":1479772800000,"Author":391,"author_amounts":1},{"date":1479772800000,"Author":417,"author_amounts":2},{"date":1479772800000,"Author":418,"author_amounts":1},{"date":1479859200000,"Author":37,"author_amounts":2},{"date":1479859200000,"Author":71,"author_amounts":1},{"date":1479859200000,"Author":97,"author_amounts":2},{"date":1479859200000,"Author":105,"author_amounts":2},{"date":1479859200000,"Author":111,"author_amounts":1},{"date":1479859200000,"Author":113,"author_amounts":5},{"date":1479859200000,"Author":139,"author_amounts":1},{"date":1479859200000,"Author":187,"author_amounts":1},{"date":1479859200000,"Author":213,"author_amounts":1},{"date":1479859200000,"Author":235,"author_amounts":1},{"date":1479859200000,"Author":246,"author_amounts":1},{"date":1479859200000,"Author":254,"author_amounts":1},{"date":1479859200000,"Author":259,"author_amounts":1},{"date":1479859200000,"Author":264,"author_amounts":1},{"date":1479859200000,"Author":272,"author_amounts":5},{"date":1479859200000,"Author":301,"author_amounts":1},{"date":1479859200000,"Author":362,"author_amounts":1},{"date":1479945600000,"Author":13,"author_amounts":1},{"date":1479945600000,"Author":71,"author_amounts":2},{"date":1479945600000,"Author":111,"author_amounts":1},{"date":1479945600000,"Author":113,"author_amounts":1},{"date":1479945600000,"Author":165,"author_amounts":1},{"date":1479945600000,"Author":259,"author_amounts":1},{"date":1479945600000,"Author":272,"author_amounts":5},{"date":1479945600000,"Author":312,"author_amounts":1},{"date":1479945600000,"Author":331,"author_amounts":4},{"date":1480032000000,"Author":39,"author_amounts":1},{"date":1480032000000,"Author":52,"author_amounts":1},{"date":1480032000000,"Author":103,"author_amounts":1},{"date":1480032000000,"Author":111,"author_amounts":1},{"date":1480032000000,"Author":113,"author_amounts":3},{"date":1480032000000,"Author":152,"author_amounts":1},{"date":1480032000000,"Author":272,"author_amounts":2},{"date":1480032000000,"Author":412,"author_amounts":2}],
};

var dataset = [
    {
        "Author": 37,
        "Published": 1477518060000,
        "Site_url": 0,
        "Type": "bias",
        "Label": "Real",
        "Title_without_stopwords": "muslims,busted,stole,millions,govt,benefits",
        "date": 1477440000000,
        "time": "21:41:00",
        "epoch": 1477518060.0
    },
    {
        "Author": 422,
        "Published": 1477730831259,
        "Site_url": 0,
        "Type": "bias",
        "Label": "Real",
        "Title_without_stopwords": "attorney,general,loretta,lynch,plead,fifth",
        "date": 1477699200000,
        "time": "08:47:11.259000",
        "epoch": 1477730831.2590000629
    },
    {
        "Author": 37,
        "Published": 1477878109479,
        "Site_url": 0,
        "Type": "bias",
        "Label": "Real",
        "Title_without_stopwords": "breaking,weiner,cooperating,fbi,hillary,email,investigation",
        "date": 1477872000000,
        "time": "01:41:49.479000",
        "epoch": 1477878109.4790000916
    },
];

dataset.sort(function(a,b) {
    if (a.epoch < b.epoch) { return -1; }
    else if (a.epoch > b.epoch) { return 1; }
    return 0;
});

function processDataSet() {
    for (var i = 0; i < dataset.length; i++) {
        var data = dataset[i];
        var title = data.Title_without_stopwords;
        var date = data.date;
        var time = data.time;
        var epoch = data.epoch;
        var label = data.Label;
        var type = data.Type;
        var siteUrl = data.Site_url;
        var published = data.Published;
        var author = data.Author;
        var titleSplit = title.split(",");
    }
}

var start      = 0;
var end        = 120;
var duration   = 120;
var layer      = 0;
var font       = "BebasNeue-Regular.ttf";

var gl = new WebGL2RenderingContext(); //enable WebGL 2 partial support

var particleMesh = void null;
function initParticles(animation) {
    particleMesh = new Mesh();

    var particleImage = new Image();
    particleImage.load("particle.png");
    particleMesh.setMaterialTexture(particleImage, 0);

    particleMesh.setFaceDrawType(POINTS);

    for (var z = 0; z < 1000; z++) {
        particleMesh.addVertex(Math.random()*60-30.0,Math.random()*50-25.0,-z/10.0+Math.random());
    }

    particleMesh.generate();
}

function deinitParticles(animation) {
    particleMesh.delete();
}

function drawParticles(animation) {
    glPushMatrix();
    perspective2dEnd();
        
    gl.enable(gl.BLEND);
    gl.disable(gl.DEPTH_TEST);
    gl.blendFunc(gl.ONE, gl.ONE);
    glColor4f(1,1,1,1);

    particleMesh.draw();
    gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
    gl.enable(gl.DEPTH_TEST);

    glPopMatrix();
}


Demo.prototype.sceneTitle = function(start, duration) {
    this.loader.addAnimation(
    {
            "start": start, "duration": duration, "layer": layer
        ,"layer": layer
        ,"text":{
                "name":font
            ,"string":"{return 'CONSPIRACY';}"
        }
        ,"scale": [{"uniform2d":10.0}]
        ,"position":[
            {"x":getScreenWidth()*0.35,"y":getScreenHeight()*0.6}
        ]
        ,"color":[{"a":0},{"duration":1,"a":255},{"duration":1-0.75},{"duration":6.5+0.25,"a":0}]
    });
    
    this.loader.addAnimation(
    {
        "start": start, "duration": duration, "layer": layer
        ,"layer": layer
        ,"text":{
            "name":font
            ,"string":"{return 'REALITIES';}"
        }
        ,"scale": [{"uniform2d":10.0}]
        ,"position":[
            {"x":getScreenWidth()*0.695,"y":getScreenHeight()*0.45}
        ]
        ,"color":[{"a":0},{"duration":1,"a":255},{"duration":3-0.75},{"duration":4.5+0.25,"a":0}]
    });
}

Demo.prototype.sceneText3d = function(start, duration) {
    globalThis.initText = function(animation) {
        var textTitles = [];
        var randoI = Math.floor(Math.random()*20);
        for(var i = 0; i < 20; i++) {
            var data = statistics.titles[(i+randoI) % statistics.titles.length];
            textTitles.push({
                position:{
                    x: Math.random() * 100 - 50,
                    y: Math.random() * 60 - 30,  
                    z: -70 + Math.random() * 6 - 3   
                },
                texts: data.split(",")
            });
        }
    
        globalThis.textObjects = [];
        for (var i = 0; i < textTitles.length; i++) {
            var textTitle = textTitles[i];
            for (var j = 0; j < textTitle.texts.length; j++) {
                var pPos = textTitle.position;
                textObjects.push({
                    text: textTitle.texts[j],
                    position:{
                        x: pPos.x + Math.random() * 4 - 2,  
                        y: pPos.y + -j*1.3,//Math.random() * 2 - 1,
                        z: pPos.z + j*0.05,
                    },
                });
            }
        }
    }
    
    globalThis.printText = function(animation) {
        glPushMatrix();
        perspective2dEnd();
            
        gl.enable(gl.BLEND);
        gl.blendFunc(gl.ONE, gl.ONE);
        gl.disable(gl.DEPTH_TEST);
    
        //glTranslatef(-0.5,0,0 + 20 * getSceneTimeFromStart()*0.1);
        //glRotatef(getSceneTimeFromStart()*30.0,0,0,-1);
        //meshDraw(tunnelMesh2.ptr, 0.0, 1.0);
    
        var drawPercent = (getSceneTimeFromStart()-animation.start)/animation.duration;
        var percentIncrement = 1.0/textObjects.length;
        for(var i = 0; i < textObjects.length; i++) {
            var opaqueI = drawPercent/percentIncrement;
            var alpha = 0;
            if (opaqueI>i) {
                alpha = Math.min((opaqueI-i)*255, 255);
            }
            var obj = textObjects[i];
            var text = new Text();
            text.setFont(font);
            text.setDefaults();
            //text.setPivot(0.5, 0.5, 0.5);
            //text.setRotation(45, 45,45);
            text.setScale(0.2, 0.2, 0.2);
            //var jiggly = Math.sin(getSceneTimeFromStart()*40.0)*0.5;
            text.setPosition(obj.position.x, obj.position.y, obj.position.z);
            //text.setCenterAlignment(true);
            text.setColor(255, 255, 255, alpha);
            text.setPerspective2d(false);
            text.setValue(obj.text);
    
            text.draw();
        }
    
        gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        gl.enable(gl.DEPTH_TEST);
    
        glPopMatrix();
    }
    
    this.loader.addAnimation([{
        "start": start, "duration": duration
        ,"layer": layer
        ,"initFunction": "{initText(animation);}"
        ,"runFunction": "{printText(animation);}"
        }]);    
}

Demo.prototype.sceneBinaryFlow = function(start, duration) {
    var a = 250;
    this.loader.addAnimation({
        "start": start, "duration": duration, "layer": layer
       ,"image": ["_embedded/defaultTransparent.png"]
       ,"shader":{"name":"randomFlow.fs"}
       ,"scale":[{"x":0.2,"y":0.4}]
       ,"position":[{"x":getScreenWidth()*0.2, "y":getScreenHeight()*0.5}]
       ,"color":[{"a":a}]
        //,"color":[{"a":0},{"duration":0.25,"a":150},{"duration":7.5},{"duration":0.25,"a":0}]
   });
   this.loader.addAnimation({
    "start": start, "duration": duration, "layer": layer
   ,"image": ["_embedded/defaultTransparent.png"]
   ,"shader":{"name":"randomFlow.fs"}
   ,"scale":[{"x":0.2,"y":0.4}]
   ,"position":[{"x":getScreenWidth()*0.5, "y":getScreenHeight()*0.5}]
   ,"color":[{"a":a}]
    //,"color":[{"a":0},{"duration":0.25,"a":150},{"duration":7.5},{"duration":0.25,"a":0}]
});
this.loader.addAnimation({
    "start": start, "duration": duration, "layer": layer
   ,"image": ["_embedded/defaultTransparent.png"]
   ,"shader":{"name":"randomFlow.fs"}
   ,"scale":[{"x":0.2,"y":0.4}]
   ,"position":[{"x":getScreenWidth()*0.8, "y":getScreenHeight()*0.5}]
   ,"color":[{"a":a}]
    //,"color":[{"a":0},{"duration":0.25,"a":150},{"duration":7.5},{"duration":0.25,"a":0}]
});
}

Demo.prototype.sceneTunnel = function(start, duration) {
    globalThis.tunnelMesh2 = void null;
    globalThis.tunnelMeshTexture = void null;
    globalThis.initTunnel = function(animation) {
        tunnelMesh2 = meshNew();
        if (tunnelMesh2.ptr === void null) {
            loggerFatal("Could not initialize Mesh");
        }
    
        tunnelMeshTexture = imageLoadImage("_embedded/defaultWhite.png");
        meshMaterialSetTexture(tunnelMesh2.ptr, tunnelMeshTexture.ptr, 0);
    
        var precision = 24;

        meshSetFaceDrawType(tunnelMesh2.ptr, TRIANGLES);
        var zStart = -10;
        var zLength = 2;
        var maxPrecision = 36.0;
        var tunnelLength = 30;
        for(var i = 0; i < tunnelLength; i++) {
            for(var j = i%2; j < maxPrecision; j+=2) {
                var radius = 4.0;
                var angle1 = (j/maxPrecision*360.0)*Math.PI/180.0;
                var angle2 = ((j+1)/maxPrecision*360.0)*Math.PI/180.0;
                var x1 = radius * Math.cos(angle1);
                var y1 = radius * Math.sin(angle1);
                var z1 = zStart - i*zLength;
                var x2 = radius * Math.cos(angle2);
                var y2 = radius * Math.sin(angle2);
                var z2 = z1 - zLength;
                var uMin = 0.0;
                var uMax = 1.0;
                var vMin = 0.0;
                var vMax = 1.0;
    
                var col = {
                    r: 1.0,
                    g: 1.0,
                    b: 0.0,
                    a: 1.0,
                };
                meshAddColor(tunnelMesh2.ptr, col.r,col.g,col.b,col.a);
                meshAddTexCoord(tunnelMesh2.ptr, uMin, vMax);
                meshAddVertex(tunnelMesh2.ptr, x1,y1,z2);
                meshAddColor(tunnelMesh2.ptr, col.r,col.g,col.b,col.a);
                meshAddTexCoord(tunnelMesh2.ptr, uMax, vMax);
                meshAddVertex(tunnelMesh2.ptr, x2,y2,z2);
                meshAddColor(tunnelMesh2.ptr, col.r,col.g,col.b,col.a);
                meshAddTexCoord(tunnelMesh2.ptr, uMin, vMin);
                meshAddVertex(tunnelMesh2.ptr, x1,y1,z1);
    
                meshAddColor(tunnelMesh2.ptr, col.r,col.g,col.b,col.a);
                meshAddTexCoord(tunnelMesh2.ptr, uMin, vMin);
                meshAddVertex(tunnelMesh2.ptr, x1,y1,z1);
                meshAddColor(tunnelMesh2.ptr, col.r,col.g,col.b,col.a);
                meshAddTexCoord(tunnelMesh2.ptr, uMax, vMax);
                meshAddVertex(tunnelMesh2.ptr, x2,y2,z2);
                meshAddColor(tunnelMesh2.ptr, col.r,col.g,col.b,col.a);
                meshAddTexCoord(tunnelMesh2.ptr, uMax, vMin);
                meshAddVertex(tunnelMesh2.ptr, x2,y2,z1);
            }
        }
        meshGenerate(tunnelMesh2.ptr);
    }
    
    globalThis.deinitTunnel = function(animation) {
        meshDelete(tunnelMesh2.ptr);
    }
    
    globalThis.drawTunnel = function(animation) {
        glPushMatrix();
        perspective2dEnd();
            
        gl.enable(gl.BLEND);
        //gl.blendFunc(gl.ONE, gl.ONE);
        gl.disable(gl.DEPTH_TEST);
    
        glTranslatef(-0.5,0,0 + 20 * getSceneTimeFromStart()*0.1);
        glRotatef(getSceneTimeFromStart()*30.0,0,0,-1);
        meshDraw(tunnelMesh2.ptr, 0.0, 1.0);
    
        gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        gl.enable(gl.DEPTH_TEST);
    
        glPopMatrix();
    }
    
    this.loader.addAnimation([{
        "start": start, "duration": duration
       ,"layer": layer
       ,"part": 1
       ,"initFunction": "{initTunnel(animation);}"
       ,"deinitFunction": "{deinitTunnel(animation);}"
       ,"runFunction": "{drawTunnel(animation);}"
   }]);
}

Demo.prototype.sceneCircle = function(start, duration) {
    Sync.addSync(
    [
        { "name":"circle:maxPrecision", "type":"rocket" },
        { "name":"circle:camZ", "type":"rocket" },
    ]);

    globalThis.circleMesh2 = void null;
    globalThis.circleMeshTexture = void null;
    circleMesh2 = meshNew();
    if (circleMesh2.ptr === void null) {
        loggerFatal("Could not initialize Mesh");
    }

    circleMeshTexture = imageLoadImage("_embedded/defaultWhite.png");
    globalThis.initCircle = function(animation) {
        meshClear(circleMesh2.ptr);
        meshMaterialSetTexture(circleMesh2.ptr, circleMeshTexture.ptr, 0);
    
        var precision = 24;

        meshSetFaceDrawType(circleMesh2.ptr, TRIANGLES);
        var zStart = -10;
        var zLength = 0;
        var maxPrecision = Sync.getSyncValue('circle:maxPrecision');
        var tunnelLength = 30;

        var baseValue = 1477440000000;
        var baseValueMax = 1480032000000;

        for (var j = 0; j < statistics.authors.length; j++) {
        //for(var j = 0; j < maxPrecision; j+=1) {
            var author = statistics.authors[j];
            var datePercent = (author.date - baseValue) / (baseValueMax - baseValue);
            var radius1 = datePercent+1.5 + author.author_amounts/10.0;
            var angle1 = (author.Author/maxPrecision*360.0)*Math.PI/180.0;
            var angle2 = ((author.Author+1)/maxPrecision*360.0)*Math.PI/180.0;
            var x1 = radius1 * Math.cos(angle1);
            var y1 = radius1 * Math.sin(angle1);
            var z1 = zStart;
            var x2 = radius1 * Math.cos(angle2);
            var y2 = radius1 * Math.sin(angle2);
            var z2 = z1 - zLength;

            var radius2 = datePercent+1.0;
            var x3 = radius2 * Math.cos(angle1);
            var y3 = radius2 * Math.sin(angle1);
            var x4 = radius2 * Math.cos(angle2);
            var y4 = radius2 * Math.sin(angle2);

            var uMin = 0.0;
            var uMax = 1.0;
            var vMin = 0.0;
            var vMax = 1.0;

            var col = {
                r: datePercent,
                g: 0.1,
                b: 0.1,
                a: 1.0,
            };
            meshAddColor(circleMesh2.ptr, col.r,col.g,col.b,col.a);
            meshAddTexCoord(circleMesh2.ptr, uMin, vMax);
            meshAddVertex(circleMesh2.ptr, x1,y1,z2);
            meshAddColor(circleMesh2.ptr, col.r,col.g,col.b,col.a);
            meshAddTexCoord(circleMesh2.ptr, uMax, vMax);
            meshAddVertex(circleMesh2.ptr, x2,y2,z2);
            meshAddColor(circleMesh2.ptr, col.r,col.g,col.b,col.a);
            meshAddTexCoord(circleMesh2.ptr, uMin, vMin);
            meshAddVertex(circleMesh2.ptr, x4,y4,z1);

            meshAddColor(circleMesh2.ptr, col.r,col.g,col.b,col.a);
            meshAddTexCoord(circleMesh2.ptr, uMin, vMin);
            meshAddVertex(circleMesh2.ptr, x3,y3,z1);
            meshAddColor(circleMesh2.ptr, col.r,col.g,col.b,col.a);
            meshAddTexCoord(circleMesh2.ptr, uMax, vMax);
            meshAddVertex(circleMesh2.ptr, x1,y1,z2);
            meshAddColor(circleMesh2.ptr, col.r,col.g,col.b,col.a);
            meshAddTexCoord(circleMesh2.ptr, uMax, vMin);
            meshAddVertex(circleMesh2.ptr, x4,y4,z1);
        }
        meshGenerate(circleMesh2.ptr);
    }
    
    globalThis.deinitCircle = function(animation) {
        meshDelete(circleMesh2.ptr);
    }
    
    globalThis.drawCircle = function(animation) {
        glPushMatrix();
        perspective2dEnd();
            
        gl.enable(gl.BLEND);
        //gl.blendFunc(gl.ONE, gl.ONE);
        gl.disable(gl.DEPTH_TEST);
    
        glTranslatef(0,0,Sync.getSyncValue('circle:camZ'));
        glRotatef(getSceneTimeFromStart()*30.0,0,0,-1);
        meshDraw(circleMesh2.ptr, 0.0, 1.0);
    
        gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        gl.enable(gl.DEPTH_TEST);
    
        glPopMatrix();
    }
    
	this.loader.addAnimation([{
        "start": start, "duration":88.2-start
       ,"layer": layer, "image": ["tex_allseeing.png"]
       ,"object":"obj_allseeing.obj"
       ,"position":[{"x":0,"y":0.3,"z":-10}]
       ,"scale":[{"uniform3d":1.0}]
       ,"angle": [{"degreesY":"{return -20*getSceneTimeFromStart();}","degreesZ":0,"degreesX":0}]
       //,"color":[{"r":255,"g":255,"b":255,"a":255}]	
   }]);

    this.loader.addAnimation([{
        "start": start, "duration": duration
       ,"layer": layer
       ,"part": 1
       ,"initFunction": "{}"
       ,"deinitFunction": "{deinitCircle(animation);}"
       ,"runFunction": "{initCircle(animation); drawCircle(animation);}"
   }]);

   Sync.addSync(
    [
        { "name":"ray:rotx", "type":"rocket" },
        { "name":"ray:roty", "type":"rocket" },
        { "name":"ray:rotz", "type":"rocket" },
        { "name":"ray:x", "type":"rocket" },
        { "name":"ray:y", "type":"rocket" },
        { "name":"ray:z", "type":"rocket" },
        { "name":"ray:pixres", "type":"rocket" },
        { "name":"ray:twistSkew", "type":"rocket" },
    ]);

   this.loader.addAnimation({
    "start": start+(88.2-start), "duration": duration
   ,"layer": layer
   ,"image": ["_embedded/defaultTransparent.png"]
   ,"shader":{"name":"raymarch.fs", "variable":[
       {"name":"scene", "type":"int", "value":[2]}
       //,{"name":"shift","value":[0.0]}
       //,{"name":"color1","value":colorSchemes[2][2]}
       //,{"name":"color2","value":colorSchemes[2][2]}
      ,{"name":"rotateDegrees","value":"{ return [Sync.getSyncValue('ray:rotx'),Sync.getSyncValue('ray:roty'),Sync.getSyncValue('ray:rotz')]}"}
      ,{"name":"movePosition","value":"{ return [Sync.getSyncValue('ray:x'),Sync.getSyncValue('ray:y'),Sync.getSyncValue('ray:z')]}"}
      ,{"name":"pixelateResolution","value":"{ return [Sync.getSyncValue('ray:pixres')]}"}
      ,{"name":"twistSkew","value":"{ return [Sync.getSyncValue('ray:twistSkew')]}"}
       ]}
   ,"color":[{"a":255}]
});  

this.loader.addAnimation({
    "start": start+(98.2-start), "duration": 0.85
   ,"layer": layer
   ,"image": ["jml_fist.png"]
   ,"color":[{"a":255}]
});  
this.loader.addAnimation(
    {
        "start": 60+50.5, "duration": 10
        ,"layer": layer
        ,"text":{
                "name":font
            ,"string":"{return 'TAKE THE RED AND WHITE PILL';}"
        }
        ,"scale": [{"uniform2d":5.0}]
        ,"position":[
            {"x":getScreenWidth()*0.5,"y":getScreenHeight()*0.5}
        ]
        ,"color":[{"a":0},{"duration":1,"a":200}]
    });

}

Demo.prototype.sceneLines = function(start, duration) {
    globalThis.lineMesh2 = void null;
    globalThis.lineMeshTexture = void null;
    lineMesh2 = meshNew();
    if (lineMesh2.ptr === void null) {
        loggerFatal("Could not initialize Mesh");
    }

    lineMeshTexture = imageLoadImage("_embedded/defaultWhite.png");
    globalThis.initLines = function(array) {
        meshClear(lineMesh2.ptr);
        meshMaterialSetTexture(lineMesh2.ptr, lineMeshTexture.ptr, 0);

        meshSetFaceDrawType(lineMesh2.ptr, TRIANGLES);

        var uMin = 0.0;
        var uMax = 1.0;
        var vMin = 0.0;
        var vMax = 1.0;

        var col = {
            r: 1.0,
            g: 1.0,
            b: 0.0,
            a: 1.0,
        };

        var thickness = 10;

        var x1 = null;
        var y1 = null;
        var z1 = null;
        var x2 = null;
        var y2 = null;
        var z2 = null;

        var p0x = null;
        var p0y = null;
        var p1x = null;
        var p1y = null;
        var p2x = null;
        var p2y = null;
        var p3x = null;
        var p3y = null;

        for(var i = 1; i < array.length; i++) {
            if (x1 === null) {
                var e = array[i-1];
                x1 = e.x;
                y1 = e.y;
                z1 = e.z;
                thickness = e.thickness || thickness;
            }

            if (x2 !== null) {
                x1 = x2;
                y1 = y2;
                z1 = z2;
            }

            var e = array[i];
            x2 = e.x;
            y2 = e.y;
            z2 = e.z;
            thickness = e.thickness || thickness;

            var dy = y2 - y1;
            var dx = x2 - x1;
            var dz = z2 - z1;
            var distance = Math.sqrt(dx*dx + dy*dy + dz*dz);
            var ratio = thickness/distance;
    
            var ddy = dy*ratio/2;
            var ddx = dx*ratio/2; 
            //var ddz = dz*ratio/2; 

            if (p0x === null) {
                p0x = x1-ddy;
                p0y = y1+ddx;
                p1x = x1+ddy;
                p1y = y1-ddx;
            }
            p2x = x2-ddy;
            p2y = y2+ddx;
            p3x = x2+ddy;
            p3y = y2-ddx;

            meshAddVertex(lineMesh2.ptr, x1,y1,z1);
            meshAddVertex(lineMesh2.ptr, x2,y2,z2);
            meshAddVertex(lineMesh2.ptr, p2x,p2y,z2);
    
            meshAddVertex(lineMesh2.ptr, p0x,p0y,z1);
            meshAddVertex(lineMesh2.ptr, p2x,p2y,z2);
            meshAddVertex(lineMesh2.ptr, x1,y1,z1);
    
            meshAddVertex(lineMesh2.ptr, x2,y2,z2);
            meshAddVertex(lineMesh2.ptr, p3x,p3y,z2);
            meshAddVertex(lineMesh2.ptr, x1,y1,z1);
    
            meshAddVertex(lineMesh2.ptr, p1x,p1y,z1);
            meshAddVertex(lineMesh2.ptr, p3x,p3y,z2);
            meshAddVertex(lineMesh2.ptr, x1,y1,z1);

            p0x = p2x;
            p0y = p2y;
            p1x = p3x;
            p1y = p3y;
            //x2 = x2-ddy;
            //y2 = y2-ddx;
            //z2 = z2;
        }


        meshGenerate(lineMesh2.ptr);
    }
    
    globalThis.deinitLines = function(animation) {
        meshDelete(lineMesh2.ptr);
    }
    
    globalThis.drawLines = function(animation) {
        glPushMatrix();
        //perspective2dEnd();
            
        //gl.enable(gl.BLEND);
        //gl.blendFunc(gl.ONE, gl.ONE);
        //gl.disable(gl.DEPTH_TEST);
    
        //glTranslatef(-0.5,0,0 + 20 * getSceneTimeFromStart()*0.1);
        //glRotatef(getSceneTimeFromStart()*30.0,0,0,-1);
        meshDraw(lineMesh2.ptr, 0.0, 1.0);
    
        //gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        //gl.enable(gl.DEPTH_TEST);
    
        glPopMatrix();
    }

    globalThis.drawLine2d = function(x1,y1,x2,y2,thickness) {
        initLines(
            [{thickness:thickness, x:x1-getScreenWidth()/2,y:y1-getScreenHeight()/2,z:0},{x:x2-getScreenWidth()/2,y:y2-getScreenHeight()/2,z:0}]);
        drawLines();
    }

    globalThis.drawLine3d = function(x1,y1,z1,x2,y2,z2,thickness) {
        initLines([{thickness: thickness,x:x1,y:y1,z:z1},{x:x2,y:y2,z:z2}]);
        drawLines();
    }

    globalThis.drawLineThickness = 50;
    globalThis.drawLine = function(x1,y1,x2,y2) {
        drawLine2d(x1,y1,x2,y2,drawLineThickness);
    }

//setti random x ja y koordinaatteja
globalThis.makeRandomValues = function(){
    var x = [];
    var y = [];
    for(var i=0; i < 10; i++)
    {
      var radiusInPixels = getScreenWidth();
      var circlePointAngle = 360.0*Math.random();
      var angleInRadians = (circlePointAngle)*Math.PI/180.0;
      x[i] = (radiusInPixels * Math.cos(angleInRadians));
      y[i] = (radiusInPixels * Math.sin(angleInRadians));
    }
    var values = [x,y];
    return values
  }
  
  //transition functio
  globalThis.redLinetransition = function(animation)
  {
    /*glPushMatrix();

    for(var z = 0; z < 1; z++) {
        for(var x = 0; x < 10; x++) {

            for (var i = 0; i < 4; i++) {
                glPushMatrix();
                perspective2dEnd();
                glTranslatef(-10,-4,-15);

                glColor3f(1,1,1);
                if ((x+z+i)%2 == 0) {
                    glColor3f(1,0,0);
                }

                glPushMatrix();
                drawLine3d(x*2,i+i*0.25,-z, x*2,i+i*0.25+1,-z, 1);
                glPopMatrix();

                glPopMatrix();
            }
 
        }
    }

    glPopMatrix();

    return;*/
      glPushMatrix();
      /*glEnable( GL_POINT_SMOOTH );
    glEnable( GL_BLEND );
      glEnable(GL_BLEND);
      glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
      glEnable(GL_LINE_SMOOTH);
      glEnable(GL_LINE_STIPPLE);
      glLineWidth(20.0);
    */
      //perspective2dBegin(getScreenWidth(), getScreenHeight());
    glColor3f(1,0,0);
    var alpha = 1.0
  
    var start_time = animation.start
    var time_from_scene_start = getSceneTimeFromStart() - start_time
    var end_time_first = start_time + 4;
    var time_percent_from_start = time_from_scene_start/4.1
    var time_percent_to_end = (time_from_scene_start-4)/5
    var end_time_second = time_from_scene_start + animation.duration
  
    drawLineThickness=20;
  
    
    if (time_from_scene_start > 4){
      drawLine(0,0,getScreenWidth()/2,getScreenHeight()/2);
      drawLineThickness=50;
      var x_values = animation.randomValues[0]
      var y_values = animation.randomValues[1]
      //looppi jossa lähtee keskeltä viivat
      for(var i=0; i < 10; i++)
      {
        drawLine(getScreenWidth()/2,getScreenHeight()/2,x_values[i]*time_percent_to_end+getScreenWidth()/2,y_values[i]*time_percent_to_end+getScreenHeight()/2);
      }
    }else     if (end_time_first >= time_from_scene_start){
        drawLine(0,0,getScreenWidth()/2*time_percent_from_start,getScreenHeight()/2*time_percent_from_start);
      }
  
      

      //perspective2dEnd();
      glPopMatrix();
  }
  
  
  //joku viivaeffu
  globalThis.pylvasValues = [];
  globalThis.pylvasDiagrammi = function(animation)
  {
      glPushMatrix();
      /*glEnable( GL_POINT_SMOOTH );
    glEnable( GL_BLEND );
      glEnable(GL_BLEND);
      glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
      glEnable(GL_LINE_SMOOTH);
      glEnable(GL_LINE_STIPPLE);
      glLineWidth(10.0);
      perspective2dBegin(getScreenWidth(), getScreenHeight());*/
  
  
    glColor3f(1,1,1);
    var alpha = 1.0
  
    var labels = [{"Value":"bias","Count":460},{"Value":"conspiracy","Count":406},{"Value":"hate","Count":242},{"Value":"bs","Count":623},{"Value":"satire","Count":146},{"Value":"state","Count":121}]
    pylvasValues = [];
    for (var i = 0; i < labels.length; i++){
      //glBegin(GL_LINE_STRIP);
      var start_time = animation.start
      var time_from_scene_start = getSceneTimeFromStart() - start_time
      var progress_percent = time_from_scene_start/5
  
      if (progress_percent > 1){
        progress_percent = 1
        //this is for labels to be shown by the columns
        var label = labels[i].Value
      }
  
      var startPointX = getScreenWidth()/4+(i*185)
      var startPointY = getScreenHeight()/3
      var endPointX = startPointX
      var endPointY = getScreenHeight()/3+(labels[i].Count)
      //glVertex2f(startPointX,startPointY);
      //glVertex2f(endPointX,endPointY*progress_percent);
      //glEnd();
      drawLineThickness=100;
      drawLine(startPointX,startPointY,endPointX,endPointY*progress_percent);
      //running number value
      var running_number = labels[i].Count * progress_percent
      pylvasValues.push(running_number)

    }
  
      //perspective2dEnd();
      glPopMatrix();
  }
  
    
    this.loader.addAnimation([{
        "start": start, "duration": duration
       ,"layer": layer
       ,"part": 1
       ,"initFunction": "{}"
       ,"deinitFunction": "{deinitLines(animation);}"
       //,"runFunction": "{drawLine2d(0,0,0,200,50);drawLine2d(400,-200,400+Math.sin(getSceneTimeFromStart())*100,200,50);}"
   }]);

   this.loader.addAnimation([{
    "start": start, "duration": 8
   ,"logoDrawDuration": 6
   ,"layer": layer
   ,"logoDrawStart":3
   ,"randomValues": makeRandomValues()
   ,"runFunction":"{redLinetransition(animation);}"
  }]);

//viivaeffu
  this.loader.addAnimation([{
    "start": 8+start, "duration": 20
   ,"logoDrawDuration": 6
   ,"layer": layer
   ,"logoDrawStart":3
   ,"randomValues": makeRandomValues()
   ,"runFunction":"{pylvasDiagrammi(animation);}"
  }]);
  for (var i = 0; i < 6; i++) {
    this.loader.addAnimation(
        {
            "start": 8+start, "duration": 20, "layer": layer
            ,"layer": layer
            ,"text":{
                    "name":font
                ,"string":"{return ''+Math.floor(pylvasValues["+i+"]);}"
            }
            ,"scale": [{"uniform2d":5.0}]
            ,"position":[
                {"x":getScreenWidth()*(0.24+i*0.1),"y":getScreenHeight()*0.28}
            ]
            ,"color":[{"a":255}]
        });
    }

}

Demo.prototype.sceneTalkingHead = function(start, duration,fboName) {
    globalThis.talkingHeadMesh2 = void null;
    globalThis.talkingHeadMeshTexture = void null;
    talkingHeadMesh2 = meshNew();
    if (talkingHeadMesh2.ptr === void null) {
        loggerFatal("Could not initialize Mesh");
    }

    talkingHeadMeshTexture = imageLoadImage("talkingHeadsSpeechFbo.color.fbo");
    globalThis.initTalkingHead = function(percent) {
        meshClear(talkingHeadMesh2.ptr);
        meshMaterialSetTexture(talkingHeadMesh2.ptr, talkingHeadMeshTexture.ptr, 0);

        meshSetFaceDrawType(talkingHeadMesh2.ptr, TRIANGLES);

        var uMin = 0.0;
        var uMax = 1.0;
        var vMin = 0.0;
        var vMax = 1.0;

        var col = {
            r: 1.0,
            g: 1.0,
            b: 1.0,
            a: 1.0,
        };

        var z1 = 0;
        var z2 =  0;

        var x1 = -2.58*percent+1;
        var y1 = -0.15;

        var x2 = 0.77;
        var y2 = 0.00;

        var rSkew = 0.2;

        meshAddColor(talkingHeadMesh2.ptr, col.r,col.g,col.b,col.a);
        meshAddTexCoord(talkingHeadMesh2.ptr, uMin, vMax);
        meshAddVertex(talkingHeadMesh2.ptr, x1,y2+rSkew,z1);
        meshAddColor(talkingHeadMesh2.ptr, col.r,col.g,col.b,col.a);
        meshAddTexCoord(talkingHeadMesh2.ptr, uMax, vMax);
        meshAddVertex(talkingHeadMesh2.ptr, x2,y2,z1);
        meshAddColor(talkingHeadMesh2.ptr, col.r,col.g,col.b,col.a);
        meshAddTexCoord(talkingHeadMesh2.ptr, uMin, vMin);
        meshAddVertex(talkingHeadMesh2.ptr, x1,y1-rSkew,z1);

        meshAddColor(talkingHeadMesh2.ptr, col.r,col.g,col.b,col.a);
        meshAddTexCoord(talkingHeadMesh2.ptr, uMin, vMin);
        meshAddVertex(talkingHeadMesh2.ptr, x1,y1-rSkew,z1);
        meshAddColor(talkingHeadMesh2.ptr, col.r,col.g,col.b,col.a);
        meshAddTexCoord(talkingHeadMesh2.ptr, uMax, vMax);
        meshAddVertex(talkingHeadMesh2.ptr, x2,y2,z1);
        meshAddColor(talkingHeadMesh2.ptr, col.r,col.g,col.b,col.a);
        meshAddTexCoord(talkingHeadMesh2.ptr, uMax, vMin);
        meshAddVertex(talkingHeadMesh2.ptr, x2,y1,z1);

        meshGenerate(talkingHeadMesh2.ptr);
    }
    
    globalThis.deinitTalkingHead = function(animation) {
        meshDelete(talkingHeadMesh2.ptr);
    }
    
    globalThis.shakeTime = -1;
    globalThis.drawTalkingHead = function(animation) {
        glPushMatrix();
        perspective2dEnd();
            
        //gl.enable(gl.BLEND);
        //gl.blendFunc(gl.ONE, gl.ONE);
        //gl.disable(gl.DEPTH_TEST);

        if (shakeTime+0.1 < getSceneTimeFromStart()) {
            shakeTime = getSceneTimeFromStart();
            globalThis.shakeParams = {"x":Math.random()*0.05-0.025, "y":Math.random()*0.05-0.025}
        } 

        glRotatef(-10,0,0,1);
        glTranslatef(shakeParams.x,shakeParams.y+0.1,0.0);
        glColor3f(1,(Math.sin(getSceneTimeFromStart()*5)+1)/2,(Math.sin(getSceneTimeFromStart()*5)+1)/2);
    
    

        //glTranslatef(-0.5,0,0 + 20 * getSceneTimeFromStart()*0.1);
        //glRotatef(getSceneTimeFromStart()*30.0,0,0,-1);
        meshDraw(talkingHeadMesh2.ptr, 0.0, 1.0);
    
        //gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        //gl.enable(gl.DEPTH_TEST);
    
        glPopMatrix();
    }
    
    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":"talkingHeadsSpeechFbo","action":"begin","storeDepth":false}}]);
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["_embedded/defaultWhite.png"]
    });
    globalThis.talkingHeadTitlesX = 0;
    globalThis.talkingHeadTitleText = "";
    this.loader.addAnimation({
         "start": start, "duration": duration, "layer": layer
        ,"layer": layer
        ,"text":{
            "name":font
            ,"string":"{if (!talkingHeadTitleText || talkingHeadTitlesX <  -getScreenWidth()*2) { talkingHeadTitleText = statistics.titles[Utils.getRandomArrayIndex(statistics.titles)].replace(/,/g,' '); } return talkingHeadTitleText;}"
        }
        ,"scale": [{"uniform2d":30.0}]
        ,"position":[
            {"x":"{talkingHeadTitlesX = getScreenWidth()* (4.0-((getSceneTimeFromStart()*0.8)%7.0)); return talkingHeadTitlesX;}","y":getScreenHeight()*0.5}
        ]
        ,"color":[{"r":0,"g":0,"b":0}]
        //,"color":[{"a":0},{"duration":0.25,"a":255},{"duration":7.5},{"duration":0.25,"a":0}]
    });

    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":"talkingHeadsSpeechFbo","action":"unbind"}});

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"begin","storeDepth":false}}]);

    this.loader.addAnimation([{
        "start": start, "duration": duration
       ,"layer": layer
       ,"part": 1
       ,"deinitFunction": "{deinitTalkingHead(animation);}"
       ,"runFunction": "{initTalkingHead(1.0); drawTalkingHead();}"
       //,"runFunction": "{drawLine2d(0,0,0,200,50);drawLine2d(400,-200,400+Math.sin(getSceneTimeFromStart())*100,200,50);}"
   }]);
this.loader.addAnimation({
    "start": start, "duration": end
   ,"layer": layer
   ,"image": ["megaphone_2.png"]
   ,"scale":[{"x":-2.2,"y":2.2}]
   ,"position":[{"x":getScreenWidth()*0.80,"y":getScreenHeight()*0.40}]
   ,"angle":[{"degreesZ":-2}]
});

this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"unbind"}});

}

Demo.prototype.sceneLadyJustice = function(start, duration,fboName) {
    globalThis.ladyJusticeTexts = [
        'REAL',
        'FAKE',
        'CONSPIRACY',
        'HATE',
        'SATIRE',
        'BULLSHIT',
    ];

    Sync.addSync(
        [
            { "name":"justice:scaleRot", "type":"rocket" },
            { "name":"justice:textLeft", "type":"rocket" },
            { "name":"justice:textLeftAlpha", "type":"rocket" },
            { "name":"justice:textRight", "type":"rocket" },
            { "name":"justice:textRightAlpha", "type":"rocket" },
        ]);

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"begin","storeDepth":false}}]);

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["lady.png"]
       ,"position":[{"x":getScreenWidth()*0.65,"y":getScreenHeight()*0.4}]
    });

    globalThis.scaleRot = 0;
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["scale_right.png"]
       ,"position":[{"x":"{scaleRot = Sync.getSyncValue('justice:scaleRot'); return getScreenWidth()*0.385-scaleRot/3;}","y":"{return getScreenHeight()*0.63+scaleRot*4;}"}]
    });
    this.loader.addAnimation(
        {
                "start": start, "duration": duration, "layer": layer
            ,"layer": layer
            ,"text":{
                    "name":font
                ,"string":"{return ladyJusticeTexts[Math.floor(Sync.getSyncValue('justice:textLeft'))];}"
            }
            ,"scale": [{"uniform2d":5.0}]
            ,"position":[
                {"x":getScreenWidth()*0.38,"y":"{return getScreenHeight()*0.54+scaleRot*4;}"}
            ]
            ,"color":[{"a":"{return Sync.getSyncValue('justice:textLeftAlpha')*0xFF}"}]
        });
    
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["scale_right.png"]
       ,"position":[{"x":"{return getScreenWidth()*0.612-scaleRot/3;}","y":"{return getScreenHeight()*0.63-scaleRot*4;}"}]
    });

    this.loader.addAnimation(
        {
                "start": start, "duration": duration, "layer": layer
            ,"layer": layer
            ,"text":{
                    "name":font
                    ,"string":"{return ladyJusticeTexts[Math.floor(Sync.getSyncValue('justice:textRight'))];}"
            }
            ,"scale": [{"uniform2d":5.0}]
            ,"position":[
                {"x":getScreenWidth()*0.61,"y":"{return getScreenHeight()*0.54-scaleRot*4;}"}
            ]
            ,"color":[{"a":"{return Sync.getSyncValue('justice:textRightAlpha')*0xFF}"}]
        });

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["scale_middle.png"]
       ,"angle":[{"degreesZ":"{return scaleRot;}"}]
       ,"position":[{"x":getScreenWidth()*0.495,"y":getScreenHeight()*0.831}]
    });

    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"unbind"}});

}

Demo.prototype.sceneCultist = function(start, duration,fboName) {

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"begin","storeDepth":false}}]);

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["cultist.png"]
       //,"position":[{"x":getScreenWidth()*0.65,"y":getScreenHeight()*0.4}]
    });
	this.loader.addAnimation([{
        "start": start, "duration":duration
       ,"layer": layer, "image": ["tex_allseeing.png"]
       ,"object":"obj_allseeing.obj"
       ,"position":[{"x":2.5,"y":1.5,"z":-5}]
       ,"scale":[{"uniform3d":1.0}]
       ,"angle": [{"degreesY":"{return -20*getSceneTimeFromStart();}","degreesZ":0,"degreesX":0}]
       //,"color":[{"r":255,"g":255,"b":255,"a":255}]	
   }]);
    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"unbind"}});
}

Demo.prototype.sceneLeaders = function(start, duration,fboName) {

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"begin","storeDepth":false}}]);

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["putin.png"]
       ,"position":[{"x":getScreenWidth()*0.85,"y":getScreenHeight()*0.15}]
    });

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["assange.png"]
       ,"position":[{"x":getScreenWidth()*0.2,"y":getScreenHeight()*0.25}]
    });

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["barack.png"]
       ,"position":[{"x":getScreenWidth()*0.3,"y":getScreenHeight()*0.35}]
    });

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["hillary.png"]
       ,"position":[{"x":getScreenWidth()*0.75,"y":getScreenHeight()*0.25}]
    });

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["biden.png"]
       ,"position":[{"x":getScreenWidth()*0.65,"y":getScreenHeight()*0.35}]
    });


    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["donald.png"]
       ,"position":[{"x":getScreenWidth()*0.5,"y":getScreenHeight()*0.4}]
    });
    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"unbind"}});
}

Demo.prototype.sceneFlag = function(start, duration,fboName) {

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"begin","storeDepth":false}}]);

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["american_flag.png"]
       ,"position":[{"x":getScreenWidth()*0.5,"y":getScreenHeight()*0.5}]
       ,"shader":{"name":"wavy.fs"}
    });
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["eagle.png"]
       ,"scale":[{"x":-1.6,"y":1.6}]
       ,"position":[{"x":getScreenWidth()*0.8,"y":getScreenHeight()*0.37}]
    });
    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"unbind"}});
}

Demo.prototype.sceneLayerSuits = function(start, duration,fboName) {

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"begin","storeDepth":false}}]);

    var maxChanges = 40;
    for (var i = 0; i < maxChanges; i++) {
        var suitFade = 0.25;
        var suitDuration = duration/maxChanges;
        var suitStart = start + i*suitDuration - suitFade;
        var suitAlpha = 255;
        var fadeLogic = [{"a":0},{"a":suitAlpha,"duration":suitFade},{"duration":suitDuration-suitFade*2},{"duration":suitFade,"a":0}];

        var head = Math.floor(Math.random()*5);
        switch (head) {
            case 0:
                this.loader.addAnimation({
                    "start": suitStart, "duration": suitDuration
                   ,"layer": layer
                   ,"image": ["lizard_head_1.png"]
                   ,"position":[{"x":getScreenWidth()*0.215,"y":getScreenHeight()*0.67}]
                   ,"color":fadeLogic
                   });
                       break;
            case 1:
                this.loader.addAnimation({
                    "start": suitStart, "duration": suitDuration
                ,"layer": layer
                ,"image": ["lizard_head_2.png"]
                ,"position":[{"x":getScreenWidth()*0.185,"y":getScreenHeight()*0.65}]
                ,"color":fadeLogic
                });
                    break;
            case 2:
                this.loader.addAnimation({
                    "start": suitStart, "duration": suitDuration
                ,"layer": layer
                ,"image": ["megaphone_1.png"]
                ,"position":[{"x":getScreenWidth()*0.21,"y":getScreenHeight()*0.65}]
                ,"color":fadeLogic
                });
                    break;
            case 3:
                this.loader.addAnimation({
                    "start": suitStart, "duration": suitDuration
                ,"layer": layer
                ,"image": ["robot.png"]
                ,"scale":[{"x":-1}]
                ,"position":[{"x":getScreenWidth()*0.20,"y":getScreenHeight()*0.68}]
                ,"color":fadeLogic
                });
                    break;
            case 4:
                this.loader.addAnimation({
                    "start": suitStart, "duration": suitDuration
                ,"layer": layer
                ,"image": ["television.png"]
                ,"scale":[{"x":-1}]
                ,"position":[{"x":getScreenWidth()*0.20,"y":getScreenHeight()*0.68}]
                ,"color":fadeLogic
                });
                    break;
        }

        this.loader.addAnimation({
            "start": suitStart, "duration": suitDuration
           ,"layer": layer
           ,"image": ["man_"+((i%3)+1)+".png"]
           ,"position":[{"x":getScreenWidth()*0.20,"y":getScreenHeight()*0.3}]
           ,"color":fadeLogic
        });
    }

    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":fboName,"action":"unbind"}});

}

Demo.prototype.sceneLayerExcel = function(start, duration) {
    this.loader.addAnimation({
        "start": 39, "duration": 1
       ,"layer": layer
       ,"image": ["excel_back.png"]
       ,"scale": [{"uniform2d":1.0}]
       ,"color":[{"a":0},{"a":255, "duration": 0.25},{"duration":0.5},{"a":0, "duration": 0.25}]
    });
    this.loader.addAnimation({
        "start": 39, "duration": 1
       ,"layer": layer
       ,"image": ["excel_front.png"]
       ,"scale": [{"uniform2d":1.0}]
       ,"color":[{"a":0},{"a":255, "duration": 0.25},{"duration":0.5},{"a":0, "duration": 0.25}]
    });

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["excel_back.png"]
       ,"scale": [{"uniform2d":1.0}]
    });
    this.loader.addAnimation({
        "start": start, "duration":duration
       ,"layer": layer, "image": ["_embedded/defaultTransparent.png"]
       ,"shader":{"name":"spiral.fs", "variable":[
           {"name":"background","type":"int","value":[3]}
       ]}
       ,"scale":[{"x":1.0,"y":0.73}]
       ,"position":[{"x":getScreenWidth()*0.49,"y":getScreenHeight()*0.417}]
       ,"color":[{"a":150}]
   });
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["excel_front.png"]
       ,"scale": [{"uniform2d":1.0}]
    });

}

function deinitDmxLights() {
    if (dmxLightManager && dmxLightManager.isInitialized()) {
        dmxLightManager.setColor(0x00,0x00,0x00);
        dmxLightManager.sendData();
        dmxLightManager.deinit();
        dmxLightManager = void null; //reload will fuck up without this
    }
}

function runDmxLights() {
    var lightType = Math.floor(Sync.getSyncValue('dmx:type'));

    var glitchSize = Sync.getSyncValue('distortion:glitchSize');
    if (lightType == 4) {
        for (var i=0;i<dmxLightManager.lightCount;i++) {
            var c = Math.random() >= 0.5 ? Math.floor(Sync.getSyncValue('dmx:intensity')*0xFF) : 0x00;
            dmxLightManager.setColor(c,c,c, i, i+1);
        }
    } else if (glitchSize > 0) {
        var c = Math.min(Math.floor(glitchSize/0.01*0xFF), 0xFF);
        dmxLightManager.setColor(c,c,c, 0, dmxLightManager.lightCount);
    } else if (lightType == 1) {
        for (var i=0;i<dmxLightManager.lightCount;i++) {
            if (i%2 == 0) {
                dmxLightManager.setColor(Math.floor((Math.sin(getSceneTimeFromStart()*10)+1)/2*0xFF), 0x00, 0x00, i, i+1);
            } else {
                dmxLightManager.setColor(Math.floor((Math.cos(getSceneTimeFromStart()*10)+1)/2*0xFF), 0x00, 0x00, i, i+1);
            }
        }
    } else if (lightType == 5) {
        var c = Math.floor((Math.sin(getSceneTimeFromStart()*10)+1)/2*0x0F+0xF0*Sync.getSyncValue('dmx:intensityL'));
        dmxLightManager.setColor(c,c,c, 0, dmxLightManager.lightCount/2);
        var c = Math.floor((Math.cos(getSceneTimeFromStart()*10)+1)/2*0x0F+0xF0*Sync.getSyncValue('dmx:intensityR'));
        dmxLightManager.setColor(c,c,c, dmxLightManager.lightCount/2, dmxLightManager.lightCount);
    } else if (lightType == 2) {
        var c = Math.floor((Math.sin(getSceneTimeFromStart()*10)+1)/2*0xFF);
        dmxLightManager.setColor(c,c,c, 0, dmxLightManager.lightCount/2);
        var c = Math.floor((Math.cos(getSceneTimeFromStart()*10)+1)/2*0xFF);
        dmxLightManager.setColor(c,c,c, dmxLightManager.lightCount/2, dmxLightManager.lightCount);
    } else if (lightType == 0) {
        dmxLightManager.setColor(0x00, 0x00, 0x00, 0, dmxLightManager.lightCount);
    } else if (lightType == 3) {
        dmxLightManager.setColor(Math.floor(Sync.getSyncValue('dmx:intensity')*0xFF),0,0, 0, dmxLightManager.lightCount);
    }

    dmxLightManager.sendData();
    if (lightType === 0) {
        for (var i=0;i<dmxLightManager.lightCount;i++) {
            if (i%2 == 0) {
                dmxLightManager.setColor(Math.floor((Math.sin(getSceneTimeFromStart()*10)+1)/2*0xFF), 0x00, 0x00, i, i+1);
            } else {
                dmxLightManager.setColor(Math.floor((Math.cos(getSceneTimeFromStart()*10)+1)/2*0xFF), 0x00, 0x00, i, i+1);
            }
        }

        dmxLightManager.sendMockColorData();
    }
}

var sceneFbo = {
    prefix: 'sceneFbo',
    count: 9,
    frameDelay: 0.25,
};

function sceneControllerInit(animationObject) {
    Sync.addSync(
        [
            { "name":"controller:scene1", "type":"rocket" },
            { "name":"controller:scene1alpha", "type":"rocket" },
            { "name":"controller:scene2", "type":"rocket" },
            { "name":"controller:scene2alpha", "type":"rocket" },
        ]);

    animationObject.images = [];
    animationObject.i = void null;

    for (var i = 0; i < animationObject.count; i++) {
        var image = new Image();
        image.load(animationObject.prefix + i + ".color.fbo");
        animationObject.images.push(image);
    }
}


function sceneController(animation,fixedScene) {
    var timeNow = getSceneTimeFromStart();
    if (animation.animationObject.i === void null) {
        animation.animationObject.i = 0;
        animation.animationObject.startTime = timeNow;
        animation.animationObject.frameStartTime = animation.animationObject.startTime;
    }

    if (Math.abs(timeNow-animation.animationObject.frameStartTime) >= animation.animationObject.frameDelay) {
        animation.animationObject.i = (animation.animationObject.i+1)%animation.animationObject.count;
        animation.animationObject.frameStartTime = timeNow;
    }

    var sceneI = animation.animationObject.i;
    if (fixedScene !== void null) {
        sceneI = fixedScene;
    }

    animation.ref.ptr = animation.animationObject.images[sceneI].ptr;
}

Demo.prototype.init = function()
{
    Sync.addSync(
        [
            { "name":"dmx:type", "type":"rocket" },
            { "name":"dmx:intensity", "type":"rocket" },
            { "name":"dmx:intensityL", "type":"rocket" },
            { "name":"dmx:intensityR", "type":"rocket" },
        ]);

    if (dmxLightManager === void null) {
        // in case menu did not exist
        dmxLightManager = new DmxLightManager();
        dmxLightManager.sock.setHost(dmxLightManagerSettings.host);
        dmxLightManager.sock.setPort(parseInt(dmxLightManagerSettings.port));
        dmxLightManager.init(parseInt(dmxLightManagerSettings.count));
    }

/*    
   this.loader.addAnimation([{
        "start": start, "duration": duration
       ,"layer": layer
       ,"initFunction": "{initParticles(animation);}"
       ,"deinitFunction": "{deinitParticles(animation);}"
       ,"runFunction": "{drawParticles(animation);}"
       ,"shader":{"name":["particles.vs","particles.gs","particles.fs"]}
   }]);
*/


    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo0","action":"begin","storeDepth":false}}]);
    this.sceneBinaryFlow(0,duration);
    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo0","action":"unbind"}});

    //this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo1","action":"begin","storeDepth":false}}]);
    //this.sceneTunnel(0,duration);
    //this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo1","action":"unbind"}});

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo2","action":"begin","storeDepth":false}}]);
    this.sceneCircle(70,duration-70);
    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo2","action":"unbind"}});

    this.sceneTalkingHead(0,duration,"sceneFbo3");

    this.sceneLadyJustice(0,duration,"sceneFbo4");

    this.sceneCultist(0,duration,"sceneFbo6");

    this.sceneLeaders(0,duration,"sceneFbo7");

    this.sceneFlag(0,duration,"sceneFbo8");

    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo5","action":"begin","storeDepth":false}}]);

    this.sceneTitle(3,10);
    this.sceneText3d(5,19);
    this.sceneLines(20,10);

    var lineCount = 50;
    var lineDuration = duration/lineCount;
    for (var i = 0; i < lineCount; i++) {
        var lineStart = start+28 + i*lineDuration;
        var lineFade = 0.25;
        var lineAlpha = 220;
        this.loader.addAnimation({
            "start": lineStart, "duration": lineDuration
           ,"layer": layer
           ,"image": ["redline.png"]
           ,"position":[{"x":getScreenWidth()*Math.random(),"y":getScreenHeight()*Math.random()}]
           ,"angle":[{"degreesZ":Math.random()*360}]
           ,"scale":[{"x":2}]
           ,"color":[{"a":0},{"a":lineAlpha,"duration":lineFade},{"duration":lineDuration+lineFade*2},{"a":0,"duration":lineFade}]
        });    
        this.loader.addAnimation({
            "start": lineStart, "duration": lineDuration
           ,"layer": layer
           ,"image": ["redline.png"]
           ,"position":[{"x":getScreenWidth()*Math.random(),"y":getScreenHeight()*Math.random()}]
           ,"angle":[{"degreesZ":Math.random()*360}]
           ,"scale":[{"x":2}]
           ,"color":[{"a":0},{"a":lineAlpha,"duration":lineFade},{"duration":lineDuration+lineFade*2},{"a":0,"duration":lineFade}]
        });    
        this.loader.addAnimation({
            "start": lineStart, "duration": lineDuration
           ,"layer": layer
           ,"image": ["redline.png"]
           ,"position":[{"x":getScreenWidth()*Math.random(),"y":getScreenHeight()*Math.random()}]
           ,"angle":[{"degreesZ":Math.random()*360}]
           ,"scale":[{"x":2}]
           ,"color":[{"a":0},{"a":lineAlpha,"duration":lineFade},{"duration":lineDuration+lineFade*2},{"a":0,"duration":lineFade}]
        });    
    }
    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":"sceneFbo5","action":"unbind"}});

    this.sceneLayerSuits(28,duration,"sceneLayerSuitsFbo");


    this.loader.addAnimation([{ "start": start, "duration": duration,"layer": layer,"fbo":{"name":"scenePostProcFbo","action":"begin","storeDepth":false}}]);

    

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["_embedded/defaultTransparent.png"]
       ,"animationObject": sceneFbo
       ,"initFunction":"{sceneControllerInit(animation.animationObject);}"
       ,"runFunction":"{sceneController(animation,Sync.getSyncValue('controller:scene1'))}"
       ,"color":[{"a":"{return Sync.getSyncValue('controller:scene1alpha')*0xFF}"}]
    });
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["_embedded/defaultTransparent.png"]
       ,"animationObject": sceneFbo
       ,"runFunction":"{sceneController(animation,Sync.getSyncValue('controller:scene2'))}"
       ,"color":[{"a":"{return Sync.getSyncValue('controller:scene2alpha')*0xFF}"}]
    });

    this.loader.addAnimation({
        "start": start+4, "duration": duration
        ,"layer": layer
        ,"image": ["sceneLayerSuitsFbo.color.fbo"]
        ,"color":[{"a":255}] // 255
        });

    this.loader.addAnimation({"start": start, "duration": duration,"layer": layer,"fbo":{"name":"scenePostProcFbo","action":"unbind"}});

    Sync.addSync([
        { "name":"distortion:distortionResolutionX", "type":"rocket" },
        { "name":"distortion:distortionResolutionY", "type":"rocket" },
        { "name":"distortion:distortionX", "type":"rocket" },
        { "name":"distortion:distortionY", "type":"rocket" },
        { "name":"distortion:noiseAlpha", "type":"rocket" },
        { "name":"distortion:shakeSizeY", "type":"rocket" },
        { "name":"distortion:glitchSize", "type":"rocket" },
        { "name":"distortion:displacementOffset", "type":"rocket" },
    ]);
    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["scenePostProcFbo.color.fbo","fft0"]
    ,"shader":{"name":"distortion.fs","variable":[
        {"name":"distortionResolutionX","value":"{return [Sync.getSyncValue('distortion:distortionResolutionX')];}"},
        {"name":"distortionResolutionY","value":"{return [Sync.getSyncValue('distortion:distortionResolutionY')];}"},
        {"name":"distortionX","value":"{return [Sync.getSyncValue('distortion:distortionX')];}"},
        {"name":"distortionY","value":"{return [Sync.getSyncValue('distortion:distortionY')];}"},
        {"name":"noiseAlpha","value":"{return [Sync.getSyncValue('distortion:noiseAlpha')];}"},
        {"name":"shakeSizeY","value":"{return [Sync.getSyncValue('distortion:shakeSizeY')];}"},
        {"name":"glitchSize","value":"{return [Sync.getSyncValue('distortion:glitchSize')];}"},
        {"name":"displacementOffset","value":"{return [Sync.getSyncValue('distortion:displacementOffset')];}"},
    ]}
,"color":[{"a":255}]
});


       var bgPicCount = 6;
       for(var i = 1; i <= bgPicCount; i++) {
           var bgDuration = end/bgPicCount;
           this.loader.addAnimation({
               "start": start+bgDuration*(i-1), "duration": bgDuration+1
              ,"layer": layer
              ,"image": ["sanomalehti_"+i+".png"]
              ,"scale": [{"uniform2d":1.0}]
              ,"color":[{"a":0},{"a":110,"duration":2},{"duration":bgDuration-3},{"a":0,"duration":2}]
              ,"position":[
                   {"x":getScreenWidth()*0.55, "y":getScreenHeight()*0.5},
                   {"duration": end, "x":getScreenWidth()*0.42}
              ]
           });
       }
    
   this.loader.addAnimation({
    "start": start, "duration": end
   ,"layer": layer
   ,"image": ["_embedded/defaultTransparent.png"]
   ,"shader":{"name":"dmxsimulator.fs", "variable":[
        {"name":"lightColor[0]",  "value":"{return dmxLightManager.mockColor[ 0];}"},
        {"name":"lightColor[1]",  "value":"{return dmxLightManager.mockColor[ 1];}"},
        {"name":"lightColor[2]",  "value":"{return dmxLightManager.mockColor[ 2];}"},
        {"name":"lightColor[3]",  "value":"{return dmxLightManager.mockColor[ 3];}"},
        {"name":"lightColor[4]",  "value":"{return dmxLightManager.mockColor[ 4];}"},
        {"name":"lightColor[5]",  "value":"{return dmxLightManager.mockColor[ 5];}"},
        {"name":"lightColor[6]",  "value":"{return dmxLightManager.mockColor[ 6];}"},
        {"name":"lightColor[7]",  "value":"{return dmxLightManager.mockColor[ 7];}"},
        {"name":"lightColor[8]",  "value":"{return dmxLightManager.mockColor[ 8];}"},
        {"name":"lightColor[9]",  "value":"{return dmxLightManager.mockColor[ 9];}"},
        {"name":"lightColor[10]", "value":"{return dmxLightManager.mockColor[10];}"},
        {"name":"lightColor[11]", "value":"{return dmxLightManager.mockColor[11];}"},
        {"name":"lightColor[12]", "value":"{return dmxLightManager.mockColor[12];}"},
        {"name":"lightColor[13]", "value":"{return dmxLightManager.mockColor[13];}"},
        {"name":"lightColor[14]", "value":"{return dmxLightManager.mockColor[14];}"},
        {"name":"lightColor[15]", "value":"{return dmxLightManager.mockColor[15];}"},
        {"name":"lightColor[16]", "value":"{return dmxLightManager.mockColor[16];}"},
        {"name":"lightColor[17]", "value":"{return dmxLightManager.mockColor[17];}"},
        {"name":"lightColor[18]", "value":"{return dmxLightManager.mockColor[18];}"},
        {"name":"lightColor[19]", "value":"{return dmxLightManager.mockColor[19];}"},
        {"name":"lightColor[20]", "value":"{return dmxLightManager.mockColor[20];}"},
        {"name":"lightColor[21]", "value":"{return dmxLightManager.mockColor[21];}"},
        {"name":"lightColor[22]", "value":"{return dmxLightManager.mockColor[22];}"},
        {"name":"lightColor[23]", "value":"{return dmxLightManager.mockColor[23];}"},
    ]}
    ,"runFunction":"{runDmxLights();}"
    ,"deinitFunction":"{deinitDmxLights();}"
    ,"color":[{"a":120}]});

    this.loader.addAnimation({
        "start": start, "duration": end
       ,"layer": layer
       ,"image": ["_embedded/defaultTransparent.png"]
       ,"shader":{"name":"vignette.fs", "variable":[
           {"name":"fadeStart","value":"{return [0.35];}"} //0.35
          ,{"name":"fadeEnd","value":"{return [0.8];}"} //0.5
        ]}
        ,"color":[{"a":200}]
    });
    
    this.loader.addAnimation({
        "start": start+24, "duration":duration
       ,"layer": layer, "image": ["_embedded/defaultTransparent.png"]
       ,"shader":{"name":"spurdoscope.fs"}
       ,"color":[{"a":30}]
   });
    this.sceneLayerExcel(start+43,2);


/*
this.loader.addAnimation({
        "start": start, "duration":end
       ,"layer": layer, "image": ["_embedded/defaultTransparent.png","fft0"]
       ,"shader":{"name":"fft.fs"}
       ,"color":[{"a":"{return 130;}"}] // 220
   });
   this.loader.addAnimation({
    "start": start, "duration":end
    ,"layer": layer, "image": ["_embedded/defaultTransparent.png","fft0"]
    ,"shader":{"name":"fft.fs"}
    ,"scale": [{"x":1.0,"y":-1.0}]
    ,"color":[{"a":"{return 130;}"}] // 220
    });
    */

    /*Sync.addSync(
    [
        { "name":"shiva_a", "type":"rocket" },
        { "name":"fft_a", "type":"rocket" },
        { "name":"vignette_start", "type":"rocket" },
        { "name":"vignette_end", "type":"rocket" },
        { "name":"tunnel:a", "type":"rocket" },
        { "name":"tunnel:scale", "type":"rocket" },
        { "name":"tunnel:type", "type":"rocket" },
        { "name":"tunnel:fade", "type":"rocket" },
        { "name":"cross:0_rotation", "type":"rocket" },
        { "name":"cross:0_scale", "type":"rocket" },
        { "name":"cross:0_x", "type":"rocket" },
        { "name":"cross:0_y", "type":"rocket" },
        { "name":"cross:0_a", "type":"rocket" },
        { "name":"cross:1_rotation", "type":"rocket" },
        { "name":"cross:1_scale", "type":"rocket" },
        { "name":"cross:1_x", "type":"rocket" },
        { "name":"cross:1_y", "type":"rocket" },
        { "name":"cross:1_a", "type":"rocket" },
        { "name":"cross:2_rotation", "type":"rocket" },
        { "name":"cross:2_scale", "type":"rocket" },
        { "name":"cross:2_x", "type":"rocket" },
        { "name":"cross:2_y", "type":"rocket" },
        { "name":"cross:2_a", "type":"rocket" },
    ]);

    this.loader.addAnimation([{ 
         "start": start, "duration": duration
        ,"layer": layer
        ,"fbo":{"name":"foregroundFbo","action":"begin","storeDepth":false}}]);
    
    this.loader.addAnimation({
        "start": start, "duration":end
       ,"layer": layer, "image": ["_embedded/defaultTransparent.png","fft0"]
       ,"shader":{"name":"fft.fs"}
       ,"color":[{"a":"{return Sync.getSyncValue('fft_a');}"}] // 220
   });

   this.loader.addAnimation({
    "start": start, "duration":end
   ,"layer": layer, "image": "shiva.png"
   ,"scale":[{"uniform2d":0.6}]
   ,"position":[{"y":getScreenHeight()*0.4, "x":getScreenWidth()*0.523}]
   ,"color":[{"a":"{return Sync.getSyncValue('shiva_a');}"}] // 120
});

    this.loader.addAnimation({
         "start": start, "duration":end
        ,"layer": layer, "image": ["eye.png"]
        ,"shader":{"name":"tunnel.fs", "variable":[
            {"name":"effectType","value":"{return [Sync.getSyncValue('tunnel:type')];}"}, //0
            {"name":"fade","value":"{return [Sync.getSyncValue('tunnel:fade')];}"} //0.08
        ]}
        ,"scale": [{"uniform2d":"{return Sync.getSyncValue('tunnel:scale');}"}] // 4.0
        ,"color":[{"a":"{return Sync.getSyncValue('tunnel:a');}"}] // 255
    });
    this.loader.addAnimation({
        "start": start, "duration": end
       ,"layer": layer
       ,"image": ["clouds_01.png"]
       ,"scale": [{"uniform2d":10.0}]
       ,"color":[{"a":255}]
       ,"position":[
            {"x":getScreenWidth()*0.9, "y":getScreenHeight()*0.5},
            {"duration": end, "x":getScreenWidth()*0.3}
       ]
    }); 

    this.loader.addAnimation({ 
        "start": start, "duration": duration
        ,"layer": layer
        ,"fbo":{"name":"foregroundFbo","action":"unbind"}});

    this.loader.addAnimation({
        "start": start, "duration": duration
       ,"layer": layer
       ,"image": ["foregroundFbo.color.fbo"]
   });

   for (var i = 0; i < 3; i++) {
    this.loader.addAnimation({
        "start": start, "duration": end
        ,"layer": layer
        ,"image": ["_embedded/defaultTransparent.png","clouds_01.png","foregroundFbo.color.fbo"]
        ,"shader":{"name":"draw2d.fs", "variable":[
                {"name":"rotation","value":"{return [Sync.getSyncValue('cross:"+i+"_rotation')];}"}
                ,{"name":"scale","value":"{return [Sync.getSyncValue('cross:"+i+"_scale')];}"}
                ,{"name":"x","value":"{return [Sync.getSyncValue('cross:"+i+"_x')];}"}
                ,{"name":"y","value":"{return [Sync.getSyncValue('cross:"+i+"_y')];}"}
            ]}
        ,"color":[{"a":"{return Sync.getSyncValue('cross:"+i+"_a');}"}] // 255
        });
    }
            
    this.loader.addAnimation({
         "start": start, "duration": end
        ,"layer": layer
        ,"image": ["_embedded/defaultTransparent.png"]
        ,"shader":{"name":"vignette.fs", "variable":[
            {"name":"fadeStart","value":"{return [Sync.getSyncValue('vignette_start')];}"} //0.35
           ,{"name":"fadeEnd","value":"{return [Sync.getSyncValue('vignette_end')];}"} //0.5
      ]}
    });*/
}
