In the step functions for both ManualGeneExpressionModel.js and MessengerRnaProductionModel.js I'm seeing code that looks like this:
if ( dt > 0.2 ) {
return;
}
This means that when long dt values come in, the model won't advance at all. It might improve the visual performance of the simulation to instead limit the dt value to a some max value that the sim is known to be able to handle, perhaps something like this:
// (in the constants area)
var NOMINAL_TIME_STEP = 1/60; // nominal time step for 60fps
var MAX_TIME_STEP = 3 * NOMINAL_TIME_STEP; // max time step that the model is known to handle well
.
.
.
// (in the step function)
// limit time step the max value that the model can handle
dt = Math.min( dt, MAX_TIME_STEP );
In the
step
functions for bothManualGeneExpressionModel.js
andMessengerRnaProductionModel.js
I'm seeing code that looks like this:This means that when long dt values come in, the model won't advance at all. It might improve the visual performance of the simulation to instead limit the dt value to a some max value that the sim is known to be able to handle, perhaps something like this: