examples/homer/example.js
function _createFPS(context) {
    
        // Render FPS in right-top
        var modifier = new Modifier({
            align: [1, 0],
            origin: [1, 0],
            size: [100, 50]
        });
        var surface = new Surface({
            content: 'fps',
            classes: ['fps']
        });
        context.add(modifier).add(surface);
        
        // Update every 5 ticks
        Timer.every(function () {
            surface.setContent(Math.round(Engine.getFPS()) + ' fps');
        }, 2);
    }
function _createFPS(context) {
    
        // Render FPS in right-top
        var modifier = new Modifier({
            align: [1, 0],
            origin: [1, 0],
            size: [100, 50]
        });
        var surface = new Surface({
            content: 'fps',
            classes: ['fps']
        });
        context.add(modifier).add(surface);
        
        // Update every 5 ticks
        Timer.every(function () {
            surface.setContent(Math.round(Engine.getFPS()) + ' fps');
        }, 2);
    }
function _createFPS ( context ) { // Render FPS in right-top var modifier = new Modifier ( { align : [ 1 , 0 ] , origin : [ 1 , 0 ] , size : [ 100 , 50 ] } ) ; var surface = new Surface ( { content : 'fps' , classes : [ 'fps' ] } ) ; context . add ( modifier ) . add ( surface ) ; // Update every 5 ticks Timer . every ( function ( ) { surface . setContent ( Math . round ( Engine . getFPS ( ) ) + ' fps' ) ; } , 2 ) ; }
Creates the FPS-indicator in the right-top corner.

@method _createFPS
@private
Creates the FPS - indicator in the right - top corner .