File tree Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ id : migrate
3
+ title : Migrate to Angular Three (WIP)
4
+ sidebar_label : Migrate to Angular Three (WIP)
5
+ ---
6
+
7
+ ## Packages
8
+
9
+ NGT is now distributed via ` angular-three ` (and auxiliary packages like ` angular-three-soba ` or ` angular-three-cannon ` ) instead of ` @angular-three/* `
10
+
11
+ ``` shell
12
+ npx ng add angular-three
13
+ npx ng add angular-three-soba
14
+ npx ng add angular-three-cannon
15
+ ...
16
+ ```
17
+
18
+ ## Canvas
19
+
20
+ The Scene Graph now has to be in a separate component instead of inline as Content Child to the ` NgtCanvas ` .
21
+
22
+ ``` html title="app.component.html"
23
+ <!-- before -->
24
+ <ngt-canvas >
25
+ <ng-template >
26
+ <ngt-mesh ></ngt-mesh >
27
+ </ng-template >
28
+ </ngt-canvas >
29
+ ```
30
+
31
+ ``` html title="app.component.html"
32
+ <!-- after -->
33
+ <ngt-canvas [sceneGraph] =" Scene" />
34
+ ```
35
+
36
+ where ` Scene ` is a reference to the component with our Scene graph.
37
+
38
+ ``` ts title="app.component.ts"
39
+ @Component ({
40
+ standalone: true ,
41
+ template: ` <ngt-mesh></ngt-mesh> ` ,
42
+ schemas: [CUSTOM_ELEMENTS_SCHEMA ],
43
+ })
44
+ export class SceneComponent {}
45
+
46
+ @Component ({
47
+ standalone: true ,
48
+ templateUrl: ' app.component.html' ,
49
+ imports: [NgtCanvas ],
50
+ })
51
+ export class AppComponent {
52
+ readonly Scene = SceneComponent ;
53
+ }
54
+ ```
55
+
56
+ :::info
57
+
58
+ Check out [ First Scene] ( ../getting-started/first-scene ) for better explanation
59
+
60
+ :::
61
+
62
+ ## Store
63
+
64
+ ` angular-three ` has migrated to [ RxAngular] ( https://www.rx-angular.io/ ) instead of [ NgRx] ( https://ngrx.io ) for our internal states.
65
+
66
+ :::info
67
+
68
+ Check out [ Store] ( ../api/store ) for more info
69
+
70
+ :::
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ const sidebars = {
47
47
label : 'Advanced' ,
48
48
items : [ 'advanced/routing' , 'advanced/compound' , 'advanced/performance' ] ,
49
49
} ,
50
+ {
51
+ type : 'category' ,
52
+ label : 'Migrations' ,
53
+ items : [ 'migrations/migrate' ] ,
54
+ } ,
50
55
] ,
51
56
// By default, Docusaurus generates a sidebar from the docs folder structure
52
57
// tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
You can’t perform that action at this time.
0 commit comments