Hi Guys/Gals!
https://www.babylonjs-playground.com/#AMYR5C#12
There’s my “flow chart” again, based-upon some questions that a forum friend once asked.
I removed ALL hard-coded ‘px’ from it, and instead, have tried to use percentages and/or derived line positions.
Notice that, if you (1) drag the PG vertical divider, or (2) drag the horizontal divider atop your F12 dev-tools panel, or (3) ‘restore’ the browser window (drag-sized smaller than full screen)… my diagram lines become ‘wonky’ and disconnected. Press RUN again, and they are fixed.
Can someone help me “wire-up” an onResizeObserver that… you know… fixes my lines automatically, after condition 1, 2, or 3? Thx for any help with that!
On a related topic, I am pondering a GUI-based “diagram generator/tool”… possibly related to our world famous Playground-Based Tutorials (PBT’s). We have all seen some playgrounds ‘within’ forum-posts… iframed-in.
-
Sometimes… I could use a quick diagram to help me answer a forum question.
-
Sometimes… a PBT could use the help of a GUI diagram or flow-chart.
-
Sometimes, our docs could use some dynamically-generated diagrams.
AND… dynamically-generated diagrams… CAN be self-updating or “live”, because the diagrams can be ‘derived’ from whatever version of BJS… is currently executing the diagram-generator. (resource-discovery)
So… Wingnut wants to get rectangled textBlocks, and lines to connect them… working SWEET and EASY. Chart Layout Manager, version -1.0 Ideally, we can set it for 2D gui, or 3D gui.
In lines-drawing ops, lots of things are done after scene.onReady (or at least after first GUI render)… so all line x1, y1, and x2, y2… can ‘query’ for the center or edge of a connected control/button. Currently, lines do this…
realline1.connectedControl = realFac1Rect;
I hope SOMEDAY, to allow it to be connectedControlS (an array) or at least… allow connectedControl2. I would really like this diagram generator… to leave-behind the x1/y1/x2/y2 crap. (Do that stuff internally, behind the scenes).
It would be nice if the diagram generator… could be programmed at low-level, or with a high-level “talkie” language (like SQL?)
Anyway, I’ll gladly welcome all ideas, proof of concepts, and early mock-ups/test-beds… regarding an easy-to-use flow-chart/diagram generator system. Thank you for ANY help/tests that you can contribute! Party on!
PS: Enabling “drilling” of a “branch” of a chart (collapse/uncollapse)… wins extra credit. I think ADT would have a conniption fit, doing the resizing and scale-to-fit, though. ADT’s would likely need overflow/scrollbars. (erf) Perhaps possible using ADT rootContainer .top and .left, if they exist. Font-size down-sizing when text containers are down-scaled… would be nice, too (perhaps already handled nicely by current ‘toFit’ features). Border thickness reduction when rectangle is down-scaled… would be sweet, as well.