Skip to content

Commit

Permalink
app: glinting
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Jul 18, 2024
1 parent 3cbeadf commit b185354
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions WordCloudApp.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.42
# v0.19.45

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

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

# ╔═╡ 1aa632dc-b3e8-4a9d-9b9e-c13cd05cf97e
Expand Down Expand Up @@ -153,7 +153,7 @@ else
end

# ╔═╡ 14666dc2-7ae4-4808-9db3-456eb26cd435
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)"
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)"

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

2 comments on commit b185354

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/111263

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.0 -m "<description of version>" b185354731f65187893c0c96dbc2cdfbeae39c53
git push origin v1.1.0

Please sign in to comment.