JavaScriptで電光掲示板を実現する『LED Scroller』
- December 2nd, 2007
- Posted in 開発ツール・技術
- Write comment
いつか使いたいのでメモ的にエントリー。JavaScriptで左から右にメッセージが流れる電光掲示板を作ってくれます。

↑ こんな感じ。カラフルで素敵。
大きさや横幅、効果などはScript中で操作できる模様。いじれるオプションは以下のソースをご覧ください。
// Sets the size of the LEDs - 16, 32, 48, 64 or 128 pixels.
var ledSize = 16;
// Sets the desired spacing between LEDs
var ledPadding = 1;
// Sets the desired LED colour. Acceptable values are 'red, 'amber', 'yellow', 'green', 'blue', 'uv' (purple), 'white', or 'rainbow'.
var ledColor = 'rainbow';
// Sets the scroll delay. Larger values mean slower scrolling.
var scrollDelay = 100;
// Adjusts the amount of motion blur. Higher values mean more blurring (and less readability).
var blurLevel = 0.25;
// Create the LED matrix - change the first value if you want to alter the width of the display.
createLedMatrix(24,6);
// Type your message here:
setMessage("This is a sample scrolling message - dynamically created and rendered with some neat javascript code. I knew these LED graphics would come in handy for something!
");
// Start the scrolling!
scroll();
ちょっとしたサイトのアクセントによさそうですね。詳細&ダウンロードは以下のサイトからどうぞ。
» JavaScript LED Message Scrolling Display


こんなお洒落なのもあるんですね。
ちょっとダサいのを作って日記に書いたので、トラックバックしてみました。