function World()
{
var scene = new THREE.Scene()
var skyTexture = new THREE.TextureLoader().load("uploads/dannydevito/night.png");
scene.background = skyTexture;
var renderer = new THREE.WebGLRenderer();
function render()
{
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
}
var cam;
function camera()
{
cam = new THREE.PerspectiveCamera(90, window.innerWidth/window.innerHeight, 0.1, 1000);
cam.position.set(0, 3.5, -160);
cam.lookAt(scene.position);
}
function loadPlayer()
{
var oLoader = new THREE.OBJLoader();
oLoader.load("uploads/dannydevito/rat.obj", function(rat)
{
var textureLoader = new THREE.TextureLoader();
textureLoader.load("/uploads/dannydevito/red.png", function(thetexture)
{
thetexture.minFilter = THREE.LinearFilter;
rat.material = new THREE.MeshBasicMaterial({map:thetexture});
rat.position.set(10,10,10);
scene.add(rat);
});
});
}
this.newRun = function()
{
// Code for Three.js initial drawing of objects.
// Should include one of:
// ABWorld.init2d ( arguments );
// ABWorld.init3d ( arguments );
render();
// camera();
// loadPlayer();
};
}