Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Deprecated SmallDot + OpenGLSmallDot (#1110)

Niklas Dewally292e49dcdf98
diff --git a/manim/mobject/geometry.py b/manim/mobject/geometry.py
index 7b83a28e2..cd1f6daba 100644
--- a/manim/mobject/geometry.py
+++ b/manim/mobject/geometry.py
@@ -76,6 +76,7 @@ from ..utils.space_ops import get_norm
from ..utils.space_ops import normalize
from ..utils.space_ops import rotate_vector
from ..utils.color import *
+from .. import logger
DEFAULT_DOT_RADIUS = 0.08
DEFAULT_SMALL_DOT_RADIUS = 0.04
@@ -443,11 +444,13 @@ class Dot(Circle):
class SmallDot(Dot):
- """
- A dot with small radius
- """
+ """Deprecated - A dot with small radius"""
def __init__(self, radius=DEFAULT_SMALL_DOT_RADIUS, **kwargs):
+ logger.warning(
+ "SmallDot has been deprecated and will be removed in a future release. "
+ "Use Dot instead."
+ )
Dot.__init__(self, radius=radius, **kwargs)
diff --git a/manim/mobject/opengl_geometry.py b/manim/mobject/opengl_geometry.py
index 48e5bbc9b..f0f8f1788 100644
--- a/manim/mobject/opengl_geometry.py
+++ b/manim/mobject/opengl_geometry.py
@@ -1,5 +1,6 @@
import numpy as np
+from .. import logger
from ..constants import *
from ..mobject.mobject import Mobject
from ..mobject.types.opengl_vectorized_mobject import (
@@ -341,7 +342,13 @@ class OpenGLDot(OpenGLCircle):
class OpenGLSmallDot(OpenGLDot):
+ """ Deprecated"""
+
def __init__(self, radius=DEFAULT_SMALL_DOT_RADIUS, **kwargs):
+ logger.warning(
+ "OpenGLSmallDot has been deprecated and will be removed in a future release."
+ "Use OpenGLDot instead."
+ )
super().__init__(radius=radius, **kwargs)