fix(#55): rename pose getters (getPoseMatrixCV/GL) + getPoseMatrixCV zero-matrix fix - #45
Merged
Merged
Conversation
Companion to webarkit/WebARKitLib#56. Bump the submodule to the rename+fix commit and rebuild build/ + dist/. - emscripten glue (bindings.cpp, WebARKitJS.{h,cpp}): rename the bound JS API getPoseMatrix -> getPoseMatrixCV, getPoseMatrix2 -> getPoseMatrixGL. - src/WebARKitController.js: getPoseMatrix() -> getPoseMatrixGL() (the GL pose the render path uses), add getPoseMatrixCV(); process_raw calls getPoseMatrixGL(). - examples/worker_threejs.js: drop a stray debug log. Verified: static + webcam examples track; getPoseMatrixCV() returns a real 4x4 pose (was zeros). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Re-point the submodule at the canonical webarkit/WebARKitLib dev tip after #56 (getPoseMatrix zero-matrix fix + getPoseMatrixCV/GL rename) merged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to webarkit/WebARKitLib#56. Fixes #55 on the JS/glue side + rebuilds.
What
build/anddist/.bindings.cpp,WebARKitJS.{h,cpp}): rename the bound JS APIgetPoseMatrix→getPoseMatrixCV,getPoseMatrix2→getPoseMatrixGL.src/WebARKitController.js:getPoseMatrix()→getPoseMatrixGL()(the GL/right-handed pose the render path uses), addedgetPoseMatrixCV();process_rawnow callsgetPoseMatrixGL().examples/worker_threejs.js: dropped a stray debug log.Why
getPoseMatrix()was returning a zero matrix (pose3dnever populated live — see #55). It's intentional public API (a user may want the raw pose), so it's fixed rather than removed. The rename gives the two getters self-describing names (CV= raw OpenCV 4×4,GL= right-handed/GL pose) instead of the opaque2suffix.Testing
Rebuilt + tested both examples:
getPoseMatrixCV()returns a valid 4×4 pose (verified via a temporary probe; was all zeros before).🤖 Generated with Claude Code