World Batching
//These are taken from the World sample application
var tree = world.loadModel(hxd.Res.tree);
var rock = world.loadModel(hxd.Res.rock);
//Add 5000 objeects to our scene - randomly choosing between a rock and a tree
for( i in 0...5000 )
world.add( Std.random(2) == 0 ? tree : rock,
0,
1.2 + hxd.Math.srand(0.4),
hxd.Math.srand(Math.PI)
);
//Let our world know that we are done batching items so it can perform some optimizations
world.done();
new h3d.scene.DirLight(new h3d.Vector( 0.3, -0.4, -0.9), s3d);
s3d.lightSystem.ambientLight.setColor(0x909090);
//Adjust the camera settings and create a controller so we can observer our scene
s3d.camera.target.set(72, 72, 0);
s3d.camera.pos.set(120, 120, 40);
s3d.camera.zNear = 1;