Skip to content
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

Add the ability to change light settings. #217

Merged
merged 1 commit into from
Jan 11, 2019

Conversation

alexander-irbis
Copy link
Contributor

No description provided.

src/light.rs Outdated
@@ -44,6 +50,24 @@ impl Ambient {
pub(crate) fn new(object: Base) -> Self {
Ambient { object }
}

/// Change light color.
pub fn set_color(
Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds like we could have a Light trait with those methods? Maybe even have the implementation shared somehow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have some concerns.
We can use the trait and implement methods in it, then every time we want to use these methods, we should import the trait, it's annoying.
On the other hand, the implemntation with a macro is unfriendly for IDEs.
Do you prefer the case with a trait?

@kvark
Copy link
Collaborator

kvark commented Jan 2, 2019 via email

bors bot added a commit that referenced this pull request Jan 2, 2019
217: Add the ability to change light settings. r=kvark a=alexander-irbis



Co-authored-by: Alexander Irbis <[email protected]>
@kvark
Copy link
Collaborator

kvark commented Jan 11, 2019

bors r+

bors bot added a commit that referenced this pull request Jan 11, 2019
217: Add the ability to change light settings. r=kvark a=alexander-irbis



Co-authored-by: Alexander Irbis <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 11, 2019

Build succeeded

@bors bors bot merged commit cf800c2 into three-rs:master Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants