New World

can anyone tell me how i make a new empty world?


World myWorld = new World();

if i call a render(world) on this it blows up.
the docs say i need to add a Camera, Background and
Light:


   World world = new World();
    // create a camera
    iCamera = new Camera();
    iCamera.setPerspective(60.0f, // field of view
                           (float) getWidth() / (float) getHeight(), // aspectRatio
                           1.0f, // near clipping plane
                           1000.0f); // far clipping plane
    world.setActiveCamera(iCamera);

    // create a light
    iLight = new Light();
    iLight.setColor(0xffffff); // white light
    iLight.setIntensity(lightIntensity); // overbright
    world.addChild(iLight);

    // background
    iBackground.setColor(0x335533);
    world.setBackground(iBackground);

and i still get a BANG… no joy on the render(world)
call. just blows up :frowning:

can anyone help? i want an world rendering with
nothing in it. then i can add my own groups and nodes
at runtime…

cheers all :slight_smile: bish bosh… jazz

Hi,

You have to add your camera to the world like your light so before
word.addChild(iCamera);
world.setActiveCamera(iCamera);

Mik
www.miklabs.com (soon an update…)

thanks loads… arrr at last no more BONK sound from
JBuilder :)… now i can add Groups to my world :)…

top site you have- by the way… your M3G-Converter
sounds very cool… oh would be tops if u could some
how save just groups or meshes into the m3g file :wink: