This is a 2010-to-2013 archive of toki-woki.net. Here's how it looks now.

Hey! – A Lego Table

When I moved in I bought an IKEA Ramvik table and while travelling this summer I had an idea (don’t ask why): decorate its top with Lego bricks used as pixels. Here are the steps I went through. If you don’t care about those steps and want to see a nice time-lapse video, scroll to the end of the article!

Lego bricks

First things first. What are the Lego brick sizes and colors available? Oddly enough this question is not that easily answered. Probably because Lego’s site is crappy, or because nobody really cares… I eventually found Brickipedia which happens to be a much richer resource than the official ones. Everything I was looking for was there: the Lego “unit” is 8 millimeters and the color palette is pretty simple.

Table specs

Knowing my table size I had various options, depending on the “pixel size” I’d choose. Of course the number of bricks (and the price) would also vary. So I created a dynamic spreadsheet on Google Docs that’d do the calculations for me… Here it is, with all the options possible (French, sorry).

[iframe src=”https://spreadsheets.google.com/pub?key=0AmyvU-n2aOBpdG5oNUN6UW0xcUJ4a2E3eXFrTTJIVnc&hl=en&output=html&widget=true” height=”374″]

I chose the 4×4 option, quite cheap and still offering a cool number of pixels.

Design

36×16 pixels of freedom, that’s it. I tried lots of different designs, from lo-fi photos to pixel-art drawings. I decided to go for a Heavy Oblique Futura.

Actual size:

Looking good.

The Lego palette

I set my type to white, on a black background. The anti-aliasing process creates gray-scale pixels to smooth the curves, which is great, but Lego bricks aren’t available in all colors! To have a realistic preview of what it would look like I had to create a Photoshop Color Table matching Lego’s gray-scales (if you’re interested, just ping me [UPDATE: here they are]). Here’s a comparison between Photoshop’s default gray-scales (left) and Lego’s palette (right):


You may notice that Lego’s black is a little bit light and the grays are yellowish.

Time to order bricks!

Already? Nope, not that fast. Before ordering I had to know exactly what to order, that means counting the pixels. Well, I’m not this kind of guy. I’m a developer; I hate repetitive chores, you know.

So I fired up Flash Builder and came up with PaletteCounter a simple, OpenSource, app to count pixels of each color. I also added some kind of “assembly instructions generator” to help us build it. Handy.

Time to order!

Really? Yup. I placed an order on lego.com’s Pick A Brick and received it a couple of weeks later. Yay!

Let’s do this

I’m not going to describe the process (that happened this saturday), just have a look at this time-lapse vid. 1020 pics shot in about an hour, yummy. Thanks to Céline and Julie for helping out!

[vimeo id=”16376065″ height=”374″]

This page has been translated in Russian by Karina.

SVG to RaphaelJS

While redesigning this blog I wanted to keep the “one color per post” concept I had in the previous version by changing (tweening) the logo’s color accordingly to the article being viewed (or scrolled to). I rapidly realized I couldn’t achieve this with just HTML+CS+JS and I didn’t want to use Flash (mainly because of iOS devices but also to avoid loading a SWF file on every page).

I remembered hearing — a few months earlier — about Raphaël (a JS lib to render vector graphics). At that time I found the concept really interesting but couldn’t see where to use it.

OK, so I know what I want to do, I know the tools I’ll use, but how do we do that? Raphaël is cool, but its syntax looks a bit cryptic at first. It says it handles SVG, and — guess what — Illustrator can export to SVG. We’re getting closer…

SVG is XML, but Raphaël doesn’t eat XML, it eats a specific syntax meant to be compatible with SVG and VML. Hum… This is when I fire Flash Builder and start writing code. The goal: accept an SVG XML file as input and spit some “Raphaël-compatible script” out.

Boom (plus a little demo of an output).

I then simply had to export my Ai logo to SVG, open it in SVG2RaphaelJS, copy paste the output, and wire all that to the scroll/color tweening logic. Pretty easy.

Everything worked and looked nice on all browsers and OS’s but I realized the sole idea of having a logo changing colors didn’t work that well. For purely visual reasons. So I dropped it from my theme and rolled back to the black PNG version you can see right now.

The good thing is, the tool works pretty well (at least with Illustrator SVGs) and is OpenSource. Either use it or modify it, and tell me what you think. I did this in a hasty fashion and I probably won’t use it a lot, so don’t expect updates or bug fixes… But if you feel like improving it, please do so!

Evnt — Custom AS3 Event File Generator

I recently started working with Robotlegs on a daily basis and I’ve never had to write that much custom event classes, so I felt like it was starting to be a little bit boring… That’s why I wrote a pretty basic/simple app that does hard part for you!

Simply enter you custom event’s class name and package, drop in some constants and properties: you’re all set!

Pro-tips:

  1. Reorder the constants and properties by dragging and dropping them
  2. Use custom types for the properties, imports will be taken care of for you
  3. Hit “Copy to Clipboard” or “Save As…” for a quick export!

Project is brand new so it might require some fixes or improvements… If you have ideas, please share!

And before you ask: no, it wasn’t written with Robotlegs… But it’s OpenSource so if you want to take a spin and write the RL version of it, you’ll be able to do so!

Hope this helps!

Fotolia Desktop

Hey! Another free AIR app! This time that ain’t no side project I made on my free time for some obscure users, but rather a big thingy for a big company. Namely Fotolia.

I did all of the coding part (ActionScript 3, Flex 4) and Steaw is responsible for the UI and all graphics. The app is basically a solution for power-users, providing most of the functionnalities of the website and adding some more (such as direct download and local library). Allowing you to search, browse preview and buy all types of medias, including video and vectors. You can also log into your account and store your favorites in a lightbox or create and fill galleries.

This is my first multi-lingual app: to this day it provides 13 translations including Japanese, Chinese and other funny looking languages!

Flex 4

This is also my first big real-life project with Flex 4 and I have to say it’s way better/easier than Flex 3. Really. What changed my life is the way it handles states and component customization via skins… Oh boy, this is easy!

AIR 2.0

Yep, using the brand new AIR 2.0.2, buddy. What for? Mainly for global error handling and the almighty openWithDefaultApplication (for both folder and medias). I’ve also heard this version of the runtime is faster and lighter, and we all like that.

OpenSource

As for every project I work on, I try to have some OpenSource bits so that anyone can benefit from the work and time I spent on it. I asked Fotolia if the AS3 API I was going to write could be OpenSource’d and guess what, they accepted. So here it is, based on the as3-rpclib and on the as3 Signals logic: fotolia-as3-api. I implemented most of (if not all) features of their official API so building an AS3 app off of that should be pretty easy, do so!

Go get it!

Yeah, go get it.

Dok — AS3 Doc. UI

Meet Dok, my latest and nicest AIR app to this day!

Always looking for help when writing AS3 for Flash, Flex and AIR? Think Adobe’s reference is rich but browsing it sucks? Well, I did too. So I wrote this little thingy that loads, parses and caches help pages and then presents them in a slick and quick UI!

Since this app is only intended for devs and therefore may not be very interesting to others, I decided it should look good. So I tried my best and worked hard on those pixels and styles (colors and textures inspired by that sweet clock)… Jump to the project page for life-size screenshot!

This project is absolutely OpenSource, from top to bottom. AS3 classes, MXML, Illustrator and Photoshop files, PNGs and so on… Help yourself.

Weecast Player

During the last couple of months I’ve been working on a free AIR app for a French community-based site called Weecast. Its purpose is to allow users to submit and/or buy screencasts about your favorite apps and languages (mostly Adobe’s and Microsoft’s, but also 3D ones’, OS’s and more).

Introducing the Weecast Player!

The app allows you to browse your videos, watch them (4 view modes), search for more, drop comments and stars… I think that’s called an RIA, right? There’s also an offline mode, so you can access all your stuff anytime.

All of this is made in Flex+AIR. The visual identity was made by Weecast ; thanks for the PNGs, folks!

By the way, some parts of it are actually OpenSource, including:

If you don’t know Weecast yet I highly recommend you go visit their site, grab an account and the player, enjoy free videos, and then buy some! Now if you don’t understand French… Well, learn it!

Kwot

A new project is online! It’s called Kwot, and it allows you to share and store your favorite quotes.

The UI is quite minimalistic, with focus on simplicity. Navigate through quotes with your mouse wheel, your keyboard’s left and right arrow or the mini timeline at the bottom. Add a quote by clicking on the plus button at the bottom right hand corner. If you don’t pick any color they’ll be automatically chosen via a magic algorithm! Another magic algorithm will rotate your quote in 3D space. But don’t worry you will preview that in real-time, ha!

I might add user (login) support, language tagging, an RSS feed and stuff like that but don’t expect that too soon, holidays are coming!

If you don’t have the Flash plugin or if you visit the site on an iPhone the site will look quite different but everything will remain!

A few things I used in case you wonder: swfaddress (you will love deep-linking!), GTween, FlashDevelop, AMFPHP, the viewport width attribute… Oh, and by the way, the font face is called Neutra.

Add some quotes and drop feedback!

FFFFOUND AS3 API

I recently released FFFFOUND Desktop, this AIR app uses a home-made API that I’m open sourcing today. The code is hosted on Google Code and is available via SVN, I also uploaded a zip archive if you prefer.

You’ll find the (asdocs) docs in the repository and in the archive.

By the way, I love feedback. If you use it: please share!

Also, if you need examples on how to use it, ask. I think the sources are self-explanatory but I might be wrong.

A few important things (also posted on the project’s page):

  • For now, this API will only work in AIR projects because ffffound.com’s crossdomain.xml is too restrictive. I’ve contacted them but at this time they don’t want to change it.
  • The API relies on FFFFOUND’s RSS feeds but also on the site’s pages’ HTML, so some functionalities might break at any time without warning. Use with caution.

Watch the comments for any update or news!

Shrink O’Matic

Here is Shrink O’Matic, my new AIR application!

Simply drag and drop images on it and they’ll be resized as you wish.

More info on the project page

I’ve also set up a new projects‘ page listing AIR apps and more.

Concerning the source code, it’s not available but you can find parts of it in a brand new Google Code project where I’ve added (and I’ll keep on adding) classes I use.