I saw the following code on Observable “Introduction to Three.js”:
sceneObject = {
const scene = new THREE.Scene(); // Create scene
scene.background = new THREE.Color(‘black’); // Sets scene background color
return scene;
}
I’ not sure why the same code is not working when testing it on CodeSandBox.
Is the way of creating an object from a code block particular to Observable’s JS notebook?