Springing Behavior Demo
Shri

All,

 

I put together a little demo of springing behavior for wade.

This is based on the code in the book HTML 5 Animation by Bill Lamberta and Keith Peters.

 

This uses the  new wade 1.2 engine.
You will have to modify the html file to point to wherever you are getting the wade engine from.
Besides modifying the html, it should run out of the box.

 

The behavior allows you to spring to a target point or a target object.

 

I suspect I might be not be calculating the multiple ball springing entirely correctly, but you can play around with it and improve on the code if you like.

 

cheers,

All 2 Comments
Gio

Cool! I think it works most of the time, but indeed there seems to be a problem sometimes when multiple balls are being simulated.

 

I see you've put the menu list to good use again :) Just a thought: maybe you could change the color of the active item in the menu list to make it clear that it's been selected. It's just a minor thing (that could be added to the easing demo too).

 

As usual, thanks for your contributions. I'll sort out adding these things to the website as soon as possible.

Shri

All,

 

Made some minor modifications to the springing code

- modified the menu so the selected number of balls is highlighted.

 

When you spring multiple balls, sometimes they all don't respond on the mouse click ?

Also, sometimes they get into 'lock' step and move very rigidly ?

Not sure why on both counts.

Anyway, I have removed the zip from above and added it here so there is no confusion.

 

cheers

 

Post a reply
Add Attachment
Submit Reply
Login to Reply