Skip to content

topheman/SoftLogger

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

SoftLogger

Simple logger that overrides console.log and let's you inject it in a canvas (or wherever you want).

Example using SoftLogger : http://topheman.github.io/boxbox/boxbox/demos/topheman/smileyFaces/demo.html

Instanciation :

//retrieve your canvas
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');

//instanciate your logger
var logger = SoftLogger.getInstance({
    fitToCanvas:true,
    canvas: canvas,
    ctxOptions : {
        x: 10,
        y: 10
    }
});

//then, in your animation/game loop, use the draw method
logger.draw(ctx);

Methods

SoftLogger.getInstance(options)

.draw(ctx)

.toggleConsole()

.getLogs()

About

Simple logger that overrides console.log and let's you inject it in a canvas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published