mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Have vectorized point inherit from point
This commit is contained in:
parent
d061bafaa2
commit
9186fa5551
1 changed files with 2 additions and 13 deletions
|
@ -5,6 +5,7 @@ from colour import Color
|
|||
|
||||
from manimlib.constants import *
|
||||
from manimlib.mobject.mobject import Mobject
|
||||
from manimlib.mobject.mobject import Point
|
||||
from manimlib.mobject.three_d_utils import get_3d_vmob_gradient_start_and_end_points
|
||||
from manimlib.utils.bezier import bezier
|
||||
from manimlib.utils.bezier import get_smooth_handle_points
|
||||
|
@ -969,7 +970,7 @@ class VGroup(VMobject):
|
|||
self.add(*vmobjects)
|
||||
|
||||
|
||||
class VectorizedPoint(VMobject):
|
||||
class VectorizedPoint(VMobject, Point):
|
||||
CONFIG = {
|
||||
"color": BLACK,
|
||||
"fill_opacity": 0,
|
||||
|
@ -982,18 +983,6 @@ class VectorizedPoint(VMobject):
|
|||
VMobject.__init__(self, **kwargs)
|
||||
self.set_points(np.array([location]))
|
||||
|
||||
def get_width(self):
|
||||
return self.artificial_width
|
||||
|
||||
def get_height(self):
|
||||
return self.artificial_height
|
||||
|
||||
def get_location(self):
|
||||
return np.array(self.points[0])
|
||||
|
||||
def set_location(self, new_loc):
|
||||
self.set_points(np.array(new_loc, ndmin=2))
|
||||
|
||||
|
||||
class CurvesAsSubmobjects(VGroup):
|
||||
def __init__(self, vmobject, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue