vue-babylonjs
vue-babylonjs copied to clipboard
a button with onPointerUpObservable need to be pressed two times
Describe the bug I have a button:
var button1 = GUI.Button.CreateSimpleButton("but1", "Top"); button1.width = "150px"; button1.height = "40px"; button1.color = "white"; button1.cornerRadius = 20; button1.background = "green"; button1.top = "10px"; button1.verticalAlignment = 'top'; button1.onPointerUpObservable.add(function () { console.log("up"); // _this.flyToHome(); _this.camera.restoreState(); _this.camera.update(); });
advancedTexture.addControl(button1);
the button must reset the camera position but if I need to press for some seconds to see the camera reset. seems the action (restore the camera) it's interrupted and cannot be completed the first click
Minimally Reproducible Example
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- See error in (location [e.g. JavaScript Console])
Expected behavior A clear and concise description of what you expected to happen.
Screenshots (optional) Add any screenshots to help explain your problem, unless the minimally reproducible example is sufficient.
Environment (please complete the following information):
- Device: [e.g. Desktop or Smartphone]
- OS: [e.g. Windows]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.