noncompiled/models/universe/Universe.js
//given a cycle configuration, "advance()" returns the cycle configuration that would occur after a given amount of time
given a cycle configuration, "advance()" returns the cycle configuration that would occur after a given amount of time
given a cycle configuration " advance () " returns the cycle configuration that would occur after a given amount of time
function advance(config, timestep, output, min_perceivable_period, max_perceivable_period) {
        output = output || {};
        for(var id in cycles){
            if (cycles[id] === void 0) { continue; }
            var period = cycles[id].motion.period();
            if (config[id]) { output[id] = config[id]};
            if (period < min_perceivable_period)     { continue; }
            if (period > max_perceivable_period)     { continue; }
            output[id] = ((config[id] || 0) + 2*Math.PI * (timestep / period)) % (2*Math.PI);
        }
        return output;
    }
function advance ( config , timestep , output , min_perceivable_period , max_perceivable_period ) { output = output || { } ; for ( var id in cycles ) { if ( cycles [ id ] === void 0 ) { continue ; } var period = cycles [ id ] . motion . period ( ) ; if ( config [ id ] ) { output [ id ] = config [ id ] } ; if ( period < min_perceivable_period ) { continue ; } if ( period > max_perceivable_period ) { continue ; } output [ id ] = ( ( config [ id ] || 0 ) + 2 * Math . PI * ( timestep / period ) ) % ( 2 * Math . PI ) ; } return output ; }
given a cycle configuration, "advance()" returns the cycle configuration that would occur after a given amount of time
given a cycle configuration " advance () " returns the cycle configuration that would occur after a given amount of time
// default to current value, if present // if cycle completes too fast for the user to perceive, don't simulate  // if cycle completes too slow for the user to perceive, don't simulate