Search JavaScript code of all Worlds for: ABWorld camera
ABWorld.camera = new THREE.PerspectiveCamera ( 50, window.innerWidth / window.innerHeight, 0.1, maxRadius ); // near value of 0.1 to allow camera get closer to boxes
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.init3d ( startRadius, maxRadius, SKYCOLOR ); // sets up renderer, scene, camera
ABWorld.drawCameraControls = false;
ABWorld.drawCameraControls = false; ABWorld.init3d ( startRadius, maxRadius, SKYCOLOR ); // sets up renderer, scene, camera
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.drawCameraControls = false;
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.drawCameraControls = false;
ABWorld.drawCameraControls = false;
ABWorld.drawCameraControls = false;
ABWorld.follow.x = ABWorld.follow.x + ( CAMERASHIFT * Math.sin(agentRotation) ); ABWorld.follow.z = ABWorld.follow.z + ( CAMERASHIFT * Math.cos(agentRotation) );
ABWorld.drawCameraControls = false; ABWorld.camera.position.set(0,100,0); ABWorld.camera.position.set(50,50,30); ABWorld.camera.position.set(50,50,-30); ABWorld.camera.position.set(-50,50,-30); ABWorld.camera.position.set(-50,50, 30); ABWorld.init3d(startRadius, maxRadius, SKYCOLOR); // sets up renderer, scene, camera
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent) ABWorld.cameraTrack() ABWorld.cameraMove() ABWorld.cameraFixed()
ABWorld.drawCameraControls = false;
ABWorld.drawCameraControls = false;
ABWorld.drawCameraControls = false;
ABWorld.drawCameraControls = false;
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
if((ABWorld.camera.rotation.y >= -Math.PI / 4 && ABWorld.camera.rotation.y <= Math.PI / 4) && (ABWorld.camera.rotation.x >= -Math.PI / 2 && ABWorld.camera.rotation.x <= 0) && (ABWorld.camera.rotation.z >= -Math.PI / 4 && ABWorld.camera.rotation.z <= Math.PI / 4)) else if((ABWorld.camera.rotation.y >= -Math.PI / 4 && ABWorld.camera.rotation.y <= Math.PI / 4) && (ABWorld.camera.rotation.x >= -Math.PI && ABWorld.camera.rotation.x <= -Math.PI / 2) && (ABWorld.camera.rotation.z >= 3 * Math.PI / 4 || ABWorld.camera.rotation.z <= -3 * Math.PI / 4)) else if((ABWorld.camera.rotation.y >= 0 && ABWorld.camera.rotation.y <= Math.PI / 2) && (ABWorld.camera.rotation.x >= -Math.PI && ABWorld.camera.rotation.x <= 0) && (ABWorld.camera.rotation.z >= 0 && ABWorld.camera.rotation.z <= Math.PI)) else if((ABWorld.camera.rotation.y >= -Math.PI / 2 && ABWorld.camera.rotation.y <= 0) &&
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.lookat.copy(theenemy.position); // if camera moving, look back at where the enemy is
ABWorld.drawCameraControls = false; ABWorld.init3d(startRadius, maxRadius, SKYCOLOR); // sets up renderer, scene, camera
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.drawCameraControls = false;
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)
ABWorld.lookat.copy ( theenemy.position ); // if camera moving, look back at where the enemy is ABWorld.follow.copy ( theagent.position ); // follow vector = agent position (for camera following agent)