File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,14 @@ async function Setup (game) {
3030 game . camera . rotation . order = 'YXZ'
3131 game . camera . position . set ( 26 , 26 , 26 )
3232 game . scene . add ( new AmbientLight ( 0xdddddd ) )
33- game . stats = new Stats ( )
34- game . drawcalls = game . stats . addPanel (
35- new Stats . Panel ( 'calls' , '#ff8' , '#221' )
36- )
37- game . stats . showPanel ( 0 )
38- document . body . appendChild ( game . stats . dom )
33+ if ( ! game . production ) {
34+ game . stats = new Stats ( )
35+ game . drawcalls = game . stats . addPanel (
36+ new Stats . Panel ( 'calls' , '#ff8' , '#221' )
37+ )
38+ game . stats . showPanel ( 0 )
39+ document . body . appendChild ( game . stats . dom )
40+ }
3941 game . distanceBasedFog = new DistanceBasedFog ( game )
4042 UrlParams ( game ) . then ( ( password ) => {
4143 game . password = password
Original file line number Diff line number Diff line change @@ -129,10 +129,12 @@ class Game {
129129 }
130130
131131 animate ( ) {
132- if ( this . stats !== null ) {
132+ if ( this . stats ) {
133133 this . stats . begin ( )
134134 this . render ( )
135135 this . stats . end ( )
136+ } else {
137+ this . render ( )
136138 }
137139 window . requestAnimationFrame ( ( ) => {
138140 this . animate ( )
@@ -159,7 +161,9 @@ class Game {
159161 } )
160162 this . world . updateChunksAroundPlayer ( this . params . chunkdist )
161163 TWEEN . update ( )
162- this . drawcalls . update ( this . renderer . info . render . calls , 100 )
164+ if ( ! this . production ) {
165+ this . drawcalls . update ( this . renderer . info . render . calls , 100 )
166+ }
163167 if ( this . eh . gameState === 'inventory' ) {
164168 this . pii . render ( )
165169 }
You can’t perform that action at this time.
0 commit comments