UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

36 lines (35 loc) 915 B
"use strict"; import { ref } from "../../../core/reactivity/CoreReactivity"; export class ScenePerformanceMonitor { // private _thresholdContainers: ThresholdContainer[] = []; constructor(scene) { this.scene = scene; this._performanceRef = ref(1); } // reset() { // this._thresholdContainers.length = 0; // } // addThreshold(threshold: number) { // // check first that a similar threshold exists // for (let container of this._thresholdContainers) { // if (container.threshold == threshold) { // // no need to add it // return; // } // } // // add if none similar found // this._thresholdContainers.push({ // threshold, // state: ThresholdState.ABOVE, // }); // } ref() { return this._performanceRef; } onPerformanceChange(perf) { this._performanceRef.value = perf; } // performance() { // return this._performance; // } }