viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.3k stars 483 forks source link

Loading multiple ViroARImageMarker without blocking the UI #884

Open gbalduzzi opened 4 years ago

gbalduzzi commented 4 years ago

Environment

  1. Development OS: Mac
  2. Device OS & Version: iOS 13
  3. Version: ViroReact 2.17.4, React Native 0.62.2
  4. Device(s): iPhone 7 Plus

Description

I need to track multiple images using ViroARImageMarker. The only problem I have is that when I mount Viro with all my ViroARImageMarker components, the UI freezes for 1-2 seconds. It seems like all the loading is done on the UIThread.

The 1-2 seconds loading time is not an issue for me, but the UI freezed is. Is there a way to move the ViroARImageMarker loading away from the UIThread?

Reproducible Demo

Just create a ViroArScene with 20-30 ViroARImageMarker

tnghia944 commented 3 years ago

hi @gbalduzzi Have you solved this problem yet

rgouzal commented 3 years ago

I noticed also there is an issue that it consumes a lot of device power when rendering multiple markers.

gbalduzzi commented 3 years ago

No, I have not solved it yet. I mitigated the problem by:

cenaHara commented 3 years ago

hi @gbalduzzi do you know how to check target center in image center in a rectangle

leandro2219 commented 1 year ago

hi @gbalduzzi, I have this issue when use multiples targets (If i find target 1 then find target 2 I can't find target 1 again), https://github.com/ViroCommunity/viro/issues/160. Do you have it too? or is something on my code. Thanks.