public updateState()

in sim/visuals/board.ts [396:421]


        public updateState() {
            let state = this.board;
            if (!state) return;
            let theme = this.props.theme;

            let bpState = state.buttonState;
            let buttons = bpState.buttons;
            svg.fill(this.buttons[0], buttons[0].pressed ? theme.buttonDown : theme.buttonUps[0]);
            svg.fill(this.buttons[1], buttons[1].pressed ? theme.buttonDown : theme.buttonUps[1]);

            this.updatePins();
            this.updateTilt();
            this.updateRedLED();
            this.updateNeoPixels();
            this.updateSwitch();
            this.updateSound();
            this.updateLightLevel();
            this.updateSoundLevel();
            this.updateButtonAB();
            this.updateGestures();
            this.updateTemperature();
            this.updateInfrared();

            if (!runtime || runtime.dead) pxsim.U.addClass(this.element, "grayscale");
            else pxsim.U.removeClass(this.element, "grayscale");
        }