Arcade.CameraFit
Types
count values first, first + stride, first + 2 stride, ... Each value is first + i stride (not a running sum), so a grid is exact per index.
A point that should land at screen height want_y (a fraction, y down), with its squared miss counted weight times.
Which lens the lens grid holds: fields of view in degrees, or orthographic extents in world units.
The whole search. Each lens value also costs lens_weight times itself, so of two equal fits the narrower lens wins.
The best candidate so far and its grid indices. Ties go to the earliest in lexicographic (lens, a, b, c) order, whatever order the walk visits.
Functions
fnfitfit(cx : c, n : Arcade.Numerics.Numerics, pose_at : c -> Float -> Float -> Float -> Pose, plan : FitPlan, ts : List(FitTarget)) : Rig needs ()#
The fitted rig: pose_at(cx, a, b, c) gives the pose for one point of the three pose grids, and the lens comes from the lens grid.