-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
105 lines (83 loc) · 1.71 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//useFramer();
useFramerWithCoffee()
//useMojs();
//Feel free to delete everything below
if(getEngine()=="Mojs")
{
const circle = new mojs.Shape({
shape: 'circle',
scale: { 0 : 1 },
fill: { 'cyan': 'yellow' },
radius: 100,
y: -340,
x: 0,
duration: 2000,
repeat: 999,
}).play();
const rect = new mojs.Shape({
shape: 'rect',
fill: 'none',
radius: 80,
stroke: { 'rgba(0,255,255, 1)' : 'magenta' },
strokeWidth: { 10: 0 },
strokeDasharray: '100%',
strokeDashoffset: { '-100%' : '100%' },
angle: { 0: 180 },
duration: 2000,
repeat: 999,
}).play();
const polygon = new mojs.Shape({
shape: 'polygon',
points: 5,
fill: { 'deeppink' : '#00F87F' },
x: { [-175] : 175 },
angle: { 0: 360 },
radius: 100,
y: 340,
duration: 1000,
repeat: 999,
}).play();
}
else if(getEngine()=="Framer")
{
var layerA, layerB, layerC;
layerA = new Layer({
width: 80,
height: 80,
backgroundColor: "#7ed6ff",
borderRadius: "4px"
});
layerA.animate({
properties: {
y: 300
}
});
layerB = new Layer({
width: 80,
height: 80,
x: 100,
backgroundColor: "#26b4f6",
borderRadius: "4px"
});
layerB.animate({
properties: {
y: 300,
rotationZ: 360
},
time: 2
});
layerC = new Layer({
width: 80,
height: 80,
x: 200,
backgroundColor: "#0079c6",
borderRadius: "4px"
});
layerC.animate({
properties: {
y: 300
},
time: 3,
curve: "cubic-bezier"
});
}