rem Lights - OpenDBC tutorial (DarkBASIC Classic) rem Media: bricks.jpg from examples/dbc/tutorials/3d sync on : sync rate 60 autocam off color backdrop rgb(5, 5, 10) load image "bricks.jpg", 1 make object box 1, 80, 1, 60 position object 1, 0, -6, 0 texture object 1, 1 scale object texture 1, 4, 3 for n = 2 to 6 make object sphere n, 8 position object n, -24 + (n - 2) * 12, 0, 0 next n rem Dim the ambient light so the coloured lights stand out set ambient light 25 rem Light 0 always exists: turn it into a faint blue moonlight set directional light 0, 0.2, -1, 0.5 color light 0, rgb(30, 40, 90) rem Light 1: a warm point light, like a bulb make light 1 set point light 1, 0, 6, -8 color light 1, rgb(255, 170, 80) set light range 1, 40 rem Light 2: a green spot light shining down from above make light 2 set spot light 2, 15, 35 position light 2, 0, 30, 0 point light 2, 0, 0, 0 color light 2, rgb(80, 255, 140) set light range 2, 60 position camera 0, 14, -38 point camera 0, 0, 0 do t = wrapvalue(t + 1) rem The bulb circles the spheres position light 1, sin(t) * 30, 6, cos(t) * 15 sync loop