Changeset 583 for experiments/frams/foraminifera
- Timestamp:
- 08/18/16 15:35:44 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r582 r583 399 399 { 400 400 addReticulopodia(cr, curRadius); 401 }402 moveReticulopodia(cr);401 moveReticulopodia(cr); 402 } 403 403 } 404 404 … … 460 460 } 461 461 return cr; 462 } 463 464 function visualizeChamberGrowth(cr, chamber_time) 465 { 466 var total_time = secToSimSteps(ExpProperties.chamberGrowthSec); 467 var ret_unit = total_time/chamber_vis_denominator; 468 var chamber_unit = total_time-ret_unit; 469 470 if (chamber_time < ret_unit || chamber_time >= chamber_unit) 471 { 472 var new_rad = Math.min(Math.max((chamber_time%ret_unit)/ret_unit*getZoneRange(cr,1),0.01),getZoneRange(cr,1)); 473 474 if(chamber_time < ret_unit) 475 { 476 new_rad = getZoneRange(cr,1)-new_rad; 477 } 478 479 curColor = colors[cr.data->lifeparams->gen]; 480 addReticulopodia(cr,new_rad); 481 482 if (chamber_time == 0)//checking for end of chamber growth process 483 { 484 cr.data->lifeparams->chamber_growth = -1; 485 } 486 } 487 else 488 { 489 var new_rad = 1 - Math.min(Math.max((chamber_time-ret_unit)/chamber_unit,0.01),1); 490 curRadius = cr.data->reticulopodiacreature.getPart(1).sy; 491 492 if (chamber_time == ret_unit) 493 { 494 new_rad = 1; 495 } 496 497 var new_cr = foramGrow(cr, chamberNumFromEnergy(cr.data->lifeparams->max_energy_level, cr.data->lifeparams->gen)-1, new_rad); 498 curRadius = getZoneRange(new_cr,1); 499 } 462 500 } 463 501 … … 639 677 if (visualization(cr)) 640 678 { 641 var total_time = secToSimSteps(ExpProperties.chamberGrowthSec); 642 var ret_unit = total_time/chamber_vis_denominator; 643 var chamber_unit = total_time-ret_unit; 644 645 if (chamber_time < ret_unit || chamber_time >= chamber_unit) 646 { 647 var new_rad = Math.min(Math.max((chamber_time%ret_unit)/ret_unit*getZoneRange(cr,1),0.01),getZoneRange(cr,1)); 648 649 if(chamber_time < ret_unit) 650 new_rad = getZoneRange(cr,1)-new_rad; 651 652 curColor = colors[cr.data->lifeparams->gen]; 653 addReticulopodia(cr,new_rad); 654 } 655 else 656 { 657 var new_rad = 1 - Math.min(Math.max((chamber_time-ret_unit)/chamber_unit,0.01),1); 658 curRadius = cr.data->reticulopodiacreature.getPart(1).sy; 659 660 if (chamber_time == ret_unit){ 661 new_rad == 1; 662 } 663 664 var new_cr = foramGrow(cr, chamberNumFromEnergy(cr.data->lifeparams->max_energy_level, cr.data->lifeparams->gen)-1, new_rad); 665 curRadius = getZoneRange(new_cr,1); 666 667 if (chamber_time == 0)//checking for end of chamber growth process 668 { 669 new_cr.data->lifeparams->chamber_growth = -1; 670 } 671 } 672 } 673 } 674 //checking for end of chamber growth process 679 visualizeChamberGrowth(cr, chamber_time); 680 } 681 } 682 //checking for end of the chamber growth process 675 683 else if (cr.data->lifeparams->chamber_growth == 0 && visualization(cr)==0) 676 684 {
Note: See TracChangeset
for help on using the changeset viewer.