Skip to content

Commit b185354

Browse files
committed
app: glinting
1 parent 3cbeadf commit b185354

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

WordCloudApp.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### A Pluto.jl notebook ###
2-
# v0.19.42
2+
# v0.19.45
33

44
using Markdown
55
using InteractiveUtils
@@ -80,7 +80,7 @@ md"""**average font size:** $(@bind avgfontsize NumberField(1:100, default=12))
8080
md"""###### ✿ Mask Style"""
8181

8282
# ╔═╡ f4844a5f-260b-4713-84bf-69cd8123c7fc
83-
md"""**mask shape:** $(@bind mask_ Select([:auto, :customsvg, box, ellipse, squircle, ngon, star, bezingon, bezistar])) $(@bind configshape  CheckBox(default=false))additional config
83+
md"""**mask shape:** $(@bind mask_ Select([:auto, :customsvg, box, ellipse, squircle, ngon, star, bezingon, bezistar])) $(@bind configshape CheckBox(default=false))additional config
8484
"""
8585

8686
# ╔═╡ 1aa632dc-b3e8-4a9d-9b9e-c13cd05cf97e
@@ -153,7 +153,7 @@ else
153153
end
154154

155155
# ╔═╡ 14666dc2-7ae4-4808-9db3-456eb26cd435
156-
md"**text colors:** $(@bind colors_ Select([:auto; WordCloud.Schemes])) $(@bind colorstyle Select([:random, :gradient])) [*Browse colorschemes in `ColorSchemes.jl`*](https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue)"
156+
md"**text colors:** $(@bind colors_ Select([:auto; WordCloud.Schemes])) $(@bind colorstyle Select([:random, :gradient])) $(@bind glinting CheckBox(default=false))✨ [*Browse colorschemes*](https://juliagraphics.github.io/ColorSchemes.jl/stable/catalogue)"
157157

158158
# ╔═╡ 2870a2ee-aa99-48ec-a26d-fed7b040e6de
159159
@bind go Button(" 🎲 Try again ! ")
@@ -423,6 +423,12 @@ begin
423423
end
424424
@time wc = gen_cloud(words_weights)
425425
if wc !== nothing
426+
if glinting
427+
animates = ["animate" => [:attributeName => "opacity", :values => "1;0.5;1",
428+
:begin => "$(rand(0:1000))ms", :dur => "1s",
429+
:repeatCount => "indefinite"] for _ in 1:length(wc)]
430+
configsvgimages!(wc, children=animates)
431+
end
426432
paintsvg(wc, background=showbackground)
427433
end
428434
end

0 commit comments

Comments
 (0)