- 1
How i manage all the circles speed constant? Plz help
5 Antworten
+ 3
// Add this code snippet in the JS tab:
var st = document.querySelector('head style:last-of-type');
var tf = +prompt('Enter the time factor') || 0;
tf = tf<=0 ? 1 : tf;
st.textContent = st.textContent.replace(/(\d*\.?\d+)s/gm,function(_,n) { return n/tf+'s'; });
/*
on start, give the "time factor":
1 for no change,
less than 1 for slowing,
more than 1 to accelerate,
less or equals to 0 or not numbers default to 1
... and see the magic ;)
examples:
0.1 slow by 10 the speed,
2 accelerate by 2 the speed
*/
+ 1
You don't need to understand: add just this short code, and run your page: you will be prompted for a factor to apply to the speed, and the csd would be updated consequently (and automaticaly) :P
(basically this is what you should done else: all values with unit 's' (seconds) needs to be changed by multiplying (or dividing) them by a single value...)
+ 1
Ok you will do it manually or ok you will try the automatic way by adding my script to your js tab? :o
- 1
I can't under stand js plz help me in css3
- 1
Ok thanks