I added two Lottie animations to my wpf project and when both native animations and lottie animations are rendered at the same time, the native ones have slown down to almost a crawl.
Is there any way to pre-render the animations? Or any other suggestions?
The solution I figured out is to load the animations when I need them and dispose of them when I'm done. I am using them in button, so my solution for now is, when the button appears, to load it:
animation = new LottieAnimationView();
animation.SetAnimationAsync("Assets/Images/image.json");
animation.Scale = 1.5;
button.Content = animation;
And when the button leaves the view:
button.Content = "";
animation.Dispose();
I am not a fan of the solution, but at least the other animations that run at the other times aren't lagging anymore.
Related
How can we make smooth scroll from locomotive scroll and scroll triggered animations (with framer motion and react-intersection-observer) coexist ?
I've made a very basic codesandbox with smooth scroll enabled and a small animation scroll triggered and as you can see the animation is very "buggy" (to see it, you have to open the codesandbox browser in a new window, if not, the smooth scroll doesn't work - and the animations works fine) :
https://codesandbox.io/s/smooth-scroll-framer-motion-8z5u8s?file=/src/App.js
Maybe I implemented locomotive scroll in a bad way ? Maybe I did something wrong with the animation ? Maybe it's simply impossible ? You tell me :)
Cheers
I'm making a dropdown menu and I wanted to create an animation using framer motion. The problem I encounered is that when the animation starts the component hides under the other components on the website until the animation ends. I have seen that you can specify zIndex property but it doesn't seem to work. Did anyone have a similar problem? Any solution?
Pls how can i use slide transition for Images on the same Form?
I used this code, but it shows and error
Label lab = new Label();
lab.setUIID("IMAGE");
lab.setTransitionOutAnimator(CommonTransitions.createSlideFadeTitle(true,duration.getAsInt(3000)));
pls how do I go about this. Thanks
You need to use slide. Slide fade is a special transition designed for forms and is used in iOS to fade the title while sliding.
The way to animate a components entrance/exit is to replace it e.g.:
parentContainer.replace(currentComponent, newComponent, CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 400);
When I open the item-accordion I have used the animation .But the item-accordion has the image that is wrap in the multiple row using display flex property of the CSS3. Whenever I open the accordion the extra content is displayed on the right during transition.So can anyone suggest what can be done to solve it?And this happens when width of the content is small
Another problem is i have used the animate-repeat animation to delete the item.But when i open the item-accordion the animation is applied to them also hence animating the image as a list.
.list .item-accordion {
-webkit-transition:0.09s all linear ;
transition: 0.09s all linear;
}
This is the animation I am using.
The demo of the code is over here:
http://plnkr.co/edit/FnQVCYrSGOlpk5wNxAZ6?p=preview
I have had similar issues when having to meet complex animation requirements. I have used greensock for more complex animations but that doesn't seem to be needed here. The general concept is that you are going to want to animate something but change/alter the properties before and after the animation has completed. You are going to have to be using a few callback promises to run additional animation after the first part of the animation has completed or do some manual calculations and adjust properties before starting or ending.
Angular Animate
Ionic Animate
It seems like ionic is allowing for onStart and onEnd callbacks. I would hide or force certain properties onStart and reset them onEnd so that you can get around what you are trying to work with. If you are not wanting to work with a fixed width or height you are going to have to grab window/screen size and so some basic calculations based on that. So you would get your window size set the size based on the window for the animation then reset back to auto when completed.
How can I make the nav menu collapse and expand with a smooth animation rather than the jerk? Please check www.mobilewebbestpractices.com/index.html on small resolution to see what I would like to have?
The reason it's slow is that the system can't draw the frames quickly enough to make it a smooth animation.
The solution I've found to this problem is to stop using animation altogether.
You might try code similar to the following...
$(function() {
$('.btn.btn-navbar').live('click', function() {
$('.nav-collapse').toggle();
});
});