immersive-web / anchors

https://immersive-web.github.io/anchors/
Other
50 stars 20 forks source link

Ensure algorithms return something #44

Open annevk opened 4 years ago

annevk commented 4 years ago

I noticed a few times that algorithms were supposed to return something, e.g., a promise, but didn't.

It might help re-reading the algorithms and see if you could write an implementation from scratch given what's written down.

bialpio commented 4 years ago

Ah, good catch! I'm assuming you refer to the algorithms for both variants of createAnchor(), I'll take a pass and make sure the algorithms should be possible to implement from scratch and that they align with prototype implementation that we have to reduce the risk of future compat issues.

annevk commented 4 years ago

I'm pretty sure that fix doesn't work as you sometimes terminate the set of steps early.

bialpio commented 4 years ago

Yes, I've noticed this and then started going through another spec to double-check - this is also how I was describing early termination in hit test module. Keeping the bug open until I fix this.

annevk commented 4 years ago

I think I found the same issue in the main XR specification. Probably best not to copy-and-paste things too much 😉