Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Nov 28, 2024
1 parent 6c84ef5 commit 67e74b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/extras/exporters/gltf-exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ class GltfExporter extends CoreExporter {

// Check texture coordinates
if (semantic.startsWith('TEXCOORD_')) {
const texCoordIndex = parseInt(semantic.split('_')[1]);
isUsed = resources.materials.some(material => {
return textureSemantics.some(texSemantic => {
const texCoordIndex = parseInt(semantic.split('_')[1], 10);
isUsed = resources.materials.some((material) => {
return textureSemantics.some((texSemantic) => {
const texture = material[texSemantic];
// Most materials use UV0 by default, so keep TEXCOORD_0 unless explicitly using a different UV set
return texture && (texCoordIndex === 0 || material[`${texSemantic}Tiling`]?.uv === texCoordIndex);
Expand All @@ -553,8 +553,7 @@ class GltfExporter extends CoreExporter {

// Check skinning attributes
if (semantic === 'JOINTS_0' || semantic === 'WEIGHTS_0') {
isUsed = resources.entityMeshInstances.some(emi =>
emi.meshInstances.some(mi => mi.mesh.skin));
isUsed = resources.entityMeshInstances.some(emi => emi.meshInstances.some(mi => mi.mesh.skin));
}

if (!isUsed) {
Expand Down

0 comments on commit 67e74b8

Please sign in to comment.