Holodisk model from the Fallout and Fallout 2 games.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
351 B

  1. // animation
  2. function get_anim_keys() = [
  3. 0, // initial
  4. 0.1, // resting
  5. 0.3, // holodisk inserted
  6. 0.4, // laser raised
  7. 0.5, // start playing
  8. 0.7, // stop playing
  9. 0.8, // laser lowered, holodisk removing
  10. 1 // final
  11. ];
  12. function anim(key_from, key_to, KEYS=get_anim_keys())
  13. = max(0, min(($t - KEYS[key_from]) / (KEYS[key_to] - KEYS[key_from]), 1));