chore(docs): make 2nd example more different

This commit is contained in:
Jérome Eertmans
2023-08-08 14:30:43 +02:00
parent efc3017df8
commit e08edb6fe1

View File

@ -51,17 +51,18 @@
"source": [ "source": [
"class MyOtherSlide(Slide):\n", "class MyOtherSlide(Slide):\n",
" def construct(self):\n", " def construct(self):\n",
" square = Square()\n", " text = VGroup(\n",
" square.save_state()\n", " Text(\"Press\"),\n",
" circle = Circle()\n", " Text(\"and\"),\n",
" Text(\"loop\"),\n",
" ).arrange(DOWN, buff=1.)\n",
" \n", " \n",
" self.play(Create(square))\n", " self.play(Write(text))\n",
" self.next_slide()\n", " self.next_slide()\n",
" self.start_loop()\n", " self.start_loop()\n",
" self.play(Transform(square, circle))\n", " self.play(Indicate(text[-1], scale_factor=2., run_time=.5))\n",
" self.play(Restore(square))\n",
" self.end_loop()\n", " self.end_loop()\n",
" self.play(FadeOut(square))" " self.play(FadeOut(text))"
] ]
}, },
{ {