This is to track a conversation to get the Performance Profiler to run inside a scene in XR. This was made to not clog up the announcement topic.
The first problem which was started in the announcement topic was getting the CanvasGraphService object to draw on the canvas of a DynamicTexture. The CGS is expecting a HTMLCanvasElement in the constructor. Rather than trying to refactor to also take a canvas2D context, seems just allowing a canvas is less work. Called with:
Other stuff like toolTips would not apply, but might be ignore-able. Just the last line in the constructor, the attachment of listeners would definitely need to be conditional on being a HTMLCanvasElement not a Canvas.
The next area is selecting a point on the X axis, so that the values at that point can be displayed. I see why there are no chart Y axis labels, because multiple things can graphed not having the same range. Is this what the tooltip stuff is for?
Inside of this, the mesh needs to be broken out vertically, so that the point in time can be determined. MeshBuilder does not do this, so I made it in Blender. It has 200 vertical areas that can be scene.picked, though that does not work in XR. Think there is an equivalent for XR. This is a snap in Blender of the 404 triangle mesh.
I generated an embedded BABYLON.Mesh subclass, which is now in the updated dev PG, so just a synchronous
new PERF_MESH.PerfMesh('results',scene); call without any callback crap to deal with.
The second fallout is that there needs to be dedicated controls to display the values, since tooltips are not going to work in XR. I plan on using my portal for XR. It is for providing UI for the user, which they can bring up at any time with a finger snap or controller ‘A’ button push. I can use it in the tool scene I am working on, putting the display mesh and value controls in one of the panes.
I also really need to track the amount of time done in beforeRenderers. I do not see that time broken out, so guess that means I have to add a strategy. That seems like something which should only be done, once it is got running.