Juanfa commited on
Commit
b4078bb
·
verified ·
1 Parent(s): f359886

Upload components/Controls.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/Controls.jsx +69 -0
components/Controls.jsx ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ ZoomIn,
3
+ ZoomOut,
4
+ RotateCcw,
5
+ Maximize2,
6
+ Download,
7
+ Share2,
8
+ Info
9
+ } from 'lucide-react';
10
+
11
+ export default function Controls({
12
+ onReset,
13
+ onZoomIn,
14
+ onZoomOut,
15
+ onFullscreen,
16
+ worldData
17
+ }) {
18
+ return (
19
+ <div className="absolute top-4 right-4 flex flex-col gap-2">
20
+ <button
21
+ onClick={onZoomIn}
22
+ className="p-2 bg-slate-800/80 hover:bg-slate-700 rounded-lg text-slate-300 hover:text-white transition-colors glass-panel"
23
+ title="Zoom In"
24
+ >
25
+ <ZoomIn className="w-5 h-5" />
26
+ </button>
27
+
28
+ <button
29
+ onClick={onZoomOut}
30
+ className="p-2 bg-slate-800/80 hover:bg-slate-700 rounded-lg text-slate-300 hover:text-white transition-colors glass-panel"
31
+ title="Zoom Out"
32
+ >
33
+ <ZoomOut className="w-5 h-5" />
34
+ </button>
35
+
36
+ <button
37
+ onClick={onReset}
38
+ className="p-2 bg-slate-800/80 hover:bg-slate-700 rounded-lg text-slate-300 hover:text-white transition-colors glass-panel"
39
+ title="Reset View"
40
+ >
41
+ <RotateCcw className="w-5 h-5" />
42
+ </button>
43
+
44
+ <button
45
+ onClick={onFullscreen}
46
+ className="p-2 bg-slate-800/80 hover:bg-slate-700 rounded-lg text-slate-300 hover:text-white transition-colors glass-panel"
47
+ title="Fullscreen"
48
+ >
49
+ <Maximize2 className="w-5 h-5" />
50
+ </button>
51
+
52
+ <div className="w-px h-4 bg-slate-700 mx-auto"></div>
53
+
54
+ <button
55
+ className="p-2 bg-slate-800/80 hover:bg-slate-700 rounded-lg text-slate-300 hover:text-white transition-colors glass-panel"
56
+ title="Download Scene"
57
+ >
58
+ <Download className="w-5 h-5" />
59
+ </button>
60
+
61
+ <button
62
+ className="p-2 bg-slate-800/80 hover:bg-slate-700 rounded-lg text-slate-300 hover:text-white transition-colors glass-panel"
63
+ title="Share"
64
+ >
65
+ <Share2 className="w-5 h-5" />
66
+ </button>
67
+ </div>
68
+ );
69
+ }