I'm still trying to wrap my head around this..
Given the following code:
//turn signals
var turn =
this.add_spotlight_source({x:-0.98,y:-4.3,z:1.06}, {y:-1}, 0.02, 54, 0.8, {x:0.1,y:0.08}, 0);
this.add_spotlight_source({x:0.98,y:-4.3,z:1.06}, {y:-1}, 0.02, 54, 0.8, {x:0.1,y:0.08}, 0);
this.add_spotlight_source({x:-1.12,y:-4.28,z:1.03}, {y:-1}, 0.02, 54, 0.8, {x:0.1,y:0.06}, 0.02);
this.add_spotlight_source({x:1.12,y:-4.28,z:1.03}, {y:-1}, 0.02, 54, 0.8, {x:0.1,y:0.06}, 0.02);
this.add_spotlight_source({x:-0.69,y:4.55,z:1.39}, {y:1}, 0.2, 54, 0.8, {x:0.2,y:0.06}, 0.02);
this.add_spotlight_source({x:0.69,y:4.55,z:1.39}, {y:1}, 0.2, 54, 0.8, {x:0.2,y:0.06}, 0.02);
this.add_spotlight_source({x:-1.23,y:4.3,z:1.74}, {x:-1}, 0.1, 94, 0.8, {x:0.1,y:0.03}, 0.02);
this.add_spotlight_source({x:1.23,y:4.3,z:1.74}, {x:1}, 0.1, 94, 0.8, {x:0.1,y:0.03}, 0.02);
turnlmask = 0x55<<turn;
turnrmask = 0xaa<<turn;
If I convert 0x55 to binary I get '0000 0000 0101 0101'. Is this to say that the first light in the list is on, the second off, the third on, and so forth until the 7th row?
So for example, if I wanted to define new lights:
var example_lights =
this.add_spotlight_source(params);
this.add_spotlight_source(params);
this.add_spotlight_source(params);
example_mask = 7<<example_lights;
Would that turn them all on? What exactly is the '<<' doing? Also, how does the var example_lights contain all three rows of lights in this example? I always thought a semicolon ended a variable declaration?
Sorry if these are noobish questions - I'm a front end web guy and I've never encountered this syntax or usage before.