Skip to content

Conversation

@stephengold
Copy link
Member

Previously EnvironmentCamera didn't copy the default viewport's background color, but kept an alias to the pre-existing object. To avoid unintentionally altering the default viewport, it is necessary to clone the object.

EnvironmentCamera overrides the backGroundColor field during initialization, so setting it any sooner would have no effect. I decided to throw an IllegalStateException in that situation, to avert puzzling logic errors in apps.

@stephengold stephengold added this to the v3.4.0 milestone Mar 15, 2021
@stephengold stephengold merged commit 4fdee8f into jMonkeyEngine:master Mar 15, 2021
@stephengold stephengold deleted the sgold-issue-1447 branch March 15, 2021 13:48
@stephengold stephengold linked an issue Mar 16, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

override the background color of an EnvironmentCamera

2 participants