But something which would be nice would be a button on each param, which would copy the last command to the clipboard. For example :
Let’s say I just tweeked Environment param, in the Levels panel of a Material.
The arborescence in the debugLayer : Material --> Levels --> Environment
Is in fact quite different from the actual attribute path : material.environmentIntensity;
Something great would be to edit the way the UI is built by adding some copy buttons. And when you hit the copy button :
It would be sooooo great, when you are tunning stuffs, (particles settings, colors, levels, etc, etc…)
I love the idea! This makes total sense when developping on the playrgound and less when tweaking a scene in the sandbox. So, make it optional if you want to start a PR
Glad you love the idea !
I would very interested in starting my contribution to Babylon.JS with this idea, but maybe it’s a bit too early considering my knowledge of the repo which is quite new.
Ah ! Did you already started ? Yesterday night I gave it a try. I would be interested in knowing from you guys, how far am I to being validated a PR. If you already worked on it no worries, I’ll consider my work as a training
Here is what I did so far :
I forked + cloned
I edited some files in order to achieve the new features
Running npm run build:dev gives no error
Running npm run serve -w @tools/babylon-server Allows me to try and it works great
I have done it for Sliders, Checkboxes, Color3&4, Vector3, List … (5 files edited)
As well I had to edit some CSS in : dev/inspector/src/components/actionTabs/actionTabs.scss
In order to include the structure change.
I inspired from the copy button which was already available for color pickers. (And that I modified by adding the command to the hex code retreived)
Now, what I would like to understand :
Why is there no comments in the source file I’ve cloned ?
Should I add some comments and push again ?
What are exactly the next steps ? (From going to “it works on my machine” to having my code being released ? )
@Deltakosh did you have a look at the video ? What do you think ?
Also, maybe I did not understand well the point about comments.
Having a look at the docs about contribution comments it seems that I need to comment indeed. I’m just surprised that the files I’ve worked on (example here) are absolutely free of any comments. Is it because there is some kind of CI/CD which gets rids of the comments at master merge, or something ? Should I comment my stuffs before doing a PR ?
Man! This is HUGE!! Let me ping @PatrickRyan just for the UI aspect but man! I love it
Regarding comments: we are enforcing them on the main core library but tools (for now) are in a grace period where we do not yet enforce it. THAT BEING SAID, for new PR we expect comments
@Joe_Kerr I’m not sure I understand what you mean by “copy last node” Can you develop the idea or eventually edit a screenshot of the inspector to show the concept ?
Ah yes, I see, nice idea !
I don’t know exactly the rules about global scope variables in BJS, so for now I extended the existing window interface, by adding a debugNode property :
declare global {
interface Window {debugNode: any;}
}
And I’m overriding it in the onSelect of the treeItemComponents
If you want to give it a try easily, I build it (and already used it, by the way )
You can get the inspector bundle HERE
By the way, about adding the debugNode triggered by click in the Scene Viewer… The commit is 10 lines ! I have seen much worse commits in my life, to be honest, ahah. The ratio Usefull / Lines of Codes is good, I’m happy
I’m too new to the repo to answer a definitive “YES”, but anyway I would advise indeed to keep the core at same version.
In addition to the babylon.inspector.bundle.js, on the same server I’m also hosting babylon.js, babylon.gui.min.js, babylonjs.material.min.js and babylon.glTFFileLoader.min.js. They have been build together.
[EDIT] I apologize, indeed the repo on hover.tricotools.com what not on the last commit. copyCommandToClipboard was ok, but not the last debugNode update. I just pushed, you can give it a new try