kopia lustrzana https://github.com/robhawkes/vizicities
Fix down-facing, ground-level building faces check for imprecise floating point values (#102)
rodzic
4b545158fc
commit
4b45e451c0
|
@ -371,9 +371,11 @@
|
|||
if (!minHeight && !options.preserveGroundFaces) {
|
||||
// Remove down-facing floor faces
|
||||
for (var i = geom.faces.length - 1; i >= 0; i--) {
|
||||
if (geom.faces[i].normal.z === 1) {
|
||||
if (Math.abs(geom.faces[i].normal.z - 1) < Number.EPSILON) {
|
||||
geom.faces.splice(i, 1);
|
||||
geom.faceVertexUvs[0].splice(i, 1);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue