How to: draw a cube with Minko

Today I want to talk about Minko’s API. Whats it looks like and how it feels to work with it. This is the first time ever I show some actual code using Minko. There is a great buzz around Molehill and the next release of the Flash Player in general. Please note that evet if – for obvious reasons – this post does not use the Molehill-powered version of Minko, the APIs look “pretty much” the same.

The goal of the post is for people to see what it looks like. Feedbacks are very much welcome and would be greatly appreciated!

Before we start, here is the (very) simple application we will build:

Tutorial right after the jump…

aerys-monitor library updated

The aerys-monitor is a small and lightweight library inspired of Mr.Doobs “stats” library. Here are the main features :

  • watch any property of any object of any class
  • customizable update rate
  • cutomizable per-property color
  • chart rendering for numeric values
  • watch framerate, memory and Flash Player version
  • ready to use framerate property

The Monitor class has been updated with the following changes :

  • Flash player version style is now called “version”
  • new property “backgroundColor” to change the background color of the monitor
  • new “framerate” to get the framerate of your application
  • the framerate and memory usage are now monitored by default

Here is a sample snippet to show how simple it is to use :

And here is how it looks :

The library is under GNU v3 licence and is available on Google Code. Have fun !

Flash 3D physics with Minko and jiglibflash

Drawing (a lot of) triangles is nice. But making them move is another problem… even harder: making them move like objects would move in real life! This is what a “physics engine” is about:

“A physics engine is computer software that provides an approximate simulation of certain simple physical systems, such as rigid body dynamics (including collision detection), soft body dynamics, and fluid dynamics, of use in the domains of computer graphics, video games and film. Their main uses are in video games (typically as middleware), in which case the simulations are in real-time. The term is sometimes used more generally to describe any software system for simulating physical phenomena, such as high-performance scientific simulation.”

Source: Wikipedia, Physics engine

Flash is no exception and has a few physics engine libraries available. Nothing like a “high-performance scientific simulation” though…

Still, jiglibflash is one of those libraries. It is free and open-source. It provides a 3D-capable physics engine and exposes a rather simple API to make it work with any 3D graphics engine. Which brings me to the good news: Minko now supports jiglibflash!

Demo application right after the jump…

Pixel shader demo using Flash 10, Pixel Bender and Minko

I’m really excited to announce Minko (which is, by the way, the final name for my 3D library) has reached a new level: pixel shader integration! Pixel shaders are little programs that run on each pixel and can modify their final color. They are often written in C-like languages and in this precise case we use Pixel Bender, the shader language introduced with Flash 10.

In this post I will:

  • Explain how any 3D scene is built when using Minko
  • Explain how pixel shaders are integrated in the 3D scene
  • Explain how pixel shaders are built using Pixel Bender
  • Show you a very simple demo of the kind of effects pixel shaders will provide
  • Explain how the demo was built

Here are a two screenshots to show the results:

Phong shading + spheric environment mapping on a 2700+ polygons Lamborghini
Phong shading + spheric environment mapping demo

Technical details and a live demo right after the jump!

Flash 10.1 gets a release date

In reaction to Steve Jobs’ latest outrageous declarations, Kevin Lynch himself announced the release date of Flash 10.1 for Android devices:

“We look forward to delivering Flash Player 10.1 for Android smartphones as a public preview at Google I/O in May, and then a general release in June. From that point on, an ever increasing number and variety of powerful, Flash-enabled devices will be arriving which we hope will provide a great landscape of choice.”

You can read is full post here : Moving Forward.

From what I’e heard from Adobe so far, Flash 10.1 for the desktop should be released before the Android version. Meaning we can expect Flash 10.1 desktop to be released in May…

Update: In the following Wall Street Journal interview, Shantanu Narayen – Adobe’s CEO – also comments Steve Jobs declarations and says Flash 10.1 will be released June 17th (3’10):