mirror of
https://github.com/LucasDower/ObjToSchematic.git
synced 2025-03-07 14:06:41 +08:00
Place magenta voxel instead of throwing error
This commit is contained in:
parent
878ef25f03
commit
affdf247a9
@ -73,10 +73,10 @@ export class Texture {
|
||||
|
||||
const u = wayThrough(x, xL, xU);
|
||||
const v = wayThrough(y, yL, yU);
|
||||
if (isNaN(x) || isNaN(y)) {
|
||||
LOG('BAD');
|
||||
|
||||
if (!(u >= 0.0 && u <= 1.0 && v >= 0.0 && v <= 1.0)) {
|
||||
return RGB.magenta;
|
||||
}
|
||||
ASSERT(u >= 0.0 && u <= 1.0 && v >= 0.0 && v <= 1.0, `UV out of range (${u}, ${v})`);
|
||||
|
||||
const A = this._getFromXY(xL, yU).toVector3();
|
||||
const B = this._getFromXY(xU, yU).toVector3();
|
||||
|
Loading…
Reference in New Issue
Block a user