spite / rstats

rStats
MIT License
244 stars 31 forks source link

Destroy method #8

Open gregtatum opened 8 years ago

gregtatum commented 8 years ago

Is there any way to destroy rStats after initing? I'm trying to integrate this into a multi-level environment, so I need to be able to take it apart. I'm not seeing anything in the code or docs.

spite commented 8 years ago

There isn't a method to do that, no. It's meant as a debug lib, so there wasn't too much worry to destroy anything created. It can be added, of course. Are you thinking on mostly on the DOM and event listeners, or also the instrumentation of WebGL/threejs/etc?

gregtatum commented 8 years ago

I've started with implementing the .start() and .end() functions, and haven't gotten into the rest of the features. So right now it's more about the DOM elements. But ideally yes, it'd be great if everything was supported. I tear apart everything and rebuild it between, that way I can do different renderer configurations between levels.

spite commented 8 years ago

If you want to do a PR, I'll check the other methods. Although I'm wondering if this library could do with an overhaul. It's too verbose for my taste, even though there are not many other ways to track execution time...

gregtatum commented 8 years ago

Yeah, I can do a PR. rStats would really be nice to have integrated in my sandbox framework.

On Mon, Aug 10, 2015 at 11:56 AM Jaume Sanchez notifications@github.com wrote:

If you want to do a PR, I'll check the other methods. Although I'm wondering if this library could do with an overhaul. It's too verbose for my taste, even though there are not many other ways to track execution time...

— Reply to this email directly or view it on GitHub https://github.com/spite/rstats/issues/8#issuecomment-129525552.