Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

findGroupFraming

findGroupFraming(points, options): GroupFramingResult

Keeps points on the screen of an eye that rests where options puts it: tilts first, then slides, and pulls back only when no tilt and slide frame them all, as Cinemachine’s Group Framing, with the least pull a halving search finds. Pass the result to placeGroupFraming, eased or not, for the eye and its aim.

Parameter Type
points readonly FramingPoint[]
options GroupFramingOptions

GroupFramingResult

const framing = findGroupFraming([ball, player], options); const { eye, target } = placeGroupFraming(framing, options); void orbit.setLookAt(eye.x, eye.y, eye.z, target.x, target.y, target.z, false);