Versions
@thatopen/components 3.4.8 (verified against the published dist/index.mjs + index.d.ts; source: packages/core/src/core/OrthoPerspectiveCamera/src/types.ts, orbit-mode.ts, plan-mode.ts, first-person-mode.ts).
What happens
The NavigationMode interface declares:
set: (active: boolean, options?: any) => void;
and OrthoPerspectiveCamera's world-attach handler calls:
this.mode.set(true, { preventTargetAdjustment: true });
But all three shipped implementations have arity 1 and discard the options: OrbitMode.set(active), FirstPersonMode.set(active), PlanMode.set(active).
Consequence
activateOrbitControls() runs twice on world assignment — once from the OrbitMode constructor, once from set(true) — and each run calls controls.moveTo(target.x, target.y, target.z), adjusting exactly the target the caller asked not to adjust.
Suggested fix
Implement preventTargetAdjustment in the three modes, or drop it from the interface and the call site so the contract stops promising what nothing honours.
Versions
@thatopen/components3.4.8 (verified against the publisheddist/index.mjs+index.d.ts; source:packages/core/src/core/OrthoPerspectiveCamera/src/types.ts,orbit-mode.ts,plan-mode.ts,first-person-mode.ts).What happens
The
NavigationModeinterface declares:and
OrthoPerspectiveCamera's world-attach handler calls:But all three shipped implementations have arity 1 and discard the options:
OrbitMode.set(active),FirstPersonMode.set(active),PlanMode.set(active).Consequence
activateOrbitControls()runs twice on world assignment — once from theOrbitModeconstructor, once fromset(true)— and each run callscontrols.moveTo(target.x, target.y, target.z), adjusting exactly the target the caller asked not to adjust.Suggested fix
Implement
preventTargetAdjustmentin the three modes, or drop it from the interface and the call site so the contract stops promising what nothing honours.