@@ -35,8 +35,8 @@ fn sketch() -> error::Result<()> {
3535
3636 // thin wireframe box
3737 graphics_record_command ( graphics, DrawCommand :: PushMatrix ) ?;
38- graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: new ( -80.0 , 0.0 ) ) ) ?;
39- graphics_record_command ( graphics, DrawCommand :: Rotate { angle } ) ?;
38+ graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: new ( -80.0 , 0.0 ) . extend ( 0.0 ) ) ) ?;
39+ graphics_record_command ( graphics, DrawCommand :: Rotate { angle, axis : Vec3 :: Z } ) ?;
4040
4141 graphics_record_command (
4242 graphics,
@@ -60,8 +60,8 @@ fn sketch() -> error::Result<()> {
6060
6161 // thick wireframe box
6262 graphics_record_command ( graphics, DrawCommand :: PushMatrix ) ?;
63- graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: ZERO ) ) ?;
64- graphics_record_command ( graphics, DrawCommand :: Rotate { angle : angle * 0.7 } ) ?;
63+ graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: ZERO . extend ( 0.0 ) ) ) ?;
64+ graphics_record_command ( graphics, DrawCommand :: Rotate { angle : angle * 0.7 , axis : Vec3 :: Z } ) ?;
6565
6666 graphics_record_command (
6767 graphics,
@@ -85,8 +85,8 @@ fn sketch() -> error::Result<()> {
8585
8686 // thick wireframe sphere
8787 graphics_record_command ( graphics, DrawCommand :: PushMatrix ) ?;
88- graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: new ( 80.0 , 0.0 ) ) ) ?;
89- graphics_record_command ( graphics, DrawCommand :: Rotate { angle : angle * 0.5 } ) ?;
88+ graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: new ( 80.0 , 0.0 ) . extend ( 0.0 ) ) ) ?;
89+ graphics_record_command ( graphics, DrawCommand :: Rotate { angle : angle * 0.5 , axis : Vec3 :: Z } ) ?;
9090
9191 graphics_record_command (
9292 graphics,
@@ -110,11 +110,12 @@ fn sketch() -> error::Result<()> {
110110
111111 // wireframe-only sphere (no fill)
112112 graphics_record_command ( graphics, DrawCommand :: PushMatrix ) ?;
113- graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: new ( 160.0 , 0.0 ) ) ) ?;
113+ graphics_record_command ( graphics, DrawCommand :: Translate ( Vec2 :: new ( 160.0 , 0.0 ) . extend ( 0.0 ) ) ) ?;
114114 graphics_record_command (
115115 graphics,
116116 DrawCommand :: Rotate {
117117 angle : -angle * 0.3 ,
118+ axis : Vec3 :: Z ,
118119 } ,
119120 ) ?;
120121
0 commit comments