mind-ar-js icon indicating copy to clipboard operation
mind-ar-js copied to clipboard

arSystem.pause(true) -> targetLost not calling

Open geekz-reno opened this issue 5 months ago • 1 comments

On pause result was find, the camera still going and stop scanning, but targetLost event never calling. If i remove the pause function, both are calling perfectly.

const modelTarget = document.querySelector("#my-ar");
  modelTarget.addEventListener("targetFound", (event) => {
      console.log("TARGET FOUND");
      arSystem.pause(true); // pause AR, keep video
  });

  modelTarget.addEventListener("targetLost", (event) => {
    console.log("TARGET LOST");
    arSystem.unpause(); // unpause AR and video
  });

geekz-reno avatar Sep 20 '24 03:09 geekz-reno