Skip to content

Commit 759fa6b

Browse files
author
Parsa Azari
committed
fixed the terminal
1 parent c64df99 commit 759fa6b

File tree

3 files changed

+148
-10
lines changed

3 files changed

+148
-10
lines changed

dist/index.html

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,63 @@
150150
opacity: 0;
151151
transition: opacity 0.3s ease;
152152
}
153+
154+
/* Terminal specific styles */
155+
#dev-terminal-overlay {
156+
contain: layout style;
157+
isolation: isolate;
158+
}
159+
160+
#dev-terminal-body {
161+
scrollbar-width: thin;
162+
scrollbar-color: #33ff33 #111;
163+
}
164+
165+
#dev-terminal-body::-webkit-scrollbar {
166+
width: 8px;
167+
}
168+
169+
#dev-terminal-body::-webkit-scrollbar-track {
170+
background: #111;
171+
}
172+
173+
#dev-terminal-body::-webkit-scrollbar-thumb {
174+
background: #33ff33;
175+
border-radius: 4px;
176+
}
177+
178+
#dev-terminal-body::-webkit-scrollbar-thumb:hover {
179+
background: #44ffaa;
180+
}
181+
182+
.terminal-output, .terminal-command, .terminal-error {
183+
margin: 0;
184+
padding: 2px 0;
185+
word-wrap: break-word;
186+
white-space: pre-wrap;
187+
overflow-wrap: break-word;
188+
max-width: 100%;
189+
}
190+
191+
.terminal-error {
192+
color: #ff6666;
193+
}
194+
195+
.terminal-command {
196+
color: #cccccc;
197+
}
198+
199+
.dev-terminal-cursor {
200+
background: #33ff33;
201+
animation: blink 1s infinite;
202+
}
203+
204+
@keyframes blink {
205+
0%, 50% { opacity: 1; }
206+
51%, 100% { opacity: 0; }
207+
}
153208
</style>
154-
<script type="module" crossorigin src="/3D-Portfolio/assets/index-Drl2nJco.js"></script>
209+
<script type="module" crossorigin src="/3D-Portfolio/assets/index-kPd96QhG.js"></script>
155210
<link rel="stylesheet" crossorigin href="/3D-Portfolio/assets/index-CE_aFpHU.css">
156211
</head>
157212

@@ -202,5 +257,19 @@
202257
</div>
203258
</div>
204259

260+
<!-- Dev Terminal Overlay (hidden by default) -->
261+
<div id="dev-terminal-overlay" style="display:none; position:fixed; left:5vw; top:15vh; width:700px; height:400px; background:#000; color:#33ff33; border:2px solid #33ff33; border-radius:4px; z-index:10000; font-family: 'JetBrains Mono', monospace; box-shadow: 0 4px 20px rgba(0,0,0,0.8); overflow:hidden;">
262+
<div id="dev-terminal-header" style="background:#333; color:#33ff33; padding:5px 10px; border-bottom:1px solid #33ff33; display:flex; justify-content:space-between; align-items:center; cursor:move; height:30px; flex-shrink:0;">
263+
<div id="dev-terminal-title" style="font-weight:bold; font-size:12px;">TERMINAL</div>
264+
<div id="dev-terminal-controls" style="display:flex; gap:5px;">
265+
<div class="terminal-btn terminal-minimize" style="width:12px; height:12px; background:#ffcc00; border-radius:50%; cursor:pointer;"></div>
266+
<div class="terminal-btn terminal-maximize" style="width:12px; height:12px; background:#00ff00; border-radius:50%; cursor:pointer;"></div>
267+
<div class="terminal-btn terminal-close" id="dev-terminal-close" style="width:12px; height:12px; background:#ff0000; border-radius:50%; cursor:pointer;"></div>
268+
</div>
269+
</div>
270+
<div id="dev-terminal-body" style="height:calc(100% - 80px); overflow-y:auto; overflow-x:hidden; padding:10px; font-size:13px; line-height:1.3; word-wrap:break-word; white-space:pre-wrap; box-sizing:border-box; scroll-behavior:smooth;"></div>
271+
<div id="dev-terminal-prompt" style="padding:8px 10px; border-top:1px solid #33ff33; display:flex; align-items:center; height:40px; flex-shrink:0; box-sizing:border-box; overflow:hidden;"></div>
272+
</div>
273+
205274
</body>
206275
</html>

index.html

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,61 @@
150150
opacity: 0;
151151
transition: opacity 0.3s ease;
152152
}
153+
154+
/* Terminal specific styles */
155+
#dev-terminal-overlay {
156+
contain: layout style;
157+
isolation: isolate;
158+
}
159+
160+
#dev-terminal-body {
161+
scrollbar-width: thin;
162+
scrollbar-color: #33ff33 #111;
163+
}
164+
165+
#dev-terminal-body::-webkit-scrollbar {
166+
width: 8px;
167+
}
168+
169+
#dev-terminal-body::-webkit-scrollbar-track {
170+
background: #111;
171+
}
172+
173+
#dev-terminal-body::-webkit-scrollbar-thumb {
174+
background: #33ff33;
175+
border-radius: 4px;
176+
}
177+
178+
#dev-terminal-body::-webkit-scrollbar-thumb:hover {
179+
background: #44ffaa;
180+
}
181+
182+
.terminal-output, .terminal-command, .terminal-error {
183+
margin: 0;
184+
padding: 2px 0;
185+
word-wrap: break-word;
186+
white-space: pre-wrap;
187+
overflow-wrap: break-word;
188+
max-width: 100%;
189+
}
190+
191+
.terminal-error {
192+
color: #ff6666;
193+
}
194+
195+
.terminal-command {
196+
color: #cccccc;
197+
}
198+
199+
.dev-terminal-cursor {
200+
background: #33ff33;
201+
animation: blink 1s infinite;
202+
}
203+
204+
@keyframes blink {
205+
0%, 50% { opacity: 1; }
206+
51%, 100% { opacity: 0; }
207+
}
153208
</style>
154209
</head>
155210

@@ -200,6 +255,20 @@
200255
</div>
201256
</div>
202257

258+
<!-- Dev Terminal Overlay (hidden by default) -->
259+
<div id="dev-terminal-overlay" style="display:none; position:fixed; left:5vw; top:15vh; width:700px; height:400px; background:#000; color:#33ff33; border:2px solid #33ff33; border-radius:4px; z-index:10000; font-family: 'JetBrains Mono', monospace; box-shadow: 0 4px 20px rgba(0,0,0,0.8); overflow:hidden;">
260+
<div id="dev-terminal-header" style="background:#333; color:#33ff33; padding:5px 10px; border-bottom:1px solid #33ff33; display:flex; justify-content:space-between; align-items:center; cursor:move; height:30px; flex-shrink:0;">
261+
<div id="dev-terminal-title" style="font-weight:bold; font-size:12px;">TERMINAL</div>
262+
<div id="dev-terminal-controls" style="display:flex; gap:5px;">
263+
<div class="terminal-btn terminal-minimize" style="width:12px; height:12px; background:#ffcc00; border-radius:50%; cursor:pointer;"></div>
264+
<div class="terminal-btn terminal-maximize" style="width:12px; height:12px; background:#00ff00; border-radius:50%; cursor:pointer;"></div>
265+
<div class="terminal-btn terminal-close" id="dev-terminal-close" style="width:12px; height:12px; background:#ff0000; border-radius:50%; cursor:pointer;"></div>
266+
</div>
267+
</div>
268+
<div id="dev-terminal-body" style="height:calc(100% - 80px); overflow-y:auto; overflow-x:hidden; padding:10px; font-size:13px; line-height:1.3; word-wrap:break-word; white-space:pre-wrap; box-sizing:border-box; scroll-behavior:smooth;"></div>
269+
<div id="dev-terminal-prompt" style="padding:8px 10px; border-top:1px solid #33ff33; display:flex; align-items:center; height:40px; flex-shrink:0; box-sizing:border-box; overflow:hidden;"></div>
270+
</div>
271+
203272
<script type="module" src="./src/main.js"></script>
204273
</body>
205274
</html>

src/core/rendering/environments/SeveranceEnvironment.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3518,12 +3518,12 @@ export class SeveranceEnvironment extends BaseEnvironment {
35183518
return nodeGroup;
35193519
};
35203520

3521-
// Create nodes
3521+
// Create nodes - moved farther from terminal to avoid interference
35223522
const nodes = [
3523-
{ type: 'biome', position: new THREE.Vector3(center.x - size.x * 0.3, center.y + 1.2, center.z - size.z * 0.2) },
3524-
{ type: 'toys', position: new THREE.Vector3(center.x + size.x * 0.3, center.y + 1.2, center.z - size.z * 0.2) },
3525-
{ type: 'personal', position: new THREE.Vector3(center.x - size.x * 0.3, center.y + 1.2, center.z + size.z * 0.2) },
3526-
{ type: 'german_art', position: new THREE.Vector3(center.x + size.x * 0.3, center.y + 1.2, center.z + size.z * 0.2) }
3523+
{ type: 'biome', position: new THREE.Vector3(center.x + size.x * 0.3, center.y + 1.2, center.z - size.z * 0.3) },
3524+
{ type: 'toys', position: new THREE.Vector3(center.x + size.x * 0.3, center.y + 1.2, center.z + size.z * 0.3) },
3525+
{ type: 'personal', position: new THREE.Vector3(center.x + size.x * 0.1, center.y + 1.2, center.z - size.z * 0.4) },
3526+
{ type: 'german_art', position: new THREE.Vector3(center.x + size.x * 0.1, center.y + 1.2, center.z + size.z * 0.4) }
35273527
];
35283528

35293529
// Create nodes with async support
@@ -3881,17 +3881,17 @@ export class SeveranceEnvironment extends BaseEnvironment {
38813881
new THREE.PlaneGeometry(buttonWidth, buttonHeight),
38823882
eButtonMat
38833883
);
3884-
eButtonMesh.position.set(terminal.position.x + 0.4, terminal.position.y, terminal.position.z);
3884+
eButtonMesh.position.set(terminal.position.x + 0.6, terminal.position.y, terminal.position.z); // Moved slightly forward
38853885
eButtonMesh.rotation.y = Math.PI/2;
38863886
eButtonMesh.name = 'dev_terminal_ebutton';
38873887
eButtonMesh.visible = true; // TEMP: Always visible for debug
38883888
interiorGroup.add(eButtonMesh);
38893889

3890-
// Create invisible interaction volume for terminal (no changes to original)
3891-
const terminalInteractionGeom = new THREE.BoxGeometry(1.0, 2.0, 2.0);
3890+
// Create invisible interaction volume for terminal - positioned away from nodes to avoid interference
3891+
const terminalInteractionGeom = new THREE.BoxGeometry(2.0, 2.0, 2.5); // Increased size for better interaction
38923892
const terminalInteractionMat = new THREE.MeshBasicMaterial({ visible: false });
38933893
const terminalInteractionMesh = new THREE.Mesh(terminalInteractionGeom, terminalInteractionMat);
3894-
terminalInteractionMesh.position.set(center.x - size.x/2 + 0.4, center.y + 1.2, center.z);
3894+
terminalInteractionMesh.position.set(center.x - size.x/2 + 0.8, center.y + 1.2, center.z); // Moved further from wall
38953895
terminalInteractionMesh.userData.interactable = true;
38963896
terminalInteractionMesh.userData.isDevTerminal = true;
38973897
terminalInteractionMesh.name = 'dev_terminal_interaction';

0 commit comments

Comments
 (0)