Skip to content
Snippets Groups Projects
Commit f2be2d98 authored by hngmo.kim's avatar hngmo.kim
Browse files
parents 3fcc15d0 0f7ca723
No related branches found
No related tags found
No related merge requests found
const function_0 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.z = 10; // (0,0,z)에서 (0,0,0)을 보고있는 것
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas0});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
renderer2.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
light2.position.set( 0, 0, 0 );
scene2.add( light2 );
const planeGeometry2 = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial2 = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane2 = new THREE.Mesh( planeGeometry2, planeMaterial2 );
plane2.position.z = -30;
scene2.add( plane2 );
renderer2.render( scene2, camera2 );
}
function_0();
\ No newline at end of file
const function_1 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.z = 10; // (0,0,z)에서 (0,0,0)을 보고있는 것
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas1});
renderer2.setSize( h_scr2, v_scr2 );
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
light2.position.set( 0, 0, 0 );
scene2.add( light2 );
const sphereGeometry = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.position.set(0,8,0);
scene2.add( sphere );
const sphereGeometry2 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial2 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere2 = new THREE.Mesh( sphereGeometry2, sphereMaterial2 );
sphere2.position.set(-8,8,0);
scene2.add( sphere2 );
const sphereGeometry3 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial3 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere3 = new THREE.Mesh( sphereGeometry3, sphereMaterial3 );
sphere3.position.set(-8,0,0);
scene2.add( sphere3 );
const sphereGeometry4 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial4 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere4 = new THREE.Mesh( sphereGeometry4, sphereMaterial4 );
sphere4.position.set(-8,-8,0);
scene2.add( sphere4 );
const sphereGeometry5 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial5 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere5 = new THREE.Mesh( sphereGeometry5, sphereMaterial5 );
sphere5.position.set(0,-8,0);
scene2.add( sphere5 );
const sphereGeometry6 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial6 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere6 = new THREE.Mesh( sphereGeometry6, sphereMaterial6 );
sphere6.position.set(8,-8,0);
scene2.add( sphere6 );
const sphereGeometry7 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial7 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere7 = new THREE.Mesh( sphereGeometry7, sphereMaterial7 );
sphere7.position.set(8,0,0);
scene2.add( sphere7 );
const sphereGeometry8 = new THREE.SphereGeometry( 2, 32, 32 );
const sphereMaterial8 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere8 = new THREE.Mesh( sphereGeometry8, sphereMaterial8 );
sphere8.position.set(8,8,0);
scene2.add( sphere8 );
const planeGeometry2 = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial2 = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane2 = new THREE.Mesh( planeGeometry2, planeMaterial2 );
plane2.position.z = -30;
scene2.add( plane2 );
renderer2.render( scene2, camera2 );
}
function_1();
\ No newline at end of file
const function0 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
//light2.autoUpdate = false;
scene2.add( light2 );
//Set up shadow properties for the light
//light2.shadow.mapSize.width = 128; // default
//light2.shadow.mapSize.height = 128; // default
//light2.shadow.camera.near = 0.5; // default
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
//Create a helper for the shadow camera (optional)
const helper = new THREE.CameraHelper( light2.shadow.camera );
scene2.add( helper );
var x = -12;
var x_trans = 0;
const animate = function () {
requestAnimationFrame( animate );
if(x>=12)
{
x_trans = -0.1;
}
else if(x<=-12)
{
x_trans = +0.1;
}
x += x_trans;
light2.position.set( x, 10, 0 );
renderer2.render( scene2, camera2 );
};
animate();
}
function0();
\ No newline at end of file
const function1 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas2});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
light2.position.set(0,5,0);
//light2.autoUpdate = false;
scene2.add( light2 );
//Set up shadow properties for the light
//light2.shadow.mapSize.width = 128; // default
//light2.shadow.mapSize.height = 128; // default
//light2.shadow.camera.near = 0.5; // default
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
var x = -12;
var x_trans = 0;
const animate = function () {
requestAnimationFrame( animate );
if(light2.position.y <= 10)
{
light2.position.y += 0.01;
}
else
{
light2.position.y = 5;
}
renderer2.render( scene2, camera2 );
};
animate();
}
function1();
\ No newline at end of file
const function4 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas4});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
//light2.autoUpdate = false;
scene2.add( light2 );
//Set up shadow properties for the light
//light2.shadow.mapSize.width = 128; // default
//light2.shadow.mapSize.height = 128; // default
light2.shadow.camera.near = 20;
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
//Create a helper for the shadow camera (optional)
const helper = new THREE.CameraHelper( light2.shadow.camera );
scene2.add( helper );
var x = -12;
var x_trans = 0;
const animate = function () {
requestAnimationFrame( animate );
if(x>=12)
{
x_trans = -0.1;
}
else if(x<=-12)
{
x_trans = +0.1;
}
x += x_trans;
light2.position.set( x, 10, 0 );
renderer2.render( scene2, camera2 );
};
animate();
}
function4();
\ No newline at end of file
const function5 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas5});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
scene2.add( light2 );
//Set up shadow properties for the light
light2.shadow.mapSize.width = 128; // default
light2.shadow.mapSize.height = 128; // default
//light2.shadow.camera.near = 0.5; // default
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
var x = -12;
light2.position.set( x, 10, 0 );
renderer2.render( scene2, camera2 );
}
function5();
\ No newline at end of file
const function6 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas6});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
scene2.add( light2 );
//Set up shadow properties for the light
light2.shadow.mapSize.width = 1024; // default
light2.shadow.mapSize.height = 1024; // default
//light2.shadow.camera.near = 0.5; // default
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
var x = -12;
light2.position.set( x, 10, 0 );
renderer2.render( scene2, camera2 );
}
function6();
\ No newline at end of file
const function7 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas7});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
scene2.add( light2 );
//Set up shadow properties for the light
light2.shadow.mapSize.width = 1024; // default
light2.shadow.mapSize.height = 1024; // default
light2.shadow.radius = 20;
//light2.shadow.camera.near = 0.5; // default
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
var x = -12;
light2.position.set( x, 10, 0 );
renderer2.render( scene2, camera2 );
}
function7();
\ No newline at end of file
const function8 = function(){
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.y = 15;
camera2.lookAt(0,0,0);
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas8});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
scene2.add( light2 );
//Set up shadow properties for the light
light2.shadow.mapSize.width = 1024; // default
light2.shadow.mapSize.height = 1024; // default
light2.shadow.radius = 100;
//light2.shadow.camera.near = 0.5; // default
//light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial = new THREE.MeshPhongMaterial( {
color: 0xff0000, shininess : 90.0 });
const sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene2.add( sphere );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
plane.rotation.x = -1.57;
plane.position.set(0,-5,0);
scene2.add( plane );
var x = -12;
light2.position.set( x, 10, 0 );
renderer2.render( scene2, camera2 );
}
function8();
\ No newline at end of file
const function1 = function(){
//그림자옵션이 꺼질 때의 점광원 테스트
//그 테스트는 구에서 시행할 것
//그림자로 인해 도형이 어두워지는 것과 그냥 빛을 받지않아 도형이 어두워진 것을 표현하는 것과의 차이를 분석할 것.
//그렇게 점광원과 점광원 그림자에 대한 테스트를 진행한 후 점광원 그림자 관련 함수들을 사용해보면서 변화를 설명할 것.
//변수명의 뒤에는 종류와 무관하게 파일 번호를 입력할 것.
const h_scr2 = window.innerWidth;
const v_scr2 = window.innerHeight;
//const h_scr = 800;
//const v_scr = 750;
const scene2 = new THREE.Scene();
const camera2 = new THREE.PerspectiveCamera(120, h_scr2/v_scr2, 0.1, 1000);
camera2.position.z = 10; // (0,0,z)에서 (0,0,0)을 보고있는 것
camera2.position.x = 30;
//Create a WebGLRenderer and turn on shadows in the renderer
const renderer2 = new THREE.WebGLRenderer({canvas: HelloCanvas2});
renderer2.setSize( h_scr2, v_scr2 );
renderer2.shadowMap.enabled = true;
renderer2.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap
//Create a PointLight and turn on shadows for the light
const light2 = new THREE.PointLight( 0xffffff, 1, 100 );
//const light2 = new THREE.DirectionalLight( 0xffffff, 1);
light2.position.set( 0, 0, 0 );
//light2.position.set( 0, 0, 1 );
//directioanl은 항상 위에서 온다.
//light2.rotaion.x = 90;
light2.castShadow = true; // default false
scene2.add( light2 );
//Set up shadow properties for the light
light2.shadow.mapSize.width = 512; // default
light2.shadow.mapSize.height = 512; // default
light2.shadow.camera.near = 0.5; // default
light2.shadow.camera.far = 500; // default
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry2 = new THREE.SphereGeometry( 1, 32, 32 );
const sphereMaterial2 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere2 = new THREE.Mesh( sphereGeometry2, sphereMaterial2 );
sphere2.castShadow = true; //default is false
sphere2.receiveShadow = true; //default
sphere2.position.z = -5
//sphere2.position.z = -5
scene2.add( sphere2 );
//Create a sphere that cast shadows (but does not receive them)
const sphereGeometry2_1 = new THREE.SphereGeometry( 5, 32, 32 );
const sphereMaterial2_1 = new THREE.MeshPhongMaterial( {
color: 0xffff00, shininess : 90.0 });
const sphere2_1 = new THREE.Mesh( sphereGeometry2_1, sphereMaterial2_1 );
sphere2_1.castShadow = true; //default is false
sphere2_1.receiveShadow = true; //default
sphere2_1.position.z = -15
//sphere2_1.position.z = -15
scene2.add( sphere2_1 );
//Create a plane that receives shadows (but does not cast them)
const planeGeometry2 = new THREE.PlaneGeometry( 60, 60, 32, 32 );
const planeMaterial2 = new THREE.MeshStandardMaterial( { color: 0xffffff } )
const plane2 = new THREE.Mesh( planeGeometry2, planeMaterial2 );
plane2.receiveShadow = true;
plane2.position.z = -30;
scene2.add( plane2 );
//Create a helper for the shadow camera (optional)
const helper2 = new THREE.CameraHelper( light2.shadow.camera );
scene2.add( helper2 );
var x2 = -8;
var z2 = 0;
var x_trans2 = 0;
const animate2 = function () {
requestAnimationFrame( animate2 );
/*
if(x2>=8)
{
x_trans2 = -0.1;
}
else if(x2<=-8)
{
x_trans2 = +0.1;
}
x2 += x_trans2;
light2.position.set( x, 0, 0 );
plane2.position.z = -30;
*/
plane2.position.z -= 0.05;
renderer2.render( scene2, camera2 );
};
//animate2();
renderer2.render( scene2, camera2 );
}
function1();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment