I am making an application where I'm trying out flare animations. I have a custom animation and it works as intended. Except that the animation is looping repeatedly whereas i want it to play once and freeze the last frame.
I've tried using the FlareControls() class but I haven't had any luck. I've also tried setting the callback param to a function that sets "paused" to true but that didn't work either since isPaused is a final variable. I've also tried the callback parameter to print test in order to indicate that the animation was finished but it didn't work
FlareActor(
"assets/flares/checkmark.flr",
animation: "Checkmark",
alignment: Alignment.center,
shouldClip: false,
fit: BoxFit.contain,
snapToEnd: true,
callback: (value){
print("test");
// flare.animation = "idle";
},
With the snippet included, I'm expecting a message on the console to print test when the loop's finished but to no avail
On the Flare website when creating your animation, click the button next to your animation timeline in the bottom left, so that it is disabled. Now you export the new file and replace the old one in your assets.
Related
I am trying to run a walking animation on a gltf model from animationClip. The goal is to play the walking animation whenever the up arrow key is pressed and keep it running if the key is held down. For that i am playing the animation whenever first animation is completed but the animtion only plays once. It triggers the finished event but there is no animation.
walkAction = mixer.clipAction(walkClip);
walkAction.loop = THREE.LoopOnce;
walkAction.enabled = true;
walkAction.paused = true;
walkAction.clampWhenFinished = true;
walkAction.play();
mixer.addEventListener('finished', restoreAnim);
function restoreAnim(event){
mixer.removeEventListener('finished', restoreAnim);
walkAction.play();
}
The above code was to keep the character keep moving but it clamps up after the first time but the finished eventListener is still triggered repeatedly.
Also is there any other way to do this. I am using walking animation from mixamo and the problem persists even when using multiple animations and changing different properties.
Where you are downloading that animation. if it's a site like "mixamo.com" there will be an option called "In place". you have to check that check box before you download your selected animation. Then your animation will play without repositioning its place.
check this "In place" checkbox
I am having a problem with jQuery-scrollify. I have a header section which is a 100vh heigh and works without any problems. The next section is taller than the viewport. It scrolls down to it normally, but it prevents you from scrolling further down to look at the elements in that container. When I use the scrollbar and basically force it to scroll down, it snaps back up to the upper edge of the section.
I have tried changing the setHeights variable but that doesn't help.
The weird part is, that when I resize my window or open the Chrome inspector, it fixes itself. Because of that I tried calling the update method in the afterRender function, but that didn't work. Although it does work when I call the update method from the console. When Scrollify is installed I also get an issue where my footer is in the middle of the section above it. I do think that this issue is a result of the same problem as the scrolling , as that fixes itself when I update scrollify as well.
These are my settings:
section: ".scroll",
sectionName: "section-name",
interstitialSection: ".footer",
easing: "easeOutExpo",
scrollSpeed: 700,
offset: 0,
scrollbars: true,
target:"html,body",
standardScrollElements: false,
setHeights: true,
overflowScroll: true,
updateHash: true,
touchScroll:true,
before:function() {},
after:function() {},
afterResize:function() {},
afterRender:function() {}
I'm using fx: 'fade'
All working dandy, however I need to call a function before the actual fade in.
I've been playing around with the options before and after but before triggers to early and after too late.
I'm trying to implement a drag and drop system in the extension I'm developing but I'm running into a problem.
As far as I can tell, dnd is implemented by making a draggable object like this
let draggable = DND.makeDraggable(this.actor)
where this.actor is the Clutter actor I want to drag and drop, and then implementing the necessary callbacks. However, when I do this, Gnome Shell immediately crashes when I start to drag and leaves output on stderr like this
(gnome-shell:15279): St-ERROR **: st_widget_get_theme_node called on the widget [0x2b3c000 StBoxLayout.window-list-item-box:focused ("extension.js (~/Source/js/Botto...gmail.com) - GVIM")] which is not in the stage.
However, using the Looking Glass to call the get_theme_node method on that specific widget does work perfectly!
Do I have to explicitly add actors to the stage? And how could get_theme_node fail somewhere deep inside the belly of Gnome Shell, but not from the Looking Glass?
It is also necessary to implement a getDragActor and getDragActorSource method on the delegate of the actor you're trying to drag.
Here is a simple implementation that just drags around a clone of the actor.
getDragActor: function() {
return new Clutter.Clone({source: this.actor,
reactive: false,
width: this.actor.get_width(),
height: this.actor.get_height()});
},
getDragActorSource: function() {
return this.actor;
}
jQuery('area').cluetip({
sticky: true,
positionBy: 'auto',
width:370,
dropShadow:false,
closePosition: 'top',
closeText: '',
activation: 'click'
}
Straight to the point: when i click to activate popup windows, it's always at the right handside of where i click, even when there is not enough space. So for those it only shows some part to the cluetip as the rest is getting cutt off by browser window??
I am totally new to php and cluetip...
About the only thing that can be done, by the looks of things, is use the positionBy parameter. But it doesn't work really in determining if the tip is cutoff, I have tried many cases myself.
The options are auto, mouse, bottomTop, fixed, but none of them work really, they all get cut off.
The only solution I found myself was to use fixed and set top and left manually and always have it in the same place.
j('.areaH').cluetip({
positionBy: 'fixed',
topOffset: 200,
leftOffset: 100
});
Unfortunately though you are stuck at that place holder. I guess you could take the action and to each thing that calls a cluetip call a wait segment of 1 second then re-position the cluetip window using jQuery.
This would be in an onHover event set off by the thing that calls the cluetip separately. But that's about it. I have tested this myself on FF and Chrome and in both it cuts off.
http://plugins.learningjquery.com/cluetip/#features
In the onHover event you can always use another jQuery plugin that waits for an element to exist then re-position, what you can do is in each element have your own attr that has the new position, or just call the elements left and top position using jQuery and move the Cluetip window to that +20 in each direction.