3d menu

3d menu

This is one of my early attempt to use 3d with depth of field.

The original idea was to build a liquid-like menu for a mobile device interface.

Actually none of the items are clickable but I am happy to leave this experiment as it is: at that time I was quite impressed to find out what you can do with some simple trigonometry and a blur filter!

Usage

Move your mouse left and right to move the items.

Source

This is the main function present on the onEnterFrame clip event of the items.

x=_root._xmouse-Stage.width/2;
 radius = _xmouse/2;
 filters = filterArray;
 filterArray = [];
 _z = Math.sin(angle*Math.PI/180)*radius+zcenter;
 scala = lf/(lf+_z);
 x = Math.cos(angle*Math.PI/180)*radius;
 _y = y*scala+ycenter;
 _x = x*scala+xcenter;
 _xscale = _yscale=scala*150;
 _alpha = scala*100;
 angle += speed;
 blur = Math.round(1/scala*2);
 var filter:BlurFilter = new BlurFilter(blur, blur, 3);
 filterArray.push(filter);
 if (angle>359) {
 	angle = -360;
 }

see this experiment.

0 Responses to “3d menu”


  1. No Comments

Leave a Reply