mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 14:03:59 +08:00
True end of Music and Measure draft 1
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import numpy as np
|
||||
import itertools as it
|
||||
import operator as op
|
||||
import os
|
||||
from PIL import Image
|
||||
from random import random
|
||||
@ -7,6 +8,7 @@ from copy import deepcopy
|
||||
from colour import Color
|
||||
import inspect
|
||||
|
||||
|
||||
from constants import *
|
||||
from helpers import *
|
||||
import displayer as disp
|
||||
@ -312,10 +314,6 @@ class Mobject(object):
|
||||
return color
|
||||
|
||||
### Stuff subclasses should deal with ###
|
||||
def should_buffer_points(self):
|
||||
# potentially changed in subclasses
|
||||
return GENERALLY_BUFFER_POINTS
|
||||
|
||||
def generate_points(self):
|
||||
#Typically implemented in subclass, unless purposefully left blank
|
||||
pass
|
||||
@ -371,6 +369,11 @@ class CompoundMobject(Mobject):
|
||||
for mobject in mobjects:
|
||||
self.original_mobs_num_points.append(mobject.points.shape[0])
|
||||
self.add_points(mobject.points, mobject.rgbs)
|
||||
self.should_buffer_points = reduce(
|
||||
op.and_,
|
||||
[m.should_buffer_points for m in mobjects],
|
||||
GENERALLY_BUFFER_POINTS
|
||||
)
|
||||
|
||||
def split(self):
|
||||
result = []
|
||||
|
Reference in New Issue
Block a user