Skip to content

Commit d958ba9

Browse files
committed
Update intro_flutter_gpu rebuild script
1 parent 88d01b8 commit d958ba9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

intro_flutter_gpu/codelab_rebuild.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,25 +1067,24 @@ steps:
10671067
}
10681068
10691069
@override
1070-
@@ -102,8 +102,15 @@ class TrianglePainter extends CustomPainter {
1070+
@@ -102,8 +102,14 @@ class TrianglePainter extends CustomPainter {
10711071
ByteData.sublistView(vertices),
10721072
);
10731073
10741074
- final model = vm.Matrix4.rotationY(angle);
10751075
- final view = vm.Matrix4.translation(vm.Vector3(0.0, 0.0, -2.0));
10761076
+ // Create model matrix with multiple rotations
1077-
+ final model =
1078-
+ vm.Matrix4.identity()
1079-
+ ..rotateY(angle)
1080-
+ ..rotateX(angle / 2);
1077+
+ final model = vm.Matrix4.identity()
1078+
+ ..rotateY(angle)
1079+
+ ..rotateX(angle / 2);
10811080
+
10821081
+ // Move camera back a bit more for better view
10831082
+ final view = vm.Matrix4.translation(vm.Vector3(0.0, 0.0, -2.5));
10841083
+
10851084
final projection = vm.makePerspectiveMatrix(
10861085
vm.radians(45),
10871086
size.aspectRatio,
1088-
@@ -121,7 +128,6 @@ class TrianglePainter extends CustomPainter {
1087+
@@ -121,7 +127,6 @@ class TrianglePainter extends CustomPainter {
10891088
10901089
renderPass.bindPipeline(pipeline);
10911090

0 commit comments

Comments
 (0)