User:Jaime Prilusky/Test/multi-scene: Difference between revisions

From Proteopedia
Jump to navigation Jump to search
Jaime Prilusky (talk | contribs)
No edit summary
Jaime Prilusky (talk | contribs)
No edit summary
 
Line 31: Line 31:
<b>Note:</b> scenes don't clear the color-reference area. This needs to be fixed, so color reference will not remain for subsequent scenes.
<b>Note:</b> scenes don't clear the color-reference area. This needs to be fixed, so color reference will not remain for subsequent scenes.


* The current code is like this:
* The simple code is like this:
<pre>
<pre>
<jmol>
<jmol>
Line 42: Line 42:
     </script>
     </script>
   </jmolButton>
   </jmolButton>
</jmol>
</pre>
* and this for the repetition
<pre>
<jmol>
<jmolButton>
  <text>multi-scene</text>
  <script>
    var a = [1,2,3];
    for(var i IN a) {
      script /wiki/scripts/10/1051440/3rec/1.spt;
      script /wiki/scripts/10/1051455/1crn_121/1.spt;
      script /wiki/scripts/96/961168/1ejg_simple/1.spt;
      delay 0.5;
    }
  </script>
</jmolButton>
</jmol>
</jmol>
</pre>
</pre>
</StructureSection>
</StructureSection>
<references/>
<references/>

Latest revision as of 11:35, 17 October 2024

Multi-scene button/linkMulti-scene button/link

  • , just displaying one scene after another, once.
  • This repeats three times the series of scenes.

Quite primitive, with a list of scenes to display when you click the link or the button. You may add delay 0.5; between scenes, where the value is in seconds, and, of course, repeat scenes on the list.

We can try to add a better loop or another form of flow-control over the list. Note: scenes don't clear the color-reference area. This needs to be fixed, so color reference will not remain for subsequent scenes.

  • The simple code is like this:
<jmol>
  <jmolButton>
    <text>multi-scene</text>
    <script>
      script /wiki/scripts/10/1051440/3rec/1.spt
      script /wiki/scripts/10/1051455/1crn_121/1.spt
      script /wiki/scripts/96/961168/1ejg_simple/1.spt
    </script>
  </jmolButton>
</jmol>
  • and this for the repetition
<jmol>

<jmolButton>

 <text>multi-scene</text>
 <script>
   var a = [1,2,3];
   for(var i IN a) {
     script /wiki/scripts/10/1051440/3rec/1.spt;
     script /wiki/scripts/10/1051455/1crn_121/1.spt;
     script /wiki/scripts/96/961168/1ejg_simple/1.spt;
     delay 0.5;
   }
 </script>

</jmolButton> </jmol>

Drag the structure with the mouse to rotate