This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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: | |
timeToStop = 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wiggle(4, random(-15,15)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Zoom in | |
ease(time, inPoint, outPoint ,[100,100], [130,130]); | |
//Zoom out | |
ease(time, inPoint, outPoint,[130,130], [100,100]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w = wiggle(2,10); | |
[w[0],w[0]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp = wiggle(2,50); | |
x = temp[0]; | |
y = value[1]; | |
[x,y] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Here's a little expression-based particle system that should work fine for confetti. | |
Each layer becomes a "particle" that gets reused when its life expires. | |
Create a small solid layer (say 15x15). Make it 3D. | |
Apply a point control to the layer. | |
Add this expression to the point control. | |
Adjust minSpeed, maxSpeed, maxDrift, and the two rotation parameters (m) to suit your needs. | |
If you decrease minSpeed, you may have to increase the "life" parameter of the point control or the particles may disappear as they reach the bottom of the page. | |
Duplicate this layer until you have enough particles (50 to 100 maybe?). */ | |
life = 1.2; //life of particle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This expression will move a vertical bar back and forth across the screen randomly. | |
Create a thin, rectangular solid. Apply the following expression to the position property. | |
tMin and tMax are the minimum and maximum time it takes for the line to make one movement. | |
Adjust them to your needs. | |
Duplicate the solid a bunch of times to generate a lot of motion. */ | |
tMin = .5; //minimum segment duration | |
tMax = 2; //maximum segment duration | |
end = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
veloc = 360; //360 Degree Rotation per Second | |
r = rotation + (time - inPoint) *veloc; | |
[r] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxDev = 13; // max deviation in pixels | |
spd = 30; //speed of oscillation | |
decay = 1.0; //how fast it slows down | |
t = time - inPoint; | |
x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t); | |
y = scale[0]*scale[1]/x; | |
[x,y] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Right | |
x = position[0]; | |
y = position[1]; | |
d = 262; //Distance in pixels | |
ease(time, 3, 4, [x , y], [x+d , y]); | |
//Left | |
x = position[0]; | |
y = position[1]; | |
d = 262; |