@umituz/web-virtual 1.1.2 → 2.0.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.
@@ -1,69 +1,38 @@
1
1
  import * as THREE from 'three'
2
- import type { WorldPreset, WorldEntity, WorldZone } from '../core/types'
2
+ import type { WorldPreset, WorldSlot, WorldZone } from '../core/types'
3
3
  import { MaterialPalette } from '../engine/materials'
4
4
 
5
5
  export const DEFAULT_FACTORY_ZONES: WorldZone[] = [
6
6
  {
7
7
  id: 'assembly_line',
8
- name: 'Robotik Montaj Hattı',
8
+ name: 'Robotic Assembly Line',
9
9
  color: '#0284c7',
10
- description: 'Yüksek hızlı robotik montaj ve parça birleştirme bandı.',
10
+ description: 'High-speed robotic assembly and part joining line.',
11
11
  cameraFocus: [-6, 1.2, 0],
12
12
  },
13
13
  {
14
14
  id: 'quality_control',
15
- name: 'Kalite Kontrol & Optik Test',
15
+ name: 'Quality Control & Optical Testing',
16
16
  color: '#10b981',
17
- description: 'Ürün tarama, hata tespiti ve paket onay istasyonu.',
17
+ description: 'Product scanning, defect detection and packaging approval station.',
18
18
  cameraFocus: [6, 1.0, -4],
19
19
  },
20
20
  {
21
21
  id: 'warehouse_racks',
22
- name: 'Lojistik & Raf Deposu',
22
+ name: 'Logistics & Rack Warehouse',
23
23
  color: '#f59e0b',
24
- description: 'Otomatik paletleme ve dikey depolama alanı.',
24
+ description: 'Automated palletizing and vertical storage area.',
25
25
  cameraFocus: [6, 2.0, 5],
26
26
  },
27
27
  ]
28
28
 
29
- export const DEFAULT_FACTORY_ENTITIES: WorldEntity[] = [
30
- {
31
- id: 'factory-op-1',
32
- type: 'person',
33
- name: 'Serkan — Hat Şefi',
34
- role: 'Üretim Akış Gözetmeni',
35
- department: 'İmalat',
36
- zoneId: 'assembly_line',
37
- status: 'working',
38
- pinNumber: 1,
39
- position: [-6, 0, 2],
40
- avatarColor: '#0369a1',
41
- },
42
- {
43
- id: 'robot-arm-1',
44
- type: 'equipment',
45
- name: 'Robot Kolu RX-4',
46
- role: 'Hassas Kaynak & Montaj',
47
- department: 'Robotik',
48
- zoneId: 'assembly_line',
49
- status: 'running',
50
- pinNumber: 2,
51
- position: [-6, 0, -2],
52
- },
53
- {
54
- id: 'factory-inspector',
55
- type: 'person',
56
- name: 'Ebru — Kalite Mühendisi',
57
- role: 'Tolerans Doğrulama',
58
- department: 'Kalite',
59
- zoneId: 'quality_control',
60
- status: 'idle',
61
- pinNumber: 3,
62
- position: [6, 0, -4],
63
- avatarColor: '#047857',
64
- },
29
+ export const FACTORY_SLOTS: WorldSlot[] = [
30
+ { id: 'slot-1', label: 'Assembly line station', position: [-6, 0, 2], zoneId: 'assembly_line', pinNumber: 1, avatarColor: '#0369a1' },
31
+ { id: 'slot-2', label: 'Robotic arm bay', position: [-6, 0, -2], zoneId: 'assembly_line', pinNumber: 2 },
32
+ { id: 'slot-3', label: 'Quality control station', position: [6, 0, -4], zoneId: 'quality_control', pinNumber: 3, avatarColor: '#047857' },
65
33
  ]
66
34
 
35
+
67
36
  export const factoryPreset: WorldPreset = {
68
37
  id: 'preset-factory',
69
38
  name: 'Smart Industrial Automation Plant',
@@ -97,7 +66,7 @@ export const factoryPreset: WorldPreset = {
97
66
  nightBackgroundColor: '#020617',
98
67
  },
99
68
  zones: DEFAULT_FACTORY_ZONES,
100
- defaultEntities: DEFAULT_FACTORY_ENTITIES,
69
+ slots: FACTORY_SLOTS,
101
70
 
102
71
  buildScene: (scene: THREE.Scene, options) => {
103
72
  const materials = new MaterialPalette()
@@ -1,69 +1,38 @@
1
1
  import * as THREE from 'three'
2
- import type { WorldPreset, WorldEntity, WorldZone } from '../core/types'
2
+ import type { WorldPreset, WorldSlot, WorldZone } from '../core/types'
3
3
  import { MaterialPalette } from '../engine/materials'
4
4
 
5
5
  export const DEFAULT_FARM_ZONES: WorldZone[] = [
6
6
  {
7
7
  id: 'greenhouse',
8
- name: 'Topraksız Tarım & Sera',
8
+ name: 'Hydroponics & Greenhouse',
9
9
  color: '#22c55e',
10
- description: 'Otomatik sulama ve iklim kontrollü sera alanı.',
10
+ description: 'Automated irrigation and climate-controlled greenhouse area.',
11
11
  cameraFocus: [-8, 1, -5],
12
12
  },
13
13
  {
14
14
  id: 'crop_fields',
15
- name: 'Açık Tarım Tarlaları',
15
+ name: 'Open Crop Fields',
16
16
  color: '#84cc16',
17
- description: 'Mevsimlik organik tarım ekim parseli.',
17
+ description: 'Seasonal organic crop plots.',
18
18
  cameraFocus: [6, 0.5, -4],
19
19
  },
20
20
  {
21
21
  id: 'barn_storage',
22
- name: 'Lojistik Hangar & Depo',
22
+ name: 'Logistics Hangar & Storage',
23
23
  color: '#b45309',
24
- description: 'Mahsul toplama, paketleme ve traktör park alanı.',
24
+ description: 'Harvest collection, packaging and tractor parking area.',
25
25
  cameraFocus: [0, 1.5, 6],
26
26
  },
27
27
  ]
28
28
 
29
- export const DEFAULT_FARM_ENTITIES: WorldEntity[] = [
30
- {
31
- id: 'farm-worker-1',
32
- type: 'person',
33
- name: 'Ahmet — Sera Operatörü',
34
- role: 'İklim Kontrolü & Sulama',
35
- department: 'Sera Operasyonları',
36
- zoneId: 'greenhouse',
37
- status: 'working',
38
- pinNumber: 1,
39
- position: [-8, 0, -5],
40
- avatarColor: '#15803d',
41
- },
42
- {
43
- id: 'farm-tractor-1',
44
- type: 'vehicle',
45
- name: 'Otonom Traktör Alpha',
46
- role: 'Parsel Sürüm & İlaçlama',
47
- department: 'Filo Yönetimi',
48
- zoneId: 'crop_fields',
49
- status: 'running',
50
- pinNumber: 2,
51
- position: [6, 0, -4],
52
- },
53
- {
54
- id: 'farm-worker-2',
55
- type: 'person',
56
- name: 'Mehmet — Hasat Sorumlusu',
57
- role: 'Paketleme & Depolama',
58
- department: 'Lojistik',
59
- zoneId: 'barn_storage',
60
- status: 'idle',
61
- pinNumber: 3,
62
- position: [0, 0, 6],
63
- avatarColor: '#b45309',
64
- },
29
+ export const FARM_SLOTS: WorldSlot[] = [
30
+ { id: 'slot-1', label: 'Greenhouse station', position: [-8, 0, -5], zoneId: 'greenhouse', pinNumber: 1, avatarColor: '#15803d' },
31
+ { id: 'slot-2', label: 'Crop field unit', position: [6, 0, -4], zoneId: 'crop_fields', pinNumber: 2 },
32
+ { id: 'slot-3', label: 'Barn & logistics station', position: [0, 0, 6], zoneId: 'barn_storage', pinNumber: 3, avatarColor: '#b45309' },
65
33
  ]
66
34
 
35
+
67
36
  export const farmPreset: WorldPreset = {
68
37
  id: 'preset-farm',
69
38
  name: 'Smart Agriculture & Greenhouse Complex',
@@ -100,7 +69,7 @@ export const farmPreset: WorldPreset = {
100
69
  nightBackgroundColor: '#020d04',
101
70
  },
102
71
  zones: DEFAULT_FARM_ZONES,
103
- defaultEntities: DEFAULT_FARM_ENTITIES,
72
+ slots: FARM_SLOTS,
104
73
 
105
74
  buildScene: (scene: THREE.Scene, options) => {
106
75
  const materials = new MaterialPalette()
@@ -1,58 +1,37 @@
1
1
  import * as THREE from 'three'
2
- import type { WorldPreset, WorldEntity, WorldZone } from '../core/types'
2
+ import type { WorldPreset, WorldSlot, WorldZone } from '../core/types'
3
3
  import { MaterialPalette } from '../engine/materials'
4
4
 
5
5
  export const DEFAULT_HOSPITAL_ZONES: WorldZone[] = [
6
6
  {
7
7
  id: 'triage_er',
8
- name: 'Acil Müdahale & Triyaj',
8
+ name: 'Emergency Response & Triage',
9
9
  color: '#ef4444',
10
- description: 'İlk değerlendirme ve acil müdahale ünitesi.',
10
+ description: 'First assessment and emergency response unit.',
11
11
  cameraFocus: [-8, 1.2, 0],
12
12
  },
13
13
  {
14
14
  id: 'consultation',
15
- name: 'Poliklinik & Uzman Hekim Odası',
15
+ name: 'Outpatient & Specialist Rooms',
16
16
  color: '#06b6d4',
17
- description: 'Hasta muayene ve klinik tanı alanı.',
17
+ description: 'Patient examination and clinical diagnosis area.',
18
18
  cameraFocus: [4, 1.0, -4],
19
19
  },
20
20
  {
21
21
  id: 'icu_ward',
22
- name: 'Yoğun Bakım & İzleme Servisi',
22
+ name: 'Intensive Care & Monitoring Ward',
23
23
  color: '#3b82f6',
24
- description: 'Yaşamsal bulgu monitörleri ve hasta yatakları.',
24
+ description: 'Vital sign monitors and patient beds.',
25
25
  cameraFocus: [6, 1.0, 5],
26
26
  },
27
27
  ]
28
28
 
29
- export const DEFAULT_HOSPITAL_ENTITIES: WorldEntity[] = [
30
- {
31
- id: 'doctor-1',
32
- type: 'person',
33
- name: 'Dr. Selin — Başhekim',
34
- role: 'Klinik Direktörü & Tıbbi Karar',
35
- department: 'Cerrahi',
36
- zoneId: 'consultation',
37
- status: 'working',
38
- pinNumber: 1,
39
- position: [4, 0, -4],
40
- avatarColor: '#0284c7',
41
- },
42
- {
43
- id: 'nurse-1',
44
- type: 'person',
45
- name: 'Hemşire Burak — Triyaj Uzmanı',
46
- role: 'Hasta Karşılama & Vital İzlem',
47
- department: 'Acil',
48
- zoneId: 'triage_er',
49
- status: 'idle',
50
- pinNumber: 2,
51
- position: [-8, 0, 0],
52
- avatarColor: '#059669',
53
- },
29
+ export const HOSPITAL_SLOTS: WorldSlot[] = [
30
+ { id: 'slot-1', label: 'Triage station', position: [-8, 0, 0], zoneId: 'triage_er', pinNumber: 1, avatarColor: '#059669' },
31
+ { id: 'slot-2', label: 'Consultation room station', position: [4, 0, -4], zoneId: 'consultation', pinNumber: 2, avatarColor: '#0284c7' },
54
32
  ]
55
33
 
34
+
56
35
  export const hospitalPreset: WorldPreset = {
57
36
  id: 'preset-hospital',
58
37
  name: 'Smart Healthcare & Hospital Medical Center',
@@ -85,7 +64,7 @@ export const hospitalPreset: WorldPreset = {
85
64
  backgroundColor: '#042f2e',
86
65
  },
87
66
  zones: DEFAULT_HOSPITAL_ZONES,
88
- defaultEntities: DEFAULT_HOSPITAL_ENTITIES,
67
+ slots: HOSPITAL_SLOTS,
89
68
 
90
69
  buildScene: (scene: THREE.Scene, options) => {
91
70
  const materials = new MaterialPalette()