I import scene from file sceneSetup.js
into initFloor1.js
and get error ReferenceError: scene is not defined
Can't find solution of this issue and can't understand if it is the issue of javascript or Threejs
sceneSetup.js:
export let camera, controls, renderer, labelRenderer, renderer3D, arrow, label, scene;
initFloor1.js:
import * as THREE from 'three';
import { camera, controls, renderer, labelRenderer, renderer3D, arrow, label, scene } from './../sceneSetup.js'
export function initFloor1() {
scene = new THREE.Scene();
My project folder:
|- src
| |- 3d-scene
| |- sceneSetup.js
| |- Floor1
| |- initFloor1.js