Some nice #SVG tricks. Animated "Knight Rider" bars, table of contents tweaks, and more.
Some nice #SVG tricks. Animated "Knight Rider" bars, table of contents tweaks, and more.
Okay, so apparently #drawIO does not export #SVG as proper SVG..... the texts are embedded in some HTML elements...
Firefox can render it perfectly, but when using some tool like #Inkscape , the text is a raster graphic.
When turning off font embedding and XML inclusion of the diagram within the SVG file, when exporting from drawIO, Inkscape can at least load the text as text, but it is weirdly truncated and does not stay within its bounds.
What the hell is this?
Edit: Pinging @drawio - perhaps you guys have an idea? :D
So something in my build setup is _very_ clever and knows that the default value for the preserveAspectRatio #SVG attribute is "xMidYMid meet". And therefore removes the attribute for production builds because of "performance" (as if this would make ANY difference). Problem is, there is a rather important CSS rule somewhere in the projects that selects for svg[preserveAspectRatio] and now everything's boken
New Kitten feature: Icons!
You can now make use of a subset of the icons in the Phosphor icons set by @minoraxis and @rektdeckard.
https://kitten.small-web.org/reference/#icons
Search through them in your editor by referencing `kitten.icons.categories` and `kitten.icons.tags`.
Add this to a file called index.page.js and run `kitten` to see a large duotone pink cat (because why not?):
export default function () {
return kitten.html`
<${kitten.icons.c.Cat}
size=40%
weight=duotone
colour=deeppink
/>
`
}
(And yes, the set includes icons for the fediverse. This one of the reasons I chose it.) ;)
Enjoy!
A much newer @codepen demo: smoothly connected cards https://codepen.io/thebabydino/pen/azbLBJy - continuous backgrounds across all, concave roundings + drop shadows, responsivity.
#GenerativeArt interlude
More fun with OEIS integer sequences.
Today we'll make some pseudospirals: a sequence of arcs with 90 degree turns in between, where the radii are driven off a sequence. Arcs may have a gain function applied. Negative radii flip direction.
A200437: Number of -n..n arrays x(0..9) of 10 elements with zero sum and no two or three adjacent elements summing to zero
Sequence negation (every 17th), no gain
Here's also a stepped `conic-gradient()` effect, with a grain effect applied https://cdpn.io/pvoBeZP
For more on the grain effect, check out this older post https://mastodon.social/@anatudor/110394395163731287
A @friction mograph test using text effect (a little too fast) !
Here is the friction project if anyone wants to take a look ! https://e.pcloud.link/publink/show?code=XZ8IldZJIA7G6DSzW0dOOxx9Dt3g0q4kMM7
Friction is an open source 2d animation software, which could replace #aftereffect
Unofficial discord https://discord.gg/FkjnM2r2JD
Official page https://friction.graphics/
By the way, the code is heavily commented https://codepen.io/thebabydino/pen/MYWxeew
So you can see how it works without JS, without wrapping individual elements into spans, just letting it wrap naturally. And without covers that wouldn't allow for an image backdrop behind the text.
Same visual result in both cases, it's just that the #CSS version specifies the entire RGBA value + (equidistant) stop positions for each stop, while the #SVG #filter one only specifies the alpha values for each stop. Given those are equidistant too, a `steps()` way of setting them would make sense.
More stepped gradient examples on @codepen
https://codepen.io/thebabydino/pen/jOoLmBv
These all use the same SVG filter.
#GenerativeArt interlude
Loops
1. Download sequence data from OEIS.org
2. Pick a random one
3. Take seq mod k to determine a turning angle from -90 to 90
4. Walk the sequence
Here we have k=5
A111569: a(n) = a(n-1)+a(n-3)+a(n-4) for n>3, a(0)=-1, a(1)=1, a(2)= 2 a(3)=1
5 angles
Over the weekend I got an SVG path to animate on scroll, using Anime.js.
Today I achieved the same effect with just CSS
The scroll version only works in Chromium-based browsers, but others can see it on hover.
I also dabbled with a WAAPI Version, which works the same via JS.
Mastodon - can you help me out?
If you can test on actual Safari (not another browser), does https://codepen.io/thebabydino/pen/EaxJmwJ?editors=1100 look the same for you as it does in my Epiphany screen? Or does the `conic-gradient()` cover the entire area?
Retoots appreciated if you cannot test. Thanks!
PS: Yes, I know it does NOT work in Firefox or Chromium browsers https://github.com/web-platform-tests/interop/issues/717
selfh.st/icons
Une collection d'icônes et de logos au format SVG, PNG, WEBP pour vos projets
selfh.st/icons
A collection of icons and logos in SVG, PNG, WEBP format for your projects
#Html #CSS #SVG #PNG #WEBP
#Mastodon #Fediverse #Pixelfed #Nextcloud