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

# transform3DEffect(_:)

Applies a 3D transformation to this view’s rendered output.

```
@export(implementation) nonisolated func transform3DEffect(_ transform: AffineTransform3D) -> some View
```

## Parameters

`transform`

The 3D transformation to apply to the view,
interpreting it as a 3D plane in space.

## Return Value

A view that renders transformed according to the provided
`transform`

## Discussion

### Apply a transform about an anchor

This does not adjust the transform relative to an anchor
point. Instead, apply the scale and rotation separately using
[`scaleEffect(_:anchor:)`](/documentation/SwiftUI/View/scaleEffect(_:anchor:)) together with
[`rotation3DEffect(_:anchor:)`](/documentation/SwiftUI/View/rotation3DEffect(_:anchor:)).

```swift
Model3D(url: URL(string: "https://example.com/robot.usdz")!)
   .scaleEffect(transform.scale)
   .rotation3DEffect(transform.rotation ?? .identity)
   .transform3DEffect(AffineTransform3D(
       translation: transform.translation))
```

---

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)