Skip to content

Commit 9f1b507

Browse files
committed
feat: add glow effect and typewrite on text
1 parent add6244 commit 9f1b507

File tree

24 files changed

+789
-53
lines changed

24 files changed

+789
-53
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustmotion"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
edition = "2021"
55
description = "A CLI tool that renders motion design videos from JSON scenarios. No browser, no Node.js — just a single Rust binary."
66
license = "MIT"

examples/glow_wiggle.json

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
{
2+
"version": "1.0",
3+
"video": {
4+
"width": 1920,
5+
"height": 1080,
6+
"fps": 30,
7+
"background": "#0a0a14"
8+
},
9+
"scenes": [
10+
{
11+
"duration": 5.0,
12+
"children": [
13+
{
14+
"type": "shape",
15+
"shape": "rect",
16+
"position": { "x": 0, "y": 0 },
17+
"size": { "width": 1920, "height": 1080 },
18+
"style": {
19+
"fill": {
20+
"type": "linear",
21+
"colors": ["#0a0a14", "#111128"],
22+
"stops": [0.0, 1.0],
23+
"angle": 135
24+
}
25+
}
26+
},
27+
28+
{
29+
"type": "text",
30+
"content": "Glow Effect",
31+
"position": { "x": 960, "y": 80 },
32+
"style": {
33+
"font-size": 56,
34+
"color": "#FFFFFF",
35+
"font-weight": "bold",
36+
"text-align": "center"
37+
},
38+
"preset": "fade_in_up",
39+
"preset_config": { "duration": 0.8 }
40+
},
41+
42+
{
43+
"type": "shape",
44+
"shape": "rect",
45+
"position": { "x": 160, "y": 220 },
46+
"size": { "width": 320, "height": 220 },
47+
"style": {
48+
"fill": "#5C39EE",
49+
"border-radius": 24,
50+
"glow": {
51+
"color": "#5C39EE",
52+
"radius": 20,
53+
"intensity": 2.0
54+
}
55+
},
56+
"preset": "scale_in",
57+
"preset_config": { "duration": 0.5, "delay": 0.3 }
58+
},
59+
{
60+
"type": "text",
61+
"content": "Purple",
62+
"position": { "x": 320, "y": 470 },
63+
"style": {
64+
"font-size": 20,
65+
"color": "#94a3b8",
66+
"text-align": "center"
67+
}
68+
},
69+
70+
{
71+
"type": "shape",
72+
"shape": "circle",
73+
"position": { "x": 720, "y": 240 },
74+
"size": { "width": 180, "height": 180 },
75+
"style": {
76+
"fill": "#f43f5e",
77+
"glow": {
78+
"color": "#f43f5e",
79+
"radius": 25,
80+
"intensity": 2.0
81+
}
82+
},
83+
"preset": "scale_in",
84+
"preset_config": { "duration": 0.5, "delay": 0.5 }
85+
},
86+
{
87+
"type": "text",
88+
"content": "Red",
89+
"position": { "x": 810, "y": 470 },
90+
"style": {
91+
"font-size": 20,
92+
"color": "#94a3b8",
93+
"text-align": "center"
94+
}
95+
},
96+
97+
{
98+
"type": "shape",
99+
"shape": "rect",
100+
"position": { "x": 1080, "y": 240 },
101+
"size": { "width": 180, "height": 180 },
102+
"style": {
103+
"fill": "#38bdf8",
104+
"border-radius": 90,
105+
"glow": {
106+
"color": "#38bdf8",
107+
"radius": 30,
108+
"intensity": 1.5
109+
}
110+
},
111+
"preset": "scale_in",
112+
"preset_config": { "duration": 0.5, "delay": 0.7 }
113+
},
114+
{
115+
"type": "text",
116+
"content": "Cyan",
117+
"position": { "x": 1170, "y": 470 },
118+
"style": {
119+
"font-size": 20,
120+
"color": "#94a3b8",
121+
"text-align": "center"
122+
}
123+
},
124+
125+
{
126+
"type": "shape",
127+
"shape": "rect",
128+
"position": { "x": 1440, "y": 220 },
129+
"size": { "width": 320, "height": 220 },
130+
"style": {
131+
"fill": "#34d399",
132+
"border-radius": 24,
133+
"glow": {
134+
"color": "#34d399",
135+
"radius": 15,
136+
"intensity": 2.5
137+
}
138+
},
139+
"preset": "scale_in",
140+
"preset_config": { "duration": 0.5, "delay": 0.9 }
141+
},
142+
{
143+
"type": "text",
144+
"content": "Green",
145+
"position": { "x": 1600, "y": 470 },
146+
"style": {
147+
"font-size": 20,
148+
"color": "#94a3b8",
149+
"text-align": "center"
150+
}
151+
},
152+
153+
{
154+
"type": "text",
155+
"content": "Text Glow",
156+
"position": { "x": 960, "y": 560 },
157+
"style": {
158+
"font-size": 44,
159+
"color": "#FFFFFF",
160+
"font-weight": "bold",
161+
"text-align": "center"
162+
},
163+
"preset": "fade_in_up",
164+
"preset_config": { "duration": 0.6, "delay": 1.2 }
165+
},
166+
167+
{
168+
"type": "text",
169+
"content": "NEON",
170+
"position": { "x": 350, "y": 700 },
171+
"style": {
172+
"font-size": 72,
173+
"color": "#ff00ff",
174+
"font-weight": "bold",
175+
"text-align": "center",
176+
"glow": {
177+
"color": "#ff00ff",
178+
"radius": 20,
179+
"intensity": 2.5
180+
}
181+
},
182+
"start_at": 1.5,
183+
"preset": "fade_in",
184+
"preset_config": { "duration": 0.5 }
185+
},
186+
187+
{
188+
"type": "text",
189+
"content": "Electric",
190+
"position": { "x": 960, "y": 700 },
191+
"style": {
192+
"font-size": 72,
193+
"color": "#38bdf8",
194+
"font-weight": "bold",
195+
"text-align": "center",
196+
"glow": {
197+
"color": "#38bdf8",
198+
"radius": 15,
199+
"intensity": 2.0
200+
}
201+
},
202+
"start_at": 1.8,
203+
"preset": "fade_in",
204+
"preset_config": { "duration": 0.5 }
205+
},
206+
207+
{
208+
"type": "text",
209+
"content": "FIRE",
210+
"position": { "x": 1550, "y": 700 },
211+
"style": {
212+
"font-size": 72,
213+
"color": "#fb923c",
214+
"font-weight": "bold",
215+
"text-align": "center",
216+
"glow": {
217+
"color": "#fb923c",
218+
"radius": 25,
219+
"intensity": 2.0
220+
}
221+
},
222+
"start_at": 2.1,
223+
"preset": "fade_in",
224+
"preset_config": { "duration": 0.5 }
225+
},
226+
227+
{
228+
"type": "text",
229+
"content": "Subtle glow on regular text",
230+
"position": { "x": 960, "y": 880 },
231+
"style": {
232+
"font-size": 32,
233+
"color": "#e2e8f0",
234+
"text-align": "center",
235+
"glow": {
236+
"color": "#e2e8f080",
237+
"radius": 8,
238+
"intensity": 1.5
239+
}
240+
},
241+
"start_at": 2.5,
242+
"preset": "fade_in_up",
243+
"preset_config": { "duration": 0.6 }
244+
}
245+
]
246+
}
247+
]
248+
}

0 commit comments

Comments
 (0)