I have a basic scene, at least what I consider to be basic. And I was wondering if it was possible to change the color of the STL file after it was loaded using babylon.js.
var createScene = function () {
// This creates a basic Babylon Scene object (non-mesh)
var scene = new BABYLON.Scene(engine);
// This creates and positions a free camera (non-mesh)
var camera = new BABYLON.ArcRotateCamera("camera", BABYLON.Tools.ToRadians(90), BABYLON.Tools.ToRadians(90), 100, new BABYLON.Vector3(0, 1, 0), scene)
// This attaches the camera to the canvas
camera.attachControl(canvas, true);
// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
// Default intensity is 1. Let's dim the light a small amount
light.intensity = 0.7;
var stl = BABYLON.SceneLoader.Append("{% static '/stl/' %}", "DEMO STONE STL.stl", scene)
return scene;
};
If this has been asked somewhere before please point me in the right direction cause I am generally lost.