-
Notifications
You must be signed in to change notification settings - Fork 39
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
First try at version 2. #20
base: develop
Are you sure you want to change the base?
Conversation
Before reviewing the code — I have a hunch that instead of animating the blur kernel, it is better to cross-face two images with different blur radii. |
@@ -0,0 +1,47 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Headers are not included in this project by default, so we need to either add this to all files or remove ones introduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure what you mean. LFGlassView.h inherits from LFGlassLayer.h, though that could be moved to the implementation file and the header could see only a class definition for the LFGlassLayer instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the “Copyright” declaration block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that's already been covered, as far as applying that copyright header to every interface and implementation file. Unless there are some additional files that I've missed.
❤️ TBD: LiveFrost Sample + kernel slider + iPhone 4S |
I think you're right about cross-fading two images with different blur radii and scale factors. My suspicion is that's what's happening on the lock screen in iOS 7. I don't see a very clean way of adding that as an at run-time API right at this very instant. I'll probably pull out the current blurring bits in the meantime, as it's better to "not work" than "not work well". |
Regarding cross-fading that can be done as a |
Have the view (or even the layer) spawn an extra layer and do the That might work, probably should. Just copy, blur once, and use the copy as the "from" state while the "to" state (the current layer) lives on. I'll give that a shot after dentist. |
…t of messages from the view to the layer.
That blur radius bit was even simpler than I imagined. Thanks for the suggestion, @evadne . |
…GlassView. This keeps the defaults as they were, as before with the v2 changes, any change to blur radius would trigger an animation.
….0 tag has been made yet, and it may be a few days before that happens.)
- (void) addSubscribedViewsObject:(UIView<LFDisplayBridgeTriggering> *)object; | ||
- (void) removeSubscribedViewsObject:(UIView<LFDisplayBridgeTriggering> *)object; | ||
- (void) addSubscribedObject:(id<LFDisplayBridgeTriggering>)object; | ||
- (void) removeSubscribedObject:(id<LFDisplayBridgeTriggering>)object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question, KVO methods. 👍 ? 👎 ?
Hey there, @evadne! I noticed this repo went dormant. Do you still use this, or would you recommend another live blur library? (posted in this issue because it looked interesting) |
Soooo. Consider this a work in progress, though this is as far as I've gotten with about a day's worth of work.
Animating blurRadius didn't yield as many benefits as I'd hoped. Part of the problem is that our blur kernel, which Accelerate takes in, accepts odd integers. So the scaling between various levels of blurring is not... smooth. It's chunky. Argh.
You can try working with blur radius and scale factor to get something to animate, but the results aren't pretty. I'm not really sure where to begin, for that matter, with animating scale factor because Core Animation custom parameters don't offer nearly the level of customization that I want.
Besides beating myself up over that, there's also now an option in the LFGlassLayer to offer custom frames, bounds, positioning (think like "center"), anchor points, and target layers, so that should resolve the LONG AWAITED PR #4.
That looks pretty good, and there's lots of helper code to help make that feature easy to use. I hope folks like it.