on stats-world: adjust some lighting and position, and add an attempt at a screen-capture

This commit is contained in:
2023-05-18 18:04:10 -06:00
parent f7a149444a
commit f039f98b61
6 changed files with 102 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ class World {
this.lights = [];
this.bushes = [];
// Initializae Loop
// Initialize Loop
this.loop = new Loop(this.camera, this.scene, this.renderer);
container.append(this.renderer.domElement);

View File

@@ -5,7 +5,7 @@ function createCamera() {
35, // fov = Field Of View
1, // aspect ratio (dummy value)
0.1, // near clipping plane
300 // far clipping plane
350 // far clipping plane
);
// move the camera back so we can view the scene

View File

@@ -3,7 +3,7 @@ import { DirectionalLight, DirectionalLightHelper } from "three";
function createLights(color) {
const light = new DirectionalLight(color, 4);
const lightHelper = new DirectionalLightHelper(light, 0);
light.position.set(60, 60, 30);
light.position.set(60, 100, 30);
// eslint-disable-next-line @typescript-eslint/no-empty-function
light.tick = () => {};

View File

@@ -26,6 +26,8 @@ function createControls(camera, canvas) {
controls.enableDamping = true;
//controls.enableZoom = false;
controls.maxDistance = 250;
//controls.enablePan = false;
controls.tick = () => controls.update();