diff --git a/src/App.vue b/src/App.vue index 500a63a..3a5be49 100644 --- a/src/App.vue +++ b/src/App.vue @@ -100,7 +100,6 @@ let iniCamPosition: Vector3 | null = null let iniCamZPosition: number = 0 const iniCamRotation: Euler = new Euler(0, 0, 0) const animTimeoutSec = 1 -const debugIsEnabled = false // ===================== // props @@ -246,7 +245,9 @@ async function renderModel(extension: string) { } }) - debug(model) + if (import.meta.env.MODE === 'development') { + debug(model) + } const box = new Box3() if (!model.hasOwnProperty('scene') && extension === 'stl') { @@ -437,13 +438,11 @@ function resetModelPosition() { } } -function debug(output) { - if (debugIsEnabled) { - scene.add(new AxesHelper(10)) - console.log('####### DEBUG 3D MODEL #######') - console.log(output) - console.log('#####################') - } +function debug(model: object) { + scene.add(new AxesHelper(10)) + console.log('####### DEBUG 3D MODEL #######') + console.log(model) + console.log('#####################') } diff --git a/vite-env.d.ts b/vite-env.d.ts new file mode 100644 index 0000000..a08026d --- /dev/null +++ b/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +///