How to use the exit.png function in exit

To help you get started, we’ve selected a few exit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ludei / cocoonjs-demos / Multiplayer / js / MultiplayerDemo.js View on Github external
function renderExitButton() {

        ctx.font = "35px Helvetica";
        ctx.fillStyle = "#bbbbbb";
        var offset = 10;
        var text = "Exit";
        var metrics = ctx.measureText(text);
        var text_width = metrics.width;
        var text_height = metrics.height;

        ctx.fillText("EXIT", offset + text_width + assets["exit.png"].width * 0.7, canvas_height - offset * 1.4);
        ctx.drawImage(assets["exit.png"], offset, canvas_height - offset - assets["exit.png"].height);
    }
github ludei / cocoonjs-demos / Multiplayer / js / MultiplayerDemo.js View on Github external
function renderExitButton() {

        ctx.font = "35px Helvetica";
        ctx.fillStyle = "#bbbbbb";
        var offset = 10;
        var text = "Exit";
        var metrics = ctx.measureText(text);
        var text_width = metrics.width;
        var text_height = metrics.height;

        ctx.fillText("EXIT", offset + text_width + assets["exit.png"].width * 0.7, canvas_height - offset * 1.4);
        ctx.drawImage(assets["exit.png"], offset, canvas_height - offset - assets["exit.png"].height);
    }

exit

A replacement for process.exit that ensures stdio are fully drained before exiting.

MIT
Latest version published 10 years ago

Package Health Score

67 / 100
Full package analysis

Popular exit functions