Combine Proteopedia scenes with inline JSmol scripting: Difference between revisions

From Proteopedia
Jump to navigationJump to search
Wayne Decatur (talk | contribs)
m fix code formatting
Wayne Decatur (talk | contribs)
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 6: Line 6:
Let’s assume that the green link to your scene is <code><nowiki><scene name='41/413146/start_view/1'>Starting view</scene></nowiki></code>. You need to add <nowiki>load /wiki/scripts/</nowiki> before the name and <code><nowiki>.spt</nowiki></code> after it, as follows:
Let’s assume that the green link to your scene is <code><nowiki><scene name='41/413146/start_view/1'>Starting view</scene></nowiki></code>. You need to add <nowiki>load /wiki/scripts/</nowiki> before the name and <code><nowiki>.spt</nowiki></code> after it, as follows:


<pre>
<jmol>
<jmolLink>
<script>
load /wiki/scripts/41/413146/Space_fill/1.spt
… <additional JSmol scripted steps> …
</script>
<text>text to be the green scene link text</text>
</jmolLink>
</jmol>
</pre>


<blockquote><nowiki>
 
<jmol><br/>
Examples:
<jmolLink><br/>
* the 'Button' example at [[Jmol/Interactivity#Button|Jmol/Interactivity]]
<script><br/>
* An example of this in action can be seen in the script triggered by the scene link 'A progression from all atoms to cartoon' that illustrates the relationship of the protein backbone to the secondary structure representation as part of the [[Secondary_structure|Secondary structure]] page.
load /wiki/scripts/41/413146/Space_fill/1.spt<br/>
* [[User:Wayne_Decatur/SecStrFadeIn]]
… <additional JSmol scripted steps> …<br/>
 
</script><br/>
 
<text>text to be the green scene link text</text><br/>
==See Also==
</jmolLink><br/>
 
</jmol><br/>
* [[Proteopedia:Cookbook]]
</nowiki></blockquote>
* [[Jmol/Interactivity]]