JavaScriptで電光掲示板を実現する『LED Scroller』
December 2, 2007 9:38 PM written by Gen Taguchi

いつか使いたいのでメモ的にエントリー。JavaScriptで左から右にメッセージが流れる電光掲示板を作ってくれます。

led.gif

↑ こんな感じ。カラフルで素敵。

大きさや横幅、効果などは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

この記事のトラックバックURL (トラックバックは承認後に公開されます)

コメント一覧

コメント投稿 (コメントは承認後に公開されます)

名前
メールアドレス (表示されませんのでご安心を)
URL
情報保存?
コメント
あわせて読みたい

クリエイティブ・コモンズ・ライセンス

ユーザビリティ向上支援ビービット
Usability tested by BeBit

タブブラウザ Sleipnir 公式ページ(上級者向け)

Powered by
MovableType 3.34

人気ブログランキング - idea*idea
ワード
www.flickr.com
This is a Flickr badge showing photos in a set called 自炊生活. Make your own badge here.
Firefox meter