File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1067,25 +1067,24 @@ steps:
1067
1067
}
1068
1068
1069
1069
@override
1070
- @@ -102,8 +102,15 @@ class TrianglePainter extends CustomPainter {
1070
+ @@ -102,8 +102,14 @@ class TrianglePainter extends CustomPainter {
1071
1071
ByteData.sublistView(vertices),
1072
1072
);
1073
1073
1074
1074
- final model = vm.Matrix4.rotationY(angle);
1075
1075
- final view = vm.Matrix4.translation(vm.Vector3(0.0, 0.0, -2.0));
1076
1076
+ // 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);
1081
1080
+
1082
1081
+ // Move camera back a bit more for better view
1083
1082
+ final view = vm.Matrix4.translation(vm.Vector3(0.0, 0.0, -2.5));
1084
1083
+
1085
1084
final projection = vm.makePerspectiveMatrix(
1086
1085
vm.radians(45),
1087
1086
size.aspectRatio,
1088
- @@ -121,7 +128 ,6 @@ class TrianglePainter extends CustomPainter {
1087
+ @@ -121,7 +127 ,6 @@ class TrianglePainter extends CustomPainter {
1089
1088
1090
1089
renderPass.bindPipeline(pipeline);
1091
1090
You can’t perform that action at this time.
0 commit comments