Skip to content

Porting and drastical rewrite to reach compatibility with 3b1b/manim again #3107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 3, 2023

Conversation

MrDiver
Copy link
Collaborator

@MrDiver MrDiver commented Jan 1, 2023

Porting all the new features from 3b1b/manim drastical rewrite of the render system.

Currently no explanation because it is highly experimental. Further discussion about this can be found on the discord server.

@MrDiver MrDiver marked this pull request as draft January 1, 2023 16:18
self.shadow = shadow
# For shaders
self.render_primitive = render_primitive
self.gloss = gloss

Check warning

Code scanning / CodeQL

Overwriting attribute in super-class or sub-class

Assignment overwrites attribute gloss, which was previously defined in subclass [OpenGLTexturedSurface](1).
and self.mobject == o.mobject
and self.event_type == o.event_type
)
except Exception:

Check notice

Code scanning / CodeQL

Empty except

'except' clause does nothing but pass and there is no explanatory comment.
def duplicate(self, n: int):
"""Returns an :class:`~.OpenGLVGroup` containing ``n`` copies of the mobject."""
return self.get_group_class()(*[self.copy() for _ in range(n)])
def arrange_to_fit_dim(self, length: float, dim: int, about_edge=ORIGIN):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
Comment on lines +14 to +18
from manim.mobject.opengl.opengl_mobject import (
UNIFORM_DTYPE,
OpenGLMobject,
OpenGLPoint,
)

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [manim.mobject.opengl.opengl_mobject](1) begins an import cycle.
@@ -27,8 +27,11 @@
from shutil import copyfile
from typing import TYPE_CHECKING

import validators

Check notice

Code scanning / CodeQL

Unused import

Import of 'validators' is not used.
@@ -15,6 +15,8 @@
import configparser
import copy
import errno
import importlib

Check notice

Code scanning / CodeQL

Unused import

Import of 'importlib' is not used.
@@ -15,6 +15,8 @@
import configparser
import copy
import errno
import importlib
import inspect

Check notice

Code scanning / CodeQL

Unused import

Import of 'inspect' is not used.
Comment on lines +1248 to +1251
# if self.consider_points_equals(path[-nppc:], path[-nppc - 1]):
# path = path[:-nppc]
# else:
# break

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
@@ -194,6 +194,9 @@
DEGREES: float = TAU / 360
"""The exchange rate between radians and degrees."""

RADIANS: float = 1.0

Check notice

Code scanning / CodeQL

Unused global variable

The global variable 'RADIANS' is not used.
@MrDiver MrDiver linked an issue Jan 2, 2023 that may be closed by this pull request
@MrDiver MrDiver added breaking changes This PR introduces breaking changes maintenance refactoring, typos, removing clutter/dead code, and other code quality improvements labels Jan 2, 2023
self.embed_exception_mode = embed_exception_mode
self.embed_error_sound = embed_error_sound

self.camera_config = {**self.default_camera_config, **camera_config}

Check warning

Code scanning / CodeQL

Overwriting attribute in super-class or sub-class

Assignment overwrites attribute camera_config, which was previously defined in subclass [SpecialThreeDScene](1).
self.setup()
try:
self.construct()
except EndSceneEarlyException:
self.interact()
except EndScene:

Check notice

Code scanning / CodeQL

Empty except

'except' clause does nothing but pass and there is no explanatory comment.

from manim._config import logger as log
from manim.animation.animation import prepare_animation
from manim.animation.fading import VFadeInThenOut

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [manim.animation.fading](1) begins an import cycle.
@MrDiver MrDiver changed the base branch from main to experimental January 3, 2023 11:40
@MrDiver MrDiver marked this pull request as ready for review January 3, 2023 11:40
@MrDiver
Copy link
Collaborator Author

MrDiver commented Jan 3, 2023

This will be merged into ManimCommunity/experimental` for further development

@MrDiver MrDiver merged commit 8b345d9 into ManimCommunity:experimental Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes This PR introduces breaking changes maintenance refactoring, typos, removing clutter/dead code, and other code quality improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rounding Corners doesn't work for OpenGL as well as Depth Testing
1 participant