Professional Documents
Culture Documents
Ancient
Ancient
DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>ANCIENT EGYPT</title>
<style>
body{ margin:40px; background-color:black; };
</style>
</head>
<body onload="init()">
<script>
/*https://threejs.org/examples/js/controls/OrbitControls.js" link doesn't
work !! */
var scene,camera,renderer;
var controls;
function init(){
container = document.getElementById('canvas1');
//RENDERER
renderer = new THREE.WebGLRenderer( {antialias: true, canvas: container } );
renderer.setClearColor("black");
renderer.setSize( container.clientWidth, container.clientHeight);
renderer.shadowMapEnabled = true; //árnyék
document.body.appendChild(renderer.domElement);
//SCENE
scene = new THREE.Scene();
//CAMERA
camera = new THREE.PerspectiveCamera( 75, container.clientWidth /
container.clientHeight, 0.1, 80000);
camera.position.set(-300,450,2700); //28,-6,45; 28,280,545;
0,280,600eredeti;430,400,2100; 1000,280,600
camera.lookAt(scene.position);
//KÖD
scene.fog=new THREE.FogExp2( "black", 0.00015 ); //def:0.0025, 0.00015
// scene.fog=new THREE.Fog( "black", 700, 900 ); //color, near, far,eredeti
0.00007
//---------------------------------------
//LIGHT
/*var light = new THREE.DirectionalLight("rgb(204, 238, 255)", 1.2); //
lambertmaterial
light.position.set(20,10,50).normalize() //20,10,10; 30,-10,10; ,20,10,50
van most
scene.add(light);*/
//több fény
var lights = [];
lights[ 0 ] = new THREE.PointLight( 0xffffff, 0.5,0); //color,
intensity,distance, decay; 1,0,0
lights[ 1 ] = new THREE.PointLight( 0xffffff, 0.55, 0);
lights[ 2 ] = new THREE.PointLight( 0xffffff, 0.1, 0 );
lights[ 0 ].position.set( -400,300,1600 ); //0,100,0
lights[ 1 ].position.set( 2300, -140, 1700 ); //csapóajtó
lights[ 2 ].position.set( 600,200,1900);
scene.add.apply( scene, lights );
// spotlight
var spotLight = new THREE.SpotLight("red",1, 1000,Math.PI/3); //color,
intensitiy, distance, radian, penubre, decay
spotLight.position.set(-2100,100,2700); // KIINDULÓ PONTOK-80,60,-10;
20,10,50, -400,1000,5600
spotLight.castShadow = true;
spotLight.target.position.set(-2100,150,2680); //CÉLPONTOK -2100,100,2700
// spotLight.target.intensíty =0.02;
scene.add(spotLight.target);
scene.add(spotLight);
//--------------------------------
// PYRAMID
var pyrgeo = new THREE.ConeGeometry(30000,30000,4);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
vdtpwrv3yolohxz/floor4.jpg?dl=0");
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(102, 102);
var pyrMat = new THREE.MeshPhongMaterial({map:texture, shading:
THREE.FlatShading});
pyrmesh= new THREE.Mesh(pyrgeo, pyrMat);
pyrmesh.position.set(-30050,10050,400);
scene.add(pyrmesh);
//pyramid entree
var pegeo = new THREE.BoxGeometry(2000,2000,2000);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
5lhub1v603o67i9/door1.jpg?dl=0");
var pemat = new THREE.MeshPhongMaterial({map:texture, shading:
THREE.FlatShading});
pemesh= new THREE.Mesh(pegeo, pemat);
pemesh.position.set(-7100,200,2200);
pemesh.rotateY(Math.PI/1.3); //1.28
scene.add(pemesh);
//-------------------------------------------
//CONTROLS
controls = new THREE.OrbitControls( camera ); //renderer.domElement ha ezt is
beleírod, akkor nyillal nem lehet irányítani
controls.maxPolarAngle = Math.PI/2; //nem tud a kamera a felszín alá menni 0-
Math.PI radian;
//---------------------------------
//ALSÓ TERÜLET
var box3Geometry = new THREE.BoxGeometry (2000,1000,1000);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
oi1rccoikqytpai/floor3.jpg?dl=0");
var box3Material = new THREE.MeshPhongMaterial({map:texture});
box3Mesh = new THREE.Mesh(box3Geometry, box3Material);
box3Mesh.position.set(150,-600,250);
box3Mesh.rotation.x =-90* Math.PI/180;
scene.add(box3Mesh);
//------------------------
//OLDAL FALAK
var balfalgeo = new THREE.BoxGeometry(1200,1500,3500); //w,h,d
THREE.ImageUtils.crossOrigin = '';
var texturebf = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
oi1rccoikqytpai/floor3.jpg?dl=0");
var balfalmat = new THREE.MeshPhongMaterial({map:texturebf});
balfalsmesh = new THREE.Mesh(balfalgeo, balfalmat);
balfalsmesh.position.set(-2300,0,700);
scene.add(balfalsmesh);
//----------------------------------
//WATER -ground
var watergeo = new THREE.BoxGeometry(2500,200,2000); //x,y,z
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
uujl4vbp56votjy/stargate_water_texture.jpg?dl=0");
var watermat = new THREE.MeshPhongMaterial({map:texture});
waterMesh= new THREE.Mesh(watergeo, watermat);
waterMesh.position.set(100,-300,1000);//100,-300,800
scene.add(waterMesh);
kulMesh.position.set(500,-1000,3000);
kulMesh.rotation.x =-90* Math.PI/180;
scene.add(kulMesh);
//-----------------------------------------
//TETO1
var eptetx=-1670;
var eptety=900;
var eptetz=0;
var eptetgeo = new THREE.CylinderGeometry (20, 20, 400,50,1,false,4,2*Math.PI);
//t,b,h
var eptetmat = new THREE.MeshPhongMaterial({color:0xffffcc,shading:
THREE.FlatShading});
//TETŐ JOBB
var eptet3x=3150;
var eptet3y=900;
var eptet3z=150;
var eptet3geo = new THREE.CylinderGeometry (20, 20,
400,50,1,false,4,2*Math.PI); //t,b,h
var eptet3mat = new THREE.MeshPhongMaterial({color:0xffffcc, shading:
THREE.FlatShading});
//TETŐ FENN
var eptet5x=-2000;
var eptet5y=1300;
var eptet5z=1300;
var eptet5geo = new THREE.CylinderGeometry (200, 200, 3500,50,1,false,4,2*Math.PI);
//t,b,h
THREE.ImageUtils.crossOrigin = '';
var texturetet =
THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/908ymzhre2w68dt/
floor7.jpg?dl=0");
var eptet5mat = new THREE.MeshPhongMaterial({map:texturetet, transparent:true,
opacity:1, shading: THREE.FlatShading});
texturetet.wrapS = THREE.RepeatWrapping;
texturetet.wrapT = THREE.RepeatWrapping;
texturetet.repeat.set(8, 4);
//-----------------------------------
//STAIRS
var stairsx=2400;
var stairsy=-800;
var stairsz=1300;
var stairsgeo = new THREE.BoxGeometry(100,50,1000); //w,h,d
var stairsmat = new THREE.MeshPhongMaterial({color:"red",shading:
THREE.FlatShading});
//stairs-ground
var sggeo = new THREE.BoxGeometry (2000,100,1000);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
oi1rccoikqytpai/floor3.jpg?dl=0");
var sgmat = new THREE.MeshPhongMaterial({map:texture});
sgmesh = new THREE.Mesh(sggeo, sgmat);
sgmesh.position.set(2200,-850,1300);
sgmesh.rotation.x = Math.PI/180;
scene.add(sgmesh);
//stairs-up csapóajtó
var supgeo = new THREE.BoxGeometry (1300,50,800);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
z5pdbkeii5bjrbq/door3.jpg?dl=0");
var supmat = new THREE.MeshPhongMaterial({map:texture});
//var supmat = new THREE.MeshPhongMaterial({color:"blue"});
supmesh = new THREE.Mesh(supgeo, supmat);
supmesh.position.set(2300,-140,1070);
supmesh.rotation.x = Math.PI/180;
scene.add(supmesh);
//wall
var wallGeometry = new THREE.BoxGeometry (500,1000,1000);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
oi1rccoikqytpai/floor3.jpg?dl=0");
var wallMaterial = new THREE.MeshPhongMaterial({map:texture});
wallMesh = new THREE.Mesh(wallGeometry, wallMaterial);
wallMesh.position.set(3200,-600,1000);
wallMesh.rotation.x =-90* Math.PI/180;
scene.add(wallMesh);
//wall2
var wall2Geometry = new THREE.BoxGeometry (300,1000,500);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
oi1rccoikqytpai/floor3.jpg?dl=0");
var wall2Material = new THREE.MeshPhongMaterial({map:texture});
wall2Mesh = new THREE.Mesh(wall2Geometry, wall2Material);
wall2Mesh.position.set(1500,-350,1000);
wall2Mesh.rotation.x =-90* Math.PI/180;
scene.add(wall2Mesh);
//----------------------------------
//HÁTSÓ FAL
var box1Geometry = new THREE.BoxGeometry( 1200, 720, 60 );
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
8td2sknyas7c3z6/image6.jpg?dl=0");
var box1Material = new THREE.MeshPhongMaterial({map:texture});
box1Mesh = new THREE.Mesh( box1Geometry, box1Material );
box1Mesh.position.set( 150, 450,0);
scene.add( box1Mesh );
//WALL LEFT
var box5Geometry = new THREE.BoxGeometry( 1500, 900, 60 );
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
4uhnwckybup8ynb/image_hatso_bal.jpg?dl=0");
var box5Material = new THREE.MeshPhongMaterial({map:texture});
box5Mesh = new THREE.Mesh( box5Geometry, box5Material );
box5Mesh.rotation.y = Math.PI/2;
box5Mesh.position.set( -1700, 350,600);
scene.add( box5Mesh );
//WALL LEFT2
var box6Geometry = new THREE.BoxGeometry( 1500, 900, 60 );
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
4uhnwckybup8ynb/image_hatso_bal.jpg?dl=0");
var box6Material = new THREE.MeshPhongMaterial({map:texture});
box6Mesh = new THREE.Mesh( box6Geometry, box6Material );
box6Mesh.rotation.y = Math.PI/2;
box6Mesh.position.set( -1700, 350,2100);
scene.add( box6Mesh );
//WALL RIGHT1
var wr1Geometry = new THREE.BoxGeometry( 1500, 900, 60 );
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
sxfxs6b0g3zplnp/oszlop_minta.jpg?dl=0");
var wr1Material = new THREE.MeshPhongMaterial({map:texture});
wr1Mesh = new THREE.Mesh( wr1Geometry, wr1Material );
wr1Mesh.rotation.y = Math.PI/2;
wr1Mesh.position.set( 3150, 350,600);
scene.add( wr1Mesh );
//WALL RIGHT2
var wr2Geometry = new THREE.BoxGeometry( 1500, 900, 60 );
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
w1hufj87ubqgecc/wall2.jpg?dl=0");
var wr2Material = new THREE.MeshPhongMaterial({map:texture});
wr2Mesh = new THREE.Mesh( wr2Geometry, wr2Material );
wr2Mesh.rotation.y = Math.PI/2;
wr2Mesh.position.set( 3150, 350,2100);
scene.add( wr2Mesh );
//-------------------------
//OSZLOP JOBB + clone
var cylGeometry = new THREE.CylinderGeometry(50, 50,
300,6,1,false,4,2*Math.PI); //top, bottom,h,
radseg,hseg,close,thetalength,thetastart
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
1omgrmlvu3te7qs/hierog1.jpg?dl=0");
var cylMaterial = new THREE.MeshPhongMaterial({map:texture,
shading: THREE.FlatShading});
cylMesh = new THREE.Mesh( cylGeometry, cylMaterial );
cylMesh.position.set( 770, 350,90);
scene.add( cylMesh );
//OSZLOP JOBB2
var cylrightMesh = cylMesh.clone();
cylrightMesh.position.set(1950,650,90);
scene.add(cylrightMesh);
//OSZLOP BAL
var cyl4Mesh = cylMesh.clone();
cyl4Mesh.position.set(-450,50,90);
scene.add(cyl4Mesh);
//------------------------
//FŐ OSZLOP
//jobb hatso
var fojobb1Geometry = new THREE.CylinderGeometry(100, 100,
300,30,1,false,4,2*Math.PI); //top, bottom,h,
radseg,hseg,close,thetalength,thetastart
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
dya7nkhnjsul4g7/oszlop_minta2.jpg?dl=0");
var fojobb1Material = new THREE.MeshPhongMaterial({map:texture,
shading: THREE.FlatShading});
fojobb1Mesh = new THREE.Mesh( fojobb1Geometry, fojobb1Material );
fojobb1Mesh.position.set( 2900, 150,390);
scene.add( fojobb1Mesh );
//jobb elol
var fjeMesh = fojobb1Mesh.clone();
fjeMesh.position.set(2900,150,1750);
scene.add(fjeMesh);
//bal hátsó
var bh1Mesh = fojobb1Mesh.clone();
bh1Mesh.position.set(-1300,150,390);
scene.add(bh1Mesh);
var bh2Mesh = fojobb1Mesh.clone();
bh2Mesh.position.set(-1300,450,390);
scene.add(bh2Mesh);
//bal elol
var be1Mesh = fojobb1Mesh.clone();
be1Mesh.position.set(-1300,150,1750);
scene.add(be1Mesh);
//------------------------
//RÉSZECSKE
var prgeometry2 = new THREE.SphereGeometry(100,80,80);
});
prmesh2.position.set(0,850,1300);
scene.add(prmesh2);
//-------------------------------------
//MUMMY
//also
var bodygeometry = new THREE.CylinderGeometry(90,50,150,4,1,false,0,6.3);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
vy55k9goaidd6uh/mummyhead.jpg?dl=0");
var bodymaterial = new THREE.MeshPhongMaterial({map:texture});
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(1,8);
//var bodymaterial = new THREE.MeshPhongMaterial({color:"orange", wireframe:
false});
bodymesh= new THREE.Mesh(bodygeometry,bodymaterial);
bodymesh.position.set(230,-10,1300);//230,-10,1300
bodymesh.scale.set( 0.8,3.2,1.3 );
bodymesh.rotation.z=Math.PI/2;
scene.add(bodymesh);
//felso
var body2geometry = new THREE.SphereGeometry(90,32,32,0,6.3,0,3.1);
//80,130,170,5,2
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
vy55k9goaidd6uh/mummyhead.jpg?dl=0");
//arm
var armmlgeo = new THREE.SphereGeometry(80,32,32,0,6.3,0,3.1);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
vy55k9goaidd6uh/mummyhead.jpg?dl=0");
var armmlmat = new THREE.MeshPhongMaterial({map:texture})
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(1,1);
armmlmesh= new THREE.Mesh(armmlgeo,armmlmat);
armmlmesh.position.set(-20,0,80); //20,0,80
armmlmesh.rotation.x=-0.3;
armmlmesh.scale.set( 0.5,1,0.3 );
body2mesh.add(armmlmesh);
//head
var body3geometry = new THREE.SphereGeometry(55,8,8);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
vy55k9goaidd6uh/mummyhead.jpg?dl=0");
//---------------------
//TOMB
//tomb1
var t1geo = new THREE.BoxGeometry (900,200,30)
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
surcdbo3m94o138/tomb2.jpg?dl=0");
var t1mat = new THREE.MeshPhongMaterial({map:texture});
t1Mesh= new THREE.Mesh(t1geo, t1mat);
t1Mesh.position.set(100,10,1500);
scene.add(t1Mesh);
//tomb2
var t2Mesh = t1Mesh.clone();
var t2mat = new THREE.MeshPhongMaterial({map:texture});
t2Mesh.position.set(100,10,1100);
scene.add(t2Mesh);
//tomb3 leftside
var t3geo = new THREE.BoxGeometry (400,200,30)
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
surcdbo3m94o138/tomb2.jpg?dl=0");
var t3mat = new THREE.MeshPhongMaterial({map:texture});
t3Mesh= new THREE.Mesh(t3geo, t3mat);
t3Mesh.rotation.y = Math.PI/2;
t3Mesh.position.set(-330,10,1300);
scene.add(t3Mesh);
//tomb4 rightside
var t4Mesh = t3Mesh.clone();
var t4mat = new THREE.MeshPhongMaterial({map:texture});
t4Mesh.position.set(530,10,1300);
scene.add(t4Mesh);
//tomb5 tető
var t5geo = new THREE.BoxGeometry (900,30,300)
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
kkdkmq9apwm60es/tomb.jpg?dl=0");
var t5mat = new THREE.MeshPhongMaterial({map:texture});
t5Mesh= new THREE.Mesh(t5geo, t5mat);
t5Mesh.position.set(150,160,1300); //165,130,1300
//t5Mesh.rotation.x = -2.2;
t5Mesh.rotation.y= 1.8; //eredeti: 2
scene.add(t5Mesh);
//fire tomb
var tfgeo = new THREE.BoxGeometry (900,50,500)
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
2mql8naovu9yxie/gold4.jpg?dl=0");
var tfmat = new THREE.MeshPhongMaterial({map:texture});
tfMesh= new THREE.Mesh(tfgeo, tfmat);
tfMesh.position.set(100,-100,1300);
scene.add(tfMesh);
//---------------------------------
//KÜLSÖ FÉNYFORRÁS
var kulsogeo = new THREE.SphereGeometry (100,20,20);
//var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
2mql8naovu9yxie/gold4.jpg?dl=0");
//var kulsomat = new THREE.MeshPhongMaterial({map:texture, shading:
THREE.FlatShading});
var kulsomat = new THREE.MeshPhongMaterial({color:"red", shading:
THREE.FlatShading});
kulsomesh = new THREE.Mesh(kulsogeo, kulsomat);
kulsomesh.position.set(-2100,200,2400);
scene.add(kulsomesh);
//--------------------------------
//ANUBIS
//felso
var afgeo = new THREE.CylinderGeometry(130,80,190,5,2); //80,130,170,5,2
var afmat = new THREE.MeshPhongMaterial({color:0x280b0b, wireframe: false});
//shading: THREE.FlatShading ki van véve!!!
afmesh= new THREE.Mesh(afgeo,afmat);
afmesh.position.set(-250,400,450); //0,180,0
afmesh.scale.set( 1,1,0.6 );
afmesh.rotation.set(0,-9,0); //7
scene.add(afmesh);
//head
var hgeo = new THREE.SphereGeometry(60,32,32,0,6.3,0,3.1); //80,130,170,5,2
var hmat = new THREE.MeshPhongMaterial({color:0x280b0b, shading: THREE.FlatShading,
wireframe: false});
hmesh= new THREE.Mesh(hgeo,hmat);
hmesh.position.set(0,130,-80); //0,180,0
hmesh.scale.set( 0.8,1,1.2 );
//af2mesh.rotation.set(0,-9,0); //7
afmesh.add(hmesh);
//fej mögötti
var fmgeo = new THREE.SphereGeometry(100,32,32,0,6.3,0,3.1); //80,130,170,5,2
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
2mql8naovu9yxie/gold4.jpg?dl=0");
var fmmat = new THREE.MeshPhongMaterial({map:texture, shading: THREE.FlatShading})
//var fmmat = new THREE.MeshPhongMaterial({color:"blue", shading:
THREE.FlatShading, wireframe: false});
fmmesh= new THREE.Mesh(fmgeo,fmmat);
fmmesh.position.set(0,90,-20); //0,180,0
fmmesh.scale.set( 0.95,1,1 );
afmesh.add(fmmesh);
//earleft
var elgeo = new THREE.ConeGeometry(20,100,60,5); //radius, height, segments
var elmat = new THREE.MeshPhongMaterial({color:0x280b0b, shading:
THREE.FlatShading, wireframe: false});
elmesh= new THREE.Mesh(elgeo,elmat);
elmesh.position.set(22,210,-65); //0,180,0
elmesh.scale.set( 1,1,1.2 );
afmesh.add(elmesh);
//ear right
var ermesh = elmesh.clone();
ermesh.position.set(-30,210,-65);
afmesh.add(ermesh);
//nose
var nogeo = new THREE.CylinderGeometry(10,25,120); //radiua, height, segments
var nomat = new THREE.MeshPhongMaterial({color:0x3c1010, shading:
THREE.FlatShading, wireframe: false});
nomesh= new THREE.Mesh(nogeo,nomat);
nomesh.position.set(0,130,-180); //0,180,0
nomesh.scale.set( 1,1,1.2 );
nomesh.rotateX (-Math.PI/2);
afmesh.add(nomesh);
//eye left
var eyelgeo = new THREE.SphereGeometry(40,32,32);
var eyelmat = new THREE.MeshPhongMaterial({color:"red", shading: THREE.FlatShading,
wireframe: false});
eyelmesh= new THREE.Mesh(eyelgeo,eyelmat);
eyelmesh.position.set(20,155,-105); //0,180,0
eyelmesh.scale.set( 0.5,0.2,0.8 );
eyelmesh.rotateZ (-5.6);
afmesh.add(eyelmesh);
//eye right
var eyermesh = eyelmesh.clone();
eyermesh.position.set(-20,155,-105);
eyermesh.rotateZ (7.8);
afmesh.add(eyermesh);
//alsó
var alsogeo = new THREE.CylinderGeometry(80,130,190,5,20); //80,130,170,5,2
var alsomat = new THREE.MeshPhongMaterial({color:"blue", shading:
THREE.FlatShading, wireframe: false});
alsomesh= new THREE.Mesh(alsogeo,alsomat);
alsomesh.position.set(0,-150,0); //0,180,0
alsomesh.scale.set( 1,1,1 );
alsomesh.rotateY (-8);//(-Math.PI/3);
afmesh.add(alsomesh);
//also2
var also2geo = new THREE.BoxGeometry(100,20,20); //80,130,170,5,2
also2mesh= new THREE.Mesh(alsogeo,alsomat);
also2mesh.position.set(0,-150,0); //0,180,0
also2mesh.scale.set( 1,1,1 );
also2mesh.rotation.set(0,-9,0); //7
afmesh.add(also2mesh);
//-------------------------------
//klónozandó gömb
var klongeo= new THREE.SphereGeometry(50,32,32,0,6.3,0,3.1); //80,130,170,5,2
var klonmat = new THREE.MeshPhongMaterial({color:0x280b0b, shading:
THREE.FlatShading, wireframe: false});
klonmesh= new THREE.Mesh(klongeo,klonmat);
klonmesh.position.set(-250,400,445);
scene.add(klonmesh);
//left leg
var leglmesh = klonmesh.clone();
leglmesh.rotateX(Math.PI/0.93);
leglmesh.scale.set(0.8,2,0.5); //
leglmesh.position.set(-290,160,420);
scene.add(leglmesh);
//pajzs
var pajzsgeo = new THREE.CylinderGeometry(120,30,30,12); //t,b,h
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
thmeh8ntbz1srub/pajzs.jpg?dl=0");
var pajzsmat = new THREE.MeshLambertMaterial({map:texture, shading:
THREE.FlatShading});
//var pajzsmat = new THREE.MeshPhongMaterial({color:"blue", shading:
THREE.FlatShading, wireframe: false});
pajzsmesh= new THREE.Mesh(pajzsgeo,pajzsmat);
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(1, 5);
pajzsmesh.position.set(10,-60,100); //-100,-40,-340
//pajzsmesh.scale.set( 1,1,0.8);
//pajzsmesh.rotation.set(1.1,1.7,0.9); //0,0,1.1
pajzsmesh.rotateX(Math.PI/2);
pajzsmesh.rotateZ(Math.PI/1.5);
kotes2mesh.add(pajzsmesh);
//--------------------------------------------
//SWORD
var swordgeo = new THREE.CylinderGeometry(4,12,700,32); //t,b,h,seg
var swordmat = new THREE.MeshPhongMaterial({color:"red", shading:
THREE.FlatShading, wireframe: false});
swordmesh= new THREE.Mesh(swordgeo,swordmat);
swordmesh.position.set(52,130,0); //-100,-40,-340
swordmesh.scale.set( 1,1,0.8);
swordmesh.rotation.set(1.1,1.7,0.9); //0,0,1.1
//swordmesh.rotateX(-Math.PI/2);
kotesmesh.add(swordmesh);
//----------------------------------------------
//OBELISZK
//OBELISZK loop
var obx=-1900;
var oby=0;
var obz=5000;
var obgeo = new THREE.BoxGeometry (500,6000,500);
THREE.ImageUtils.crossOrigin = '';
var texture = THREE.ImageUtils.loadTexture("https://dl.dropboxusercontent.com/s/
ulypfgsvoj9ubad/alja1.jpg?dl=0");
var obmat = new THREE.MeshPhongMaterial({map:texture, shading:
THREE.FlatShading});
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(1, 20);//4,64
obmesh = new THREE.Mesh(obgeo, obmat);
//-----------------------------------------------
//ELÜLSŐ FAL
var efx=-1720;
var efy=500;
var efz=2900;
var efgeo = new THREE.CylinderGeometry (20, 20, 1200,50,1,false,4,2*Math.PI);
//t,b,h
var efmat = new THREE.MeshPhongMaterial({color:0xffffcc,shading:
THREE.FlatShading});
//STAIRS KINTI
//STAIRS
var stairs2x=800;
var stairs2y=-100;
var stairs2z=3000;
var stairs2geo = new THREE.BoxGeometry(5000,50,200); //w,h,d
var stairs2mat = new THREE.MeshPhongMaterial({color:"red",shading:
THREE.FlatShading});
render();
}
var step1=0;
var step2=0;
var step3=0;
var step4=0;
var step5=0;
var step6=0;
var step7=0;
//részecske mozgás
prmesh2.rotation.y +=0.01;
vertices = prmesh2.geometry.vertices; //ezel mozog a tengely körül a prmesh2
vertices.forEach(function (v) {
v.y -= v.vy*Math.random()*200;
});
//anubisz felső
step1 += 0.05//felső test
afmesh.rotation.z = 0.09 + ( 0.1* (Math.sin(step1))); //0.27,0.1
afmesh.rotation.x = 0+ ( 0.1* (Math.sin(step1)));
//mummy move
step2 += 0.05//felso
body2mesh.rotation.z = 8.5 + ( 0.5 * (Math.sin(step2))); //20a kezdfelo,
10mennyit mozogjon z tengelyen //MEGHAJLÁS 50 ÉS 0.75 //20 és 0.6 az ereseti
step2 += 0.05;//also
// bodymesh.position.x = 230 + ( 20 * (Math.sin(step2)));
bodymesh.rotation.z = 1.8 + ( 0.15 * (Math.sin(step2)));
// bodymesh.position.y = 100 + ( 1 * Math.abs(Math.cos(step2)));
//sír mozgás
step6 += 0.05;
t5Mesh.position.z = 1300 + ( 20 * (Math.sin(step6)));
t5Mesh.position.x = 140 + ( 40 * Math.abs(Math.cos(step6))); //eredeti:160,40
t5Mesh.rotation.x= 6.25 + ( 0.2 * (Math.sin(step6))) //6.3, 0.2
step6+= 0.05;
t1Mesh.position.z = 1500 + ( 20 * (Math.sin(step6)));
t1Mesh.position.x = 100 + ( 10 * Math.abs(Math.cos(step6)));
//4 ferde
step7 +=0.09;
disz4mesh.position.z = 1900 + ( 10 * (Math.sin(step7)));
disz4mesh.position.x = 500 + ( 80* Math.abs(Math.cos(step7)));
//csapóajtó move
step4 += 0.01//felso
supmesh.position.x = 2700 + ( 400 * (Math.sin(step4)));
supmesh.position.y = -140 + ( 1 * Math.abs(Math.cos(step4)));
renderer.render(scene,camera);
};
</script>
</body>
</html>