Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify colors by url parameter #334

Merged
merged 4 commits into from
Dec 12, 2024
Merged

Specify colors by url parameter #334

merged 4 commits into from
Dec 12, 2024

Conversation

slimbuck
Copy link
Member

Fixes: #329

This PR:

  • adds ability to overwrite selectedClr, unselectedClr and lockedClr the way bgClr can
  • colors are specified as an array, for example &selectedClr=0.8,0,0,0.5
  • also deleted some legacy classes from config and code

@slimbuck slimbuck added the enhancement New feature label Dec 12, 2024
@slimbuck slimbuck requested a review from a team December 12, 2024 14:56
@slimbuck slimbuck self-assigned this Dec 12, 2024
@slimbuck slimbuck changed the title Specify colors by Add url parameter control for the other colors Specify colors by url parameter Dec 12, 2024
@willeastcott
Copy link
Contributor

Camel-case in URL params bothers me for some reason. But you're presumably doing this because they match up with JS property names?

@slimbuck
Copy link
Member Author

Yep

@willeastcott
Copy link
Contributor

willeastcott commented Dec 12, 2024

I mean, don't want to be annoying here, but I'd almost prefer a Map of nice URL params to internal property names. And then we can proudly document them.

@slimbuck
Copy link
Member Author

We could do, but:

  • this feature shouldn't be needed in the near future when we introduce document format
  • if we have a map we'd have to document it somewhere. currently there is just one reference and everything shares it

@willeastcott
Copy link
Contributor

OK, I shall bow to your supreme authority on this occasion.

@slimbuck
Copy link
Member Author

Which format would you prefer for url params, kebab-case? I might be able to do an auto-case-conversion...

@willeastcott
Copy link
Contributor

Yeah, I ❤️ kebabs. 😋

@slimbuck
Copy link
Member Author

I've added support for all values to specify either case, bg-clr or bgClr 👍🏻

@slimbuck slimbuck merged commit 38977fa into playcanvas:main Dec 12, 2024
2 checks passed
@slimbuck slimbuck deleted the clr-dev branch December 12, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] Support saving splat colors in URL parameters
2 participants