Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [Xj3D API problem]No Background, use the X3DLoader  (Read 731 times)
0 Members and 1 Guest are viewing this topic.
Offline jiahan

Junior Newbie




Java games rock!


« Posted 2005-03-31 07:19:39 »

I use X3Dloader to import x3d scene to construct Java3D scene graph from x3dv file~
And this x3d scene has Background node, which to pasted full image around the 3D world.
But I can't see any background in Java3D world, when I use X3DLoader to import that X3D scene.
And then I use the browser(in Java3D render) bundled with Xj3D API, to view the X3D file....I can see the background.

I think the X3DLoader is already load the background node into java3D scene, but the background node's shape is black(shade color), and no image pasted on these shape.
So how to use X3DLoader to load X3D scene's background correctly??Does everyone familiar with Xj3D API can help me.
thanks~

My JDK is 1.5, My Java3D API is 1.3.1, Xj3D API is M10

x3dv code:
---------------------------------------------------------
Background {
backUrl [ "ocean_3_back.jpg" ]
bottomUrl [ "ocean_3_bottom.jpg" ]
frontUrl [ "ocean_3_front.jpg" ]
groundAngle [ 0.1, 1.309, 1.571 ]
groundColor [ 0 0 0, 0 0.1 0.3, 0 0.2 0.5, 0 0.3 0.8 ]
leftUrl [ "ocean_3_left.jpg" ]
rightUrl [ "ocean_3_right.jpg" ]
skyAngle [ 0.1, 0.15, 1.309, 1.571 ]
skyColor [ 0.4 0.4 0.1, 0.4 0.4 0.1, 0 0.1 0.3, 0 0.2 0.6, 0.8 0.8 0.8 ]
topUrl [ "ocean_3_top.jpg" ]
}
--------------------------------------------------------

Java code
--------------------------------------------------------
BranchGroup worldRoot = new BranchGroup();
int flag = X3DLoader.LOAD_ALL;
X3DLoader loader = new X3DLoader(flag);
Scene scene = null;

scene = loader.load("x3dv/background/background.x3dv");
worldRoot.addChild(scene.getSceneGroup());
worldRoot.compile();
universe.addBranchGraph(worldRoot);
---------------------------------------------------------
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (73 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (44 views)
2014-09-07 01:13:42

Longarmx (27 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!