AutoMovie API
    Preparing search index...

    Function resolveAutoMovieInspectionView

    • Turn an inspection view into the camera that draws it and the record that repeats it, for a picture of width by height pixels at film second seconds.

      View Camera
      film The subject's own camera, returned unchanged
      Fixed A perspective camera at the position looking at the target, with the subject camera's field of view and clips, rolled to the view's up when it states one
      Fixed with a scale An orthographic camera at the position looking at the target, the picture's height spanning the scale times its pixels, with clips at a quarter and three and a half times the eye's distance to the target
      A name the subject's views holds A perspective camera where that view places it at seconds, with the subject camera's field of view and clips
      A named viewpoint A perspective camera from the viewpoint's direction fitted to bounds by frameAutoMovieViewerSubject, with the subject camera's field of view
      A named viewpoint with orthographic An orthographic camera from the same direction whose frame holds every corner of bounds, by the same margin

      bounds is what the view frames: the host measures it on what is drawn, or on the focus the view names through the inspection handle's bounds. A subject's view wins a name over a named viewpoint, because the subject knows its own staging. A vertical named view takes the up direction its viewpoint documents, -Z from the top and +Z from the bottom; every other view takes +Y. The record's metresPerPixel is the orthographic frame's height over height.

      @follow changes only which seconds a host measures bounds over, the drawn second alone, so it resolves as the fit it modifies. A fixed camera with a scale repeats a fitted orthographic view exactly, because that view stands twice its frame's radius from its target with clips at half and seven times the radius.

      It throws for a size that is not positive, an unknown name with the accepted names listed, a subject view asked to be orthographic, followed or focused, and a fitted view without bounds, which means nothing is drawn to frame.

      const { camera, record } = resolveAutoMovieInspectionView({
      view: parseAutoMovieInspectionView("front@ortho"),
      text: "front@ortho",
      bounds: inspection.bounds(),
      camera: production.camera,
      views: production.views,
      seconds,
      width: 960,
      height: 540,
      });

      Parameters

      • props: {
            bounds: IAutoMovieViewerSubjectBounds | null;
            camera: PerspectiveCamera;
            height: number;
            seconds: number;
            text: string;
            view: IAutoMovieInspectionView;
            views?: Readonly<
                Record<
                    string,
                    (
                        seconds: number,
                    ) => {
                        position: readonly [number, number, number];
                        target: readonly [number, number, number];
                    },
                >,
            >;
            width: number;
        }
        • bounds: IAutoMovieViewerSubjectBounds | null

          World box a fitted view frames, or null when nothing is drawn.

        • camera: PerspectiveCamera

          The subject's delivery camera: the film view itself, and the field of view and clips the other views take.

        • height: number

          Picture height, pixels.

        • seconds: number

          The film second drawn.

        • text: string

          The view's text, kept in the record.

        • view: IAutoMovieInspectionView

          The view, as parseAutoMovieInspectionView read it.

        • Optionalviews?: Readonly<
              Record<
                  string,
                  (
                      seconds: number,
                  ) => {
                      position: readonly [number, number, number];
                      target: readonly [number, number, number];
                  },
              >,
          >

          The subject's own views by name, each placing a camera at a second.

        • width: number

          Picture width, pixels.

      Returns {
          camera: PerspectiveCamera | OrthographicCamera;
          record: IAutoMovieInspectionCamera;
      }