/bijan-s-terminal-lab
prompt.txt
01Create a single-file Three.js lab with an interactive Linux-like terminal that has fullscreen mode.
02
03Features:
041. First-person 3D room (same as before): drag mouse to look, arrows to move, E to interact with monitor, Space to sit
052. Monitor shows terminal texture
063. NEW: Fullscreen terminal UI button
074. NEW: Fully interactive Linux-like terminal
08
09Implementation details:
10
113D Scene:
12- Use Three.js 0.160 via importmap
13- Simple room with desk, PC monitor, chair
14- Drag mouse to look, arrows to move
15- Press E when looking at monitor to "focus" terminal
16
17Terminal System:
18- Two views:
19 a) In-world: monitor shows CanvasTexture with terminal output
20 b) Fullscreen overlay: press button or double-click monitor to open full terminal UI
21
22Fullscreen Terminal UI:
23- Add button in top-right corner of page: "[ ] Fullscreen Terminal" (always visible)
24- Also add small button near monitor in 3D: when looking at monitor, show hint "Press F for fullscreen"
25- Fullscreen overlay:
26 * Black background #0a0e0f
27 * Green monospace text (JetBrains Mono or Courier)
28 * Takes up 90% of screen, centered, with rounded corners, subtle glow
29 * Header bar with title "bijan@lab:~" and close button X
30 * Scrollable output area
31 * Input line at bottom with prompt "bijan@lab:~$ " and blinking cursor
32 * Shows same content as monitor texture
33
34Linux-like interaction:
35Implement a fake shell with these commands:
36- help: list commands
37- ls, ls -la: show files
38- pwd: print /home/bijan
39- whoami: bijan
40- date: current date/time
41- uname -a: "Linux bijan-lab 6.8.0 #1 SMP x86_64 GNU/Linux"
42- neofetch: show ASCII art of Tux + system info
43- cat hug.txt: show "Your PC died because it needs a hug."
44- echo [text]: print text
45- clear: clear screen
46- ps: show fake processes
47- top: show fake top output (one snapshot)
48- mkdir, touch, cd: simulate basic filesystem (in-memory)
49- cat /proc/meminfo: fake memory info
50- dmesg | tail: show recent kernel logs
51- hug: special command that prints heart and increments hug counter
52- sudo apt update: fake apt output
53- history: show command history
54- exit: close fullscreen (or say "use X button")
55
56Filesystem simulation (in memory):
57- Start with /home/bijan containing: hug.txt, notes.md, projects/
58- Allow cd, ls, cat, mkdir, touch, echo > file
59- Persist in JS object
60
61Perpetual logs:
62- When terminal is idle (not typing), continue adding background logs every 2-3 seconds like before (kernel messages)
63- When user types, pause background logs briefly
64
65Sync between views:
66- Both monitor texture and fullscreen UI show same output
67- When typing in fullscreen, update monitor texture too
68
69UI elements:
70- Top-right button: "Fullscreen Terminal" (always visible, toggles overlay)
71- In 3D, when near monitor: show hint "Press E to type | F for fullscreen"
72- Fullscreen terminal has:
73 * Header with traffic lights (red/yellow/green circles) and title
74 * Output div with scrolling
75 * Input with prompt
76 * Blinking cursor
77
78Styling:
79- Terminal colors: #00ff88 for text, #0a0e0f background
80- Scanlines overlay subtle
81- Monospace font
82- Glow effect
83
84Make it feel like a real Linux terminal embedded in a 3D world. The fullscreen button makes it usable, the commands make it interactive.