Jump to content

How to create Gizmos


Hartha
 Share

Recommended Posts

Hello, 

Is there any class to help in gizmos creation ?

I looked at babylon editor but i can't find where the gizmos code is, I tried to create it with linesMesh but I have no idea how to make it visible over other meshes !

 

Link to comment
Share on other sites

Hi Hartha.  In the BJS editor, these gizmos are called ManipulationHelpers.  Their JS source code...

https://github.com/BabylonJS/Editor/blob/master/website/libs/ManipulationHelpers.js

Go get 'em, Hartha!  :)

...aw heck, should we paste that into a playground and try to turn-on a "radix" gizmo?   Why not, huh?

http://www.babylonjs-playground.com/#1HR6XV#1

Cooooool.  :)  I'll let you "run with it" from here.  Do edits, makes more saves, show us what you create, thx.  You cannot damage anything in the playground.  I would guess that @Luaacro coded MH.js, but I have been poor-at guessing code authors, lately.  :)  Hope this helps.  Party on!

PS: That playground demo sometime causes problems with the playground app (or with FF browser).  It causes the playground editor screen to be black at times.  hmm.   Perhaps... use 'Get .zip' and play at home.  :)

Link to comment
Share on other sites

Hi @Hartha !

Sorry for the delay :)

The gizmos typescript source code is available here (from the link of @Wingnuthttps://github.com/BabylonJS/Extensions/tree/master/ManipulationHelpers

And then, the editor created its own manager here https://github.com/BabylonJS/Editor/blob/master/website/sources/internal/babylon.editor.manipulationHelpers.ts

Don't hesitate if you have questions :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...