@0b5vr/tweakpane-plugin-profiler
v0.4.1
Published
Profiler plugin for Tweakpane
Downloads
97
Readme
@0b5vr/tweakpane-plugin-profiler
Profiler plugin for Tweakpane
<script type="module">
import * as Tweakpane from 'https://unpkg.com/[email protected]/dist/tweakpane.js';
import * as TweakpaneProfilerBladePlugin from './tweakpane-plugin-profiler.js';
const pane = new Tweakpane.Pane();
pane.registerPlugin( TweakpaneProfilerBladePlugin );
const profiler = pane.addBlade( {
view: 'profiler',
label: 'profiler',
} );
function update() {
profiler.measure( 'haha', () => {
somethingExpensive();
} );
requestAnimationFrame( update );
}
requestAnimationFrame( update );
</script>