- From: Shay Davidson via GitHub <sysbot+gh@w3.org>
- Date: Mon, 19 Jun 2023 07:54:20 +0000
- To: public-css-archive@w3.org
Been using a RNG with a `seed` property quite a lot in my paint worklets experiments and they work rather well. However I don't think the use-cases for paint worklets are the same as for managing random effects across "collection" of items (like others have suggested here). The way I mostly imagine using random is for `lerp` functions (which surprisingly I didn't find in this discussion, e.g.: ``` width: min(0, max(100, calc(random(--seed) * 100)); ``` or even a color lerp ``` background-color: color-lerp(#fff, #000, random,()) // yes - this requires a new CSS function ``` While `--seed` can be an `<integer>` type, some of the suggestion here to generate seed by `n-th` item for example should work as well. -- GitHub Notification of comment by ShayDavidson Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2826#issuecomment-1596688433 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 19 June 2023 07:54:21 UTC