@umituz/web-virtual 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,14 +64,14 @@ export function VirtualEntityDrawer({
64
64
  type="button"
65
65
  onClick={onClose}
66
66
  className="wv-drawer-close-btn"
67
- title="Kapat (Esc)"
67
+ title="Close (Esc)"
68
68
  >
69
69
  <X size={16} />
70
70
  </button>
71
71
 
72
72
  <div className="wv-drawer-meta-tags">
73
73
  {entity.pinNumber && (
74
- <span className="wv-drawer-pin-tag">Masa #{entity.pinNumber}</span>
74
+ <span className="wv-drawer-pin-tag">Desk #{entity.pinNumber}</span>
75
75
  )}
76
76
  {entity.department && (
77
77
  <span className="wv-drawer-dept-tag">{entity.department}</span>
@@ -86,13 +86,13 @@ export function VirtualEntityDrawer({
86
86
  <div className="wv-drawer-body">
87
87
  {/* Status Row */}
88
88
  <div className="wv-drawer-status-card">
89
- <span className="wv-drawer-status-label">Çalışma Durumu</span>
89
+ <span className="wv-drawer-status-label">Work status</span>
90
90
  <span className={`wv-drawer-status-chip ${isRunning ? 'is-running' : isAwaiting ? 'is-awaiting' : 'is-idle'}`}>
91
91
  {isRunning
92
- ? '⚡ Görev Yürütüyor'
92
+ ? '⚡ Working on a mission'
93
93
  : isAwaiting
94
- ? '⏳ Onay Bekliyor'
95
- : '✓ Boşta / Göreve Hazır'}
94
+ ? '⏳ Awaiting approval'
95
+ : '✓ Idle / ready for a mission'}
96
96
  </span>
97
97
  </div>
98
98
 
@@ -101,19 +101,19 @@ export function VirtualEntityDrawer({
101
101
  <div className="wv-drawer-metrics-grid">
102
102
  <div className="wv-drawer-metric-cell">
103
103
  <div className="wv-metric-val">{metrics.totalRuns}</div>
104
- <div className="wv-metric-lbl">Toplam Görev</div>
104
+ <div className="wv-metric-lbl">Total missions</div>
105
105
  </div>
106
106
  <div className="wv-drawer-metric-cell">
107
107
  <div className="wv-metric-val is-success">
108
108
  {metrics.successRate !== undefined ? `${Math.round(metrics.successRate)}%` : '100%'}
109
109
  </div>
110
- <div className="wv-metric-lbl">Başarı Oranı</div>
110
+ <div className="wv-metric-lbl">Success rate</div>
111
111
  </div>
112
112
  <div className="wv-drawer-metric-cell">
113
113
  <div className="wv-metric-val">
114
114
  ${metrics.costUsd !== undefined ? metrics.costUsd.toFixed(3) : '0.000'}
115
115
  </div>
116
- <div className="wv-metric-lbl">Son 24s Maliyet</div>
116
+ <div className="wv-metric-lbl">Cost (last 24h)</div>
117
117
  </div>
118
118
  </div>
119
119
  )}
@@ -122,7 +122,7 @@ export function VirtualEntityDrawer({
122
122
  {latestTask ? (
123
123
  <div className="wv-drawer-task-section">
124
124
  <div className="wv-task-header">
125
- <span className="wv-task-title">Son / Aktif Görev</span>
125
+ <span className="wv-task-title">Latest / active mission</span>
126
126
  {latestTask.createdAt && (
127
127
  <span className="wv-task-time">
128
128
  {new Date(latestTask.createdAt).toLocaleTimeString([], {
@@ -137,7 +137,7 @@ export function VirtualEntityDrawer({
137
137
  <p className="wv-task-prompt">{latestTask.prompt}</p>
138
138
  {latestTask.summary && (
139
139
  <div className="wv-task-summary">
140
- <strong>Özet: </strong>
140
+ <strong>Summary: </strong>
141
141
  {latestTask.summary}
142
142
  </div>
143
143
  )}
@@ -148,7 +148,7 @@ export function VirtualEntityDrawer({
148
148
  className="wv-view-report-btn"
149
149
  >
150
150
  <FileText size={13} style={{ marginRight: 6 }} />
151
- <span>Çıktı Raporunu İncele</span>
151
+ <span>View output report</span>
152
152
  </button>
153
153
  )}
154
154
  </div>
@@ -156,14 +156,14 @@ export function VirtualEntityDrawer({
156
156
  ) : (
157
157
  <div className="wv-drawer-empty-task">
158
158
  <Clock size={20} className="wv-empty-icon" />
159
- <p>Henüz bu masada bir görev yürütülmedi.</p>
159
+ <p>No mission has been run at this desk yet.</p>
160
160
  </div>
161
161
  )}
162
162
 
163
163
  {/* Direct Dispatch to this Entity */}
164
164
  {onDispatch && onChangeDispatchPrompt && (
165
165
  <div className="wv-drawer-dispatch-section">
166
- <span className="wv-dispatch-title">Doğrudan Bu Masaya Görev Ver</span>
166
+ <span className="wv-dispatch-title">Assign a mission to this desk</span>
167
167
  <div className="wv-dispatch-row">
168
168
  <input
169
169
  type="text"
@@ -175,7 +175,7 @@ export function VirtualEntityDrawer({
175
175
  onDispatch()
176
176
  }
177
177
  }}
178
- placeholder="Örn: Yeni kampanya metinlerini hazırla..."
178
+ placeholder="e.g. Draft the new campaign copy..."
179
179
  className="wv-dispatch-input"
180
180
  />
181
181
  <button
@@ -17,7 +17,7 @@ export interface VirtualReportModalProps {
17
17
  export function VirtualReportModal({
18
18
  report,
19
19
  onClose,
20
- title = 'Görev ve Rapor Çıktısı',
20
+ title = 'Mission & output report',
21
21
  }: VirtualReportModalProps): ReactNode {
22
22
  useEffect(() => {
23
23
  const handleKeyDown = (e: KeyboardEvent) => {
@@ -42,7 +42,7 @@ export function VirtualReportModal({
42
42
  type="button"
43
43
  onClick={onClose}
44
44
  className="wv-modal-close-btn"
45
- title="Kapat"
45
+ title="Close"
46
46
  >
47
47
  <X size={16} />
48
48
  </button>
@@ -51,14 +51,15 @@ export function VirtualReportModal({
51
51
  {/* Modal Body */}
52
52
  <div className="wv-modal-body">
53
53
  <div className="wv-modal-prompt-box">
54
- <span className="wv-modal-section-label">İstek / Görev Briefi:</span>
54
+ <span className="wv-modal-section-label">Request / mission brief:</span>
55
55
  <p className="wv-modal-prompt-text">{report.prompt}</p>
56
56
  </div>
57
57
 
58
58
  <div className="wv-modal-output-section">
59
- <span className="wv-modal-section-label">Üretilen Sonuç / Rapor:</span>
59
+ <span className="wv-modal-section-label">Generated output / report:</span>
60
60
  <div className="wv-modal-output-box">
61
- {report.summary || 'Görev başarıyla tamamlandı. Çıktılar operasyon havuzuna aktarıldı.'}
61
+ {report.summary ||
62
+ 'Mission completed successfully. Outputs have been routed to the operations pool.'}
62
63
  </div>
63
64
  </div>
64
65
  </div>
@@ -70,7 +71,7 @@ export function VirtualReportModal({
70
71
  onClick={onClose}
71
72
  className="wv-modal-btn"
72
73
  >
73
- Kapat
74
+ Close
74
75
  </button>
75
76
  </div>
76
77
  </div>
@@ -37,7 +37,7 @@ export function VirtualRoster({
37
37
  onSearchChange,
38
38
  selectedCategory,
39
39
  onSelectCategory,
40
- title = 'Ofis Kadrosu',
40
+ title = 'Office roster',
41
41
  className = '',
42
42
  }: VirtualRosterProps): ReactNode {
43
43
  // Filter entities based on search and category
@@ -85,14 +85,16 @@ export function VirtualRoster({
85
85
  </div>
86
86
  <div>
87
87
  <h3 className="wv-roster-heading">{title}</h3>
88
- <p className="wv-roster-subheading">{entities.length} çalışan ofis masalarında</p>
88
+ <p className="wv-roster-subheading">
89
+ {entities.length} {entities.length === 1 ? 'member' : 'members'} at their desks
90
+ </p>
89
91
  </div>
90
92
  </div>
91
93
  <button
92
94
  type="button"
93
95
  onClick={onClose}
94
96
  className="wv-roster-close-btn"
95
- title="Kadro Panelini Gizle"
97
+ title="Hide roster panel"
96
98
  >
97
99
  <X size={16} />
98
100
  </button>
@@ -105,7 +107,7 @@ export function VirtualRoster({
105
107
  type="text"
106
108
  value={searchQuery}
107
109
  onChange={(e) => onSearchChange(e.target.value)}
108
- placeholder="Çalışan veya rol ara..."
110
+ placeholder="Search by name or role..."
109
111
  className="wv-roster-search-input"
110
112
  />
111
113
  </div>
@@ -118,7 +120,7 @@ export function VirtualRoster({
118
120
  onClick={() => onSelectCategory('all')}
119
121
  className={`wv-roster-pill ${selectedCategory === 'all' ? 'is-active' : ''}`}
120
122
  >
121
- Tümü
123
+ All
122
124
  </button>
123
125
  {departments.map((dept) => (
124
126
  <button
@@ -169,7 +171,7 @@ export function VirtualRoster({
169
171
  {en.pinNumber && <span className="wv-roster-pin">#{en.pinNumber}</span>}
170
172
  <h4 className="wv-roster-name">{en.name}</h4>
171
173
  </div>
172
- <p className="wv-roster-role">{en.role || en.description || 'Çalışan'}</p>
174
+ <p className="wv-roster-role">{en.role || en.description || 'Staff member'}</p>
173
175
  </div>
174
176
  </div>
175
177
 
@@ -7,6 +7,7 @@ import {
7
7
  forwardRef,
8
8
  useImperativeHandle,
9
9
  } from 'react'
10
+ import { MonitorOff, RotateCw } from 'lucide-react'
10
11
  import * as THREE from 'three'
11
12
  import type {
12
13
  WorldDefinition,
@@ -15,7 +16,7 @@ import type {
15
16
  PinDisplayMode,
16
17
  } from '../core/types'
17
18
  import { WorldEngine } from '../engine/renderer'
18
- import { createStylizedAvatar } from '../entities/people/AvatarBuilder'
19
+ import { createStylizedAvatar, type CreatedAvatar } from '../entities/people/AvatarBuilder'
19
20
  import { EntityPins } from './EntityPins'
20
21
  import { WorldControls } from './WorldControls'
21
22
  import { EntityInspector } from './EntityInspector'
@@ -77,13 +78,33 @@ export const VirtualWorld = forwardRef<VirtualWorldRef, VirtualWorldProps>(
77
78
  const engineRef = useRef<WorldEngine | null>(null)
78
79
  const pinElementsRef = useRef<Map<string, HTMLElement>>(new Map())
79
80
 
81
+ // Hot-sync registry: avatars are created once per entity and updated in place.
82
+ const avatarRegistryRef = useRef<Map<string, CreatedAvatar>>(new Map())
83
+ const avatarGroupRef = useRef<THREE.Group | null>(null)
84
+ const staticInteractivesRef = useRef<THREE.Object3D[]>([])
85
+
86
+ // Latest props/refs readable by stable engine callbacks (prevents engine re-init churn)
87
+ const worldRef = useRef(world)
88
+ const nightModeRef = useRef(false)
89
+ const callbacksRef = useRef({
90
+ onSelectEntity: (_entity: WorldEntity | null) => {},
91
+ onHoverEntity: (_entity: WorldEntity | null) => {},
92
+ })
93
+
80
94
  const [internalNightMode, setInternalNightMode] = useState(false)
81
95
  const [internalPinMode, setInternalPinMode] = useState<PinDisplayMode>(defaultPinMode)
82
96
  const [fps, setFps] = useState<number>(60)
83
97
  const [internalSelectedEntity, setInternalSelectedEntity] = useState<WorldEntity | null>(null)
84
98
 
99
+ // WebGL resilience state
100
+ const [webglFailed, setWebglFailed] = useState(false)
101
+ const [contextLost, setContextLost] = useState(false)
102
+ const [engineEpoch, setEngineEpoch] = useState(0)
103
+
85
104
  const nightMode = externalNightMode !== undefined ? externalNightMode : internalNightMode
86
105
  const pinMode = externalPinMode !== undefined ? externalPinMode : internalPinMode
106
+ nightModeRef.current = nightMode
107
+ worldRef.current = world
87
108
 
88
109
  // Determine active selected entity (controlled or uncontrolled)
89
110
  const activeEntity =
@@ -101,6 +122,14 @@ export const VirtualWorld = forwardRef<VirtualWorldRef, VirtualWorldProps>(
101
122
  [onSelectEntity],
102
123
  )
103
124
 
125
+ // Keep stable engine callbacks pointing at the latest handler identities
126
+ useEffect(() => {
127
+ callbacksRef.current = {
128
+ onSelectEntity: handleSelectEntity,
129
+ onHoverEntity: onHoverEntity || (() => {}),
130
+ }
131
+ })
132
+
104
133
  const handleRegisterPinElement = useCallback((entityId: string, el: HTMLElement | null) => {
105
134
  if (el) {
106
135
  pinElementsRef.current.set(entityId, el)
@@ -109,59 +138,63 @@ export const VirtualWorld = forwardRef<VirtualWorldRef, VirtualWorldProps>(
109
138
  }
110
139
  }, [])
111
140
 
112
- // Initialize Three.js Engine
141
+ // ============================================================
142
+ // ENGINE LIFECYCLE — created once per preset (NOT per world data
143
+ // change). Scene, lighting, camera and GLB models survive
144
+ // entity/polling updates; only avatars are diffed below.
145
+ // ============================================================
113
146
  useEffect(() => {
114
147
  const canvas = canvasRef.current
115
148
  const container = containerRef.current
116
149
  if (!canvas || !container) return
117
150
 
118
- const engine = new WorldEngine({
119
- canvas,
120
- world,
121
- pinElements: pinElementsRef.current,
122
- onSelectEntity: (evt) => {
123
- handleSelectEntity(evt.entity)
124
- },
125
- onHoverEntity: (entity) => {
126
- if (onHoverEntity) onHoverEntity(entity)
127
- },
128
- onFpsUpdate: (currentFps) => {
129
- setFps(currentFps)
130
- },
131
- })
151
+ let engine: WorldEngine
152
+ try {
153
+ engine = new WorldEngine({
154
+ canvas,
155
+ world: worldRef.current,
156
+ pinElements: pinElementsRef.current,
157
+ onSelectEntity: (evt) => callbacksRef.current.onSelectEntity(evt.entity),
158
+ onHoverEntity: (entity) => callbacksRef.current.onHoverEntity(entity),
159
+ onFpsUpdate: (currentFps) => {
160
+ setFps(currentFps)
161
+ },
162
+ onContextLost: () => setContextLost(true),
163
+ })
164
+ } catch (err) {
165
+ console.error('[web-virtual] WebGL is unavailable, rendering fallback UI:', err)
166
+ setWebglFailed(true)
167
+ return
168
+ }
169
+
132
170
  engineRef.current = engine
171
+ setWebglFailed(false)
172
+ setContextLost(false)
133
173
 
134
174
  // 1. Build environment from preset or custom scene builder
135
175
  const activePreset = preset
136
176
  if (activePreset && activePreset.buildScene) {
137
177
  activePreset.buildScene(engine.scene, {
138
- nightMode,
139
- theme: world.theme,
178
+ nightMode: nightModeRef.current,
179
+ theme: worldRef.current.theme,
140
180
  })
141
181
  }
142
182
 
143
- // 2. Build 3D Avatars for people/actor entities
183
+ // 2. Avatar container — populated by the entity sync effect below
144
184
  const avatarGroup = new THREE.Group()
145
185
  avatarGroup.name = 'world-avatars'
146
-
147
- for (const entity of world.entities) {
148
- if (entity.type === 'person' || entity.type === 'actor') {
149
- const { group, animate } = createStylizedAvatar(entity, engine.materials)
150
- avatarGroup.add(group)
151
- engine.animators.push(animate)
152
- engine.interactiveObjects.push(group)
153
- }
154
- }
155
186
  engine.scene.add(avatarGroup)
187
+ avatarGroupRef.current = avatarGroup
156
188
 
157
- // 3. Register all interactive objects with entityId (workstations, chairs, monitors, avatars)
189
+ // 3. Collect static interactive objects (workstations, chairs, monitors)
190
+ const staticInteractives: THREE.Object3D[] = []
158
191
  engine.scene.traverse((obj) => {
159
192
  if (obj.userData && obj.userData.entityId) {
160
- if (!engine.interactiveObjects.includes(obj)) {
161
- engine.interactiveObjects.push(obj)
162
- }
193
+ staticInteractives.push(obj)
163
194
  }
164
195
  })
196
+ staticInteractivesRef.current = staticInteractives
197
+ engine.interactiveObjects = [...staticInteractives]
165
198
 
166
199
  // Resize Observer
167
200
  const resizeObserver = new ResizeObserver((entries) => {
@@ -176,11 +209,61 @@ export const VirtualWorld = forwardRef<VirtualWorldRef, VirtualWorldProps>(
176
209
 
177
210
  return () => {
178
211
  resizeObserver.disconnect()
212
+ avatarRegistryRef.current.clear()
213
+ avatarGroupRef.current = null
214
+ staticInteractivesRef.current = []
179
215
  engine.dispose()
180
216
  engineRef.current = null
181
- pinElementsRef.current.clear()
182
217
  }
183
- }, [world, preset, handleSelectEntity, onHoverEntity])
218
+ }, [preset, engineEpoch])
219
+
220
+ // ============================================================
221
+ // ENTITY HOT-SYNC — diff world.entities against the avatar
222
+ // registry: add new avatars, update changed ones in place
223
+ // (status halo, animation flags, transform), remove stale ones.
224
+ // No scene rebuild, no GLB reload, no camera reset.
225
+ // ============================================================
226
+ useEffect(() => {
227
+ const engine = engineRef.current
228
+ const avatarGroup = avatarGroupRef.current
229
+ if (!engine || !avatarGroup) return
230
+
231
+ // Always point the engine (raycaster/projector/focus) at the latest data
232
+ engine.updateWorld(world)
233
+
234
+ const registry = avatarRegistryRef.current
235
+ const seen = new Set<string>()
236
+
237
+ for (const entity of world.entities) {
238
+ if (entity.type !== 'person' && entity.type !== 'actor') continue
239
+ seen.add(entity.id)
240
+
241
+ const existing = registry.get(entity.id)
242
+ if (existing) {
243
+ existing.update(entity)
244
+ continue
245
+ }
246
+
247
+ const created = createStylizedAvatar(entity, engine.materials)
248
+ registry.set(entity.id, created)
249
+ avatarGroup.add(created.group)
250
+ }
251
+
252
+ // Remove avatars for entities that no longer exist
253
+ for (const [id, created] of registry) {
254
+ if (!seen.has(id)) {
255
+ created.group.removeFromParent()
256
+ registry.delete(id)
257
+ }
258
+ }
259
+
260
+ // Rebuild animator + interactive lists from the registry
261
+ engine.animators = Array.from(registry.values()).map((a) => a.animate)
262
+ engine.interactiveObjects = [
263
+ ...staticInteractivesRef.current,
264
+ ...Array.from(registry.values()).map((a) => a.group),
265
+ ]
266
+ }, [world, preset, engineEpoch])
184
267
 
185
268
  // Sync Night Mode with engine
186
269
  useEffect(() => {
@@ -252,16 +335,68 @@ export const VirtualWorld = forwardRef<VirtualWorldRef, VirtualWorldProps>(
252
335
  [],
253
336
  )
254
337
 
338
+ const handleRestoreContext = useCallback(() => {
339
+ // Rebuild the engine from scratch (fresh WebGL context, fresh scene)
340
+ setContextLost(false)
341
+ setEngineEpoch((epoch) => epoch + 1)
342
+ }, [])
343
+
344
+ // Graceful fallback when WebGL is not available at all
345
+ if (webglFailed) {
346
+ return (
347
+ <div
348
+ ref={containerRef}
349
+ className={`wv-container wv-webgl-fallback ${className}`}
350
+ style={style}
351
+ role="region"
352
+ aria-label={`${world.name} 3D environment`}
353
+ >
354
+ <div className="wv-fallback-card">
355
+ <MonitorOff size={28} />
356
+ <h3>3D view unavailable</h3>
357
+ <p>
358
+ Your browser or device does not support WebGL, which is required for the 3D
359
+ environment. Entity data remains available below.
360
+ </p>
361
+ <ul className="wv-fallback-entity-list">
362
+ {world.entities.slice(0, 12).map((entity) => (
363
+ <li key={entity.id}>
364
+ <span className={`wv-status-pip ${entity.status || 'idle'}`} />
365
+ {entity.pinNumber ? `#${entity.pinNumber} ` : ''}
366
+ {entity.name}
367
+ </li>
368
+ ))}
369
+ </ul>
370
+ </div>
371
+ {children}
372
+ </div>
373
+ )
374
+ }
375
+
255
376
  return (
256
377
  <div
257
378
  ref={containerRef}
258
379
  className={`wv-container ${nightMode ? 'is-night' : ''} ${className}`}
259
380
  style={style}
260
381
  role="region"
261
- aria-label={`${world.name} 3D Sanal Ortamı`}
382
+ aria-label={`${world.name} 3D environment`}
262
383
  >
263
384
  <canvas ref={canvasRef} className="wv-canvas" />
264
385
 
386
+ {/* WebGL context lost overlay (e.g. GPU driver reset) */}
387
+ {contextLost && (
388
+ <div className="wv-context-lost-overlay">
389
+ <div className="wv-fallback-card">
390
+ <RotateCw size={26} />
391
+ <h3>3D view interrupted</h3>
392
+ <p>The graphics context was lost (usually a GPU or tab reset). Restore it below.</p>
393
+ <button type="button" className="wv-fallback-btn" onClick={handleRestoreContext}>
394
+ Restore 3D view
395
+ </button>
396
+ </div>
397
+ </div>
398
+ )}
399
+
265
400
  {/* Floating 60fps GPU Projected Pins */}
266
401
  <EntityPins
267
402
  entities={world.entities}
@@ -37,12 +37,12 @@ export function WorldControls({
37
37
  fps,
38
38
  }: WorldControlsProps): ReactNode {
39
39
  return (
40
- <div className="wv-controls-toolbar" role="toolbar" aria-label="3D Görünüm Kontrolleri">
40
+ <div className="wv-controls-toolbar" role="toolbar" aria-label="3D view controls">
41
41
  {/* Camera Presets */}
42
42
  <button
43
43
  type="button"
44
44
  className="wv-btn wv-btn-icon"
45
- title="İzometrik Görünüm"
45
+ title="Isometric view"
46
46
  onClick={() => onSelectCameraPreset('isometric')}
47
47
  >
48
48
  <Compass size={16} />
@@ -51,16 +51,16 @@ export function WorldControls({
51
51
  <button
52
52
  type="button"
53
53
  className="wv-btn"
54
- title="Üstten Bakış"
54
+ title="Top-down view"
55
55
  onClick={() => onSelectCameraPreset('top')}
56
56
  >
57
- Üst
57
+ Top
58
58
  </button>
59
59
 
60
60
  <button
61
61
  type="button"
62
62
  className="wv-btn wv-btn-icon"
63
- title="Kamerayı Sıfırla"
63
+ title="Reset camera"
64
64
  onClick={onResetCamera}
65
65
  >
66
66
  <RotateCcw size={15} />
@@ -72,27 +72,27 @@ export function WorldControls({
72
72
  <button
73
73
  type="button"
74
74
  className={`wv-btn ${pinMode === 'pins' ? 'is-active' : ''}`}
75
- title="Minimal İğneler (Sayılar)"
75
+ title="Minimal pins (numbers)"
76
76
  onClick={() => onChangePinMode('pins')}
77
77
  >
78
78
  <MapPin size={14} style={{ marginRight: 4 }} />
79
- İğneler
79
+ Pins
80
80
  </button>
81
81
 
82
82
  <button
83
83
  type="button"
84
84
  className={`wv-btn ${pinMode === 'labels' ? 'is-active' : ''}`}
85
- title="Detaylı Kartlar"
85
+ title="Detailed label cards"
86
86
  onClick={() => onChangePinMode('labels')}
87
87
  >
88
88
  <Tag size={14} style={{ marginRight: 4 }} />
89
- Etiketler
89
+ Labels
90
90
  </button>
91
91
 
92
92
  <button
93
93
  type="button"
94
94
  className={`wv-btn wv-btn-icon ${pinMode === 'off' ? 'is-active' : ''}`}
95
- title="Etiketleri Gizle"
95
+ title="Hide labels"
96
96
  onClick={() => onChangePinMode('off')}
97
97
  >
98
98
  <EyeOff size={15} />
@@ -104,7 +104,7 @@ export function WorldControls({
104
104
  <button
105
105
  type="button"
106
106
  className="wv-btn wv-btn-icon"
107
- title={nightMode ? 'Gündüz Moduna Geç' : 'Gece Moduna Geç'}
107
+ title={nightMode ? 'Switch to day mode' : 'Switch to night mode'}
108
108
  onClick={onToggleNightMode}
109
109
  >
110
110
  {nightMode ? <Sun size={16} color="#f59e0b" /> : <Moon size={16} />}
@@ -115,7 +115,7 @@ export function WorldControls({
115
115
  <button
116
116
  type="button"
117
117
  className="wv-btn wv-btn-icon"
118
- title={isFullscreen ? 'Tam Ekrandan Çık' : 'Tam Ekran'}
118
+ title={isFullscreen ? 'Exit fullscreen' : 'Fullscreen'}
119
119
  onClick={onToggleFullscreen}
120
120
  >
121
121
  {isFullscreen ? <Minimize2 size={16} /> : <Maximize2 size={16} />}