Hallo Community,
i am still absolutly babylon beginner. Thank you for helping me.
I cant provide a Playground Link because i import meshes and this doesnt work in playground.
The Goal is to have this Viewer implemented in a website.
This works for me but i have still some things i would like to enhance:
A)
I am not fully Satisfied with the Radio buttons. How can i give it more space between circle and the
font? And I dont get it to change the color on hover.
B)
mesh.position.y = 2; doesn`t work. I would like to have the object a bit more upwards (in WorldSpace) on the Y Achses. Neither myMeshOne.position nor MyMesh.position work for me.
C)
Is it Possible to controll the switch function outside of the render canvas?
Radio Buttons in a div right side from the RenderView… would be awesome.!
May there is a better way to reach my goal. I would love to import a scene with 4 meshes and swap them on and off. I am looking forward to your reply and thank you from heart.
Can you explain a bit more of what do you mean by “switch function”? Do you want your GUI elements to be outside of the rendering canvas? If so, you can use standard HTML GUI.
thank you for taking the time to help me.
Next time i will try to rebuild it for the playground with your hint using external assets.
i dont get it, using the onPointerEnterObservable.
where do i place this command? // selectbox.onPointerEnterObservable.add(function () {selectBox.buttonBackground = "blue";}); ??
I tried… but it wont work. when i place it in another div it has no effect. at least there is no playground for help. or i missunderstand it.
For radiobuttons it will be similar, just a bit different code. I hope you’ve got the idea
Here is the example, just look at the source code, everything is there in one file - Mu-so 2nd Generation 3D (changing textures onclick)
I would also recommend to add to the CSS for your canvas outline: none;
to get rid from the black canvas border which appears when you interact with canvas.
last problem (only in chrome- not in firefox): when i click onto the modell to rotate my GUI disappers.
I tried touch-action=“none”. without success.
hello thank you very much. your first description showed me that i misinterpreted the HTML GUI for the time being. With a hint to the solution I could then implement my WĂĽsnchen accordingly.
It’s really great that you took the time to help me. Thanks for that!