
last_letter = numletters - 1;
if (last_letter){
 if (sub_order < 2){
  letter_perc = letter / last_letter;
  if (sub_order == 1) letter_perc = 1 - letter_perc;
 } else if (sub_order < 4){
  my_letter = 2 * letter;
  if (my_letter >= numletters) my_letter = 2 * numletters - my_letter - 2;
  letter_perc = my_letter / last_letter;
  if (sub_order == 3) letter_perc = 1 - letter_perc;
 } else {
  letter_perc = frame / lastsubframe;
 }
 perc = Math.min(1, Math.max(0, 2 * frame / lastsubframe - letter_perc));
} else perc = frame / lastsubframe;
if (reverse_sub_effect == true) perc = 1 - perc;
if (letter % 2) d = -1 else d = 1;
thickness = 2000;
angle = 44 / 7 * perc;
tx = -__x / 2;
t1 = -__y + Math.sin(angle) * beam_height * d;
t2 = -__y + Math.sin(angle) * beam_height;                   
if (alternate) ty = t1 else ty = t2;
yrotate = ((( numletters - 1) / 2) - letter) * beam_spread; 
if (use_scaling) xscale = yscale = 1.7;
alpha = 50;
lightAng_y = 360 * perc;
lightAng_z = 270;




