NuiLab / code-vr

🐍 Program and explore real applications with virtual reality! Learn how to program, compete to build apps, and even collaborate with other people in realtime, in game or not!
MIT License
145 stars 13 forks source link

Python to Scene Graph #7

Open lborg019 opened 7 years ago

lborg019 commented 7 years ago

I'm on it

alaingalvan commented 7 years ago

@lborg019, The AST conforms to a certain schema, and will need to be converted to a scene with actors.

let ast = import_from_python("./mypythonfile.py");

for node in ast {
  match node {
     Node::Module(data) => {
        scene.add(Module::new(data));
     },
     // Match other types of modules
     // Repeat some stuff recursively
     _ => ()
  }
}