# v6 Migration Guide

[PixiJS 6](https://github.com/pixijs/pixi.js/releases/tag/v6.0.0) comes with few surface-level breaking changes. This document is **not complete**.

## Typings

If you're using TypeScript, make sure the follow is added to your **tsconfig.json**:

```json
{
  "compilerOptions": {
    "moduleResolution": "node",
    // Required for importing 3rd-party dependencies like EventEmitter3
    "esModuleInterop": true
  }
}
```

## Mesh Internals

If you ever overrode `Mesh._renderDefault` to take into account more uniforms like this: [v5 Reference](https://github.com/pixijs/pixi.js/blob/b05fb9c4b31efda244d40b680f6abf304c9daec3/packages/mesh/src/Mesh.ts#L314-L317)

```typescript
if (shader.program.uniformData.translationMatrix) {
  shader.uniforms.translationMatrix = this.transform.worldTransform.toArray(true);
}
```

Remove the if, leave the contents, otherwise you might not get correct sync uniform for `translationMatrix`, or even worse - get null pointer. [v6 Reference](https://github.com/pixijs/pixi.js/blob/2a4bb1f2b015bd557d9c037d8886f68a467cf40d/packages/mesh/src/Mesh.ts#L318).

```typescript
shader.uniforms.translationMatrix = this.transform.worldTransform.toArray(true);
```
