Changeset 448 for experiments/frams/foraminifera
- Timestamp:
- 11/27/15 02:46:03 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.show
r446 r448 14 14 15 15 global Params; //to easily transfer changes in identical properties from this show to expdef 16 global last timescale; //to display time scale when it changes significantly16 global last_simspeed; //to display time scale when it changes significantly 17 17 18 18 function onLoad() 19 19 { 20 20 Simulator.init(); 21 last timescale=0;21 last_simspeed=0; 22 22 GLDisplay.desiredsimspeed = 50; 23 23 GLDisplay.minfps = 10; … … 38 38 } 39 39 40 function updateBanner( timescale)40 function updateBanner() 41 41 { 42 42 GLDisplay.banner="World size is %g mm." % (framsToMicrons(World.wrldsiz)/1000); 43 GLDisplay.banner+="\nShowing real-time x %g." % time scale;43 GLDisplay.banner+="\nShowing real-time x %g." % timeScale(); 44 44 } 45 45 46 46 function onShowStep() 47 47 { 48 var timescale=timeScale(); 49 if (timescale<lasttimescale*0.9 || timescale>lasttimescale*1.1) //significant change 48 if (Simulator.simspeed<last_simspeed*0.9 || Simulator.simspeed>last_simspeed*1.1) //significant change 50 49 { 51 updateBanner( timescale);52 last timescale=timescale;50 updateBanner(); 51 last_simspeed=Simulator.simspeed; 53 52 } 54 53 }
Note: See TracChangeset
for help on using the changeset viewer.