@realsee/five 6.7.0-alpha.11 → 6.7.0-alpha.13

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 (173) 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.Camera.html +5 -5
  5. package/docs/classes/five.Five.html +1 -1
  6. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  7. package/docs/classes/five.Model.html +1 -1
  8. package/docs/classes/five.ModelScene.html +1 -1
  9. package/docs/classes/five.NetworkSubscribe.html +1 -1
  10. package/docs/classes/five.PBMContainer.html +1 -1
  11. package/docs/classes/five.PBMGroup.html +1 -1
  12. package/docs/classes/five.PBMMesh.html +1 -1
  13. package/docs/classes/five.PBMMeshMaterial.html +1 -1
  14. package/docs/classes/five.PBMPointCloud.html +1 -1
  15. package/docs/classes/five.PBMPointCloudMaterial.html +1 -1
  16. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  17. package/docs/classes/five.PanoCircleMesh.html +1 -1
  18. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  19. package/docs/classes/five.PanoCircleMeshSolid.html +5 -5
  20. package/docs/classes/five.Parameter.html +1 -1
  21. package/docs/classes/five.Scene.html +1 -1
  22. package/docs/classes/five.Subscribe.html +1 -1
  23. package/docs/classes/five.Tile3D.html +1 -1
  24. package/docs/classes/five.TileNode.html +1 -1
  25. package/docs/classes/five.TrajectoryNode.html +1 -1
  26. package/docs/classes/five.Work.html +16 -16
  27. package/docs/classes/five.WorkResolvedObserver.html +17 -17
  28. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  29. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  30. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  31. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  32. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  33. package/docs/classes/line.Line.html +1 -1
  34. package/docs/classes/line.LineGeometry.html +1 -1
  35. package/docs/classes/line.LineMaterial.html +1 -1
  36. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  37. package/docs/classes/line.THREE_Line2.html +1 -1
  38. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  39. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  40. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  41. package/docs/classes/sticker.Sticker.html +1 -1
  42. package/docs/classes/vfx.Airflow.html +1 -1
  43. package/docs/classes/vfx.Flame.html +1 -1
  44. package/docs/classes/vfx.Particle.html +1 -1
  45. package/docs/classes/vfx.ParticleGPU.html +1 -1
  46. package/docs/classes/vfx.SpotLight.html +1 -1
  47. package/docs/functions/five.parseWork.html +1 -1
  48. package/docs/functions/plugins.DynamicPathLinePlugin.html +1 -0
  49. package/docs/functions/vue.useFiveWorks.html +2 -2
  50. package/docs/hierarchy.html +1 -1
  51. package/docs/interfaces/five.AddableObject.html +1 -1
  52. package/docs/interfaces/five.AjaxOptions.html +1 -1
  53. package/docs/interfaces/five.BaseEvent.html +1 -1
  54. package/docs/interfaces/five.EventCallback.html +1 -1
  55. package/docs/interfaces/five.GestureEvent.html +1 -1
  56. package/docs/interfaces/five.ImageOptions.html +1 -1
  57. package/docs/interfaces/five.IntersectEvent.html +1 -1
  58. package/docs/interfaces/five.IntersectMesh.html +1 -1
  59. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  60. package/docs/interfaces/five.Intersection.html +1 -1
  61. package/docs/interfaces/five.LooseWorkPanorama.html +1 -1
  62. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  63. package/docs/interfaces/five.ModeChangeEvent.html +1 -1
  64. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +5 -3
  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.NetworkAbortError.html +1 -1
  70. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  71. package/docs/interfaces/five.NetworkOptions.html +1 -1
  72. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  73. package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
  74. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  75. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  76. package/docs/interfaces/five.ObjectEvent.html +1 -1
  77. package/docs/interfaces/five.PBMMaterial.html +1 -1
  78. package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
  79. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
  80. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  81. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +2 -2
  82. package/docs/interfaces/five.PanoEvent.html +1 -1
  83. package/docs/interfaces/five.PanoTextureEvent.html +1 -1
  84. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +12 -10
  85. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +5 -3
  86. package/docs/interfaces/five.ParameterMaterialValue.html +1 -1
  87. package/docs/interfaces/five.ParameterTilesetValue.html +1 -1
  88. package/docs/interfaces/five.ParameterValue.html +1 -1
  89. package/docs/interfaces/five.Pose.html +1 -1
  90. package/docs/interfaces/five.RenderEvent.html +1 -1
  91. package/docs/interfaces/five.ResolvedParameterValue.html +1 -1
  92. package/docs/interfaces/five.State.html +1 -1
  93. package/docs/interfaces/five.StateEvent.html +1 -1
  94. package/docs/interfaces/five.TextureOptions.html +1 -1
  95. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
  96. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +12 -10
  97. package/docs/interfaces/five.ViewLayer.html +1 -1
  98. package/docs/interfaces/five.WorkCubeImage.html +2 -2
  99. package/docs/interfaces/five.WorkImage.html +3 -3
  100. package/docs/interfaces/five.WorkInitial.html +8 -8
  101. package/docs/interfaces/five.WorkModel.html +8 -8
  102. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  103. package/docs/interfaces/five.WorkObserver.html +18 -18
  104. package/docs/interfaces/five.WorkTile.html +4 -4
  105. package/docs/interfaces/five.WorkVideo.html +4 -4
  106. package/docs/interfaces/five.WorksEvent.html +1 -1
  107. package/docs/interfaces/five.XRControllerEvent.html +1 -1
  108. package/docs/interfaces/five.XRGestureEvent.html +1 -1
  109. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +12 -10
  110. package/docs/interfaces/five.XRSessionEvent.html +1 -1
  111. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  112. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  113. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  114. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +78 -0
  115. package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +32 -0
  116. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +26 -0
  117. package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +6 -0
  118. package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +22 -0
  119. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +10 -0
  120. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  121. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  122. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  123. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  124. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  125. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  126. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  127. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  128. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  129. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  130. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  131. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  132. package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
  133. package/docs/modules/plugins.DynamicPathLinePluginType.html +1 -0
  134. package/docs/modules/plugins.html +1 -1
  135. package/docs/types/five.ParseOptions.html +6 -6
  136. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  137. package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +3 -0
  138. package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +3 -0
  139. package/docs/types/vue.FiveProviderComponent.html +1 -1
  140. package/five/index.d.ts +6 -2
  141. package/five/index.js +71 -61
  142. package/five/index.mjs +3108 -3046
  143. package/gltf-loader/index.js +3 -3
  144. package/gltf-loader/index.mjs +3 -3
  145. package/line/index.js +3 -3
  146. package/line/index.mjs +3 -3
  147. package/package.json +1 -1
  148. package/plugins/index.d.ts +291 -0
  149. package/plugins/index.js +298 -15
  150. package/plugins/index.mjs +2384 -1330
  151. package/react/index.js +2 -2
  152. package/react/index.mjs +2 -2
  153. package/shader-lib/index.d.ts +24 -1
  154. package/shader-lib/index.js +14 -13
  155. package/shader-lib/index.mjs +397 -169
  156. package/sticker/index.js +3 -3
  157. package/sticker/index.mjs +3 -3
  158. package/umd/five-gltf-loader.js +3 -3
  159. package/umd/five-line.js +3 -3
  160. package/umd/five-plugins.js +298 -15
  161. package/umd/five-react.js +2 -2
  162. package/umd/five-shader-lib.js +14 -13
  163. package/umd/five-sticker.js +3 -3
  164. package/umd/five-vfx.js +2 -2
  165. package/umd/five-vue.js +2 -2
  166. package/umd/five.js +71 -61
  167. package/vfx/index.js +2 -2
  168. package/vfx/index.mjs +2 -2
  169. package/vue/index.d.ts +1 -1
  170. package/vue/index.js +2 -2
  171. package/vue/index.mjs +2 -2
  172. package/work-downloader/index.js +2 -2
  173. package/work-downloader/index.mjs +2 -2
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/10/29
5
- * Version: 6.7.0-alpha.11
4
+ * Generated: 2025/11/10
5
+ * Version: 6.7.0-alpha.13
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,30 +252,117 @@
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 C } from "@realsee/five";
256
- import * as r from "three";
257
- var B = function(i, e) {
258
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, t) {
259
- n.__proto__ = t;
260
- } || function(n, t) {
261
- for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]);
262
- }, B(i, e);
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) {
259
+ n.__proto__ = o;
260
+ } || function(n, o) {
261
+ for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (n[t] = o[t]);
262
+ }, b(i, e);
263
263
  };
264
- function S(i, e) {
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
+ b(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 U(i, e, n) {
274
- if (n || arguments.length === 2) for (var t = 0, o = e.length, l; t < o; t++)
275
- (l || !(t in e)) && (l || (l = Array.prototype.slice.call(e, 0, t)), l[t] = e[t]);
276
- return i.concat(l || Array.prototype.slice.call(e));
273
+ function k(i, e, n, o) {
274
+ function t(r) {
275
+ return r instanceof n ? r : new n(function(s) {
276
+ s(r);
277
+ });
278
+ }
279
+ return new (n || (n = Promise))(function(r, s) {
280
+ function p(l) {
281
+ try {
282
+ a(o.next(l));
283
+ } catch (v) {
284
+ s(v);
285
+ }
286
+ }
287
+ function c(l) {
288
+ try {
289
+ a(o.throw(l));
290
+ } catch (v) {
291
+ s(v);
292
+ }
293
+ }
294
+ function a(l) {
295
+ l.done ? r(l.value) : t(l.value).then(p, c);
296
+ }
297
+ a((o = o.apply(i, e || [])).next());
298
+ });
277
299
  }
278
- var I = `
300
+ function I(i, e) {
301
+ var n = { label: 0, sent: function() {
302
+ if (r[0] & 1) throw r[1];
303
+ return r[1];
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() {
306
+ return this;
307
+ }), s;
308
+ function p(a) {
309
+ return function(l) {
310
+ return c([a, l]);
311
+ };
312
+ }
313
+ function c(a) {
314
+ if (o) throw new TypeError("Generator is already executing.");
315
+ for (; s && (s = 0, a[0] && (n = 0)), n; ) try {
316
+ if (o = 1, t && (r = a[0] & 2 ? t.return : a[0] ? t.throw || ((r = t.return) && r.call(t), 0) : t.next) && !(r = r.call(t, a[1])).done) return r;
317
+ switch (t = 0, r && (a = [a[0] & 2, r.value]), a[0]) {
318
+ case 0:
319
+ case 1:
320
+ r = a;
321
+ break;
322
+ case 4:
323
+ return n.label++, { value: a[1], done: !1 };
324
+ case 5:
325
+ n.label++, t = a[1], a = [0];
326
+ continue;
327
+ case 7:
328
+ a = n.ops.pop(), n.trys.pop();
329
+ continue;
330
+ default:
331
+ if (r = n.trys, !(r = r.length > 0 && r[r.length - 1]) && (a[0] === 6 || a[0] === 2)) {
332
+ n = 0;
333
+ continue;
334
+ }
335
+ if (a[0] === 3 && (!r || a[1] > r[0] && a[1] < r[3])) {
336
+ n.label = a[1];
337
+ break;
338
+ }
339
+ if (a[0] === 6 && n.label < r[1]) {
340
+ n.label = r[1], r = a;
341
+ break;
342
+ }
343
+ if (r && n.label < r[2]) {
344
+ n.label = r[2], n.ops.push(a);
345
+ break;
346
+ }
347
+ r[2] && n.ops.pop(), n.trys.pop();
348
+ continue;
349
+ }
350
+ a = e.call(i, n);
351
+ } catch (l) {
352
+ a = [6, l], t = 0;
353
+ } finally {
354
+ o = r = 0;
355
+ }
356
+ if (a[0] & 5) throw a[1];
357
+ return { value: a[0] ? a[1] : void 0, done: !0 };
358
+ }
359
+ }
360
+ function T(i, e, n) {
361
+ if (n || arguments.length === 2) for (var o = 0, t = e.length, r; o < t; o++)
362
+ (r || !(o in e)) && (r || (r = Array.prototype.slice.call(e, 0, o)), r[o] = e[o]);
363
+ return i.concat(r || Array.prototype.slice.call(e));
364
+ }
365
+ var R = `
279
366
  #if defined(USE_PLANE_DISTANCE)
280
367
  struct Plane {
281
368
  vec3 normal;
@@ -286,7 +373,7 @@ var I = `
286
373
  uniform float evennessPlaneConstant;
287
374
  uniform float evennessPlaneDepth;
288
375
  #endif
289
- `, A = `
376
+ `, V = `
290
377
  #if defined(USE_PLANE_DISTANCE)
291
378
 
292
379
  bool inside = true;
@@ -306,28 +393,28 @@ var I = `
306
393
  }
307
394
  }
308
395
  #endif
309
- `, J = "", V = {
396
+ `, W = "", L = {
310
397
  type: ["pointcloud"],
311
398
  fragment: {
312
- mainBefore: I,
313
- mainStart: J,
314
- mainEnd: A
399
+ mainBefore: R,
400
+ mainStart: W,
401
+ mainEnd: V
315
402
  },
316
403
  uniforms: {
317
- evennessPlaneNormal: new r.Uniform(new r.Vector3()),
318
- evennessPlaneConstant: new r.Uniform(0),
319
- evennessPlanes: new r.Uniform([]),
320
- evennessPlaneDepth: new r.Uniform(0)
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)
321
408
  },
322
409
  defines: {
323
410
  USE_PLANE_DISTANCE: !1
324
411
  }
325
- }, Z = (
412
+ }, tn = (
326
413
  /** @class */
327
414
  (function(i) {
328
- S(e, i);
415
+ B(e, i);
329
416
  function e() {
330
- var n = i.call(this, V) || this;
417
+ var n = i.call(this, L) || this;
331
418
  return Object.defineProperties(n, {
332
419
  evennessPlane: {
333
420
  get: function() {
@@ -336,21 +423,21 @@ var I = `
336
423
  points: this.uniforms.evennessPoints.value
337
424
  };
338
425
  },
339
- set: function(t) {
340
- var o = t.points, l = t.depth, m = !1;
341
- if (o.length !== 0 && o.length % 4 === 0) {
342
- m = !0;
343
- var v = o[0], u = o[1], p = o[2], a = o[3], g = new r.Vector3().subVectors(u, v), x = new r.Vector3().subVectors(p, v), c = new r.Vector3().crossVectors(g, x).normalize(), h = -c.dot(v), s = l, d = v.clone().add(c.clone().negate().multiplyScalar(s)), f = v.clone().add(c.clone().multiplyScalar(s)), y = u.clone().add(c.clone().negate().multiplyScalar(s)), E = u.clone().add(c.clone().multiplyScalar(s)), _ = p.clone().add(c.clone().negate().multiplyScalar(s)), P = p.clone().add(c.clone().multiplyScalar(s)), w = a.clone().add(c.clone().negate().multiplyScalar(s)), F = a.clone().add(c.clone().multiplyScalar(s)), z = new r.Plane().setFromCoplanarPoints(f, E, P), N = new r.Plane().setFromCoplanarPoints(_, y, d), M = new r.Plane().setFromCoplanarPoints(E, f, d), O = new r.Plane().setFromCoplanarPoints(w, F, P), T = new r.Plane().setFromCoplanarPoints(P, E, y), D = new r.Plane().setFromCoplanarPoints(d, f, F);
426
+ set: function(o) {
427
+ var t = o.points, r = o.depth, s = !1;
428
+ if (t.length !== 0 && t.length % 4 === 0) {
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);
344
431
  this.uniforms.evennessPlanes.value = [
432
+ { normal: S.normal, constant: S.constant },
433
+ { normal: M.normal, constant: M.constant },
345
434
  { normal: z.normal, constant: z.constant },
346
435
  { normal: N.normal, constant: N.constant },
347
- { normal: M.normal, constant: M.constant },
348
436
  { normal: O.normal, constant: O.constant },
349
- { normal: T.normal, constant: T.constant },
350
437
  { normal: D.normal, constant: D.constant }
351
- ], this.uniforms.evennessPlaneDepth.value = l, this.uniforms.evennessPlaneNormal.value = c, this.uniforms.evennessPlaneConstant.value = h;
438
+ ], this.uniforms.evennessPlaneDepth.value = r, this.uniforms.evennessPlaneNormal.value = m, this.uniforms.evennessPlaneConstant.value = y;
352
439
  }
353
- this.defines.USE_PLANE_DISTANCE = m, this.needsUpdate = !0;
440
+ this.defines.USE_PLANE_DISTANCE = s, this.needsUpdate = !0;
354
441
  }
355
442
  }
356
443
  }), n.evennessPlane = {
@@ -359,8 +446,8 @@ var I = `
359
446
  }, n;
360
447
  }
361
448
  return e;
362
- })(C)
363
- ), W = `
449
+ })(_)
450
+ ), j = `
364
451
  #if NUM_SWEEP_OBJECTS > 0
365
452
  uniform float sweepProgress;
366
453
  uniform float sweepRange;
@@ -373,7 +460,7 @@ var I = `
373
460
  };
374
461
  uniform SWEEP_OBJECT sweepBoxs[NUM_SWEEP_OBJECTS];
375
462
  #endif
376
- `, H = `
463
+ `, J = `
377
464
 
378
465
  #if NUM_SWEEP_OBJECTS > 0
379
466
  #pragma unroll_loop_start
@@ -406,25 +493,25 @@ var I = `
406
493
  }
407
494
  #pragma unroll_loop_end
408
495
  #endif
409
- `, R = "", X = (
496
+ `, H = "", rn = (
410
497
  /** @class */
411
498
  (function(i) {
412
- S(e, i);
499
+ B(e, i);
413
500
  function e() {
414
501
  var n = i.call(this, {
415
502
  type: ["basic", "phong", "pointcloud"],
416
503
  fragment: {
417
- mainBefore: W,
418
- mainStart: R,
419
- mainEnd: H
504
+ mainBefore: j,
505
+ mainStart: H,
506
+ mainEnd: J
420
507
  },
421
508
  uniforms: {
422
- sweepProgress: new r.Uniform(0),
423
- sweepRange: new r.Uniform(0),
424
- sweepBoxs: new r.Uniform([]),
425
- interval: new r.Uniform(0.04),
509
+ sweepProgress: new u.Uniform(0),
510
+ sweepRange: new u.Uniform(0),
511
+ sweepBoxs: new u.Uniform([]),
512
+ interval: new u.Uniform(0.04),
426
513
  // 线间距
427
- threshold: new r.Uniform(2e-3)
514
+ threshold: new u.Uniform(2e-3)
428
515
  // 线宽
429
516
  },
430
517
  defines: {
@@ -436,19 +523,19 @@ var I = `
436
523
  get: function() {
437
524
  return this.uniforms.sweepBoxs.value;
438
525
  },
439
- set: function(t) {
440
- var o = t.length;
441
- o > 0 && (this.defines.NUM_SWEEP_OBJECTS = o, this.needsUpdate = !0, this.uniforms.sweepBoxs.value = t);
526
+ set: function(o) {
527
+ var t = o.length;
528
+ t > 0 && (this.defines.NUM_SWEEP_OBJECTS = t, this.needsUpdate = !0, this.uniforms.sweepBoxs.value = o);
442
529
  }
443
530
  }
444
531
  }), n.sweepBoxs = [], n;
445
532
  }
446
- return e.prototype.onBeforeCompile = function(n, t) {
447
- var o = String(this.sweepBoxs.length);
448
- n.vertexShader = n.vertexShader.replace(/NUM_SWEEP_OBJECTS/g, o), n.fragmentShader = n.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g, o);
533
+ return e.prototype.onBeforeCompile = function(n, o) {
534
+ var t = String(this.sweepBoxs.length);
535
+ n.vertexShader = n.vertexShader.replace(/NUM_SWEEP_OBJECTS/g, t), n.fragmentShader = n.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g, t);
449
536
  }, e;
450
- })(C)
451
- ), L = `
537
+ })(_)
538
+ ), G = `
452
539
  uniform float pointCloudExpand_progress;
453
540
 
454
541
  vec4 pointCloudExpand_permute(vec4 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }
@@ -521,7 +608,7 @@ float pointCloudExpand_gln_simplex(vec3 v) {
521
608
  m = m * m;
522
609
  return 42.0 * dot(m * m, vec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));
523
610
  }
524
- `, G = `
611
+ `, q = `
525
612
  float pointCloudExpand_sizeScale = 1.0;
526
613
  float pointCloudExpand_sizeBasis = 0.0;
527
614
  vec4 pointCloudExpand_basis = vec4((modelBoundingMax + modelBoundingMin) / 2.0, 1.0);
@@ -535,19 +622,19 @@ float pointCloudExpand_progress2 = step(pointCloudExpand_progress, 1.0 - pointCl
535
622
  pointCloudExpand_sizeBasis = mix(0.1 * step(abs(pointCloudExpand_noise), 0.5 / pointCloudExpand_boundingRadius), pointCloudExpand_sizeBasis, pointCloudExpand_progress2);
536
623
  gl_PointSize = gl_PointSize * pointCloudExpand_sizeScale + pointCloudExpand_sizeBasis;
537
624
  vPointSize = gl_PointSize;
538
- `, nn = (
625
+ `, an = (
539
626
  /** @class */
540
627
  (function(i) {
541
- S(e, i);
628
+ B(e, i);
542
629
  function e() {
543
630
  return i.call(this, {
544
631
  type: ["pointcloud"],
545
632
  vertex: {
546
- mainBefore: L,
547
- mainEnd: G
633
+ mainBefore: G,
634
+ mainEnd: q
548
635
  },
549
636
  uniforms: {
550
- pointCloudExpand_progress: new r.Uniform(0)
637
+ pointCloudExpand_progress: new u.Uniform(0)
551
638
  }
552
639
  }) || this;
553
640
  }
@@ -561,8 +648,115 @@ vPointSize = gl_PointSize;
561
648
  enumerable: !1,
562
649
  configurable: !0
563
650
  }), e;
564
- })(C)
565
- ), j = `
651
+ })(_)
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" });
655
+ function $(i) {
656
+ let e;
657
+ try {
658
+ if (e = U && (self.URL || self.webkitURL).createObjectURL(U), !e) throw "";
659
+ const n = new Worker(e, {
660
+ name: i == null ? void 0 : i.name
661
+ });
662
+ return n.addEventListener("error", () => {
663
+ (self.URL || self.webkitURL).revokeObjectURL(e);
664
+ }), n;
665
+ } catch (n) {
666
+ return new Worker(
667
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(A),
668
+ {
669
+ name: i == null ? void 0 : i.name
670
+ }
671
+ );
672
+ }
673
+ }
674
+ var Y = (
675
+ /** @class */
676
+ (function() {
677
+ function i(e, n) {
678
+ this.disposed = !1, this.pool = n, this.workerCreator = e, this.queue = [], this.workers = [], this.workerResolvers = [], this.workerStatus = 0;
679
+ }
680
+ return i.prototype.setWorkerCreator = function(e) {
681
+ this.workerCreator = e;
682
+ }, i.prototype.initWorker = function(e) {
683
+ if (!this.workerCreator)
684
+ throw new Error("workerCreator is not defined");
685
+ if (!this.workers[e]) {
686
+ var n = this.workerCreator(e);
687
+ n.addEventListener("message", this.onMessage.bind(this, e)), this.workers[e] = n;
688
+ }
689
+ }, i.prototype.getIdleWorker = function() {
690
+ for (var e = 0; e < this.pool; e++)
691
+ if (!(this.workerStatus & 1 << e))
692
+ return e;
693
+ return -1;
694
+ }, i.prototype.onMessage = function(e, n) {
695
+ var o = this.workerResolvers[e];
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);
699
+ } else
700
+ this.workerStatus ^= 1 << e;
701
+ }, i.prototype.postMessage = function(e, n) {
702
+ var o = this;
703
+ return n === void 0 && (n = []), new Promise(function(t, r) {
704
+ if (o.disposed) {
705
+ r(new Error("disposed"));
706
+ return;
707
+ }
708
+ var s = o.getIdleWorker();
709
+ s !== -1 ? (o.initWorker(s), o.workerStatus |= 1 << s, o.workerResolvers[s] = { resolve: t, reject: r }, o.workers[s].postMessage(e, n)) : o.queue.push({ resolve: t, reject: r, input: e, transfer: n });
710
+ });
711
+ }, i.prototype.dispose = function() {
712
+ this.disposed = !0, this.workers.forEach(function(e) {
713
+ e.terminate();
714
+ }), this.workers.length = 0, this.workerResolvers.forEach(function(e) {
715
+ e == null || e.reject(new Error("disposed"));
716
+ }), this.workerResolvers.length = 0, this.queue.forEach(function(e) {
717
+ e.reject(new Error("disposed"));
718
+ }), this.queue.length = 0, this.workerStatus = 0;
719
+ }, i;
720
+ })()
721
+ );
722
+ function sn(i) {
723
+ if (i.length < 3)
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);
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++)
728
+ ;
729
+ if (s.lengthSq() < 1e-4)
730
+ throw new Error("All points are collinear, cannot compute normal");
731
+ s.normalize();
732
+ var c = new u.Vector3();
733
+ i.forEach(function(E) {
734
+ return c.add(E);
735
+ }), c.divideScalar(i.length);
736
+ var a = new u.Vector3(0, 1, 0), l = new u.Quaternion(), v = s.dot(a);
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);
740
+ } else {
741
+ var h = new u.Vector3().crossVectors(s, a).normalize(), m = Math.acos(v);
742
+ l.setFromAxisAngle(h, m);
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];
749
+ });
750
+ if (d.length > 0) {
751
+ var x = d[0], P = d[d.length - 1];
752
+ (x[0] !== P[0] || x[1] !== P[1]) && d.push([x[0], x[1]]);
753
+ }
754
+ return {
755
+ transformMatrix: g,
756
+ points2D: d
757
+ };
758
+ }
759
+ var Q = `
566
760
  uniform sampler2D polygonTexture;
567
761
 
568
762
  struct PolygonClipper {
@@ -576,7 +770,7 @@ vPointSize = gl_PointSize;
576
770
  #if NUM_POLYGON_CLIPPER > 0
577
771
  uniform PolygonClipper polygonClippers[NUM_POLYGON_CLIPPER];
578
772
  #endif
579
- `, $ = `
773
+ `, K = `
580
774
 
581
775
  for(int i = 0; i < NUM_POLYGON_CLIPPER; i++){
582
776
  PolygonClipper polygonClipper = polygonClippers[i];
@@ -646,11 +840,11 @@ vPointSize = gl_PointSize;
646
840
  }
647
841
  }
648
842
 
649
- `, q = (
843
+ `, Z = (
650
844
  /** @class */
651
845
  (function() {
652
846
  function i() {
653
- this.canvasCache = /* @__PURE__ */ new Map(), this.canvas = document.createElement("canvas"), this.canvas.width = 512, this.canvas.height = 512, this.polygonTexture = new r.CanvasTexture(this.canvas), this.polygonCount = 0;
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;
654
848
  }
655
849
  return i.prototype.setSize = function(e) {
656
850
  this.canvas.width = e, this.canvas.height = e;
@@ -658,120 +852,153 @@ vPointSize = gl_PointSize;
658
852
  var n = JSON.stringify(e);
659
853
  if (this.canvasCache.has(n))
660
854
  return this.canvasCache.get(n);
661
- var t = document.createElement("canvas");
662
- t.width = this.canvas.width, t.height = this.canvas.height;
663
- var o = t.getContext("2d");
664
- if (!o)
855
+ var o = document.createElement("canvas");
856
+ o.width = this.canvas.width, o.height = this.canvas.height;
857
+ var t = o.getContext("2d");
858
+ if (!t)
665
859
  throw new Error("Failed to get canvas context");
666
860
  if (this.polygonCount >= 24)
667
861
  throw new Error("polygon count exceed 24, please clear the canvas");
668
- o.clearRect(0, 0, this.canvas.width, this.canvas.height), o.fillStyle = "rgba(0,0,0,1.0)", o.beginPath();
669
- var l = e[0][0], m = e[0][0], v = e[0][1], u = e[0][1];
670
- e.forEach(function(s) {
671
- var d = s[0], f = s[1];
672
- l = Math.min(l, d), m = Math.max(m, d), v = Math.min(v, f), u = Math.max(u, f);
862
+ 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);
673
867
  });
674
- var p = m - l, a = u - v, g = this.canvas.width, x = p >= a ? g / p : g / a, c = e.map(function(s) {
675
- var d = s[0] - l, f = s[1] - v;
676
- return [d, f];
677
- }), h = c.map(function(s) {
678
- return [s[0] * x, s[1] * x];
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;
870
+ return [g, d];
871
+ }), y = m.map(function(f) {
872
+ return [f[0] * h, f[1] * h];
679
873
  });
680
- return h.forEach(function(s, d) {
681
- var f = s[0], y = s[1];
682
- d === 0 ? o.moveTo(f, y) : o.lineTo(f, y);
683
- }), o.closePath(), o.fill(), this.polygonCount++, this.canvasCache.set(n, t), t;
874
+ return y.forEach(function(f, g) {
875
+ var d = f[0], x = f[1];
876
+ g === 0 ? t.moveTo(d, x) : t.lineTo(d, x);
877
+ }), t.closePath(), t.fill(), this.polygonCount++, this.canvasCache.set(n, o), o;
684
878
  }, i.generatePolygonGeometry = function(e, n) {
685
- for (var t = new r.BufferGeometry(), o = e.slice(0, -1), l = o.map(function(g) {
686
- return [g[0], 0, g[1]];
687
- }), m = o.map(function(g) {
688
- return [g[0], n, g[1]];
689
- }), v = U(U([], l, !0), m, !0), u = o.length, p = [], a = 1; a < u - 1; a++)
690
- p.push(0, a, a + 1);
691
- for (var a = 1; a < u - 1; a++)
692
- p.push(u, u + a, u + a + 1);
693
- for (var a = 0; a < u - 1; a++)
694
- p.push(a, a + 1, u + a), p.push(a + 1, a + 1 + u, u + a);
695
- return t.setAttribute("position", new r.Float32BufferAttribute(v.flat(), 3)), t.setIndex(p), t.computeVertexNormals(), t;
879
+ for (var o = new u.BufferGeometry(), t = e.slice(0, -1), r = t.map(function(h) {
880
+ return [h[0], 0, h[1]];
881
+ }), s = t.map(function(h) {
882
+ 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);
890
+ }
891
+ return o.setAttribute("position", new u.Float32BufferAttribute(p.flat(), 3)), o.setIndex(a), o.computeVertexNormals(), o;
696
892
  }, i.prototype.generatePolygonTexture = function(e) {
697
893
  var n = this.canvas.getContext("2d", {
698
894
  willReadFrequently: !0
699
895
  });
700
896
  if (!n)
701
897
  throw new Error("Failed to get canvas context");
702
- for (var t = n.createImageData(this.canvas.width, this.canvas.height), o = 0; o < this.canvas.width; o++)
703
- for (var l = 0; l < this.canvas.height; l++) {
704
- for (var m = 0, v = 0, u = 0, p = 0; p < e.length; p++) {
705
- var a = e[p].getContext("2d", { willReadFrequently: !0 });
706
- if (!a)
898
+ for (var o = n.createImageData(this.canvas.width, this.canvas.height), t = 0; t < this.canvas.width; t++)
899
+ 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)
707
903
  throw new Error("Failed to get canvas context");
708
- var g = a.getImageData(o, l, 1, 1).data;
709
- if (g[3] === 255) {
710
- var x = p % 8, c = Math.floor(p / 8);
711
- c === 0 ? m = m | 1 << x : c === 1 ? v = v | 1 << x : c === 2 && (u = u | 1 << x);
904
+ var v = l.getImageData(t, r, 1, 1).data;
905
+ if (v[3] === 255) {
906
+ 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);
712
908
  }
713
909
  }
714
- var h = (o + l * this.canvas.width) * 4;
715
- t.data[h] = m, t.data[h + 1] = v, t.data[h + 2] = u, t.data[h + 3] = 255;
910
+ 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;
716
912
  }
717
- return n.putImageData(t, 0, 0), new r.CanvasTexture(this.canvas);
913
+ return n.putImageData(o, 0, 0), new u.CanvasTexture(this.canvas);
718
914
  }, i;
719
915
  })()
720
- ), b = new q(), en = (
916
+ ), ln = (
721
917
  /** @class */
722
918
  (function(i) {
723
- S(e, i);
724
- function e() {
725
- var n = i.call(this, {
919
+ B(e, i);
920
+ function e(n) {
921
+ n === void 0 && (n = 512);
922
+ var o = i.call(this, {
726
923
  type: ["basic", "phong", "pointcloud"],
727
924
  fragment: {
728
- mainBefore: j,
729
- mainEnd: $
925
+ mainBefore: Q,
926
+ mainEnd: K
730
927
  },
731
928
  uniforms: {
732
- polygonClippers: new r.Uniform([]),
733
- polygonTexture: new r.Uniform(null)
929
+ polygonClippers: new u.Uniform([]),
930
+ polygonTexture: new u.Uniform(null)
734
931
  }
735
932
  }) || this;
736
- return n._polygonClippers = [], n._radio = 512, n;
933
+ return o._polygonClippers = [], o.polygonGenerater = new Z(), o._radio = 512, o.radio = n, o.workerPool = new Y(function() {
934
+ return new $();
935
+ }, 1), o;
737
936
  }
738
- return Object.defineProperty(e.prototype, "polygonClippers", {
937
+ 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) {
942
+ case 0:
943
+ 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);
948
+ });
949
+ var E = new u.Vector2(g, x), w = d - g >= P - x ? d - g : P - x;
950
+ return {
951
+ polygonTransformInverse: h,
952
+ polygonHeight: m,
953
+ minPos: E,
954
+ polygonScale: w,
955
+ cutOutSide: y
956
+ };
957
+ }), t = n.map(function(v) {
958
+ return {
959
+ polygon: v.polygon,
960
+ width: a.polygonGenerater.canvas.width,
961
+ height: a.polygonGenerater.canvas.height
962
+ };
963
+ }), [4, this.workerPool.postMessage({
964
+ canvasDataList: t,
965
+ width: this.polygonGenerater.canvas.width,
966
+ height: this.polygonGenerater.canvas.height
967
+ })];
968
+ 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), [
970
+ 2
971
+ /*return*/
972
+ ];
973
+ }
974
+ });
975
+ });
976
+ }, Object.defineProperty(e.prototype, "polygonClippers", {
739
977
  get: function() {
740
978
  return this._polygonClippers;
741
979
  },
742
980
  set: function(n) {
743
981
  this._polygonClippers = n;
744
- var t = this.uniforms;
745
- t.polygonClippers.value = n.map(function(p) {
746
- var a = new r.Matrix4().getInverse(p.polygonTransform), g = p.polygonHeight, x = p.cutOutSide, c = p.polygon, h = c[0][0], s = c[0][0], d = c[0][1], f = c[0][1];
747
- c.forEach(function(_) {
748
- var P = _[0], w = _[1];
749
- h = Math.min(h, P), s = Math.max(s, P), d = Math.min(d, w), f = Math.max(f, w);
750
- });
751
- var y = new r.Vector2(h, d), E = s - h >= f - d ? s - h : f - d;
752
- return {
753
- polygonTransformInverse: a,
754
- polygonHeight: g,
755
- minPos: y,
756
- polygonScale: E,
757
- cutOutSide: x
758
- };
759
- });
760
- for (var o = [], l = 0; l < n.length; l++) {
761
- var m = n[l].polygon, v = b.generatePolygonCanvas(m);
762
- o.push(v);
763
- }
764
- var u = b.generatePolygonTexture(o);
765
- this.uniforms.polygonTexture.value = u, this.needsUpdate = !0;
766
982
  },
767
983
  enumerable: !1,
768
984
  configurable: !0
769
- }), e.prototype.onBeforeCompile = function(n, t) {
770
- var o = String(this.polygonClippers.length);
771
- n.vertexShader = n.vertexShader.replace(/NUM_POLYGON_CLIPPER/g, o), n.fragmentShader = n.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g, o);
985
+ }), Object.defineProperty(e.prototype, "radio", {
986
+ get: function() {
987
+ return this._radio;
988
+ },
989
+ set: function(n) {
990
+ this._radio = n, this.polygonGenerater.setSize(n);
991
+ },
992
+ enumerable: !1,
993
+ configurable: !0
994
+ }), e.prototype.dispose = function() {
995
+ this.workerPool.dispose();
996
+ }, e.prototype.onBeforeCompile = function(n, o) {
997
+ var t = String(this.polygonClippers.length);
998
+ n.vertexShader = n.vertexShader.replace(/NUM_POLYGON_CLIPPER/g, t), n.fragmentShader = n.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g, t);
772
999
  }, e;
773
- })(C)
774
- ), k = `
1000
+ })(_)
1001
+ ), X = `
775
1002
  #if NUM_SHINE_OBJECTS > 0
776
1003
  uniform float shineProgress;
777
1004
  struct SHINE_OBJECT {
@@ -780,7 +1007,7 @@ vPointSize = gl_PointSize;
780
1007
  };
781
1008
  uniform SHINE_OBJECT shineBoxes[NUM_SHINE_OBJECTS];
782
1009
  #endif
783
- `, Y = `
1010
+ `, nn = `
784
1011
  #if NUM_SHINE_OBJECTS > 0
785
1012
  #pragma unroll_loop_start
786
1013
  for ( int i = 0; i < NUM_SHINE_OBJECTS; i ++ ) {
@@ -796,21 +1023,21 @@ vPointSize = gl_PointSize;
796
1023
  }
797
1024
  #pragma unroll_loop_end
798
1025
  #endif
799
- `, K = "", on = (
1026
+ `, en = "", un = (
800
1027
  /** @class */
801
1028
  (function(i) {
802
- S(e, i);
1029
+ B(e, i);
803
1030
  function e() {
804
1031
  var n = i.call(this, {
805
1032
  type: ["basic", "phong", "none"],
806
1033
  fragment: {
807
- mainBefore: k,
808
- mainStart: K,
809
- mainEnd: Y
1034
+ mainBefore: X,
1035
+ mainStart: en,
1036
+ mainEnd: nn
810
1037
  },
811
1038
  uniforms: {
812
- shineProgress: new r.Uniform(0),
813
- shineBoxes: new r.Uniform([])
1039
+ shineProgress: new u.Uniform(0),
1040
+ shineBoxes: new u.Uniform([])
814
1041
  },
815
1042
  defines: {
816
1043
  NUM_SHINE_OBJECTS: 0
@@ -821,24 +1048,25 @@ vPointSize = gl_PointSize;
821
1048
  get: function() {
822
1049
  return this.uniforms.shineBoxes.value;
823
1050
  },
824
- set: function(t) {
825
- var o = t.length;
826
- o > 0 && (this.defines.NUM_SHINE_OBJECTS = o, this.uniforms.shineBoxes.value = t);
1051
+ set: function(o) {
1052
+ var t = o.length;
1053
+ t > 0 && (this.defines.NUM_SHINE_OBJECTS = t, this.uniforms.shineBoxes.value = o);
827
1054
  }
828
1055
  }
829
1056
  }), n.shineBoxes = [], n;
830
1057
  }
831
- return e.prototype.onBeforeCompile = function(n, t) {
832
- var o = String(this.shineBoxes.length);
833
- n.vertexShader = n.vertexShader.replace(/NUM_SHINE_OBJECTS/g, o), n.fragmentShader = n.fragmentShader.replace(/NUM_SHINE_OBJECTS/g, o);
1058
+ return e.prototype.onBeforeCompile = function(n, o) {
1059
+ var t = String(this.shineBoxes.length);
1060
+ n.vertexShader = n.vertexShader.replace(/NUM_SHINE_OBJECTS/g, t), n.fragmentShader = n.fragmentShader.replace(/NUM_SHINE_OBJECTS/g, t);
834
1061
  }, e;
835
- })(C)
1062
+ })(_)
836
1063
  );
837
1064
  export {
838
- Z as EvenessPlaneShader,
839
- nn as PointCloudExpandShader,
840
- en as PolygonCuterShader,
841
- q as PolygonGenerater,
842
- on as ShineModelShader,
843
- X as SweepModelShader
1065
+ tn as EvenessPlaneShader,
1066
+ an as PointCloudExpandShader,
1067
+ ln as PolygonCuterShader,
1068
+ Z as PolygonGenerater,
1069
+ un as ShineModelShader,
1070
+ rn as SweepModelShader,
1071
+ sn as computeAlignmentMatrix
844
1072
  };