mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Tiny changes
This commit is contained in:
parent
c9ff83920c
commit
5e25ecd33c
3 changed files with 3 additions and 10 deletions
|
@ -10,10 +10,6 @@ from helpers import *
|
||||||
from mobject import Mobject, PMobject, VMobject, \
|
from mobject import Mobject, PMobject, VMobject, \
|
||||||
ImageMobject, Group, BackgroundColoredVMobject
|
ImageMobject, Group, BackgroundColoredVMobject
|
||||||
|
|
||||||
# Set a @profile decorator over any method whose
|
|
||||||
# performance you'd like to analyze
|
|
||||||
from profilehooks import profile
|
|
||||||
|
|
||||||
class Camera(object):
|
class Camera(object):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"background_image" : None,
|
"background_image" : None,
|
||||||
|
@ -179,7 +175,6 @@ class Camera(object):
|
||||||
def capture_mobject(self, mobject, **kwargs):
|
def capture_mobject(self, mobject, **kwargs):
|
||||||
return self.capture_mobjects([mobject], **kwargs)
|
return self.capture_mobjects([mobject], **kwargs)
|
||||||
|
|
||||||
@profile
|
|
||||||
def capture_mobjects(self, mobjects, **kwargs):
|
def capture_mobjects(self, mobjects, **kwargs):
|
||||||
self.reset_aggdraw_canvas()
|
self.reset_aggdraw_canvas()
|
||||||
mobjects = self.get_mobjects_to_display(mobjects, **kwargs)
|
mobjects = self.get_mobjects_to_display(mobjects, **kwargs)
|
||||||
|
@ -280,7 +275,7 @@ class Camera(object):
|
||||||
continue
|
continue
|
||||||
aligned_points = self.align_points_to_camera(points)
|
aligned_points = self.align_points_to_camera(points)
|
||||||
coords = self.points_to_pixel_coords(aligned_points)
|
coords = self.points_to_pixel_coords(aligned_points)
|
||||||
coord_strings = coords.flatten().astype("string")
|
coord_strings = coords.flatten().astype(str)
|
||||||
#Start new path string with M
|
#Start new path string with M
|
||||||
coord_strings[0] = "M" + coord_strings[0]
|
coord_strings[0] = "M" + coord_strings[0]
|
||||||
#The C at the start of every 6th number communicates
|
#The C at the start of every 6th number communicates
|
||||||
|
|
|
@ -136,8 +136,6 @@ class NumberLine(VMobject):
|
||||||
self.tip = tip
|
self.tip = tip
|
||||||
self.add(tip)
|
self.add(tip)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class UnitInterval(NumberLine):
|
class UnitInterval(NumberLine):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"x_min" : 0,
|
"x_min" : 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue