You may 'register' a Babel function or variable into the HTML document. After it is declared in Babel, use window["myFunctiom"]=myFunction
to make it available.
A 'Run Again' button, placed in the HTML document, can be used to restart the animation by a call to a 'registered' function in Babel. Also the value in the 'Render Count' input text element is sent from Babel.