神刀安全网

JavaScript libraries that power Google's interactive LED lobby artwork

JavaScript libraries that power Google's interactive LED lobby artwork

AnyPixel.js is an open-source software and hardware library that makes it possible to use the web to create big, unusual, interactive displays. Anyone can fork the code and the schematics to create their own display at any scale.

The first display using this platform is in the 8th Avenue lobby at the Google NYC office. To create this installation, we used 5880 off-the-shelf arcade buttons with LEDs inside them as our pixels. AnyPixel.js’ straightforward hardware/software framework makes it easy to build any display where each pixel is an interactive element.

JavaScript libraries that power Google's interactive LED lobby artwork

What You’ll Find

  • /hardware – EAGLE schematics, board layouts, CAD files, wiring diagrams, and blueprints
  • /firmware – microcontroller code, written for the STM32 family of devices
  • /backend – node.js and chrome applications for communicating with the hardware.
  • /frontend – the app framework, an in-browser previewer, and 12 example apps written by Googlers and friends worldwide.

Getting Started

Check out the examples

We’ve included 12 example apps written by Googlers and friends for the 8th Avenue lobby display in NYC. To check them out, install thepreviewer and run one of theexamples.

Build your own app

Building your own app is easy with the Anypixel framework. To get started, check out the framework documentation and theexample app:

var anypixel = require('anypixel');  var ctx = anypixel.canvas.getContext2D();  var colors = ['#F00', '#0F0', '#00F'];  /**    * * Listen for onButtonDown events and draw a 2x2 rectangle at the event site  */ document.addEventListener('onButtonDown', function(event) {        ctx.fillStyle = colors[Math.floor(Math.random() * 3)];     ctx.fillRect(event.detail.x - 1, event.detail.y - 1, 2, 2); });  

Contributors

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » JavaScript libraries that power Google's interactive LED lobby artwork

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址