Sign in to follow this  
steffenk

Babylon Commandline Interface

Recommended Posts

Hey ,

this is a verry early stage of a little pythonscript to make the work with Babylon a little bit faster.

Its a CLI wich makes it easy to create a bisc proejct structure ( including a simple webserver ), add basic shapes, include .babylon files and add a prototype class for more complex objects.

https://github.com/steffenkre/babylonbackbone


Here are the parameters:

new <name> creates a new project

newclass <name> creates a new prototype class in man.js
newplane <name> creates a simple plane in middle of the scene
newcube <name> creates a simple plane in middle of the scene
newmesh <name> imports a new .babylon mesh from the assets Folder

What do you think about it? Whats missing?

Share this post


Link to post
Share on other sites

Hi steffenk!  We would use 'newBox' of course.  :D

 

Sorry for the slow response.  I was hiding under a haystack for the cold Michigan upper peninsula winter, but the weather has been real mild so far, so I emerged, and then discovered your cool idea/project.  I like it.

 

If I understand this correctly, this could be very useful.  Building basic/starter scenes from a CLI.  Seems like it would have some potential to be dynamic, easy-fast, and quite powerful.  Possibly addCamera and addLight could be used, too.  Maybe bindColor(meshName, someColor) - puts a material on a mesh and sets it to a color.  *shrug*

 

And, maybe... a runScene command.  :)  Would your CLI commands be writing lines of JS to a file, realtime?  Or would the BJS scene open in a new process right away, and THEN addStuff() commands?  Hmm.  Maybe use chromium so you are within scope of node?  err.  hmm.  Or could the python be used to generate a Blender-exporter-like file... a scene.babylon? 

 

Heck, I guess all of it could be tried/done.  I like dynamic scene generation.  But really, you would be using Python, to generate JS... that uses the BJS framework to dynamically generate a webGL scene.  At some point, one might consider a webGL framework written IN Python... maybe cut some corners.  :)  I dunno.

 

Hmm... Python in browsers (to build webGL-with).  Hmm.  SOME talking went on here... http://programmers.stackexchange.com/questions/190273/would-python-be-too-slow-for-client-side-use-in-browsers   *shrug*

 

Your idea might be a start to a Python-based data visualizer.  You could dynamically generate BabylonJS scenes from nearly any data model/structure.  Interesting! 

 

Keep us posted! 

 

Update:  Jerome has a fine LIVE data visualizer (a WAN map?) running at http://jerome.bousquie.fr/ ... using BabylonJS, with git source available.  (drool)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.