mrdoob/three.js — Issue #1465: Configuring the camera
Author: LeonardoCardia
Created: 2012-03-07 16:29:19+00:00
State: open

Hi,
I'm trying to configure the my camera and lighting,
to face animation, however I'm not getting:

// LIGHTS

var ambient = new THREE.AmbientLight( 0xffffff );
scene.add( ambient );

pointLight = new THREE.PointLight( 0xffffff );
pointLight.position.set( 0, 100, 0 );
scene.add( pointLight );

// RENDERER
try {

webglRenderer = new THREE.WebGLRenderer({
antialias: true
});
webglRenderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
webglRenderer.domElement.style.position = "relative";

container.appendChild( webglRenderer.domElement );

has_gl = 1;

}
catch (e) {
}

// STATS

stats = new Stats();
stats.domElement.style.position = 'absolute';
stats.domElement.style.top = '0px';
stats.domElement.style.zIndex = 100;
container.appendChild( stats.domElement );

// LOADER

var loader = new THREE.JSONLoader(),
callbackObj = function( geometry ) { createScene( geometry, 0, 0, 0, 0 ) };
loader.load( "pe/pe_conjunto.js", callbackObj );

// POINT LIGHT REP

var plight = new THREE.SphereGeometry( 5, 16, 8 ),
plightmat = new THREE.MeshBasicMaterial( { color: 0x000000 } );

pmesh = new THREE.Mesh( plight, plightmat );

pmesh.position = pointLight.position;

pmesh.overdraw = true;

scene.add( pmesh );

}

I need to get this point the screen, without interfering in my scene.

Thank's.