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 editable uv scale for terrains #17

Merged
merged 2 commits into from
Apr 19, 2022
Merged

Add editable uv scale for terrains #17

merged 2 commits into from
Apr 19, 2022

Conversation

JamesTKhan
Copy link
Owner

Add UV scale slider in the terrain settings tab that persists and is stored in MetaTerrain

2022-04-19.16-22-35_Trim.mp4

@JamesTKhan JamesTKhan changed the title Add editable uv scale Add editable uv scale for terrains Apr 19, 2022
@@ -57,6 +57,7 @@ private void parseTerrain(Meta meta, JsonValue jsonTerrain) {

final MetaTerrain terrain = new MetaTerrain();
terrain.setSize(jsonTerrain.getInt(MetaTerrain.JSON_SIZE));
terrain.setUv(jsonTerrain.getFloat(MetaTerrain.JSON_UV_SCALE, 60));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the value 60 would be better in a constant file as a constant and you can use it in every place. What do you think?

Copy link
Owner Author

Choose a reason for hiding this comment

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

hmm yeah, could use it there and in the uv vector initialization, trying to think if mundus already has a constants file

Copy link
Owner Author

Choose a reason for hiding this comment

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

Could put is as a public static in Terrain class actually. It already has some other default values there

Copy link
Owner Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice :) Thanks

@JamesTKhan JamesTKhan merged commit 6d78fbf into master Apr 19, 2022
@JamesTKhan JamesTKhan deleted the terrain_uv_scale branch May 10, 2022 03:29
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