# calculateNormals

Function · category: Graphics

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/scene/geometry/geometry-utils.js#L14

```ts
calculateNormals(positions: ArrayLike<number>, indices: ArrayLike<number>): number[]
```

Generates normal information from the specified positions and triangle indices.

**Parameters**

- `positions` (`ArrayLike<number>`): An array of 3-dimensional vertex positions.
- `indices` (`ArrayLike<number>`): An array of triangle indices.

**Returns** `number[]`: An array of 3-dimensional vertex normals.

**Example**

```ts
const normals = calculateNormals(positions, indices);
```
