Page 1 of 2

SohwStats and Debug

PostPosted: Mon Aug 01, 2016 1:44 pm
by RiaanPie
Hi there

A question about debugging.
I look through the sample files as well as through my current project and using the showStats and debug code doesn't appear to make any sort of difference to outputs.

Code: Select all
ige.showStats(1);
      ige.input.debug(true);


In the video tutorials, the author has a nifty popup that appears where he can inspect objects and such, but I can't seem to get that? I also am not able to stop the console outputs.

Re: SohwStats and Debug

PostPosted: Mon Aug 01, 2016 2:44 pm
by rob
It could be that you haven't included the CSS required to display the stats? Can you inspect your HTML and see if the elements are there but just not visible because they don't have styling?

Also I *think* that global debug can be switched on and off via ige.debug(false)

Re: SohwStats and Debug

PostPosted: Mon Aug 01, 2016 8:14 pm
by RiaanPie
The blank_game forlder doesn't appear to come with any css any more. Has it been removed? If not, where is it located?

Re: SohwStats and Debug

PostPosted: Mon Aug 01, 2016 10:43 pm
by rob
I think it's up one level in assets.

Re: SohwStats and Debug

PostPosted: Tue Aug 02, 2016 8:53 am
by RiaanPie
Rob, is it possible to give me an idea of what should be in the CSS file? There's no css file in assets, but there's various css folders elsewhere (like in the engine and documentation folder). Apologies for the inconvenience. If I know what to look for, I can probably find it (If it is still part of the download).

Re: SohwStats and Debug

PostPosted: Tue Aug 02, 2016 10:03 am
by rob
So I think my info was out of date, the editor example shows how to display rendering stats (examples/100-editor). showStats(1) is deprecated from the engine.

The editor client.js starts up the editor component:

Code: Select all
var Client = IgeClass.extend({
   classId: 'Client',
   
   init: function () {
      var self = this;
      ige.addComponent(IgeEditorComponent);
      self.gameTexture = {};
      
      // Create the HTML canvas
      ige.createFrontBuffer(true);

      // Start the engine
      ige.start(function (success) {
         // Check if the engine started successfully
         if (success) {
            // Load the base scene data
            ige.addGraph('IgeBaseScene');
            
            // Show the editor
            //ige.editor.show();
         }
      });
   }
});

Re: SohwStats and Debug

PostPosted: Tue Aug 02, 2016 1:40 pm
by RiaanPie
What a legend, that works a treat! :) thanks again.

Re: SohwStats and Debug

PostPosted: Fri Oct 21, 2016 4:18 pm
by Sandstedt
Tried your solution, but only got
Code: Select all
TypeError: Cannot read property 'show' of undefined
. Can I find this debugging tool in the API docs?

Re: SohwStats and Debug

PostPosted: Fri Oct 21, 2016 4:21 pm
by Sandstedt
Sorry, didn't read you example correctly. So the answer is to add and component with the name IdeEditorComponent :)

Code: Select all
// Show the editor
ige.addComponent(IgeEditorComponent);

Re: SohwStats and Debug

PostPosted: Mon Oct 31, 2016 2:02 pm
by RiaanPie
Please help me to get rid of all the automatic console output?
I want to move to production but there's a ton of output that I dont want there.