scene.debugLayer : Copy last command to Clipboard

Hello guys !

Glad you love the idea ! :slight_smile:
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 :slight_smile:


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 :slight_smile:
  • I pushed back to my branch tricotou-feature on my Babylon.js fork.

Here is a screenshot of the new inspector :

And here is a live screencast of the result :


About my work, here is what I did :
I edited some files such as
dev/sharedUiComponents/src/lines/sliderLineComponent.tsx to add the copy button :

<div className="copy hoverIcon" onClick={() => this.onCopyClick()} title="Copy to clipboard">
    <img src={copyIcon} alt="Copy" />
</div>

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 ? :thinking:
  • 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 ? :slight_smile: )

See you
++ Tricotou

3 Likes