mirror of
https://github.com/MistWeatherMedia/WeatherSTAR-3000-Java.git
synced 2026-11-28 14:38:08 -08:00
Add files via upload
This commit is contained in:
1 parent
800569688a
commit
746f9debdd
42 files changed
+7691
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package components;
|
||||
|
||||
import org.joml.Vector2f;
|
||||
|
||||
import renderer.Texture;
|
||||
|
||||
public class Sprite {
|
||||
private Texture texture;
|
||||
private Vector2f[] texCoords;
|
||||
|
||||
public Sprite(Texture texture) {
|
||||
this.texture = texture;
|
||||
Vector2f[] texCoords = {
|
||||
new Vector2f(1,0),
|
||||
new Vector2f(1,1),
|
||||
new Vector2f(0,1),
|
||||
new Vector2f(0,0)
|
||||
};
|
||||
this.texCoords = texCoords;
|
||||
}
|
||||
|
||||
public Sprite(Texture texture, Vector2f[] texCoords) {
|
||||
this.texture = texture;
|
||||
this.texCoords = texCoords;
|
||||
}
|
||||
|
||||
public Texture getTexture() {
|
||||
return this.texture;
|
||||
}
|
||||
|
||||
public Vector2f[] getTexCoords() {
|
||||
return this.texCoords;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user