JSFiddle - React, Tailwind, and code Playground

by Darby Rathbone

JavaScript

// this code was autogenerated from PJS
(function($p) {
    var DisposeHandler = (function() {
        function DisposeHandler() {
            var $this_1 = this;

            function $superCstr() {
                $p.extendClassChain($this_1)
            }

            function dispose$0() {
                minim.stop();

                if (!windowOverride) {
                    if ($p.width != getSettingInt("windowX")) updateSettingsFile(0, "windowX = " + $p.width);
                    if ($p.height != getSettingInt("windowY")) updateSettingsFile(1, "windowY = " + $p.height);
                }
            }
            $p.addMethod($this_1, 'dispose', dispose$0);

            function $constr_1(pa) {
                $superCstr();

                pa.registerDispose($this_1.$self);
            }

            function $constr() {
                if (arguments.length === 1) {
                    $constr_1.apply($this_1, arguments);
                } else $superCstr();
            }
            $constr.apply(null, arguments);
        }
        return DisposeHandler;
    })();
    $p.DisposeHandler = DisposeHandler;

    var audio = $p.createJavaArray('AudioPlayer', [3]);
    var minim = null;

    var minimumSize = new Dimension(320, 240);

    var dh = null;

    var SETTINGSINFILE = 8,
        INPUTCHARACTERSLIMIT = 3,
        HIGHSCORENAMELIMIT = 20,
        BACKGROUNDCOLORSBRIGHTNESS = 100,
        BACKGROUNDCOLORSBRIGHTNESSTIMES2 = 2 * BACKGROUNDCOLORSBRIGHTNESS,
        BACKGROUNDCOLORSBRIGHTNESSTIMES3 = 3 * BACKGROUNDCOLORSBRIGHTNESS,
        BALLSMINBRIGHTNESS = 100,
        BALLSMAXBRIGHTNESS = 255,
        BALLSREDLIMIT = 200,
        BALLSREDLIMITGREEN = 100,
        BALLSREDLIMITBLUE = 100,
        NORMALBALLPOINTS = 1,
        SPECIALBALLSPAWNTIMEMIN = 10,
        SPECIALBALLSPAWNTIMEMAX = 45,
        SPECIALBALLPOINTS = 5,
        SPECIALBALLTIMEBONUS = 10,
        ADDBALLSWHILEPLAYINGEVERYMS = 250,
        SPECIALMUSICCHANCE = 20;
    var...