Hi all!
I am playing with the cesium sandbox and would like to have the performance display (FPS & time in ms per frame) from cesium inspector mixin enabled by default. By now I found a solution that seems to be kind of bulky to me:
CesiumViewer.js
viewer.extend(viewerCesiumInspectorMixin);
viewer.cesiumInspector.viewModel.performance = true;
viewer.cesiumInspector.viewModel._showPerformance();
viewer.cesiumInspector.viewModel.update();
knockout.getObservable(viewer.cesiumInspector.viewModel, 'performance')(true);
``
for the above code to work I also had to force knockout to track the performance variable inside cesium.
CesiumInspectorViewModel,js
knockout.track(this, [‘filterTile’, ‘suspendUpdates’, ‘dropDownVisible’, ‘shaderCacheText’, ‘frustums’,
‘frustumStatisticText’, ‘pickTileActive’, ‘pickPrimitiveActive’, ‘hasPickedPrimitive’,
‘hasPickedTile’, ‘tileText’, ‘performance’, ‘generalVisible’, ‘generalSwitchText’,
‘primitivesVisible’, ‘primitivesSwitchText’, ‘terrainVisible’, ‘terrainSwitchText’, ‘depthFrustumText’]);
``
Is there a proper way of enabling performance display in cesium inspector mixin?
With best regards,
Alexey