function showSplash(afterSplash) {
  if (splashMode === "off")
    afterSplash();
  else {
    g.reset();
    g.drawImage(introscreen, 0, 0);
    setTimeout(() => {
      g.setFont("Vector", 40).setFontAlign(0, 0);
      framedText("15", g.getWidth() / 2, g.getHeight() / 2 - g.getFontHeight() * 0.66, "#f00", "#fff");
      setTimeout(() => {
        g.setFont("Vector", 40).setFontAlign(0, 0);
        framedText("Puzzle", g.getWidth() / 2, g.getHeight() / 2 + g.getFontHeight() * 0.66, "#f00", "#fff");
        setTimeout(afterSplash, (splashMode === "long" ? 2000 : 1000));
      }, (splashMode === "long" ? 1000 : 1));
    }, (splashMode === "long" ? 2000 : 1000));
  }
}
// If spash mode is "off", call afterSplash directly.
If spash mode is "off", call afterSplash directly.
If spash mode is " off " call afterSplash directly .
function showSplash(afterSplash) {
  if (splashMode === "off")
    afterSplash();
  else {
    g.reset();
    g.drawImage(introscreen, 0, 0);
    setTimeout(() => {
      g.setFont("Vector", 40).setFontAlign(0, 0);
      framedText("15", g.getWidth() / 2, g.getHeight() / 2 - g.getFontHeight() * 0.66, "#f00", "#fff");
      setTimeout(() => {
        g.setFont("Vector", 40).setFontAlign(0, 0);
        framedText("Puzzle", g.getWidth() / 2, g.getHeight() / 2 + g.getFontHeight() * 0.66, "#f00", "#fff");
        setTimeout(afterSplash, (splashMode === "long" ? 2000 : 1000));
      }, (splashMode === "long" ? 1000 : 1));
    }, (splashMode === "long" ? 2000 : 1000));
  }
}
function showSplash ( afterSplash ) { if ( splashMode === "off" ) afterSplash ( ) ; else { g . reset ( ) ; g . drawImage ( introscreen , 0 , 0 ) ; setTimeout ( ( ) => { g . setFont ( "Vector" , 40 ) . setFontAlign ( 0 , 0 ) ; framedText ( "15" , g . getWidth ( ) / 2 , g . getHeight ( ) / 2 - g . getFontHeight ( ) * 0.66 , "#f00" , "#fff" ) ; setTimeout ( ( ) => { g . setFont ( "Vector" , 40 ) . setFontAlign ( 0 , 0 ) ; framedText ( "Puzzle" , g . getWidth ( ) / 2 , g . getHeight ( ) / 2 + g . getFontHeight ( ) * 0.66 , "#f00" , "#fff" ) ; setTimeout ( afterSplash , ( splashMode === "long" ? 2000 : 1000 ) ) ; } , ( splashMode === "long" ? 1000 : 1 ) ) ; } , ( splashMode === "long" ? 2000 : 1000 ) ) ; } }
If spash mode is "off", call afterSplash directly.
If spash mode is " off " call afterSplash directly .