From 3ca2822690d0059138093eca365176953969f6c8 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Thu, 1 Nov 2018 00:33:13 -0400 Subject: [PATCH] Naming changes to be more like master --- lib/loadObj.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/loadObj.js b/lib/loadObj.js index 863066e..b02bea2 100644 --- a/lib/loadObj.js +++ b/lib/loadObj.js @@ -439,9 +439,9 @@ function getMtlPaths(mtllibLine) { function finishLoading(nodes, mtlPaths, objPath, usesMaterials, options) { nodes = cleanNodes(nodes); if (nodes.length === 0) { - return Promise.reject(new RuntimeError(objPath + ' does not have any geometry data')); + throw new RuntimeError(objPath + ' does not have any geometry data'); } - return loadMaterials(mtlPaths, objPath, options) + return loadMtls(mtlPaths, objPath, options) .then(function(materials) { if (Object.keys(materials).length > 0 && !usesMaterials) { assignDefaultMaterial(nodes, materials); @@ -467,7 +467,7 @@ function outsideDirectory(file, directory) { return (path.relative(directory, file).indexOf('..') === 0); } -function loadMaterials(mtlPaths, objPath, options) { +function loadMtls(mtlPaths, objPath, options) { var objDirectory = path.dirname(objPath); var materials = {};