Skip to content

Instantly share code, notes, and snippets.

View bentosetc's full-sized avatar

Lubifuyu bentosetc

View GitHub Profile
I am attesting that this GitHub handle bentosetc is linked to the Tezos account tz1V9BtWPXcYrFL7bdEKqg8HQELtve4HkhUX for tzprofiles
sig:edsigtfYb8eMD5jLgGiBwxq9L6kUySmmV86Tggs3RzR5HmNXPi1nRdLfinnfNnGL2rbVgYSuarwrD1o6V4h5Xod2ziupEqR9DKv
Apply the following expression to a property to wiggle it beginning at time 2 seconds:
timeToStart = 2;
if (time > timeToStart){
wiggle(3,25);
}else{
value;
}
Apply the following expression to a property to stop wiggling it at time 4 seconds:
Without question, wiggle() is an extremely handy and versatile tool for adding an element of randomness to a project.
freq = 1;
amp = 110;
loopTime = 3;
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime);
linear(t, 0, loopTime, wiggle1, wiggle2)
wiggle only in x (horizontal):
org=value;
temp=wiggle (5,50);
[temp[0],org[1]];
Shorthand:
[wiggle(5,50)[0],position[1]]
wiggle only in y (vertical):