@@ -7,7 +7,6 @@ import * as THREE from 'three'
7
7
import { OrbitControls } from 'three/addons/controls/OrbitControls.js'
8
8
import Stats from 'three/addons/libs/stats.module.js'
9
9
10
-
11
10
import { Explosion } from './scenes/explosion'
12
11
import { CityAtStreetLevel } from './scenes/cityAtStreetLevel'
13
12
import { CityFromWindow } from './scenes/cityFromWindow'
@@ -35,18 +34,18 @@ function init () {
35
34
{
36
35
37
36
scene : new CityFromWindow ( ) ,
38
- time : 10000 ,
37
+ time : 10000
39
38
} ,
40
39
{
41
40
scene : new Explosion ( ) ,
42
- time : 10000 ,
41
+ time : 10000
43
42
} ,
44
43
{
45
44
scene : new Credits ( ) ,
46
45
time : 10000
47
46
}
48
47
49
- ]
48
+ ]
50
49
51
50
// Stats
52
51
stats = new Stats ( )
@@ -82,15 +81,15 @@ function init () {
82
81
welcomeGUI . hide ( )
83
82
84
83
const settings = {
85
- fullScreen : true ,
86
- music : true ,
87
- stats : true ,
88
- antialias : false ,
89
- checkShaderErrors : false ,
90
- pixelRatio : Number ( ( window . devicePixelRatio * 0.70 ) . toFixed ( 1 ) ) ,
84
+ fullScreen : import . meta . env . MODE === 'production' ,
85
+ music : import . meta . env . MODE === 'production' ,
86
+ stats : import . meta . env . MODE === 'development' ,
87
+ antialias : import . meta . env . MODE === 'production' ,
88
+ checkShaderErrors : import . meta . env . MODE === 'development' ,
89
+ pixelRatio : import . meta . env . MODE === 'production' ? window . devicePixelRatio : Number ( ( window . devicePixelRatio * 0.70 ) . toFixed ( 1 ) ) ,
91
90
start : ( ) => {
92
91
welcomeGUI . hide ( )
93
- document . body . style . cursor = 'none'
92
+ if ( import . meta . env . MODE === 'production' ) document . body . style . cursor = 'none'
94
93
95
94
// Renderer
96
95
renderer = new THREE . WebGLRenderer ( { antialias : settings . antialias } )
0 commit comments