Ping/pong alternate loop mode?

Is there something ala animejs’s Documentation | anime.js available in AnimationGroup? I’m seeing LOOPMODERELATIVE be not a lot of documentation of the specifics of how that works. Basically instead of cycling in loop mode it transitions 0–>100 then from 100 back to 0.

Hi again, D! Um… first… loopmode “relative”… is mentioned here, a bit… Animation of Objects - Babylon.js Documentation …near the bottom. If I understand it correctly… it means start next loop of animation… at the stopping point of previous animation run.

SO… if you are using relative-loopmode animation to move an object from x=0 to x=5, then the next loop will begin at x=5 and end at x=10. The NEXT animation run… happens “relative to” the end of the previous run. Unfortunately, it is not ping-pong related.

Now, about ping-pong… @Deltakosh once helped me do a ping pong of our trusty rabbit model… here…

https://www.babylonjs-playground.com/#1LNWLE#3

But it quit working somewhere in history, and I haven’t been able to get it working again… something to do with scoping and animatables. Probably irrelevant, but look at lines 46-52. That is a keyframes reverser… good old fashioned array manipulation. Pingpong() func is called at each animation-run… at onAnimationEnd callback-time.

After reversing the keys, the animation would run again, in reverse. Then the onAnimationEnd (callback) would trigger, pingpong would run again, reversing the keyframes again, and then the anim would run forward again.

According to @Deltakosh years ago when he helped me with this PG, he said THIS was the way to ping-pong an animation looping (which isn’t looping at all - it just LOOKS like it is, when it works).

And so… “relative” doesn’t apply HERE, either, because… relative is a type of loopmode, and there’s no looping involved.

I’m quite sure I’m not the coder that YOU are, DJ, so… I bet you can get that #3 playground working, or at least extract enough wisdom from it and from my yapping… to do a keys-reversing ping-ponger.

That darned rabbit has a skeleton… with a root bone, and 3 sub-bones, and maybe a box of Milkbones mixed-in, and I haven’t been able to repair that #3 ping-pong animation, yet. Maybe other helpers will get it working for me/us. But the main thing… DK once told me that the way to pingpongville… is with a keys-array reversal and anim re-begin.

I hope this helps. I have not heard-of any newer/fancier methods. Stay tuned… maybe wiser comments coming soon.

Wait, it this Wingnut from #truevision3d irc from long ago?

Nope, that doesn’t sound like me. I hung-around SenseMedia Moos… LambdaCore Moo servers (invented by Pavel Curtis at PARC/Xerox - Palo Alto Research Center). Home-based multi-user telnet text servers (Zork-like), upon which we added VRML1.0 and VRML97, and mostly used a webby moo client called Chaco Pueblo (probably 30 years ago). Me, Rocker, Irradiate, Bedouin, Stucky, and Sunwizard… blazing VRML trails on moo/mud servers. It was a magical time of massive network lag. heh

We KNEW 3d would be back, after the stagnation of VRML, and sure enough, here we are. It took a while. Any of THAT sound familiar? If you don’t currently have hair growing out of your ears, you’re probably not old enough to remember. hah

We had many moos networked together via a thing called SunNet, where I seemingly never stopped typing on my (micro-) world famous “channel z”. I blabbered aimlessly there, too. :smiley: Rarely on IRC. The only physics we had, happened when we threw a Commodore 64 across a room.

Truevision3d sounds familiar, though. Were they involved in any VRML plugins for browsers? Blaxxun? Cosmosplayer? (SO long ago - coal-powered steam-driven computer era) :wink: