Skip to content

Commit 020f4f1

Browse files
committed
Fix: didn't chchange the js files
1 parent 1951ab2 commit 020f4f1

5 files changed

Lines changed: 16 additions & 17 deletions

File tree

src/pages/home/.ipynb_checkpoints/Home-checkpoint.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,19 @@ export default function Home() {
4343
</div>
4444
</header>
4545
<section className="relative w-full h-screen">
46-
<div
47-
className="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90vw] z-50"
48-
style={{
49-
maxHeight: isVisible ? "100vh" : "0",
50-
overflow: "hidden",
51-
transition: "max-height 0.3s ease",
52-
}}
53-
>
46+
<div
47+
className="absolute top-1/2 left-1/2 w-[90vw] z-50"
48+
style={{
49+
maxHeight: isVisible ? "100vh" : "0",
50+
overflow: "hidden",
51+
transition: "max-height 0.3s ease",
52+
transform: "translate(calc(-50% - 40px), -50%)",
53+
}}
54+
>
5455
<LevelComponent
5556
key={mountKey}
5657
onClose={() => handleClose()}
57-
selectedLevel={getLevelRef.current ? getLevelRef.current() : 0}
58+
selectedLevel={getLevelRef.current ? getLevelRef.current() : 1}
5859
/>
5960
</div>
6061
<canvas ref={canvasRef} className={styles.solarsystem}></canvas>

src/pages/home/js/.ipynb_checkpoints/camera-checkpoint.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function setupParallax( canvas ) {
3939

4040
}
4141

42-
export function setupFocus( canvas, camera, planets, basePosition, onPlanetClick ) {
42+
export function setupFocus( canvas, camera, planets, basePosition ) {
4343

4444
const focus = {
4545
raycaster: new THREE.Raycaster(),
@@ -66,7 +66,6 @@ export function setupFocus( canvas, camera, planets, basePosition, onPlanetClick
6666
focus.paused = true;
6767
focus.tweening = true;
6868
focus.popupFired = false;
69-
onPlanetClick()
7069
}
7170
else {
7271
zoomOut();

src/pages/home/js/.ipynb_checkpoints/main-checkpoint.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createScene } from "./scene.js";
66
const ZOOM_DIST = 5;
77
const TWEEN_SPEED = 0.07;
88

9-
export function main( canvas, onPlanetClick, onPlanetFocus ) {
9+
export function main( canvas, onPlanetFocus ) {
1010

1111
// --- Initialisation ---
1212

@@ -18,7 +18,7 @@ export function main( canvas, onPlanetClick, onPlanetFocus ) {
1818

1919
const { targetOffset, currentOffset } = setupParallax( canvas );
2020

21-
const { focus, zoomOut } = setupFocus( canvas, camera, planets, basePosition, onPlanetClick );
21+
const { focus, zoomOut } = setupFocus( canvas, camera, planets, basePosition );
2222

2323
const currentLookAt = new THREE.Vector3(0, 0, 0);
2424
const origin = new THREE.Vector3(0, 0, 0);

src/pages/home/js/camera.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function setupParallax( canvas ) {
3939

4040
}
4141

42-
export function setupFocus( canvas, camera, planets, basePosition, onPlanetClick ) {
42+
export function setupFocus( canvas, camera, planets, basePosition ) {
4343

4444
const focus = {
4545
raycaster: new THREE.Raycaster(),
@@ -66,7 +66,6 @@ export function setupFocus( canvas, camera, planets, basePosition, onPlanetClick
6666
focus.paused = true;
6767
focus.tweening = true;
6868
focus.popupFired = false;
69-
onPlanetClick()
7069
}
7170
else {
7271
zoomOut();

src/pages/home/js/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createScene } from "./scene.js";
66
const ZOOM_DIST = 5;
77
const TWEEN_SPEED = 0.07;
88

9-
export function main( canvas, onPlanetClick, onPlanetFocus ) {
9+
export function main( canvas, onPlanetFocus ) {
1010

1111
// --- Initialisation ---
1212

@@ -18,7 +18,7 @@ export function main( canvas, onPlanetClick, onPlanetFocus ) {
1818

1919
const { targetOffset, currentOffset } = setupParallax( canvas );
2020

21-
const { focus, zoomOut } = setupFocus( canvas, camera, planets, basePosition, onPlanetClick );
21+
const { focus, zoomOut } = setupFocus( canvas, camera, planets, basePosition );
2222

2323
const currentLookAt = new THREE.Vector3(0, 0, 0);
2424
const origin = new THREE.Vector3(0, 0, 0);

0 commit comments

Comments
 (0)