User:Jaime Prilusky/Test/multi-scene

From Proteopedia

< User:Jaime Prilusky(Difference between revisions)
Jump to: navigation, search
Current revision (08:35, 17 October 2024) (edit) (undo)
 
(2 intermediate revisions not shown.)
Line 1: Line 1:
 +
===Multi-scene button/link===
<StructureSection load='' size='340' side='right' caption='' scene=''>
<StructureSection load='' size='340' side='right' caption='' scene=''>
-
 
+
* <jmol>
-
 
+
-
<jmol>
+
<jmollink>
<jmollink>
<text>multi-scene</text>
<text>multi-scene</text>
Line 11: Line 10:
</script>
</script>
</jmollink>
</jmollink>
-
</jmol>, just displaying one scene after another
+
</jmol>, just displaying one scene after another, once.
-
<jmol>
+
* This <jmol>
<jmolButton>
<jmolButton>
<text>multi-scene</text>
<text>multi-scene</text>
<script>
<script>
-
script /wiki/scripts/10/1051440/3rec/1.spt
+
var a = [1,2,3];
-
script /wiki/scripts/10/1051455/1crn_121/1.spt
+
for(var i IN a) {
-
script /wiki/scripts/96/961168/1ejg_simple/1.spt
+
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>
</script>
</jmolButton>
</jmolButton>
-
</jmol>, just displaying one scene after another
+
</jmol> 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 <b>delay 0.5;</b> between scenes, where the value is in seconds, and, of course, repeat scenes on the list.
Quite primitive, with a list of scenes to display when you click the link or the button. You may add <b>delay 0.5;</b> between scenes, where the value is in seconds, and, of course, repeat scenes on the list.
-
We can try to add a loop or another form of flow-control over the list.
+
We can try to add a '''better loop''' or another form of '''flow-control''' over the list.
 +
<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 38: 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/>

Current revision

Multi-scene button/link

Drag the structure with the mouse to rotate

Proteopedia Page Contributors and Editors (what is this?)

Jaime Prilusky

Personal tools