Pass in the z value

This commit is contained in:
Richard Davey 2020-10-07 13:16:01 +01:00
parent 2137e3413d
commit 55d7b36217

View file

@ -53,6 +53,8 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix)
var e = calcMatrix.e; var e = calcMatrix.e;
var f = calcMatrix.f; var f = calcMatrix.f;
var z = src.camera.position.z;
var roundPixels = camera.roundPixels; var roundPixels = camera.roundPixels;
var alpha = camera.alpha * src.alpha; var alpha = camera.alpha * src.alpha;
var hideCCW = src.hideCCW; var hideCCW = src.hideCCW;
@ -61,7 +63,7 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix)
{ {
var face = faces[i]; var face = faces[i];
if (hideCCW && !face.isCounterClockwise()) if (hideCCW && !face.isCounterClockwise(z))
{ {
continue; continue;
} }