rstats icon indicating copy to clipboard operation
rstats copied to clipboard

Destroy method

Open gregtatum opened this issue 10 years ago • 4 comments

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.

gregtatum avatar Aug 10 '15 14:08 gregtatum

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?

spite avatar Aug 10 '15 15:08 spite

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.

gregtatum avatar Aug 10 '15 15:08 gregtatum

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...

spite avatar Aug 10 '15 16:08 spite

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 [email protected] 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.

gregtatum avatar Aug 10 '15 17:08 gregtatum