mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-23 16:31:20 +08:00
Renamed normalized_uv to uv_coord for clarity
This commit is contained in:
parent
5db57ad43d
commit
acd924c2cc
@ -293,10 +293,11 @@ class MeshFace extends Face {
|
||||
let vert_b = vertices[1];
|
||||
let vert_c = vertices[2];
|
||||
|
||||
let normalized_uv = [uv[0] * truncate_factor[0], uv[1] * truncate_factor[1]];
|
||||
// Use non-truncated uv coordinates to select the correct triangle of a face.
|
||||
let uv_coord = [uv[0] * truncate_factor[0], uv[1] * truncate_factor[1]];
|
||||
|
||||
if (vertices[3]) {
|
||||
let is_in_tri = pointInTriangle(normalized_uv, this.uv[vert_a], this.uv[vert_b], this.uv[vert_c]);
|
||||
let is_in_tri = pointInTriangle(uv_coord, this.uv[vert_a], this.uv[vert_b], this.uv[vert_c]);
|
||||
|
||||
if (!is_in_tri) {
|
||||
vert_a = vertices[0];
|
||||
|
Loading…
Reference in New Issue
Block a user