set camera to -500
This commit is contained in:
parent
683c209c94
commit
0c5fdf623f
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,3 +22,4 @@ dist-ssr
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
*.jpg
|
12
main.js
12
main.js
@ -2,7 +2,7 @@
|
||||
Author: Daniel Jones
|
||||
IDE: VSCodium
|
||||
Browsers tested: Firefox 124
|
||||
Last change: 04/08/24
|
||||
Last change: 04/10/24
|
||||
purpose: portfolio website to show to potential freelance customers/web developer positions
|
||||
*/
|
||||
|
||||
@ -27,7 +27,9 @@ const renderer = new THREE.WebGLRenderer({
|
||||
|
||||
renderer.setPixelRatio(window.devicePixelRatio);
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
camera.position.setZ(30);
|
||||
var zPos = 500;
|
||||
camera.position.setZ(zPos);
|
||||
camera.position.setY(20);
|
||||
|
||||
renderer.render(scene, camera);
|
||||
|
||||
@ -59,14 +61,14 @@ const floorMaterial = new THREE.MeshStandardMaterial({
|
||||
map: floorTexture,
|
||||
})
|
||||
const floor = new THREE.Mesh(floorGeometry, floorMaterial);
|
||||
floor.rotateX(200);
|
||||
floor.rotateX(Math.PI * -0.5);
|
||||
scene.add(floor);
|
||||
|
||||
|
||||
|
||||
function animate(){
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
renderer.render(scene, camera)
|
||||
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
animate();
|
||||
|
Loading…
Reference in New Issue
Block a user