Skip to content

Commit

Permalink
Simplifiying template (#1)
Browse files Browse the repository at this point in the history
* Update custom_mobject.py

* Update src/manim_plugintemplate/custom_mobject.py

Co-authored-by: Naveen M K <[email protected]>

* Update custom_mobject.py

* suggested fixes

Updated mobjects subpackage init.py

Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: Jason G. Villanueva <[email protected]>
  • Loading branch information
3 people authored Jan 2, 2021
1 parent 2a0d5f4 commit 944a20f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 59 deletions.
2 changes: 1 addition & 1 deletion src/manim_plugintemplate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.1.3"
from .custom_mobject import *
from .mobjects.dotgrid import *
58 changes: 0 additions & 58 deletions src/manim_plugintemplate/custom_mobject.py

This file was deleted.

1 change: 1 addition & 0 deletions src/manim_plugintemplate/mobjects/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .dotgrid import *
14 changes: 14 additions & 0 deletions src/manim_plugintemplate/mobjects/dotgrid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from manim import *

__all__ = ["DotGrid"]
class DotGrid(VMobject):
def __init__(self):
super().__init__()
dot1 = Dot(fill_color=GREEN).shift(LEFT)
dot2 = Dot(fill_color=BLUE)
dot3 = Dot(fill_color=RED).shift(RIGHT)
self.dotgrid = VGroup(dot1, dot2, dot3)
self.add(self.dotgrid)

def update_dot(self):
self.dotgrid.become(self.dotgrid.shift(UP))

0 comments on commit 944a20f

Please sign in to comment.