Skip to content

Commit

Permalink
Merge pull request #644 from CesiumGS/maintenance
Browse files Browse the repository at this point in the history
Monthly Maintenance
  • Loading branch information
lilleyse authored Oct 3, 2023
2 parents 8121433 + 575c05f commit fe2b2c1
Show file tree
Hide file tree
Showing 45 changed files with 315 additions and 308 deletions.
4 changes: 2 additions & 2 deletions bin/gltf-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ if (!defined(outputPath)) {
}
outputPath = path.join(
inputDirectory,
`${inputName}-processed${outputExtension}`
`${inputName}-processed${outputExtension}`,
);
}

Expand Down Expand Up @@ -255,5 +255,5 @@ read(inputPath)
})
.catch(function (error) {
console.log(error);
process.exit(1);
process.exitCode = 1;
});
12 changes: 6 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function test() {
new JasmineSpecReporter({
displaySuccessfulSpec:
!defined(argv.suppressPassed) || !argv.suppressPassed,
})
}),
);

jasmine.exitOnCompletion = false;
Expand Down Expand Up @@ -83,7 +83,7 @@ function coverage() {
" JASMINE_CONFIG_PATH=specs/jasmine.json",
{
stdio: [process.stdin, process.stdout, process.stderr],
}
},
);

return Promise.resolve();
Expand Down Expand Up @@ -172,7 +172,7 @@ function amdify(source, subDependencyMapping) {
const mapping = subDependencyMapping[requirePath];
if (!defined(mapping)) {
throw new Error(
`Build Failed: Module sub-dependency found for ${requirePath} with no defined mapping behavior.`
`Build Failed: Module sub-dependency found for ${requirePath} with no defined mapping behavior.`,
);
}
removeRequireMapping.push(requireVariable);
Expand All @@ -196,7 +196,7 @@ function amdify(source, subDependencyMapping) {
if (
Object.prototype.hasOwnProperty.call(
subdependencyMapping,
subdependencyVariable
subdependencyVariable,
)
) {
requireMapping[subdependencyVariable] =
Expand Down Expand Up @@ -335,7 +335,7 @@ async function generateThirdParty() {
for (const packageName in dependencies) {
if (dependencies.hasOwnProperty(packageName)) {
const override = thirdPartyExtraJson.find(
(entry) => entry.name === packageName
(entry) => entry.name === packageName,
);
thirdPartyJson.push(getLicenseDataFromPackage(packageName, override));
}
Expand All @@ -355,6 +355,6 @@ async function generateThirdParty() {

fsExtra.writeFileSync(
"ThirdParty.json",
JSON.stringify(thirdPartyJson, null, 2)
JSON.stringify(thirdPartyJson, null, 2),
);
}
4 changes: 2 additions & 2 deletions lib/FileUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function getPathFromURLWin32(url) {
) {
// 5c 5C \
throw new RuntimeError(
"file URL must not include encoded \\ or / characters"
"file URL must not include encoded \\ or / characters",
);
}
}
Expand Down Expand Up @@ -124,7 +124,7 @@ function getPathFromURLPosix(url) {
const third = pathname.codePointAt(n + 2) | 0x20;
if (pathname[n + 1] === "2" && third === 102) {
throw new RuntimeError(
"file URL must not include encoded \\ or / characters"
"file URL must not include encoded \\ or / characters",
);
}
}
Expand Down
14 changes: 7 additions & 7 deletions lib/ForEach.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ForEach.accessorWithSemantic = function (gltf, semantic, handler) {
return value;
}
}
}
},
);

if (defined(valueForEach)) {
Expand All @@ -107,7 +107,7 @@ ForEach.accessorWithSemantic = function (gltf, semantic, handler) {
return value;
}
}
}
},
);
});
});
Expand All @@ -129,7 +129,7 @@ ForEach.accessorContainingVertexAttributeData = function (gltf, handler) {
return value;
}
}
}
},
);

if (defined(valueForEach)) {
Expand All @@ -148,7 +148,7 @@ ForEach.accessorContainingVertexAttributeData = function (gltf, handler) {
return value;
}
}
}
},
);
});
});
Expand Down Expand Up @@ -327,7 +327,7 @@ ForEach.program = function (gltf, handler) {
if (usesExtension(gltf, "KHR_techniques_webgl")) {
return ForEach.object(
gltf.extensions.KHR_techniques_webgl.programs,
handler
handler,
);
}

Expand All @@ -346,7 +346,7 @@ ForEach.shader = function (gltf, handler) {
if (usesExtension(gltf, "KHR_techniques_webgl")) {
return ForEach.object(
gltf.extensions.KHR_techniques_webgl.shaders,
handler
handler,
);
}

Expand Down Expand Up @@ -415,7 +415,7 @@ ForEach.technique = function (gltf, handler) {
if (usesExtension(gltf, "KHR_techniques_webgl")) {
return ForEach.object(
gltf.extensions.KHR_techniques_webgl.techniques,
handler
handler,
);
}

Expand Down
22 changes: 11 additions & 11 deletions lib/addDefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function addDefaults(gltf) {
ForEach.material(gltf, function (material) {
const extensions = defaultValue(
material.extensions,
defaultValue.EMPTY_OBJECT
defaultValue.EMPTY_OBJECT,
);
const materialsCommon = extensions.KHR_materials_common;
if (defined(materialsCommon)) {
Expand Down Expand Up @@ -103,19 +103,19 @@ function addDefaults(gltf) {
// These actually exist on the extension object, not the values object despite what's shown in the spec
materialsCommon.transparent = defaultValue(
materialsCommon.transparent,
false
false,
);
materialsCommon.doubleSided = defaultValue(
materialsCommon.doubleSided,
false
false,
);

return;
}

material.emissiveFactor = defaultValue(
material.emissiveFactor,
[0.0, 0.0, 0.0]
[0.0, 0.0, 0.0],
);
material.alphaMode = defaultValue(material.alphaMode, "OPAQUE");
material.doubleSided = defaultValue(material.doubleSided, false);
Expand All @@ -142,15 +142,15 @@ function addDefaults(gltf) {
if (defined(pbrMetallicRoughness)) {
pbrMetallicRoughness.baseColorFactor = defaultValue(
pbrMetallicRoughness.baseColorFactor,
[1.0, 1.0, 1.0, 1.0]
[1.0, 1.0, 1.0, 1.0],
);
pbrMetallicRoughness.metallicFactor = defaultValue(
pbrMetallicRoughness.metallicFactor,
1.0
1.0,
);
pbrMetallicRoughness.roughnessFactor = defaultValue(
pbrMetallicRoughness.roughnessFactor,
1.0
1.0,
);
addTextureDefaults(pbrMetallicRoughness.baseColorTexture);
addTextureDefaults(pbrMetallicRoughness.metallicRoughnessTexture);
Expand All @@ -161,15 +161,15 @@ function addDefaults(gltf) {
if (defined(pbrSpecularGlossiness)) {
pbrSpecularGlossiness.diffuseFactor = defaultValue(
pbrSpecularGlossiness.diffuseFactor,
[1.0, 1.0, 1.0, 1.0]
[1.0, 1.0, 1.0, 1.0],
);
pbrSpecularGlossiness.specularFactor = defaultValue(
pbrSpecularGlossiness.specularFactor,
[1.0, 1.0, 1.0]
[1.0, 1.0, 1.0],
);
pbrSpecularGlossiness.glossinessFactor = defaultValue(
pbrSpecularGlossiness.glossinessFactor,
1.0
1.0,
);
addTextureDefaults(pbrSpecularGlossiness.specularGlossinessTexture);
}
Expand Down Expand Up @@ -199,7 +199,7 @@ function addDefaults(gltf) {
[
1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0,
0.0, 1.0,
]
],
);
}
});
Expand Down
Loading

0 comments on commit fe2b2c1

Please sign in to comment.