@realsee/five 6.6.14 → 6.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/11/11
5
- * Version: 6.6.14
4
+ * Generated: 2025/12/5
5
+ * Version: 6.6.16
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,62 +252,62 @@
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
- */import { CustomShader as _ } from "@realsee/five";
256
- import * as u from "three";
257
- var b = function(i, e) {
258
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, o) {
255
+ */import { CustomShader as F } from "@realsee/five";
256
+ import * as l from "three";
257
+ var M = function(i, e) {
258
+ return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, o) {
259
259
  n.__proto__ = o;
260
260
  } || function(n, o) {
261
261
  for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (n[t] = o[t]);
262
- }, b(i, e);
262
+ }, M(i, e);
263
263
  };
264
264
  function B(i, e) {
265
265
  if (typeof e != "function" && e !== null)
266
266
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
267
- b(i, e);
267
+ M(i, e);
268
268
  function n() {
269
269
  this.constructor = i;
270
270
  }
271
271
  i.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
272
272
  }
273
- function k(i, e, n, o) {
273
+ function A(i, e, n, o) {
274
274
  function t(r) {
275
275
  return r instanceof n ? r : new n(function(s) {
276
276
  s(r);
277
277
  });
278
278
  }
279
279
  return new (n || (n = Promise))(function(r, s) {
280
- function p(l) {
280
+ function f(u) {
281
281
  try {
282
- a(o.next(l));
282
+ a(o.next(u));
283
283
  } catch (v) {
284
284
  s(v);
285
285
  }
286
286
  }
287
- function c(l) {
287
+ function c(u) {
288
288
  try {
289
- a(o.throw(l));
289
+ a(o.throw(u));
290
290
  } catch (v) {
291
291
  s(v);
292
292
  }
293
293
  }
294
- function a(l) {
295
- l.done ? r(l.value) : t(l.value).then(p, c);
294
+ function a(u) {
295
+ u.done ? r(u.value) : t(u.value).then(f, c);
296
296
  }
297
297
  a((o = o.apply(i, e || [])).next());
298
298
  });
299
299
  }
300
- function I(i, e) {
300
+ function k(i, e) {
301
301
  var n = { label: 0, sent: function() {
302
302
  if (r[0] & 1) throw r[1];
303
303
  return r[1];
304
304
  }, trys: [], ops: [] }, o, t, r, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
305
- return s.next = p(0), s.throw = p(1), s.return = p(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
305
+ return s.next = f(0), s.throw = f(1), s.return = f(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
306
306
  return this;
307
307
  }), s;
308
- function p(a) {
309
- return function(l) {
310
- return c([a, l]);
308
+ function f(a) {
309
+ return function(u) {
310
+ return c([a, u]);
311
311
  };
312
312
  }
313
313
  function c(a) {
@@ -348,8 +348,8 @@ function I(i, e) {
348
348
  continue;
349
349
  }
350
350
  a = e.call(i, n);
351
- } catch (l) {
352
- a = [6, l], t = 0;
351
+ } catch (u) {
352
+ a = [6, u], t = 0;
353
353
  } finally {
354
354
  o = r = 0;
355
355
  }
@@ -357,7 +357,7 @@ function I(i, e) {
357
357
  return { value: a[0] ? a[1] : void 0, done: !0 };
358
358
  }
359
359
  }
360
- function T(i, e, n) {
360
+ function I(i, e, n) {
361
361
  if (n || arguments.length === 2) for (var o = 0, t = e.length, r; o < t; o++)
362
362
  (r || !(o in e)) && (r || (r = Array.prototype.slice.call(e, 0, o)), r[o] = e[o]);
363
363
  return i.concat(r || Array.prototype.slice.call(e));
@@ -401,10 +401,10 @@ var R = `
401
401
  mainEnd: V
402
402
  },
403
403
  uniforms: {
404
- evennessPlaneNormal: new u.Uniform(new u.Vector3()),
405
- evennessPlaneConstant: new u.Uniform(0),
406
- evennessPlanes: new u.Uniform([]),
407
- evennessPlaneDepth: new u.Uniform(0)
404
+ evennessPlaneNormal: new l.Uniform(new l.Vector3()),
405
+ evennessPlaneConstant: new l.Uniform(0),
406
+ evennessPlanes: new l.Uniform([]),
407
+ evennessPlaneDepth: new l.Uniform(0)
408
408
  },
409
409
  defines: {
410
410
  USE_PLANE_DISTANCE: !1
@@ -427,14 +427,14 @@ var R = `
427
427
  var t = o.points, r = o.depth, s = !1;
428
428
  if (t.length !== 0 && t.length % 4 === 0) {
429
429
  s = !0;
430
- var p = t[0], c = t[1], a = t[2], l = t[3], v = new u.Vector3().subVectors(c, p), h = new u.Vector3().subVectors(a, p), m = new u.Vector3().crossVectors(v, h).normalize(), y = -m.dot(p), f = r, g = p.clone().add(m.clone().negate().multiplyScalar(f)), d = p.clone().add(m.clone().multiplyScalar(f)), x = c.clone().add(m.clone().negate().multiplyScalar(f)), P = c.clone().add(m.clone().multiplyScalar(f)), E = a.clone().add(m.clone().negate().multiplyScalar(f)), w = a.clone().add(m.clone().multiplyScalar(f)), F = l.clone().add(m.clone().negate().multiplyScalar(f)), C = l.clone().add(m.clone().multiplyScalar(f)), S = new u.Plane().setFromCoplanarPoints(d, P, w), M = new u.Plane().setFromCoplanarPoints(E, x, g), z = new u.Plane().setFromCoplanarPoints(P, d, g), N = new u.Plane().setFromCoplanarPoints(F, C, w), O = new u.Plane().setFromCoplanarPoints(w, P, x), D = new u.Plane().setFromCoplanarPoints(g, d, C);
430
+ var f = t[0], c = t[1], a = t[2], u = t[3], v = new l.Vector3().subVectors(c, f), h = new l.Vector3().subVectors(a, f), m = new l.Vector3().crossVectors(v, h).normalize(), y = -m.dot(f), p = r, g = f.clone().add(m.clone().negate().multiplyScalar(p)), d = f.clone().add(m.clone().multiplyScalar(p)), x = c.clone().add(m.clone().negate().multiplyScalar(p)), P = c.clone().add(m.clone().multiplyScalar(p)), w = a.clone().add(m.clone().negate().multiplyScalar(p)), E = a.clone().add(m.clone().multiplyScalar(p)), b = u.clone().add(m.clone().negate().multiplyScalar(p)), C = u.clone().add(m.clone().multiplyScalar(p)), S = new l.Plane().setFromCoplanarPoints(d, P, E), _ = new l.Plane().setFromCoplanarPoints(w, x, g), z = new l.Plane().setFromCoplanarPoints(P, d, g), N = new l.Plane().setFromCoplanarPoints(b, C, E), D = new l.Plane().setFromCoplanarPoints(E, P, x), O = new l.Plane().setFromCoplanarPoints(g, d, C);
431
431
  this.uniforms.evennessPlanes.value = [
432
432
  { normal: S.normal, constant: S.constant },
433
- { normal: M.normal, constant: M.constant },
433
+ { normal: _.normal, constant: _.constant },
434
434
  { normal: z.normal, constant: z.constant },
435
435
  { normal: N.normal, constant: N.constant },
436
- { normal: O.normal, constant: O.constant },
437
- { normal: D.normal, constant: D.constant }
436
+ { normal: D.normal, constant: D.constant },
437
+ { normal: O.normal, constant: O.constant }
438
438
  ], this.uniforms.evennessPlaneDepth.value = r, this.uniforms.evennessPlaneNormal.value = m, this.uniforms.evennessPlaneConstant.value = y;
439
439
  }
440
440
  this.defines.USE_PLANE_DISTANCE = s, this.needsUpdate = !0;
@@ -446,7 +446,7 @@ var R = `
446
446
  }, n;
447
447
  }
448
448
  return e;
449
- })(_)
449
+ })(F)
450
450
  ), j = `
451
451
  #if NUM_SWEEP_OBJECTS > 0
452
452
  uniform float sweepProgress;
@@ -506,12 +506,12 @@ var R = `
506
506
  mainEnd: J
507
507
  },
508
508
  uniforms: {
509
- sweepProgress: new u.Uniform(0),
510
- sweepRange: new u.Uniform(0),
511
- sweepBoxs: new u.Uniform([]),
512
- interval: new u.Uniform(0.04),
509
+ sweepProgress: new l.Uniform(0),
510
+ sweepRange: new l.Uniform(0),
511
+ sweepBoxs: new l.Uniform([]),
512
+ interval: new l.Uniform(0.04),
513
513
  // 线间距
514
- threshold: new u.Uniform(2e-3)
514
+ threshold: new l.Uniform(2e-3)
515
515
  // 线宽
516
516
  },
517
517
  defines: {
@@ -534,7 +534,7 @@ var R = `
534
534
  var t = String(this.sweepBoxs.length);
535
535
  n.vertexShader = n.vertexShader.replace(/NUM_SWEEP_OBJECTS/g, t), n.fragmentShader = n.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g, t);
536
536
  }, e;
537
- })(_)
537
+ })(F)
538
538
  ), G = `
539
539
  uniform float pointCloudExpand_progress;
540
540
 
@@ -634,7 +634,7 @@ vPointSize = gl_PointSize;
634
634
  mainEnd: q
635
635
  },
636
636
  uniforms: {
637
- pointCloudExpand_progress: new u.Uniform(0)
637
+ pointCloudExpand_progress: new l.Uniform(0)
638
638
  }
639
639
  }) || this;
640
640
  }
@@ -648,14 +648,14 @@ vPointSize = gl_PointSize;
648
648
  enumerable: !1,
649
649
  configurable: !0
650
650
  }), e;
651
- })(_)
651
+ })(F)
652
652
  );
653
- const A = `(function(){"use strict";function P(n){onmessage=function(a){Promise.resolve(a.data).then(function(t){return n(t)}).then(function(t){var v=t.output,r=t.transfer;return postMessage(v,r)}).catch(function(t){return postMessage({$$error:t})})}}function y(n,a,t){var v=new OffscreenCanvas(a,t),r=v.getContext("2d");if(!r)throw new Error("Failed to get canvas context");r.clearRect(0,0,a,t),r.fillStyle="rgba(0,0,0,1.0)",r.beginPath();var o=n[0][0],i=n[0][0],u=n[0][1],m=n[0][1];n.forEach(function(e){var f=e[0],s=e[1];o=Math.min(o,f),i=Math.max(i,f),u=Math.min(u,s),m=Math.max(m,s)});var g=i-o,c=m-u,h=g>=c?a/g:a/c,x=n.map(function(e){var f=e[0]-o,s=e[1]-u;return[f,s]}),l=x.map(function(e){return[e[0]*h,e[1]*h]});return l.forEach(function(e,f){var s=e[0],D=e[1];f===0?r.moveTo(s,D):r.lineTo(s,D)}),r.closePath(),r.fill(),r.getImageData(0,0,a,t)}function M(n,a,t){for(var v=new ImageData(a,t),r=n.map(function(s){return y(s.polygon,s.width,s.height)}),o=0;o<a;o++)for(var i=0;i<t;i++){for(var u=0,m=0,g=0,c=0;c<r.length;c++){var h=r[c].data,x=(o+i*a)*4;if(h[x+3]===255){var l=c%8,e=Math.floor(c/8);e===0?u=u|1<<l:e===1?m=m|1<<l:e===2&&(g=g|1<<l)}}var f=(o+i*a)*4;v.data[f]=u,v.data[f+1]=m,v.data[f+2]=g,v.data[f+3]=255}return v}P(function(n){return Promise.resolve(n).then(function(a){var t=a.canvasDataList,v=a.width,r=a.height,o=M(t,v,r);return{output:{imageData:o},transfer:[o.data.buffer]}})})})();
654
- `, U = typeof self != "undefined" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", A], { type: "text/javascript;charset=utf-8" });
653
+ const U = `(function(){"use strict";function P(n){onmessage=function(a){Promise.resolve(a.data).then(function(t){return n(t)}).then(function(t){var v=t.output,r=t.transfer;return postMessage(v,r)}).catch(function(t){return postMessage({$$error:t})})}}function y(n,a,t){var v=new OffscreenCanvas(a,t),r=v.getContext("2d");if(!r)throw new Error("Failed to get canvas context");r.clearRect(0,0,a,t),r.fillStyle="rgba(0,0,0,1.0)",r.beginPath();var o=n[0][0],i=n[0][0],u=n[0][1],m=n[0][1];n.forEach(function(e){var f=e[0],s=e[1];o=Math.min(o,f),i=Math.max(i,f),u=Math.min(u,s),m=Math.max(m,s)});var g=i-o,c=m-u,h=g>=c?a/g:a/c,x=n.map(function(e){var f=e[0]-o,s=e[1]-u;return[f,s]}),l=x.map(function(e){return[e[0]*h,e[1]*h]});return l.forEach(function(e,f){var s=e[0],D=e[1];f===0?r.moveTo(s,D):r.lineTo(s,D)}),r.closePath(),r.fill(),r.getImageData(0,0,a,t)}function M(n,a,t){for(var v=new ImageData(a,t),r=n.map(function(s){return y(s.polygon,s.width,s.height)}),o=0;o<a;o++)for(var i=0;i<t;i++){for(var u=0,m=0,g=0,c=0;c<r.length;c++){var h=r[c].data,x=(o+i*a)*4;if(h[x+3]===255){var l=c%8,e=Math.floor(c/8);e===0?u=u|1<<l:e===1?m=m|1<<l:e===2&&(g=g|1<<l)}}var f=(o+i*a)*4;v.data[f]=u,v.data[f+1]=m,v.data[f+2]=g,v.data[f+3]=255}return v}P(function(n){return Promise.resolve(n).then(function(a){var t=a.canvasDataList,v=a.width,r=a.height,o=M(t,v,r);return{output:{imageData:o},transfer:[o.data.buffer]}})})})();
654
+ `, T = typeof self != "undefined" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", U], { type: "text/javascript;charset=utf-8" });
655
655
  function $(i) {
656
656
  let e;
657
657
  try {
658
- if (e = U && (self.URL || self.webkitURL).createObjectURL(U), !e) throw "";
658
+ if (e = T && (self.URL || self.webkitURL).createObjectURL(T), !e) throw "";
659
659
  const n = new Worker(e, {
660
660
  name: i == null ? void 0 : i.name
661
661
  });
@@ -664,7 +664,7 @@ function $(i) {
664
664
  }), n;
665
665
  } catch (n) {
666
666
  return new Worker(
667
- "data:text/javascript;charset=utf-8," + encodeURIComponent(A),
667
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(U),
668
668
  {
669
669
  name: i == null ? void 0 : i.name
670
670
  }
@@ -694,8 +694,8 @@ var Y = (
694
694
  }, i.prototype.onMessage = function(e, n) {
695
695
  var o = this.workerResolvers[e];
696
696
  if (n.data && "$$error" in n.data ? o == null || o.reject(n.data.$$error) : o == null || o.resolve(n.data), this.workerResolvers[e] = void 0, this.queue.length) {
697
- var t = this.queue.shift(), r = t.resolve, s = t.reject, p = t.input, c = t.transfer;
698
- this.workerResolvers[e] = { resolve: r, reject: s }, this.workers[e].postMessage(p, c);
697
+ var t = this.queue.shift(), r = t.resolve, s = t.reject, f = t.input, c = t.transfer;
698
+ this.workerResolvers[e] = { resolve: r, reject: s }, this.workers[e].postMessage(f, c);
699
699
  } else
700
700
  this.workerStatus ^= 1 << e;
701
701
  }, i.prototype.postMessage = function(e, n) {
@@ -722,30 +722,30 @@ var Y = (
722
722
  function sn(i) {
723
723
  if (i.length < 3)
724
724
  throw new Error("At least 3 points are required to compute alignment matrix");
725
- var e = i[0], n = i[1], o = i[2], t = new u.Vector3().subVectors(n, e), r = new u.Vector3().subVectors(o, e), s = new u.Vector3().crossVectors(t, r);
725
+ var e = i[0], n = i[1], o = i[2], t = new l.Vector3().subVectors(n, e), r = new l.Vector3().subVectors(o, e), s = new l.Vector3().crossVectors(t, r);
726
726
  if (s.lengthSq() < 1e-4)
727
- for (var p = 3; p < i.length && (o = i[p], r = new u.Vector3().subVectors(o, e), s = new u.Vector3().crossVectors(t, r), !(s.lengthSq() >= 1e-4)); p++)
727
+ for (var f = 3; f < i.length && (o = i[f], r = new l.Vector3().subVectors(o, e), s = new l.Vector3().crossVectors(t, r), !(s.lengthSq() >= 1e-4)); f++)
728
728
  ;
729
729
  if (s.lengthSq() < 1e-4)
730
730
  throw new Error("All points are collinear, cannot compute normal");
731
731
  s.normalize();
732
- var c = new u.Vector3();
733
- i.forEach(function(E) {
734
- return c.add(E);
732
+ var c = new l.Vector3();
733
+ i.forEach(function(w) {
734
+ return c.add(w);
735
735
  }), c.divideScalar(i.length);
736
- var a = new u.Vector3(0, 1, 0), l = new u.Quaternion(), v = s.dot(a);
736
+ var a = new l.Vector3(0, 1, 0), u = new l.Quaternion(), v = s.dot(a);
737
737
  if (!(Math.abs(v - 1) < 1e-4)) if (Math.abs(v + 1) < 1e-4) {
738
- var h = new u.Vector3(1, 0, 0);
739
- l.setFromAxisAngle(h, Math.PI);
738
+ var h = new l.Vector3(1, 0, 0);
739
+ u.setFromAxisAngle(h, Math.PI);
740
740
  } else {
741
- var h = new u.Vector3().crossVectors(s, a).normalize(), m = Math.acos(v);
742
- l.setFromAxisAngle(h, m);
741
+ var h = new l.Vector3().crossVectors(s, a).normalize(), m = Math.acos(v);
742
+ u.setFromAxisAngle(h, m);
743
743
  }
744
- var y = new u.Matrix4().makeTranslation(-c.x, -c.y, -c.z), f = new u.Matrix4().makeRotationFromQuaternion(l), g = new u.Matrix4();
745
- g.multiplyMatrices(f, y);
746
- var d = i.map(function(E) {
747
- var w = E.clone().applyMatrix4(g);
748
- return [w.x, w.z];
744
+ var y = new l.Matrix4().makeTranslation(-c.x, -c.y, -c.z), p = new l.Matrix4().makeRotationFromQuaternion(u), g = new l.Matrix4();
745
+ g.multiplyMatrices(p, y);
746
+ var d = i.map(function(w) {
747
+ var E = w.clone().applyMatrix4(g);
748
+ return [E.x, E.z];
749
749
  });
750
750
  if (d.length > 0) {
751
751
  var x = d[0], P = d[d.length - 1];
@@ -765,6 +765,7 @@ var Q = `
765
765
  vec2 minPos;
766
766
  float polygonScale;
767
767
  bool cutOutSide;
768
+ float floorIndex;
768
769
  };
769
770
 
770
771
  #if NUM_POLYGON_CLIPPER > 0
@@ -779,6 +780,13 @@ var Q = `
779
780
  vec2 minPos = polygonClipper.minPos;
780
781
  float polygonScale = polygonClipper.polygonScale;
781
782
  bool cutOutSide = polygonClipper.cutOutSide;
783
+ float clipperFloorIndex = polygonClipper.floorIndex;
784
+
785
+ // 楼层判断:如果 floorIndex < 0,对所有楼层生效;否则只对特定楼层生效
786
+ bool isFloorMatch = clipperFloorIndex < 0.0 || abs(floorIndex - clipperFloorIndex) < 1.0;
787
+ if (!isFloorMatch) {
788
+ continue;
789
+ }
782
790
 
783
791
  vec4 worldPosition = vFinalPosition;
784
792
  vec4 positionInPolygonSpace = polygonTransformInverse * worldPosition;
@@ -844,7 +852,7 @@ var Q = `
844
852
  /** @class */
845
853
  (function() {
846
854
  function i() {
847
- this.canvasCache = /* @__PURE__ */ new Map(), this.canvas = document.createElement("canvas"), this.canvas.width = 512, this.canvas.height = 512, this.polygonTexture = new u.CanvasTexture(this.canvas), this.polygonCount = 0;
855
+ this.canvasCache = /* @__PURE__ */ new Map(), this.canvas = document.createElement("canvas"), this.canvas.width = 512, this.canvas.height = 512, this.polygonTexture = new l.CanvasTexture(this.canvas), this.polygonCount = 0;
848
856
  }
849
857
  return i.prototype.setSize = function(e) {
850
858
  this.canvas.width = e, this.canvas.height = e;
@@ -860,35 +868,35 @@ var Q = `
860
868
  if (this.polygonCount >= 24)
861
869
  throw new Error("polygon count exceed 24, please clear the canvas");
862
870
  t.clearRect(0, 0, this.canvas.width, this.canvas.height), t.fillStyle = "rgba(0,0,0,1.0)", t.beginPath();
863
- var r = e[0][0], s = e[0][0], p = e[0][1], c = e[0][1];
864
- e.forEach(function(f) {
865
- var g = f[0], d = f[1];
866
- r = Math.min(r, g), s = Math.max(s, g), p = Math.min(p, d), c = Math.max(c, d);
871
+ var r = e[0][0], s = e[0][0], f = e[0][1], c = e[0][1];
872
+ e.forEach(function(p) {
873
+ var g = p[0], d = p[1];
874
+ r = Math.min(r, g), s = Math.max(s, g), f = Math.min(f, d), c = Math.max(c, d);
867
875
  });
868
- var a = s - r, l = c - p, v = this.canvas.width, h = a >= l ? v / a : v / l, m = e.map(function(f) {
869
- var g = f[0] - r, d = f[1] - p;
876
+ var a = s - r, u = c - f, v = this.canvas.width, h = a >= u ? v / a : v / u, m = e.map(function(p) {
877
+ var g = p[0] - r, d = p[1] - f;
870
878
  return [g, d];
871
- }), y = m.map(function(f) {
872
- return [f[0] * h, f[1] * h];
879
+ }), y = m.map(function(p) {
880
+ return [p[0] * h, p[1] * h];
873
881
  });
874
- return y.forEach(function(f, g) {
875
- var d = f[0], x = f[1];
882
+ return y.forEach(function(p, g) {
883
+ var d = p[0], x = p[1];
876
884
  g === 0 ? t.moveTo(d, x) : t.lineTo(d, x);
877
885
  }), t.closePath(), t.fill(), this.polygonCount++, this.canvasCache.set(n, o), o;
878
886
  }, i.generatePolygonGeometry = function(e, n) {
879
- for (var o = new u.BufferGeometry(), t = e.slice(0, -1), r = t.map(function(h) {
887
+ for (var o = new l.BufferGeometry(), t = e.slice(0, -1), r = t.map(function(h) {
880
888
  return [h[0], 0, h[1]];
881
889
  }), s = t.map(function(h) {
882
890
  return [h[0], n, h[1]];
883
- }), p = T(T([], r, !0), s, !0), c = t.length, a = [], l = 1; l < c - 1; l++)
884
- a.push(0, l, l + 1);
885
- for (var l = 1; l < c - 1; l++)
886
- a.push(c, c + l, c + l + 1);
887
- for (var l = 0; l < c; l++) {
888
- var v = (l + 1) % c;
889
- a.push(l, v, c + l), a.push(v, c + v, c + l);
891
+ }), f = I(I([], r, !0), s, !0), c = t.length, a = [], u = 1; u < c - 1; u++)
892
+ a.push(0, u, u + 1);
893
+ for (var u = 1; u < c - 1; u++)
894
+ a.push(c, c + u, c + u + 1);
895
+ for (var u = 0; u < c; u++) {
896
+ var v = (u + 1) % c;
897
+ a.push(u, v, c + u), a.push(v, c + v, c + u);
890
898
  }
891
- return o.setAttribute("position", new u.Float32BufferAttribute(p.flat(), 3)), o.setIndex(a), o.computeVertexNormals(), o;
899
+ return o.setAttribute("position", new l.Float32BufferAttribute(f.flat(), 3)), o.setIndex(a), o.computeVertexNormals(), o;
892
900
  }, i.prototype.generatePolygonTexture = function(e) {
893
901
  var n = this.canvas.getContext("2d", {
894
902
  willReadFrequently: !0
@@ -897,20 +905,20 @@ var Q = `
897
905
  throw new Error("Failed to get canvas context");
898
906
  for (var o = n.createImageData(this.canvas.width, this.canvas.height), t = 0; t < this.canvas.width; t++)
899
907
  for (var r = 0; r < this.canvas.height; r++) {
900
- for (var s = 0, p = 0, c = 0, a = 0; a < e.length; a++) {
901
- var l = e[a].getContext("2d", { willReadFrequently: !0 });
902
- if (!l)
908
+ for (var s = 0, f = 0, c = 0, a = 0; a < e.length; a++) {
909
+ var u = e[a].getContext("2d", { willReadFrequently: !0 });
910
+ if (!u)
903
911
  throw new Error("Failed to get canvas context");
904
- var v = l.getImageData(t, r, 1, 1).data;
912
+ var v = u.getImageData(t, r, 1, 1).data;
905
913
  if (v[3] === 255) {
906
914
  var h = a % 8, m = Math.floor(a / 8);
907
- m === 0 ? s = s | 1 << h : m === 1 ? p = p | 1 << h : m === 2 && (c = c | 1 << h);
915
+ m === 0 ? s = s | 1 << h : m === 1 ? f = f | 1 << h : m === 2 && (c = c | 1 << h);
908
916
  }
909
917
  }
910
918
  var y = (t + r * this.canvas.width) * 4;
911
- o.data[y] = s, o.data[y + 1] = p, o.data[y + 2] = c, o.data[y + 3] = 255;
919
+ o.data[y] = s, o.data[y + 1] = f, o.data[y + 2] = c, o.data[y + 3] = 255;
912
920
  }
913
- return n.putImageData(o, 0, 0), new u.CanvasTexture(this.canvas);
921
+ return n.putImageData(o, 0, 0), new l.CanvasTexture(this.canvas);
914
922
  }, i;
915
923
  })()
916
924
  ), ln = (
@@ -926,8 +934,8 @@ var Q = `
926
934
  mainEnd: K
927
935
  },
928
936
  uniforms: {
929
- polygonClippers: new u.Uniform([]),
930
- polygonTexture: new u.Uniform(null)
937
+ polygonClippers: new l.Uniform([]),
938
+ polygonTexture: new l.Uniform(null)
931
939
  }
932
940
  }) || this;
933
941
  return o._polygonClippers = [], o.polygonGenerater = new Z(), o._radio = 512, o.radio = n, o.workerPool = new Y(function() {
@@ -935,24 +943,25 @@ var Q = `
935
943
  }, 1), o;
936
944
  }
937
945
  return e.prototype.setPolygonClippersAsync = function(n) {
938
- return k(this, void 0, void 0, function() {
939
- var o, t, r, s, p, c, a = this;
940
- return I(this, function(l) {
941
- switch (l.label) {
946
+ return A(this, void 0, void 0, function() {
947
+ var o, t, r, s, f, c, a = this;
948
+ return k(this, function(u) {
949
+ switch (u.label) {
942
950
  case 0:
943
951
  return this._polygonClippers = n, o = this.uniforms, o.polygonClippers.value = n.map(function(v) {
944
- var h = new u.Matrix4().getInverse(v.polygonTransform), m = v.polygonHeight, y = v.cutOutSide, f = v.polygon, g = f[0][0], d = f[0][0], x = f[0][1], P = f[0][1];
945
- f.forEach(function(F) {
946
- var C = F[0], S = F[1];
947
- g = Math.min(g, C), d = Math.max(d, C), x = Math.min(x, S), P = Math.max(P, S);
952
+ var h = new l.Matrix4().getInverse(v.polygonTransform), m = v.polygonHeight, y = v.cutOutSide, p = v.polygon, g = v.floorIndex !== void 0 ? v.floorIndex : -1, d = p[0][0], x = p[0][0], P = p[0][1], w = p[0][1];
953
+ p.forEach(function(C) {
954
+ var S = C[0], _ = C[1];
955
+ d = Math.min(d, S), x = Math.max(x, S), P = Math.min(P, _), w = Math.max(w, _);
948
956
  });
949
- var E = new u.Vector2(g, x), w = d - g >= P - x ? d - g : P - x;
957
+ var E = new l.Vector2(d, P), b = x - d >= w - P ? x - d : w - P;
950
958
  return {
951
959
  polygonTransformInverse: h,
952
960
  polygonHeight: m,
953
961
  minPos: E,
954
- polygonScale: w,
955
- cutOutSide: y
962
+ polygonScale: b,
963
+ cutOutSide: y,
964
+ floorIndex: g
956
965
  };
957
966
  }), t = n.map(function(v) {
958
967
  return {
@@ -966,7 +975,7 @@ var Q = `
966
975
  height: this.polygonGenerater.canvas.height
967
976
  })];
968
977
  case 1:
969
- return r = l.sent(), s = document.createElement("canvas"), s.width = this.polygonGenerater.canvas.width, s.height = this.polygonGenerater.canvas.height, p = s.getContext("2d"), p && (p.putImageData(r.imageData, 0, 0), c = new u.CanvasTexture(s), this.uniforms.polygonTexture.value = c, this.needsUpdate = !0), [
978
+ return r = u.sent(), s = document.createElement("canvas"), s.width = this.polygonGenerater.canvas.width, s.height = this.polygonGenerater.canvas.height, f = s.getContext("2d"), f && (f.putImageData(r.imageData, 0, 0), c = new l.CanvasTexture(s), c.minFilter = l.NearestFilter, c.magFilter = l.NearestFilter, this.uniforms.polygonTexture.value = c, this.needsUpdate = !0), [
970
979
  2
971
980
  /*return*/
972
981
  ];
@@ -997,7 +1006,7 @@ var Q = `
997
1006
  var t = String(this.polygonClippers.length);
998
1007
  n.vertexShader = n.vertexShader.replace(/NUM_POLYGON_CLIPPER/g, t), n.fragmentShader = n.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g, t);
999
1008
  }, e;
1000
- })(_)
1009
+ })(F)
1001
1010
  ), X = `
1002
1011
  #if NUM_SHINE_OBJECTS > 0
1003
1012
  uniform float shineProgress;
@@ -1036,8 +1045,8 @@ var Q = `
1036
1045
  mainEnd: nn
1037
1046
  },
1038
1047
  uniforms: {
1039
- shineProgress: new u.Uniform(0),
1040
- shineBoxes: new u.Uniform([])
1048
+ shineProgress: new l.Uniform(0),
1049
+ shineBoxes: new l.Uniform([])
1041
1050
  },
1042
1051
  defines: {
1043
1052
  NUM_SHINE_OBJECTS: 0
@@ -1059,7 +1068,7 @@ var Q = `
1059
1068
  var t = String(this.shineBoxes.length);
1060
1069
  n.vertexShader = n.vertexShader.replace(/NUM_SHINE_OBJECTS/g, t), n.fragmentShader = n.fragmentShader.replace(/NUM_SHINE_OBJECTS/g, t);
1061
1070
  }, e;
1062
- })(_)
1071
+ })(F)
1063
1072
  );
1064
1073
  export {
1065
1074
  tn as EvenessPlaneShader,
package/sticker/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/11/11
5
- * Version: 6.6.14
4
+ * Generated: 2025/12/5
5
+ * Version: 6.6.16
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 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.14"},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.16"},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: 2025/11/11
5
- * Version: 6.6.14
4
+ * Generated: 2025/12/5
5
+ * Version: 6.6.16
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -366,7 +366,7 @@ var A = (
366
366
  }
367
367
  return Object.defineProperty(n, "version", {
368
368
  get: function() {
369
- return "6.6.14";
369
+ return "6.6.16";
370
370
  },
371
371
  enumerable: !1,
372
372
  configurable: !0