would appreciate a quick help, im working on this project and there is a part where i have to use the scene variable elsewhere so i exported it, but everytime i import it, the main.js where the scene was intantiated, runs again
so i always end up having 2 canvass since my scene initialization ran twice
./main.js
export const scene = new THREE.Scene(); -
./renderModel.js
import { scene } from '../main'
export function renderModels() {
scene.add(Primary.mesh)
} -
I tried using global variable, which works, but i would like to find out whats causing this error