Auto Start FPS Meter ? [SOLVED]

Discussion in 'Learning Javascript' started by Jonforum, Jul 14, 2017.

  1. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,575
    Likes Received:
    1,344
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    Hi !
    Someone would have an idea to how automatically start the FPS meter from chrome?
    I'm talking about this option
    fad-da-ea-e.jpg
    I created a code that allows each startup to start the console.
    but i didn't find the class to allow auto boot this FPS and GPU memory meter.!?

    PHP:
    //□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
        //  AUTO SHOW DEBUG CONSOLE AT BOOT
        
    if (Utils.isNwjs() && Utils.isOptionValid('test')) {
            var 
    _debugWindow = require('nw.gui').Window.get().showDevTools();
            
    console.log('_debugWindow: '_debugWindow);
            
    _debugWindow.moveTo(00);
            
    _debugWindow.height=800;
            
    _debugWindow.width=1000;
            
    window.focus();
        }
    //□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
    thanks for help
     
    #1
  2. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,575
    Likes Received:
    1,344
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    well, is solved .

    simply add custom flag inside the package.json !
    the flag are "chromium-args" : "--show-fps-counter",
    package.json for windows are in
    C:\Program Files (x86)\KADOKAWA\RPGMV\nwjs-win\package.json

    PHP:
    {
        
    "name""KADOKAWA/RPGMV",
        
    "main""www/index.html",
        
    "js-flags""--expose-gc",
        
    "chromium-args" "--show-fps-counter",
        
    "window": {
            
    "title""",
            
    "toolbar"false,
            
    "width"816,
            
    "height"624,
            
    "icon""www/icon/icon.png"
        
    }
    }
    we can access it directly like that's.
    PHP:
    fs = require('fs')
    json JSON.parse(fs.readFileSync('package.json''utf8'))
    But I do not find how to indirectly modify the package.json with pure javascript.
    If someone has an idea.
    For now I will mark solved.:cutesmile:
     
    #2

Share This Page