Skip to content

Conversation

@behackl
Copy link
Member

@behackl behackl commented Nov 16, 2020

List of Changes

  • Change background_color and background_opacity to become properties of Camera
  • Add, for convenience, a camera property to Scene

Motivation

This is a suggestion for simplifying the interface for setting the background color in a scene by calling self.camera.background_color = RED etc, which was briefly discussed in #604.

Resolves #604.

Acknowledgement

@behackl behackl added the enhancement Additions and improvements in general label Nov 16, 2020
@behackl
Copy link
Member Author

behackl commented Nov 16, 2020

I don't mind if we pursue a different approach for making it easier to change background color, but it took me a while to figure out how a corresponding (non-graphical) test could look like -- and mainly because I liked the outcome of this process, I opened this PR.

Copy link
Contributor

@leotrs leotrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit messy, but I think this is the best we can do for now.

Copy link
Member

@huguesdevimeux huguesdevimeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a suggestion, tell me if you disagree

Copy link
Member

@naveen521kk naveen521kk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@behackl behackl merged commit 3965484 into ManimCommunity:master Nov 16, 2020
@behackl behackl deleted the change-background-color branch November 16, 2020 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Additions and improvements in general

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it easier to change background colour.

4 participants