Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a function to get all existing persisted anchor handles #37

Closed
richardanaya opened this issue Nov 17, 2022 · 3 comments
Closed

Need a function to get all existing persisted anchor handles #37

richardanaya opened this issue Nov 17, 2022 · 3 comments

Comments

@richardanaya
Copy link

Right now there's not a way to recall persisted anchors from previous sessions. As an alternative I turn to using localStorage to store uuids of persisted anchor uuids. However, sometimes accidents happen and I lose that local storage list and I have a persisted list of anchors in my browser that I cannot access. It would be awesome if there was some function getPersistentAnchorHandles that would return me all stored persisted anchor's handles. A side benefit of this would be to allow me to not have to use localStorage solutions for basic storage of anchors and make my AR application simpler.

@richardanaya richardanaya changed the title Need a function to get all existing persisted anchor UUIDs Need a function to get all existing persisted anchor handles Nov 17, 2022
@cabanier
Copy link
Member

cabanier commented Nov 18, 2022

We could add a readonly attribute FrozenArray<DOMString>persistentAnchors to the XRFrame.
What do you think?

@richardanaya
Copy link
Author

That would work too :) probably more consistent that way.

@cabanier
Copy link
Member

Great! It will be in the next browser release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants