/* -------------------------- */ /* app */ /* -------------------------- */ var __map = mapperplugin() // global mapper __map.state({'config': config}) // config register var rad = __map.state().config.form.rad // get initial rad from window context var superrad = __map.state().config.form.superrad // get initial superrad from window context var tx = __map.state().config.form.tx // get initial tx from window context var ty = __map.state().config.form.ty // get initial ty from window context var svglayer = svglayerplugin() // svg init __map.state({'tim': config.tim}) // timer register - animation __map.state({'scales': scalesplugin()}) // scales register var buttons = buttonsplugin() // superforms buttons init var animas = animasplugin() // animas buttons init __map.state({'consol': consolplugin()}) // console register var circleform = {"m":0.64,"n1":-1.57,"n2":0,"n3":10,"a":1,"b":1,"tx":tx,"ty":ty ,"rot":0,"rad":rad,'fill': 'transparent','stroke':'red'} var rectform = {"m":4,"n1":100,"n2":100,"n3":100,"a":1,"b":1,"tx":tx,"ty":ty,"rot":0,"rad":superrad,'fill': 'transparent','stroke':'green'} superform({'layer': 'circle'}).redraw(circleform) // circle render superform({'layer': 'square'}).redraw(rectform) // square render __map.state({'xsf': superform({'layer':'xsf',"tx":tx,"ty":ty})}) // register xsf __map.state({'animation':animationplugin(__map.state().xsf)}) // _register animation - animas, console ;( __map.state().config.startmode === 'anima' ) ? __map.state().animation.run( __map.state().config.animation.types.landscape) : // render animation __map.state().xsf.redraw( __map.state().config.form.types.butterfly) // render superform ;