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

Allow tighter Config controls over color variation, and ensure all shapes and colors are included. #9

Merged
merged 2 commits into from
Oct 9, 2017

Conversation

bryanjclark
Copy link
Contributor

I found it frustrating that Cheers would allow me to specify colors,
but would then vary the color wildly (0.8 as the default,
non-configurable value).

This change leaves 0.8 as the default (so that others using this
dependency won’t see any change) but expands Config to include
“colorRange”, which is applied to the CAEmitterCells.

Bryan Clark added 2 commits October 6, 2017 10:48
I found it frustrating that Cheers would allow me to specify colors,
but would then vary the color wildly (0.8 as the default,
non-configurable value).

This change leaves 0.8 as the default (so that others using this
dependency won’t see any change) but expands Config to include
“colorRange”, which is applied to the CAEmitterCells.
Previously, if I only used one color, then I’d only get one shape of
confetti.

Now, there’s a new Array extension,
`Array.createAllCombinations(from:and:)` — you can see it in action in
`CheerTests.swift`. This function ensures that all the images and
colors in the Config will be represented in the confetti.
@bryanjclark bryanjclark changed the title Add "color range" to config Allow tighter Config controls over color variation, and ensure all shapes and colors are included. Oct 6, 2017
@onmyway133
Copy link
Owner

@bryanjclark good PR, and with good test. I like this 👍 . Many thanks

@onmyway133 onmyway133 merged commit 46fb62f into onmyway133:master Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants