@@ -29,7 +29,7 @@ export default function Stage({ children, deck }) {
29
29
if ( ! vw ) return null ;
30
30
const h = Math . max ( ( vw / vh < 1.16 ? vw / 1.16 : vh ) * 0.75 , 330 ) ;
31
31
const scale = h * 0.2 ;
32
- const yMiddle = 0.33 ;
32
+ const yMiddle = 0.28 ;
33
33
const yOrigin = ( 0.6 * h ) / vh ;
34
34
return (
35
35
< div
@@ -107,12 +107,16 @@ export default function Stage({ children, deck }) {
107
107
108
108
function StageObjects ( { sceneWidth, sceneHeight, yMiddle, deck } ) {
109
109
const startZ = - 4 ;
110
+ const [ lightsOn , setLightsOn ] = React . useState ( false ) ;
110
111
return (
111
112
< React . Fragment >
113
+ { lightsOn && < Lights /> }
112
114
< Move dz = { startZ - 4 } >
113
- < Screen deck = { deck } />
115
+ < NoLights >
116
+ < Screen deck = { deck } />
117
+ </ NoLights >
114
118
</ Move >
115
- < Move dz = { startZ - 3 } dy = { - 3 } >
119
+ < Move dz = { startZ - 3 } dy = { - 2.7 } >
116
120
< Top />
117
121
</ Move >
118
122
{ sceneWidth > 7 && (
@@ -130,16 +134,18 @@ function StageObjects({ sceneWidth, sceneHeight, yMiddle, deck }) {
130
134
</ React . Fragment >
131
135
) }
132
136
< Move dy = { 3.2 } dx = { 2 } dz = { startZ - 1 } >
133
- < Pulpit />
137
+ < Pulpit onClick = { ( ) => setLightsOn ( on => ! on ) } />
134
138
</ Move >
135
139
< Move dy = { 3.1 } dz = { startZ } >
136
140
< Platform />
137
141
</ Move >
138
- < Divider
139
- sceneWidth = { sceneWidth }
140
- sceneHeight = { sceneHeight }
141
- yMiddle = { yMiddle }
142
- />
142
+ < NoLights >
143
+ < Divider
144
+ sceneWidth = { sceneWidth }
145
+ sceneHeight = { sceneHeight }
146
+ yMiddle = { yMiddle }
147
+ />
148
+ </ NoLights >
143
149
</ React . Fragment >
144
150
) ;
145
151
}
@@ -219,7 +225,7 @@ function Platform() {
219
225
) ;
220
226
}
221
227
222
- function Pulpit ( ) {
228
+ function Pulpit ( { onClick } ) {
223
229
const w = 0.5 ;
224
230
const h = 0.9 ;
225
231
const scale = useScale ( ) ;
@@ -233,9 +239,12 @@ function Pulpit() {
233
239
color : "#FFF8" ,
234
240
textAlign : "center" ,
235
241
fontFamily : "monospace" ,
236
- backgroundImage : `url("${ purtyWood } ")`
242
+ backgroundImage : `url("${ purtyWood } ")` ,
243
+ userSelect : "none" ,
244
+ cursor : "pointer"
237
245
} }
238
246
pinY = { "bottom" }
247
+ onClick = { onClick }
239
248
>
240
249
< div style = { { fontSize : scale * 0.2 , paddingTop : "40%" } } > RAD</ div >
241
250
< div style = { { fontSize : scale * 0.15 } } > CONF</ div >
@@ -288,3 +297,21 @@ function Divider({ sceneWidth, sceneHeight, yMiddle }) {
288
297
/>
289
298
) ;
290
299
}
300
+
301
+ function Lights ( ) {
302
+ const orange = "#f9bc00" ;
303
+ const blue = "#539ed8" ;
304
+ const pink = "#c30083" ;
305
+ return (
306
+ < React . Fragment >
307
+ < PointLight color = "#333" z = { 10 } />
308
+ < SpotLight y = { - 5 } color = { blue } z = { - 2 } toZ = { - 4 } toX = { - 0.5 } x = { - 2 } />
309
+ < SpotLight y = { - 5 } color = { blue } z = { - 2 } toZ = { - 4 } toX = { 2 } x = { - 2 } />
310
+ < SpotLight y = { - 5 } color = { orange } z = { - 2 } toZ = { - 4 } toX = { 1 } x = { 0 } />
311
+ < SpotLight y = { - 5 } color = { orange } z = { - 2 } toZ = { - 4 } toX = { - 1 } x = { - 1.5 } />
312
+ < SpotLight y = { - 5 } color = { pink } z = { - 2 } toZ = { - 4 } toX = { 2.5 } x = { 2 } />
313
+ < SpotLight color = { pink } x = { - 5 } y = { 4 } z = { - 5 } toX = { - 5 } toY = { 2 } toZ = { - 6 } />
314
+ < SpotLight color = { pink } x = { 5 } y = { 4 } z = { - 5 } toX = { 5 } toY = { 2 } toZ = { - 6 } />
315
+ </ React . Fragment >
316
+ ) ;
317
+ }
0 commit comments