show(){
    g.setFontAlign(-1,-1,0);
    for(var i=0; i<Math.min(this.txt.length, this.length + 1) ; i++){
      idx = this.txt.length - i - 1;
      var color_strength=1 - i/this.length;
      if(i > this.length - 2){
        color_strength = 0;
      } 
      g.setColor(color_strength*SHARD_COLOR[0],
                 color_strength*SHARD_COLOR[1],
                 color_strength*SHARD_COLOR[2]);
      g.setFont("Vector",SHARD_FONT_SIZE);
      g.drawString(this.txt[idx], this.x, this.y + idx*SHARD_FONT_SIZE); 
    }
  }
/**
  * The show method displays the latest shard image to the 
  * screen with the following rules:
  * - latest addition is brightest, oldest is darker
  * - display up to defined length of characters only 
  * of the shard to save cpu
  */
The show method displays the latest shard image to the
screen with the following rules:
- latest addition is brightest, oldest is darker
- display up to defined length of characters only
of the shard to save cpu
The show method displays the latest shard image to the screen with the following rules : - latest addition is brightest oldest is darker - display up to defined length of characters only of the shard to save cpu
show(){
    g.setFontAlign(-1,-1,0);
    for(var i=0; i<Math.min(this.txt.length, this.length + 1) ; i++){
      idx = this.txt.length - i - 1;
      var color_strength=1 - i/this.length;
      if(i > this.length - 2){
        color_strength = 0;
      } 
      g.setColor(color_strength*SHARD_COLOR[0],
                 color_strength*SHARD_COLOR[1],
                 color_strength*SHARD_COLOR[2]);
      g.setFont("Vector",SHARD_FONT_SIZE);
      g.drawString(this.txt[idx], this.x, this.y + idx*SHARD_FONT_SIZE); 
    }
  }
show ( ) { g . setFontAlign ( - 1 , - 1 , 0 ) ; for ( var i = 0 ; i < Math . min ( this . txt . length , this . length + 1 ) ; i ++ ) { idx = this . txt . length - i - 1 ; var color_strength = 1 - i / this . length ; if ( i > this . length - 2 ) { color_strength = 0 ; } g . setColor ( color_strength * SHARD_COLOR [ 0 ] , color_strength * SHARD_COLOR [ 1 ] , color_strength * SHARD_COLOR [ 2 ] ) ; g . setFont ( "Vector" , SHARD_FONT_SIZE ) ; g . drawString ( this . txt [ idx ] , this . x , this . y + idx * SHARD_FONT_SIZE ) ; } }
The show method displays the latest shard image to the
 screen with the following rules:
 - latest addition is brightest, oldest is darker
 - display up to defined length of characters only
 of the shard to save cpu
The show method displays the latest shard image to the screen with the following rules : - latest addition is brightest oldest is darker - display up to defined length of characters only of the shard to save cpu