size: more intense process.env.DEV

This commit is contained in:
FMS-Cat
2021-03-27 02:37:20 +09:00
parent 6f35cf9954
commit 9af5b93be0
2 changed files with 3 additions and 3 deletions

View File

@@ -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!;

View File

@@ -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 ++ ) {