-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from JamesTKhan/scaled_uv_fix
Fix scaled UV on import, add widgets
- Loading branch information
Showing
6 changed files
with
208 additions
and
16 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
commons/src/main/com/mbrlabs/mundus/commons/assets/TexCoordInfo.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.mbrlabs.mundus.commons.assets; | ||
|
||
/** | ||
* Storage for UV related Texture info. | ||
* | ||
* @author JamesTKhan | ||
* @version July 20, 2022 | ||
*/ | ||
public class TexCoordInfo { | ||
public final String PROP_UV; | ||
public final String PROP_OFFSET_U; | ||
public final String PROP_OFFSET_V; | ||
public final String PROP_SCALE_U; | ||
public final String PROP_SCALE_V; | ||
public final String PROP_ROTATION_UV; | ||
|
||
public String property; | ||
public int uvIndex = 0; | ||
public float offsetU = 0; | ||
public float offsetV = 0; | ||
public float scaleU = 1; | ||
public float scaleV = 1; | ||
public float rotationUV = 0; | ||
|
||
public TexCoordInfo(String property) { | ||
this.property = property; | ||
|
||
// Generate props based on given property string (diffuse.uvIndex, etc..) | ||
PROP_UV = property + ".uvIndex"; | ||
PROP_OFFSET_U = property + ".offsetU"; | ||
PROP_OFFSET_V = property + ".offsetV"; | ||
PROP_SCALE_U = property + ".scaleU"; | ||
PROP_SCALE_V = property + ".scaleV"; | ||
PROP_ROTATION_UV = property + ".rotationUV"; | ||
} | ||
} |
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
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
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
Oops, something went wrong.