From 3f28d0469462b5b8f89c0351ff2f71ab7e0ec4ca Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Tue, 22 Sep 2015 00:35:46 -0400 Subject: [PATCH] small changes --- js/cells/DMACell.js | 2 +- js/materials/DMAMaterials.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/cells/DMACell.js b/js/cells/DMACell.js index df655407..ae633d42 100644 --- a/js/cells/DMACell.js +++ b/js/cells/DMACell.js @@ -234,7 +234,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', ' } var material = materials.getMaterialForId(this.materialName, returnTHREEObject, this.isTransparent); if (!material) { - console.warn("no material object found of type " + id); + console.warn("no material object found of type " + this.materialName); return null; } return material; diff --git a/js/materials/DMAMaterials.js b/js/materials/DMAMaterials.js index bf181022..15ecbf33 100644 --- a/js/materials/DMAMaterials.js +++ b/js/materials/DMAMaterials.js @@ -77,6 +77,10 @@ define(['underscore', 'three', 'appState', 'lattice', 'plist', 'threeModel'], fu function getMaterialForId(id, returnTHREEObject, transparent){ var material = materialsList[id]; if (!returnTHREEObject) return material; + if (!material){ + console.warn("no material object found for type "+ id); + return null; + } if (!material.threeMaterial){ console.warn("no three material object found for type "+ id); return null; -- GitLab