FAB INDUSTRIES  

New media, new rules

A Nixie Clock in JavaScript

I’ve been hacking around with JavaScript for a bit … I know, I know … I can hear Jonathan howl in triumph up north in Copenhagen at this point. Why? Well, I’ve had a nice JS clock on start.fab.industries for years, but I also wanted something to emulate the Nixie clock on my desk. When I found this JavaScript project by Čestmír Hýbl the other day, I just knew I had to implement it.

<div style="text-align: center; border: none;">
    <div style="padding: 30px 0 30px 0;">
      <div id="ndTime1" style="margin: 0 auto 0 auto;">
      </div>
    </div>
</div>
<script type="text/javascript" src="/nixie/nixie.js"></script>
<script type="text/javascript">
nixieTime1 = new NixieClock();
nixieTime1.id = 'ndTime1';
nixieTime1.run();
nixieTime1.urlCharsetImage = '/nixie/zm1080_d1_09bdm_62x100_8b.png';
nixieTime1.charWidth = 62;
nixieTime1.charHeight = 100;
nixieTime1.extraGapsWidths[1] = 20;
nixieTime1.extraGapsWidths[3] = 20;
nixieTime1.charGapWidth = 10;
document.getElementById(nixieTime1.id).parentNode.style.background = "black";
document.getElementById(nixieTime1.id).parentNode.style.border = "none";
nixieTime1.init();
</script>

Since I’ve also wanted a countdown timer to track deadlines for a while — yay, the joys of print journalism! — I dug up this code, hacked it all together very haphazardly, and deadline.fab.industries was born. Feel free to use it if you like Nixie tubes and want to track some deadlines.

– 30 –

Back to home