@ericchen1990/pano-view 3.1.0 → 3.1.2
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 +26 -3
- package/README.zh-CN.md +25 -3
- package/dist/index.cjs +436 -385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.mjs +391 -340
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -34
- package/package.json +12 -3
package/dist/index.mjs
CHANGED
|
@@ -40,7 +40,7 @@ var require_howler = __commonJS({
|
|
|
40
40
|
* @return {Howler}
|
|
41
41
|
*/
|
|
42
42
|
init: function() {
|
|
43
|
-
var self = this ||
|
|
43
|
+
var self = this || Howler4;
|
|
44
44
|
self._counter = 1e3;
|
|
45
45
|
self._html5AudioPool = [];
|
|
46
46
|
self.html5PoolSize = 10;
|
|
@@ -65,7 +65,7 @@ var require_howler = __commonJS({
|
|
|
65
65
|
* @return {Howler/Float} Returns self or current volume.
|
|
66
66
|
*/
|
|
67
67
|
volume: function(vol) {
|
|
68
|
-
var self = this ||
|
|
68
|
+
var self = this || Howler4;
|
|
69
69
|
vol = parseFloat(vol);
|
|
70
70
|
if (!self.ctx) {
|
|
71
71
|
setupAudioContext();
|
|
@@ -76,7 +76,7 @@ var require_howler = __commonJS({
|
|
|
76
76
|
return self;
|
|
77
77
|
}
|
|
78
78
|
if (self.usingWebAudio) {
|
|
79
|
-
self.masterGain.gain.setValueAtTime(vol,
|
|
79
|
+
self.masterGain.gain.setValueAtTime(vol, Howler4.ctx.currentTime);
|
|
80
80
|
}
|
|
81
81
|
for (var i = 0; i < self._howls.length; i++) {
|
|
82
82
|
if (!self._howls[i]._webAudio) {
|
|
@@ -98,13 +98,13 @@ var require_howler = __commonJS({
|
|
|
98
98
|
* @param {Boolean} muted Is muted or not.
|
|
99
99
|
*/
|
|
100
100
|
mute: function(muted) {
|
|
101
|
-
var self = this ||
|
|
101
|
+
var self = this || Howler4;
|
|
102
102
|
if (!self.ctx) {
|
|
103
103
|
setupAudioContext();
|
|
104
104
|
}
|
|
105
105
|
self._muted = muted;
|
|
106
106
|
if (self.usingWebAudio) {
|
|
107
|
-
self.masterGain.gain.setValueAtTime(muted ? 0 : self._volume,
|
|
107
|
+
self.masterGain.gain.setValueAtTime(muted ? 0 : self._volume, Howler4.ctx.currentTime);
|
|
108
108
|
}
|
|
109
109
|
for (var i = 0; i < self._howls.length; i++) {
|
|
110
110
|
if (!self._howls[i]._webAudio) {
|
|
@@ -123,7 +123,7 @@ var require_howler = __commonJS({
|
|
|
123
123
|
* Handle stopping all sounds globally.
|
|
124
124
|
*/
|
|
125
125
|
stop: function() {
|
|
126
|
-
var self = this ||
|
|
126
|
+
var self = this || Howler4;
|
|
127
127
|
for (var i = 0; i < self._howls.length; i++) {
|
|
128
128
|
self._howls[i].stop();
|
|
129
129
|
}
|
|
@@ -134,7 +134,7 @@ var require_howler = __commonJS({
|
|
|
134
134
|
* @return {Howler}
|
|
135
135
|
*/
|
|
136
136
|
unload: function() {
|
|
137
|
-
var self = this ||
|
|
137
|
+
var self = this || Howler4;
|
|
138
138
|
for (var i = self._howls.length - 1; i >= 0; i--) {
|
|
139
139
|
self._howls[i].unload();
|
|
140
140
|
}
|
|
@@ -151,14 +151,14 @@ var require_howler = __commonJS({
|
|
|
151
151
|
* @return {Boolean}
|
|
152
152
|
*/
|
|
153
153
|
codecs: function(ext) {
|
|
154
|
-
return (this ||
|
|
154
|
+
return (this || Howler4)._codecs[ext.replace(/^x-/, "")];
|
|
155
155
|
},
|
|
156
156
|
/**
|
|
157
157
|
* Setup various state values for global tracking.
|
|
158
158
|
* @return {Howler}
|
|
159
159
|
*/
|
|
160
160
|
_setup: function() {
|
|
161
|
-
var self = this ||
|
|
161
|
+
var self = this || Howler4;
|
|
162
162
|
self.state = self.ctx ? self.ctx.state || "suspended" : "suspended";
|
|
163
163
|
self._autoSuspend();
|
|
164
164
|
if (!self.usingWebAudio) {
|
|
@@ -192,7 +192,7 @@ var require_howler = __commonJS({
|
|
|
192
192
|
* @return {Howler}
|
|
193
193
|
*/
|
|
194
194
|
_setupCodecs: function() {
|
|
195
|
-
var self = this ||
|
|
195
|
+
var self = this || Howler4;
|
|
196
196
|
var audioTest = null;
|
|
197
197
|
try {
|
|
198
198
|
audioTest = typeof Audio !== "undefined" ? new Audio() : null;
|
|
@@ -235,7 +235,7 @@ var require_howler = __commonJS({
|
|
|
235
235
|
* @return {Howler}
|
|
236
236
|
*/
|
|
237
237
|
_unlockAudio: function() {
|
|
238
|
-
var self = this ||
|
|
238
|
+
var self = this || Howler4;
|
|
239
239
|
if (self._audioUnlocked || !self.ctx) {
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
@@ -305,7 +305,7 @@ var require_howler = __commonJS({
|
|
|
305
305
|
* @return {Audio} HTML5 Audio object.
|
|
306
306
|
*/
|
|
307
307
|
_obtainHtml5Audio: function() {
|
|
308
|
-
var self = this ||
|
|
308
|
+
var self = this || Howler4;
|
|
309
309
|
if (self._html5AudioPool.length) {
|
|
310
310
|
return self._html5AudioPool.pop();
|
|
311
311
|
}
|
|
@@ -322,7 +322,7 @@ var require_howler = __commonJS({
|
|
|
322
322
|
* @return {Howler}
|
|
323
323
|
*/
|
|
324
324
|
_releaseHtml5Audio: function(audio) {
|
|
325
|
-
var self = this ||
|
|
325
|
+
var self = this || Howler4;
|
|
326
326
|
if (audio._unlocked) {
|
|
327
327
|
self._html5AudioPool.push(audio);
|
|
328
328
|
}
|
|
@@ -335,7 +335,7 @@ var require_howler = __commonJS({
|
|
|
335
335
|
*/
|
|
336
336
|
_autoSuspend: function() {
|
|
337
337
|
var self = this;
|
|
338
|
-
if (!self.autoSuspend || !self.ctx || typeof self.ctx.suspend === "undefined" || !
|
|
338
|
+
if (!self.autoSuspend || !self.ctx || typeof self.ctx.suspend === "undefined" || !Howler4.usingWebAudio) {
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
341
|
for (var i = 0; i < self._howls.length; i++) {
|
|
@@ -373,7 +373,7 @@ var require_howler = __commonJS({
|
|
|
373
373
|
*/
|
|
374
374
|
_autoResume: function() {
|
|
375
375
|
var self = this;
|
|
376
|
-
if (!self.ctx || typeof self.ctx.resume === "undefined" || !
|
|
376
|
+
if (!self.ctx || typeof self.ctx.resume === "undefined" || !Howler4.usingWebAudio) {
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
379
|
if (self.state === "running" && self.ctx.state !== "interrupted" && self._suspendTimer) {
|
|
@@ -396,7 +396,7 @@ var require_howler = __commonJS({
|
|
|
396
396
|
return self;
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
|
-
var
|
|
399
|
+
var Howler4 = new HowlerGlobal2();
|
|
400
400
|
var Howl3 = function(o) {
|
|
401
401
|
var self = this;
|
|
402
402
|
if (!o.src || o.src.length === 0) {
|
|
@@ -413,7 +413,7 @@ var require_howler = __commonJS({
|
|
|
413
413
|
*/
|
|
414
414
|
init: function(o) {
|
|
415
415
|
var self = this;
|
|
416
|
-
if (!
|
|
416
|
+
if (!Howler4.ctx) {
|
|
417
417
|
setupAudioContext();
|
|
418
418
|
}
|
|
419
419
|
self._autoplay = o.autoplay || false;
|
|
@@ -452,11 +452,11 @@ var require_howler = __commonJS({
|
|
|
452
452
|
self._onseek = o.onseek ? [{ fn: o.onseek }] : [];
|
|
453
453
|
self._onunlock = o.onunlock ? [{ fn: o.onunlock }] : [];
|
|
454
454
|
self._onresume = [];
|
|
455
|
-
self._webAudio =
|
|
456
|
-
if (typeof
|
|
457
|
-
|
|
455
|
+
self._webAudio = Howler4.usingWebAudio && !self._html5;
|
|
456
|
+
if (typeof Howler4.ctx !== "undefined" && Howler4.ctx && Howler4.autoUnlock) {
|
|
457
|
+
Howler4._unlockAudio();
|
|
458
458
|
}
|
|
459
|
-
|
|
459
|
+
Howler4._howls.push(self);
|
|
460
460
|
if (self._autoplay) {
|
|
461
461
|
self._queue.push({
|
|
462
462
|
event: "play",
|
|
@@ -477,7 +477,7 @@ var require_howler = __commonJS({
|
|
|
477
477
|
load: function() {
|
|
478
478
|
var self = this;
|
|
479
479
|
var url = null;
|
|
480
|
-
if (
|
|
480
|
+
if (Howler4.noAudio) {
|
|
481
481
|
self._emit("loaderror", null, "No audio support.");
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
@@ -505,7 +505,7 @@ var require_howler = __commonJS({
|
|
|
505
505
|
if (!ext) {
|
|
506
506
|
console.warn('No file extension was found. Consider using the "format" property or specify an extension.');
|
|
507
507
|
}
|
|
508
|
-
if (ext &&
|
|
508
|
+
if (ext && Howler4.codecs(ext)) {
|
|
509
509
|
url = self._src[i];
|
|
510
510
|
break;
|
|
511
511
|
}
|
|
@@ -583,7 +583,7 @@ var require_howler = __commonJS({
|
|
|
583
583
|
return sound._id;
|
|
584
584
|
}
|
|
585
585
|
if (self._webAudio) {
|
|
586
|
-
|
|
586
|
+
Howler4._autoResume();
|
|
587
587
|
}
|
|
588
588
|
var seek = Math.max(0, sound._seek > 0 ? sound._seek : self._sprite[sprite][0] / 1e3);
|
|
589
589
|
var duration = Math.max(0, (self._sprite[sprite][0] + self._sprite[sprite][1]) / 1e3 - seek);
|
|
@@ -610,8 +610,8 @@ var require_howler = __commonJS({
|
|
|
610
610
|
setParams();
|
|
611
611
|
self._refreshBuffer(sound);
|
|
612
612
|
var vol = sound._muted || self._muted ? 0 : sound._volume;
|
|
613
|
-
node.gain.setValueAtTime(vol,
|
|
614
|
-
sound._playStart =
|
|
613
|
+
node.gain.setValueAtTime(vol, Howler4.ctx.currentTime);
|
|
614
|
+
sound._playStart = Howler4.ctx.currentTime;
|
|
615
615
|
if (typeof node.bufferSource.start === "undefined") {
|
|
616
616
|
sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration);
|
|
617
617
|
} else {
|
|
@@ -627,7 +627,7 @@ var require_howler = __commonJS({
|
|
|
627
627
|
}, 0);
|
|
628
628
|
}
|
|
629
629
|
};
|
|
630
|
-
if (
|
|
630
|
+
if (Howler4.state === "running" && Howler4.ctx.state !== "interrupted") {
|
|
631
631
|
playWebAudio();
|
|
632
632
|
} else {
|
|
633
633
|
self._playLock = true;
|
|
@@ -637,8 +637,8 @@ var require_howler = __commonJS({
|
|
|
637
637
|
} else {
|
|
638
638
|
var playHtml5 = function() {
|
|
639
639
|
node.currentTime = seek;
|
|
640
|
-
node.muted = sound._muted || self._muted ||
|
|
641
|
-
node.volume = sound._volume *
|
|
640
|
+
node.muted = sound._muted || self._muted || Howler4._muted || node.muted;
|
|
641
|
+
node.volume = sound._volume * Howler4.volume();
|
|
642
642
|
node.playbackRate = sound._rate;
|
|
643
643
|
try {
|
|
644
644
|
var play = node.play();
|
|
@@ -686,7 +686,7 @@ var require_howler = __commonJS({
|
|
|
686
686
|
node.src = self._src;
|
|
687
687
|
node.load();
|
|
688
688
|
}
|
|
689
|
-
var loadedNoReadyState = window && window.ejecta || !node.readyState &&
|
|
689
|
+
var loadedNoReadyState = window && window.ejecta || !node.readyState && Howler4._navigator.isCocoonJS;
|
|
690
690
|
if (node.readyState >= 3 || loadedNoReadyState) {
|
|
691
691
|
playHtml5();
|
|
692
692
|
} else {
|
|
@@ -695,9 +695,9 @@ var require_howler = __commonJS({
|
|
|
695
695
|
var listener = function() {
|
|
696
696
|
self._state = "loaded";
|
|
697
697
|
playHtml5();
|
|
698
|
-
node.removeEventListener(
|
|
698
|
+
node.removeEventListener(Howler4._canPlayEvent, listener, false);
|
|
699
699
|
};
|
|
700
|
-
node.addEventListener(
|
|
700
|
+
node.addEventListener(Howler4._canPlayEvent, listener, false);
|
|
701
701
|
self._clearTimer(sound._id);
|
|
702
702
|
}
|
|
703
703
|
}
|
|
@@ -835,9 +835,9 @@ var require_howler = __commonJS({
|
|
|
835
835
|
self._stopFade(sound._id);
|
|
836
836
|
}
|
|
837
837
|
if (self._webAudio && sound._node) {
|
|
838
|
-
sound._node.gain.setValueAtTime(muted ? 0 : sound._volume,
|
|
838
|
+
sound._node.gain.setValueAtTime(muted ? 0 : sound._volume, Howler4.ctx.currentTime);
|
|
839
839
|
} else if (sound._node) {
|
|
840
|
-
sound._node.muted =
|
|
840
|
+
sound._node.muted = Howler4._muted ? true : muted;
|
|
841
841
|
}
|
|
842
842
|
self._emit("mute", sound._id);
|
|
843
843
|
}
|
|
@@ -893,9 +893,9 @@ var require_howler = __commonJS({
|
|
|
893
893
|
self._stopFade(id[i]);
|
|
894
894
|
}
|
|
895
895
|
if (self._webAudio && sound._node && !sound._muted) {
|
|
896
|
-
sound._node.gain.setValueAtTime(vol,
|
|
896
|
+
sound._node.gain.setValueAtTime(vol, Howler4.ctx.currentTime);
|
|
897
897
|
} else if (sound._node && !sound._muted) {
|
|
898
|
-
sound._node.volume = vol *
|
|
898
|
+
sound._node.volume = vol * Howler4.volume();
|
|
899
899
|
}
|
|
900
900
|
self._emit("volume", sound._id);
|
|
901
901
|
}
|
|
@@ -937,7 +937,7 @@ var require_howler = __commonJS({
|
|
|
937
937
|
self._stopFade(ids[i]);
|
|
938
938
|
}
|
|
939
939
|
if (self._webAudio && !sound._muted) {
|
|
940
|
-
var currentTime =
|
|
940
|
+
var currentTime = Howler4.ctx.currentTime;
|
|
941
941
|
var end = currentTime + len / 1e3;
|
|
942
942
|
sound._volume = from;
|
|
943
943
|
sound._node.gain.setValueAtTime(from, currentTime);
|
|
@@ -1003,7 +1003,7 @@ var require_howler = __commonJS({
|
|
|
1003
1003
|
var sound = self._soundById(id);
|
|
1004
1004
|
if (sound && sound._interval) {
|
|
1005
1005
|
if (self._webAudio) {
|
|
1006
|
-
sound._node.gain.cancelScheduledValues(
|
|
1006
|
+
sound._node.gain.cancelScheduledValues(Howler4.ctx.currentTime);
|
|
1007
1007
|
}
|
|
1008
1008
|
clearInterval(sound._interval);
|
|
1009
1009
|
sound._interval = null;
|
|
@@ -1105,11 +1105,11 @@ var require_howler = __commonJS({
|
|
|
1105
1105
|
if (sound) {
|
|
1106
1106
|
if (self.playing(id[i])) {
|
|
1107
1107
|
sound._rateSeek = self.seek(id[i]);
|
|
1108
|
-
sound._playStart = self._webAudio ?
|
|
1108
|
+
sound._playStart = self._webAudio ? Howler4.ctx.currentTime : sound._playStart;
|
|
1109
1109
|
}
|
|
1110
1110
|
sound._rate = rate;
|
|
1111
1111
|
if (self._webAudio && sound._node && sound._node.bufferSource) {
|
|
1112
|
-
sound._node.bufferSource.playbackRate.setValueAtTime(rate,
|
|
1112
|
+
sound._node.bufferSource.playbackRate.setValueAtTime(rate, Howler4.ctx.currentTime);
|
|
1113
1113
|
} else if (sound._node) {
|
|
1114
1114
|
sound._node.playbackRate = rate;
|
|
1115
1115
|
}
|
|
@@ -1203,7 +1203,7 @@ var require_howler = __commonJS({
|
|
|
1203
1203
|
}
|
|
1204
1204
|
} else {
|
|
1205
1205
|
if (self._webAudio) {
|
|
1206
|
-
var realTime = self.playing(id) ?
|
|
1206
|
+
var realTime = self.playing(id) ? Howler4.ctx.currentTime - sound._playStart : 0;
|
|
1207
1207
|
var rateSeek = sound._rateSeek ? sound._rateSeek - sound._seek : 0;
|
|
1208
1208
|
return sound._seek + (rateSeek + realTime * Math.abs(sound._rate));
|
|
1209
1209
|
} else {
|
|
@@ -1266,20 +1266,20 @@ var require_howler = __commonJS({
|
|
|
1266
1266
|
if (!self._webAudio) {
|
|
1267
1267
|
self._clearSound(sounds[i]._node);
|
|
1268
1268
|
sounds[i]._node.removeEventListener("error", sounds[i]._errorFn, false);
|
|
1269
|
-
sounds[i]._node.removeEventListener(
|
|
1269
|
+
sounds[i]._node.removeEventListener(Howler4._canPlayEvent, sounds[i]._loadFn, false);
|
|
1270
1270
|
sounds[i]._node.removeEventListener("ended", sounds[i]._endFn, false);
|
|
1271
|
-
|
|
1271
|
+
Howler4._releaseHtml5Audio(sounds[i]._node);
|
|
1272
1272
|
}
|
|
1273
1273
|
delete sounds[i]._node;
|
|
1274
1274
|
self._clearTimer(sounds[i]._id);
|
|
1275
1275
|
}
|
|
1276
|
-
var index =
|
|
1276
|
+
var index = Howler4._howls.indexOf(self);
|
|
1277
1277
|
if (index >= 0) {
|
|
1278
|
-
|
|
1278
|
+
Howler4._howls.splice(index, 1);
|
|
1279
1279
|
}
|
|
1280
1280
|
var remCache = true;
|
|
1281
|
-
for (i = 0; i <
|
|
1282
|
-
if (
|
|
1281
|
+
for (i = 0; i < Howler4._howls.length; i++) {
|
|
1282
|
+
if (Howler4._howls[i]._src === self._src || self._src.indexOf(Howler4._howls[i]._src) >= 0) {
|
|
1283
1283
|
remCache = false;
|
|
1284
1284
|
break;
|
|
1285
1285
|
}
|
|
@@ -1287,7 +1287,7 @@ var require_howler = __commonJS({
|
|
|
1287
1287
|
if (cache && remCache) {
|
|
1288
1288
|
delete cache[self._src];
|
|
1289
1289
|
}
|
|
1290
|
-
|
|
1290
|
+
Howler4.noAudio = false;
|
|
1291
1291
|
self._state = "unloaded";
|
|
1292
1292
|
self._sounds = [];
|
|
1293
1293
|
self = null;
|
|
@@ -1420,7 +1420,7 @@ var require_howler = __commonJS({
|
|
|
1420
1420
|
self._emit("play", sound._id);
|
|
1421
1421
|
sound._seek = sound._start || 0;
|
|
1422
1422
|
sound._rateSeek = 0;
|
|
1423
|
-
sound._playStart =
|
|
1423
|
+
sound._playStart = Howler4.ctx.currentTime;
|
|
1424
1424
|
var timeout = (sound._stop - sound._start) * 1e3 / Math.abs(sound._rate);
|
|
1425
1425
|
self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
|
|
1426
1426
|
}
|
|
@@ -1431,7 +1431,7 @@ var require_howler = __commonJS({
|
|
|
1431
1431
|
sound._rateSeek = 0;
|
|
1432
1432
|
self._clearTimer(sound._id);
|
|
1433
1433
|
self._cleanBuffer(sound._node);
|
|
1434
|
-
|
|
1434
|
+
Howler4._autoSuspend();
|
|
1435
1435
|
}
|
|
1436
1436
|
if (!self._webAudio && !loop) {
|
|
1437
1437
|
self.stop(sound._id, true);
|
|
@@ -1539,7 +1539,7 @@ var require_howler = __commonJS({
|
|
|
1539
1539
|
*/
|
|
1540
1540
|
_refreshBuffer: function(sound) {
|
|
1541
1541
|
var self = this;
|
|
1542
|
-
sound._node.bufferSource =
|
|
1542
|
+
sound._node.bufferSource = Howler4.ctx.createBufferSource();
|
|
1543
1543
|
sound._node.bufferSource.buffer = cache[self._src];
|
|
1544
1544
|
if (sound._panner) {
|
|
1545
1545
|
sound._node.bufferSource.connect(sound._panner);
|
|
@@ -1551,7 +1551,7 @@ var require_howler = __commonJS({
|
|
|
1551
1551
|
sound._node.bufferSource.loopStart = sound._start || 0;
|
|
1552
1552
|
sound._node.bufferSource.loopEnd = sound._stop || 0;
|
|
1553
1553
|
}
|
|
1554
|
-
sound._node.bufferSource.playbackRate.setValueAtTime(sound._rate,
|
|
1554
|
+
sound._node.bufferSource.playbackRate.setValueAtTime(sound._rate, Howler4.ctx.currentTime);
|
|
1555
1555
|
return self;
|
|
1556
1556
|
},
|
|
1557
1557
|
/**
|
|
@@ -1561,16 +1561,16 @@ var require_howler = __commonJS({
|
|
|
1561
1561
|
*/
|
|
1562
1562
|
_cleanBuffer: function(node) {
|
|
1563
1563
|
var self = this;
|
|
1564
|
-
var isIOS =
|
|
1564
|
+
var isIOS = Howler4._navigator && Howler4._navigator.vendor.indexOf("Apple") >= 0;
|
|
1565
1565
|
if (!node.bufferSource) {
|
|
1566
1566
|
return self;
|
|
1567
1567
|
}
|
|
1568
|
-
if (
|
|
1568
|
+
if (Howler4._scratchBuffer && node.bufferSource) {
|
|
1569
1569
|
node.bufferSource.onended = null;
|
|
1570
1570
|
node.bufferSource.disconnect(0);
|
|
1571
1571
|
if (isIOS) {
|
|
1572
1572
|
try {
|
|
1573
|
-
node.bufferSource.buffer =
|
|
1573
|
+
node.bufferSource.buffer = Howler4._scratchBuffer;
|
|
1574
1574
|
} catch (e) {
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
@@ -1583,7 +1583,7 @@ var require_howler = __commonJS({
|
|
|
1583
1583
|
* @param {Object} node Audio node to clear.
|
|
1584
1584
|
*/
|
|
1585
1585
|
_clearSound: function(node) {
|
|
1586
|
-
var checkIE = /MSIE |Trident\//.test(
|
|
1586
|
+
var checkIE = /MSIE |Trident\//.test(Howler4._navigator && Howler4._navigator.userAgent);
|
|
1587
1587
|
if (!checkIE) {
|
|
1588
1588
|
node.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA";
|
|
1589
1589
|
}
|
|
@@ -1609,7 +1609,7 @@ var require_howler = __commonJS({
|
|
|
1609
1609
|
self._paused = true;
|
|
1610
1610
|
self._ended = true;
|
|
1611
1611
|
self._sprite = "__default";
|
|
1612
|
-
self._id = ++
|
|
1612
|
+
self._id = ++Howler4._counter;
|
|
1613
1613
|
parent._sounds.push(self);
|
|
1614
1614
|
self.create();
|
|
1615
1615
|
return self;
|
|
@@ -1621,23 +1621,23 @@ var require_howler = __commonJS({
|
|
|
1621
1621
|
create: function() {
|
|
1622
1622
|
var self = this;
|
|
1623
1623
|
var parent = self._parent;
|
|
1624
|
-
var volume =
|
|
1624
|
+
var volume = Howler4._muted || self._muted || self._parent._muted ? 0 : self._volume;
|
|
1625
1625
|
if (parent._webAudio) {
|
|
1626
|
-
self._node = typeof
|
|
1627
|
-
self._node.gain.setValueAtTime(volume,
|
|
1626
|
+
self._node = typeof Howler4.ctx.createGain === "undefined" ? Howler4.ctx.createGainNode() : Howler4.ctx.createGain();
|
|
1627
|
+
self._node.gain.setValueAtTime(volume, Howler4.ctx.currentTime);
|
|
1628
1628
|
self._node.paused = true;
|
|
1629
|
-
self._node.connect(
|
|
1630
|
-
} else if (!
|
|
1631
|
-
self._node =
|
|
1629
|
+
self._node.connect(Howler4.masterGain);
|
|
1630
|
+
} else if (!Howler4.noAudio) {
|
|
1631
|
+
self._node = Howler4._obtainHtml5Audio();
|
|
1632
1632
|
self._errorFn = self._errorListener.bind(self);
|
|
1633
1633
|
self._node.addEventListener("error", self._errorFn, false);
|
|
1634
1634
|
self._loadFn = self._loadListener.bind(self);
|
|
1635
|
-
self._node.addEventListener(
|
|
1635
|
+
self._node.addEventListener(Howler4._canPlayEvent, self._loadFn, false);
|
|
1636
1636
|
self._endFn = self._endListener.bind(self);
|
|
1637
1637
|
self._node.addEventListener("ended", self._endFn, false);
|
|
1638
1638
|
self._node.src = parent._src;
|
|
1639
1639
|
self._node.preload = parent._preload === true ? "auto" : parent._preload;
|
|
1640
|
-
self._node.volume = volume *
|
|
1640
|
+
self._node.volume = volume * Howler4.volume();
|
|
1641
1641
|
self._node.load();
|
|
1642
1642
|
}
|
|
1643
1643
|
return self;
|
|
@@ -1658,7 +1658,7 @@ var require_howler = __commonJS({
|
|
|
1658
1658
|
self._paused = true;
|
|
1659
1659
|
self._ended = true;
|
|
1660
1660
|
self._sprite = "__default";
|
|
1661
|
-
self._id = ++
|
|
1661
|
+
self._id = ++Howler4._counter;
|
|
1662
1662
|
return self;
|
|
1663
1663
|
},
|
|
1664
1664
|
/**
|
|
@@ -1684,7 +1684,7 @@ var require_howler = __commonJS({
|
|
|
1684
1684
|
parent._emit("load");
|
|
1685
1685
|
parent._loadQueue();
|
|
1686
1686
|
}
|
|
1687
|
-
self._node.removeEventListener(
|
|
1687
|
+
self._node.removeEventListener(Howler4._canPlayEvent, self._loadFn, false);
|
|
1688
1688
|
},
|
|
1689
1689
|
/**
|
|
1690
1690
|
* HTML5 Audio ended listener callback.
|
|
@@ -1766,10 +1766,10 @@ var require_howler = __commonJS({
|
|
|
1766
1766
|
error();
|
|
1767
1767
|
}
|
|
1768
1768
|
};
|
|
1769
|
-
if (typeof Promise !== "undefined" &&
|
|
1770
|
-
|
|
1769
|
+
if (typeof Promise !== "undefined" && Howler4.ctx.decodeAudioData.length === 1) {
|
|
1770
|
+
Howler4.ctx.decodeAudioData(arraybuffer).then(success).catch(error);
|
|
1771
1771
|
} else {
|
|
1772
|
-
|
|
1772
|
+
Howler4.ctx.decodeAudioData(arraybuffer, success, error);
|
|
1773
1773
|
}
|
|
1774
1774
|
};
|
|
1775
1775
|
var loadSound = function(self, buffer) {
|
|
@@ -1786,59 +1786,59 @@ var require_howler = __commonJS({
|
|
|
1786
1786
|
}
|
|
1787
1787
|
};
|
|
1788
1788
|
var setupAudioContext = function() {
|
|
1789
|
-
if (!
|
|
1789
|
+
if (!Howler4.usingWebAudio) {
|
|
1790
1790
|
return;
|
|
1791
1791
|
}
|
|
1792
1792
|
try {
|
|
1793
1793
|
if (typeof AudioContext !== "undefined") {
|
|
1794
|
-
|
|
1794
|
+
Howler4.ctx = new AudioContext();
|
|
1795
1795
|
} else if (typeof webkitAudioContext !== "undefined") {
|
|
1796
|
-
|
|
1796
|
+
Howler4.ctx = new webkitAudioContext();
|
|
1797
1797
|
} else {
|
|
1798
|
-
|
|
1798
|
+
Howler4.usingWebAudio = false;
|
|
1799
1799
|
}
|
|
1800
1800
|
} catch (e) {
|
|
1801
|
-
|
|
1801
|
+
Howler4.usingWebAudio = false;
|
|
1802
1802
|
}
|
|
1803
|
-
if (!
|
|
1804
|
-
|
|
1803
|
+
if (!Howler4.ctx) {
|
|
1804
|
+
Howler4.usingWebAudio = false;
|
|
1805
1805
|
}
|
|
1806
|
-
var iOS = /iP(hone|od|ad)/.test(
|
|
1807
|
-
var appVersion =
|
|
1806
|
+
var iOS = /iP(hone|od|ad)/.test(Howler4._navigator && Howler4._navigator.platform);
|
|
1807
|
+
var appVersion = Howler4._navigator && Howler4._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
|
|
1808
1808
|
var version = appVersion ? parseInt(appVersion[1], 10) : null;
|
|
1809
1809
|
if (iOS && version && version < 9) {
|
|
1810
|
-
var safari = /safari/.test(
|
|
1811
|
-
if (
|
|
1812
|
-
|
|
1810
|
+
var safari = /safari/.test(Howler4._navigator && Howler4._navigator.userAgent.toLowerCase());
|
|
1811
|
+
if (Howler4._navigator && !safari) {
|
|
1812
|
+
Howler4.usingWebAudio = false;
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
|
-
if (
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1815
|
+
if (Howler4.usingWebAudio) {
|
|
1816
|
+
Howler4.masterGain = typeof Howler4.ctx.createGain === "undefined" ? Howler4.ctx.createGainNode() : Howler4.ctx.createGain();
|
|
1817
|
+
Howler4.masterGain.gain.setValueAtTime(Howler4._muted ? 0 : Howler4._volume, Howler4.ctx.currentTime);
|
|
1818
|
+
Howler4.masterGain.connect(Howler4.ctx.destination);
|
|
1819
1819
|
}
|
|
1820
|
-
|
|
1820
|
+
Howler4._setup();
|
|
1821
1821
|
};
|
|
1822
1822
|
if (typeof define === "function" && define.amd) {
|
|
1823
1823
|
define([], function() {
|
|
1824
1824
|
return {
|
|
1825
|
-
Howler:
|
|
1825
|
+
Howler: Howler4,
|
|
1826
1826
|
Howl: Howl3
|
|
1827
1827
|
};
|
|
1828
1828
|
});
|
|
1829
1829
|
}
|
|
1830
1830
|
if (typeof exports !== "undefined") {
|
|
1831
|
-
exports.Howler =
|
|
1831
|
+
exports.Howler = Howler4;
|
|
1832
1832
|
exports.Howl = Howl3;
|
|
1833
1833
|
}
|
|
1834
1834
|
if (typeof global !== "undefined") {
|
|
1835
1835
|
global.HowlerGlobal = HowlerGlobal2;
|
|
1836
|
-
global.Howler =
|
|
1836
|
+
global.Howler = Howler4;
|
|
1837
1837
|
global.Howl = Howl3;
|
|
1838
1838
|
global.Sound = Sound2;
|
|
1839
1839
|
} else if (typeof window !== "undefined") {
|
|
1840
1840
|
window.HowlerGlobal = HowlerGlobal2;
|
|
1841
|
-
window.Howler =
|
|
1841
|
+
window.Howler = Howler4;
|
|
1842
1842
|
window.Howl = Howl3;
|
|
1843
1843
|
window.Sound = Sound2;
|
|
1844
1844
|
}
|
|
@@ -2297,6 +2297,22 @@ function cn(...values) {
|
|
|
2297
2297
|
|
|
2298
2298
|
// src/audio/howl.ts
|
|
2299
2299
|
var import_howler = __toESM(require_howler());
|
|
2300
|
+
|
|
2301
|
+
// src/media-activation-event.ts
|
|
2302
|
+
function isMediaActivationEvent(event) {
|
|
2303
|
+
switch (event.type) {
|
|
2304
|
+
case "keydown":
|
|
2305
|
+
return event instanceof KeyboardEvent && event.key !== "Escape";
|
|
2306
|
+
case "pointerdown":
|
|
2307
|
+
return event instanceof PointerEvent && event.pointerType === "mouse";
|
|
2308
|
+
case "pointerup":
|
|
2309
|
+
return event instanceof PointerEvent && event.pointerType !== "mouse";
|
|
2310
|
+
default:
|
|
2311
|
+
return false;
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
// src/audio/howl.ts
|
|
2300
2316
|
import_howler.Howler.autoUnlock = true;
|
|
2301
2317
|
function resumePanoAudio() {
|
|
2302
2318
|
if (!import_howler.Howler.ctx || import_howler.Howler.ctx.state === "running") {
|
|
@@ -2304,6 +2320,9 @@ function resumePanoAudio() {
|
|
|
2304
2320
|
}
|
|
2305
2321
|
return import_howler.Howler.ctx.resume();
|
|
2306
2322
|
}
|
|
2323
|
+
function isPanoAudioUnlocked() {
|
|
2324
|
+
return !import_howler.Howler.ctx || import_howler.Howler.ctx.state === "running";
|
|
2325
|
+
}
|
|
2307
2326
|
function sourceList(src) {
|
|
2308
2327
|
if (src == null) {
|
|
2309
2328
|
return [];
|
|
@@ -2369,7 +2388,10 @@ function createUnlockingHowl({
|
|
|
2369
2388
|
blockedNotified = true;
|
|
2370
2389
|
onPlayError?.(error);
|
|
2371
2390
|
}
|
|
2372
|
-
const retry = () => {
|
|
2391
|
+
const retry = (event) => {
|
|
2392
|
+
if (!isMediaActivationEvent(event)) {
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2373
2395
|
removeUnlockListeners();
|
|
2374
2396
|
if (!disposed && isActive() && shouldRetryPlay()) {
|
|
2375
2397
|
void resumePanoAudio();
|
|
@@ -2378,8 +2400,10 @@ function createUnlockingHowl({
|
|
|
2378
2400
|
};
|
|
2379
2401
|
removeUnlockListeners();
|
|
2380
2402
|
unlockListeners.push({ type: "pointerdown", listener: retry });
|
|
2403
|
+
unlockListeners.push({ type: "pointerup", listener: retry });
|
|
2381
2404
|
unlockListeners.push({ type: "keydown", listener: retry });
|
|
2382
2405
|
window.addEventListener("pointerdown", retry, { capture: true });
|
|
2406
|
+
window.addEventListener("pointerup", retry, { capture: true });
|
|
2383
2407
|
window.addEventListener("keydown", retry, { capture: true });
|
|
2384
2408
|
}
|
|
2385
2409
|
});
|
|
@@ -3807,8 +3831,8 @@ function isProduction2() {
|
|
|
3807
3831
|
}
|
|
3808
3832
|
|
|
3809
3833
|
// src/media-activation.tsx
|
|
3834
|
+
var import_howler2 = __toESM(require_howler());
|
|
3810
3835
|
import { createContext as createContext8, useContext as useContext7, useEffect as useEffect6, useRef as useRef6 } from "react";
|
|
3811
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
3812
3836
|
var PanoMediaActivationHostContext = createContext8(null);
|
|
3813
3837
|
function createPanoMediaActivationHost() {
|
|
3814
3838
|
return { intents: /* @__PURE__ */ new Set(), listeners: /* @__PURE__ */ new Set(), revision: 0 };
|
|
@@ -3831,6 +3855,15 @@ function subscribePanoMediaActivation(host, listener) {
|
|
|
3831
3855
|
function hasPanoMediaActivationIntent(host) {
|
|
3832
3856
|
return host.intents.size > 0;
|
|
3833
3857
|
}
|
|
3858
|
+
function needsMediaGesture() {
|
|
3859
|
+
if (typeof navigator !== "undefined" && navigator.userActivation?.hasBeenActive) {
|
|
3860
|
+
return false;
|
|
3861
|
+
}
|
|
3862
|
+
if (import_howler2.Howler.ctx?.state === "running") {
|
|
3863
|
+
return false;
|
|
3864
|
+
}
|
|
3865
|
+
return true;
|
|
3866
|
+
}
|
|
3834
3867
|
function usePanoMediaActivationIntent(required) {
|
|
3835
3868
|
const host = useContext7(PanoMediaActivationHostContext);
|
|
3836
3869
|
const keyRef = useRef6(null);
|
|
@@ -3850,23 +3883,6 @@ function usePanoMediaActivationIntent(required) {
|
|
|
3850
3883
|
};
|
|
3851
3884
|
}, [host, required]);
|
|
3852
3885
|
}
|
|
3853
|
-
function PanoMediaActivationOverlay({
|
|
3854
|
-
ariaLabel = "Enable sound",
|
|
3855
|
-
className,
|
|
3856
|
-
message = "Tap to enable sound",
|
|
3857
|
-
onActivate
|
|
3858
|
-
}) {
|
|
3859
|
-
return /* @__PURE__ */ jsx2("div", { className: cn("pano-media-activation", className), children: /* @__PURE__ */ jsx2(
|
|
3860
|
-
"button",
|
|
3861
|
-
{
|
|
3862
|
-
"aria-label": ariaLabel,
|
|
3863
|
-
className: "pano-media-activation-button",
|
|
3864
|
-
onClick: onActivate,
|
|
3865
|
-
type: "button",
|
|
3866
|
-
children: message
|
|
3867
|
-
}
|
|
3868
|
-
) });
|
|
3869
|
-
}
|
|
3870
3886
|
|
|
3871
3887
|
// src/pano-context-menu.tsx
|
|
3872
3888
|
import {
|
|
@@ -3880,7 +3896,7 @@ import {
|
|
|
3880
3896
|
useRef as useRef7,
|
|
3881
3897
|
useState as useState2
|
|
3882
3898
|
} from "react";
|
|
3883
|
-
import { jsx as
|
|
3899
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
3884
3900
|
var DEFAULT_ICON_SIZE = 16;
|
|
3885
3901
|
var MENU_EDGE_PADDING = 8;
|
|
3886
3902
|
var MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY = 0.4;
|
|
@@ -4054,7 +4070,7 @@ function DefaultContextMenuPanel({
|
|
|
4054
4070
|
style: panelStyle,
|
|
4055
4071
|
tabIndex: -1,
|
|
4056
4072
|
children: [
|
|
4057
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ jsx2(
|
|
4058
4074
|
"div",
|
|
4059
4075
|
{
|
|
4060
4076
|
"aria-hidden": true,
|
|
@@ -4066,9 +4082,9 @@ function DefaultContextMenuPanel({
|
|
|
4066
4082
|
}
|
|
4067
4083
|
}
|
|
4068
4084
|
),
|
|
4069
|
-
/* @__PURE__ */
|
|
4085
|
+
/* @__PURE__ */ jsx2("div", { className: "pano-context-menu-items", children: visibleItems.map((item, index) => {
|
|
4070
4086
|
if (!isActionItem(item)) {
|
|
4071
|
-
return /* @__PURE__ */
|
|
4087
|
+
return /* @__PURE__ */ jsx2(
|
|
4072
4088
|
"div",
|
|
4073
4089
|
{
|
|
4074
4090
|
"aria-hidden": true,
|
|
@@ -4085,7 +4101,7 @@ function DefaultContextMenuPanel({
|
|
|
4085
4101
|
);
|
|
4086
4102
|
}
|
|
4087
4103
|
const disabled = item.disabled === true;
|
|
4088
|
-
const iconNode = item.icon ?? (item.image ? /* @__PURE__ */
|
|
4104
|
+
const iconNode = item.icon ?? (item.image ? /* @__PURE__ */ jsx2(
|
|
4089
4105
|
"img",
|
|
4090
4106
|
{
|
|
4091
4107
|
alt: item.imageAlt ?? "",
|
|
@@ -4135,7 +4151,7 @@ function DefaultContextMenuPanel({
|
|
|
4135
4151
|
tabIndex: disabled ? -1 : activeIndex === index ? 0 : -1,
|
|
4136
4152
|
type: "button",
|
|
4137
4153
|
children: [
|
|
4138
|
-
/* @__PURE__ */
|
|
4154
|
+
/* @__PURE__ */ jsx2(
|
|
4139
4155
|
"span",
|
|
4140
4156
|
{
|
|
4141
4157
|
"aria-hidden": true,
|
|
@@ -4147,7 +4163,7 @@ function DefaultContextMenuPanel({
|
|
|
4147
4163
|
children: iconNode
|
|
4148
4164
|
}
|
|
4149
4165
|
),
|
|
4150
|
-
/* @__PURE__ */
|
|
4166
|
+
/* @__PURE__ */ jsx2("span", { style: { flex: 1 }, children: item.label })
|
|
4151
4167
|
]
|
|
4152
4168
|
},
|
|
4153
4169
|
item.id
|
|
@@ -4200,7 +4216,7 @@ function PositionedMenuShell({
|
|
|
4200
4216
|
top: Math.min(Math.max(rawTop, MENU_EDGE_PADDING), maxTop)
|
|
4201
4217
|
});
|
|
4202
4218
|
}, [clientX, clientY, overlayElement, children, viewportRevision]);
|
|
4203
|
-
return /* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsx2(
|
|
4204
4220
|
"div",
|
|
4205
4221
|
{
|
|
4206
4222
|
className: "pano-context-menu-shell",
|
|
@@ -4259,7 +4275,7 @@ function usePanoContextMenuOverlay() {
|
|
|
4259
4275
|
document.removeEventListener("keydown", handleKeyDown);
|
|
4260
4276
|
};
|
|
4261
4277
|
}, [session2]);
|
|
4262
|
-
const overlay = /* @__PURE__ */
|
|
4278
|
+
const overlay = /* @__PURE__ */ jsx2(
|
|
4263
4279
|
"div",
|
|
4264
4280
|
{
|
|
4265
4281
|
ref: setOverlayNode,
|
|
@@ -4270,7 +4286,7 @@ function usePanoContextMenuOverlay() {
|
|
|
4270
4286
|
position: "absolute",
|
|
4271
4287
|
zIndex: 20
|
|
4272
4288
|
},
|
|
4273
|
-
children: session2 ? /* @__PURE__ */
|
|
4289
|
+
children: session2 ? /* @__PURE__ */ jsx2(
|
|
4274
4290
|
PositionedMenuShell,
|
|
4275
4291
|
{
|
|
4276
4292
|
clientX: session2.event.clientX,
|
|
@@ -4363,9 +4379,9 @@ function PanoContextMenu({
|
|
|
4363
4379
|
view,
|
|
4364
4380
|
render: () => {
|
|
4365
4381
|
if (hasCustomChildren && current.children) {
|
|
4366
|
-
return /* @__PURE__ */
|
|
4382
|
+
return /* @__PURE__ */ jsx2("div", { "data-pano-context-menu": true, style: { pointerEvents: "auto" }, children: current.children({ event, view, close }) });
|
|
4367
4383
|
}
|
|
4368
|
-
return /* @__PURE__ */
|
|
4384
|
+
return /* @__PURE__ */ jsx2(
|
|
4369
4385
|
DefaultContextMenuPanel,
|
|
4370
4386
|
{
|
|
4371
4387
|
appearance: current.appearance,
|
|
@@ -4416,14 +4432,14 @@ function ResetViewIcon() {
|
|
|
4416
4432
|
viewBox: "0 0 16 16",
|
|
4417
4433
|
width: "100%",
|
|
4418
4434
|
children: [
|
|
4419
|
-
/* @__PURE__ */
|
|
4420
|
-
/* @__PURE__ */
|
|
4435
|
+
/* @__PURE__ */ jsx2("path", { d: "M3.5 6.5A4.5 4.5 0 1 1 4 10" }),
|
|
4436
|
+
/* @__PURE__ */ jsx2("path", { d: "M3.5 3.5v3h3" })
|
|
4421
4437
|
]
|
|
4422
4438
|
}
|
|
4423
4439
|
);
|
|
4424
4440
|
}
|
|
4425
4441
|
function FullscreenIcon() {
|
|
4426
|
-
return /* @__PURE__ */
|
|
4442
|
+
return /* @__PURE__ */ jsx2(
|
|
4427
4443
|
"svg",
|
|
4428
4444
|
{
|
|
4429
4445
|
"aria-hidden": true,
|
|
@@ -4435,12 +4451,12 @@ function FullscreenIcon() {
|
|
|
4435
4451
|
strokeWidth: "1.75",
|
|
4436
4452
|
viewBox: "0 0 16 16",
|
|
4437
4453
|
width: "100%",
|
|
4438
|
-
children: /* @__PURE__ */
|
|
4454
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M3 6V3h3M10 3h3v3M13 10v3h-3M6 13H3v-3" })
|
|
4439
4455
|
}
|
|
4440
4456
|
);
|
|
4441
4457
|
}
|
|
4442
4458
|
function ExitFullscreenIcon() {
|
|
4443
|
-
return /* @__PURE__ */
|
|
4459
|
+
return /* @__PURE__ */ jsx2(
|
|
4444
4460
|
"svg",
|
|
4445
4461
|
{
|
|
4446
4462
|
"aria-hidden": true,
|
|
@@ -4452,7 +4468,7 @@ function ExitFullscreenIcon() {
|
|
|
4452
4468
|
strokeWidth: "1.75",
|
|
4453
4469
|
viewBox: "0 0 16 16",
|
|
4454
4470
|
width: "100%",
|
|
4455
|
-
children: /* @__PURE__ */
|
|
4471
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M6 3v3H3M10 3v3h3M3 10h3v3M10 10h3v3" })
|
|
4456
4472
|
}
|
|
4457
4473
|
);
|
|
4458
4474
|
}
|
|
@@ -4461,7 +4477,7 @@ function createPanoContextMenuPresets(actions) {
|
|
|
4461
4477
|
const resetView = {
|
|
4462
4478
|
id: "pano-reset-view",
|
|
4463
4479
|
label: "Reset view",
|
|
4464
|
-
icon: /* @__PURE__ */
|
|
4480
|
+
icon: /* @__PURE__ */ jsx2(ResetViewIcon, {}),
|
|
4465
4481
|
onSelect: () => {
|
|
4466
4482
|
actions.reset();
|
|
4467
4483
|
}
|
|
@@ -4469,7 +4485,7 @@ function createPanoContextMenuPresets(actions) {
|
|
|
4469
4485
|
const fullscreen = {
|
|
4470
4486
|
id: "pano-fullscreen",
|
|
4471
4487
|
label: isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
4472
|
-
icon: isFullscreen ? /* @__PURE__ */
|
|
4488
|
+
icon: isFullscreen ? /* @__PURE__ */ jsx2(ExitFullscreenIcon, {}) : /* @__PURE__ */ jsx2(FullscreenIcon, {}),
|
|
4473
4489
|
onSelect: () => {
|
|
4474
4490
|
actions.toggleFullscreen();
|
|
4475
4491
|
}
|
|
@@ -4574,7 +4590,7 @@ import {
|
|
|
4574
4590
|
useMemo as useMemo4,
|
|
4575
4591
|
useRef as useRef8
|
|
4576
4592
|
} from "react";
|
|
4577
|
-
import { jsx as
|
|
4593
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
4578
4594
|
var DEFAULT_PANO_CURSORS = {
|
|
4579
4595
|
default: "grab",
|
|
4580
4596
|
dragging: "grabbing",
|
|
@@ -4716,7 +4732,7 @@ function PanoCursorController({
|
|
|
4716
4732
|
release(PANO_DRAG_CLAIM_ID);
|
|
4717
4733
|
};
|
|
4718
4734
|
}, [claim, eventBus, release]);
|
|
4719
|
-
return /* @__PURE__ */
|
|
4735
|
+
return /* @__PURE__ */ jsx3(PanoCursorContext.Provider, { value: api, children });
|
|
4720
4736
|
}
|
|
4721
4737
|
|
|
4722
4738
|
// src/pano-events.tsx
|
|
@@ -5077,7 +5093,7 @@ var DEFAULT_PANORAMA_CAMERA_NEAR = 0.1;
|
|
|
5077
5093
|
var DEFAULT_PANORAMA_CAMERA_FAR = DEFAULT_PANORAMA_RADIUS * 2;
|
|
5078
5094
|
|
|
5079
5095
|
// src/panorama-event-surface.tsx
|
|
5080
|
-
import { jsx as
|
|
5096
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
5081
5097
|
var EVENT_SURFACE_RADIUS = DEFAULT_PANORAMA_RADIUS - 1;
|
|
5082
5098
|
function makePanoramaPointerEvent(event) {
|
|
5083
5099
|
const nativeEvent = event.nativeEvent;
|
|
@@ -5145,8 +5161,8 @@ function PanoramaEventSurface() {
|
|
|
5145
5161
|
onPointerUp: (event) => emit("pointerup", event),
|
|
5146
5162
|
onPointerMove: (event) => emit("pointermove", event),
|
|
5147
5163
|
children: [
|
|
5148
|
-
/* @__PURE__ */
|
|
5149
|
-
/* @__PURE__ */
|
|
5164
|
+
/* @__PURE__ */ jsx4("sphereGeometry", { args: [EVENT_SURFACE_RADIUS, 64, 32] }),
|
|
5165
|
+
/* @__PURE__ */ jsx4(
|
|
5150
5166
|
"meshBasicMaterial",
|
|
5151
5167
|
{
|
|
5152
5168
|
colorWrite: false,
|
|
@@ -5328,7 +5344,7 @@ function TouchControls({
|
|
|
5328
5344
|
|
|
5329
5345
|
// src/video/chrome-overlay.tsx
|
|
5330
5346
|
import { createContext as createContext12, useCallback as useCallback4, useMemo as useMemo5, useState as useState3 } from "react";
|
|
5331
|
-
import { jsx as
|
|
5347
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
5332
5348
|
var PanoChromeOverlayContext = createContext12(null);
|
|
5333
5349
|
function usePanoChromeOverlay() {
|
|
5334
5350
|
const [overlayElement, setOverlayElement] = useState3(
|
|
@@ -5341,7 +5357,7 @@ function usePanoChromeOverlay() {
|
|
|
5341
5357
|
() => ({ overlayElement }),
|
|
5342
5358
|
[overlayElement]
|
|
5343
5359
|
);
|
|
5344
|
-
const overlay = /* @__PURE__ */
|
|
5360
|
+
const overlay = /* @__PURE__ */ jsx5(
|
|
5345
5361
|
"div",
|
|
5346
5362
|
{
|
|
5347
5363
|
className: "pano-chrome-overlay",
|
|
@@ -5418,7 +5434,7 @@ import { useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
|
5418
5434
|
|
|
5419
5435
|
// src/video/pano-video-captions.tsx
|
|
5420
5436
|
import { useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
5421
|
-
import { jsx as
|
|
5437
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
5422
5438
|
var DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE = {
|
|
5423
5439
|
color: "#ffffff",
|
|
5424
5440
|
background: "rgba(0, 0, 0, 0.55)",
|
|
@@ -5466,13 +5482,13 @@ function PanoVideoCaptionsOverlay({
|
|
|
5466
5482
|
textShadow: snapshot.captionAppearance.textShadow,
|
|
5467
5483
|
whiteSpace: "pre-wrap"
|
|
5468
5484
|
};
|
|
5469
|
-
return /* @__PURE__ */
|
|
5485
|
+
return /* @__PURE__ */ jsx6(
|
|
5470
5486
|
"div",
|
|
5471
5487
|
{
|
|
5472
5488
|
className: "pano-video-captions",
|
|
5473
5489
|
"data-pano-video-captions": "",
|
|
5474
5490
|
style: wrapperStyle,
|
|
5475
|
-
children: /* @__PURE__ */
|
|
5491
|
+
children: /* @__PURE__ */ jsx6("div", { style: textStyle, children: snapshot.captionText })
|
|
5476
5492
|
}
|
|
5477
5493
|
);
|
|
5478
5494
|
}
|
|
@@ -5624,7 +5640,7 @@ function cueText(cue) {
|
|
|
5624
5640
|
}
|
|
5625
5641
|
|
|
5626
5642
|
// src/video/pano-video-controls.tsx
|
|
5627
|
-
import { Fragment, jsx as
|
|
5643
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
5628
5644
|
var DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE = {
|
|
5629
5645
|
background: "rgba(16, 16, 16, 0.88)",
|
|
5630
5646
|
color: "#f4f4f4",
|
|
@@ -5685,7 +5701,7 @@ function volumeFromClientY(clientY, track) {
|
|
|
5685
5701
|
return Math.max(0, Math.min(1, (rect.bottom - clientY) / rect.height));
|
|
5686
5702
|
}
|
|
5687
5703
|
function Icon({ path }) {
|
|
5688
|
-
return /* @__PURE__ */
|
|
5704
|
+
return /* @__PURE__ */ jsx7(
|
|
5689
5705
|
"svg",
|
|
5690
5706
|
{
|
|
5691
5707
|
"aria-hidden": true,
|
|
@@ -5697,7 +5713,7 @@ function Icon({ path }) {
|
|
|
5697
5713
|
strokeWidth: "1.75",
|
|
5698
5714
|
viewBox: "0 0 16 16",
|
|
5699
5715
|
width: "16",
|
|
5700
|
-
children: /* @__PURE__ */
|
|
5716
|
+
children: /* @__PURE__ */ jsx7("path", { d: path })
|
|
5701
5717
|
}
|
|
5702
5718
|
);
|
|
5703
5719
|
}
|
|
@@ -5709,7 +5725,7 @@ function ChromeButton({
|
|
|
5709
5725
|
label,
|
|
5710
5726
|
onClick
|
|
5711
5727
|
}) {
|
|
5712
|
-
return /* @__PURE__ */
|
|
5728
|
+
return /* @__PURE__ */ jsx7(
|
|
5713
5729
|
"button",
|
|
5714
5730
|
{
|
|
5715
5731
|
"aria-label": label,
|
|
@@ -5735,14 +5751,14 @@ function ChromeMenu({
|
|
|
5735
5751
|
labelledBy,
|
|
5736
5752
|
items
|
|
5737
5753
|
}) {
|
|
5738
|
-
return /* @__PURE__ */
|
|
5754
|
+
return /* @__PURE__ */ jsx7(
|
|
5739
5755
|
ChromeMenuSurface,
|
|
5740
5756
|
{
|
|
5741
5757
|
appearance,
|
|
5742
5758
|
id,
|
|
5743
5759
|
labelledBy,
|
|
5744
5760
|
role: "menu",
|
|
5745
|
-
children: items.map((item) => /* @__PURE__ */
|
|
5761
|
+
children: items.map((item) => /* @__PURE__ */ jsx7(
|
|
5746
5762
|
ChromeMenuRadioItem,
|
|
5747
5763
|
{
|
|
5748
5764
|
active: item.active,
|
|
@@ -5762,7 +5778,7 @@ function ChromeMenuSurface({
|
|
|
5762
5778
|
labelledBy,
|
|
5763
5779
|
role
|
|
5764
5780
|
}) {
|
|
5765
|
-
return /* @__PURE__ */
|
|
5781
|
+
return /* @__PURE__ */ jsx7(
|
|
5766
5782
|
"div",
|
|
5767
5783
|
{
|
|
5768
5784
|
"aria-labelledby": labelledBy,
|
|
@@ -5786,7 +5802,7 @@ function ChromeMenuRadioItem({
|
|
|
5786
5802
|
label,
|
|
5787
5803
|
onClick
|
|
5788
5804
|
}) {
|
|
5789
|
-
return /* @__PURE__ */
|
|
5805
|
+
return /* @__PURE__ */ jsx7(
|
|
5790
5806
|
"button",
|
|
5791
5807
|
{
|
|
5792
5808
|
"aria-checked": active,
|
|
@@ -5826,7 +5842,7 @@ function ChromeMenuActionItem({
|
|
|
5826
5842
|
},
|
|
5827
5843
|
type: "button",
|
|
5828
5844
|
children: [
|
|
5829
|
-
/* @__PURE__ */
|
|
5845
|
+
/* @__PURE__ */ jsx7("span", { children: label }),
|
|
5830
5846
|
secondary
|
|
5831
5847
|
]
|
|
5832
5848
|
}
|
|
@@ -5835,10 +5851,10 @@ function ChromeMenuActionItem({
|
|
|
5835
5851
|
function ChromeMenuSectionLabel({
|
|
5836
5852
|
children
|
|
5837
5853
|
}) {
|
|
5838
|
-
return /* @__PURE__ */
|
|
5854
|
+
return /* @__PURE__ */ jsx7("div", { className: "pano-video-chrome-menu-label", children });
|
|
5839
5855
|
}
|
|
5840
5856
|
function ChromeMenuDivider() {
|
|
5841
|
-
return /* @__PURE__ */
|
|
5857
|
+
return /* @__PURE__ */ jsx7("div", { className: "pano-video-chrome-menu-divider" });
|
|
5842
5858
|
}
|
|
5843
5859
|
function CaptionsMenu({
|
|
5844
5860
|
appearance,
|
|
@@ -5851,7 +5867,7 @@ function CaptionsMenu({
|
|
|
5851
5867
|
panel,
|
|
5852
5868
|
snapshot
|
|
5853
5869
|
}) {
|
|
5854
|
-
return /* @__PURE__ */
|
|
5870
|
+
return /* @__PURE__ */ jsx7(
|
|
5855
5871
|
ChromeMenuSurface,
|
|
5856
5872
|
{
|
|
5857
5873
|
appearance,
|
|
@@ -5860,7 +5876,7 @@ function CaptionsMenu({
|
|
|
5860
5876
|
role: "menu",
|
|
5861
5877
|
children: panel === "tracks" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
5862
5878
|
/* @__PURE__ */ jsxs3("div", { className: "pano-video-chrome-menu-list", children: [
|
|
5863
|
-
/* @__PURE__ */
|
|
5879
|
+
/* @__PURE__ */ jsx7(
|
|
5864
5880
|
ChromeMenuRadioItem,
|
|
5865
5881
|
{
|
|
5866
5882
|
active: snapshot.trackId === null,
|
|
@@ -5873,7 +5889,7 @@ function CaptionsMenu({
|
|
|
5873
5889
|
),
|
|
5874
5890
|
snapshot.tracks.map((track) => {
|
|
5875
5891
|
const trackItemId = panoVideoTrackId(track);
|
|
5876
|
-
return /* @__PURE__ */
|
|
5892
|
+
return /* @__PURE__ */ jsx7(
|
|
5877
5893
|
ChromeMenuRadioItem,
|
|
5878
5894
|
{
|
|
5879
5895
|
active: snapshot.trackId === trackItemId,
|
|
@@ -5887,29 +5903,29 @@ function CaptionsMenu({
|
|
|
5887
5903
|
);
|
|
5888
5904
|
})
|
|
5889
5905
|
] }),
|
|
5890
|
-
/* @__PURE__ */
|
|
5891
|
-
/* @__PURE__ */
|
|
5906
|
+
/* @__PURE__ */ jsx7(ChromeMenuDivider, {}),
|
|
5907
|
+
/* @__PURE__ */ jsx7(
|
|
5892
5908
|
ChromeMenuActionItem,
|
|
5893
5909
|
{
|
|
5894
5910
|
appearance,
|
|
5895
5911
|
label: "Settings",
|
|
5896
5912
|
onClick: onOpenSettings,
|
|
5897
|
-
secondary: /* @__PURE__ */
|
|
5913
|
+
secondary: /* @__PURE__ */ jsx7("span", { "aria-hidden": true, children: "\u203A" })
|
|
5898
5914
|
}
|
|
5899
5915
|
)
|
|
5900
5916
|
] }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
5901
|
-
/* @__PURE__ */
|
|
5917
|
+
/* @__PURE__ */ jsx7(
|
|
5902
5918
|
ChromeMenuActionItem,
|
|
5903
5919
|
{
|
|
5904
5920
|
appearance,
|
|
5905
5921
|
label: "Back",
|
|
5906
5922
|
onClick: onShowTracks,
|
|
5907
|
-
secondary: /* @__PURE__ */
|
|
5923
|
+
secondary: /* @__PURE__ */ jsx7("span", { "aria-hidden": true, children: "\u2039" })
|
|
5908
5924
|
}
|
|
5909
5925
|
),
|
|
5910
|
-
/* @__PURE__ */
|
|
5911
|
-
/* @__PURE__ */
|
|
5912
|
-
CAPTION_SIZE_OPTIONS.map((option) => /* @__PURE__ */
|
|
5926
|
+
/* @__PURE__ */ jsx7(ChromeMenuDivider, {}),
|
|
5927
|
+
/* @__PURE__ */ jsx7(ChromeMenuSectionLabel, { children: "Font size" }),
|
|
5928
|
+
CAPTION_SIZE_OPTIONS.map((option) => /* @__PURE__ */ jsx7(
|
|
5913
5929
|
ChromeMenuRadioItem,
|
|
5914
5930
|
{
|
|
5915
5931
|
active: Number(snapshot.captionAppearance.fontSize) === option.value,
|
|
@@ -5921,9 +5937,9 @@ function CaptionsMenu({
|
|
|
5921
5937
|
},
|
|
5922
5938
|
option.id
|
|
5923
5939
|
)),
|
|
5924
|
-
/* @__PURE__ */
|
|
5925
|
-
/* @__PURE__ */
|
|
5926
|
-
CAPTION_BACKGROUND_OPTIONS.map((option) => /* @__PURE__ */
|
|
5940
|
+
/* @__PURE__ */ jsx7(ChromeMenuDivider, {}),
|
|
5941
|
+
/* @__PURE__ */ jsx7(ChromeMenuSectionLabel, { children: "Background" }),
|
|
5942
|
+
CAPTION_BACKGROUND_OPTIONS.map((option) => /* @__PURE__ */ jsx7(
|
|
5927
5943
|
ChromeMenuRadioItem,
|
|
5928
5944
|
{
|
|
5929
5945
|
active: snapshot.captionAppearance.background === option.value,
|
|
@@ -5978,7 +5994,7 @@ function VerticalVolumeSlider({
|
|
|
5978
5994
|
pointerEvents: "auto"
|
|
5979
5995
|
},
|
|
5980
5996
|
children: [
|
|
5981
|
-
/* @__PURE__ */
|
|
5997
|
+
/* @__PURE__ */ jsx7(
|
|
5982
5998
|
"span",
|
|
5983
5999
|
{
|
|
5984
6000
|
"aria-hidden": true,
|
|
@@ -5990,7 +6006,7 @@ function VerticalVolumeSlider({
|
|
|
5990
6006
|
children: percentLabel
|
|
5991
6007
|
}
|
|
5992
6008
|
),
|
|
5993
|
-
/* @__PURE__ */
|
|
6009
|
+
/* @__PURE__ */ jsx7(
|
|
5994
6010
|
"div",
|
|
5995
6011
|
{
|
|
5996
6012
|
style: {
|
|
@@ -6030,7 +6046,7 @@ function VerticalVolumeSlider({
|
|
|
6030
6046
|
},
|
|
6031
6047
|
tabIndex: 0,
|
|
6032
6048
|
children: [
|
|
6033
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsx7(
|
|
6034
6050
|
"div",
|
|
6035
6051
|
{
|
|
6036
6052
|
style: {
|
|
@@ -6045,7 +6061,7 @@ function VerticalVolumeSlider({
|
|
|
6045
6061
|
}
|
|
6046
6062
|
}
|
|
6047
6063
|
),
|
|
6048
|
-
/* @__PURE__ */
|
|
6064
|
+
/* @__PURE__ */ jsx7(
|
|
6049
6065
|
"div",
|
|
6050
6066
|
{
|
|
6051
6067
|
style: {
|
|
@@ -6104,13 +6120,13 @@ function VolumeControl({
|
|
|
6104
6120
|
};
|
|
6105
6121
|
}, [open, volumeAdjustable]);
|
|
6106
6122
|
if (!volumeAdjustable) {
|
|
6107
|
-
return /* @__PURE__ */
|
|
6123
|
+
return /* @__PURE__ */ jsx7(
|
|
6108
6124
|
ChromeButton,
|
|
6109
6125
|
{
|
|
6110
6126
|
appearance,
|
|
6111
6127
|
label: mutedOrSilent ? "Unmute" : "Mute",
|
|
6112
6128
|
onClick: onToggleMuted,
|
|
6113
|
-
children: mutedOrSilent ? /* @__PURE__ */
|
|
6129
|
+
children: mutedOrSilent ? /* @__PURE__ */ jsx7(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.2 6.2l3.2 3.6M13.4 6.2l-3.2 3.6" }) : /* @__PURE__ */ jsx7(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.5 5.5a3 3 0 0 1 0 5" })
|
|
6114
6130
|
}
|
|
6115
6131
|
);
|
|
6116
6132
|
}
|
|
@@ -6142,7 +6158,7 @@ function VolumeControl({
|
|
|
6142
6158
|
},
|
|
6143
6159
|
ref: rootRef,
|
|
6144
6160
|
children: [
|
|
6145
|
-
open ? /* @__PURE__ */
|
|
6161
|
+
open ? /* @__PURE__ */ jsx7(
|
|
6146
6162
|
VerticalVolumeSlider,
|
|
6147
6163
|
{
|
|
6148
6164
|
appearance,
|
|
@@ -6150,7 +6166,7 @@ function VolumeControl({
|
|
|
6150
6166
|
volume: displayVolume
|
|
6151
6167
|
}
|
|
6152
6168
|
) : null,
|
|
6153
|
-
/* @__PURE__ */
|
|
6169
|
+
/* @__PURE__ */ jsx7(
|
|
6154
6170
|
ChromeButton,
|
|
6155
6171
|
{
|
|
6156
6172
|
appearance,
|
|
@@ -6161,7 +6177,7 @@ function VolumeControl({
|
|
|
6161
6177
|
}
|
|
6162
6178
|
onToggleMuted();
|
|
6163
6179
|
},
|
|
6164
|
-
children: mutedOrSilent ? /* @__PURE__ */
|
|
6180
|
+
children: mutedOrSilent ? /* @__PURE__ */ jsx7(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.2 6.2l3.2 3.6M13.4 6.2l-3.2 3.6" }) : /* @__PURE__ */ jsx7(Icon, { path: "M3 6.5h2.2L8.5 4v8L5.2 9.5H3zM10.5 5.5a3 3 0 0 1 0 5" })
|
|
6165
6181
|
}
|
|
6166
6182
|
)
|
|
6167
6183
|
]
|
|
@@ -6321,7 +6337,7 @@ function PanoVideoControlsHud({
|
|
|
6321
6337
|
let menuNode = null;
|
|
6322
6338
|
switch (menu) {
|
|
6323
6339
|
case "rate":
|
|
6324
|
-
menuNode = /* @__PURE__ */
|
|
6340
|
+
menuNode = /* @__PURE__ */ jsx7(
|
|
6325
6341
|
ChromeMenu,
|
|
6326
6342
|
{
|
|
6327
6343
|
appearance: resolved,
|
|
@@ -6340,7 +6356,7 @@ function PanoVideoControlsHud({
|
|
|
6340
6356
|
);
|
|
6341
6357
|
break;
|
|
6342
6358
|
case "variant":
|
|
6343
|
-
menuNode = /* @__PURE__ */
|
|
6359
|
+
menuNode = /* @__PURE__ */ jsx7(
|
|
6344
6360
|
ChromeMenu,
|
|
6345
6361
|
{
|
|
6346
6362
|
appearance: resolved,
|
|
@@ -6359,7 +6375,7 @@ function PanoVideoControlsHud({
|
|
|
6359
6375
|
);
|
|
6360
6376
|
break;
|
|
6361
6377
|
case "captions":
|
|
6362
|
-
menuNode = /* @__PURE__ */
|
|
6378
|
+
menuNode = /* @__PURE__ */ jsx7(
|
|
6363
6379
|
CaptionsMenu,
|
|
6364
6380
|
{
|
|
6365
6381
|
appearance: resolved,
|
|
@@ -6383,7 +6399,7 @@ function PanoVideoControlsHud({
|
|
|
6383
6399
|
);
|
|
6384
6400
|
break;
|
|
6385
6401
|
case "more":
|
|
6386
|
-
menuNode = /* @__PURE__ */
|
|
6402
|
+
menuNode = /* @__PURE__ */ jsx7(
|
|
6387
6403
|
ChromeMenu,
|
|
6388
6404
|
{
|
|
6389
6405
|
appearance: resolved,
|
|
@@ -6451,7 +6467,7 @@ function PanoVideoControlsHud({
|
|
|
6451
6467
|
};
|
|
6452
6468
|
const rateButton = /* @__PURE__ */ jsxs3("div", { className: "pano-video-menu", "data-pano-video-menu": "rate", children: [
|
|
6453
6469
|
!compact && menu === "rate" ? menuNode : null,
|
|
6454
|
-
/* @__PURE__ */
|
|
6470
|
+
/* @__PURE__ */ jsx7(
|
|
6455
6471
|
ChromeButton,
|
|
6456
6472
|
{
|
|
6457
6473
|
appearance: resolved,
|
|
@@ -6459,13 +6475,13 @@ function PanoVideoControlsHud({
|
|
|
6459
6475
|
onClick: () => {
|
|
6460
6476
|
toggleMenu("rate");
|
|
6461
6477
|
},
|
|
6462
|
-
children: /* @__PURE__ */
|
|
6478
|
+
children: /* @__PURE__ */ jsx7("span", { className: "pano-video-chrome-label", id: `${barId}-rate-btn`, children: snapshot.playbackRate === 1 ? "1x" : `${snapshot.playbackRate}x` })
|
|
6463
6479
|
}
|
|
6464
6480
|
)
|
|
6465
6481
|
] });
|
|
6466
6482
|
const variantButton = canSwitchVariant ? /* @__PURE__ */ jsxs3("div", { className: "pano-video-menu", "data-pano-video-menu": "variant", children: [
|
|
6467
6483
|
!compact && menu === "variant" ? menuNode : null,
|
|
6468
|
-
/* @__PURE__ */
|
|
6484
|
+
/* @__PURE__ */ jsx7(
|
|
6469
6485
|
ChromeButton,
|
|
6470
6486
|
{
|
|
6471
6487
|
appearance: resolved,
|
|
@@ -6473,13 +6489,13 @@ function PanoVideoControlsHud({
|
|
|
6473
6489
|
onClick: () => {
|
|
6474
6490
|
toggleMenu("variant");
|
|
6475
6491
|
},
|
|
6476
|
-
children: /* @__PURE__ */
|
|
6492
|
+
children: /* @__PURE__ */ jsx7("span", { className: "pano-video-chrome-label", id: `${barId}-variant-btn`, children: snapshot.variants.find((variant) => variant.id === snapshot.variantId)?.label ?? "Quality" })
|
|
6477
6493
|
}
|
|
6478
6494
|
)
|
|
6479
6495
|
] }) : null;
|
|
6480
6496
|
const captionsButton = showCaptionsMenu ? /* @__PURE__ */ jsxs3("div", { className: "pano-video-menu", "data-pano-video-menu": "captions", children: [
|
|
6481
6497
|
!compact && menu === "captions" ? menuNode : null,
|
|
6482
|
-
/* @__PURE__ */
|
|
6498
|
+
/* @__PURE__ */ jsx7(
|
|
6483
6499
|
ChromeButton,
|
|
6484
6500
|
{
|
|
6485
6501
|
appearance: resolved,
|
|
@@ -6487,7 +6503,7 @@ function PanoVideoControlsHud({
|
|
|
6487
6503
|
onClick: () => {
|
|
6488
6504
|
toggleMenu("captions");
|
|
6489
6505
|
},
|
|
6490
|
-
children: /* @__PURE__ */
|
|
6506
|
+
children: /* @__PURE__ */ jsx7("span", { id: `${barId}-captions-btn`, children: /* @__PURE__ */ jsx7(Icon, { path: "M2.5 4.5h11v7h-11zM5 7.2h2.4M5 9.2h5.5" }) })
|
|
6491
6507
|
}
|
|
6492
6508
|
)
|
|
6493
6509
|
] }) : null;
|
|
@@ -6498,7 +6514,7 @@ function PanoVideoControlsHud({
|
|
|
6498
6514
|
"data-pano-video-controls": "",
|
|
6499
6515
|
style: barStyle,
|
|
6500
6516
|
children: [
|
|
6501
|
-
/* @__PURE__ */
|
|
6517
|
+
/* @__PURE__ */ jsx7(
|
|
6502
6518
|
ChromeButton,
|
|
6503
6519
|
{
|
|
6504
6520
|
appearance: resolved,
|
|
@@ -6506,11 +6522,11 @@ function PanoVideoControlsHud({
|
|
|
6506
6522
|
onClick: () => {
|
|
6507
6523
|
controller.togglePlay();
|
|
6508
6524
|
},
|
|
6509
|
-
children: snapshot.playing ? /* @__PURE__ */
|
|
6525
|
+
children: snapshot.playing ? /* @__PURE__ */ jsx7(Icon, { path: "M5 3.5h2.2v9H5zM8.8 3.5H11v9H8.8z" }) : /* @__PURE__ */ jsx7(Icon, { path: "M5 3.2v9.6L13 8z" })
|
|
6510
6526
|
}
|
|
6511
6527
|
),
|
|
6512
|
-
hideTime ? null : /* @__PURE__ */
|
|
6513
|
-
/* @__PURE__ */
|
|
6528
|
+
hideTime ? null : /* @__PURE__ */ jsx7("span", { className: "pano-video-time", children: formatMediaTime(snapshot.currentTime) }),
|
|
6529
|
+
/* @__PURE__ */ jsx7(
|
|
6514
6530
|
"input",
|
|
6515
6531
|
{
|
|
6516
6532
|
"aria-label": "Seek",
|
|
@@ -6532,8 +6548,8 @@ function PanoVideoControlsHud({
|
|
|
6532
6548
|
value: duration > 0 ? snapshot.currentTime : 0
|
|
6533
6549
|
}
|
|
6534
6550
|
),
|
|
6535
|
-
hideTime ? null : /* @__PURE__ */
|
|
6536
|
-
/* @__PURE__ */
|
|
6551
|
+
hideTime ? null : /* @__PURE__ */ jsx7("span", { className: "pano-video-time", children: formatMediaTime(duration) }),
|
|
6552
|
+
/* @__PURE__ */ jsx7(
|
|
6537
6553
|
VolumeControl,
|
|
6538
6554
|
{
|
|
6539
6555
|
appearance: resolved,
|
|
@@ -6551,7 +6567,7 @@ function PanoVideoControlsHud({
|
|
|
6551
6567
|
),
|
|
6552
6568
|
compact ? /* @__PURE__ */ jsxs3("div", { className: "pano-video-menu", "data-pano-video-menu": "more", children: [
|
|
6553
6569
|
menu !== null ? menuNode : null,
|
|
6554
|
-
/* @__PURE__ */
|
|
6570
|
+
/* @__PURE__ */ jsx7(
|
|
6555
6571
|
ChromeButton,
|
|
6556
6572
|
{
|
|
6557
6573
|
appearance: resolved,
|
|
@@ -6560,7 +6576,7 @@ function PanoVideoControlsHud({
|
|
|
6560
6576
|
onClick: () => {
|
|
6561
6577
|
toggleMenu("more");
|
|
6562
6578
|
},
|
|
6563
|
-
children: /* @__PURE__ */
|
|
6579
|
+
children: /* @__PURE__ */ jsx7(Icon, { path: "M3 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0M7 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0M11 8a1 1 0 1 0 2 0 1 1 0 1 0-2 0" })
|
|
6564
6580
|
}
|
|
6565
6581
|
)
|
|
6566
6582
|
] }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
@@ -6568,7 +6584,7 @@ function PanoVideoControlsHud({
|
|
|
6568
6584
|
variantButton,
|
|
6569
6585
|
captionsButton
|
|
6570
6586
|
] }),
|
|
6571
|
-
showFullscreen ? /* @__PURE__ */
|
|
6587
|
+
showFullscreen ? /* @__PURE__ */ jsx7(
|
|
6572
6588
|
ChromeButton,
|
|
6573
6589
|
{
|
|
6574
6590
|
appearance: resolved,
|
|
@@ -6576,7 +6592,7 @@ function PanoVideoControlsHud({
|
|
|
6576
6592
|
onClick: () => {
|
|
6577
6593
|
fullscreen?.toggleFullscreen();
|
|
6578
6594
|
},
|
|
6579
|
-
children: fullscreen?.isFullscreen ? /* @__PURE__ */
|
|
6595
|
+
children: fullscreen?.isFullscreen ? /* @__PURE__ */ jsx7(Icon, { path: "M6 3.5H3.5V6M10 3.5h2.5V6M6 12.5H3.5V10M10 12.5h2.5V10" }) : /* @__PURE__ */ jsx7(Icon, { path: "M3.5 6V3.5H6M10 3.5h2.5V6M3.5 10v2.5H6M10 12.5h2.5V10" })
|
|
6580
6596
|
}
|
|
6581
6597
|
) : null
|
|
6582
6598
|
]
|
|
@@ -6593,7 +6609,7 @@ function PanoVideoControls({ appearance }) {
|
|
|
6593
6609
|
}
|
|
6594
6610
|
|
|
6595
6611
|
// src/video/pano-video-chrome-bridge.tsx
|
|
6596
|
-
import { Fragment as Fragment2, jsx as
|
|
6612
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6597
6613
|
function PanoVideoChromeBridge({
|
|
6598
6614
|
fullscreen,
|
|
6599
6615
|
host,
|
|
@@ -6609,7 +6625,7 @@ function PanoVideoChromeBridge({
|
|
|
6609
6625
|
}
|
|
6610
6626
|
const showDefaultControls = host.controller !== null && host.controls !== false && host.controlClaims === 0;
|
|
6611
6627
|
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
6612
|
-
showDefaultControls ? /* @__PURE__ */
|
|
6628
|
+
showDefaultControls ? /* @__PURE__ */ jsx8(
|
|
6613
6629
|
PanoVideoControlsHud,
|
|
6614
6630
|
{
|
|
6615
6631
|
appearance: typeof host.controls === "object" ? host.controls : void 0,
|
|
@@ -6618,7 +6634,7 @@ function PanoVideoChromeBridge({
|
|
|
6618
6634
|
overlayElement
|
|
6619
6635
|
}
|
|
6620
6636
|
) : null,
|
|
6621
|
-
host.captions !== false && host.controller ? /* @__PURE__ */
|
|
6637
|
+
host.captions !== false && host.controller ? /* @__PURE__ */ jsx8(PanoVideoCaptionsOverlay, { controller: host.controller }) : null
|
|
6622
6638
|
] });
|
|
6623
6639
|
}
|
|
6624
6640
|
|
|
@@ -6771,7 +6787,7 @@ function clamp2(value, min, max) {
|
|
|
6771
6787
|
}
|
|
6772
6788
|
|
|
6773
6789
|
// src/webvr/chrome.tsx
|
|
6774
|
-
import { Fragment as Fragment3, jsx as
|
|
6790
|
+
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6775
6791
|
function resolveAppearance(value) {
|
|
6776
6792
|
return {
|
|
6777
6793
|
...DEFAULT_WEBVR_CHROME_APPEARANCE,
|
|
@@ -6783,7 +6799,7 @@ function ChromeButton2({
|
|
|
6783
6799
|
children,
|
|
6784
6800
|
onClick
|
|
6785
6801
|
}) {
|
|
6786
|
-
return /* @__PURE__ */
|
|
6802
|
+
return /* @__PURE__ */ jsx9(
|
|
6787
6803
|
"button",
|
|
6788
6804
|
{
|
|
6789
6805
|
className: "pano-webvr-button",
|
|
@@ -6828,11 +6844,11 @@ function SetupPanel({
|
|
|
6828
6844
|
role: "dialog",
|
|
6829
6845
|
style: panelStyle,
|
|
6830
6846
|
children: [
|
|
6831
|
-
/* @__PURE__ */
|
|
6847
|
+
/* @__PURE__ */ jsx9("h2", { className: "pano-webvr-setup-title", children: appearance.setupTitle ?? "MobileVR Setup" }),
|
|
6832
6848
|
/* @__PURE__ */ jsxs5("label", { className: "pano-webvr-setup-field", children: [
|
|
6833
6849
|
"Screen size (inch)",
|
|
6834
6850
|
/* @__PURE__ */ jsxs5("div", { className: "pano-webvr-setup-row", children: [
|
|
6835
|
-
/* @__PURE__ */
|
|
6851
|
+
/* @__PURE__ */ jsx9(
|
|
6836
6852
|
"button",
|
|
6837
6853
|
{
|
|
6838
6854
|
"aria-label": "Decrease screen size",
|
|
@@ -6844,8 +6860,8 @@ function SetupPanel({
|
|
|
6844
6860
|
children: "\u2039"
|
|
6845
6861
|
}
|
|
6846
6862
|
),
|
|
6847
|
-
/* @__PURE__ */
|
|
6848
|
-
/* @__PURE__ */
|
|
6863
|
+
/* @__PURE__ */ jsx9("strong", { className: "pano-webvr-setup-value", children: settings.screensize === "auto" ? "Auto" : settings.screensize.toFixed(1) }),
|
|
6864
|
+
/* @__PURE__ */ jsx9(
|
|
6849
6865
|
"button",
|
|
6850
6866
|
{
|
|
6851
6867
|
"aria-label": "Increase screen size",
|
|
@@ -6860,9 +6876,9 @@ function SetupPanel({
|
|
|
6860
6876
|
] })
|
|
6861
6877
|
] }),
|
|
6862
6878
|
/* @__PURE__ */ jsxs5("fieldset", { className: "pano-webvr-setup-fieldset", children: [
|
|
6863
|
-
/* @__PURE__ */
|
|
6879
|
+
/* @__PURE__ */ jsx9("legend", { className: "pano-webvr-setup-legend", children: "VR headset preset" }),
|
|
6864
6880
|
/* @__PURE__ */ jsxs5("div", { className: "pano-webvr-setup-row", children: [
|
|
6865
|
-
/* @__PURE__ */
|
|
6881
|
+
/* @__PURE__ */ jsx9(
|
|
6866
6882
|
"button",
|
|
6867
6883
|
{
|
|
6868
6884
|
"aria-label": "Previous headset preset",
|
|
@@ -6872,8 +6888,8 @@ function SetupPanel({
|
|
|
6872
6888
|
children: "\u2039"
|
|
6873
6889
|
}
|
|
6874
6890
|
),
|
|
6875
|
-
/* @__PURE__ */
|
|
6876
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsx9("strong", { className: "pano-webvr-setup-value-wide", children: WEBVR_PROFILES[settings.profileId].label }),
|
|
6892
|
+
/* @__PURE__ */ jsx9(
|
|
6877
6893
|
"button",
|
|
6878
6894
|
{
|
|
6879
6895
|
"aria-label": "Next headset preset",
|
|
@@ -6885,7 +6901,7 @@ function SetupPanel({
|
|
|
6885
6901
|
)
|
|
6886
6902
|
] })
|
|
6887
6903
|
] }),
|
|
6888
|
-
/* @__PURE__ */
|
|
6904
|
+
/* @__PURE__ */ jsx9(
|
|
6889
6905
|
ChromeButton2,
|
|
6890
6906
|
{
|
|
6891
6907
|
appearance,
|
|
@@ -6909,8 +6925,8 @@ function WebVRChromeBridge({ host }) {
|
|
|
6909
6925
|
}
|
|
6910
6926
|
const appearance = resolveAppearance(chrome);
|
|
6911
6927
|
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
6912
|
-
/* @__PURE__ */
|
|
6913
|
-
mode !== "webxr" ? /* @__PURE__ */
|
|
6928
|
+
/* @__PURE__ */ jsx9("div", { className: "pano-webvr-toolbar", children: mode ? /* @__PURE__ */ jsxs5("div", { className: "pano-webvr-toolbar-actions", children: [
|
|
6929
|
+
mode !== "webxr" ? /* @__PURE__ */ jsx9(
|
|
6914
6930
|
ChromeButton2,
|
|
6915
6931
|
{
|
|
6916
6932
|
appearance,
|
|
@@ -6918,7 +6934,7 @@ function WebVRChromeBridge({ host }) {
|
|
|
6918
6934
|
children: "VR Setup"
|
|
6919
6935
|
}
|
|
6920
6936
|
) : null,
|
|
6921
|
-
/* @__PURE__ */
|
|
6937
|
+
/* @__PURE__ */ jsx9(
|
|
6922
6938
|
ChromeButton2,
|
|
6923
6939
|
{
|
|
6924
6940
|
appearance,
|
|
@@ -6926,7 +6942,7 @@ function WebVRChromeBridge({ host }) {
|
|
|
6926
6942
|
children: "Exit VR"
|
|
6927
6943
|
}
|
|
6928
6944
|
)
|
|
6929
|
-
] }) : /* @__PURE__ */
|
|
6945
|
+
] }) : /* @__PURE__ */ jsx9(
|
|
6930
6946
|
ChromeButton2,
|
|
6931
6947
|
{
|
|
6932
6948
|
appearance,
|
|
@@ -6934,7 +6950,7 @@ function WebVRChromeBridge({ host }) {
|
|
|
6934
6950
|
children: available ? "Enter VR" : "VR unavailable"
|
|
6935
6951
|
}
|
|
6936
6952
|
) }),
|
|
6937
|
-
mode === "fake" ? /* @__PURE__ */
|
|
6953
|
+
mode === "fake" ? /* @__PURE__ */ jsx9(
|
|
6938
6954
|
"p",
|
|
6939
6955
|
{
|
|
6940
6956
|
className: "pano-webvr-hint",
|
|
@@ -6942,7 +6958,7 @@ function WebVRChromeBridge({ host }) {
|
|
|
6942
6958
|
children: "Simulated VR Mode \xB7 Click the view to lock the mouse, then move to look around. Use a headset or phone for real VR."
|
|
6943
6959
|
}
|
|
6944
6960
|
) : null,
|
|
6945
|
-
setupOpen ? /* @__PURE__ */
|
|
6961
|
+
setupOpen ? /* @__PURE__ */ jsx9(
|
|
6946
6962
|
SetupPanel,
|
|
6947
6963
|
{
|
|
6948
6964
|
appearance,
|
|
@@ -6984,7 +7000,7 @@ import { useFrame as useFrame5, useThree as useThree8 } from "@react-three/fiber
|
|
|
6984
7000
|
import { useXR as useXR2, XROrigin } from "@react-three/xr";
|
|
6985
7001
|
import { useRef as useRef12 } from "react";
|
|
6986
7002
|
import { Vector3 as Vector34 } from "three";
|
|
6987
|
-
import { jsx as
|
|
7003
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
6988
7004
|
function PanoramaXROrigin() {
|
|
6989
7005
|
const originRef = useRef12(null);
|
|
6990
7006
|
const localHeadPositionRef = useRef12(new Vector34());
|
|
@@ -7000,11 +7016,11 @@ function PanoramaXROrigin() {
|
|
|
7000
7016
|
origin.position.copy(localHeadPositionRef.current).multiplyScalar(-1);
|
|
7001
7017
|
origin.updateMatrixWorld();
|
|
7002
7018
|
}, -100);
|
|
7003
|
-
return /* @__PURE__ */
|
|
7019
|
+
return /* @__PURE__ */ jsx10(XROrigin, { ref: originRef });
|
|
7004
7020
|
}
|
|
7005
7021
|
|
|
7006
7022
|
// src/pano-viewer.tsx
|
|
7007
|
-
import { jsx as
|
|
7023
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7008
7024
|
var DEFAULT_VIEW = {
|
|
7009
7025
|
yaw: 0,
|
|
7010
7026
|
pitch: 0,
|
|
@@ -7049,7 +7065,7 @@ function PanoCursorTree({
|
|
|
7049
7065
|
if (!cursors) {
|
|
7050
7066
|
return children;
|
|
7051
7067
|
}
|
|
7052
|
-
return /* @__PURE__ */
|
|
7068
|
+
return /* @__PURE__ */ jsx11(PanoCursorController, { cursors, children });
|
|
7053
7069
|
}
|
|
7054
7070
|
function PanoVideoHostReset() {
|
|
7055
7071
|
const host = useContext15(PanoVideoHostContext);
|
|
@@ -7070,9 +7086,9 @@ function DefaultControlChannels({
|
|
|
7070
7086
|
return null;
|
|
7071
7087
|
}
|
|
7072
7088
|
return /* @__PURE__ */ jsxs6(DefaultControlChannelContext.Provider, { value: true, children: [
|
|
7073
|
-
userControlsEnabled && mouseChannel.mount && claims.mouse === 0 ? /* @__PURE__ */
|
|
7074
|
-
userControlsEnabled && touchChannel.mount && claims.touch === 0 ? /* @__PURE__ */
|
|
7075
|
-
userControlsEnabled && keyboardChannel.mount && claims.keyboard === 0 ? /* @__PURE__ */
|
|
7089
|
+
userControlsEnabled && mouseChannel.mount && claims.mouse === 0 ? /* @__PURE__ */ jsx11(MouseControls, { ...mouseChannel.props, fovSpeed }) : null,
|
|
7090
|
+
userControlsEnabled && touchChannel.mount && claims.touch === 0 ? /* @__PURE__ */ jsx11(TouchControls, { ...touchChannel.props }) : null,
|
|
7091
|
+
userControlsEnabled && keyboardChannel.mount && claims.keyboard === 0 ? /* @__PURE__ */ jsx11(
|
|
7076
7092
|
KeyboardControls,
|
|
7077
7093
|
{
|
|
7078
7094
|
...keyboardChannel.props,
|
|
@@ -7158,14 +7174,58 @@ var PanoViewer = forwardRef2(
|
|
|
7158
7174
|
}),
|
|
7159
7175
|
[bgmHost, videoHost]
|
|
7160
7176
|
);
|
|
7161
|
-
const
|
|
7162
|
-
setMediaActivated(true);
|
|
7177
|
+
const runMediaActivation = useCallback6(() => {
|
|
7163
7178
|
const resume = mediaActivationControls.resumeAudio();
|
|
7164
7179
|
mediaActivationOptions?.onActivate?.(mediaActivationControls);
|
|
7165
7180
|
return resume;
|
|
7166
7181
|
}, [mediaActivationControls, mediaActivationOptions]);
|
|
7182
|
+
const activateMedia = useCallback6(() => {
|
|
7183
|
+
setMediaActivated(true);
|
|
7184
|
+
return runMediaActivation();
|
|
7185
|
+
}, [runMediaActivation]);
|
|
7167
7186
|
const hasMediaActivationIntent = mediaActivationRevision >= 0 && hasPanoMediaActivationIntent(mediaActivationHost);
|
|
7168
|
-
const
|
|
7187
|
+
const shouldActivateMedia = mediaActivationOptions !== null && hasMediaActivationIntent && !mediaActivated;
|
|
7188
|
+
useEffect13(() => {
|
|
7189
|
+
if (!shouldActivateMedia) {
|
|
7190
|
+
return;
|
|
7191
|
+
}
|
|
7192
|
+
if (!needsMediaGesture()) {
|
|
7193
|
+
void activateMedia();
|
|
7194
|
+
return;
|
|
7195
|
+
}
|
|
7196
|
+
let cancelled = false;
|
|
7197
|
+
let activating = false;
|
|
7198
|
+
const removeListeners = () => {
|
|
7199
|
+
window.removeEventListener("pointerdown", handleGesture, true);
|
|
7200
|
+
window.removeEventListener("pointerup", handleGesture, true);
|
|
7201
|
+
window.removeEventListener("keydown", handleGesture, true);
|
|
7202
|
+
};
|
|
7203
|
+
const handleGesture = (event) => {
|
|
7204
|
+
if (!isMediaActivationEvent(event) || activating || cancelled) {
|
|
7205
|
+
return;
|
|
7206
|
+
}
|
|
7207
|
+
activating = true;
|
|
7208
|
+
try {
|
|
7209
|
+
const resume = runMediaActivation();
|
|
7210
|
+
void resume.then(() => {
|
|
7211
|
+
if (cancelled || !isPanoAudioUnlocked()) {
|
|
7212
|
+
return;
|
|
7213
|
+
}
|
|
7214
|
+
removeListeners();
|
|
7215
|
+
setMediaActivated(true);
|
|
7216
|
+
});
|
|
7217
|
+
} finally {
|
|
7218
|
+
activating = false;
|
|
7219
|
+
}
|
|
7220
|
+
};
|
|
7221
|
+
window.addEventListener("pointerdown", handleGesture, { capture: true });
|
|
7222
|
+
window.addEventListener("pointerup", handleGesture, { capture: true });
|
|
7223
|
+
window.addEventListener("keydown", handleGesture, { capture: true });
|
|
7224
|
+
return () => {
|
|
7225
|
+
cancelled = true;
|
|
7226
|
+
removeListeners();
|
|
7227
|
+
};
|
|
7228
|
+
}, [activateMedia, runMediaActivation, shouldActivateMedia]);
|
|
7169
7229
|
const fallbackViewRef = useRef13(DEFAULT_VIEW);
|
|
7170
7230
|
const normalizedMinFov = Math.max(1, Math.min(minFov, maxFov - 1));
|
|
7171
7231
|
const normalizedMaxFov = Math.min(
|
|
@@ -7428,7 +7488,7 @@ var PanoViewer = forwardRef2(
|
|
|
7428
7488
|
"aria-label": ariaLabel,
|
|
7429
7489
|
style: rootStyle,
|
|
7430
7490
|
children: [
|
|
7431
|
-
/* @__PURE__ */
|
|
7491
|
+
/* @__PURE__ */ jsx11(
|
|
7432
7492
|
Canvas,
|
|
7433
7493
|
{
|
|
7434
7494
|
"aria-label": `${ariaLabel} canvas`,
|
|
@@ -7450,23 +7510,23 @@ var PanoViewer = forwardRef2(
|
|
|
7450
7510
|
...DEFAULT_CANVAS_STYLE,
|
|
7451
7511
|
touchAction: userControlsEnabled ? "none" : "auto"
|
|
7452
7512
|
},
|
|
7453
|
-
children: /* @__PURE__ */
|
|
7513
|
+
children: /* @__PURE__ */ jsx11(XR, { store: xrStore, children: /* @__PURE__ */ jsxs6(
|
|
7454
7514
|
WebVRRuntimeContext.Provider,
|
|
7455
7515
|
{
|
|
7456
7516
|
value: { host: webVRHost, xrStore, stereoView },
|
|
7457
7517
|
children: [
|
|
7458
|
-
/* @__PURE__ */
|
|
7459
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ jsx11(PanoramaXROrigin, {}),
|
|
7519
|
+
/* @__PURE__ */ jsx11(HotspotAccessibilityContext.Provider, { value: registry, children: /* @__PURE__ */ jsx11(HotspotTargetRegistryContext.Provider, { value: hotspotTargetRegistry, children: /* @__PURE__ */ jsx11(PanoEventBusContext.Provider, { value: eventBus, children: /* @__PURE__ */ jsx11(PanoCursorTree, { cursors: resolvedCursors, children: /* @__PURE__ */ jsx11(PanoramaViewContext.Provider, { value: controlsRef, children: /* @__PURE__ */ jsx11(
|
|
7460
7520
|
PanoContextMenuOverlayContext.Provider,
|
|
7461
7521
|
{
|
|
7462
7522
|
value: contextMenuOverlayApi,
|
|
7463
|
-
children: /* @__PURE__ */
|
|
7523
|
+
children: /* @__PURE__ */ jsx11(PanoChromeOverlayContext.Provider, { value: chromeOverlayApi, children: /* @__PURE__ */ jsx11(PanoVideoHostContext.Provider, { value: videoHost, children: /* @__PURE__ */ jsx11(PanoFilterHostContext.Provider, { value: filterHost, children: /* @__PURE__ */ jsx11(
|
|
7464
7524
|
PanoContextMenuActionsContext.Provider,
|
|
7465
7525
|
{
|
|
7466
7526
|
value: contextMenuActions,
|
|
7467
|
-
children: /* @__PURE__ */
|
|
7468
|
-
/* @__PURE__ */
|
|
7469
|
-
/* @__PURE__ */
|
|
7527
|
+
children: /* @__PURE__ */ jsx11(ScenesHostContext.Provider, { value: scenesHost, children: /* @__PURE__ */ jsx11(BackgroundAudioHostContext.Provider, { value: bgmHost, children: /* @__PURE__ */ jsxs6(PanoMediaActivationHostContext.Provider, { value: mediaActivationHost, children: [
|
|
7528
|
+
/* @__PURE__ */ jsx11(PanoVideoHostReset, {}),
|
|
7529
|
+
/* @__PURE__ */ jsx11(
|
|
7470
7530
|
PanoramaViewRuntime,
|
|
7471
7531
|
{
|
|
7472
7532
|
ref: controlsRef,
|
|
@@ -7477,7 +7537,7 @@ var PanoViewer = forwardRef2(
|
|
|
7477
7537
|
options: controlOptions
|
|
7478
7538
|
}
|
|
7479
7539
|
),
|
|
7480
|
-
(onViewChange || onPanoramaClick || onPanoramaDoubleClick || onPanoramaPointerMove) && /* @__PURE__ */
|
|
7540
|
+
(onViewChange || onPanoramaClick || onPanoramaDoubleClick || onPanoramaPointerMove) && /* @__PURE__ */ jsx11(
|
|
7481
7541
|
PanoEvents,
|
|
7482
7542
|
{
|
|
7483
7543
|
onViewChange,
|
|
@@ -7486,18 +7546,18 @@ var PanoViewer = forwardRef2(
|
|
|
7486
7546
|
onPointerMove: onPanoramaPointerMove
|
|
7487
7547
|
}
|
|
7488
7548
|
),
|
|
7489
|
-
/* @__PURE__ */
|
|
7549
|
+
/* @__PURE__ */ jsx11(
|
|
7490
7550
|
AutoRotate,
|
|
7491
7551
|
{
|
|
7492
7552
|
enabled: legacyAutoRotate,
|
|
7493
7553
|
speed: legacyAutoRotateOptions.autoRotateSpeed
|
|
7494
7554
|
}
|
|
7495
7555
|
),
|
|
7496
|
-
/* @__PURE__ */
|
|
7497
|
-
contextMenuChannel.mount ? /* @__PURE__ */
|
|
7556
|
+
/* @__PURE__ */ jsx11(PanoramaEventSurface, {}),
|
|
7557
|
+
contextMenuChannel.mount ? /* @__PURE__ */ jsx11(PanoContextMenu, { ...contextMenuChannel.props }) : null,
|
|
7498
7558
|
/* @__PURE__ */ jsxs6(ControlClaimsContext.Provider, { value: controlClaims, children: [
|
|
7499
7559
|
children,
|
|
7500
|
-
/* @__PURE__ */
|
|
7560
|
+
/* @__PURE__ */ jsx11(
|
|
7501
7561
|
DefaultControlChannels,
|
|
7502
7562
|
{
|
|
7503
7563
|
fovSpeed: controlOptions.fovSpeed,
|
|
@@ -7525,7 +7585,7 @@ var PanoViewer = forwardRef2(
|
|
|
7525
7585
|
"data-pano-chrome-overlay": "",
|
|
7526
7586
|
ref: setOverlayNode,
|
|
7527
7587
|
children: [
|
|
7528
|
-
/* @__PURE__ */
|
|
7588
|
+
/* @__PURE__ */ jsx11(
|
|
7529
7589
|
PanoVideoChromeBridge,
|
|
7530
7590
|
{
|
|
7531
7591
|
fullscreen: contextMenuActions,
|
|
@@ -7533,21 +7593,12 @@ var PanoViewer = forwardRef2(
|
|
|
7533
7593
|
overlayElement
|
|
7534
7594
|
}
|
|
7535
7595
|
),
|
|
7536
|
-
/* @__PURE__ */
|
|
7596
|
+
/* @__PURE__ */ jsx11(WebVRChromeBridge, { host: webVRHost })
|
|
7537
7597
|
]
|
|
7538
7598
|
}
|
|
7539
7599
|
),
|
|
7540
7600
|
contextMenuOverlay,
|
|
7541
|
-
hotspotAccessibilityControls
|
|
7542
|
-
shouldShowMediaActivation ? /* @__PURE__ */ jsx12(
|
|
7543
|
-
PanoMediaActivationOverlay,
|
|
7544
|
-
{
|
|
7545
|
-
...mediaActivationOptions,
|
|
7546
|
-
onActivate: () => {
|
|
7547
|
-
void activateMedia();
|
|
7548
|
-
}
|
|
7549
|
-
}
|
|
7550
|
-
) : null
|
|
7601
|
+
hotspotAccessibilityControls
|
|
7551
7602
|
]
|
|
7552
7603
|
}
|
|
7553
7604
|
);
|
|
@@ -8477,7 +8528,7 @@ import {
|
|
|
8477
8528
|
Vector2 as Vector22,
|
|
8478
8529
|
Vector3 as Vector37
|
|
8479
8530
|
} from "three";
|
|
8480
|
-
import { jsx as
|
|
8531
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
8481
8532
|
var CENTER_NDC = new Vector22(0, 0);
|
|
8482
8533
|
var HUD_DISTANCE = 2;
|
|
8483
8534
|
var RETICLE_SCALE = 1;
|
|
@@ -8652,8 +8703,8 @@ function WebVRReticle({
|
|
|
8652
8703
|
raycast: noopRaycast,
|
|
8653
8704
|
renderOrder: RETICLE_RENDER_ORDER + 1,
|
|
8654
8705
|
children: [
|
|
8655
|
-
/* @__PURE__ */
|
|
8656
|
-
/* @__PURE__ */
|
|
8706
|
+
/* @__PURE__ */ jsx12("boxGeometry", { args: [CROSSHAIR_LENGTH, CROSSHAIR_THICKNESS, 1e-3] }),
|
|
8707
|
+
/* @__PURE__ */ jsx12(
|
|
8657
8708
|
"meshBasicMaterial",
|
|
8658
8709
|
{
|
|
8659
8710
|
color: "#ffffff",
|
|
@@ -8673,8 +8724,8 @@ function WebVRReticle({
|
|
|
8673
8724
|
raycast: noopRaycast,
|
|
8674
8725
|
renderOrder: RETICLE_RENDER_ORDER + 1,
|
|
8675
8726
|
children: [
|
|
8676
|
-
/* @__PURE__ */
|
|
8677
|
-
/* @__PURE__ */
|
|
8727
|
+
/* @__PURE__ */ jsx12("boxGeometry", { args: [CROSSHAIR_THICKNESS, CROSSHAIR_LENGTH, 1e-3] }),
|
|
8728
|
+
/* @__PURE__ */ jsx12(
|
|
8678
8729
|
"meshBasicMaterial",
|
|
8679
8730
|
{
|
|
8680
8731
|
color: "#ffffff",
|
|
@@ -8696,7 +8747,7 @@ function WebVRReticle({
|
|
|
8696
8747
|
renderOrder: RETICLE_RENDER_ORDER + 2,
|
|
8697
8748
|
visible: false,
|
|
8698
8749
|
children: [
|
|
8699
|
-
/* @__PURE__ */
|
|
8750
|
+
/* @__PURE__ */ jsx12(
|
|
8700
8751
|
"ringGeometry",
|
|
8701
8752
|
{
|
|
8702
8753
|
args: [
|
|
@@ -8709,7 +8760,7 @@ function WebVRReticle({
|
|
|
8709
8760
|
]
|
|
8710
8761
|
}
|
|
8711
8762
|
),
|
|
8712
|
-
/* @__PURE__ */
|
|
8763
|
+
/* @__PURE__ */ jsx12(
|
|
8713
8764
|
"meshBasicMaterial",
|
|
8714
8765
|
{
|
|
8715
8766
|
color: "#ffffff",
|
|
@@ -9161,7 +9212,7 @@ function useWebVRWakeLock(enabled) {
|
|
|
9161
9212
|
}
|
|
9162
9213
|
|
|
9163
9214
|
// src/webvr/webvr.tsx
|
|
9164
|
-
import { Fragment as Fragment4, jsx as
|
|
9215
|
+
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
9165
9216
|
function initializeSettings(screensize, profile) {
|
|
9166
9217
|
const stored = loadWebVRSettings();
|
|
9167
9218
|
return {
|
|
@@ -9495,7 +9546,7 @@ var WebVR = forwardRef4(function WebVR2({
|
|
|
9495
9546
|
wakelock && (mode === "mobilevr" || mode === "fake")
|
|
9496
9547
|
);
|
|
9497
9548
|
return /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
9498
|
-
/* @__PURE__ */
|
|
9549
|
+
/* @__PURE__ */ jsx13(
|
|
9499
9550
|
Gyro,
|
|
9500
9551
|
{
|
|
9501
9552
|
ref: gyroRef,
|
|
@@ -9509,7 +9560,7 @@ var WebVR = forwardRef4(function WebVR2({
|
|
|
9509
9560
|
touchMode: "off"
|
|
9510
9561
|
}
|
|
9511
9562
|
),
|
|
9512
|
-
/* @__PURE__ */
|
|
9563
|
+
/* @__PURE__ */ jsx13(
|
|
9513
9564
|
WebVRStereoRenderer,
|
|
9514
9565
|
{
|
|
9515
9566
|
mode,
|
|
@@ -9517,7 +9568,7 @@ var WebVR = forwardRef4(function WebVR2({
|
|
|
9517
9568
|
screensize: settings.screensize
|
|
9518
9569
|
}
|
|
9519
9570
|
),
|
|
9520
|
-
/* @__PURE__ */
|
|
9571
|
+
/* @__PURE__ */ jsx13(
|
|
9521
9572
|
WebVRReticle,
|
|
9522
9573
|
{
|
|
9523
9574
|
dwellMs: cursorDwellMs,
|
|
@@ -9801,7 +9852,7 @@ diffuseColor.rgb = mix(diffuseColor.rgb, applyPanoFilter(diffuseColor.rgb), clam
|
|
|
9801
9852
|
}
|
|
9802
9853
|
|
|
9803
9854
|
// src/pano-filter/pano-basic-material.tsx
|
|
9804
|
-
import { jsx as
|
|
9855
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
9805
9856
|
function PanoBasicMaterial({
|
|
9806
9857
|
map,
|
|
9807
9858
|
side,
|
|
@@ -9848,7 +9899,7 @@ function PanoBasicMaterial({
|
|
|
9848
9899
|
intensityUniformRef.current.value = snapshot.intensity;
|
|
9849
9900
|
}
|
|
9850
9901
|
}, [snapshot.intensity]);
|
|
9851
|
-
return /* @__PURE__ */
|
|
9902
|
+
return /* @__PURE__ */ jsx14(
|
|
9852
9903
|
"meshBasicMaterial",
|
|
9853
9904
|
{
|
|
9854
9905
|
ref: materialRef,
|
|
@@ -9864,7 +9915,7 @@ function PanoBasicMaterial({
|
|
|
9864
9915
|
}
|
|
9865
9916
|
|
|
9866
9917
|
// src/sphere.tsx
|
|
9867
|
-
import { jsx as
|
|
9918
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
9868
9919
|
function useEquirectTexture(url, anisotropy, generateMipmaps, onLoad, onError) {
|
|
9869
9920
|
const [texture, setTexture] = useState9(null);
|
|
9870
9921
|
const onLoadRef = useRef22(onLoad);
|
|
@@ -9969,8 +10020,8 @@ function Sphere({
|
|
|
9969
10020
|
rotation: [0, MathUtils5.degToRad(90 + yawOffset), 0],
|
|
9970
10021
|
visible,
|
|
9971
10022
|
children: [
|
|
9972
|
-
/* @__PURE__ */
|
|
9973
|
-
/* @__PURE__ */
|
|
10023
|
+
/* @__PURE__ */ jsx15("sphereGeometry", { args: [DEFAULT_PANORAMA_RADIUS, 128, 64] }),
|
|
10024
|
+
/* @__PURE__ */ jsx15(
|
|
9974
10025
|
PanoBasicMaterial,
|
|
9975
10026
|
{
|
|
9976
10027
|
map: displayTexture,
|
|
@@ -10004,7 +10055,7 @@ import {
|
|
|
10004
10055
|
TextureLoader as TextureLoader2,
|
|
10005
10056
|
VideoTexture
|
|
10006
10057
|
} from "three";
|
|
10007
|
-
import { Fragment as Fragment5, jsx as
|
|
10058
|
+
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
10008
10059
|
var EMPTY_TRACKS = [];
|
|
10009
10060
|
var EMPTY_RATES = DEFAULT_PANO_VIDEO_PLAYBACK_RATES;
|
|
10010
10061
|
function createEmptySnapshot() {
|
|
@@ -10725,8 +10776,8 @@ function PanoVideo({
|
|
|
10725
10776
|
rotation: [0, MathUtils6.degToRad(90 + yawOffset), 0],
|
|
10726
10777
|
visible,
|
|
10727
10778
|
children: [
|
|
10728
|
-
/* @__PURE__ */
|
|
10729
|
-
/* @__PURE__ */
|
|
10779
|
+
/* @__PURE__ */ jsx16("sphereGeometry", { args: [DEFAULT_PANORAMA_RADIUS, 128, 64] }),
|
|
10780
|
+
/* @__PURE__ */ jsx16(
|
|
10730
10781
|
PanoBasicMaterial,
|
|
10731
10782
|
{
|
|
10732
10783
|
map: activeTexture,
|
|
@@ -10737,7 +10788,7 @@ function PanoVideo({
|
|
|
10737
10788
|
]
|
|
10738
10789
|
}
|
|
10739
10790
|
) : null,
|
|
10740
|
-
captionsEnabled ? /* @__PURE__ */
|
|
10791
|
+
captionsEnabled ? /* @__PURE__ */ jsx16(PanoVideoCaptions, { appearance: typeof captions === "object" ? captions : void 0 }) : null
|
|
10741
10792
|
] });
|
|
10742
10793
|
}
|
|
10743
10794
|
|
|
@@ -10869,7 +10920,7 @@ function overlayProgress(elapsedTime, duration, startTime) {
|
|
|
10869
10920
|
}
|
|
10870
10921
|
|
|
10871
10922
|
// src/scene-transitions/particle-overlay.tsx
|
|
10872
|
-
import { jsx as
|
|
10923
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
10873
10924
|
var PARTICLE_GRID = 48;
|
|
10874
10925
|
var PARTICLE_COUNT = PARTICLE_GRID * PARTICLE_GRID;
|
|
10875
10926
|
var PARTICLE_VERTEX_SHADER = `
|
|
@@ -10991,7 +11042,7 @@ function ParticleOverlay({
|
|
|
10991
11042
|
onFinish();
|
|
10992
11043
|
}
|
|
10993
11044
|
});
|
|
10994
|
-
return /* @__PURE__ */
|
|
11045
|
+
return /* @__PURE__ */ jsx17(
|
|
10995
11046
|
"mesh",
|
|
10996
11047
|
{
|
|
10997
11048
|
ref: meshRef,
|
|
@@ -11285,7 +11336,7 @@ function createSnapshotMaterial(preset, texture) {
|
|
|
11285
11336
|
}
|
|
11286
11337
|
|
|
11287
11338
|
// src/scene-transitions/snapshot-overlay.tsx
|
|
11288
|
-
import { jsx as
|
|
11339
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
11289
11340
|
function SnapshotOverlay({
|
|
11290
11341
|
snapshot,
|
|
11291
11342
|
transition,
|
|
@@ -11335,20 +11386,20 @@ function SnapshotOverlay({
|
|
|
11335
11386
|
return null;
|
|
11336
11387
|
}
|
|
11337
11388
|
return /* @__PURE__ */ jsxs11("mesh", { ref: meshRef, renderOrder: OVERLAY_RENDER_ORDER, frustumCulled: false, children: [
|
|
11338
|
-
/* @__PURE__ */
|
|
11339
|
-
/* @__PURE__ */
|
|
11389
|
+
/* @__PURE__ */ jsx18("primitive", { attach: "geometry", object: FULLSCREEN_PLANE }),
|
|
11390
|
+
/* @__PURE__ */ jsx18("primitive", { attach: "material", object: material })
|
|
11340
11391
|
] });
|
|
11341
11392
|
}
|
|
11342
11393
|
|
|
11343
11394
|
// src/scene-transitions/transition-overlay.tsx
|
|
11344
|
-
import { jsx as
|
|
11395
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
11345
11396
|
function TransitionOverlay(props) {
|
|
11346
11397
|
const { preset } = props.transition;
|
|
11347
11398
|
switch (preset) {
|
|
11348
11399
|
case "none":
|
|
11349
11400
|
return null;
|
|
11350
11401
|
case "particles":
|
|
11351
|
-
return /* @__PURE__ */
|
|
11402
|
+
return /* @__PURE__ */ jsx19(ParticleOverlay, { ...props });
|
|
11352
11403
|
case "crossfade":
|
|
11353
11404
|
case "zoom":
|
|
11354
11405
|
case "blackout":
|
|
@@ -11376,7 +11427,7 @@ function TransitionOverlay(props) {
|
|
|
11376
11427
|
case "zoomBlur":
|
|
11377
11428
|
case "hexDissolve":
|
|
11378
11429
|
case "filmBurn":
|
|
11379
|
-
return /* @__PURE__ */
|
|
11430
|
+
return /* @__PURE__ */ jsx19(SnapshotOverlay, { ...props });
|
|
11380
11431
|
default: {
|
|
11381
11432
|
const exhaustive = preset;
|
|
11382
11433
|
void exhaustive;
|
|
@@ -11621,7 +11672,7 @@ var TileTextureManager = class {
|
|
|
11621
11672
|
};
|
|
11622
11673
|
|
|
11623
11674
|
// src/tile/texture-manager-context.tsx
|
|
11624
|
-
import { jsx as
|
|
11675
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
11625
11676
|
var TileTextureManagerContext = createContext15(
|
|
11626
11677
|
null
|
|
11627
11678
|
);
|
|
@@ -11645,7 +11696,7 @@ function TileTextureManagerProvider({
|
|
|
11645
11696
|
manager.resume();
|
|
11646
11697
|
return () => manager.dispose();
|
|
11647
11698
|
}, [manager]);
|
|
11648
|
-
return /* @__PURE__ */
|
|
11699
|
+
return /* @__PURE__ */ jsx20(TileTextureManagerContext.Provider, { value: manager, children });
|
|
11649
11700
|
}
|
|
11650
11701
|
function useSharedTileTextureManager() {
|
|
11651
11702
|
return useContext22(TileTextureManagerContext);
|
|
@@ -11854,7 +11905,7 @@ function resolveTemplateUrl(template, address) {
|
|
|
11854
11905
|
}
|
|
11855
11906
|
|
|
11856
11907
|
// src/tile/tile.tsx
|
|
11857
|
-
import { jsx as
|
|
11908
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
11858
11909
|
var MAX_LOD_UPDATE_INTERVAL_MS = 100;
|
|
11859
11910
|
var FAST_ROTATION_THRESHOLD_RADIANS = Math.PI / 180;
|
|
11860
11911
|
var FAST_FOV_THRESHOLD_DEGREES = 0.5;
|
|
@@ -11941,14 +11992,14 @@ function PreviewFace({
|
|
|
11941
11992
|
[geometry]
|
|
11942
11993
|
);
|
|
11943
11994
|
const transform = getFaceTransform(face, PREVIEW_RADIUS);
|
|
11944
|
-
return /* @__PURE__ */
|
|
11995
|
+
return /* @__PURE__ */ jsx21(
|
|
11945
11996
|
"mesh",
|
|
11946
11997
|
{
|
|
11947
11998
|
geometry,
|
|
11948
11999
|
position: transform.position,
|
|
11949
12000
|
renderOrder: -100,
|
|
11950
12001
|
rotation: transform.rotation,
|
|
11951
|
-
children: /* @__PURE__ */
|
|
12002
|
+
children: /* @__PURE__ */ jsx21(
|
|
11952
12003
|
PanoBasicMaterial,
|
|
11953
12004
|
{
|
|
11954
12005
|
depthTest: false,
|
|
@@ -11964,7 +12015,7 @@ function PreviewCube({
|
|
|
11964
12015
|
texture,
|
|
11965
12016
|
faceOrder
|
|
11966
12017
|
}) {
|
|
11967
|
-
return CUBE_FACES.map((face) => /* @__PURE__ */
|
|
12018
|
+
return CUBE_FACES.map((face) => /* @__PURE__ */ jsx21(
|
|
11968
12019
|
PreviewFace,
|
|
11969
12020
|
{
|
|
11970
12021
|
face,
|
|
@@ -12009,14 +12060,14 @@ var TileMesh = memo(function TileMesh2({
|
|
|
12009
12060
|
if (!snapshot.texture) {
|
|
12010
12061
|
return null;
|
|
12011
12062
|
}
|
|
12012
|
-
return /* @__PURE__ */
|
|
12063
|
+
return /* @__PURE__ */ jsx21("group", { position: transform.position, rotation: transform.rotation, children: /* @__PURE__ */ jsx21(
|
|
12013
12064
|
"mesh",
|
|
12014
12065
|
{
|
|
12015
12066
|
geometry: SHARED_TILE_GEOMETRY,
|
|
12016
12067
|
position: [layout.x, layout.y, 0],
|
|
12017
12068
|
renderOrder,
|
|
12018
12069
|
scale: [layout.width, layout.height, 1],
|
|
12019
|
-
children: /* @__PURE__ */
|
|
12070
|
+
children: /* @__PURE__ */ jsx21(
|
|
12020
12071
|
PanoBasicMaterial,
|
|
12021
12072
|
{
|
|
12022
12073
|
depthTest: false,
|
|
@@ -12033,7 +12084,7 @@ var TileLayerMeshes = memo(function TileLayerMeshes2({
|
|
|
12033
12084
|
manager,
|
|
12034
12085
|
resolveUrl
|
|
12035
12086
|
}) {
|
|
12036
|
-
return layer.addresses.map((address) => /* @__PURE__ */
|
|
12087
|
+
return layer.addresses.map((address) => /* @__PURE__ */ jsx21(
|
|
12037
12088
|
TileMesh,
|
|
12038
12089
|
{
|
|
12039
12090
|
address,
|
|
@@ -12371,14 +12422,14 @@ function Tile({
|
|
|
12371
12422
|
commitLayers(nextLayers);
|
|
12372
12423
|
});
|
|
12373
12424
|
return /* @__PURE__ */ jsxs12("group", { visible, children: [
|
|
12374
|
-
previewTexture ? /* @__PURE__ */
|
|
12425
|
+
previewTexture ? /* @__PURE__ */ jsx21(
|
|
12375
12426
|
PreviewCube,
|
|
12376
12427
|
{
|
|
12377
12428
|
texture: previewTexture,
|
|
12378
12429
|
faceOrder: previewFaceOrder
|
|
12379
12430
|
}
|
|
12380
12431
|
) : null,
|
|
12381
|
-
layers.map((layer) => /* @__PURE__ */
|
|
12432
|
+
layers.map((layer) => /* @__PURE__ */ jsx21(
|
|
12382
12433
|
TileLayerMeshes,
|
|
12383
12434
|
{
|
|
12384
12435
|
layer,
|
|
@@ -12391,7 +12442,7 @@ function Tile({
|
|
|
12391
12442
|
}
|
|
12392
12443
|
|
|
12393
12444
|
// src/scenes.tsx
|
|
12394
|
-
import { jsx as
|
|
12445
|
+
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
12395
12446
|
function SceneSource({
|
|
12396
12447
|
scene,
|
|
12397
12448
|
visible,
|
|
@@ -12404,7 +12455,7 @@ function SceneSource({
|
|
|
12404
12455
|
}
|
|
12405
12456
|
switch (scene.type) {
|
|
12406
12457
|
case "sphere":
|
|
12407
|
-
return /* @__PURE__ */
|
|
12458
|
+
return /* @__PURE__ */ jsx22(
|
|
12408
12459
|
Sphere,
|
|
12409
12460
|
{
|
|
12410
12461
|
src: scene.src,
|
|
@@ -12417,7 +12468,7 @@ function SceneSource({
|
|
|
12417
12468
|
);
|
|
12418
12469
|
case "tile": {
|
|
12419
12470
|
const { id: _id, type: _type, ...tileProps } = scene;
|
|
12420
|
-
return /* @__PURE__ */
|
|
12471
|
+
return /* @__PURE__ */ jsx22(
|
|
12421
12472
|
Tile,
|
|
12422
12473
|
{
|
|
12423
12474
|
...tileProps,
|
|
@@ -12685,7 +12736,7 @@ function ScenesController({
|
|
|
12685
12736
|
const renderedScene = slots[liveSlot];
|
|
12686
12737
|
const snapshotVisible = snapshot !== null && (phase === "transitioning" || phase === "recapturing" || phase === "preloading");
|
|
12687
12738
|
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
12688
|
-
/* @__PURE__ */
|
|
12739
|
+
/* @__PURE__ */ jsx22(
|
|
12689
12740
|
SnapshotCapture,
|
|
12690
12741
|
{
|
|
12691
12742
|
requestId: captureRequestId,
|
|
@@ -12697,7 +12748,7 @@ function ScenesController({
|
|
|
12697
12748
|
const source = slots[slot];
|
|
12698
12749
|
const isLive = slot === liveSlot;
|
|
12699
12750
|
const isPending = slot === pendingSlot;
|
|
12700
|
-
return /* @__PURE__ */
|
|
12751
|
+
return /* @__PURE__ */ jsx22(
|
|
12701
12752
|
SceneSource,
|
|
12702
12753
|
{
|
|
12703
12754
|
scene: source,
|
|
@@ -12713,7 +12764,7 @@ function ScenesController({
|
|
|
12713
12764
|
`${slot}:${source?.id ?? "empty"}:${recoveryKey}`
|
|
12714
12765
|
);
|
|
12715
12766
|
}),
|
|
12716
|
-
snapshotVisible ? /* @__PURE__ */
|
|
12767
|
+
snapshotVisible ? /* @__PURE__ */ jsx22(
|
|
12717
12768
|
TransitionOverlay,
|
|
12718
12769
|
{
|
|
12719
12770
|
snapshot,
|
|
@@ -12806,12 +12857,12 @@ function Scenes({
|
|
|
12806
12857
|
}
|
|
12807
12858
|
};
|
|
12808
12859
|
}, [host, requestSceneChange]);
|
|
12809
|
-
return /* @__PURE__ */
|
|
12860
|
+
return /* @__PURE__ */ jsx22(
|
|
12810
12861
|
TileTextureManagerProvider,
|
|
12811
12862
|
{
|
|
12812
12863
|
maxTextureMemoryMb,
|
|
12813
12864
|
maxConcurrentLoads: maxConcurrentTileLoads,
|
|
12814
|
-
children: /* @__PURE__ */
|
|
12865
|
+
children: /* @__PURE__ */ jsx22(
|
|
12815
12866
|
ScenesController,
|
|
12816
12867
|
{
|
|
12817
12868
|
...rest,
|
|
@@ -12864,7 +12915,7 @@ import { useEffect as useEffect28, useMemo as useMemo21, useState as useState13
|
|
|
12864
12915
|
// src/webvr/stereo-html.tsx
|
|
12865
12916
|
import { Html } from "@react-three/drei";
|
|
12866
12917
|
import { useContext as useContext24, useSyncExternalStore as useSyncExternalStore7 } from "react";
|
|
12867
|
-
import { Fragment as Fragment7, jsx as
|
|
12918
|
+
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
12868
12919
|
function useFallbackStereoView() {
|
|
12869
12920
|
const runtime = useContext24(WebVRRuntimeContext);
|
|
12870
12921
|
const host = runtime?.host ?? null;
|
|
@@ -12889,10 +12940,10 @@ function stereoCalculatePosition(eye, stereoView) {
|
|
|
12889
12940
|
function PanoHtml({ children, ...htmlProps }) {
|
|
12890
12941
|
const stereoView = useFallbackStereoView();
|
|
12891
12942
|
if (!stereoView) {
|
|
12892
|
-
return /* @__PURE__ */
|
|
12943
|
+
return /* @__PURE__ */ jsx23(Html, { ...htmlProps, children });
|
|
12893
12944
|
}
|
|
12894
12945
|
return /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
12895
|
-
/* @__PURE__ */
|
|
12946
|
+
/* @__PURE__ */ jsx23(
|
|
12896
12947
|
Html,
|
|
12897
12948
|
{
|
|
12898
12949
|
...htmlProps,
|
|
@@ -12900,7 +12951,7 @@ function PanoHtml({ children, ...htmlProps }) {
|
|
|
12900
12951
|
children
|
|
12901
12952
|
}
|
|
12902
12953
|
),
|
|
12903
|
-
/* @__PURE__ */
|
|
12954
|
+
/* @__PURE__ */ jsx23(
|
|
12904
12955
|
Html,
|
|
12905
12956
|
{
|
|
12906
12957
|
...htmlProps,
|
|
@@ -12913,7 +12964,7 @@ function PanoHtml({ children, ...htmlProps }) {
|
|
|
12913
12964
|
}
|
|
12914
12965
|
|
|
12915
12966
|
// src/hotspot/hotspot-tooltip.tsx
|
|
12916
|
-
import { jsx as
|
|
12967
|
+
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
12917
12968
|
var DEFAULT_HOTSPOT_TOOLTIP_OFFSET = 12;
|
|
12918
12969
|
var DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE = {
|
|
12919
12970
|
background: "rgba(22, 22, 22, 0.72)",
|
|
@@ -13010,14 +13061,14 @@ function HotspotTooltip({
|
|
|
13010
13061
|
if (!showImage && !content.text) {
|
|
13011
13062
|
return null;
|
|
13012
13063
|
}
|
|
13013
|
-
return /* @__PURE__ */
|
|
13064
|
+
return /* @__PURE__ */ jsx24(PanoHtml, { pointerEvents: "none", style: WRAPPER_STYLE, zIndexRange: [20, 10], children: /* @__PURE__ */ jsxs15(
|
|
13014
13065
|
"div",
|
|
13015
13066
|
{
|
|
13016
13067
|
className: "pano-hotspot-tooltip",
|
|
13017
13068
|
role: "tooltip",
|
|
13018
13069
|
style: bubbleStyle,
|
|
13019
13070
|
children: [
|
|
13020
|
-
showImage ? /* @__PURE__ */
|
|
13071
|
+
showImage ? /* @__PURE__ */ jsx24(
|
|
13021
13072
|
"img",
|
|
13022
13073
|
{
|
|
13023
13074
|
alt: content.imageAlt ?? content.text ?? "",
|
|
@@ -13026,14 +13077,14 @@ function HotspotTooltip({
|
|
|
13026
13077
|
src: content.image
|
|
13027
13078
|
}
|
|
13028
13079
|
) : null,
|
|
13029
|
-
content.text ? /* @__PURE__ */
|
|
13080
|
+
content.text ? /* @__PURE__ */ jsx24("p", { className: "pano-hotspot-tooltip-text", children: content.text }) : null
|
|
13030
13081
|
]
|
|
13031
13082
|
}
|
|
13032
13083
|
) });
|
|
13033
13084
|
}
|
|
13034
13085
|
|
|
13035
13086
|
// src/hotspot/hotspot-anchor.tsx
|
|
13036
|
-
import { jsx as
|
|
13087
|
+
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
13037
13088
|
var DEFAULT_FLOATING_DISTANCE = 10;
|
|
13038
13089
|
var PANORAMA_RADIUS = DEFAULT_PANORAMA_RADIUS;
|
|
13039
13090
|
var PANORAMA_SURFACE_INSET = 4;
|
|
@@ -13680,18 +13731,18 @@ function HotspotAnchor({
|
|
|
13680
13731
|
} : void 0,
|
|
13681
13732
|
onPointerUp: acceptsPointer ? (event) => releasePointer(event, true) : void 0,
|
|
13682
13733
|
children: [
|
|
13683
|
-
focused ? focusContent ?? /* @__PURE__ */
|
|
13734
|
+
focused ? focusContent ?? /* @__PURE__ */ jsx25(
|
|
13684
13735
|
"lineSegments",
|
|
13685
13736
|
{
|
|
13686
13737
|
geometry: focusGeometry,
|
|
13687
13738
|
position: [0, 0, 0.01],
|
|
13688
13739
|
renderOrder: renderOrder + 1,
|
|
13689
13740
|
scale: [1.12, 1.12, 1],
|
|
13690
|
-
children: /* @__PURE__ */
|
|
13741
|
+
children: /* @__PURE__ */ jsx25("lineBasicMaterial", { color: "#f5fbfc", depthTest: false })
|
|
13691
13742
|
}
|
|
13692
13743
|
) : null,
|
|
13693
13744
|
children,
|
|
13694
|
-
tooltipOpen && tooltipContent ? /* @__PURE__ */
|
|
13745
|
+
tooltipOpen && tooltipContent ? /* @__PURE__ */ jsx25("group", { ref: tooltipAnchorRef, children: /* @__PURE__ */ jsx25(
|
|
13695
13746
|
HotspotTooltip,
|
|
13696
13747
|
{
|
|
13697
13748
|
appearance: tooltipAppearance,
|
|
@@ -13712,7 +13763,7 @@ import {
|
|
|
13712
13763
|
MeshBasicMaterial,
|
|
13713
13764
|
Vector2 as Vector26
|
|
13714
13765
|
} from "three";
|
|
13715
|
-
import { jsx as
|
|
13766
|
+
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
13716
13767
|
var HOTSPOT_ALPHA_CUTOFF = 0.05;
|
|
13717
13768
|
var SAMPLE_UV = new Vector26();
|
|
13718
13769
|
var RAYCAST_HITS = [];
|
|
@@ -13815,8 +13866,8 @@ function HotspotPlane({
|
|
|
13815
13866
|
opacity
|
|
13816
13867
|
}) {
|
|
13817
13868
|
return /* @__PURE__ */ jsxs17("mesh", { raycast: hotspotPlaneRaycast, children: [
|
|
13818
|
-
/* @__PURE__ */
|
|
13819
|
-
/* @__PURE__ */
|
|
13869
|
+
/* @__PURE__ */ jsx26("planeGeometry", { args: [1, 1] }),
|
|
13870
|
+
/* @__PURE__ */ jsx26(
|
|
13820
13871
|
"meshBasicMaterial",
|
|
13821
13872
|
{
|
|
13822
13873
|
alphaTest: HOTSPOT_ALPHA_CUTOFF,
|
|
@@ -13832,7 +13883,7 @@ function HotspotPlane({
|
|
|
13832
13883
|
}
|
|
13833
13884
|
|
|
13834
13885
|
// src/hotspot/image-hotspot.tsx
|
|
13835
|
-
import { jsx as
|
|
13886
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
13836
13887
|
function useHotspotImageTexture(src, onLoad, onError) {
|
|
13837
13888
|
const gl = useThree21((state) => state.gl);
|
|
13838
13889
|
const [texture, setTexture] = useState15(null);
|
|
@@ -13896,7 +13947,7 @@ function ImageHotspot({
|
|
|
13896
13947
|
...anchorProps
|
|
13897
13948
|
}) {
|
|
13898
13949
|
const texture = useHotspotImageTexture(src, onLoad, onError);
|
|
13899
|
-
return /* @__PURE__ */
|
|
13950
|
+
return /* @__PURE__ */ jsx27(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ jsx27(HotspotPlane, { map: texture, opacity }) });
|
|
13900
13951
|
}
|
|
13901
13952
|
|
|
13902
13953
|
// src/hotspot/polygon-hotspot.tsx
|
|
@@ -13921,7 +13972,7 @@ import {
|
|
|
13921
13972
|
PerspectiveCamera as PerspectiveCamera6,
|
|
13922
13973
|
Vector3 as Vector314
|
|
13923
13974
|
} from "three";
|
|
13924
|
-
import { jsx as
|
|
13975
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
13925
13976
|
var LINE_WORLD_POSITION = new Vector314();
|
|
13926
13977
|
function applyScreenSpaceDashScale(object, camera, viewportHeight) {
|
|
13927
13978
|
const material = object?.material;
|
|
@@ -13967,7 +14018,7 @@ function HotspotStrokeLine({
|
|
|
13967
14018
|
}
|
|
13968
14019
|
applyScreenSpaceDashScale(lineRef.current, state.camera, state.size.height);
|
|
13969
14020
|
});
|
|
13970
|
-
return /* @__PURE__ */
|
|
14021
|
+
return /* @__PURE__ */ jsx28(
|
|
13971
14022
|
Line,
|
|
13972
14023
|
{
|
|
13973
14024
|
ref: lineRef,
|
|
@@ -13989,7 +14040,7 @@ function HotspotStrokeLine({
|
|
|
13989
14040
|
}
|
|
13990
14041
|
|
|
13991
14042
|
// src/hotspot/polygon-hotspot.tsx
|
|
13992
|
-
import { jsx as
|
|
14043
|
+
import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
13993
14044
|
var POLYGON_RADIUS = 990;
|
|
13994
14045
|
var MAX_FILL_SEGMENT_DEGREES = 7;
|
|
13995
14046
|
function cloneVertices(vertices) {
|
|
@@ -14292,7 +14343,7 @@ function PolygonHotspot({
|
|
|
14292
14343
|
draggable,
|
|
14293
14344
|
interactive,
|
|
14294
14345
|
useAngularScale: false,
|
|
14295
|
-
focusContent: /* @__PURE__ */
|
|
14346
|
+
focusContent: /* @__PURE__ */ jsx29(
|
|
14296
14347
|
HotspotStrokeLine,
|
|
14297
14348
|
{
|
|
14298
14349
|
color: "#75cbd3",
|
|
@@ -14314,7 +14365,7 @@ function PolygonHotspot({
|
|
|
14314
14365
|
startVerticesRef.current = null;
|
|
14315
14366
|
},
|
|
14316
14367
|
children: [
|
|
14317
|
-
/* @__PURE__ */
|
|
14368
|
+
/* @__PURE__ */ jsx29("mesh", { geometry: fillGeometry, renderOrder, children: /* @__PURE__ */ jsx29(
|
|
14318
14369
|
"meshBasicMaterial",
|
|
14319
14370
|
{
|
|
14320
14371
|
color: fill,
|
|
@@ -14324,7 +14375,7 @@ function PolygonHotspot({
|
|
|
14324
14375
|
transparent: true
|
|
14325
14376
|
}
|
|
14326
14377
|
) }),
|
|
14327
|
-
/* @__PURE__ */
|
|
14378
|
+
/* @__PURE__ */ jsx29(
|
|
14328
14379
|
HotspotStrokeLine,
|
|
14329
14380
|
{
|
|
14330
14381
|
color: stroke,
|
|
@@ -14349,7 +14400,7 @@ import {
|
|
|
14349
14400
|
Quaternion as Quaternion5,
|
|
14350
14401
|
Vector3 as Vector316
|
|
14351
14402
|
} from "three";
|
|
14352
|
-
import { jsx as
|
|
14403
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
14353
14404
|
var POLYLINE_RADIUS = 990;
|
|
14354
14405
|
var MAX_SEGMENT_DEGREES = 7;
|
|
14355
14406
|
function cloneVertices2(vertices) {
|
|
@@ -14489,7 +14540,7 @@ function PolylineHotspot({
|
|
|
14489
14540
|
startPosition: event.startPosition
|
|
14490
14541
|
});
|
|
14491
14542
|
};
|
|
14492
|
-
return /* @__PURE__ */
|
|
14543
|
+
return /* @__PURE__ */ jsx30(
|
|
14493
14544
|
HotspotAnchor,
|
|
14494
14545
|
{
|
|
14495
14546
|
...anchorProps,
|
|
@@ -14503,7 +14554,7 @@ function PolylineHotspot({
|
|
|
14503
14554
|
renderOrder,
|
|
14504
14555
|
draggable,
|
|
14505
14556
|
useAngularScale: false,
|
|
14506
|
-
focusContent: /* @__PURE__ */
|
|
14557
|
+
focusContent: /* @__PURE__ */ jsx30(
|
|
14507
14558
|
HotspotStrokeLine,
|
|
14508
14559
|
{
|
|
14509
14560
|
color: "#75cbd3",
|
|
@@ -14524,7 +14575,7 @@ function PolylineHotspot({
|
|
|
14524
14575
|
emitVerticesChange(event, onDragEnd);
|
|
14525
14576
|
startVerticesRef.current = null;
|
|
14526
14577
|
},
|
|
14527
|
-
children: /* @__PURE__ */
|
|
14578
|
+
children: /* @__PURE__ */ jsx30(
|
|
14528
14579
|
HotspotStrokeLine,
|
|
14529
14580
|
{
|
|
14530
14581
|
color: stroke,
|
|
@@ -14549,7 +14600,7 @@ import {
|
|
|
14549
14600
|
LinearMipmapLinearFilter as LinearMipmapLinearFilter4,
|
|
14550
14601
|
SRGBColorSpace as SRGBColorSpace6
|
|
14551
14602
|
} from "three";
|
|
14552
|
-
import { jsx as
|
|
14603
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
14553
14604
|
var GRAPHIC_TEXTURE_SIZE = 512;
|
|
14554
14605
|
function resolveStrokeWidth(value) {
|
|
14555
14606
|
return Number.isFinite(value) ? Math.max(value, 0) : 8;
|
|
@@ -14769,15 +14820,15 @@ function CanvasGraphicHotspot({
|
|
|
14769
14820
|
...anchorProps
|
|
14770
14821
|
}) {
|
|
14771
14822
|
const texture = useGraphicTexture(graphic, width, height, onLoad, onError);
|
|
14772
|
-
return /* @__PURE__ */
|
|
14823
|
+
return /* @__PURE__ */ jsx31(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ jsx31(HotspotPlane, { map: texture, opacity }) });
|
|
14773
14824
|
}
|
|
14774
14825
|
function GraphicHotspot(props) {
|
|
14775
14826
|
const { graphic, ...restProps } = props;
|
|
14776
14827
|
if (graphic.kind === "svg") {
|
|
14777
14828
|
const imageProps = restProps;
|
|
14778
|
-
return /* @__PURE__ */
|
|
14829
|
+
return /* @__PURE__ */ jsx31(ImageHotspot, { ...imageProps, src: graphic.src });
|
|
14779
14830
|
}
|
|
14780
|
-
return /* @__PURE__ */
|
|
14831
|
+
return /* @__PURE__ */ jsx31(CanvasGraphicHotspot, { ...restProps, graphic });
|
|
14781
14832
|
}
|
|
14782
14833
|
|
|
14783
14834
|
// src/hotspot/sequence-hotspot.tsx
|
|
@@ -14790,7 +14841,7 @@ import {
|
|
|
14790
14841
|
SRGBColorSpace as SRGBColorSpace7,
|
|
14791
14842
|
TextureLoader as TextureLoader6
|
|
14792
14843
|
} from "three";
|
|
14793
|
-
import { jsx as
|
|
14844
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
14794
14845
|
var DEFAULT_SEQUENCE_FPS = 12;
|
|
14795
14846
|
function resolveFps(value) {
|
|
14796
14847
|
return Number.isFinite(value) && value > 0 ? value : DEFAULT_SEQUENCE_FPS;
|
|
@@ -14966,7 +15017,7 @@ function SequenceHotspot({
|
|
|
14966
15017
|
onFrameChangeRef.current?.({ id, index: nextIndex, src });
|
|
14967
15018
|
}
|
|
14968
15019
|
});
|
|
14969
|
-
return /* @__PURE__ */
|
|
15020
|
+
return /* @__PURE__ */ jsx32(HotspotAnchor, { ...anchorProps, id, height, width, children: /* @__PURE__ */ jsx32(HotspotPlane, { map: texture, opacity }) });
|
|
14970
15021
|
}
|
|
14971
15022
|
|
|
14972
15023
|
// src/hotspot/video-hotspot.tsx
|
|
@@ -14980,7 +15031,7 @@ import {
|
|
|
14980
15031
|
TextureLoader as TextureLoader7,
|
|
14981
15032
|
VideoTexture as VideoTexture2
|
|
14982
15033
|
} from "three";
|
|
14983
|
-
import { jsx as
|
|
15034
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
14984
15035
|
function clampVolume2(volume) {
|
|
14985
15036
|
if (!Number.isFinite(volume)) {
|
|
14986
15037
|
return 1;
|
|
@@ -15205,7 +15256,7 @@ function VideoHotspot({
|
|
|
15205
15256
|
};
|
|
15206
15257
|
}, [playing, resource]);
|
|
15207
15258
|
const activeTexture = resource?.ready ? resource.texture : posterTexture;
|
|
15208
|
-
return /* @__PURE__ */
|
|
15259
|
+
return /* @__PURE__ */ jsx33(HotspotAnchor, { ...anchorProps, id, height, width, children: /* @__PURE__ */ jsx33(HotspotPlane, { map: activeTexture, opacity }) });
|
|
15209
15260
|
}
|
|
15210
15261
|
|
|
15211
15262
|
// src/hotspot/audio-hotspot.tsx
|
|
@@ -15219,7 +15270,7 @@ import {
|
|
|
15219
15270
|
SRGBColorSpace as SRGBColorSpace9,
|
|
15220
15271
|
TextureLoader as TextureLoader8
|
|
15221
15272
|
} from "three";
|
|
15222
|
-
import { jsx as
|
|
15273
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
15223
15274
|
var SPEAKER_TEXTURE_SIZE = 512;
|
|
15224
15275
|
function paintSpeakerBody(context, center) {
|
|
15225
15276
|
context.fillStyle = "#f5fbfc";
|
|
@@ -15504,7 +15555,7 @@ function AudioHotspot({
|
|
|
15504
15555
|
howl.mute(mutedRef.current);
|
|
15505
15556
|
howl.volume(clampAudioVolume(volumeRef.current) * spatial.gain);
|
|
15506
15557
|
});
|
|
15507
|
-
return /* @__PURE__ */
|
|
15558
|
+
return /* @__PURE__ */ jsx34(HotspotAnchor, { ...anchorProps, id, height, width, children: marker ? /* @__PURE__ */ jsx34(HotspotPlane, { map: markerTexture, opacity }) : null });
|
|
15508
15559
|
}
|
|
15509
15560
|
|
|
15510
15561
|
// src/hotspot/text-hotspot.tsx
|
|
@@ -15516,7 +15567,7 @@ import {
|
|
|
15516
15567
|
LinearMipmapLinearFilter as LinearMipmapLinearFilter8,
|
|
15517
15568
|
SRGBColorSpace as SRGBColorSpace10
|
|
15518
15569
|
} from "three";
|
|
15519
|
-
import { jsx as
|
|
15570
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
15520
15571
|
var TEXT_TEXTURE_LONG_SIDE = 1024;
|
|
15521
15572
|
var DEFAULT_FONT_FAMILY = "system-ui, sans-serif";
|
|
15522
15573
|
var DEFAULT_FONT_SIZE = 96;
|
|
@@ -15834,13 +15885,13 @@ function TextHotspot({
|
|
|
15834
15885
|
whiteSpace
|
|
15835
15886
|
};
|
|
15836
15887
|
const texture = useTextTexture(text, width, height, style, onLoad, onError);
|
|
15837
|
-
return /* @__PURE__ */
|
|
15888
|
+
return /* @__PURE__ */ jsx35(HotspotAnchor, { ...anchorProps, height, width, children: /* @__PURE__ */ jsx35(HotspotPlane, { map: texture, opacity }) });
|
|
15838
15889
|
}
|
|
15839
15890
|
|
|
15840
15891
|
// src/hotspot/iframe-hotspot.tsx
|
|
15841
15892
|
import { Html as Html2 } from "@react-three/drei";
|
|
15842
15893
|
import { DoubleSide as DoubleSide6 } from "three";
|
|
15843
|
-
import { jsx as
|
|
15894
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
15844
15895
|
var IFRAME_LONG_SIDE = 800;
|
|
15845
15896
|
var CSS3D_DISTANCE_FACTOR = 400;
|
|
15846
15897
|
var DEFAULT_SANDBOX = "allow-scripts allow-popups allow-forms";
|
|
@@ -15907,8 +15958,8 @@ function IframeHotspot({
|
|
|
15907
15958
|
width,
|
|
15908
15959
|
children: [
|
|
15909
15960
|
/* @__PURE__ */ jsxs19("mesh", { children: [
|
|
15910
|
-
/* @__PURE__ */
|
|
15911
|
-
/* @__PURE__ */
|
|
15961
|
+
/* @__PURE__ */ jsx36("planeGeometry", { args: [1, 1] }),
|
|
15962
|
+
/* @__PURE__ */ jsx36(
|
|
15912
15963
|
"meshBasicMaterial",
|
|
15913
15964
|
{
|
|
15914
15965
|
depthWrite: false,
|
|
@@ -15919,7 +15970,7 @@ function IframeHotspot({
|
|
|
15919
15970
|
}
|
|
15920
15971
|
)
|
|
15921
15972
|
] }),
|
|
15922
|
-
/* @__PURE__ */
|
|
15973
|
+
/* @__PURE__ */ jsx36(
|
|
15923
15974
|
Html2,
|
|
15924
15975
|
{
|
|
15925
15976
|
distanceFactor: CSS3D_DISTANCE_FACTOR,
|
|
@@ -15934,7 +15985,7 @@ function IframeHotspot({
|
|
|
15934
15985
|
},
|
|
15935
15986
|
transform: true,
|
|
15936
15987
|
zIndexRange: [10, 0],
|
|
15937
|
-
children: /* @__PURE__ */
|
|
15988
|
+
children: /* @__PURE__ */ jsx36(
|
|
15938
15989
|
"iframe",
|
|
15939
15990
|
{
|
|
15940
15991
|
allow,
|