Initial board SVG and basic simulator
This commit is contained in:
19
sim/state/light.ts
Normal file
19
sim/state/light.ts
Normal file
@ -0,0 +1,19 @@
|
||||
namespace pxsim {
|
||||
|
||||
export class EV3LightState {
|
||||
lightPattern: number;
|
||||
|
||||
constructor() {
|
||||
this.lightPattern = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace pxsim.output {
|
||||
|
||||
export function setLights(pattern: number){
|
||||
const lightState = (board() as DalBoard).lightState;
|
||||
lightState.lightPattern = pattern;
|
||||
runtime.queueDisplayUpdate();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user