alanross / AlvaAR

World tracking for WebAR. A Javascript library for Augmented Reality to run SLAM in the browser.
GNU General Public License v3.0
349 stars 73 forks source link

how to use with a-frame? #12

Open marcusx2 opened 1 year ago

marcusx2 commented 1 year ago

Do you have an example of how this library can be used with a-frame ?

alanross commented 1 year ago

Hi @marcusx2, Thanks for asking. I plan on adding support for different 3d engines in the future once the core implementation is more stable. The slam algorithm returns a camera pose array/matrix which contains the rotation and translation of the camera. This should work for any 3d engine.

Have a look the example and conversion.

akbartus commented 1 year ago

Hi! Started working on simplified, A-Frame version of this wonderful library. Please check it here: https://github.com/akbartus/A-Frame-World-Tracking

marcusx2 commented 1 year ago

@akbartus very nice! The robot is laid down though, shouldn't it be upstanding? It would be nice some features

  1. Tap to place
  2. Ability to hide small dots
  3. Fire event when floor is detected/when it's lost

Though I don't know if these features would better belong to AlvaAR itself.

akbartus commented 1 year ago

@marcusx2 thanks for suggestions. Yes, I can implement these features. Will include in my updated list of tasks.

marcusx2 commented 1 year ago

I think more specifically, a function to place/unplace. Then the coder would use that to implement a tap to place functionality. This gives more control.

@alanross @akbartus Ideally, it would be nice if we could have an indicator of where the object will be placed once the user taps. This is usually done by having the object be semi-transparent following the phone, or a reticle. See this video for reference (first 10 seconds). Can this already be done, or can it be implemented? The api would return the current position at all times, then the user could use that to make a reticle follow it.

nicolocarpignoli commented 11 months ago

@akbartus very nice! The robot is laid down though, shouldn't it be upstanding? It would be nice some features

  1. Tap to place
  2. Ability to hide small dots
  3. Fire event when floor is detected/when it's lost

Though I don't know if these features would better belong to AlvaAR itself.

On index.html we have <a-entity gltf-model="url(3d/Xbot2.glb)" ></a-entity> if you use "Xbot" instead, it uses the other included GLB file - which is the upstanding model.

Try replacing with <a-entity gltf-model="url(3d/Xbot.glb)" ></a-entity>.

Anyway, I still have a bit of difficulty on detecting plane. It seems to depend a lot on lightning of the room.

akbartus commented 11 months ago

@nicolocarpignoli thank you for the support. I will come back to this project soon and then will try to implement the features requested.

marcusx2 commented 6 months ago

@alanross @akbartus Was the project abandoned? I hope these features get implemented soon T_T.