Just started with fuse since yesterday evening, and i must say, it’s quite impressive! The FPS is really good, thank you OpenGL
There is one thing i can’t find in the documentation, that is; a single way animation, right now when i press a button, and use something like the <WhilePressed> trigger, the animation always goes back to it’s resting state when i release the button.
Now i could work around this using a <WhileTrue> trigger, but i have a slighty more complicated use case in my head.
I’d like to create a Material Design inspired button, when you click it, a circle behind the button will scale up to the size of the screen, fading out quickly.
Right now i use an Observable and a trigger, i’ve set the DurationBack of the Animation properties to 0, and a setTimeout every time the button is hit. This kinda works, but using setTimeout is not very nice. Also, when you hit the button again before the animation / setTimeout is finished, nothing happens (of course).
How i would usually do this is by creating a new Circle view behind the button, scaling that up, and when the animation is done; removing the view from it’s parent.
Yes, actually, i got inspired by that one. The thing is, that just animates between 2 states. What i’m looking for is a single animation, preferably triggered by JS, that just does one job.
Or even better, a way to insert new Views (is a Circle called a View or a Layer or what do you call it?) from JS, and maybe even launching Animations on the JS generated views.
Alright i think i’m getting the hang of it, doing so much programming in XML / UX takes some time to get used to!
What i did; made an Observable that’s an array of all the circles i’m going to use. Used the <Each> tag to iterate through that Observable, then i used the <WhileTrue> trigger to animate the element. I added a Callback with a handler that removes the first item in the Array, and it all works!
Still, i think it would be kinda nice to give some more power to JS, adding / modifying ux elements, in some use cases this can be handy. For now, i fixed it the ‘UX’ way.
Sounds like you solved your issue? I do agree that it could be handy to have more control over UX elements from JS, but a design decision we made was to keep a strict border between UX and JS since the moment you have UI leaks into your business logic or business logic leaks into your UI the gates to hell will open. For animation and other FPS dependent user experience features that you want to make should be done in UX or Uno
That said, if you know about some usecase where you can’t solve the issue without JS or it actually makes sense to do roundtrips to JS, please let me know!
Hi! I want to trigger an animation when a marker in a map is tapped. Putting a inside MapView does not work. The code would not show in the preview. I have urlencoded it. Decode it here: http://meyerweb.com/eric/tools/dencoder/