fix shadow coplanar with bottom z
This commit is contained in:
parent
8fb0574894
commit
cd7c0f7597
2 changed files with 3 additions and 1 deletions
|
|
@ -913,6 +913,8 @@ class Widget {
|
||||||
if (a.z < z && b.z < z && c.z < z) {
|
if (a.z < z && b.z < z && c.z < z) {
|
||||||
// skip faces under threshold
|
// skip faces under threshold
|
||||||
continue;
|
continue;
|
||||||
|
} else if (a.z === z && a.z === b.z && a.z === c.z) {
|
||||||
|
// skip faces coplanar with z (shadow looks up)
|
||||||
} else if (a.z >= z && b.z >= z && c.z >= z) {
|
} else if (a.z >= z && b.z >= z && c.z >= z) {
|
||||||
found.push([a, b, c]);
|
found.push([a, b, c]);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ const clib = self.ClipperLib;
|
||||||
const ctyp = clib.ClipType;
|
const ctyp = clib.ClipType;
|
||||||
const ptyp = clib.PolyType;
|
const ptyp = clib.PolyType;
|
||||||
const cfil = clib.PolyFillType;
|
const cfil = clib.PolyFillType;
|
||||||
const ts_off = 0.1;
|
const ts_off = 0.01;
|
||||||
|
|
||||||
class OpArea extends CamOp {
|
class OpArea extends CamOp {
|
||||||
constructor(state, op) {
|
constructor(state, op) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue