Skip to main content

Data Binding in 3D Scenes

Everyone who developes GUI based software knows data binding. Data binding is in general a technique that binds data from a provider and a graphical consumer and synchronizes them. If the model is updated the GUI updates automatically and vice versa.

Data binding only for 2D GUIs?

Everyone who engaged in 3D graphics programming knows that this doesn’t work with any 3D toolkit. But there is a solution now, and even it is for the web.

You can just combine a Javascript-Framework such as Knockout or Angular with x3dom.

<scene>
    <shape *ngFor="#let shape of shapes">
      <appearance>
         <material diffuseColor='{{shape.r}} {{shape.g}} {{shape.b}}'></material> 
      </appearance>
      <box></box>
   </shape>
</scene>

x3dom_logo

x3dom is like svg. XML embedded in Html. But instead of vector graphics it describes 3D Scenes. The data structure is – as the name already says – based on x3d which itself is a successor of Vrml.

There is a long way to go populating 3D web standards but this is a good beginning.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *