diff --git a/README.md b/README.md index e272f0f..3c4f1c6 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Online demo: http://3dviewer.net With this online viewer you can view 3D models in your browser: - Supported file formats: - - 3ds, with textures - - obj, mtl, with textures - - stl + - 3ds (with textures) + - obj, mtl (with textures) + - stl (ascii and binary) - You can drag&drop files to your browser, or use the open button. - You should open the main file, and all of its requested files. - For example open the requested mtl file with an obj file. diff --git a/website/include/importerapp.js b/website/include/importerapp.js index 0467946..3803b55 100644 --- a/website/include/importerapp.js +++ b/website/include/importerapp.js @@ -9,22 +9,19 @@ ImporterApp = function () ImporterApp.prototype.Init = function () { if (!JSM.IsWebGLEnabled () || !JSM.IsFileApiEnabled ()) { - var i, child; - - var children = []; - for (i = 0; i < document.body.children.length; i++) { - child = document.body.children[i]; - children.push (child); + while (document.body.lastChild) { + document.body.removeChild (document.body.lastChild); } - for (i = 0; i < children.length; i++) { - child = children[i]; - if (child.id == 'nosupport') { - child.style.display = ''; - } else { - document.body.removeChild (child); - } - } + var div = document.createElement ('div'); + div.className = 'nosupport'; + div.innerHTML = [ + '