From 9af5b93be0faf8ef74bcab18495e16b642d58239 Mon Sep 17 00:00:00 2001 From: FMS-Cat Date: Sat, 27 Mar 2021 02:37:20 +0900 Subject: [PATCH] size: more intense process.env.DEV --- src/heck/components/Camera.ts | 4 ++-- src/heck/components/CubemapCamera.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/heck/components/Camera.ts b/src/heck/components/Camera.ts index 11c405d..5285d50 100644 --- a/src/heck/components/Camera.ts +++ b/src/heck/components/Camera.ts @@ -45,11 +45,11 @@ export abstract class Camera extends Component { const { renderTarget, scene } = this; if ( !renderTarget ) { - throw new Error( process.env.DEV && 'You must assign a renderTarget to the Camera' ); + throw process.env.DEV && new Error( 'You must assign a renderTarget to the Camera' ); } if ( !scene ) { - throw new Error( process.env.DEV && 'You must assign a scene to the Camera' ); + throw process.env.DEV && new Error( 'You must assign a scene to the Camera' ); } const viewMatrix = event.globalTransform.matrix.inverse!; diff --git a/src/heck/components/CubemapCamera.ts b/src/heck/components/CubemapCamera.ts index 8f78d61..a5ea310 100644 --- a/src/heck/components/CubemapCamera.ts +++ b/src/heck/components/CubemapCamera.ts @@ -56,7 +56,7 @@ export class CubemapCamera extends Camera { const { renderTarget } = this; if ( !renderTarget ) { - throw new Error( process.env.DEV && 'You must assign a renderTarget to the Camera' ); + throw process.env.DEV && new Error( 'You must assign a renderTarget to the Camera' ); } for ( let i = 0; i < 6; i ++ ) {