====== Differences ====== This shows you the differences between two versions of the page.
|
script_llxperiment_boing [2014/05/09 20:23] trianguloy created |
script_llxperiment_boing [2014/07/22 14:44] (current) trianguloy |
||
|---|---|---|---|
| Line 13: | Line 13: | ||
| ====== Script code ====== | ====== Script code ====== | ||
| - | <code> | + | <sxh javascript> |
| var bounciness = 0.95;//Reduction every tick, between 0 (only one tick) and 1 (always bouncing) [Recommended 0.95] | var bounciness = 0.95;//Reduction every tick, between 0 (only one tick) and 1 (always bouncing) [Recommended 0.95] | ||
| var inVel = 0 //initial velocity. set it to 0 for random one [recommended 0.5] | var inVel = 0 //initial velocity. set it to 0 for random one [recommended 0.5] | ||
| Line 82: | Line 82: | ||
| setTimeout(function(){tick(item,vel,size);},1000/frecuency); | setTimeout(function(){tick(item,vel,size);},1000/frecuency); | ||
| } | } | ||
| - | </code> | + | </sxh> |