<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Cinematic",
  "identifier" : "/documentation/Cinematic/CNScript-1ispe/Frame",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Cinematic"
    ],
    "preciseIdentifier" : "s:9Cinematic8CNScriptC5FrameV"
  },
  "title" : "CNScript.Frame"
}
-->

# CNScript.Frame

An object that represents what to focus on, and where to focus, in a given movie frame.

```
struct Frame
```

## Topics

### Instance Properties

[`var allDetections: [CNDetection]`](/documentation/Cinematic/CNScript-1ispe/Frame/allDetections)

All detections for the Cinematic movie.

[`var focusDetection: CNDetection`](/documentation/Cinematic/CNScript-1ispe/Frame/focusDetection)

What to focus on in a given frame of the movie.

[`var focusDisparity: Float`](/documentation/Cinematic/CNScript-1ispe/Frame/focusDisparity)

Where to focus in a given frame of the movie.

[`var time: CMTime`](/documentation/Cinematic/CNScript-1ispe/Frame/time)

The time of the focus transition.

### Instance Methods

[`func bestDetection(for: CNDetectionGroupID) -> CNDetection?`](/documentation/Cinematic/CNScript-1ispe/Frame/bestDetection(for:))

The best detection to focus on in a frame among those within the given detection group.

[`func detection(for: CNDetectionID) -> CNDetection?`](/documentation/Cinematic/CNScript-1ispe/Frame/detection(for:))

The detection in the frame with the given detection ID, if any.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)