Hi gang… I’m playing with a little project…
https://www.babylonjs-playground.com/#1AVEYO#66
It started with an OLD “magic carpet” wavey plane… that someone made LONG AGO. Then Wingnut put an advancedTexture (gui2d for mesh) on all of them, and one button… on each.
Then I started playing with the button events… AND with the functions that provide the ANIMATION of the button (like for pointer-enter and pointer-out - hovering). Hovering (enter/out)… events themselves… are not triggering real well. It is understandable… the darned mesh that the ADT texture is mapped-onto… is wiggling around like a fish.
Button 340 is the last one to be created, so I made IT face the camera. Click it… and you can see all sorts of crap happen… on-screen AND on-console. Wow, a rotation-on-click-event animation… fancy.
Thoughts about this playground:
-
Is there a way to use instances and instancesBuffer… instead of clones? Likely not… instances are not textured, and adt’s ARE textures.
-
How might we put a button on the BACK of the banner, which is also clickable and displays left-to-right correctly? These banners are targeted to be pulled by little 3D airplanes… and camera can be anywhere in my airport’s traffic pattern.
Two-sided button banners… a must (if possible)
-
Why IS pointerEnter/Out… NOT triggering. Is it because of wiggly mesh/adt? Another reason?
-
IF we get pointerEnter/Out working… AND we try some custom hover/un-hover animations… HOW do I know WHICH BUTTON is being hovered… while inside the pointerEnterAnimation and pointerOutAnimation functions? There’s no “d” and “s” being sent in args to those anim methods. hmm. Ideas on determining WHICH button is being hovered, while inside anim handlers… welcomed.
-
And finally, why DOES Wingnut feel the need-to torture GUI-2d… so badly and often?
Climb aboard this goofy project, at will, gang. I’m compiling a loose-list of folks… who shoot videos of their experiences with flying aircraft. I thought it might be fun to make a “visual” representation of the list… each pilot in a little BJS airplane, pulling the banner to THEIR youTube videos. (busy airspace around Lake Babylon airport.)
Wavey GUI… with added Wing-nut-ness.
Has anyone an easy way to make these banners two-sided? Perhaps, side-by-side identical buttons in a non-vertical stackpanel, then uOffset the adt texture 50%, so that it wraps to backside of wavey-plane? hehe
Maybe stack two buttons, one reversed somehow, both isBlockers? Add another wavey-plane and another adt, glued to the back of the original? hmm. Fun!