function CanvasBirds(container, width, height){

	var SCREEN_WIDTH = width,
	SCREEN_HEIGHT = height,
	SCREEN_WIDTH_HALF = SCREEN_WIDTH  / 1,
	SCREEN_HEIGHT_HALF = SCREEN_HEIGHT / 1,
	TOTAL_CROWS = 30;

	var camera, scene, renderer,
	crows, crow, mouse;

	var boid, boids, interval;

	this.container = container;

	init();

	function init() {

		mouse = new THREE.Vector3(0, 1000, 0);

		camera = new THREE.Camera( 100000, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 10000 );
		// camera.position.y = 500;
		camera.position.z = 500;

		scene = new THREE.Scene();

		crows = [];
		boids = [];

		/*
		renderer = new THREE.DOMRenderer();
		renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
		*/

		renderer = new THREE.CanvasRenderer();
		// renderer.autoClear = false;
		renderer.domElement.style.position = 'absolute';
		renderer.domElement.style.left = '0px';
		renderer.domElement.style.top = '0px';
		renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );

		container.style.left = '0px'; // ?
		container.appendChild( renderer.domElement );
		document.addEventListener( 'mousemove', onDocumentMouseMove, false );

		interval = setInterval( addCrow, 100 );

	}

	function addCrow() {

		boid = boids[ boids.length ] = new Boid();
		boid.position.x = Math.random() * 100 + 900; // Math.random() * 100 - 50;
		boid.position.y = Math.random() * 600 - 300;
		boid.position.z = Math.random() * 200 - 100;

		boid.velocity.x = Math.random() * 2 + 1;
		boid.velocity.y = Math.random() * 2 + 1;
		boid.velocity.z = Math.random() * 2 + 1;

		boid.setAvoidWalls( true );
		boid.setWorldSize( 1000, 800, 300 );

		/*
		var div = document.createElement( 'div' );
		div.style.position = 'absolute';
		div.style.width = '25px';
		div.style.height = '25px';
		div.style.background = 'url(files/img/birds.png)';
		renderer.domElement.appendChild( div );
		*/

		// crow = crows[ i ] = new THREE.Particle( new THREE.ParticleDOMMaterial( div ) );
		crow = crows[ crows.length ] = new THREE.Mesh( new Crow(), new THREE.MeshColorFillMaterial( 0x000000 ) );
		crow.phase = Math.floor( Math.random() * 62.83 );
		crow.position = boid.position;
		crow.doubleSided = true;
		scene.addObject( crow );

		if (boids.length > TOTAL_CROWS ) {

			clearInterval( interval );

		}

	}

	function onDocumentMouseMove( event ) {

		mouse.x = event.clientX - SCREEN_WIDTH_HALF;
		mouse.y = - event.clientY + SCREEN_HEIGHT_HALF;

	}

	this.update = function() {

		var color;

		for ( var i = 0, il = crows.length; i < il; i++ ) {

			boid = boids[ i ];
			boid.run( boids );

			mouse.z = boid.position.z;
			boid.repulse( mouse );

			crow = crows[ i ];

			color = crow.material[0].color;
			color.r = color.g = color.b = ( 500 - crow.position.z ) / 1000;
			color.updateStyleString();

			crow.rotation.y = Math.atan2( - boid.velocity.z, boid.velocity.x );
			crow.rotation.z = Math.asin( boid.velocity.y / boid.velocity.length() );

			crow.phase += Math.max( 0, crow.rotation.z - 0.5 ) + 0.1;
			crow.geometry.vertices[ 5 ].position.y = crow.geometry.vertices[ 4 ].position.y = Math.sin( crow.phase % 62.83 ) * 5;

		}

		renderer.render( scene, camera );

	}
}
