hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.24k stars 417 forks source link

Clickable item remain clickable after the target is lost #133

Closed gabdanGraldev closed 1 year ago

gabdanGraldev commented 2 years ago

After a target containing a clickable object is lost, the area is still clickable and the action associated with the click is performed. 1d 2d

hiukim commented 2 years ago

haha, nice spot. Right now, the contents are simply set to invisible. I guess that might be the reason.

villelahdenvuo commented 2 years ago

Also it seems to me like click events are not working properly with multiple targets.

ArtemOstapov commented 2 years ago

After a target containing a clickable object is lost, the area is still clickable and the action associated with the click is performed. 1d 2d

Could you plz share your example with clicking on the video? Wanna to add play/pause btn on video appeared on target, but still failed

ArtemOstapov commented 2 years ago

hi, @hiukim, tell me plz if it possible to have clickable play/pause btn on video appeared on a target? and on multiple targets? and if yes could you plz share such example? tnx

hiukim commented 2 years ago

@ArtemOstapov Yes, I think you can do that. It's not really related to the AR, more on general web development. You can implement some toggle buttons and programming logic to control the videos.

ArtemOstapov commented 2 years ago

@ArtemOstapov Yes, I think you can do that. It's not really related to the AR, more on general web development. You can implement some toggle buttons and programming logic to control the videos.

@hiukim, tnx for the quick answer, there is one your example from your github that is very interested for me, and it has play btn on the video and also btns left/right, could you plz share it? that is the link to it: https://hiukim.github.io/mind-ar-js-doc/examples/interative

hiukim commented 2 years ago

@ArtemOstapov yes, sure. view-source:https://hiukim.github.io/mind-ar-js-doc/samples/advanced.html

ArtemOstapov commented 2 years ago

@ArtemOstapov yes, sure. view-source:https://hiukim.github.io/mind-ar-js-doc/samples/advanced.html

tnx, for your answer, HiuKim, I think here I got problem with React... im doing it in React and clicks do not work, and in simple html - they work...

There is an issue on stackoverflow, could you plz take a look on it?

https://stackoverflow.com/questions/71663554/how-do-i-keep-react-from-stripping-a-frame-attributes

ArtemOstapov commented 2 years ago

@hiukim, tnx, i solved my issue, it was because of a-frame vs React incompatibility.

metaColin commented 2 years ago

Also it seems to me like click events are not working properly with multiple targets.

Has this been addressed?

I am working on a project with multiple image targets, but for some reason the first target in the 'targets.mind' array remains is the one that gets clicked regardless of which target is visible on screen.

ArtemOstapov commented 2 years ago

Has this been addressed?

I am working on a project with multiple image targets, but for some reason the first target in the 'targets.mind' array remains is the one that gets clicked regardless of which target is visible on screen.

I found a solution, try to do like there https://hiukim.github.io/mind-ar-js-doc/samples/advanced.html + add your logic

jessicachrist commented 1 year ago

Also it seems to me like click events are not working properly with multiple targets.

Has this been addressed?

I am working on a project with multiple image targets, but for some reason the first target in the 'targets.mind' array remains is the one that gets clicked regardless of which target is visible on screen.

@metaColin Have you found a solution?

hiukim commented 1 year ago

fixed in v1.2.1