-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Rewriting the rendering System of Manim to a modern standard 💥 💯 #3112
Draft
MrDiver
wants to merge
123
commits into
main
Choose a base branch
from
experimental
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…` again (#3107) * ported functionality of Mobject from 3b1b to OpenGLMobject * ported functionality of VMobject from 3b1b to OpenVGLMobject * first working render * first step to dump old scene structure * copied scene without adapting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
I'll make this a draft for now (and I don't expect the tests to pass any time soon) -- but we'll try some more drastic refactoring strategies here. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Co-authored-by: Tristan Schulz <[email protected]>
* Fix tests and verify Animation run time inside new run_time property setter * test_boolean_ops * Add run_time validation from main branch * Fix 2 tests in tests/module/mobject/mobject/test_mobject.py * Fix 2 tests in tests/module/mobject/text/test_text_mobject.py * Manager in test_file_writer.py
MrDiver
force-pushed
the
experimental
branch
from
November 26, 2024 05:13
f7c9507
to
0426552
Compare
…tion assertions for automated checking
for more information, see https://pre-commit.ci
…crashes in subclasses (#4056) * Change order of statements in `OpenGLVMobject.__init__()`
…()` (#4058) The original implementation of `STD140BufferFormat._write_padded()` used `np.pad` which is slow. This new implementation avoids that by creating a new array of zeroes instead. In this way, this method now takes 60x less time, and the total rendering time is almost halved.
Covers the Manager, ThreeDScene, Camera, and Animations Co-authored-by: Francisco Manríquez Novoa <[email protected]> --------- Co-authored-by: Francisco Manríquez Novoa <[email protected]>
…4059) Co-authored-by: Aarush Deshpande <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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
experimental
highlight
For contributions that should be highlighted explicitly in the next changelog
refactor
Refactor or redesign of existing code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview: What does this pull request change?
Caution
The info on this PR description is OUTDATED. See #3817 for progress tracking and goals of this PR.
Old PR Description
This pull requests ports all the new changes from
3b1b/manim
and adds type hints toOpenGLMobject
andOpenGLVmobject
Current annotations and state is pushed in https://github.com/MrDiver/manimlib
Every method commented with #DONE is already in this PR
Ported Features
TODO:
changelog
OpenGLMobject
Additions:
init_constructor
,__add__
,__mul__
,are_points_touching
,is_touching
,apply_over_attr_arrays
,get_ancestors
,insert_submobject
,set_submobject
,set_rgba_array
,set_color_by_rgba_func
,set_color_by_rgb_func
,set_rgba_array_by_color
,arrange_to_fit_dim
,replicate
Renamed:
set_rgba_array
->set_rgba_array_by_color
(added newset_rgba_array
)set_rgba_array_direct
->set_rgba_array
Removed/Depcrecated:
set_rgba_array_direct
Changes:
self.uniform.fixed_orientation_center
is now anp.ndarray
__init__
:self.x = x
assignments and the rest of the constructor which is useful to see is now ininit_constructor
set_points
:asarray
instead ofarray
to not unnecessarily copy arrays when not needed.add_updater
:self.update(dt=0)
set_color
:set_rgba_array_by_color
instead of setting color directlyset_opacity
:set_rgba_array_by_color
interpolate
:fix_orientation
:np.ndarray
to setfixed_orientation_center
instead of tupleTemporary changes:
check_data_alignment
:self.data
instead returns the new result directly to be used inget_resized_shader_data_array
OpenGLVmobject
Additions:
@property:stroke_opacity
,_stroke_opacity
,@property:stroke_width
,_stroke_width
Removed/Deprecated
Changes:
Temporary changes:
Shader
Additions:
Removed/Deprecated
Changes:
set_uniform
:np.ndarray
totuple
for easier outside usage to only need to convert on the last step when creating uniformsTemporary changes: