Camera placement, looking down its local −Z.
World point in metres.
Vertical half-field tangent, tan(fovY / 2).
Frame width over height.
Optionalcrop: IAutoMovieDeliveryCrop
Delivery crop, or the whole gate when omitted.
NDC on both axes and the viewing depth in metres.
Project a world point into the delivered frame's normalized device coordinates.
The camera looks down its local −Z, as glTF cameras do, so
depth = −localZis positive in front of the lens, and NDC islocal / (depth · halfY)vertically andlocal / (depth · halfY · aspect)horizontally. With a crop, NDC is rescaled so the crop window spans[−1, 1]on both axes; without one, the whole gate does. Behind the lens (depth <= 0) the NDC is meaningless and atdepth = 0it is infinite orNaN: this never clamps, and the caller readsdepth, the near and far bounds and the[−1, 1]rectangle to decide. A malformed crop throws theRangeErrorof deliveryCropNdc.