Proteopedia:DIY:Macros: Difference between revisions

Wayne Decatur (talk | contribs)
mNo edit summary
Wayne Decatur (talk | contribs)
mNo edit summary
Line 15: Line 15:
Integrating macro use into JSmol code is straightforward.
Integrating macro use into JSmol code is straightforward.


'''Example #1: Calling a basic macro function'''
'''Example #1: Calling a simple macro function'''


This example doesn't require any parameter to act. It causes the structure shown to 'bobble'.
This example doesn't require any parameter to act. It causes the structure shown to 'bobble'.
Line 61: Line 61:
</pre>
</pre>


The <code><nowiki>bobble()</nowiki></code> button triggers the action. The other button uses <code><nowiki>exit</nowiki></code> to stop the looping bobble.</br>
The <code><nowiki>bobble()</nowiki></code> button triggers the action. The other button uses <code><nowiki>exit</nowiki></code> to stop the looping bobble.<br/>
You can try the result here:
You can try the result here:


Line 105: Line 105:
'''Example #3: Another showing supplying the macro a parameter'''
'''Example #3: Another showing supplying the macro a parameter'''
   
   
Example code:
Example code:


Proteopedia Page Contributors and Editors (what is this?)Proteopedia Page Contributors and Editors (what is this?)

Wayne Decatur