@umituz/web-virtual 1.2.0 → 2.0.1
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.
- package/README.md +39 -8
- package/assets/ASSET_CREDITS.md +2 -0
- package/assets/models/characters/character-female-a.glb +0 -0
- package/assets/models/characters/character-female-b.glb +0 -0
- package/assets/models/characters/character-male-a.glb +0 -0
- package/assets/models/characters/character-male-b.glb +0 -0
- package/package.json +1 -1
- package/src/components/DigitalHQView.tsx +38 -5
- package/src/components/VirtualRoster.tsx +4 -5
- package/src/core/environment.test.ts +100 -16
- package/src/core/environment.ts +93 -7
- package/src/core/types.ts +53 -2
- package/src/engine/modelLoader.test.ts +79 -0
- package/src/engine/modelLoader.ts +29 -0
- package/src/presets/factoryPreset.ts +7 -38
- package/src/presets/farmPreset.ts +7 -38
- package/src/presets/hospitalPreset.ts +6 -27
- package/src/presets/officePreset.ts +53 -344
- package/src/presets/schoolPreset.ts +6 -27
- package/src/styles/virtual.css +86 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three'
|
|
2
|
-
import type { WorldPreset,
|
|
2
|
+
import type { WorldPreset, WorldSlot, WorldZone } from '../core/types'
|
|
3
3
|
import { MaterialPalette } from '../engine/materials'
|
|
4
4
|
|
|
5
5
|
export const DEFAULT_SCHOOL_ZONES: WorldZone[] = [
|
|
@@ -26,33 +26,12 @@ export const DEFAULT_SCHOOL_ZONES: WorldZone[] = [
|
|
|
26
26
|
},
|
|
27
27
|
]
|
|
28
28
|
|
|
29
|
-
export const
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
type: 'person',
|
|
33
|
-
name: 'Prof. Deniz — Department Head',
|
|
34
|
-
role: 'Lecturing & mentoring',
|
|
35
|
-
department: 'Academic',
|
|
36
|
-
zoneId: 'lecture_hall',
|
|
37
|
-
status: 'working',
|
|
38
|
-
pinNumber: 1,
|
|
39
|
-
position: [-6, 0, -4],
|
|
40
|
-
avatarColor: '#4338ca',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: 'student-1',
|
|
44
|
-
type: 'person',
|
|
45
|
-
name: 'Zeynep — Graduate Researcher',
|
|
46
|
-
role: 'STEM experiment practitioner',
|
|
47
|
-
department: 'Research',
|
|
48
|
-
zoneId: 'stem_lab',
|
|
49
|
-
status: 'idle',
|
|
50
|
-
pinNumber: 2,
|
|
51
|
-
position: [6, 0, -3],
|
|
52
|
-
avatarColor: '#0891b2',
|
|
53
|
-
},
|
|
29
|
+
export const SCHOOL_SLOTS: WorldSlot[] = [
|
|
30
|
+
{ id: 'slot-1', label: 'Lecture hall station', position: [-6, 0, -4], zoneId: 'lecture_hall', pinNumber: 1, avatarColor: '#4338ca' },
|
|
31
|
+
{ id: 'slot-2', label: 'STEM lab bench', position: [6, 0, -3], zoneId: 'stem_lab', pinNumber: 2, avatarColor: '#0891b2' },
|
|
54
32
|
]
|
|
55
33
|
|
|
34
|
+
|
|
56
35
|
export const schoolPreset: WorldPreset = {
|
|
57
36
|
id: 'preset-school',
|
|
58
37
|
name: 'Modern University & Academy Campus',
|
|
@@ -86,7 +65,7 @@ export const schoolPreset: WorldPreset = {
|
|
|
86
65
|
backgroundColor: '#0f172a',
|
|
87
66
|
},
|
|
88
67
|
zones: DEFAULT_SCHOOL_ZONES,
|
|
89
|
-
|
|
68
|
+
slots: SCHOOL_SLOTS,
|
|
90
69
|
|
|
91
70
|
buildScene: (scene: THREE.Scene, options) => {
|
|
92
71
|
const materials = new MaterialPalette()
|
package/src/styles/virtual.css
CHANGED
|
@@ -1982,3 +1982,89 @@
|
|
|
1982
1982
|
.wv-container.is-night .wv-context-lost-overlay {
|
|
1983
1983
|
background: rgba(15, 23, 42, 0.82);
|
|
1984
1984
|
}
|
|
1985
|
+
|
|
1986
|
+
/* ----- Empty floor state (no occupants placed yet) ----- */
|
|
1987
|
+
.wv-hq-empty-floor {
|
|
1988
|
+
position: absolute;
|
|
1989
|
+
inset: 0;
|
|
1990
|
+
display: flex;
|
|
1991
|
+
align-items: center;
|
|
1992
|
+
justify-content: center;
|
|
1993
|
+
pointer-events: none;
|
|
1994
|
+
z-index: 12;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
.wv-hq-empty-floor-card {
|
|
1998
|
+
pointer-events: auto;
|
|
1999
|
+
display: flex;
|
|
2000
|
+
flex-direction: column;
|
|
2001
|
+
align-items: center;
|
|
2002
|
+
gap: 8px;
|
|
2003
|
+
max-width: 360px;
|
|
2004
|
+
padding: 26px 30px;
|
|
2005
|
+
border-radius: 16px;
|
|
2006
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2007
|
+
border: 1px solid rgba(15, 23, 42, 0.1);
|
|
2008
|
+
box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
|
|
2009
|
+
text-align: center;
|
|
2010
|
+
color: #334155;
|
|
2011
|
+
backdrop-filter: blur(6px);
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
.wv-hq-empty-floor-card svg {
|
|
2015
|
+
color: #3b82f6;
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
.wv-hq-empty-floor-card h3 {
|
|
2019
|
+
margin: 2px 0 0;
|
|
2020
|
+
font-size: 15px;
|
|
2021
|
+
font-weight: 700;
|
|
2022
|
+
color: #0f172a;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
.wv-hq-empty-floor-card p {
|
|
2026
|
+
margin: 0;
|
|
2027
|
+
font-size: 12.5px;
|
|
2028
|
+
line-height: 1.55;
|
|
2029
|
+
color: #64748b;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
.wv-hq-empty-floor-btn {
|
|
2033
|
+
display: inline-flex;
|
|
2034
|
+
align-items: center;
|
|
2035
|
+
gap: 7px;
|
|
2036
|
+
margin-top: 8px;
|
|
2037
|
+
padding: 9px 18px;
|
|
2038
|
+
border: none;
|
|
2039
|
+
border-radius: 10px;
|
|
2040
|
+
background: linear-gradient(135deg, #3b82f6, #6366f1);
|
|
2041
|
+
color: #fff;
|
|
2042
|
+
font-size: 13px;
|
|
2043
|
+
font-weight: 600;
|
|
2044
|
+
cursor: pointer;
|
|
2045
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
.wv-hq-empty-floor-btn:hover:not(:disabled) {
|
|
2049
|
+
transform: translateY(-1px);
|
|
2050
|
+
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.wv-hq-empty-floor-btn:disabled {
|
|
2054
|
+
opacity: 0.6;
|
|
2055
|
+
cursor: wait;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
.is-night .wv-hq-empty-floor-card {
|
|
2059
|
+
background: rgba(15, 23, 42, 0.92);
|
|
2060
|
+
border-color: rgba(148, 163, 184, 0.2);
|
|
2061
|
+
color: #cbd5e1;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
.is-night .wv-hq-empty-floor-card h3 {
|
|
2065
|
+
color: #f1f5f9;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
.is-night .wv-hq-empty-floor-card p {
|
|
2069
|
+
color: #94a3b8;
|
|
2070
|
+
}
|