0 Replies Latest reply: Jun 17, 2010 5:51 AM by 843799 RSS

    Web Applet, Load obj models outside JAR

    843799
      Hello.
      I am developing an applet for HTML page that shows 3D models. I have many file for models, over 30Mb of obj/mtl/jpg. If I put them into the main JAR file all works perfectly, but browser takes a long time to load the applet.
      So I moved model files in a folder outside JAR, but my applet doesn't load the mtl info and the jpg texture. I can see only the model in B/W.
      I use this line to load objects:
      int flag_centra = ObjectFile.RESIZE;
      ObjectFile loader = new ObjectFile(flag_centra);
      Scene Oggetto;
      try { Oggetto = loader.load( new URL("http://www.europeanevolution.com/applet3/models/"+FileObj)); }
      catch (Exception ex) { throw new RuntimeException(ex); }
      "FileObj" is a string variable that take the name of the file from a parameter. JAR and HTML file are in folder "http://www.europeanevolution.com/applet3". All obj/mtl/jpg are in folder "http://www.europeanevolution.com/applet3/models".

      Why mtl and jpg are ignored?