var Tunneli2 = function(){
    PartBase.call(this);

    //POSTPROCESSING
    this.setBloom(1);
    //this.setDoF();

    this.scene.fog = new THREE.Fog(0x00ffdd, this.near, this.far);

//VIDEO TEXTURE
    this.video = document.getElementById( 'lanka' );
    this.texture = new THREE.VideoTexture(this.video);
    this.texture.minFilter = THREE.LinearFilter;
    this.texture.magFilter = THREE.LinearFilter;
    this.texture.format = THREE.RGBFormat;


    this.putki = this.createScene(this.texture);
    this.scene.add(this.putki);
};

Tunneli2.prototype = PartBase.prototype.inheritance();

Tunneli2.prototype.prepare = function(){
    PartBase.prototype.prepare.call(this);
    this.video.currentTime = 0;
    this.video.play();
    //console.log("Lankavideo!");
};

Tunneli2.prototype.finish = function(){
   PartBase.prototype.finish.call(this);
   this.video.pause();
};

Tunneli2.prototype.createScene = function(map){
    var geometry = new THREE.CylinderGeometry(20, 4, 800, 124, 50, false);
    var material = new THREE.MeshBasicMaterial({
        map : map,
        side : THREE.BackSide
    });

    var putki = new THREE.Mesh(geometry, material);
    putki.rotation.x = Math.PI/2;

    return putki;
}
