|
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
|
- Re: [JAVA3D] Applet with canvas and Canvas3D Scott Mobile
- Re: [JAVA3D] Applet with canvas and Canvas3D Mike Goldwater
- Re: [JAVA3D] Applet with canvas and Canvas3D Scott Mobile
- Re: [JAVA3D] Applet with canvas and Canvas3D Mike Goldwater
