{deck}
version:1
card:0
size:[512,342]
name:"zazz.deck"

{card:home}
image:"%%[encoded data, 17156 characters]"
{widgets}
field1:{"type":"field","size":[326,14],"pos":[88,212],"locked":1,"show":"invert","align":"center","value":"Animation made easy!"}
field2:{"type":"field","size":[150,36],"pos":[11,296],"locked":1,"style":"plain","align":"center","value":"This deck includes a utility module 'zazz' that you can import into your own decks."}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}

{script:home.0}
on click do
 go[me.text "SlideLeft"]
end
{end}

{card:overview}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/w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wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AZQ=="
script:"overview.0"
{widgets}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"OVERVIEW"}
field1:{"type":"field","size":[151,135],"pos":[59,108],"locked":1,"border":0,"value":"Most of the functions provided by Zazz are designed to add animation to widgets on a card.\n\nTo use them, create an \"on view\" handler in the card script, call the Zazz function(s) you want with appropriate arguments, and then use \"go[card]\" to ask Decker to redraw the display on the next frame.\n\nThat's it!"}
field2:{"type":"field","size":[172,50],"pos":[164,277],"locked":1,"style":"code","value":"on view do\n zazz.scroll[spider 1,0]\n go[card]\nend"}
field3:{"type":"field","size":[45,14],"pos":[309,107],"locked":1,"border":0,"style":"plain","value":"spider"}
spider:{"type":"canvas","size":[99,97],"pos":[306,119],"locked":1,"image":"%%IMG2AGMAYQD/AP8A/wD/AP8A/wD/AP8AfgEDAAMBAgAIAQcAQgEFAAQBBQABAQQAAwEOAD4BBwACAQcAAQEEAAIBDwA8AQwAAgEDAAEBAwACAQUABwEFADoBAwAFAQUAAwEDAAEBAQABAQMADQEEADgBAwABAQQAAgEEAAMBAwABAQUADwEDADcBCQACAQMAAwEIABEBAwA2AQkA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wAIAQMAAgEDAEYBAwAFAQUABwEDAAMBAwBFAQQAAgEHAAgBCABEAQUAAgEGAAsBBwBCAQUAAwEFAA4BBQBCAQUAAwEEAFcBCgBaAQgAXAEGAP8A/wD/AP8A/wD/AP8A/wCL","scale":1}

{script:overview.0}
on view do
 zazz.scroll[spider 1,0]
 go[card]
end
{end}

{script:overview.1}
on click do
 go[me.text "SlideRight"]
end
{end}

{card:wave}
script:"wave.0"
{widgets}
b2:{"type":"canvas","size":[122,122],"pos":[313,120],"locked":1,"scale":1}
b1:{"type":"canvas","size":[266,11],"pos":[236,80],"locked":1,"scale":1}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"WAVE[]"}
field1:{"type":"field","size":[207,130],"pos":[16,46],"locked":1,"border":1,"value":{"text":["","wave[targets box speed]","\n\nFind widgets overlapping a bounding box and make them wave sinusoidally. If the bounding box is taller than wide, the widgets will wave vertically.\n\n-","targets",": a card, or a dict/list of widgets\n\n-","box",": any widget\n\n-","speed",": a number "],"font":["","mono","","mono","","mono","","mono",""],"arg":["","","","","","","","",""]}}
field2:{"type":"field","size":[218,62],"pos":[158,270],"script":"wave.1","style":"code","value":"on view do\n zazz.wave[card b1 0.002]\n zazz.wave[card b2 0.001]\n go[card]\nend"}
canvas1:{"type":"canvas","size":[28,26],"pos":[284,72],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAAAOAAAAHwAAAD+AAAA/wAAAf8AAAH/gAAD58AAA8fAAAfD4AAHweAAB//wAA//+AAf//gAH//8AD+AfAA8ADwAPAAYADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAA","brush":2}
canvas2:{"type":"canvas","size":[28,26],"pos":[316,69],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAAAOAAAAHwAAAD+AAAA/wAAAf8AAAH/gAAD58AAA8fAAAfD4AAHweAAB//wAA//+AAf//gAH//8AD+AfAA8ADwAPAAYADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAA","brush":2}
canvas3:{"type":"canvas","size":[28,26],"pos":[348,67],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAAAOAAAAHwAAAD+AAAA/wAAAf8AAAH/gAAD58AAA8fAAAfD4AAHweAAB//wAA//+AAf//gAH//8AD+AfAA8ADwAPAAYADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAA","brush":2}
canvas4:{"type":"canvas","size":[28,26],"pos":[380,67],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAAAOAAAAHwAAAD+AAAA/wAAAf8AAAH/gAAD58AAA8fAAAfD4AAHweAAB//wAA//+AAf//gAH//8AD+AfAA8ADwAPAAYADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAA","brush":2}
canvas5:{"type":"canvas","size":[28,26],"pos":[411,67],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAAAOAAAAHwAAAD+AAAA/wAAAf8AAAH/gAAD58AAA8fAAAfD4AAHweAAB//wAA//+AAf//gAH//8AD+AfAA8ADwAPAAYADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAA","brush":2}
canvas6:{"type":"canvas","size":[28,26],"pos":[443,67],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAAAOAAAAHwAAAD+AAAA/wAAAf8AAAH/gAAD58AAA8fAAAfD4AAHweAAB//wAA//+AAf//gAH//8AD+AfAA8ADwAPAAYADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAA","brush":2}
canvas7:{"type":"canvas","size":[28,26],"pos":[352,134],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAA/8AAAf/8AAH//gAA//4AAPB/AADwPwAA//8AAP/+AAD//AAA//8AAPD/gADwP4AA8AfAAPAHwADwB8AA8A/AAP//gAD//wAAf/4AAD/4AAAAAAAAAAAAAAAAAA","brush":2}
canvas8:{"type":"canvas","size":[28,26],"pos":[420,167],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAA/8AAAf/8AAH//gAA//4AAPB/AADwPwAA//8AAP/+AAD//AAA//8AAPD/gADwP4AA8AfAAPAHwADwB8AA8A/AAP//gAD//wAAf/4AAD/4AAAAAAAAAAAAAAAAAA","brush":2}
canvas9:{"type":"canvas","size":[28,26],"pos":[302,202],"locked":1,"image":"%%IMG0ABwAGgAAAAAAAAAAAAAAAA/8AAAf/8AAH//gAA//4AAPB/AADwPwAA//8AAP/+AAD//AAA//8AAPD/gADwP4AA8AfAAPAHwADwB8AA8A/AAP//gAD//wAAf/4AAD/4AAAAAAAAAAAAAAAAAA","brush":2}
b12:{"type":"field","size":[23,12],"pos":[234,66],"locked":1,"border":0,"style":"plain","value":"b1"}
field3:{"type":"field","size":[23,12],"pos":[306,106],"locked":1,"border":0,"style":"plain","value":"b2"}
field4:{"type":"field","size":[207,83],"pos":[16,180],"locked":1,"border":1,"value":{"text":["","inbox[targets box]","\n\nFind widgets overlapping a bounding box.\n\n-","targets",": a card, or a dict/list of widgets\n\n-","box",": any widget"],"font":["","mono","","mono","","mono",""],"arg":["","","","","","",""]}}

{script:wave.0}
on view do
 zazz.wave[card b1 0.002]
 zazz.wave[card b2 0.001]
 go[card]
end
{end}

{script:wave.1}
on change val do
 card.script:me.text
end
{end}

{card:bob}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8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/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AHc="
script:"bob.0"
{widgets}
galena_shadow:{"type":"canvas","size":[37,12],"pos":[341,195],"locked":1,"show":"transparent","border":1,"image":"%%IMG2ACUADAAxAQ4AEgEYAAsBHAAHASAABAEiAAMBIgADASIABAEgAAcBHAALARgAEgEOAAs=","scale":1}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"BOB[]"}
field1:{"type":"field","size":[213,128],"pos":[17,109],"locked":1,"border":1,"value":{"text":["","bob[targets speed]","\n\nFind widgets with a canvas that matches their name with a \"_shadow\" suffix, and make them bob in midair with an oval shadow. The position and bobbing intensity of the target widget will be determined by the shadow size/position.\n\n-","targets",": a card, or a dict/list of widgets\n\n-","speed",": a number"],"font":["","mono","","mono","","mono",""],"arg":["","","","","","",""]}}
field2:{"type":"field","size":[218,51],"pos":[159,276],"script":"wave.1","style":"code","value":"on view do\n zazz.bob[card 0.003]\n go[card]\nend"}
galena:{"type":"canvas","size":[51,91],"pos":[334,102],"locked":1,"show":"transparent","border":0,"image":"%%IMG2ADMAWwDvIAQALyADAQIALSADAQEgAwAqIAYBAiABACggAwEBIAQBASACACYgBwEBIAIBASACAQEAJCADAQEgBQECIAIBASABACIgAwEBIAIBASAFAQEgAgEBIAEAIiAFAQEgAwECIAIBAiABAQEgAQAgIAEBASAFAQEgAgEBIAEBAiACAQEgAgAgIAQBAyABAQEgCAEBIAEAHyAEAQEgAwEBIAIBASABAQEgAQECIAIBAQAfIAEBASABAQIgAQECIAEBASABAQIgBAEBIAMAHiADAQIgAgEEIAIBBCAEAB0gAgECIAEBASACAQEgAwEBIAEBAyACACABASADAQEgAQECIAEBASABAQEgAQEBIAIBAgAgIAMBASACAQIgAgEDIAIBAyABAQEAHyABAQEgAgEFIAEBAyABAQEgAgECIAEAHwECIAEBAiABAQEgAgEEIAIBBCABAB8gAgEDIAEBCyABAQIAHgECIAEBBSABAQogAQEBAB4gAgEFIAEBASABAQogAQAeIAEBFAAeIAEBCCABAQYgAQEEAB0BCCABAQogAQECABsBASACAQMgAQEGIAEBCgAZAQEgAgECIAEBCiABAQMgAQEBIAIBAgAXAQEgAwEBIAEBAiABAQ0gAQEEIAEAFiAFAQEgAQETIAIBAQAVIAcBBSABARAgAQAVIAEBASABAQEgAwEBIAEBFgATIAEBASABAQIgAwEBIAEBASABAQggAQELABIgAwECIAIBAiABAQEgAgEDIAEBEQAQAQEgAgEBIAEBASACAQMgAQEKIAEBDAAPAQEgAQECIAEBASABAQIgAgEEIAEBASACAQIgAQEOAA8BASACAQIgAQEBIAEBASABAQMgAQEHIAEBByABAQYgAQAOIAEBAyABAQEgAQEEIAEBAiABAQogAQELIAEADQEBIAEBASADAQEgAgEHIAEBFCABAA0gAQEBIAEBASABAQIgAgEdIAEADAEDIAEBASABAQMgAQEBIAEBGSABAQEADAEDIAIBASABAQcgAQEWIAEBAgALAQEgAgEjIAEBAQALAQwgAQEaAAwBJwAMARkgAQEMAA0BJgANAQEgAQEkAAwBBCABASIACwEDIAEBIwAMIAEBJSABAAwBASACASQACwECIAIBIwAMAScADAECIAEBJAAMIAEBAiABASMADAEVIAEBEAANASYADQEFIAEBIAAOASUADgEUIAEBDwAQASMAEQEhABMgAQEQIAEBDQAVIAMBCyABAQ8AGQEYABsgAQEWAB0gAQETACABDiABAQMAISABAQIAAiABAQUABQECACEgAQECAA0BAwAgIAEBAgAOAQIAIQEDAA0gAQECACAgAQECAA0gAQECACAgAQECAA0gAQEDAB4BBQAMIAEBBAAcIAEBBgAKAQcAGyABAQMgAQEDAAggAQEIABoBAwACIAEBAgAHIAEBAyABAQYAGQEDAAIgAQEDAAYgAQEDAAEBAyABAQMAGAECAAQBAwAGIAEBAgACAQIAAiABAQIAGCABAAUBAgAHIAEBAgACAQIAAwECAB4BAgAIIAEAAiABAQIAAwECAB4BAgAMAQIAAwECAB8BAQALIAEBAgAkAQEACyABAQIAMCABAQEAMSACABA=","scale":1}
b12:{"type":"field","size":[47,16],"pos":[436,136],"locked":1,"border":0,"style":"plain","value":"galena"}
field3:{"type":"field","size":[77,16],"pos":[431,194],"locked":1,"border":0,"style":"plain","value":"galena_shadow"}

{script:bob.0}
on view do
 zazz.bob[card 0.003]
 go[card]
end
{end}

{card:march}
script:"march.0"
{widgets}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"MARCH[]"}
field1:{"type":"field","size":[236,131],"pos":[14,47],"locked":1,"border":1,"value":{"text":["","march[nodes target speed offset]","\n\nMove a target between a series of widgets.\n\n-","nodes",": a list of widgets\n\n-","target",": any widget\n\n-","speed",": a number\n\n- ","offset",": a number between 0 and 1 representing the fraction of the path to advance"],"font":["","mono","","mono","","mono","","mono","","mono",""],"arg":["","","","","","","","","","",""]}}
field2:{"type":"field","size":[257,54],"pos":[143,279],"script":"wave.1","style":"code","value":"on view do\n zazz.march[p1,p2,p3,p4,p5 galena  0.05]\n go[card]\nend"}
p1:{"type":"canvas","size":[18,17],"pos":[279,94],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAAQAAAwAA4QAAkQAAkQAAkQAA4QAAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p2:{"type":"canvas","size":[18,17],"pos":[373,65],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAA4AABEAA4EAAkIAAkQAAkgAA58AAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p5:{"type":"canvas","size":[18,17],"pos":[295,194],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAB8AABAAA54AAkEAAkEAAlEAA44AAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p4:{"type":"canvas","size":[18,17],"pos":[417,194],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAAIAAAYAA4oAAlIAAl8AAkIAA4IAAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p3:{"type":"canvas","size":[18,17],"pos":[413,136],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAB8AAAIAA4QAAk4AAkEAAlEAA44AAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
field3:{"type":"field","size":[236,89],"pos":[14,183],"locked":1,"border":1,"value":{"text":["","path[nodes offset]","\n\nCalculate a position along a path, as used by march[]\n\n-","nodes",": a list of widgets\n\n- ","offset",": a number between 0 and 1 representing the fraction of the path"],"font":["","mono","","mono","","mono",""],"arg":["","","","","","",""]}}
galena:{"type":"canvas","size":[51,91],"pos":[397,114],"locked":1,"show":"transparent","border":0,"image":"%%IMG2ADMAWwDvIAQALyADAQIALSADAQEgAwAqIAYBAiABACggAwEBIAQBASACACYgBwEBIAIBASACAQEAJCADAQEgBQECIAIBASABACIgAwEBIAIBASAFAQEgAgEBIAEAIiAFAQEgAwECIAIBAiABAQEgAQAgIAEBASAFAQEgAgEBIAEBAiACAQEgAgAgIAQBAyABAQEgCAEBIAEAHyAEAQEgAwEBIAIBASABAQEgAQECIAIBAQAfIAEBASABAQIgAQECIAEBASABAQIgBAEBIAMAHiADAQIgAgEEIAIBBCAEAB0gAgECIAEBASACAQEgAwEBIAEBAyACACABASADAQEgAQECIAEBASABAQEgAQEBIAIBAgAgIAMBASACAQIgAgEDIAIBAyABAQEAHyABAQEgAgEFIAEBAyABAQEgAgECIAEAHwECIAEBAiABAQEgAgEEIAIBBCABAB8gAgEDIAEBCyABAQIAHgECIAEBBSABAQogAQEBAB4gAgEFIAEBASABAQogAQAeIAEBFAAeIAEBCCABAQYgAQEEAB0BCCABAQogAQECABsBASACAQMgAQEGIAEBCgAZAQEgAgECIAEBCiABAQMgAQEBIAIBAgAXAQEgAwEBIAEBAiABAQ0gAQEEIAEAFiAFAQEgAQETIAIBAQAVIAcBBSABARAgAQAVIAEBASABAQEgAwEBIAEBFgATIAEBASABAQIgAwEBIAEBASABAQggAQELABIgAwECIAIBAiABAQEgAgEDIAEBEQAQAQEgAgEBIAEBASACAQMgAQEKIAEBDAAPAQEgAQECIAEBASABAQIgAgEEIAEBASACAQIgAQEOAA8BASACAQIgAQEBIAEBASABAQMgAQEHIAEBByABAQYgAQAOIAEBAyABAQEgAQEEIAEBAiABAQogAQELIAEADQEBIAEBASADAQEgAgEHIAEBFCABAA0gAQEBIAEBASABAQIgAgEdIAEADAEDIAEBASABAQMgAQEBIAEBGSABAQEADAEDIAIBASABAQcgAQEWIAEBAgALAQEgAgEjIAEBAQALAQwgAQEaAAwBJwAMARkgAQEMAA0BJgANAQEgAQEkAAwBBCABASIACwEDIAEBIwAMIAEBJSABAAwBASACASQACwECIAIBIwAMAScADAECIAEBJAAMIAEBAiABASMADAEVIAEBEAANASYADQEFIAEBIAAOASUADgEUIAEBDwAQASMAEQEhABMgAQEQIAEBDQAVIAMBCyABAQ8AGQEYABsgAQEWAB0gAQETACABDiABAQMAISABAQIAAiABAQUABQECACEgAQECAA0BAwAgIAEBAgAOAQIAIQEDAA0gAQECACAgAQECAA0gAQECACAgAQECAA0gAQEDAB4BBQAMIAEBBAAcIAEBBgAKAQcAGyABAQMgAQEDAAggAQEIABoBAwACIAEBAgAHIAEBAyABAQYAGQEDAAIgAQEDAAYgAQEDAAEBAyABAQMAGAECAAQBAwAGIAEBAgACAQIAAiABAQIAGCABAAUBAgAHIAEBAgACAQIAAwECAB4BAgAIIAEAAiABAQIAAwECAB4BAgAMAQIAAwECAB8BAQALIAEBAgAkAQEACyABAQIAMCABAQEAMSACABA=","scale":1}

{script:march.0}
on view do
 zazz.march[p1,p2,p3,p4,p5 galena  0.05]
 go[card]
end
{end}

{card:combination}
script:"combination.0"
{widgets}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"COMBINING FUNCTIONS"}
field1:{"type":"field","size":[150,82],"pos":[15,112],"locked":1,"border":0,"value":"Many interesting effects are possible if you combine Zazz functions.\n\nIn this example, a bobbing chicken is made to move around by telling her shadow to march!"}
field2:{"type":"field","size":[293,62],"pos":[114,271],"script":"wave.1","style":"code","value":"on view do\n zazz.march[p1,p2,p3,p4,p5 galena_shadow 0.05]\n zazz.bob[card 0.005]\n go[card]\nend"}
p1:{"type":"canvas","size":[18,17],"pos":[211,137],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAAQAAAwAA4QAAkQAAkQAAkQAA4QAAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p2:{"type":"canvas","size":[18,17],"pos":[439,134],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAA4AABEAA4EAAkIAAkQAAkgAA58AAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p5:{"type":"canvas","size":[18,17],"pos":[238,222],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAB8AABAAA54AAkEAAkEAAlEAA44AAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p4:{"type":"canvas","size":[18,17],"pos":[415,248],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAAIAAAYAA4oAAlIAAl8AAkIAA4IAAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
p3:{"type":"canvas","size":[18,17],"pos":[336,170],"locked":1,"image":"%%IMG0ABIAEQAAAAAAAAAAAAAAAAB8AAAIAA4QAAk4AAkEAAlEAA44AAgAAAgAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
galena_shadow:{"type":"canvas","size":[37,12],"pos":[378,246],"locked":1,"show":"transparent","border":0,"image":"%%IMG2ACUADABUARIAEAEYAAsBHAAIAR4ABwEeAAcBHgAIARwACwEYABABEgAu","scale":1}
galena:{"type":"canvas","size":[51,91],"pos":[371,147],"locked":1,"show":"transparent","border":0,"image":"%%IMG2ADMAWwDvIAQALyADAQIALSADAQEgAwAqIAYBAiABACggAwEBIAQBASACACYgBwEBIAIBASACAQEAJCADAQEgBQECIAIBASABACIgAwEBIAIBASAFAQEgAgEBIAEAIiAFAQEgAwECIAIBAiABAQEgAQAgIAEBASAFAQEgAgEBIAEBAiACAQEgAgAgIAQBAyABAQEgCAEBIAEAHyAEAQEgAwEBIAIBASABAQEgAQECIAIBAQAfIAEBASABAQIgAQECIAEBASABAQIgBAEBIAMAHiADAQIgAgEEIAIBBCAEAB0gAgECIAEBASACAQEgAwEBIAEBAyACACABASADAQEgAQECIAEBASABAQEgAQEBIAIBAgAgIAMBASACAQIgAgEDIAIBAyABAQEAHyABAQEgAgEFIAEBAyABAQEgAgECIAEAHwECIAEBAiABAQEgAgEEIAIBBCABAB8gAgEDIAEBCyABAQIAHgECIAEBBSABAQogAQEBAB4gAgEFIAEBASABAQogAQAeIAEBFAAeIAEBCCABAQYgAQEEAB0BCCABAQogAQECABsBASACAQMgAQEGIAEBCgAZAQEgAgECIAEBCiABAQMgAQEBIAIBAgAXAQEgAwEBIAEBAiABAQ0gAQEEIAEAFiAFAQEgAQETIAIBAQAVIAcBBSABARAgAQAVIAEBASABAQEgAwEBIAEBFgATIAEBASABAQIgAwEBIAEBASABAQggAQELABIgAwECIAIBAiABAQEgAgEDIAEBEQAQAQEgAgEBIAEBASACAQMgAQEKIAEBDAAPAQEgAQECIAEBASABAQIgAgEEIAEBASACAQIgAQEOAA8BASACAQIgAQEBIAEBASABAQMgAQEHIAEBByABAQYgAQAOIAEBAyABAQEgAQEEIAEBAiABAQogAQELIAEADQEBIAEBASADAQEgAgEHIAEBFCABAA0gAQEBIAEBASABAQIgAgEdIAEADAEDIAEBASABAQMgAQEBIAEBGSABAQEADAEDIAIBASABAQcgAQEWIAEBAgALAQEgAgEjIAEBAQALAQwgAQEaAAwBJwAMARkgAQEMAA0BJgANAQEgAQEkAAwBBCABASIACwEDIAEBIwAMIAEBJSABAAwBASACASQACwECIAIBIwAMAScADAECIAEBJAAMIAEBAiABASMADAEVIAEBEAANASYADQEFIAEBIAAOASUADgEUIAEBDwAQASMAEQEhABMgAQEQIAEBDQAVIAMBCyABAQ8AGQEYABsgAQEWAB0gAQETACABDiABAQMAISABAQ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J8BAwBbAQMA/wChAQMAWQEDAP8AogEDAFgBAwD/AKMBAwBXAQMA/wClAQMAVQEDAP8ApwEDAFQBAwD/AKcBAwBTAQMA/wCpAQMAUQEDAP8AqgEDAFABAwD/AKsBAwBQAQMA/wCsAQMATgEDAP8ArQEDAEwBBAD/AK8BAwA+AQEACwEEAP8AsAEDAD0BAwAJAQQA/wCyAQMAPAEDAAcBBAD/ALUBAwA7AQMABgEEAP8AtwEDADoBAwAEAQUA/wC5AQMAOQEDAAMBBAD/ALwBAwA3AQMAAQEGAP8AvgEDADYBCAD/AMEBAwA0AQgA/wDCAQMANAEGAP8AxQEDADIBEAD/AL0BAwAyARAA/wC9AQMAMgEOAP8AvwEDAP8A/wEEAP8A/gEEAP8A/gEEAP8A/wEFAP8A/QEFAP8A/QEFAP8A/wEFAP8A/QEFAP8A/QEFAP8A/wEBAP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AAw="
script:"scroll.0"
{widgets}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"home.0","show":"invert","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"SCROLL[]"}
field1:{"type":"field","size":[236,116],"pos":[18,98],"locked":1,"border":1,"value":{"text":["","scroll[target dir]","\n\nScroll the contents of a canvas, image, or card background in-place. Can be used for a variety of effects, including marquees.\n\n-","target",": the image source to scroll\n\n-","dir",":either an (x,y) offset pair or one of the strings \"n\", \"ne\", \"e\", \"se\", \"s\", \"sw\", \"w\",  or \"nw\""],"font":["","mono","","mono","","mono",""],"arg":["","","","","","",""]}}
field2:{"type":"field","size":[289,54],"pos":[122,275],"script":"wave.1","style":"code","value":"on view do\n zazz.scroll[checkers (first dir.rowvalue)]\n go[card]\nend"}
checkers:{"type":"canvas","size":[100,100],"pos":[288,107],"locked":1,"image":"%%IMG0AGQAZAD/wA/8AP/AD/wA/8AA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/AD/wAD/wA/8AP/AD/wA/8AA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/AD/wAD/wA/8AP/AD/wA/8AA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/AD/wAD/wA/8AP/AD/wA/8D/AD/wA/8AP/AD/wAw/wA/8AP/AD/wA/8AMP8AP/AD/wA/8AP/ADD/AD/wA/8AP/AD/wAw/wA/8AP/AD/wA/8AMP8AP/AD/wA/8AP/ADD/AD/wA/8AP/AD/wAw/wA/8AP/AD/wA/8AMP8AP/AD/wA/8AP/ADD/AD/wA/8AP/AD/wAwAP/AD/wA/8AP/AD/wAD/wA/8AP/AD/wA/8AA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/AD/wAD/wA/8AP/AD/wA/8AA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/AD/wAD/wA/8AP/AD/wA/8AA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/AD/wP8AP/AD/wA/8AP/ADD/AD/wA/8AP/AD/wAw/wA/8AP/AD/wA/8AMP8AP/AD/wA/8AP/ADD/AD/wA/8AP/AD/wAw/wA/8AP/AD/wA/8AMP8AP/AD/wA/8AP/ADD/AD/wA/8AP/AD/wAw/wA/8AP/AD/wA/8AMP8AP/AD/wA/8AP/ADAA/8AP/AD/wA/8AP/AAP/AD/wA/8AP/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":"grid","size":[43,123],"pos":[436,89],"scrollbar":0,"lines":0,"value":{"dir":["n","ne","e","se","s","sw","w","nw"]},"row":3}
field3:{"type":"field","size":[45,14],"pos":[286,93],"locked":1,"border":0,"style":"plain","value":"checkers"}

{script:scroll.0}
on view do
 zazz.scroll[checkers (first dir.rowvalue)]
 go[card]
end
{end}

{card:flipbook}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD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A/wCyAQMARwEEAP8AtAEDAEUBAwD/ALcBAwBDAQMA/wC4AQMAQQEEAP8AugEDADQBAQAKAQQA/wC7AQMAMwEDAAcBBQD/ALwBAwAzAQMABgEEAP8AvwEDADEBAwAEAQYA/wDBAQMAMAEDAAMBBQD/AMQBAwAuAQMAAwEFAP8AxgEDAC0BCAD/AMkBAwAtAQcA/wDLAQMAKwEHAP8AzQEDACkBCwD/AMsBAwAoAQwA/wDLAQMAKAEMAP8AywEDADEBAQD/AM0BAwD/AP8BBAD/AP4BBQD/AP0BBQD/AP4BBgD/AP0BBQD/AP0BAwD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AEA=="
script:"flipbook.0"
{widgets}
button1:{"type":"button","size":[60,34],"pos":[439,297],"script":"flipbook.1","show":"invert","text":"Home","style":"rect"}
button2:{"type":"button","size":[60,34],"pos":[14,295],"script":"overview.1","show":"invert","text":"Prev","style":"rect"}
title:{"type":"field","size":[225,16],"pos":[134,25],"locked":1,"font":"menu","show":"invert","style":"plain","align":"center","value":"FLIPBOOK[]"}
field1:{"type":"field","size":[261,220],"pos":[9,47],"border":1,"value":{"text":["","flipbook[target source speed frames]","\n\nDraw a sequence of frames of animation from a source to a destination canvas.\n\n-","target",": the canvas, image, or card to draw to. the size of the target determines frame size\n\n-","source",": a canvas, image or card composed of frames, which may be laid out in a vertical strip, horizontal strip, or a grid. if the source is a non-canvas widget, like a button, use a piece of the parent card's background image according to the widget's bounding box.\n\n-","speed",": a number\n\n-","frames",": if specified, a list of frame indexes to loop. if not given, every frame in the sheet will be played in sequence"],"font":["","mono","","mono","","mono","","mono","","mono",""],"arg":["","","","","","","","","","",""]}}
field2:{"type":"field","size":[289,54],"pos":[122,275],"script":"wave.1","style":"code","value":"on view do\n zazz.flipbook[frame horses 0.02 (range 15)]\n go[card]\nend"}
frame:{"type":"canvas","size":[95,64],"pos":[281,137],"locked":1,"volatile":1,"scale":1}
horses:{"type":"canvas","size":[102,69],"pos":[396,135],"locked":1,"image":"%%[encoded data, 18780 characters]","scale":0.25}
field3:{"type":"field","size":[45,14],"pos":[278,122],"locked":1,"border":0,"style":"plain","value":"frame"}
field4:{"type":"field","size":[45,14],"pos":[392,121],"locked":1,"border":0,"style":"plain","value":"horses"}

{script:flipbook.0}
on view do
 zazz.flipbook[frame horses 0.02 (range 15)]
 go[card]
end
{end}

{script:flipbook.1}
on click do
 go["First" "BoxOut"]
end
{end}

{module:zazz}
description:"easy animation effects for your decks"
version:1.1
{script}

on inbox targets box do
 on overlaps a do min(a.pos<box.pos+box.size),box.pos<a.pos+a.size end
 if "card"~typeof targets targets:targets.widgets end
 if "list"~typeof targets targets:(targets..name)dict targets end
 r:select where overlaps @ value from box.name drop targets
 r.key dict r.value
end

on wave targets box speed do
 targets:inbox[targets box]
 a:if box.size[0]>box.size[1] 0,1 else 1,0 end # axis
 m:sum.5*a*box.size # magnitude
 b:m+sum a*box.pos  # baseline
 each v in targets
  v.pos:(v.pos*!a)+a*(-a*.5*v.size)+b+m*sin(sum v.pos*!a)+sys.ms*speed
 end
end

on bob targets speed do
 if "card"~typeof targets targets:targets.widgets end
 if "list"~typeof targets targets:(targets..name)dict targets end
 r:select val:value shad:r @ (list "%s_shadow") format key from r:targets
 r:select val shad where shad..type="canvas" from r
 on oval pos size do
  flip pos+size*flip unit 2*pi*(range 20)/20
 end
 each row index in rows r
  sprite:row.val
  shadow:row.shad
  a:sin index+sys.ms*speed
  h:shadow.size[1]/2
  c:shadow.pos[1]+h+h*a
  sprite.pos:((shadow.pos[0]+shadow.size[0]/2)-(sprite.size[0]/2)),c-1.1*sprite.size[1]
  o:shadow.size/2
  shadow.clear[]
  shadow.pattern:1
  shadow.poly[oval[o (.9*o)+.1*o*a]]
 end
end

on path nodes offset do
 points:(nodes..pos)+.5*nodes..size
 len:sum lens:mag points-1 drop points,1 take points
 here:len*offset-floor offset
 i:0 while here>lens[i] here:here-lens[i] i:i+1 end
 on lerp a b t do (b*t)+(a*1-t) end
 lerp[points[(count points)%i] points[(count points)%i+1] 1&0|here/lens[i]]
end

on march nodes target speed offset do
 points:(nodes..pos)+.5*nodes..size
 len:sum mag points-1 drop points,1 take points
 tween:(len%floor sys.ms*speed)/len
 target.pos:path[nodes offset+tween]-.5*target.size
end

lup.nw:-1,-1  lup.n : 0,-1  lup.ne: 1,-1
lup.w :-1, 0                lup.e : 1, 0
lup.sw:-1, 1  lup.s : 0, 1  lup.se: 1, 1
on scroll target offset do
 if "card"~typeof target target:target.image end
 if "string"~typeof offset offset:lup[offset] end
 target.paste[target.copy[].translate[offset 1]]
end

on flipbook target source speed frames do
 if "card"~typeof target target:target.image end
 if "card"~typeof source source:source.image end
 if "canvas"~typeof source source:source.copy[] end
 if !"image"~typeof source source:source.parent.image.copy[source.pos source.size] end
 fc:floor source.size/target.size
 fr:(range prod fc) unless frames
 fi:fr[(count fr)%floor sys.ms*speed]
 target.paste[source.copy[target.size*floor(fc[0]%fi),(fi/fc[0]) target.size]]
end

module.inbox:inbox
module.wave:wave
module.bob:bob
module.path:path
module.march:march
module.scroll:scroll
module.flipbook:flipbook
{end}

