---
title: "init(from:)"
framework: spatial
role: symbol
role_heading: Initializer
path: "spatial/vector3d/init(from:)"
---

# init(from:)

Creates a new instance by decoding from the given decoder.

## Declaration

```swift
init(from decoder: any Decoder) throws
```

## Parameters

- `decoder`: The decoder to read data from.

## See Also

### Encoding and decoding a vector

- [encode(to:)](spatial/vector3d/encode(to:).md)
