Sudoku

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. Sudoku

    Test onPointerObservable

    but i am just realizing - pointerX and pointerY in the babylon scene are still not overwritten using that code. i would expect those values to be 500 but both are set to 0
  2. Sudoku

    Test onPointerObservable

    thanks for your answers! the manual interaction with the observable works fine. this.doSomething() is called on every move actually as it seems, i printed some console statements to test that. I had only troubles with writing automatic tests for the doSomething() code because i could not push an pointerevent into the observable - so it is difficult to write a PG for that. but i FINALLY found out how to get my mouseevent in there const pointerevent = new MouseEvent('click', {clientX: 500, clientY: 500}); scene.onPointerObservable.notifyObservers(pointerevent); notifyObservers... it was too obvious ^^ .. well.. Thanks again, have a nice day!
  3. Hi i am trying to write some tests to check if the pointerevents are processed correctly, but i have troubles triggering an onPointerObservable event. this._scene.onPointerObservable.add(() => { this.doSomething(); }, BABYLON.PointerEventTypes.POINTERMOVE); test doesn't call the soDomething() function: const pointerevent = new MouseEvent('click', {clientX: 500, clientY: 500}); scene._onPointerMove(pointerevent, new PickingInfo(), PointerEventTypes.POINTERMOVE); does someone have an idea what i am doing wrong? For the doSomething() i just need pointerX and pointerY, i do not need the picking info
  4. Hi everyone, one quick question: Is it possibel to set preventDefaultOnPointerDown for babylonjs GUI? PG example: https://www.babylonjs-playground.com/#CNT1E0#2 The move method is only called if the pointer is not down. Can i change that?
  5. the missing hint - thank you! just in case someone has a similar setup: i need to render the GUI elements in every viewport, but i just need to change the order in which the cameras are stored within activeCameras depending on the pointerposition and than the interaction with the labels works as expected.
  6. could you have a look at those two playground examples as well? the first example works fine while in the second example i added a second viewport and than the events are triggered slightly above the image. does works: https://www.babylonjs-playground.com/index.html#K60448#33 doesn't work: https://www.babylonjs-playground.com/index.html#K60448#32
  7. Hi together, i have some problems with the babylon GUI Image Observables for pointer events: if my viewport height is lower than 1 the pointerevents are not catched at the right position I will share two playgoundexamples: This works: https://www.babylonjs-playground.com/#K60448#28 This doesn't work: https://www.babylonjs-playground.com/#K60448#29 Did i forget to set an attribute?