Litebox

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Litebox

Post by onion2k »

http://www.ooer.com/litebox/

Litebox is something I wrote yesterday as the beginnings of a new photo portfolio to go on my website. Only works in Firefox (and Opera, though there's a small display bug, and IE but it's unusably slow). It's not Flash, it's just JavaScript. It uses a similar principle to Google Maps.

Controls:

Click an image to select it.
Drag images around to move them.
Shift+Drag to scale them.
CTRL+Drag to rotate them.
1,2,3,4,5,6,7,8,9,0 to set scaling to 10%, 20%, 30% etc.
Space to reorient an image back to straight.

Still needs a lot of work though. Any thoughts?
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

Wow, looks cool.

Selecting, rotating, dragging works fine. How is the scaling supposed to work? I tried selecting first and then hitting 1,2,3 etc but nothing happened? (FF mac)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Interesting.

I like the use of canvas. :)
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

Pretty cool, the only critique I have is that those rings around each image looks pretty odd. I would personally go for a thinner square border considering all images are rectangles - possibly one whose thickness scaled with the image size.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

For some reason it operates the same in Win XP IE7 as Ubuntu 7.04 64-bit Firefox (latest) - which is unusable. The only differences I can think of between my ubuntu firefox and windows firefox are that the ubuntu one is 64-bit and it doesn't have a flash plugin installed.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

vigge89 wrote:Pretty cool, the only critique I have is that those rings around each image looks pretty odd. I would personally go for a thinner square border considering all images are rectangles - possibly one whose thickness scaled with the image size.
The circles denote the "pick range" ... if the mouse is inside the circle then it'll pick that image. It's a heck of a lot simpler to detect which image the mouse is close to using simple Pythagoras than proper polygon areas.
Post Reply