storysplat-viewer 2.9.17 → 2.9.18

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 CHANGED
@@ -24,6 +24,11 @@ A powerful npm package for embedding and interacting with 3D Gaussian Splatting
24
24
  - [Audio Emitters](#audio-emitters)
25
25
  - [HTML Meshes](#html-meshes)
26
26
  - [Voxel Collision](#voxel-collision)
27
+ - [Mirror Planes](#mirror-planes)
28
+ - [Measurements](#measurements)
29
+ - [Post-Processing](#post-processing)
30
+ - [Custom Menu Links](#custom-menu-links)
31
+ - [Entity Animations](#entity-animations)
27
32
  - [React Integration](#react-integration)
28
33
  - [Native App Integration](#native-app-integration)
29
34
  - [Analytics & Tracking](#analytics--tracking)
@@ -1055,6 +1060,193 @@ The voxel collision system requires two co-located files:
1055
1060
 
1056
1061
  Both primitive collision meshes and voxel collision coexist — primitives are checked first, then the octree.
1057
1062
 
1063
+ ## Mirror Planes
1064
+
1065
+ Mirror planes add reflective surfaces to scenes, useful for replacing broken mirrors in Gaussian Splat scans with real-time reflections.
1066
+
1067
+ ### Scene Data
1068
+
1069
+ ```json
1070
+ {
1071
+ "mirrors": [
1072
+ {
1073
+ "id": "mirror-1",
1074
+ "position": { "x": 0, "y": 1.5, "z": -3 },
1075
+ "rotation": { "x": 0, "y": 0, "z": 0 },
1076
+ "scale": { "x": 2, "y": 2, "z": 1 },
1077
+ "resolution": 0.5,
1078
+ "intensity": 0.8,
1079
+ "tint": "#ffffff"
1080
+ }
1081
+ ]
1082
+ }
1083
+ ```
1084
+
1085
+ | Property | Type | Description |
1086
+ |----------|------|-------------|
1087
+ | `position` | `Vector3` | World position of the mirror |
1088
+ | `rotation` | `Vector3` | Euler rotation in radians |
1089
+ | `scale` | `Vector3` | Dimensions of the mirror plane |
1090
+ | `resolution` | `number` | Reflection quality (0.25–1.0, lower = better performance) |
1091
+ | `intensity` | `number` | Reflection strength (0 = invisible, 1 = full) |
1092
+ | `tint` | `string` | Hex color overlay applied to reflections |
1093
+
1094
+ Up to 3 mirrors are supported per scene.
1095
+
1096
+ ## Measurements
1097
+
1098
+ The measurement system allows viewers to measure real-world distances in 3D scenes using a calibrated scale.
1099
+
1100
+ ### Scene Data
1101
+
1102
+ ```json
1103
+ {
1104
+ "measurement": {
1105
+ "enabled": true,
1106
+ "scaleRatio": 0.0254,
1107
+ "unit": "meters",
1108
+ "color": "#00ff00",
1109
+ "measurements": [
1110
+ {
1111
+ "id": "m1",
1112
+ "start": { "x": 0, "y": 0, "z": 0 },
1113
+ "end": { "x": 1, "y": 0, "z": 0 },
1114
+ "label": "Wall width"
1115
+ }
1116
+ ]
1117
+ }
1118
+ }
1119
+ ```
1120
+
1121
+ | Property | Type | Description |
1122
+ |----------|------|-------------|
1123
+ | `enabled` | `boolean` | Whether measurement mode is available |
1124
+ | `scaleRatio` | `number` | Scene units to real-world units multiplier |
1125
+ | `unit` | `string` | Display unit: `"meters"`, `"centimeters"`, `"feet"`, or `"inches"` |
1126
+ | `color` | `string` | Hex color for measurement visualization |
1127
+ | `measurements` | `array` | Pre-defined measurements with start/end points and labels |
1128
+
1129
+ ## Post-Processing
1130
+
1131
+ Post-processing applies real-time color grading adjustments in the viewer.
1132
+
1133
+ ### Scene Data
1134
+
1135
+ ```json
1136
+ {
1137
+ "postProcessing": {
1138
+ "colorEnhance": {
1139
+ "enabled": true,
1140
+ "shadows": 0.5,
1141
+ "highlights": -0.3,
1142
+ "vibrance": 0.2,
1143
+ "midtones": 0.1,
1144
+ "dehaze": 0.15
1145
+ }
1146
+ }
1147
+ }
1148
+ ```
1149
+
1150
+ | Property | Type | Range | Description |
1151
+ |----------|------|-------|-------------|
1152
+ | `enabled` | `boolean` | — | Master toggle for color enhancement |
1153
+ | `shadows` | `number` | -3 to +3 | Brighten or darken dark areas |
1154
+ | `highlights` | `number` | -3 to +3 | Adjust bright areas |
1155
+ | `vibrance` | `number` | -1 to +1 | Increase or decrease color saturation |
1156
+ | `midtones` | `number` | -1 to +1 | Adjust mid-range tones |
1157
+ | `dehaze` | `number` | -1 to +1 | Remove or add atmospheric haze |
1158
+
1159
+ ## Custom Menu Links
1160
+
1161
+ Add external links to the viewer's navigation menu alongside portals.
1162
+
1163
+ ### Scene Data
1164
+
1165
+ ```json
1166
+ {
1167
+ "menuLinks": [
1168
+ {
1169
+ "id": "link-1",
1170
+ "label": "Book Now",
1171
+ "url": "https://example.com/book",
1172
+ "icon": "calendar",
1173
+ "menuPath": "Resources",
1174
+ "openInNewTab": true
1175
+ }
1176
+ ]
1177
+ }
1178
+ ```
1179
+
1180
+ | Property | Type | Description |
1181
+ |----------|------|-------------|
1182
+ | `label` | `string` | Display text for the link |
1183
+ | `url` | `string` | Target URL (http/https) |
1184
+ | `icon` | `string` | Icon type: `"link"`, `"map"`, `"calendar"`, `"phone"`, `"cart"`, `"globe"`, `"download"` |
1185
+ | `menuPath` | `string` | Folder path for menu organization (e.g., `"Resources/Help"`) |
1186
+ | `openInNewTab` | `boolean` | Whether to open in a new browser tab (default: `true`) |
1187
+
1188
+ Menu links share the folder system with portals, so links and portals can be organized in the same folder hierarchy.
1189
+
1190
+ ## Entity Animations
1191
+
1192
+ Keyframe-based animation system for any scene entity (hotspots, portals, lights, particles, meshes, mirrors).
1193
+
1194
+ ### Scene Data
1195
+
1196
+ ```json
1197
+ {
1198
+ "entityAnimations": [
1199
+ {
1200
+ "entityId": "hotspot-1",
1201
+ "entityType": "hotspot",
1202
+ "timelineMode": "independent",
1203
+ "duration": 3,
1204
+ "playbackMode": "loop",
1205
+ "autoplay": true,
1206
+ "delay": 0,
1207
+ "tracks": [
1208
+ {
1209
+ "property": "position.y",
1210
+ "keyframes": [
1211
+ { "time": 0, "value": 1, "easing": "ease-in-out" },
1212
+ { "time": 1, "value": 2, "easing": "ease-in-out" },
1213
+ { "time": 2, "value": 1, "easing": "linear" }
1214
+ ]
1215
+ }
1216
+ ]
1217
+ }
1218
+ ]
1219
+ }
1220
+ ```
1221
+
1222
+ ### Timeline Modes
1223
+
1224
+ | Mode | Description |
1225
+ |------|-------------|
1226
+ | `independent` | Time-based playback with configurable duration, delay, and loop mode |
1227
+ | `scroll` | Animation driven by camera tour scroll progress (0–100%) |
1228
+
1229
+ ### Playback Modes (independent only)
1230
+
1231
+ | Mode | Description |
1232
+ |------|-------------|
1233
+ | `once` | Play once and stop |
1234
+ | `loop` | Restart from beginning when complete |
1235
+ | `pingpong` | Reverse direction at each end |
1236
+
1237
+ ### Easing Functions
1238
+
1239
+ `linear`, `ease-in`, `ease-out`, `ease-in-out`
1240
+
1241
+ ### Animatable Properties
1242
+
1243
+ | Category | Properties |
1244
+ |----------|------------|
1245
+ | Position | `position.x`, `position.y`, `position.z` |
1246
+ | Rotation | `rotation.x`, `rotation.y`, `rotation.z` |
1247
+ | Scale | `scale.x`, `scale.y`, `scale.z` |
1248
+ | Particles | `rate`, `lifetime`, `speed`, `scale`, `gravity`, `opacity`, `rotationSpeed` |
1249
+
1058
1250
  ## React Integration
1059
1251
 
1060
1252
  ```jsx