-
Notifications
You must be signed in to change notification settings - Fork 19
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
IDL proposal: createAnchor or addAnchor. destroyAnchor or removeAnchor #10
Comments
I'm unsure; what's more webby? 😄 My initial reaction is create/destroy; add/remove makes sense; I understand where "detach" might come from, but as a dev I'd think "ok, I've detached it from the world ... does it still exist? Do I need to destroy it too?" since the other one is "create" |
In Windows Mixed Reality, apps don't "remove" or "detach" free-space anchors, they simply create them and then let them get ref-counted away when they will no longer be needed. Can you elaborate on the benefit to an app of "detaching" an anchor without destroying it? I suspect that part of this difference may come from overloading of the term "anchor", as discussed in #4, to represent not just arbitrary free-space anchors that apps create themselves, but also detected environmental features, such as planes and meshes - in that case, an app would (for example) never destroy a detected plane, though it may choose not to reason about it once the user has set up their experience on some other plane. Perhaps then, "detach" would be a concept specifically suited to detected world geometry in particular? |
In the current approach to the API, anchors are exclusively poses that are supposed to be tracked by the underlying system, and they get created only if the application requests them (i.e. plane is not an anchor). With that in mind, I have decided to go with |
Agreed on having an explicit method for destroying an anchor synchronously. However, I also agree with @blairmacintyre that the name I wonder if I'll make a specific issue for bikeshedding |
Just wanted to capture some thoughts on the API ergonomics and identifiers for method names. Should we use create or add, destroy or remove. Native SDKs don't seem to agree on these names either:
ARKit: addAnchor and removeAnchor
ARCore: createAnchor and detach
Of course, more names could be proposed like
XRAnchor.destroy/remove
instead ofXRSession.removeAnchor/destroyAnchor
.The text was updated successfully, but these errors were encountered: