Преглед на файлове

Proposed fix to issue #6103, changed exporter conditional for reversing mesh winding to reverse whether in LHR coordinate system or if material has Clockwise Side orientation

Nick Barlow преди 6 години
родител
ревизия
de907fea54
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      serializers/src/glTF/2.0/glTFExporter.ts

+ 1 - 1
serializers/src/glTF/2.0/glTFExporter.ts

@@ -1195,7 +1195,7 @@ export class _Exporter {
                     if (materialIndex != null && Object.keys(meshPrimitive.attributes).length > 0) {
                         let sideOrientation = babylonMaterial.sideOrientation;
 
-                        if (this._convertToRightHandedSystem && sideOrientation === Material.ClockWiseSideOrientation) {
+                        if (this._convertToRightHandedSystem || sideOrientation === Material.ClockWiseSideOrientation) {
                             //Overwrite the indices to be counter-clockwise
                             let byteOffset = indexBufferViewIndex != null ? this._bufferViews[indexBufferViewIndex].byteOffset : null;
                             if (byteOffset == null) { byteOffset = 0; }