mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add BlockWrapsRenderer (WIP)
This commit is contained in:
parent
14b596140d
commit
9e02f1122f
7 changed files with 160 additions and 2 deletions
|
|
@ -40,4 +40,15 @@ struct UVRegion {
|
|||
float h = getHeight();
|
||||
return glm::vec2(u1 + uv.x * w, v1 + uv.y * h);
|
||||
}
|
||||
|
||||
void scale(float x, float y) {
|
||||
float w = getWidth();
|
||||
float h = getHeight();
|
||||
float cx = (u1 + u2) * 0.5f;
|
||||
float cy = (v1 + v2) * 0.5f;
|
||||
u1 = cx - w * 0.5f * x;
|
||||
v1 = cy - h * 0.5f * y;
|
||||
u2 = cx + w * 0.5f * x;
|
||||
v2 = cy + h * 0.5f * y;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue