Jump to content

How to start to collaborate with BabylonJS


ElemarJR
 Share

Recommended Posts

Hello there,

 

I would like to start to collaborate and submit PR. Right now, I'm trying to understand code organization, patterns and architectures. I found  recommendations about "Naming conventions" in the wiki, but just it. I would like to know:

 

  • Naming conventions content looks outdated. I think that this project started as  "pure" JS and was converted to TS after. Am I right?
  • Is there some document explaining code organization, design, patterns?
  • Is there some "architectural" documentation?
  • I did not find any automated tests? Are there unit or functional tests?

 

Regards,

 

 

Link to comment
Share on other sites

  • Naming conventions content looks outdated. I think that this project started as  "pure" JS and was converted to TS after. Am I right?

Yes that is correct

 

  • Is there some document explaining code organization, design, patterns?

Not none of this exists

 

  • Is there some "architectural" documentation?

Not none of this exists also

 

  • I did not find any automated tests? Are there unit or functional tests?

Either

Link to comment
Share on other sites

My 2 cents:

 

- Formal unit testing for essentially a hobby project, that is advancing rapidly, is hard to expect.  Informally, those demo scenes are at least something to go against.  I, with a lot of Gryff's help, do keep .blend files that are also used for Blender exporter testing.

 

- When the project started, typescript was not really ready.  Conversion must have been difficult to discipline, since it added no actual functionality.  Naming conventions remaining the same could have had something to do with compatibility.   Tricky to interject compatibility problems of a very new technology that adds no features.  Could scare off early "believers".

 

That said, going up to a version 2.0 might provide some "cover" to effect a few changes, which are most important to maintaining the code base.

Link to comment
Share on other sites

Hello,

 

 Thanks for asking and being volunteer to collaborate! :)

 

 We have slightly documented some basic coding guidelines here: https://github.com/BabylonJS/Babylon.js/wiki/Naming-convention But this is not the main point for us. We really have an underline philosophy you need to understand. 

 

 We don't really have design patterns recommendations for instance, still, babylon.js has been made with a specific philosophy: user first, simplicity first. If you can provide the feature to the user using 1 line of code, go for it. Take default choice for the user but let it being generic enough to redefine the behavior. For instance, the various cameras we've built is a good sample. We could have chosen to use "better" patterns like composition to build a specific camera. But for the user, it adds complexity and he needs to understand a lot of different concepts before starting to enjoy the framework whereas he just wants for instance a camera with a gamepad.    

 

 The attachControl provided by the camera is another good example. By default, all cameras provide a default input behavior. The idea is that in 90% of the cases, it will match what the user will need. So you really need to think as if you were a basic user that want to build powerful things in a simple way. You don't need to be a 3D guru to use most of the features. Another cool feature we love is the sandbox tool. A designer that doesn't know anything about JavaScript, MIME type, web server can test his .babylon assets by a simple drag'n'drop. Even better, the 3DS Max exporter directly embeds a web server and launch the default browser to display the exported/converted scene into Babylon.JS in a very transparent way. 

 

 In conclusion, we're challenging us a lot during our weekly internal core team conf-call. When someone from the team wants to build a new features, someone else from the team that doesn't know at all this domain explains how he would dream to use this new API. Then we try to match both worlds. We're listening also a lot what you're saying on the forum and doing more or less internal triage to put priorities on the features. If we're convinced it will help a lot of our users, it will become P1. If it's just to help a specific case of a specific user, we prefer that this user try to implement himself the feature on top of babylon.js. So, the babylon.js core shouldn't become too fat and do everything. It should offer what's really complex to implement for lambda users in a very simple way.  

 

 Hope it will help you to understand a bit better how we work. ;-) And welcome to the jungle! :-D

 

Bye,

 

David

Link to comment
Share on other sites

Davrous has well painted the whole picture.

 

From the internal core system, the motto is "performance first". So we have tons of optimizations engine (multi layer caching system, smart shaders, gc friendly objects, debug tools, etc...)

 

From testing point of view, the best idea is to test all the scene we have against new version for visual testing and performance assessment.

Link to comment
Share on other sites

Thanks for the answering. I did some experimentation with Bablyonjs today and it's really amazing. It's incredible how much I did with less than 50 lines of code. As a C++ and DirectX / OpenGL programmer, I need more than 50 lines of code just to present a blank screen. If the goal is simplicity it was accomplished.

I think that the playground and demos works as "functional tests", even not automatized. I just asked the tests because I understand that is a good way to understand the API design. As developer I use my tests to check if the "interface" of my code is clear and to find opportunities of improvement.

Talking about the sandbox, it's really amazing. Just having some fun, I tried to get some blender models from the web (as you, guys, I am a developer and not so good artist) and tried to export it. The result was not so fun, almost all models that I used had problems with normals. Almost 20 years developing software for interior design and I still get disappointed with the artists. :)

Currently, I work with R&D, developing prototypes, frameworks and libraries, and my first goal this year is to create a sketchup-like designing software. I am strongly considering to do it entirely with TS + WebGL (using Babylon). To do this I will need to develope features like triangulation, extruding and revolving, and so on. I don't know if it fits with Babylon or I should to do it specific in my project.

Babylon supports for picking is good. Loading scene/mesh is great. If I could to export a scene state to a ".babylon" it would be great.

I know that babylon is a rendering framework. Do you think that expand it to support design is a good idea?

Link to comment
Share on other sites

We have two options: either you can find a way to no use external dependencies (my favorite because people just have to reference babylon.js and that's it) or you cannot :)

 

If you cannot you will have to create a class that extends the mesh. This class will have to check if external dependencies is referenced

Link to comment
Share on other sites

Hi

 

I'd like to collaborate too, maybe inserting some maths (bezier curves ), showAxis() - if it's not in the debug mode -and ribbon mesh, if wanted.

I just read this wiki page about minifying : https://github.com/BabylonJS/Babylon.js/wiki/Creating-the-minified-version

 

But I need more info to understand :

 

- code must be written in typescript, right ? this is the ts file (a new class file or an existing BABYLON module file) that must PR ?

- in order to code here, I think I'll need to compile ts to js and then minify... grunt ? is there a wiki page about this ?

 

Need to learn some typescript before anyway :-q

Link to comment
Share on other sites

Hi ElemarJR,

 

I took a look at your Demo3, and saw what you were doing with Paths.  We could use more graphic adaptive path driven animation support, so please continue to expand on all of your work.  As was expounded previously, welcome to this small community (rapidly growing), as we will change all presentation of content on the web - of this I am confident.

 

By the way, Brazil is my MOST FAVORITE country to travel to.

 

Cheers,  :)

 

Dbawel

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...