-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
52 lines (45 loc) · 896 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
*
* Entry point, uses browserify to require different components of the app
*
**/
var app = new Layer({
x: 0,
y: 0,
width: 128,
height: 128,
image: "images/framer-icon.png"
});
// Import a module with Browserify
var block = require("./components/block.js")();
// We can define events on the generated Layers so that we can define interaction
// between Layers of the app
block.on(Events.Click, function () {
app.states.next();
});
// This is equivalent to the boilerplate provided when you start a new Framer
// Studio project
app.states.add({
second: {
y: 100,
scale: 0.6,
rotationZ: 100
},
third: {
y: 300,
scale: 1.3,
blur: 4
},
fourth: {
y: 200,
scale: 0.9,
blur: 2,
rotationZ: 200
}
});
app.states.animationOptions = {
curve: "sprint(500, 12, 0)"
};
app.on(Events.Click, function () {
app.states.next();
});