<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Anchor/Source/rect3D(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6AnchorV6SourceVAASo8SPRect3DaRszlE6rect3DyAEyAG_GAGFZ"
  },
  "title" : "rect3D(_:)"
}
-->

# rect3D(_:)

Returns an anchor source rect defined by `r` in the current element.

```
static func rect3D(_ r: Rect3D) -> Anchor<Value>.Source
```

---

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)