<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [Matrix4](./server.matrix4.md) &gt; [perspective](./server.matrix4.perspective.md)

## Matrix4.perspective() method

Sets the current matrix to a perspective matrix with the given field of view, aspect ratio, and near and far bounds.

**Signature:**

```typescript
perspective(fovy: number, aspect: number, near: number, far: number): Matrix4;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

fovy


</td><td>

number


</td><td>

The field of view of the projection.


</td></tr>
<tr><td>

aspect


</td><td>

number


</td><td>

The aspect ratio of the projection.


</td></tr>
<tr><td>

near


</td><td>

number


</td><td>

The near bound of the projection.


</td></tr>
<tr><td>

far


</td><td>

number


</td><td>

The far bound of the projection.


</td></tr>
</tbody></table>
**Returns:**

[Matrix4](./server.matrix4.md)

The current matrix.

