Hi Scott,

 

I too have had struggles with 2D on the 3D canvas. I compromise by putting 2D objects in a different branch group on the z=0 plane making sure that my objects avoid any behaviours that might be defines for other objects.

 

Regards

 

Mike Goldwater
Auric Hydrates Ltd
e-mail: [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>

 

-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]] On Behalf Of Scott Mobile
Sent:
17 March 2002 14:02
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Applet with canvas and Canvas3D

 

After reading of so many struggles with disappointing results mixing 2D objects on the 3D canvas, I've decided to use a smaller portion of the app window for the 3D canvas and adding another panel with a canvas for displaying other items (character name, a compass, inventory, etc., etc) for my little 3D MMORPG. 

 

Trying to override the repaint() methods of the applet caused some crashing, I'm assuming Java3D doesn't like that?  So I'm using a behavior with a 0 frames elapsed wakeup condition, and then checking the amount of system time in  (every quarter second or so) to trigger my code to update things on this "StatsPanel" canvas.

 

The entire app is a basic borderlayout, with a 3D canvas, and panel with the canvas for player status info, and a south panel with a text area and textfield for chat and server messages.

 

I imagine eventually I'll upgrade the player status panel to use Java2D, but I have to get familiar with it, and even possibly use it for the chat area as well.

 

Is this the best way to do this?   I'm not sure what kind of CPU repainting either a canvas of Java2D canvas a few times a second is going to take up, and I don't want to spend a lot of time on something I'll have to scrap later.

 

Scott

Virtopia 2 3D Project

 

Reply via email to