Project

Known issues & roadmap

What the v1.0.0 audit found, what 1.1.0 fixed, and what is still open, in plain language.

This page summarises a full code audit of v1.0.0 (68 rated findings with file and line references) and the 1.1.0 remediation that followed it. Most findings are fixed; what remains is listed plainly below, including the items that are open by decision rather than by oversight.

Fixed in 1.1.0

WebXR engine

  • Hit testing takes coordinates. hitTest({x, y}) with non-centre coordinates now performs a real ray-based hit test (centre still uses the reticle path).
  • Removed models are disposed. A documented ownership rule governs disposal on remove/switch/stop paths; the model cache is LRU-capped (config.modelCacheLimit, default 20), and engine.dispose() performs a full teardown (ARView's destroy() calls it).
  • Plane dots are one InstancedMesh per plane instead of one mesh per dot, and surface notifications fire on change at ≤10 Hz instead of per frame.
  • The reticle setting is honoured, showReticle: false is no longer forced back on at session start, placement or removal.
  • Session-start failures clean up (no leaked live session), and the fallback hit test always settles, including on session end.
  • Reference-space fallback: local-floor → local → viewer instead of local-floor or nothing.

Facade, hook and API shape

  • One model identifier: modelId everywhere (anchorId is a deprecated alias), and transform inputs are normalised at the engine boundary, {x, y, z} objects no longer produce NaN transforms.
  • Hook plane counts work (the engine's numeric counts are read as numbers).
  • switchModel material carry-over matches by material name, then order, multi-material models no longer flatten.
  • Enumeration exists: getPlacedModels() / clearModels() on the engine, ARView, the facade and the hook.
  • Per-instance hook engine: useARCore({ engine }) isolates a view; the default shared engine is constructed lazily.
  • One coded-error convention: public failures carry a stable code (ARError); messages are unchanged.
  • React is only needed by the hook, which lives at reticlexr/react; the native event bridge installs lazily on first subscription instead of at import. (The root entry still re-exports the hook as a deprecated alias, so root imports still pull React in 1.x.)

Native Android

  • Lifecycle is wired: pause/resume/destroy are forwarded; the render loop restarts reliably for a second session; plugin destroy stops and joins the render thread and destroys Filament resources in dependency order; the Filament engine is created lazily.
  • checkSupport asks ARCore (ArCoreApk.checkAvailability()) instead of always saying yes, and session creation receives the foreground Activity.
  • Anchors are real: hit tests are served by the render loop (the sole Session.update() caller) and a successful hit creates a real ARCore anchor whose id is returned.
  • The availability retry is bounded (25 attempts ≈ 5 s, then a coded timeout) and can never create a session after stop.
  • The library manifest no longer forces AR-required onto host apps (required="false" for the AR and camera features; AR-required is a documented opt-in).

Packaging and docs

  • The capacitor metadata key ships, and the clean consumer flow (npm install reticlexr → npx cap sync → plugin registered) is verified in a scratch Capacitor app.
  • Hand-written TypeScript declarations ship and are kept honest by tsc --checkJs; the package declares ESM + an exports map with subpaths; three and @capacitor/core are peer dependencies; lockfiles are committed and the CI workflow installs with npm ci.
  • Tests exist: the Vitest suite (27 files, 28 tests) passes locally, and the committed CI workflow defines jobs for it alongside the type-check, the example build and a Gradle :reticlexr:assembleDebug build. The workflow has not yet had a completed run, so treat the suite as a local verification for now.

Still open

  • Native model rendering (Android): scoped out by decision (Option B). The Android plugin provides session management, hit testing and events; placeModel, moveModel, setTransform, setMaterial, removeModel, getPlacedModels and clearModels reject with NOT_IMPLEMENTED on Android native instead of pretending to work. Models render in the WebXR runtime there. Implementing Android native rendering (Option A) remains an owner decision. iOS is not part of this item: since 1.2.0 the iOS runtime renders models natively (below).
  • iOS runtime is new and not yet device-tested (1.2.0). The ARKit + RealityKit plugin was written and package-verified without a Mac or iPhone in the loop, so no device run is recorded yet. Known iOS constraints by design: models must be USDZ (a GLB with no .usdz sibling and no usdzPath/usdzUrl rejects with MODEL_FORMAT_UNSUPPORTED); the host app must declare NSCameraUsageDescription or startSession rejects with CAMERA_PERMISSION_DENIED; and the iOS Simulator cannot run AR at all (no ARKit world tracking) — a real device is required.
  • Compatibility coverage is one device deep. The WebXR runtime has a first recorded device test (Redmi Note 9S, Android 12, Chrome 157, see Compatibility); the native Capacitor runtime has not been device-tested yet.
  • npm audit has never been run. The audit environment's registry proxy refuses the audit endpoint (403), so no vulnerability counts exist. The CI workflow defines the audit as a non-blocking step; run npm audit at the repository root and in example/ wherever the registry permits.
  • SSR: all entry points pass DOM-less import checks (no window/document access at import; the hook renders to string), but a full framework prerender (e.g. Next.js) has not been exercised, still TODO.

Still unverified anywhere: npm audit results and a full framework SSR prerender. Both are stated as such at their point of use on this site rather than asserted.