@@ -46,6 +46,20 @@ export default class GuiMainMenu extends GuiScreen {
46
46
let x = this . width / 2 - logoWidth / 2 ;
47
47
let y = 30 ;
48
48
49
+ let rotationX = Math . sin ( ( this . panoramaTimer + partialTicks ) / 400.0 ) * 25.0 + 20.0 ;
50
+ let rotationY = - ( this . panoramaTimer + partialTicks ) * 0.1 ;
51
+
52
+ // Draw panorama
53
+ this . camera . aspect = this . width / this . height ;
54
+ this . camera . rotation . x = - MathHelper . toRadians ( rotationX + 180 ) ;
55
+ this . camera . rotation . y = - MathHelper . toRadians ( rotationY - 180 ) ;
56
+ this . camera . updateProjectionMatrix ( ) ;
57
+ this . minecraft . worldRenderer . webRenderer . render ( this . scene , this . camera ) ;
58
+
59
+ // Draw panorama overlay
60
+ this . drawGradientRect ( stack , 0 , 0 , this . width , this . height , 'rgba(255,255,255,0.5)' , 'rgb(255,255,255,0)' ) ;
61
+ this . drawGradientRect ( stack , 0 , 0 , this . width , this . height , 'rgb(0,0,0,0)' , 'rgb(0,0,0,0.5)' ) ;
62
+
49
63
// Draw logo
50
64
this . drawLogo ( stack , x , y ) ;
51
65
@@ -61,15 +75,6 @@ export default class GuiMainMenu extends GuiScreen {
61
75
62
76
// Draw splash text
63
77
this . drawSplash ( stack ) ;
64
-
65
- let rotationX = Math . sin ( ( this . panoramaTimer + partialTicks ) / 400.0 ) * 25.0 + 20.0 ;
66
- let rotationY = - ( this . panoramaTimer + partialTicks ) * 0.1 ;
67
-
68
- this . camera . aspect = this . width / this . height ;
69
- this . camera . rotation . x = - MathHelper . toRadians ( rotationX + 180 ) ;
70
- this . camera . rotation . y = - MathHelper . toRadians ( rotationY - 180 ) ;
71
- this . camera . updateProjectionMatrix ( ) ;
72
- this . minecraft . worldRenderer . webRenderer . render ( this . scene , this . camera ) ;
73
78
}
74
79
75
80
updateScreen ( ) {
0 commit comments