3b1b / 3b1b/manim

No detailed and accurate explanation or tutorial for InteractiveScene

未關閉 適合新手
#1,870 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
93.9k
分支
7.7k
平均合併
2 天 13 小時
30 天內合併 PR
4

描述

I could not use interactive scene. It has the explanation:
```
"""
To select mobjects on screen, hold ctrl and move the mouse to highlight a region,
or just tap ctrl to select the mobject under the cursor.
Pressing command + t will toggle between modes where you either select top level
mobjects part of the scene, or low level pieces.
Hold 'g' to grab the selection and move it around
Hold 'h' to drag it constrained in the horizontal direction
Hold 'v' to drag it constrained in the vertical direction
Hold 't' to resize selection, adding 'shift' to resize with respect to a corner
Command + 'c' copies the ids of selections to clipboard
Command + 'v' will paste either:
- The copied mobject
- A Tex mobject based on copied LaTeX
- A Text mobject based on copied Text
Command + 'z' restores selection back to its original state
Command + 's' saves the selected mobjects to file
"""

```

That is not enough to let me know how to see the window and use my mouse and keyboard.

When i use this code:
```
class ABC(InteractiveScene):
def construct(self):
text = Text('ABC')
self.play(Write(text))
```
It says:
```
Media will be written to c:\beibi\a\media\. You can change this behavior with the --media_dir flag.

There are no scenes inside that module

```
But if i add "Scene", it will be strange.
```
class ABC(InteractiveScene, Scene):
def construct(self):
text = Text('ABC')
self.play(Write(text))
```
`Media will be written to c:\beibi\a\media\. You can change this behavior with the --media_dir flag.
`
And then a window is displayed, but it disappears in an instant. Nothing is displayed.
**Please tell me how to use interactive scene correctly.** Thanks!

If you want to preview the effect, see: `https://www.bilibili.com/video/BV1R34y1W7Xn/?spm_id_from=333.337.search-card.all.click&vd_source=56f860f8bb81d49bdbd9b13dc4731f94`
At 05:04, 05:32, etc.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

查看 manim/scene/interactive_scene.py 中的 InteractiveScene 類以了解其用法。查看現有使用 InteractiveScene 的範例或測試,以瞭解其實例化和運行方式。目標是編寫教程或更新 docstring,說明如何啟動互動式視窗並正確使用 mouse/keyboard 控制。

由索引模型根據 Issue 內容生成。

評估

領域
documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。