From 6d0b1c5d8fe71244f93c2f994e1097b454df2766 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 20 Mar 2012 16:33:11 -0700 Subject: Runtime canvas & WebGL fixes. --- assets/canvas-runtime.js | 64 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 13 deletions(-) (limited to 'assets') diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js index adff0e8c..5ea2a85f 100644 --- a/assets/canvas-runtime.js +++ b/assets/canvas-runtime.js @@ -505,6 +505,8 @@ function RuntimeGeomObj() this.importMaterials = function(jObj) { + if (!jObj || !jObj.materials) return; + var nMaterials = jObj.nMaterials; var matArray = jObj.materials; for (var i=0; i