-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
204 lines (191 loc) · 3.9 KB
/
index.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
import { HTMLClip, loadPlugin } from "@donkeyclip/motorcortex";
import Player from "@donkeyclip/motorcortex-player";
import AbstractsDefinition from "../dist/motorcortex-abstracts.esm";
const Plugin = loadPlugin(AbstractsDefinition);
const clip = new HTMLClip({
css: `
.container {
overflow: hidden;
width:425px;
height:240px;
}
.wrapper{
width:1280px;
height:720px;
display:flex;
font-family: 'Poppins', sans-serif;
display: grid;
grid-row-gap:50px;
grid-column-gap:50px;
grid-template-columns: repeat(3, 1fr);
justify-items: center;
}
.flex{
display: flex;
justify-content: center;
background-color: #bfbfbf;
height: 100%;
width: 100%;
}
`,
html: `
<div class="flex">
<div class="wrapper">
<div class="container container1"></div>
<div class="container container2"></div>
<div class="container container3"></div>
<div class="container container4"></div>
<div class="container container5"></div>
<div class="container container6"></div>
<div class="container container7"></div>
<div class="container container8"></div>
<div class="container container9"></div>
</div>
</div>
`,
host: document.getElementById("clip"),
containerParams: {
width: "1728px",
height: "872px",
},
id: "root",
fonts: [
{
type: `google-font`,
src: `https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,400;0,500;0,800;1,700;1,800;1,900&display=swap`,
},
],
});
const CrossMoveRight = new Plugin.CrossMoveRight(
{
width: 425,
height: 240,
crossSize: 30,
crossThickness: 5,
travelDistance: 240,
items: 3,
color: "#8300ff",
},
{
selector: ".container1",
}
);
const CrossMoveRightOutline = new Plugin.CrossMoveRightOutline(
{
width: 425,
height: 240,
crossSize: 30,
travelDistance: 240,
steps: 5,
color: "#8300ff",
},
{
selector: ".container2",
}
);
const CrossRandom = new Plugin.CrossRandom(
{
width: 425,
crossSize: 30,
crossThickness: 5,
items: 12,
color: "#8300ff",
rows: 3,
timing: 0.5,
},
{
selector: ".container3",
}
);
const VerticalLinesMove = new Plugin.VerticalLinesMove(
{
width: 425,
height: 240,
maxLineWidth: 250,
color: "#8300ff",
},
{
selector: ".container4",
}
);
const CircleExplosion = new Plugin.CircleExplosion(
{
width: 425,
height: 240,
maxCirlcleSize: 30,
travelDistance: 200,
color: "#8300ff",
items: 5,
minR: 0,
maxR: 180,
border: true,
},
{
selector: ".container5",
}
);
const CircleBubbleUp = new Plugin.CircleBubbleUp(
{
width: 425,
height: 240,
maxCirlcleSize: 30,
travelDistance: 200,
color: "#8300ff",
items: 5,
border: true,
},
{
selector: ".container6",
}
);
const HorizontalLinesMove = new Plugin.HorizontalLinesMove(
{
width: 425,
height: 240,
maxLineHeight: 50,
color: "#8300ff",
},
{
selector: ".container7",
}
);
const Dots = new Plugin.Dots(
{
width: 425,
dotSize: 10,
items: 28,
color: "#8300ff",
rowGap: 30,
columnGap: 50,
rows: 7,
timing: 1.5,
repeats: 3,
},
{
selector: ".container8",
}
);
const CrossRowReveal = new Plugin.CrossRowReveal(
{
width: 425,
crossSize: 30,
crossThickness: 5,
items: 8,
color: "#8300ff",
reverse: false,
timing: 1,
},
{
selector: ".container9",
}
);
clip.addIncident(CrossMoveRight, 0);
clip.addIncident(CrossMoveRightOutline, 0);
clip.addIncident(CrossRandom, 0);
clip.addIncident(VerticalLinesMove, 0);
clip.addIncident(CircleExplosion, 0);
clip.addIncident(CircleBubbleUp, 0);
clip.addIncident(HorizontalLinesMove, 0);
clip.addIncident(Dots, 0);
clip.addIncident(CrossRowReveal, 0);
new Player({ clip });