@realsee/five 6.6.0-alpha.9 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.Five.html +60 -58
  5. package/docs/classes/five.Model.html +1 -1
  6. package/docs/classes/five.ModelScene.html +1 -1
  7. package/docs/classes/five.PBMContainer.html +1 -1
  8. package/docs/classes/five.PBMGroup.html +1 -1
  9. package/docs/classes/five.PBMMesh.html +2 -2
  10. package/docs/classes/five.PBMMeshMaterial.html +6 -6
  11. package/docs/classes/five.PBMPointCloud.html +1 -1
  12. package/docs/classes/five.PBMPointCloudMaterial.html +5 -5
  13. package/docs/classes/five.PBMSkinnedMesh.html +2 -2
  14. package/docs/classes/five.PanoCircleMesh.html +1 -1
  15. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  16. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  17. package/docs/classes/five.Parameter.html +52 -52
  18. package/docs/classes/five.Tile3DModel.html +21 -21
  19. package/docs/classes/five.TileNode.html +1 -1
  20. package/docs/classes/five.TileRequestScheduler.html +1 -1
  21. package/docs/classes/five.TrajectoryNode.html +1 -1
  22. package/docs/classes/five.Work.html +15 -15
  23. package/docs/classes/five.WorkResolvedObserver.html +18 -14
  24. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  25. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  26. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  27. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  28. package/docs/classes/line.LineGeometry.html +1 -1
  29. package/docs/classes/line.LineMaterial.html +1 -1
  30. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  31. package/docs/classes/line.THREE_Line2.html +1 -1
  32. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  33. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  34. package/docs/classes/vfx.Airflow.html +1 -1
  35. package/docs/classes/vfx.Flame.html +1 -1
  36. package/docs/classes/vfx.Particle.html +1 -1
  37. package/docs/classes/vfx.ParticleGPU.html +1 -1
  38. package/docs/classes/vfx.SpotLight.html +1 -1
  39. package/docs/functions/five.defaultImageURLTransform.html +1 -1
  40. package/docs/functions/five.parseWork.html +1 -1
  41. package/docs/functions/vue.useFiveWorks.html +2 -2
  42. package/docs/hierarchy.html +1 -1
  43. package/docs/interfaces/five.AddableObject.html +1 -1
  44. package/docs/interfaces/five.BaseEvent.html +1 -1
  45. package/docs/interfaces/five.EventCallback.html +1 -1
  46. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  47. package/docs/interfaces/five.GestureEvent.html +1 -1
  48. package/docs/interfaces/five.ImageOptions.html +16 -11
  49. package/docs/interfaces/five.ImageURLOptions.html +7 -5
  50. package/docs/interfaces/five.IntersectEvent.html +1 -1
  51. package/docs/interfaces/five.IntersectMesh.html +1 -1
  52. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  53. package/docs/interfaces/five.Intersection.html +3 -3
  54. package/docs/interfaces/five.KTX2.html +2 -2
  55. package/docs/interfaces/five.LoosePanoWork.html +2 -2
  56. package/docs/interfaces/five.LooseWork.html +2 -2
  57. package/docs/interfaces/five.LooseWorkInitial.html +2 -2
  58. package/docs/interfaces/five.LooseWorkModel.html +2 -2
  59. package/docs/interfaces/five.LooseWorkObserver.html +2 -2
  60. package/docs/interfaces/five.LooseWorkPanorama.html +4 -2
  61. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
  62. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  63. package/docs/interfaces/five.ModeChangeEvent.html +1 -1
  64. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  65. package/docs/interfaces/five.ModelEvent.html +1 -1
  66. package/docs/interfaces/five.ModelLike.html +1 -1
  67. package/docs/interfaces/five.ModelSceneEvent.html +1 -1
  68. package/docs/interfaces/five.MovePanoOptions.html +1 -1
  69. package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
  70. package/docs/interfaces/five.ObjectEvent.html +1 -1
  71. package/docs/interfaces/five.PBMMaterial.html +1 -1
  72. package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -2
  73. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -2
  74. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  75. package/docs/interfaces/five.PanoEvent.html +1 -1
  76. package/docs/interfaces/five.PanoTextureEvent.html +1 -1
  77. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  78. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  79. package/docs/interfaces/five.ParameterMaterialValue.html +37 -37
  80. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  81. package/docs/interfaces/five.ParameterValue.html +51 -51
  82. package/docs/interfaces/five.Pose.html +1 -1
  83. package/docs/interfaces/five.RenderEvent.html +1 -1
  84. package/docs/interfaces/five.ResolvedParameterValue.html +51 -51
  85. package/docs/interfaces/five.State.html +1 -1
  86. package/docs/interfaces/five.StateEvent.html +1 -1
  87. package/docs/interfaces/five.TextureOptions.html +12 -7
  88. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +5 -5
  89. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  90. package/docs/interfaces/five.ViewLayer.html +21 -21
  91. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  92. package/docs/interfaces/five.WorkImage.html +1 -1
  93. package/docs/interfaces/five.WorkModel.html +6 -6
  94. package/docs/interfaces/five.WorkModelLayer.html +2 -2
  95. package/docs/interfaces/five.WorkObserver.html +20 -15
  96. package/docs/interfaces/five.WorkTile.html +1 -1
  97. package/docs/interfaces/five.WorksEvent.html +1 -1
  98. package/docs/interfaces/five.XRControllerEvent.html +1 -1
  99. package/docs/interfaces/five.XRGestureEvent.html +1 -1
  100. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  101. package/docs/interfaces/five.XRSessionEvent.html +1 -1
  102. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  103. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  104. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  105. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  106. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  107. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  108. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  109. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  110. package/docs/interfaces/plugins.PanoAnimeController.html +12 -8
  111. package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -1
  112. package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +7 -0
  113. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -4
  114. package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +2 -2
  115. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +3 -3
  116. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  117. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  118. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  119. package/docs/interfaces/react.FiveInjectionTypes.html +2 -1
  120. package/docs/modules/plugins.PanoAnimePluginType.html +1 -1
  121. package/docs/types/five.ParseOptions.html +6 -6
  122. package/docs/variables/five.ktx2.html +1 -1
  123. package/five/declare.d.ts +34 -0
  124. package/five/index.d.ts +18 -12
  125. package/five/index.js +69 -69
  126. package/five/index.mjs +5995 -5826
  127. package/gltf-loader/index.js +3 -3
  128. package/gltf-loader/index.mjs +146 -146
  129. package/line/index.js +3 -3
  130. package/line/index.mjs +10 -10
  131. package/package.json +1 -1
  132. package/plugins/index.d.ts +26 -1
  133. package/plugins/index.js +10 -10
  134. package/plugins/index.mjs +53 -48
  135. package/react/index.js +2 -2
  136. package/react/index.mjs +2 -2
  137. package/shader-lib/index.js +2 -2
  138. package/shader-lib/index.mjs +2 -2
  139. package/sticker/index.js +3 -3
  140. package/sticker/index.mjs +7 -7
  141. package/umd/five-gltf-loader.js +3 -3
  142. package/umd/five-line.js +3 -3
  143. package/umd/five-plugins.js +9 -9
  144. package/umd/five-react.js +2 -2
  145. package/umd/five-shader-lib.js +2 -2
  146. package/umd/five-sticker.js +3 -3
  147. package/umd/five-vfx.js +2 -2
  148. package/umd/five-vue.js +2 -2
  149. package/umd/five.js +69 -69
  150. package/vfx/index.js +2 -2
  151. package/vfx/index.mjs +2 -2
  152. package/vue/index.js +2 -2
  153. package/vue/index.mjs +2 -2
  154. package/work-downloader/index.js +2 -2
  155. package/work-downloader/index.mjs +2 -2
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -295,14 +295,14 @@ function Fe(f, o) {
295
295
  }
296
296
  f.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
297
297
  }
298
- var H = function() {
299
- return H = Object.assign || function(o) {
298
+ var j = function() {
299
+ return j = Object.assign || function(o) {
300
300
  for (var e, a = 1, t = arguments.length; a < t; a++) {
301
301
  e = arguments[a];
302
302
  for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (o[s] = e[s]);
303
303
  }
304
304
  return o;
305
- }, H.apply(this, arguments);
305
+ }, j.apply(this, arguments);
306
306
  };
307
307
  function De(f, o, e, a) {
308
308
  function t(s) {
@@ -445,8 +445,8 @@ var Gt = (
445
445
  typeof a == "number" ? (this.value[e] = a, this.config[e] = { circle: !1 }) : (this.value[e] = a.value, this.config[e] = { circle: a.circle });
446
446
  }
447
447
  this.keyframes = [
448
- { progress: 0, value: H({}, this.value) },
449
- { progress: 1, value: H({}, this.value) }
448
+ { progress: 0, value: j({}, this.value) },
449
+ { progress: 1, value: j({}, this.value) }
450
450
  ];
451
451
  }
452
452
  return f.prototype.getProgress = function(o) {
@@ -462,7 +462,7 @@ var Gt = (
462
462
  }
463
463
  return s;
464
464
  }
465
- return H({}, this.keyframes[this.keyframes.length - 1].value);
465
+ return j({}, this.keyframes[this.keyframes.length - 1].value);
466
466
  }, f.prototype.getProgressVelocity = function(o) {
467
467
  var e = o - this.startTime;
468
468
  return e >= this.duration ? 0 : Cn(1, this.startVelocity, this.duration, e);
@@ -491,7 +491,7 @@ var Gt = (
491
491
  if (a === void 0 && (a = 0), o.length < 2)
492
492
  throw new Error("keyframes invalid.");
493
493
  return isNaN(e) && (e = 0), isNaN(a) && (a = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(c, l) {
494
- t = t != null ? t : Tt(), s.progress = 0, s.ended = !1, s.startTime = t, s.startVelocity = a, s.keyframes = o, s.duration = e, e === 0 ? (s.progress = 1, s.value = H({}, o[o.length - 1].value)) : s.value = H({}, o[0].value), s.callbacks = [c, l];
494
+ t = t != null ? t : Tt(), s.progress = 0, s.ended = !1, s.startTime = t, s.startVelocity = a, s.keyframes = o, s.duration = e, e === 0 ? (s.progress = 1, s.value = j({}, o[o.length - 1].value)) : s.value = j({}, o[0].value), s.callbacks = [c, l];
495
495
  });
496
496
  }, f.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
@@ -658,7 +658,7 @@ void main() {
658
658
  selectAll: !1
659
659
  };
660
660
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
661
- var c = H({}, a == null ? void 0 : a.config);
661
+ var c = j({}, a == null ? void 0 : a.config);
662
662
  return t._config = c, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
663
663
  .ItemMaskPlugin {
664
664
  position: absolute;
@@ -681,13 +681,13 @@ void main() {
681
681
  }
682
682
  return Object.defineProperty(o.prototype, "config", {
683
683
  get: function() {
684
- return H({}, this._config);
684
+ return j({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
688
  }), o.prototype.updateState = function(e, a) {
689
689
  var t = this.state;
690
- this.state = H(H({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
690
+ this.state = j(j({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
691
691
  }, o.prototype.load = function(e) {
692
692
  return De(this, void 0, void 0, function() {
693
693
  var a, t, s = this;
@@ -914,7 +914,7 @@ var wt = (function(f, o, e, a) {
914
914
  var r = n.ownerDocument || n;
915
915
  return r.defaultView || r.parentWindow || f;
916
916
  }
917
- var O = /mobile|tablet|ip(ad|hone|od)|android/i, F = "ontouchstart" in f, Y = re(f, "PointerEvent") !== a, ne = F && O.test(navigator.userAgent), z = "touch", U = "pen", q = "mouse", V = "kinect", B = 25, k = 1, $ = 2, j = 4, G = 8, _e = 1, Ee = 2, Oe = 4, Se = 8, xe = 16, oe = Ee | Oe, ue = Se | xe, Ue = oe | ue, Be = ["x", "y"], Ie = ["clientX", "clientY"];
917
+ var O = /mobile|tablet|ip(ad|hone|od)|android/i, F = "ontouchstart" in f, Y = re(f, "PointerEvent") !== a, ne = F && O.test(navigator.userAgent), z = "touch", U = "pen", q = "mouse", V = "kinect", B = 25, k = 1, $ = 2, H = 4, G = 8, _e = 1, Ee = 2, Oe = 4, Se = 8, xe = 16, oe = Ee | Oe, ue = Se | xe, Ue = oe | ue, Be = ["x", "y"], Ie = ["clientX", "clientY"];
918
918
  function ae(n, r) {
919
919
  var i = this;
920
920
  this.manager = n, this.callback = r, this.element = n.element, this.target = n.options.inputTarget, this.domHandler = function(h) {
@@ -946,7 +946,7 @@ var wt = (function(f, o, e, a) {
946
946
  return i ? r = i : Y ? r = ht : ne ? r = $e : F ? r = ft : r = Je, new r(n, Ze);
947
947
  }
948
948
  function Ze(n, r, i) {
949
- var h = i.pointers.length, m = i.changedPointers.length, E = r & k && h - m === 0, N = r & (j | G) && h - m === 0;
949
+ var h = i.pointers.length, m = i.changedPointers.length, E = r & k && h - m === 0, N = r & (H | G) && h - m === 0;
950
950
  i.isFirst = !!E, i.isFinal = !!N, E && (n.session = {}), i.eventType = r, u(n, i), n.emit("hammer.input", i), n.recognize(i), n.session.prevInput = i;
951
951
  }
952
952
  function u(n, r) {
@@ -961,7 +961,7 @@ var wt = (function(f, o, e, a) {
961
961
  }
962
962
  function D(n, r) {
963
963
  var i = r.center, h = n.offsetDelta || {}, m = n.prevDelta || {}, E = n.prevInput || {};
964
- (r.eventType === k || E.eventType === j) && (m = n.prevDelta = {
964
+ (r.eventType === k || E.eventType === H) && (m = n.prevDelta = {
965
965
  x: E.deltaX || 0,
966
966
  y: E.deltaY || 0
967
967
  }, h = n.offsetDelta = {
@@ -1034,7 +1034,7 @@ var wt = (function(f, o, e, a) {
1034
1034
  var $t = {
1035
1035
  mousedown: k,
1036
1036
  mousemove: $,
1037
- mouseup: j
1037
+ mouseup: H
1038
1038
  }, en = "mousedown", tn = "mousemove mouseup";
1039
1039
  function Je() {
1040
1040
  this.evEl = en, this.evWin = tn, this.pressed = !1, ae.apply(this, arguments);
@@ -1046,7 +1046,7 @@ var wt = (function(f, o, e, a) {
1046
1046
  */
1047
1047
  handler: function(r) {
1048
1048
  var i = $t[r.type];
1049
- i & k && (r.button === 0 || r.button === 2) && (this.pressed = !0), i & $ && r.which !== 1 && (i = j), this.pressed && (i & j && (this.pressed = !1), this.callback(this.manager, i, {
1049
+ i & k && (r.button === 0 || r.button === 2) && (this.pressed = !0), i & $ && r.which !== 1 && (i = H), this.pressed && (i & H && (this.pressed = !1), this.callback(this.manager, i, {
1050
1050
  pointers: [r],
1051
1051
  changedPointers: [r],
1052
1052
  pointerType: q,
@@ -1057,7 +1057,7 @@ var wt = (function(f, o, e, a) {
1057
1057
  var _t = {
1058
1058
  pointerdown: k,
1059
1059
  pointermove: $,
1060
- pointerup: j,
1060
+ pointerup: H,
1061
1061
  pointercancel: G,
1062
1062
  pointerout: G
1063
1063
  }, nn = {
@@ -1078,7 +1078,7 @@ var wt = (function(f, o, e, a) {
1078
1078
  */
1079
1079
  handler: function(r) {
1080
1080
  var i = this.store, h = !1, m = !1, E = r.type.toLowerCase().replace("ms", ""), N = _t[E], Q = nn[r.pointerType] || r.pointerType, se = Q == z, W = le(i, r.pointerId, "pointerId");
1081
- N & k && (r.button === 0 || r.button === 2 || se) ? W < 0 && (i.push(r), W = i.length - 1) : N & (j | G) ? h = !0 : !se && r.buttons === 0 && (h = !0, m = !0, N = _t.pointerup), !(W < 0) && (m || (i[W] = r), this.callback(this.manager, N, {
1081
+ N & k && (r.button === 0 || r.button === 2 || se) ? W < 0 && (i.push(r), W = i.length - 1) : N & (H | G) ? h = !0 : !se && r.buttons === 0 && (h = !0, m = !0, N = _t.pointerup), !(W < 0) && (m || (i[W] = r), this.callback(this.manager, N, {
1082
1082
  pointers: i,
1083
1083
  changedPointers: [r],
1084
1084
  pointerType: Q,
@@ -1089,7 +1089,7 @@ var wt = (function(f, o, e, a) {
1089
1089
  var rn = {
1090
1090
  touchstart: k,
1091
1091
  touchmove: $,
1092
- touchend: j,
1092
+ touchend: H,
1093
1093
  touchcancel: G
1094
1094
  }, an = "touchstart", on = "touchstart touchmove touchend touchcancel";
1095
1095
  function It() {
@@ -1100,7 +1100,7 @@ var wt = (function(f, o, e, a) {
1100
1100
  var i = rn[r.type];
1101
1101
  if (i === k && (this.started = !0), !!this.started) {
1102
1102
  var h = sn.call(this, r, i);
1103
- i & (j | G) && h[0].length - h[1].length === 0 && (this.started = !1), this.callback(this.manager, i, {
1103
+ i & (H | G) && h[0].length - h[1].length === 0 && (this.started = !1), this.callback(this.manager, i, {
1104
1104
  pointers: h[0],
1105
1105
  changedPointers: h[1],
1106
1106
  pointerType: z,
@@ -1111,12 +1111,12 @@ var wt = (function(f, o, e, a) {
1111
1111
  });
1112
1112
  function sn(n, r) {
1113
1113
  var i = me(n.touches), h = me(n.changedTouches);
1114
- return r & (j | G) && (i = Ce(i.concat(h), "identifier")), [i, h];
1114
+ return r & (H | G) && (i = Ce(i.concat(h), "identifier")), [i, h];
1115
1115
  }
1116
1116
  var ln = {
1117
1117
  touchstart: k,
1118
1118
  touchmove: $,
1119
- touchend: j,
1119
+ touchend: H,
1120
1120
  touchcancel: G
1121
1121
  }, cn = "touchstart touchmove touchend touchcancel";
1122
1122
  function $e() {
@@ -1144,7 +1144,7 @@ var wt = (function(f, o, e, a) {
1144
1144
  for (m = 0; m < E.length; )
1145
1145
  h[E[m].identifier] = !0, m++;
1146
1146
  for (m = 0; m < N.length; )
1147
- h[N[m].identifier] && Q.push(N[m]), r & (j | G) && delete h[N[m].identifier], m++;
1147
+ h[N[m].identifier] && Q.push(N[m]), r & (H | G) && delete h[N[m].identifier], m++;
1148
1148
  if (Q.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -1183,7 +1183,7 @@ var wt = (function(f, o, e, a) {
1183
1183
  }
1184
1184
  });
1185
1185
  function fn(n, r) {
1186
- n & k ? (this.primaryTouch = r.changedPointers[0].identifier, kt.call(this, r)) : n & (j | G) && kt.call(this, r);
1186
+ n & k ? (this.primaryTouch = r.changedPointers[0].identifier, kt.call(this, r)) : n & (H | G) && kt.call(this, r);
1187
1187
  }
1188
1188
  function kt(n) {
1189
1189
  var r = n.changedPointers[0];
@@ -1464,7 +1464,7 @@ var wt = (function(f, o, e, a) {
1464
1464
  */
1465
1465
  process: function(n) {
1466
1466
  var r = this.state, i = n.eventType, h = r & (ce | ke), m = this.attrTest(n);
1467
- return h && (i & G || !m) ? r | He : h || m ? i & j ? r | Pe : r & ce ? r | ke : ce : pe;
1467
+ return h && (i & G || !m) ? r | He : h || m ? i & H ? r | Pe : r & ce ? r | ke : ce : pe;
1468
1468
  }
1469
1469
  });
1470
1470
  function rt() {
@@ -1546,13 +1546,13 @@ var wt = (function(f, o, e, a) {
1546
1546
  },
1547
1547
  process: function(n) {
1548
1548
  var r = this.options, i = n.pointers.length === r.pointers, h = n.distance < r.threshold, m = n.deltaTime > r.time;
1549
- if (this._input = n, !h || !i || n.eventType & (j | G) && !m)
1549
+ if (this._input = n, !h || !i || n.eventType & (H | G) && !m)
1550
1550
  this.reset();
1551
1551
  else if (n.eventType & k)
1552
1552
  this.reset(), this._timer = v(function() {
1553
1553
  this.state = ye, this.tryEmit();
1554
1554
  }, r.time, this);
1555
- else if (n.eventType & j)
1555
+ else if (n.eventType & H)
1556
1556
  return ye;
1557
1557
  return pe;
1558
1558
  },
@@ -1560,7 +1560,7 @@ var wt = (function(f, o, e, a) {
1560
1560
  clearTimeout(this._timer);
1561
1561
  },
1562
1562
  emit: function(n) {
1563
- this.state === ye && (n && n.eventType & j ? this.manager.emit(this.options.event + "up", n) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
1563
+ this.state === ye && (n && n.eventType & H ? this.manager.emit(this.options.event + "up", n) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
1566
  function gt() {
@@ -1603,7 +1603,7 @@ var wt = (function(f, o, e, a) {
1603
1603
  },
1604
1604
  attrTest: function(n) {
1605
1605
  var r = this.options.direction, i;
1606
- return r & (oe | ue) ? i = n.overallVelocity : r & oe ? i = n.overallVelocityX : r & ue && (i = n.overallVelocityY), this._super.attrTest.call(this, n) && r & n.offsetDirection && n.distance > this.options.threshold && n.maxPointers == this.options.pointers && g(i) > this.options.velocity && n.eventType & j;
1606
+ return r & (oe | ue) ? i = n.overallVelocity : r & oe ? i = n.overallVelocityX : r & ue && (i = n.overallVelocityY), this._super.attrTest.call(this, n) && r & n.offsetDirection && n.distance > this.options.threshold && n.maxPointers == this.options.pointers && g(i) > this.options.velocity && n.eventType & H;
1607
1607
  },
1608
1608
  emit: function(n) {
1609
1609
  var r = Bt(n.offsetDirection);
@@ -1639,7 +1639,7 @@ var wt = (function(f, o, e, a) {
1639
1639
  if (this.reset(), n.eventType & k && this.count === 0)
1640
1640
  return this.failTimeout();
1641
1641
  if (h && m && i) {
1642
- if (n.eventType != j)
1642
+ if (n.eventType != H)
1643
1643
  return this.failTimeout();
1644
1644
  var E = this.pTime ? n.timeStamp - this.pTime < r.interval : !0, N = !this.pCenter || Qe(this.pCenter, n.center) < r.posThreshold;
1645
1645
  this.pTime = n.timeStamp, this.pCenter = n.center, !N || !E ? this.count = 1 : this.count += 1, this._input = n;
@@ -1912,7 +1912,7 @@ var wt = (function(f, o, e, a) {
1912
1912
  return _(Le, {
1913
1913
  INPUT_START: k,
1914
1914
  INPUT_MOVE: $,
1915
- INPUT_END: j,
1915
+ INPUT_END: H,
1916
1916
  INPUT_CANCEL: G,
1917
1917
  STATE_POSSIBLE: tt,
1918
1918
  STATE_BEGAN: ce,
@@ -2087,7 +2087,7 @@ var wt = (function(f, o, e, a) {
2087
2087
  function $(u) {
2088
2088
  e.enableZoom && k(u), e.enablePan && B(u);
2089
2089
  }
2090
- function j(u) {
2090
+ function H(u) {
2091
2091
  e.enableZoom && k(u), e.enableRotate && V(u);
2092
2092
  }
2093
2093
  function G(u) {
@@ -2217,7 +2217,7 @@ var wt = (function(f, o, e, a) {
2217
2217
  break;
2218
2218
  case Me.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- j(u), l = c.TOUCH_DOLLY_ROTATE;
2220
+ H(u), l = c.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
2223
  l = c.NONE;
@@ -2398,8 +2398,8 @@ var Rn = (
2398
2398
  continue;
2399
2399
  }
2400
2400
  for (var k = 0; k <= c; k++) {
2401
- var $ = k / c, j = $ * O;
2402
- b.x = U * Math.cos(j), b.y = q, b.z = U * Math.sin(j);
2401
+ var $ = k / c, H = $ * O;
2402
+ b.x = U * Math.cos(H), b.y = q, b.z = U * Math.sin(H);
2403
2403
  var V = b.clone().multiplyScalar(s).add(F);
2404
2404
  C[0].push(V), y.push(V);
2405
2405
  var B = b.clone().normalize();
@@ -2564,7 +2564,7 @@ var Xe = function(f) {
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
2566
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2567
- var c = H({ fixedLongitude: 0, orthoView: !0 }, a == null ? void 0 : a.config);
2567
+ var c = j({ fixedLongitude: 0, orthoView: !0 }, a == null ? void 0 : a.config);
2568
2568
  return t._config = c, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new wt.Manager(t.wrapper), t.mc.add(new wt.Tap({ interval: 410 })), t.mc.add(new wt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2569
2569
  distance: 20,
2570
2570
  offset: new w.Vector3(0, 0, 0),
@@ -2619,13 +2619,13 @@ var Xe = function(f) {
2619
2619
  }
2620
2620
  return Object.defineProperty(o.prototype, "config", {
2621
2621
  get: function() {
2622
- return H({}, this._config);
2622
+ return j({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
2626
  }), o.prototype.updateState = function(e, a) {
2627
2627
  var t = this.state;
2628
- this.state = H(H({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
2628
+ this.state = j(j({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
2629
2629
  }, o.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
@@ -2987,7 +2987,7 @@ var Et = (
2987
2987
  visible: !0
2988
2988
  };
2989
2989
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2990
- var c = H({}, a == null ? void 0 : a.config);
2990
+ var c = j({}, a == null ? void 0 : a.config);
2991
2991
  return t._config = c, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2992
2992
  keyframeIndex: null,
2993
2993
  progress: null
@@ -3004,13 +3004,13 @@ var Et = (
3004
3004
  }
3005
3005
  return Object.defineProperty(o.prototype, "config", {
3006
3006
  get: function() {
3007
- return H({}, this._config);
3007
+ return j({}, this._config);
3008
3008
  },
3009
3009
  enumerable: !1,
3010
3010
  configurable: !0
3011
3011
  }), o.prototype.updateState = function(e, a) {
3012
3012
  var t = this.state;
3013
- this.state = H(H({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3013
+ this.state = j(j({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3014
3014
  }, o.prototype.load = function(e) {
3015
3015
  return De(this, void 0, void 0, function() {
3016
3016
  return Re(this, function(a) {
@@ -3055,7 +3055,7 @@ var Et = (
3055
3055
  keyframeIndex: null,
3056
3056
  progress: null
3057
3057
  };
3058
- this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(H({}, this.virualCamera.pose)));
3058
+ this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(j({}, this.virualCamera.pose)));
3059
3059
  var s = this.playingState.keyframeIndex, c = 0;
3060
3060
  this.cancelAnimation = Ct.shared.add(function(l, g) {
3061
3061
  if (s === a - 1 - e.skipEnd && e.cancelAnimation) {
@@ -3070,7 +3070,7 @@ var Et = (
3070
3070
  var C = c / d.distanceTo(v);
3071
3071
  C = C >= 1 ? 1 : C, t.keyframeIndex !== null && t.progress !== null && (C = t.progress, t.keyframeIndex = null, t.progress = null);
3072
3072
  var L = d.clone().lerp(v, C), b = A.clone().lerp(_, C);
3073
- e.virualCamera.position.copy(L), e.virualCamera.lookAt(b), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(H({}, e.virualCamera.pose)), e.location = e.keyframes[s].location + d.clone().distanceTo(L), C === 1 ? (c = 0, s++, e.playingState.keyframeIndex = s, e.playingState.progress = 0) : (e.playingState.keyframeIndex = s, e.playingState.progress = C);
3073
+ e.virualCamera.position.copy(L), e.virualCamera.lookAt(b), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(j({}, e.virualCamera.pose)), e.location = e.keyframes[s].location + d.clone().distanceTo(L), C === 1 ? (c = 0, s++, e.playingState.keyframeIndex = s, e.playingState.progress = 0) : (e.playingState.keyframeIndex = s, e.playingState.progress = C);
3074
3074
  });
3075
3075
  }, o.prototype.pause = function() {
3076
3076
  this.cancelAnimation && this.cancelAnimation();
@@ -3178,7 +3178,7 @@ void main() {
3178
3178
  t.ctx.clearRect(0, 0, xt, Pt);
3179
3179
  for (var g = 0; g < 16; g++)
3180
3180
  t.drawLine(g, l - t.startTime);
3181
- var d = Wt((l - t.startTime) / 1e3, 0, 1), v = Wt((l - t.startTime) / 300, 0, 1);
3181
+ var d = Wt((l - t.startTime) / 1e3, 0, 1), v = Wt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
3182
  t.panoMesh.setOpacity(v), t.mesh.material.uniforms.progress.value = d, t.mesh.material.uniforms.opacity.value = v, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3183
3183
  }
3184
3184
  }, t.dispose = function() {
@@ -3189,18 +3189,23 @@ void main() {
3189
3189
  visible: !0
3190
3190
  };
3191
3191
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
3192
- var c = H({}, a == null ? void 0 : a.config);
3192
+ var c = j(j({}, a == null ? void 0 : a.config), { maxOpacity: 1 });
3193
3193
  return t._config = c, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = xt, t.canvas.height = Pt, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new w.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3194
3194
  }
3195
3195
  return Object.defineProperty(o.prototype, "config", {
3196
3196
  get: function() {
3197
- return H({}, this._config);
3197
+ return j({}, this._config);
3198
3198
  },
3199
3199
  enumerable: !1,
3200
3200
  configurable: !0
3201
3201
  }), o.prototype.updateState = function(e, a) {
3202
3202
  var t = this.state;
3203
- this.state = H(H({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3203
+ this.state = j(j({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3204
+ }, o.prototype.updateConfig = function(e, a) {
3205
+ var t;
3206
+ a === void 0 && (a = {});
3207
+ var s = this.config, c = j(j({}, s), e);
3208
+ this._config = c, this.hooks.emit("configChange", { prevConfig: s, config: c, userAction: (t = a.userAction) !== null && t !== void 0 ? t : !0 });
3204
3209
  }, o.prototype.load = function(e) {
3205
3210
  return De(this, void 0, void 0, function() {
3206
3211
  return Re(this, function(a) {
package/react/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/react/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/sticker/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||(function(t){return setTimeout(t,16)}),R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?(function(){return R+performance.now()}):(function(){return Date.now()});function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=(function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var p=s.map=new a.Texture;p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,S(r,function(){p.image=r,p.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var f=s.map=new a.VideoTexture(r);f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.6.0-alpha.9"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n})(a.Mesh);exports.Sticker=b;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||(function(t){return setTimeout(t,16)}),R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?(function(){return R+performance.now()}):(function(){return Date.now()});function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=(function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var f=s.map=new a.Texture;f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,S(r,function(){f.image=r,f.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var p=s.map=new a.VideoTexture(r);p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.6.0"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n})(a.Mesh);exports.Sticker=b;
package/sticker/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -269,7 +269,7 @@ function y(r, n) {
269
269
  }
270
270
  r.prototype = n === null ? Object.create(n) : (e.prototype = n.prototype, new e());
271
271
  }
272
- var h = new Float32Array([
272
+ var g = new Float32Array([
273
273
  -0.5,
274
274
  -0.5,
275
275
  0,
@@ -282,7 +282,7 @@ var h = new Float32Array([
282
282
  0.5,
283
283
  0.5,
284
284
  0
285
- ]), g = new Float32Array([
285
+ ]), h = new Float32Array([
286
286
  0,
287
287
  0,
288
288
  1,
@@ -299,8 +299,8 @@ var h = new Float32Array([
299
299
  3,
300
300
  2
301
301
  ]), u = new a.BufferGeometry();
302
- u.setAttribute("position", new a.BufferAttribute(h, 3));
303
- u.setAttribute("uv", new a.BufferAttribute(g, 2));
302
+ u.setAttribute("position", new a.BufferAttribute(g, 3));
303
+ u.setAttribute("uv", new a.BufferAttribute(h, 2));
304
304
  u.setIndex(new a.BufferAttribute(E, 1));
305
305
  var d = window, w = d.requestAnimationFrame || d.mozRequestAnimationFrame || d.webkitRequestAnimationFrame || d.msRequestAnimationFrame || (function(r) {
306
306
  return setTimeout(r, 16);
@@ -366,7 +366,7 @@ var A = (
366
366
  }
367
367
  return Object.defineProperty(n, "version", {
368
368
  get: function() {
369
- return "6.6.0-alpha.9";
369
+ return "6.6.0";
370
370
  },
371
371
  enumerable: !1,
372
372
  configurable: !0
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/3/2025
5
- * Version: 6.6.0-alpha.9
4
+ * Generated: 9/24/2025
5
+ * Version: 6.6.0
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -258,4 +258,4 @@
258
258
  `),a=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
259
259
  `),i=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor.rgb;"].join(`
260
260
  `),s={specular:{value:new l.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var f in s)o.uniforms[f]=s[f];o.fragmentShader=o.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;"),o.fragmentShader=o.fragmentShader.replace("uniform float metalness;","uniform float glossiness;"),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_pars_fragment>",r),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_pars_fragment>",n),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_fragment>",t),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_fragment>",a),o.fragmentShader=o.fragmentShader.replace("#include <lights_physical_fragment>",i)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(o){s.specular.value=o}},specularMap:{get:function(){return s.specularMap.value},set:function(o){s.specularMap.value=o}},glossiness:{get:function(){return s.glossiness.value},set:function(o){s.glossiness.value=o}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(o){s.glossinessMap.value=o,o?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_ROUGHNESSMAP=""):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}x.prototype=Object.create(l.MeshStandardMaterial.prototype),x.prototype.constructor=x,x.prototype.copy=function(e){return l.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function X(){return{name:u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return x},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new l.Color(1,1,1),e.opacity=1;var a=[];if(Array.isArray(t.diffuseFactor)){var i=t.diffuseFactor;e.color.fromArray(i),e.opacity=i[3]}if(t.diffuseTexture!==void 0&&a.push(n.assignTexture(e,"map",t.diffuseTexture)),e.emissive=new l.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new l.Color(1,1,1),Array.isArray(t.specularFactor)&&e.specular.fromArray(t.specularFactor),t.specularGlossinessTexture!==void 0){var s=t.specularGlossinessTexture;a.push(n.assignTexture(e,"glossinessMap",s)),a.push(n.assignTexture(e,"specularMap",s))}return Promise.all(a)},createMaterial:function(e){var r=new x(e);return r.fog=!0,r.color=e.color,r.map=e.map===void 0?null:e.map,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=e.aoMap===void 0?null:e.aoMap,r.aoMapIntensity=1,r.emissive=e.emissive,r.emissiveIntensity=1,r.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,r.bumpMap=e.bumpMap===void 0?null:e.bumpMap,r.bumpScale=1,r.normalMap=e.normalMap===void 0?null:e.normalMap,r.normalMapType=l.TangentSpaceNormalMap,e.normalScale&&(r.normalScale=e.normalScale),r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.specularMap=e.specularMap===void 0?null:e.specularMap,r.specular=e.specular,r.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,r.glossiness=e.glossiness,r.alphaMap=null,r.envMap=e.envMap===void 0?null:e.envMap,r.envMapIntensity=1,r.refractionRatio=.98,r}}}function ne(){this.name=u.KHR_MESH_QUANTIZATION}function U(e,r,n,t){l.Interpolant.call(this,e,r,n,t)}U.prototype=Object.create(l.Interpolant.prototype),U.prototype.constructor=U,U.prototype.copySampleValue_=function(e){for(var r=this.resultBuffer,n=this.sampleValues,t=this.valueSize,a=e*t*3+t,i=0;i!==t;i++)r[i]=n[a+i];return r},U.prototype.beforeStart_=U.prototype.copySampleValue_,U.prototype.afterEnd_=U.prototype.copySampleValue_,U.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,f=s*3,c=t-r,v=(n-r)/c,d=v*v,h=d*v,y=e*f,M=y-f,T=-2*h+3*d,L=h-d,b=1-T,D=L-d+v,k=0;k!==s;k++){var ae=i[M+k+s],se=i[M+k+o]*c,re=i[y+k+s],j=i[y+k]*c;a[k]=b*ae+D*se+T*re+L*j}return a};function Z(e){this.parser=e,this.name=u.REALSEE_MATERIALS_LIGHTMAP}Z.prototype.getMaterialType=function(e){return l.MeshPhongMaterial},Z.prototype.extendParams=function(e,r,n){if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var t=[],a=r.extensions[this.name];return a.lightMapTexture!==void 0&&t.push(n.assignTexture(e,"lightMap",a.lightMapTexture)),a.lightMapIntensity!==void 0&&(e.lightMapIntensity=a.lightMapIntensity),Promise.all(t)};var K={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},$={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ee={9728:l.NearestFilter,9729:l.LinearFilter,9984:l.NearestMipmapNearestFilter,9985:l.LinearMipmapNearestFilter,9986:l.NearestMipmapLinearFilter,9987:l.LinearMipmapLinearFilter},H={33071:l.ClampToEdgeWrapping,33648:l.MirroredRepeatWrapping,10497:l.RepeatWrapping},Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fe={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},z={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Me={CUBICSPLINE:void 0,LINEAR:l.InterpolateLinear,STEP:l.InterpolateDiscrete},ce={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},ve={"image/png":l.RGBAFormat,"image/jpeg":l.RGBFormat};function ge(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}function _e(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new l.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:l.FrontSide})),e.DefaultMaterial}function ie(e,r,n){for(var t in n.extensions)e[t]===void 0&&(r.userData.gltfExtensions=r.userData.gltfExtensions||{},r.userData.gltfExtensions[t]=n.extensions[t])}function q(e,r){r.extras!==void 0&&(typeof r.extras=="object"?Object.assign(e.userData,r.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+r.extras))}function we(e,r,n){for(var t=!1,a=!1,i=0,s=r.length;i<s;i++){var o=r[i];if(o.POSITION!==void 0&&(t=!0),o.NORMAL!==void 0&&(a=!0),t&&a)break}if(!t&&!a)return Promise.resolve(e);for(var f=[],c=[],i=0,s=r.length;i<s;i++){var o=r[i];if(t){var v=o.POSITION!==void 0?n.getDependency("accessor",o.POSITION):e.attributes.position;f.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;c.push(v)}}return Promise.all([Promise.all(f),Promise.all(c)]).then(function(d){var h=d[0],y=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=y),e.morphTargetsRelative=!0,e})}function be(e,r){if(e.updateMorphTargets(),r.weights!==void 0)for(var n=0,t=r.weights.length;n<t;n++)e.morphTargetInfluences[n]=r.weights[n];if(r.extras&&Array.isArray(r.extras.targetNames)){var a=r.extras.targetNames;if(e.morphTargetInfluences.length===a.length){e.morphTargetDictionary={};for(var n=0,t=a.length;n<t;n++)e.morphTargetDictionary[a[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function N(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+J(r.attributes):n=e.indices+":"+J(e.attributes)+":"+e.mode,n}function J(e){for(var r="",n=Object.keys(e).sort(),t=0,a=n.length;t<a;t++)r+=n[t]+":"+e[n[t]]+";";return r}function F(e,r,n){this.json=e||{},this.extensions=r||{},this.options=n||{},this.cache=new g,this.associations=new Map,this.primitiveCache={},this.textureLoader=new l.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new l.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}F.prototype.parse=function(e,r){var n=this,t=this.json,a=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(i){var s={scene:i[0][t.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:t.asset,parser:n,userData:{}};ie(a,s,t),q(s,t),e(s)}).catch(r)},F.prototype.markDefs=function(){for(var e=this.json.nodes||[],r=this.json.skins||[],n=this.json.meshes||[],t={},a={},i=0,s=r.length;i<s;i++)for(var o=r[i].joints,f=0,c=o.length;f<c;f++)e[o[f]].isBone=!0;for(var v=0,d=e.length;v<d;v++){var h=e[v];h.mesh!==void 0&&(t[h.mesh]===void 0&&(t[h.mesh]=a[h.mesh]=0),t[h.mesh]++,h.skin!==void 0&&(n[h.mesh].isSkinnedMesh=!0))}this.json.meshReferences=t,this.json.meshUses=a},F.prototype.getDependency=function(e,r){var n=e+":"+r,t=this.cache.get(n);if(!t){switch(e){case"scene":t=this.loadScene(r);break;case"node":t=this.loadNode(r);break;case"mesh":t=this.loadMesh(r);break;case"accessor":t=this.loadAccessor(r);break;case"bufferView":t=this.loadBufferView(r);break;case"buffer":t=this.loadBuffer(r);break;case"material":t=this.loadMaterial(r);break;case"texture":t=this.loadTexture(r);break;case"skin":t=this.loadSkin(r);break;case"animation":t=this.loadAnimation(r);break;case"camera":t=this.loadCamera(r);break;case"light":t=this.extensions[u.KHR_LIGHTS_PUNCTUAL].loadLight(r);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,t)}return t},F.prototype.getDependencies=function(e){var r=this.cache.get(e);if(!r){var n=this,t=this.json[e+(e==="mesh"?"es":"s")]||[];r=Promise.all(t.map(function(a,i){return n.getDependency(e,i)})),this.cache.add(e,r)}return r},F.prototype.loadBuffer=function(e){var r=this.json.buffers[e],n=this.fileLoader;if(r.type&&r.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+r.type+" buffer type is not supported.");if(r.uri===void 0&&e===0)return Promise.resolve(this.extensions[u.KHR_BINARY_GLTF].body);var t=this.options;return new Promise(function(a,i){n.load(ge(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},F.prototype.loadBufferView=function(e){var r=this.json.bufferViews[e];return this.getDependency("buffer",r.buffer).then(function(n){var t=r.byteLength||0,a=r.byteOffset||0;return n.slice(a,a+t)})},F.prototype.loadAccessor=function(e){var r=this,n=this.json,t=this.json.accessors[e];if(t.bufferView===void 0&&t.sparse===void 0)return Promise.resolve(null);var a=[];return t.bufferView!==void 0?a.push(this.getDependency("bufferView",t.bufferView)):a.push(null),t.sparse!==void 0&&(a.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(a).then(function(i){var s=i[0],o=Y[t.type],f=$[t.componentType],c=f.BYTES_PER_ELEMENT,v=c*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,y=t.normalized===!0,M,T;if(h&&h!==v){var L=Math.floor(d/h),b="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+L+":"+t.count,D=r.cache.get(b);D||(M=new f(s,L*h,t.count*h/c),D=new l.InterleavedBuffer(M,h/c),r.cache.add(b,D)),T=new l.InterleavedBufferAttribute(D,o,d%h/c,y)}else s===null?M=new f(t.count*o):M=new f(s,d,t.count*o),T=new l.BufferAttribute(M,o,y);if(t.sparse!==void 0){var k=Y.SCALAR,ae=$[t.sparse.indices.componentType],se=t.sparse.indices.byteOffset||0,re=t.sparse.values.byteOffset||0,j=new ae(i[1],se,t.sparse.count*k),le=new f(i[2],re,t.sparse.count*o);s!==null&&(T=new l.BufferAttribute(T.array.slice(),T.itemSize,T.normalized));for(var B=0,Ie=j.length;B<Ie;B++){var oe=j[B];if(T.setX(oe,le[B*o]),o>=2&&T.setY(oe,le[B*o+1]),o>=3&&T.setZ(oe,le[B*o+2]),o>=4&&T.setW(oe,le[B*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return T})},F.prototype.loadTexture=function(e){var r=this,n=this.json,t=this.options,a=this.textureLoader,i=self.URL||self.webkitURL,s=n.textures[e],o=s.extensions||{},f;o[u.MSFT_TEXTURE_DDS]?f=n.images[o[u.MSFT_TEXTURE_DDS].source]:f=n.images[s.source];var c=f.uri,v=!1;return f.bufferView!==void 0&&(c=r.getDependency("bufferView",f.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:f.mimeType});return c=i.createObjectURL(h),c})),Promise.resolve(c).then(function(d){var h=t.manager.getHandler(d);return h||(h=o[u.MSFT_TEXTURE_DDS]?r.extensions[u.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(y,M){h.load(ge(d,t.path),y,void 0,M)})}).then(function(d){v===!0&&i.revokeObjectURL(c),d.flipY=!1,s.name&&(d.name=s.name),f.mimeType in ve&&(d.format=ve[f.mimeType]);var h=n.samplers||{},y=h[s.sampler]||{};return d.magFilter=ee[y.magFilter]||l.LinearFilter,d.minFilter=ee[y.minFilter]||l.LinearMipmapLinearFilter,d.wrapS=H[y.wrapS]||l.RepeatWrapping,d.wrapT=H[y.wrapT]||l.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},F.prototype.assignTexture=function(e,r,n){var t=this;return this.getDependency("texture",n.index).then(function(a){if(!a.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":a.format=l.RGBFormat;break}if(n.texCoord!==void 0&&n.texCoord!=0&&!(r==="aoMap"&&n.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+r+" not yet supported."),t.extensions[u.KHR_TEXTURE_TRANSFORM]){var i=n.extensions!==void 0?n.extensions[u.KHR_TEXTURE_TRANSFORM]:void 0;if(i){var s=t.associations.get(a);a=t.extensions[u.KHR_TEXTURE_TRANSFORM].extendTexture(a,i),t.associations.set(a,s)}}e[r]=a})},F.prototype.assignFinalMaterial=function(e){var r=e.geometry,n=e.material,t=r.attributes.tangent!==void 0,a=r.attributes.color!==void 0,i=r.attributes.normal===void 0,s=e.isSkinnedMesh===!0,o=Object.keys(r.morphAttributes).length>0,f=o&&r.morphAttributes.normal!==void 0;if(e.isPoints){var c="PointsMaterial:"+n.uuid,v=this.cache.get(c);v||(v=new l.PointsMaterial,l.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(c,v)),n=v}else if(e.isLine){var c="LineBasicMaterial:"+n.uuid,d=this.cache.get(c);d||(d=new l.LineBasicMaterial,l.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(c,d)),n=d}if(t||a||i||s||o){var c="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),s&&(c+="skinning:"),t&&(c+="vertex-tangents:"),a&&(c+="vertex-colors:"),i&&(c+="flat-shading:"),o&&(c+="morph-targets:"),f&&(c+="morph-normals:");var h=this.cache.get(c);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),f&&(h.morphNormals=!0),this.cache.add(c,h),this.associations.set(h,this.associations.get(n))),n=h}n.aoMap&&r.attributes.uv2===void 0&&r.attributes.uv!==void 0&&r.setAttribute("uv2",r.attributes.uv),n.normalScale&&!t&&(n.normalScale.y=-n.normalScale.y),n.clearcoatNormalScale&&!t&&(n.clearcoatNormalScale.y=-n.clearcoatNormalScale.y),e.material=n},F.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},f=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=c.getMaterialType(),f.push(c.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),f.push(v.extendParams(s,a,r))}else{i=l.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new l.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var h=d.baseColorFactor;s.color.fromArray(h),s.opacity=h[3]}d.baseColorTexture!==void 0&&f.push(r.assignTexture(s,"map",d.baseColorTexture)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(f.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),f.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=l.DoubleSide);var y=a.alphaMode||ce.OPAQUE;if(y===ce.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,y===ce.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new l.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==l.MeshBasicMaterial&&(s.emissive=new l.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==l.MeshBasicMaterial&&f.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var M=t[u.KHR_MATERIALS_CLEARCOAT];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var M=t[u.KHR_MATERIALS_TRANSMISSION];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.REALSEE_MATERIALS_LIGHTMAP]){var T=t[u.REALSEE_MATERIALS_LIGHTMAP];i=T.getMaterialType(),f.push(T.extendParams(s,{extensions:o},r))}return Promise.all(f).then(function(){var L;return i===x?L=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):L=new i(s),a.name&&(L.name=a.name),L.map&&(L.map.encoding=l.sRGBEncoding),L.emissiveMap&&(L.emissiveMap.encoding=l.sRGBEncoding),q(L,a),r.associations.set(L,{type:"materials",index:e}),a.extensions&&ie(t,L,a),L})};function me(e,r,n){var t=r.attributes,a=new l.Box3;if(t.POSITION!==void 0){var i=n.json.accessors[t.POSITION],s=i.min,o=i.max;if(s!==void 0&&o!==void 0)a.set(new l.Vector3(s[0],s[1],s[2]),new l.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var f=r.targets;if(f!==void 0){for(var c=new l.Vector3,v=new l.Vector3,d=0,h=f.length;d<h;d++){var y=f[d];if(y.POSITION!==void 0){var i=n.json.accessors[y.POSITION],s=i.min,o=i.max;s!==void 0&&o!==void 0?(v.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),v.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),v.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),c.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(c)}e.boundingBox=a;var M=new l.Sphere;a.getCenter(M.center),M.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=M}function W(e,r,n){var t=r.attributes,a=[];function i(c,v){return n.getDependency("accessor",c).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=fe[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var f=n.getDependency("accessor",r.indices).then(function(c){e.setIndex(c)});a.push(f)}return q(e,r),me(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?we(e,r.targets,n):e})}function ue(e,r){var n=e.getIndex();if(n===null){var t=[],a=e.getAttribute("position");if(a!==void 0){for(var i=0;i<a.count;i++)t.push(i);e.setIndex(t),n=e.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e}var s=n.count-2,o=[];if(r===l.TriangleFanDrawMode)for(var i=1;i<=s;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(var i=0;i<s;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==s&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var f=e.clone();return f.setIndex(o),f}return F.prototype.loadGeometries=function(e){var r=this,n=this.extensions,t=this.primitiveCache;function a(h){return n[u.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,r).then(function(y){return W(y,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var f=e[s],c=N(f),v=t[c];if(v)i.push(v.promise);else{var d;f.extensions&&f.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(f):d=W(new l.BufferGeometry,f,r),t[c]={primitive:f,promise:d},i.push(d)}}return Promise.all(i)},F.prototype.loadMesh=function(e){for(var r=this,n=this.json,t=n.meshes[e],a=t.primitives,i=[],s=0,o=a.length;s<o;s++){var f=a[s].material===void 0?_e(this.cache):this.getDependency("material",a[s].material);i.push(f)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(c){for(var v=c.slice(0,c.length-1),d=c[c.length-1],h=[],y=0,M=d.length;y<M;y++){var T=d[y],L=a[y],b,D=v[y];if(L.mode===K.TRIANGLES||L.mode===K.TRIANGLE_STRIP||L.mode===K.TRIANGLE_FAN||L.mode===void 0)b=t.isSkinnedMesh===!0?new l.SkinnedMesh(T,D):new l.Mesh(T,D),b.isSkinnedMesh===!0&&!b.geometry.attributes.skinWeight.normalized&&b.normalizeSkinWeights(),L.mode===K.TRIANGLE_STRIP?b.geometry=ue(b.geometry,l.TriangleStripDrawMode):L.mode===K.TRIANGLE_FAN&&(b.geometry=ue(b.geometry,l.TriangleFanDrawMode));else if(L.mode===K.LINES)b=new l.LineSegments(T,D);else if(L.mode===K.LINE_STRIP)b=new l.Line(T,D);else if(L.mode===K.LINE_LOOP)b=new l.LineLoop(T,D);else if(L.mode===K.POINTS)b=new l.Points(T,D);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+L.mode);Object.keys(b.geometry.morphAttributes).length>0&&be(b,t),b.name=t.name||"mesh_"+e,d.length>1&&(b.name+="_"+y),q(b,t),r.assignFinalMaterial(b),h.push(b)}if(h.length===1)return h[0];for(var k=new l.Group,y=0,M=h.length;y<M;y++)k.add(h[y]);return k})},F.prototype.loadCamera=function(e){var r,n=this.json.cameras[e],t=n[n.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?r=new l.PerspectiveCamera(l.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new l.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),q(r,n),Promise.resolve(r)},F.prototype.loadSkin=function(e){var r=this.json.skins[e],n={joints:r.joints};return r.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency("accessor",r.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},F.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],f=0,c=n.channels.length;f<c;f++){var v=n.channels[f],d=n.samplers[v.sampler],h=v.target,y=h.node!==void 0?h.node:h.id,M=n.parameters!==void 0?n.parameters[d.input]:d.input,T=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",y)),a.push(this.getDependency("accessor",M)),i.push(this.getDependency("accessor",T)),s.push(d),o.push(h)}return Promise.all([Promise.all(t),Promise.all(a),Promise.all(i),Promise.all(s),Promise.all(o)]).then(function(L){for(var b=L[0],D=L[1],k=L[2],ae=L[3],se=L[4],re=[],j=0,le=b.length;j<le;j++){var B=b[j],Ie=D[j],oe=k[j],xe=ae[j],Ce=se[j];if(B!==void 0){B.updateMatrix(),B.matrixAutoUpdate=!0;var Ae;switch(z[Ce.path]){case z.weights:Ae=l.NumberKeyframeTrack;break;case z.rotation:Ae=l.QuaternionKeyframeTrack;break;case z.position:case z.scale:default:Ae=l.VectorKeyframeTrack;break}var ke=B.name?B.name:B.uuid,Be=xe.interpolation!==void 0?Me[xe.interpolation]:l.InterpolateLinear,Se=[];z[Ce.path]===z.weights?B.traverse(function(pe){pe.isMesh===!0&&pe.morphTargetInfluences&&Se.push(pe.name?pe.name:pe.uuid)}):Se.push(ke);var Q=oe.array;if(oe.normalized){var de;if(Q.constructor===Int8Array)de=1/127;else if(Q.constructor===Uint8Array)de=1/255;else if(Q.constructor==Int16Array)de=1/32767;else if(Q.constructor===Uint16Array)de=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var Pe=new Float32Array(Q.length),te=0,Re=Q.length;te<Re;te++)Pe[te]=Q[te]*de;Q=Pe}for(var te=0,Re=Se.length;te<Re;te++){var Oe=new Ae(Se[te]+"."+z[Ce.path],Ie.array,Q,Be);xe.interpolation==="CUBICSPLINE"&&(Oe.createInterpolant=function(Ke){return new U(this.times,this.values,this.getValueSize()/3,Ke)},Oe.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),re.push(Oe)}}}var Ee=n.name?n.name:"animation_"+e;return new l.AnimationClip(Ee,void 0,re)})},F.prototype.loadNode=function(e){var r=this.json,n=this.extensions,t=this,a=r.meshReferences,i=r.meshUses,s=r.nodes[e];return(function(){var o=[];return s.mesh!==void 0&&o.push(t.getDependency("mesh",s.mesh).then(function(f){var c;if(a[s.mesh]>1){var v=i[s.mesh]++;c=f.clone(),c.name+="_instance_"+v}else c=f;return s.weights!==void 0&&c.traverse(function(d){if(d.isMesh)for(var h=0,y=s.weights.length;h<y;h++)d.morphTargetInfluences[h]=s.weights[h]}),c})),s.camera!==void 0&&o.push(t.getDependency("camera",s.camera)),s.extensions&&s.extensions[u.KHR_LIGHTS_PUNCTUAL]&&s.extensions[u.KHR_LIGHTS_PUNCTUAL].light!==void 0&&o.push(t.getDependency("light",s.extensions[u.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(o)})().then(function(o){var f;if(s.isBone===!0?f=new l.Bone:o.length>1?f=new l.Group:o.length===1?f=o[0]:f=new l.Object3D,f!==o[0])for(var c=0,v=o.length;c<v;c++)f.add(o[c]);if(s.name&&(f.userData.name=s.name,f.name=l.PropertyBinding.sanitizeNodeName(s.name)),q(f,s),s.extensions&&ie(n,f,s),s.matrix!==void 0){var d=new l.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);return t.associations.set(f,{type:"nodes",index:e}),f})},F.prototype.loadScene=(function(){function e(r,n,t,a){var i=t.nodes[r];return a.getDependency("node",r).then(function(s){if(i.skin===void 0)return s;var o;return a.getDependency("skin",i.skin).then(function(f){o=f;for(var c=[],v=0,d=o.joints.length;v<d;v++)c.push(a.getDependency("node",o.joints[v]));return Promise.all(c)}).then(function(f){return s.traverse(function(c){if(c.isMesh){for(var v=[],d=[],h=0,y=f.length;h<y;h++){var M=f[h];if(M){v.push(M);var T=new l.Matrix4;o.inverseBindMatrices!==void 0&&T.fromArray(o.inverseBindMatrices.array,h*16),d.push(T)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}c.bind(new l.Skeleton(v,d),c.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var f=i.children,c=0,v=f.length;c<v;c++){var d=f[c];o.push(e(d,s,t,a))}return Promise.all(o)})}return function(n){var t=this.json,a=this.extensions,i=this.json.scenes[n],s=this,o=new l.Group;i.name&&(o.name=i.name),q(o,i),i.extensions&&ie(a,o,i);for(var f=i.nodes||[],c=[],v=0,d=f.length;v<d;v++)c.push(e(f[v],o,t,s));return Promise.all(c).then(function(){return o})}})(),p})(),E=function(p){l.Loader.call(this,p),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}};E.prototype=Object.assign(Object.create(l.Loader.prototype),{constructor:E,setDecoderPath:function(p){return this.decoderPath=p,this},setDecoderConfig:function(p){return this.decoderConfig=p,this},setWorkerLimit:function(p){return this.workerLimit=p,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(p,g,u,A){var m=new l.FileLoader(this.manager);m.setPath(this.path),m.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&m.setWithCredentials(!0),m.load(p,S=>{var _={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(S,_).then(g).catch(A)},u,A)},decodeDracoFile:function(p,g,u,A){var m={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:A||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,m).then(g)},decodeGeometry:function(p,g){for(var u in g.attributeTypes){var A=g.attributeTypes[u];A.BYTES_PER_ELEMENT!==void 0&&(g.attributeTypes[u]=A.name)}var m=JSON.stringify(g);if(E.taskCache.has(p)){var S=E.taskCache.get(p);if(S.key===m)return S.promise;if(p.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var _,O=this.workerNextTaskID++,P=p.byteLength,w=this._getWorker(O,P).then(C=>(_=C,new Promise((G,R)=>{_._callbacks[O]={resolve:G,reject:R},_.postMessage({type:"decode",id:O,taskConfig:g,buffer:p},[p])}))).then(C=>this._createGeometry(C.geometry));return w.catch(()=>!0).then(()=>{_&&O&&this._releaseTask(_,O)}),E.taskCache.set(p,{key:m,promise:w}),w},_createGeometry:function(p){var g=new l.BufferGeometry;p.index&&g.setIndex(new l.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var A=p.attributes[u],m=A.name,S=A.array,_=A.itemSize;g.setAttribute(m,new l.BufferAttribute(S,_))}return g},_loadLibrary:function(p,g){var u=new l.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(g),new Promise((A,m)=>{u.load(p,A,void 0,m)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var p=typeof WebAssembly!="object"||this.decoderConfig.type==="js",g=[];return p?g.push(this._loadLibrary("draco_decoder.js","text")):(g.push(this._loadLibrary("draco_wasm_wrapper.js","text")),g.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(g).then(u=>{var A=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var m=E.DRACOWorker.toString(),S=["/* draco decoder */",A,"","/* worker */",m.substring(m.indexOf("{")+1,m.lastIndexOf("}"))].join(`
261
- `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),this.decoderPending},_getWorker:function(p,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=g,u._taskLoad+=g,u})},_releaseTask:function(p,g){p._taskLoad-=p._taskCosts[g],delete p._callbacks[g],delete p._taskCosts[g]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}}),E.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(w){P({draco:w})},DracoDecoderModule(p)});break;case"decode":var _=S.buffer,O=S.taskConfig;g.then(P=>{var w=P.draco,C=new w.Decoder,G=new w.DecoderBuffer;G.Init(new Int8Array(_),_.byteLength);try{var R=u(w,C,G,O),I=R.attributes.map(x=>x.array.buffer);R.index&&I.push(R.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:R},I)}catch(x){console.error(x),self.postMessage({type:"error",id:S.id,error:x.message})}finally{w.destroy(G),w.destroy(C)}});break}};function u(m,S,_,O){var P=O.attributeIDs,w=O.attributeTypes,C,G,R=S.GetEncodedGeometryType(_);if(R===m.TRIANGULAR_MESH)C=new m.Mesh,G=S.DecodeBufferToMesh(_,C);else if(R===m.POINT_CLOUD)C=new m.PointCloud,G=S.DecodeBufferToPointCloud(_,C);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!G.ok()||C.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+G.error_msg());var I={index:null,attributes:[]};for(var x in P){var X=self[w[x]],ne,U;if(O.useUniqueIDs)U=P[x],ne=S.GetAttributeByUniqueId(C,U);else{if(U=S.GetAttributeId(C,m[P[x]]),U===-1)continue;ne=S.GetAttribute(C,U)}I.attributes.push(A(m,S,C,x,X,ne))}if(R===m.TRIANGULAR_MESH){for(var Z=C.num_faces(),K=Z*3,$=new Uint32Array(K),ee=new m.DracoInt32Array,H=0;H<Z;++H){S.GetFaceFromMesh(C,H,ee);for(var Y=0;Y<3;++Y)$[H*3+Y]=ee.GetValue(Y)}I.index={array:$,itemSize:1},m.destroy(ee)}return m.destroy(C),I}function A(m,S,_,O,P,w){var C=w.num_components(),G=_.num_points(),R=G*C,I,x;switch(P){case Float32Array:I=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(_,w,I),x=new Float32Array(R);break;case Int8Array:I=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(_,w,I),x=new Int8Array(R);break;case Int16Array:I=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(_,w,I),x=new Int16Array(R);break;case Int32Array:I=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(_,w,I),x=new Int32Array(R);break;case Uint8Array:I=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(_,w,I),x=new Uint8Array(R);break;case Uint16Array:I=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(_,w,I),x=new Uint16Array(R);break;case Uint32Array:I=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(_,w,I),x=new Uint32Array(R);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<R;X++)x[X]=I.GetValue(X);return m.destroy(I),{name:O,array:x,itemSize:C}}},E.taskCache=new WeakMap,E.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},E.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},E.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},E.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var he=function(p){l.CompressedTextureLoader.call(this,p)};he.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:he,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,_=1024,O=2048,P=4096,w=8192,C=16384,G=32768,R=4;function I(f){return f.charCodeAt(0)+(f.charCodeAt(1)<<8)+(f.charCodeAt(2)<<16)+(f.charCodeAt(3)<<24)}function x(f){return String.fromCharCode(f&255,f>>8&255,f>>16&255,f>>24&255)}function X(f,c,v,d){for(var h=v*d*4,y=new Uint8Array(f,c,h),M=new Uint8Array(h),T=0,L=0,b=0;b<d;b++)for(var D=0;D<v;D++){var k=y[L];L++;var ae=y[L];L++;var se=y[L];L++;var re=y[L];L++,M[T]=se,T++,M[T]=ae,T++,M[T]=k,T++,M[T]=re,T++}return M}var ne=I("DXT1"),U=I("DXT3"),Z=I("DXT5"),K=I("ETC1"),$=31,ee=0,H=1,Y=2,fe=3,z=4,Me=7,ce=20,ve=21,ge=22,_e=23,ie=24,q=25,we=26,be=28,N=new Int32Array(p,0,$);if(N[ee]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!N[ce]&R)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var J,F=N[ve],me=!1;switch(F){case ne:J=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:J=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case Z:J=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case K:J=8,u.format=l.RGB_ETC1_Format;break;default:if(N[ge]===32&&N[_e]&16711680&&N[ie]&65280&&N[q]&255&&N[we]&4278190080)me=!0,J=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",x(F)),u}u.mipmapCount=1,N[Y]&m&&g!==!1&&(u.mipmapCount=Math.max(1,N[Me]));var W=N[be];if(u.isCubemap=!!(W&S),u.isCubemap&&(!(W&_)||!(W&O)||!(W&P)||!(W&w)||!(W&C)||!(W&G)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=N[z],u.height=N[fe];for(var ue=N[H]+4,e=u.isCubemap?6:1,r=0;r<e;r++)for(var n=u.width,t=u.height,a=0;a<u.mipmapCount;a++){if(me)var i=X(p,ue,n,t),s=i.length;else var s=Math.max(4,n)/4*Math.max(4,t)/4*J,i=new Uint8Array(p,ue,s);var o={data:i,width:n,height:t};u.mipmaps.push(o),ue+=s,n=Math.max(n>>1,1),t=Math.max(t>>1,1)}return u}});var Te=(function(p){Fe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new ye.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new ye.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g})(ye.Group),Ge="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ne=(function(p){Fe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new he(u),A.dracoLoader=new E(u),A.dracoLoader.setDecoderPath(Ge),A}return Object.defineProperty(g,"version",{get:function(){return"6.6.0-alpha.9"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(_){var O=new Te(_.scene),P=_.scenes.map(function(w){return w===_.scene?O:new Te(w)});m(Object.assign(_,{scene:O,scenes:P}))},S)},g})(De);V.DDSLoader=he,V.DRACOLoader=E,V.GLTFLoader=Ne,V.GLTFObject=Te,V.THREEGLTFLoader=De,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
261
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),this.decoderPending},_getWorker:function(p,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=g,u._taskLoad+=g,u})},_releaseTask:function(p,g){p._taskLoad-=p._taskCosts[g],delete p._callbacks[g],delete p._taskCosts[g]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}}),E.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(w){P({draco:w})},DracoDecoderModule(p)});break;case"decode":var _=S.buffer,O=S.taskConfig;g.then(P=>{var w=P.draco,C=new w.Decoder,G=new w.DecoderBuffer;G.Init(new Int8Array(_),_.byteLength);try{var R=u(w,C,G,O),I=R.attributes.map(x=>x.array.buffer);R.index&&I.push(R.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:R},I)}catch(x){console.error(x),self.postMessage({type:"error",id:S.id,error:x.message})}finally{w.destroy(G),w.destroy(C)}});break}};function u(m,S,_,O){var P=O.attributeIDs,w=O.attributeTypes,C,G,R=S.GetEncodedGeometryType(_);if(R===m.TRIANGULAR_MESH)C=new m.Mesh,G=S.DecodeBufferToMesh(_,C);else if(R===m.POINT_CLOUD)C=new m.PointCloud,G=S.DecodeBufferToPointCloud(_,C);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!G.ok()||C.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+G.error_msg());var I={index:null,attributes:[]};for(var x in P){var X=self[w[x]],ne,U;if(O.useUniqueIDs)U=P[x],ne=S.GetAttributeByUniqueId(C,U);else{if(U=S.GetAttributeId(C,m[P[x]]),U===-1)continue;ne=S.GetAttribute(C,U)}I.attributes.push(A(m,S,C,x,X,ne))}if(R===m.TRIANGULAR_MESH){for(var Z=C.num_faces(),K=Z*3,$=new Uint32Array(K),ee=new m.DracoInt32Array,H=0;H<Z;++H){S.GetFaceFromMesh(C,H,ee);for(var Y=0;Y<3;++Y)$[H*3+Y]=ee.GetValue(Y)}I.index={array:$,itemSize:1},m.destroy(ee)}return m.destroy(C),I}function A(m,S,_,O,P,w){var C=w.num_components(),G=_.num_points(),R=G*C,I,x;switch(P){case Float32Array:I=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(_,w,I),x=new Float32Array(R);break;case Int8Array:I=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(_,w,I),x=new Int8Array(R);break;case Int16Array:I=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(_,w,I),x=new Int16Array(R);break;case Int32Array:I=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(_,w,I),x=new Int32Array(R);break;case Uint8Array:I=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(_,w,I),x=new Uint8Array(R);break;case Uint16Array:I=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(_,w,I),x=new Uint16Array(R);break;case Uint32Array:I=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(_,w,I),x=new Uint32Array(R);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<R;X++)x[X]=I.GetValue(X);return m.destroy(I),{name:O,array:x,itemSize:C}}},E.taskCache=new WeakMap,E.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},E.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},E.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},E.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var he=function(p){l.CompressedTextureLoader.call(this,p)};he.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:he,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,_=1024,O=2048,P=4096,w=8192,C=16384,G=32768,R=4;function I(f){return f.charCodeAt(0)+(f.charCodeAt(1)<<8)+(f.charCodeAt(2)<<16)+(f.charCodeAt(3)<<24)}function x(f){return String.fromCharCode(f&255,f>>8&255,f>>16&255,f>>24&255)}function X(f,c,v,d){for(var h=v*d*4,y=new Uint8Array(f,c,h),M=new Uint8Array(h),T=0,L=0,b=0;b<d;b++)for(var D=0;D<v;D++){var k=y[L];L++;var ae=y[L];L++;var se=y[L];L++;var re=y[L];L++,M[T]=se,T++,M[T]=ae,T++,M[T]=k,T++,M[T]=re,T++}return M}var ne=I("DXT1"),U=I("DXT3"),Z=I("DXT5"),K=I("ETC1"),$=31,ee=0,H=1,Y=2,fe=3,z=4,Me=7,ce=20,ve=21,ge=22,_e=23,ie=24,q=25,we=26,be=28,N=new Int32Array(p,0,$);if(N[ee]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!N[ce]&R)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var J,F=N[ve],me=!1;switch(F){case ne:J=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:J=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case Z:J=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case K:J=8,u.format=l.RGB_ETC1_Format;break;default:if(N[ge]===32&&N[_e]&16711680&&N[ie]&65280&&N[q]&255&&N[we]&4278190080)me=!0,J=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",x(F)),u}u.mipmapCount=1,N[Y]&m&&g!==!1&&(u.mipmapCount=Math.max(1,N[Me]));var W=N[be];if(u.isCubemap=!!(W&S),u.isCubemap&&(!(W&_)||!(W&O)||!(W&P)||!(W&w)||!(W&C)||!(W&G)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=N[z],u.height=N[fe];for(var ue=N[H]+4,e=u.isCubemap?6:1,r=0;r<e;r++)for(var n=u.width,t=u.height,a=0;a<u.mipmapCount;a++){if(me)var i=X(p,ue,n,t),s=i.length;else var s=Math.max(4,n)/4*Math.max(4,t)/4*J,i=new Uint8Array(p,ue,s);var o={data:i,width:n,height:t};u.mipmaps.push(o),ue+=s,n=Math.max(n>>1,1),t=Math.max(t>>1,1)}return u}});var Te=(function(p){Fe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new ye.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new ye.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g})(ye.Group),Ge="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ne=(function(p){Fe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new he(u),A.dracoLoader=new E(u),A.dracoLoader.setDecoderPath(Ge),A}return Object.defineProperty(g,"version",{get:function(){return"6.6.0"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(_){var O=new Te(_.scene),P=_.scenes.map(function(w){return w===_.scene?O:new Te(w)});m(Object.assign(_,{scene:O,scenes:P}))},S)},g})(De);V.DDSLoader=he,V.DRACOLoader=E,V.GLTFLoader=Ne,V.GLTFObject=Te,V.THREEGLTFLoader=De,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));