Skip to content

fix(#55): rename pose getters (getPoseMatrixCV/GL) + getPoseMatrixCV zero-matrix fix - #45

Merged
kalwalt merged 2 commits into
devfrom
fix/getposematrix-rename-55
Jun 20, 2026
Merged

kalwalt merged 2 commits into
devfrom
fix/getposematrix-rename-55

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 19, 2026

Copy link
Copy Markdown
Member

Companion to webarkit/WebARKitLib#56. Fixes #55 on the JS/glue side + rebuilds.

What

  • Submodule bump to the rename+fix commit (fix(#55): populate pose3d (getPoseMatrix returned zeros) + rename pose getters WebARKitLib#56) + rebuilt build/ and dist/.
  • emscripten glue (bindings.cpp, WebARKitJS.{h,cpp}): rename the bound JS API getPoseMatrixgetPoseMatrixCV, getPoseMatrix2getPoseMatrixGL.
  • src/WebARKitController.js: getPoseMatrix()getPoseMatrixGL() (the GL/right-handed pose the render path uses), added getPoseMatrixCV(); process_raw now calls getPoseMatrixGL().
  • examples/worker_threejs.js: dropped a stray debug log.

Why

getPoseMatrix() was returning a zero matrix (pose3d never 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 opaque 2 suffix.

⚠️ Breaking JS API change: webarkit.getPoseMatrix()/getPoseMatrix2() and controller.getPoseMatrix() are renamed. Hard rename (no aliases), per the agreed pre-1.0 rollout.

Testing

Rebuilt + tested both examples:

  • static (1920×1440) and webcam (640×480) track — 1000 matches, lost→found re-acquisition intact.
  • getPoseMatrixCV() returns a valid 4×4 pose (verified via a temporary probe; was all zeros before).

🤖 Generated with Claude Code

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>
@kalwalt kalwalt self-assigned this Jun 19, 2026
@kalwalt kalwalt added enhancement New feature or request javascript Emscripten / C / C++ all about Emscripten labels Jun 19, 2026
@kalwalt kalwalt moved this from To do to In progress in New markerless image tracking Jun 19, 2026
@kalwalt kalwalt added this to the Markerless tracking milestone Jun 19, 2026
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>
@kalwalt kalwalt moved this from In progress to Review in progress in New markerless image tracking Jun 20, 2026
@kalwalt kalwalt moved this from Review in progress to Reviewer approved in New markerless image tracking Jun 20, 2026
@kalwalt
kalwalt merged commit 1f39465 into dev Jun 20, 2026
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in New markerless image tracking Jun 20, 2026
@kalwalt
kalwalt deleted the fix/getposematrix-rename-55 branch July 5, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Emscripten / C / C++ all about Emscripten enhancement New feature or request javascript

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant