diff --git a/index.html b/index.html index 85adfcb..a8f3298 100644 --- a/index.html +++ b/index.html @@ -57,7 +57,7 @@

- + @@ -113,5 +113,32 @@

+ + diff --git a/script.js b/script.js index f122628..9146675 100644 --- a/script.js +++ b/script.js @@ -174,6 +174,23 @@ class World extends Animation { } } +// creating the fucntion for handling the panaromic camera angle +class PanoramicCamera { + constructor(scene, renderer) { + this.scene = scene; + this.renderer = renderer; + + // Create a cube camera to capture the panoramic view + this.cubeCamera = new THREE.CubeCamera(0.1, 10000, 512); + this.scene.add(this.cubeCamera); + } + + // Update the panoramic view + update() { + this.cubeCamera.update(this.renderer, this.scene); + } +} + function RoundedBoxGeometry( size, radius, radiusSegments ) {