|
| 1 | +--- |
| 2 | +title: Angular Three v3 |
| 3 | +excerpt: Angular Three v3 |
| 4 | +date: 2025-01-04 |
| 5 | +authors: |
| 6 | + - chau |
| 7 | +tags: |
| 8 | + - angular |
| 9 | + - three |
| 10 | + - release |
| 11 | +featured: true |
| 12 | +--- |
| 13 | + |
| 14 | +Angular Three v3 is here with Angular 19 support! 🎉 |
| 15 | + |
| 16 | +## What's in Angular Three v3 |
| 17 | + |
| 18 | +- Angular 19 support 🚀 |
| 19 | +- Stable Testing API 🧪 |
| 20 | +- Routed scenes support is back 🧭 |
| 21 | +- Deprecation removals 🗑️ |
| 22 | + |
| 23 | +### Angular 19 support |
| 24 | + |
| 25 | +Angular Three v3 drops support for Angular 18 and below. This is because Angular 19 comes with a huge change |
| 26 | +to the Effect API (Learn more [here](https://riegler.fr/blog/2024-10-15-effect-context/)). While nothing really changes much to consumers, |
| 27 | +the way Angular Three utilizes the Effect API changes. |
| 28 | + |
| 29 | +From the library perspective, this update also allows for Angular Three components to go `standalone` by default. |
| 30 | + |
| 31 | +### Stable Testing API |
| 32 | + |
| 33 | +Angular Three Testing API (`angular-three/testing`) has been graduated from Developer Preview. Nothing changes to the API itself. The Testing API |
| 34 | +has been used to test a lot of Angular Three usages since its experimental phase and we are happy to announce that it is now stable. |
| 35 | + |
| 36 | +### Routed scenes support |
| 37 | + |
| 38 | +Due to [a fix in Angular Router](https://github.com/angular/angular/commit/3839cfbb18fcc70cae5a6ba4ba7676b1c4acf7a0), Angular Three has been _soft deprecating_ the Routed Scene use-case. |
| 39 | +However, the support is back in v3 with a solution. |
| 40 | + |
| 41 | +Angular Three implements a custom `RouterOutlet`, `NgtRouterOutlet`, for routed scenes. All it does is to make sure the outlet can provide |
| 42 | +the `NgtRendererFactory` when it activates the routed components. This _might_ seem like a workaround to some folks but we believe that it should work correctly |
| 43 | +for most use-cases. If you run into any problem at all, please file an issue on [Github](https://github.com/angular-threejs/angular-three). |
| 44 | + |
| 45 | +Check out the [Routed Scene](/core/advanced/routed-scene) documentation for more information. |
| 46 | + |
| 47 | +### Deprecation removals |
| 48 | + |
| 49 | +#### `NgtObjectEventsHostDirective` |
| 50 | + |
| 51 | +Short-hand host directive for `NgtObjectEvents` has been removed. |
| 52 | + |
| 53 | +```ts |
| 54 | +// instead of |
| 55 | +hostDirectives: [NgtObjectEventsHostDirective], |
| 56 | + |
| 57 | +// use |
| 58 | +hostDirectives: [{directive: NgtObjectEvents, inputs: [/* explicit inputs */], outputs: [/* explicit outputs */]}], |
| 59 | +``` |
| 60 | + |
| 61 | +#### `NgtsPivotControls` from `angular-three-soba/controls` |
| 62 | + |
| 63 | +The export `NgtsPivotControls` has been removed from `angular-three-soba/controls`. Update your import to `angular-three-soba/gizmos` |
| 64 | + |
| 65 | +#### `erp` input in `NgtrPhysics` |
| 66 | + |
| 67 | +`erp` input in `NgtrPhysics` has been removed as it's been a no-op for a while. |
| 68 | + |
| 69 | +## Conclusion |
| 70 | + |
| 71 | +This is a small major release to make sure Angular Three is not holding you back from Angular 19. Thank you. Happy coding! |
0 commit comments