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
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
*.jpg
|
10
main.js
10
main.js
@ -2,7 +2,7 @@
|
|||||||
Author: Daniel Jones
|
Author: Daniel Jones
|
||||||
IDE: VSCodium
|
IDE: VSCodium
|
||||||
Browsers tested: Firefox 124
|
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
|
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.setPixelRatio(window.devicePixelRatio);
|
||||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
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);
|
renderer.render(scene, camera);
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ const floorMaterial = new THREE.MeshStandardMaterial({
|
|||||||
map: floorTexture,
|
map: floorTexture,
|
||||||
})
|
})
|
||||||
const floor = new THREE.Mesh(floorGeometry, floorMaterial);
|
const floor = new THREE.Mesh(floorGeometry, floorMaterial);
|
||||||
floor.rotateX(200);
|
floor.rotateX(Math.PI * -0.5);
|
||||||
scene.add(floor);
|
scene.add(floor);
|
||||||
|
|
||||||
|
|
||||||
@ -67,6 +69,6 @@ scene.add(floor);
|
|||||||
function animate(){
|
function animate(){
|
||||||
requestAnimationFrame(animate);
|
requestAnimationFrame(animate);
|
||||||
|
|
||||||
renderer.render(scene, camera)
|
renderer.render(scene, camera);
|
||||||
}
|
}
|
||||||
animate();
|
animate();
|
||||||
|
Loading…
Reference in New Issue
Block a user