porters

STL


Table of contents

STL File Import

You can find the STL loader here

To use it you just have to reference it after Babylon.js:

<script src="Babylon.js"></script>
<script src="babylon.stlFileLoader.js"></script>

Then you can just call SceneLoader.Load:


BABYLON.SceneLoader.Load("/Files/", "ch9.stl", engine, function (newScene) {
   newScene.activeCamera.attachControl(canvas, false);
   engine.runRenderLoop(function () {
       newScene.render();
   });
});