Author Topic: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)  (Read 1376 times)

Offline Pascal

  • byte
  • *
  • Posts: 6
    • View Profile
3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« on: October 06, 2012, 11:07:59 am »
Hello,
i need to create a 3D-Animation that can be called via the browser. I didnīt find any examples to create a WebService (.war) with jpct. Is it right that this isnīt possible?

The only way is via an Applet? Because of this I wanted to test the AppletExample (http://www.jpct.net/wiki/index.php/Applets) but I get the Error
"Laden: Klasse HelloWorld nicht gefunden
java.lang.ClassNotFoundException: HelloWorld"

I created the Class in an Eclipse-Project an exported it as .jar. But what is the internal path from the HelloWorld-Class. Do i have to choose a special packagePath or what else do I have to consider when creating this .jar. (All three files are in the same folder (HelloWorld.jar, jpct.jar & HelloWorld.html))

Best Regards,
Pascal

Offline Hrolf

  • int
  • **
  • Posts: 84
    • View Profile
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #1 on: October 06, 2012, 04:01:17 pm »
You might find this useful - full source here.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #2 on: October 06, 2012, 08:53:33 pm »
A web service isn't client based and a war file is for deploying web applications on servers. I don't think that that's what you want.

You can create applets as well as web start (maybe you meant that with web service?) with jPCT. The engine actual doesn't care one bit about the form in which you distribute your content. If you want to create an Applet, this might help: http://www.jpct.net/wiki/index.php/Applets

Offline Pascal

  • byte
  • *
  • Posts: 6
    • View Profile
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #3 on: October 06, 2012, 10:45:07 pm »
Oh, Iīm Sorry! I meant WebApp, not WebService. I need an application that is completely on the server and that the User doesnīt has to download a file before using that 3D-Animation.
One way is the Applet, but is there a way to create this app like an JSF/JSP-Page? (With something like a Bean in backround that contains the 3D-content) Or is an Applet the only way to publish an 3D-Animation where the user has possibilities for interactions?

@EgonOlsen: Thats the example I used, but when I create the HelloWorld.jar the applet gets the Exception that my HelloWorld.class wasnīt found. How do I have to pack the HelloWorld Class? Is there a special packagePath or anything else that I have to regard?

@Hrolf: Thanks, Iīll look at it in detail tomorrow...

Thanks for your help,
Pascal

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #4 on: October 06, 2012, 11:57:29 pm »
You can use jPCT on the server side (using the software renderer), but you can't do proper animation that way unless you implement some video streaming solution.

Offline Pascal

  • byte
  • *
  • Posts: 6
    • View Profile
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #5 on: October 07, 2012, 12:43:15 am »
I have positionData (Coordinates), that are actualized from another programm in a database and i have to show that actual "position" in the 3D-Animation... So I need a possibility to make "RealTimeChanges" e.g. of a moving point in that realization or that the Applet reads out the positionData stored on the server. (Therefore the idea of an solution like JSF uses with the data in the backround would be great)
Is that possible or can I only use the created Applet that is completely created while the "first" load of it?

Offline Pascal

  • byte
  • *
  • Posts: 6
    • View Profile
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #6 on: October 07, 2012, 06:55:21 pm »
Iīm new in Applet-programming, so excuse me for that question... But i have to analyse the possibilities of the differen techniques before choosing one and iīm not sure if it is realizable with an applet that it is actualizing a "position" depending on data lying on a server... I donīt want a complete solution, i just need to know if i can do it with an applet.

Thanks!
Pascal

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: 3D-Animation in WebBrowser - (Error: HelloWorld Applet)
« Reply #7 on: October 07, 2012, 08:16:20 pm »
Yes, you can do that. Applets are permitted to communicate with the server they came from. So you can open a http or socket connection to that server and implement the communication between client and server that way.