#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    Render Json file in Webbrowser


    Hello,

    I'm trying to render a Json file that was converted from a obj file (a cube made in blender) on my webbrowser.

    I alraedy have the following code

    PHP Code:
    <!DOCTYPE html> <html> <head>  <script>  function loadDatos() {        var xobj = new XMLHttpRequest();     xobj.overrideMimeType("application/json");     xobj.open('GET''part1.json'true);     xobj.onreadystatechange = function ()      {         if (xobj.readyState == 4)          {             alert('test');             var jsonTexto xobj.responseText;             alert(jsonTexto);             //ProcessTheData(jsonTexto);         }     }     xobj.send(null); } </script> </head> <body>     <h1>My First JavaScript</h1>     <p id="demo">This is a paragraph.</p>     <button type="button" onclick="loadDatos()">Display Date</button>  </body>  </html> 
    When I press on the button my webbrowser shows the content of the jsonfile.
    But now I want to see the cube.
    How do I need to do that?

    Thanks!
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    You will either need to write your own renderer or find an existing JavaScript library that is capable of rendering Blender objects. Writing one yourself would be a very complex task, and I have never heard of a library capable of doing that, however that doesn't mean that one doesn't exist.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo