I hope I didn’t read the official documentation too quick…
I ran today into a quite old forum comment from @RaananWhere where Raanan wrote that onPointerUp is technically deprecated.
To this day, I still use this syntax over Observables sometimes, typically when it results in cleaner code.
Should I strive for systematically using the Observables pattern nowadays?
And while I’m at it: is there any performance difference between the two approaches? (I’m thinking in particular when events are fired at high frequency e.g. pointer movement events.)
We never really deprecated it, but we did provide a better API. As we guaranty backwards-compatibility, those APIs will stay there for as long as you use the current packages we provide.
We recommend using the observables, as we believe this is the better architecture for your application. One of the reasons is that by setting onPointerUp you are changing the babylon context (adding a function to the BABYLON namespace), whereas when you use observables you attach yourself to an already-existing observable.
But, eventually - use whatever you feel fits your application. Those function definitions will not be removed from the scene
Back in 2018-9, there was. I remember having an exchange with @Deltakosh back then. So, I left it out but I have to admit I never tried again since. That’s why I’m asking. Obviously, I understand from your answer that everything should be fine now?