@realsee/five 6.7.0-alpha.19 → 6.7.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.AnimationFrameLoop.html +1 -1
- package/docs/classes/five.Five.html +48 -38
- package/docs/classes/five.FivePass.html +20 -0
- package/docs/classes/five.FullScreenQuad.html +7 -0
- package/docs/classes/five.Model.html +1 -1
- package/docs/classes/five.ModelScene.html +1 -1
- package/docs/classes/five.PBMContainer.html +1 -1
- package/docs/classes/five.PBMGroup.html +1 -1
- package/docs/classes/five.PBMMesh.html +1 -1
- package/docs/classes/five.PBMMeshMaterial.html +1 -1
- package/docs/classes/five.PBMPointCloud.html +1 -1
- package/docs/classes/five.PBMPointCloudMaterial.html +1 -1
- package/docs/classes/five.PBMSkinnedMesh.html +1 -1
- package/docs/classes/five.Parameter.html +1 -1
- package/docs/classes/five.Pass.html +11 -0
- package/docs/classes/five.Tile3D.html +1 -1
- package/docs/classes/five.TileNode.html +1 -1
- package/docs/classes/five.TrajectoryNode.html +1 -1
- package/docs/classes/five.WorkResolvedObserver.html +1 -1
- package/docs/classes/gltf-loader.DDSLoader.html +1 -1
- package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
- package/docs/classes/gltf-loader.GLTFObject.html +1 -1
- package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
- package/docs/classes/line.LineGeometry.html +1 -1
- package/docs/classes/line.LineMaterial.html +1 -1
- package/docs/classes/line.LineSegmentsGeometry.html +1 -1
- package/docs/classes/line.THREE_Line2.html +1 -1
- package/docs/classes/line.THREE_LineSegments2.html +1 -1
- package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
- package/docs/classes/vfx.Airflow.html +1 -1
- package/docs/classes/vfx.Flame.html +1 -1
- package/docs/classes/vfx.Particle.html +1 -1
- package/docs/classes/vfx.ParticleGPU.html +1 -1
- package/docs/classes/vfx.SpotLight.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/five.EventCallback.html +1 -1
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +1 -1
- package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PBMMaterial.html +1 -1
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ParameterMaterialValue.html +1 -1
- package/docs/interfaces/five.ParameterTilesetValue.html +1 -1
- package/docs/interfaces/five.ParameterValue.html +1 -1
- package/docs/interfaces/five.ResolvedParameterValue.html +1 -1
- package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/five.ViewLayer.html +1 -1
- package/docs/interfaces/five.WorkCubeImage.html +1 -1
- package/docs/interfaces/five.WorkImage.html +1 -1
- package/docs/interfaces/five.WorkObserver.html +1 -1
- package/docs/interfaces/five.WorkTile.html +1 -1
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
- package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
- package/docs/interfaces/plugins.ItemMaskController.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
- package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
- package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
- package/docs/interfaces/plugins.TrajectoryController.html +1 -1
- package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
- package/docs/modules/five.html +1 -1
- package/docs/types/five.ParseOptions.html +1 -1
- package/five/index.d.ts +71 -0
- package/five/index.js +63 -41
- package/five/index.mjs +983 -790
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +1 -1
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.js +9 -9
- package/shader-lib/index.mjs +203 -203
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +2 -2
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +7 -7
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +63 -41
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
package/shader-lib/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 11/
|
|
5
|
-
* Version: 6.7.0-alpha.
|
|
4
|
+
* Generated: 11/28/2025
|
|
5
|
+
* Version: 6.7.0-alpha.20
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -253,52 +253,52 @@
|
|
|
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
255
|
*/import { CustomShader as _ } from "@realsee/five";
|
|
256
|
-
import * as
|
|
257
|
-
var b = function(i,
|
|
258
|
-
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
259
|
-
|
|
260
|
-
} || function(
|
|
261
|
-
for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (
|
|
262
|
-
}, b(i,
|
|
256
|
+
import * as l from "three";
|
|
257
|
+
var b = function(i, n) {
|
|
258
|
+
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, o) {
|
|
259
|
+
e.__proto__ = o;
|
|
260
|
+
} || function(e, o) {
|
|
261
|
+
for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (e[t] = o[t]);
|
|
262
|
+
}, b(i, n);
|
|
263
263
|
};
|
|
264
|
-
function
|
|
265
|
-
if (typeof
|
|
266
|
-
throw new TypeError("Class extends value " + String(
|
|
267
|
-
b(i,
|
|
268
|
-
function
|
|
264
|
+
function F(i, n) {
|
|
265
|
+
if (typeof n != "function" && n !== null)
|
|
266
|
+
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
267
|
+
b(i, n);
|
|
268
|
+
function e() {
|
|
269
269
|
this.constructor = i;
|
|
270
270
|
}
|
|
271
|
-
i.prototype =
|
|
271
|
+
i.prototype = n === null ? Object.create(n) : (e.prototype = n.prototype, new e());
|
|
272
272
|
}
|
|
273
|
-
function k(i,
|
|
273
|
+
function k(i, n, e, o) {
|
|
274
274
|
function t(r) {
|
|
275
|
-
return r instanceof
|
|
275
|
+
return r instanceof e ? r : new e(function(s) {
|
|
276
276
|
s(r);
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
return new (
|
|
280
|
-
function p(
|
|
279
|
+
return new (e || (e = Promise))(function(r, s) {
|
|
280
|
+
function p(u) {
|
|
281
281
|
try {
|
|
282
|
-
a(o.next(
|
|
282
|
+
a(o.next(u));
|
|
283
283
|
} catch (v) {
|
|
284
284
|
s(v);
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
function c(
|
|
287
|
+
function c(u) {
|
|
288
288
|
try {
|
|
289
|
-
a(o.throw(
|
|
289
|
+
a(o.throw(u));
|
|
290
290
|
} catch (v) {
|
|
291
291
|
s(v);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
function a(
|
|
295
|
-
|
|
294
|
+
function a(u) {
|
|
295
|
+
u.done ? r(u.value) : t(u.value).then(p, c);
|
|
296
296
|
}
|
|
297
|
-
a((o = o.apply(i,
|
|
297
|
+
a((o = o.apply(i, n || [])).next());
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
function I(i,
|
|
301
|
-
var
|
|
300
|
+
function I(i, n) {
|
|
301
|
+
var e = { 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);
|
|
@@ -306,13 +306,13 @@ function I(i, e) {
|
|
|
306
306
|
return this;
|
|
307
307
|
}), s;
|
|
308
308
|
function p(a) {
|
|
309
|
-
return function(
|
|
310
|
-
return c([a,
|
|
309
|
+
return function(u) {
|
|
310
|
+
return c([a, u]);
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
function c(a) {
|
|
314
314
|
if (o) throw new TypeError("Generator is already executing.");
|
|
315
|
-
for (; s && (s = 0, a[0] && (
|
|
315
|
+
for (; s && (s = 0, a[0] && (e = 0)), e; ) try {
|
|
316
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
317
|
switch (t = 0, r && (a = [a[0] & 2, r.value]), a[0]) {
|
|
318
318
|
case 0:
|
|
@@ -320,36 +320,36 @@ function I(i, e) {
|
|
|
320
320
|
r = a;
|
|
321
321
|
break;
|
|
322
322
|
case 4:
|
|
323
|
-
return
|
|
323
|
+
return e.label++, { value: a[1], done: !1 };
|
|
324
324
|
case 5:
|
|
325
|
-
|
|
325
|
+
e.label++, t = a[1], a = [0];
|
|
326
326
|
continue;
|
|
327
327
|
case 7:
|
|
328
|
-
a =
|
|
328
|
+
a = e.ops.pop(), e.trys.pop();
|
|
329
329
|
continue;
|
|
330
330
|
default:
|
|
331
|
-
if (r =
|
|
332
|
-
|
|
331
|
+
if (r = e.trys, !(r = r.length > 0 && r[r.length - 1]) && (a[0] === 6 || a[0] === 2)) {
|
|
332
|
+
e = 0;
|
|
333
333
|
continue;
|
|
334
334
|
}
|
|
335
335
|
if (a[0] === 3 && (!r || a[1] > r[0] && a[1] < r[3])) {
|
|
336
|
-
|
|
336
|
+
e.label = a[1];
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
|
-
if (a[0] === 6 &&
|
|
340
|
-
|
|
339
|
+
if (a[0] === 6 && e.label < r[1]) {
|
|
340
|
+
e.label = r[1], r = a;
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
|
-
if (r &&
|
|
344
|
-
|
|
343
|
+
if (r && e.label < r[2]) {
|
|
344
|
+
e.label = r[2], e.ops.push(a);
|
|
345
345
|
break;
|
|
346
346
|
}
|
|
347
|
-
r[2] &&
|
|
347
|
+
r[2] && e.ops.pop(), e.trys.pop();
|
|
348
348
|
continue;
|
|
349
349
|
}
|
|
350
|
-
a =
|
|
351
|
-
} catch (
|
|
352
|
-
a = [6,
|
|
350
|
+
a = n.call(i, e);
|
|
351
|
+
} catch (u) {
|
|
352
|
+
a = [6, u], t = 0;
|
|
353
353
|
} finally {
|
|
354
354
|
o = r = 0;
|
|
355
355
|
}
|
|
@@ -357,10 +357,10 @@ function I(i, e) {
|
|
|
357
357
|
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function T(i,
|
|
361
|
-
if (
|
|
362
|
-
(r || !(o in
|
|
363
|
-
return i.concat(r || Array.prototype.slice.call(
|
|
360
|
+
function T(i, n, e) {
|
|
361
|
+
if (e || arguments.length === 2) for (var o = 0, t = n.length, r; o < t; o++)
|
|
362
|
+
(r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
|
|
363
|
+
return i.concat(r || Array.prototype.slice.call(n));
|
|
364
364
|
}
|
|
365
365
|
var R = `
|
|
366
366
|
#if defined(USE_PLANE_DISTANCE)
|
|
@@ -401,21 +401,21 @@ var R = `
|
|
|
401
401
|
mainEnd: V
|
|
402
402
|
},
|
|
403
403
|
uniforms: {
|
|
404
|
-
evennessPlaneNormal: new
|
|
405
|
-
evennessPlaneConstant: new
|
|
406
|
-
evennessPlanes: new
|
|
407
|
-
evennessPlaneDepth: new
|
|
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
|
|
411
411
|
}
|
|
412
|
-
},
|
|
412
|
+
}, te = (
|
|
413
413
|
/** @class */
|
|
414
414
|
(function(i) {
|
|
415
|
-
|
|
416
|
-
function
|
|
417
|
-
var
|
|
418
|
-
return Object.defineProperties(
|
|
415
|
+
F(n, i);
|
|
416
|
+
function n() {
|
|
417
|
+
var e = i.call(this, L) || this;
|
|
418
|
+
return Object.defineProperties(e, {
|
|
419
419
|
evennessPlane: {
|
|
420
420
|
get: function() {
|
|
421
421
|
return {
|
|
@@ -427,7 +427,7 @@ 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],
|
|
430
|
+
var p = t[0], c = t[1], a = t[2], u = t[3], v = new l.Vector3().subVectors(c, p), h = new l.Vector3().subVectors(a, p), m = new l.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)), B = u.clone().add(m.clone().negate().multiplyScalar(f)), C = u.clone().add(m.clone().multiplyScalar(f)), S = new l.Plane().setFromCoplanarPoints(d, P, w), M = new l.Plane().setFromCoplanarPoints(E, x, g), z = new l.Plane().setFromCoplanarPoints(P, d, g), N = new l.Plane().setFromCoplanarPoints(B, C, w), O = new l.Plane().setFromCoplanarPoints(w, P, x), D = new l.Plane().setFromCoplanarPoints(g, d, C);
|
|
431
431
|
this.uniforms.evennessPlanes.value = [
|
|
432
432
|
{ normal: S.normal, constant: S.constant },
|
|
433
433
|
{ normal: M.normal, constant: M.constant },
|
|
@@ -440,12 +440,12 @@ var R = `
|
|
|
440
440
|
this.defines.USE_PLANE_DISTANCE = s, this.needsUpdate = !0;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
}),
|
|
443
|
+
}), e.evennessPlane = {
|
|
444
444
|
depth: 0,
|
|
445
445
|
points: []
|
|
446
|
-
},
|
|
446
|
+
}, e;
|
|
447
447
|
}
|
|
448
|
-
return
|
|
448
|
+
return n;
|
|
449
449
|
})(_)
|
|
450
450
|
), j = `
|
|
451
451
|
#if NUM_SWEEP_OBJECTS > 0
|
|
@@ -493,12 +493,12 @@ var R = `
|
|
|
493
493
|
}
|
|
494
494
|
#pragma unroll_loop_end
|
|
495
495
|
#endif
|
|
496
|
-
`, H = "",
|
|
496
|
+
`, H = "", re = (
|
|
497
497
|
/** @class */
|
|
498
498
|
(function(i) {
|
|
499
|
-
|
|
500
|
-
function
|
|
501
|
-
var
|
|
499
|
+
F(n, i);
|
|
500
|
+
function n() {
|
|
501
|
+
var e = i.call(this, {
|
|
502
502
|
type: ["basic", "phong", "pointcloud"],
|
|
503
503
|
fragment: {
|
|
504
504
|
mainBefore: j,
|
|
@@ -506,19 +506,19 @@ var R = `
|
|
|
506
506
|
mainEnd: J
|
|
507
507
|
},
|
|
508
508
|
uniforms: {
|
|
509
|
-
sweepProgress: new
|
|
510
|
-
sweepRange: new
|
|
511
|
-
sweepBoxs: new
|
|
512
|
-
interval: new
|
|
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
|
|
514
|
+
threshold: new l.Uniform(2e-3)
|
|
515
515
|
// 线宽
|
|
516
516
|
},
|
|
517
517
|
defines: {
|
|
518
518
|
NUM_SWEEP_OBJECTS: 0
|
|
519
519
|
}
|
|
520
520
|
}) || this;
|
|
521
|
-
return Object.defineProperties(
|
|
521
|
+
return Object.defineProperties(e, {
|
|
522
522
|
sweepBoxs: {
|
|
523
523
|
get: function() {
|
|
524
524
|
return this.uniforms.sweepBoxs.value;
|
|
@@ -528,12 +528,12 @@ var R = `
|
|
|
528
528
|
t > 0 && (this.defines.NUM_SWEEP_OBJECTS = t, this.needsUpdate = !0, this.uniforms.sweepBoxs.value = o);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
}),
|
|
531
|
+
}), e.sweepBoxs = [], e;
|
|
532
532
|
}
|
|
533
|
-
return
|
|
533
|
+
return n.prototype.onBeforeCompile = function(e, o) {
|
|
534
534
|
var t = String(this.sweepBoxs.length);
|
|
535
|
-
|
|
536
|
-
},
|
|
535
|
+
e.vertexShader = e.vertexShader.replace(/NUM_SWEEP_OBJECTS/g, t), e.fragmentShader = e.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g, t);
|
|
536
|
+
}, n;
|
|
537
537
|
})(_)
|
|
538
538
|
), G = `
|
|
539
539
|
uniform float pointCloudExpand_progress;
|
|
@@ -622,11 +622,11 @@ float pointCloudExpand_progress2 = step(pointCloudExpand_progress, 1.0 - pointCl
|
|
|
622
622
|
pointCloudExpand_sizeBasis = mix(0.1 * step(abs(pointCloudExpand_noise), 0.5 / pointCloudExpand_boundingRadius), pointCloudExpand_sizeBasis, pointCloudExpand_progress2);
|
|
623
623
|
gl_PointSize = gl_PointSize * pointCloudExpand_sizeScale + pointCloudExpand_sizeBasis;
|
|
624
624
|
vPointSize = gl_PointSize;
|
|
625
|
-
`,
|
|
625
|
+
`, ae = (
|
|
626
626
|
/** @class */
|
|
627
627
|
(function(i) {
|
|
628
|
-
|
|
629
|
-
function
|
|
628
|
+
F(n, i);
|
|
629
|
+
function n() {
|
|
630
630
|
return i.call(this, {
|
|
631
631
|
type: ["pointcloud"],
|
|
632
632
|
vertex: {
|
|
@@ -634,35 +634,35 @@ vPointSize = gl_PointSize;
|
|
|
634
634
|
mainEnd: q
|
|
635
635
|
},
|
|
636
636
|
uniforms: {
|
|
637
|
-
pointCloudExpand_progress: new
|
|
637
|
+
pointCloudExpand_progress: new l.Uniform(0)
|
|
638
638
|
}
|
|
639
639
|
}) || this;
|
|
640
640
|
}
|
|
641
|
-
return Object.defineProperty(
|
|
641
|
+
return Object.defineProperty(n.prototype, "progress", {
|
|
642
642
|
get: function() {
|
|
643
643
|
return this.uniforms.pointCloudExpand_progress.value;
|
|
644
644
|
},
|
|
645
|
-
set: function(
|
|
646
|
-
this.uniforms.pointCloudExpand_progress.value =
|
|
645
|
+
set: function(e) {
|
|
646
|
+
this.uniforms.pointCloudExpand_progress.value = e;
|
|
647
647
|
},
|
|
648
648
|
enumerable: !1,
|
|
649
649
|
configurable: !0
|
|
650
|
-
}),
|
|
650
|
+
}), n;
|
|
651
651
|
})(_)
|
|
652
652
|
);
|
|
653
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
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
655
|
function $(i) {
|
|
656
|
-
let
|
|
656
|
+
let n;
|
|
657
657
|
try {
|
|
658
|
-
if (
|
|
659
|
-
const
|
|
658
|
+
if (n = U && (self.URL || self.webkitURL).createObjectURL(U), !n) throw "";
|
|
659
|
+
const e = new Worker(n, {
|
|
660
660
|
name: i == null ? void 0 : i.name
|
|
661
661
|
});
|
|
662
|
-
return
|
|
663
|
-
(self.URL || self.webkitURL).revokeObjectURL(
|
|
664
|
-
}),
|
|
665
|
-
} catch (
|
|
662
|
+
return e.addEventListener("error", () => {
|
|
663
|
+
(self.URL || self.webkitURL).revokeObjectURL(n);
|
|
664
|
+
}), e;
|
|
665
|
+
} catch (e) {
|
|
666
666
|
return new Worker(
|
|
667
667
|
"data:text/javascript;charset=utf-8," + encodeURIComponent(A),
|
|
668
668
|
{
|
|
@@ -674,74 +674,74 @@ function $(i) {
|
|
|
674
674
|
var Y = (
|
|
675
675
|
/** @class */
|
|
676
676
|
(function() {
|
|
677
|
-
function i(
|
|
678
|
-
this.disposed = !1, this.pool =
|
|
677
|
+
function i(n, e) {
|
|
678
|
+
this.disposed = !1, this.pool = e, this.workerCreator = n, this.queue = [], this.workers = [], this.workerResolvers = [], this.workerStatus = 0;
|
|
679
679
|
}
|
|
680
|
-
return i.prototype.setWorkerCreator = function(
|
|
681
|
-
this.workerCreator =
|
|
682
|
-
}, i.prototype.initWorker = function(
|
|
680
|
+
return i.prototype.setWorkerCreator = function(n) {
|
|
681
|
+
this.workerCreator = n;
|
|
682
|
+
}, i.prototype.initWorker = function(n) {
|
|
683
683
|
if (!this.workerCreator)
|
|
684
684
|
throw new Error("workerCreator is not defined");
|
|
685
|
-
if (!this.workers[
|
|
686
|
-
var
|
|
687
|
-
|
|
685
|
+
if (!this.workers[n]) {
|
|
686
|
+
var e = this.workerCreator(n);
|
|
687
|
+
e.addEventListener("message", this.onMessage.bind(this, n)), this.workers[n] = e;
|
|
688
688
|
}
|
|
689
689
|
}, i.prototype.getIdleWorker = function() {
|
|
690
|
-
for (var
|
|
691
|
-
if (!(this.workerStatus & 1 <<
|
|
692
|
-
return
|
|
690
|
+
for (var n = 0; n < this.pool; n++)
|
|
691
|
+
if (!(this.workerStatus & 1 << n))
|
|
692
|
+
return n;
|
|
693
693
|
return -1;
|
|
694
|
-
}, i.prototype.onMessage = function(
|
|
695
|
-
var o = this.workerResolvers[
|
|
696
|
-
if (
|
|
694
|
+
}, i.prototype.onMessage = function(n, e) {
|
|
695
|
+
var o = this.workerResolvers[n];
|
|
696
|
+
if (e.data && "$$error" in e.data ? o == null || o.reject(e.data.$$error) : o == null || o.resolve(e.data), this.workerResolvers[n] = void 0, this.queue.length) {
|
|
697
697
|
var t = this.queue.shift(), r = t.resolve, s = t.reject, p = t.input, c = t.transfer;
|
|
698
|
-
this.workerResolvers[
|
|
698
|
+
this.workerResolvers[n] = { resolve: r, reject: s }, this.workers[n].postMessage(p, c);
|
|
699
699
|
} else
|
|
700
|
-
this.workerStatus ^= 1 <<
|
|
701
|
-
}, i.prototype.postMessage = function(
|
|
700
|
+
this.workerStatus ^= 1 << n;
|
|
701
|
+
}, i.prototype.postMessage = function(n, e) {
|
|
702
702
|
var o = this;
|
|
703
|
-
return
|
|
703
|
+
return e === void 0 && (e = []), new Promise(function(t, r) {
|
|
704
704
|
if (o.disposed) {
|
|
705
705
|
r(new Error("disposed"));
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
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(
|
|
709
|
+
s !== -1 ? (o.initWorker(s), o.workerStatus |= 1 << s, o.workerResolvers[s] = { resolve: t, reject: r }, o.workers[s].postMessage(n, e)) : o.queue.push({ resolve: t, reject: r, input: n, transfer: e });
|
|
710
710
|
});
|
|
711
711
|
}, i.prototype.dispose = function() {
|
|
712
|
-
this.disposed = !0, this.workers.forEach(function(
|
|
713
|
-
|
|
714
|
-
}), this.workers.length = 0, this.workerResolvers.forEach(function(
|
|
715
|
-
|
|
716
|
-
}), this.workerResolvers.length = 0, this.queue.forEach(function(
|
|
717
|
-
|
|
712
|
+
this.disposed = !0, this.workers.forEach(function(n) {
|
|
713
|
+
n.terminate();
|
|
714
|
+
}), this.workers.length = 0, this.workerResolvers.forEach(function(n) {
|
|
715
|
+
n == null || n.reject(new Error("disposed"));
|
|
716
|
+
}), this.workerResolvers.length = 0, this.queue.forEach(function(n) {
|
|
717
|
+
n.reject(new Error("disposed"));
|
|
718
718
|
}), this.queue.length = 0, this.workerStatus = 0;
|
|
719
719
|
}, i;
|
|
720
720
|
})()
|
|
721
721
|
);
|
|
722
|
-
function
|
|
722
|
+
function ie(i) {
|
|
723
723
|
if (i.length < 3)
|
|
724
724
|
throw new Error("At least 3 points are required to compute alignment matrix");
|
|
725
|
-
var
|
|
725
|
+
var n = i[0], e = i[1], o = i[2], t = new l.Vector3().subVectors(e, n), r = new l.Vector3().subVectors(o, n), 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
|
|
727
|
+
for (var p = 3; p < i.length && (o = i[p], r = new l.Vector3().subVectors(o, n), s = new l.Vector3().crossVectors(t, r), !(s.lengthSq() >= 1e-4)); p++)
|
|
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
|
|
732
|
+
var c = new l.Vector3();
|
|
733
733
|
i.forEach(function(E) {
|
|
734
734
|
return c.add(E);
|
|
735
735
|
}), c.divideScalar(i.length);
|
|
736
|
-
var a = new
|
|
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
|
|
739
|
-
|
|
738
|
+
var h = new l.Vector3(1, 0, 0);
|
|
739
|
+
u.setFromAxisAngle(h, Math.PI);
|
|
740
740
|
} else {
|
|
741
|
-
var h = new
|
|
742
|
-
|
|
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
|
|
744
|
+
var y = new l.Matrix4().makeTranslation(-c.x, -c.y, -c.z), f = new l.Matrix4().makeRotationFromQuaternion(u), g = new l.Matrix4();
|
|
745
745
|
g.multiplyMatrices(f, y);
|
|
746
746
|
var d = i.map(function(E) {
|
|
747
747
|
var w = E.clone().applyMatrix4(g);
|
|
@@ -844,14 +844,14 @@ var Q = `
|
|
|
844
844
|
/** @class */
|
|
845
845
|
(function() {
|
|
846
846
|
function i() {
|
|
847
|
-
this.canvasCache = /* @__PURE__ */ new Map(), this.canvas = document.createElement("canvas"), this.canvas.width = 512, this.canvas.height = 512, this.polygonTexture = new
|
|
847
|
+
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
848
|
}
|
|
849
|
-
return i.prototype.setSize = function(
|
|
850
|
-
this.canvas.width =
|
|
851
|
-
}, i.prototype.generatePolygonCanvas = function(
|
|
852
|
-
var
|
|
853
|
-
if (this.canvasCache.has(
|
|
854
|
-
return this.canvasCache.get(
|
|
849
|
+
return i.prototype.setSize = function(n) {
|
|
850
|
+
this.canvas.width = n, this.canvas.height = n;
|
|
851
|
+
}, i.prototype.generatePolygonCanvas = function(n) {
|
|
852
|
+
var e = JSON.stringify(n);
|
|
853
|
+
if (this.canvasCache.has(e))
|
|
854
|
+
return this.canvasCache.get(e);
|
|
855
855
|
var o = document.createElement("canvas");
|
|
856
856
|
o.width = this.canvas.width, o.height = this.canvas.height;
|
|
857
857
|
var t = o.getContext("2d");
|
|
@@ -860,12 +860,12 @@ var Q = `
|
|
|
860
860
|
if (this.polygonCount >= 24)
|
|
861
861
|
throw new Error("polygon count exceed 24, please clear the canvas");
|
|
862
862
|
t.clearRect(0, 0, this.canvas.width, this.canvas.height), t.fillStyle = "rgba(0,0,0,1.0)", t.beginPath();
|
|
863
|
-
var r =
|
|
864
|
-
|
|
863
|
+
var r = n[0][0], s = n[0][0], p = n[0][1], c = n[0][1];
|
|
864
|
+
n.forEach(function(f) {
|
|
865
865
|
var g = f[0], d = f[1];
|
|
866
866
|
r = Math.min(r, g), s = Math.max(s, g), p = Math.min(p, d), c = Math.max(c, d);
|
|
867
867
|
});
|
|
868
|
-
var a = s - r,
|
|
868
|
+
var a = s - r, u = c - p, v = this.canvas.width, h = a >= u ? v / a : v / u, m = n.map(function(f) {
|
|
869
869
|
var g = f[0] - r, d = f[1] - p;
|
|
870
870
|
return [g, d];
|
|
871
871
|
}), y = m.map(function(f) {
|
|
@@ -874,34 +874,34 @@ var Q = `
|
|
|
874
874
|
return y.forEach(function(f, g) {
|
|
875
875
|
var d = f[0], x = f[1];
|
|
876
876
|
g === 0 ? t.moveTo(d, x) : t.lineTo(d, x);
|
|
877
|
-
}), t.closePath(), t.fill(), this.polygonCount++, this.canvasCache.set(
|
|
878
|
-
}, i.generatePolygonGeometry = function(
|
|
879
|
-
for (var o = new
|
|
877
|
+
}), t.closePath(), t.fill(), this.polygonCount++, this.canvasCache.set(e, o), o;
|
|
878
|
+
}, i.generatePolygonGeometry = function(n, e) {
|
|
879
|
+
for (var o = new l.BufferGeometry(), t = n.slice(0, -1), r = t.map(function(h) {
|
|
880
880
|
return [h[0], 0, h[1]];
|
|
881
881
|
}), s = t.map(function(h) {
|
|
882
|
-
return [h[0],
|
|
883
|
-
}), p = T(T([], r, !0), s, !0), c = t.length, a = [],
|
|
884
|
-
a.push(0,
|
|
885
|
-
for (var
|
|
886
|
-
a.push(c, c +
|
|
887
|
-
for (var
|
|
888
|
-
var v = (
|
|
889
|
-
a.push(
|
|
882
|
+
return [h[0], e, h[1]];
|
|
883
|
+
}), p = T(T([], r, !0), s, !0), c = t.length, a = [], u = 1; u < c - 1; u++)
|
|
884
|
+
a.push(0, u, u + 1);
|
|
885
|
+
for (var u = 1; u < c - 1; u++)
|
|
886
|
+
a.push(c, c + u, c + u + 1);
|
|
887
|
+
for (var u = 0; u < c; u++) {
|
|
888
|
+
var v = (u + 1) % c;
|
|
889
|
+
a.push(u, v, c + u), a.push(v, c + v, c + u);
|
|
890
890
|
}
|
|
891
|
-
return o.setAttribute("position", new
|
|
892
|
-
}, i.prototype.generatePolygonTexture = function(
|
|
893
|
-
var
|
|
891
|
+
return o.setAttribute("position", new l.Float32BufferAttribute(p.flat(), 3)), o.setIndex(a), o.computeVertexNormals(), o;
|
|
892
|
+
}, i.prototype.generatePolygonTexture = function(n) {
|
|
893
|
+
var e = this.canvas.getContext("2d", {
|
|
894
894
|
willReadFrequently: !0
|
|
895
895
|
});
|
|
896
|
-
if (!
|
|
896
|
+
if (!e)
|
|
897
897
|
throw new Error("Failed to get canvas context");
|
|
898
|
-
for (var o =
|
|
898
|
+
for (var o = e.createImageData(this.canvas.width, this.canvas.height), t = 0; t < this.canvas.width; t++)
|
|
899
899
|
for (var r = 0; r < this.canvas.height; r++) {
|
|
900
|
-
for (var s = 0, p = 0, c = 0, a = 0; a <
|
|
901
|
-
var
|
|
902
|
-
if (!
|
|
900
|
+
for (var s = 0, p = 0, c = 0, a = 0; a < n.length; a++) {
|
|
901
|
+
var u = n[a].getContext("2d", { willReadFrequently: !0 });
|
|
902
|
+
if (!u)
|
|
903
903
|
throw new Error("Failed to get canvas context");
|
|
904
|
-
var v =
|
|
904
|
+
var v = u.getImageData(t, r, 1, 1).data;
|
|
905
905
|
if (v[3] === 255) {
|
|
906
906
|
var h = a % 8, m = Math.floor(a / 8);
|
|
907
907
|
m === 0 ? s = s | 1 << h : m === 1 ? p = p | 1 << h : m === 2 && (c = c | 1 << h);
|
|
@@ -910,15 +910,15 @@ var Q = `
|
|
|
910
910
|
var y = (t + r * this.canvas.width) * 4;
|
|
911
911
|
o.data[y] = s, o.data[y + 1] = p, o.data[y + 2] = c, o.data[y + 3] = 255;
|
|
912
912
|
}
|
|
913
|
-
return
|
|
913
|
+
return e.putImageData(o, 0, 0), new l.CanvasTexture(this.canvas);
|
|
914
914
|
}, i;
|
|
915
915
|
})()
|
|
916
|
-
),
|
|
916
|
+
), se = (
|
|
917
917
|
/** @class */
|
|
918
918
|
(function(i) {
|
|
919
|
-
|
|
920
|
-
function e
|
|
921
|
-
|
|
919
|
+
F(n, i);
|
|
920
|
+
function n(e) {
|
|
921
|
+
e === void 0 && (e = 512);
|
|
922
922
|
var o = i.call(this, {
|
|
923
923
|
type: ["basic", "phong", "pointcloud"],
|
|
924
924
|
fragment: {
|
|
@@ -926,27 +926,27 @@ var Q = `
|
|
|
926
926
|
mainEnd: K
|
|
927
927
|
},
|
|
928
928
|
uniforms: {
|
|
929
|
-
polygonClippers: new
|
|
930
|
-
polygonTexture: new
|
|
929
|
+
polygonClippers: new l.Uniform([]),
|
|
930
|
+
polygonTexture: new l.Uniform(null)
|
|
931
931
|
}
|
|
932
932
|
}) || this;
|
|
933
|
-
return o._polygonClippers = [], o.polygonGenerater = new Z(), o._radio = 512, o.radio =
|
|
933
|
+
return o._polygonClippers = [], o.polygonGenerater = new Z(), o._radio = 512, o.radio = e, o.workerPool = new Y(function() {
|
|
934
934
|
return new $();
|
|
935
935
|
}, 1), o;
|
|
936
936
|
}
|
|
937
|
-
return
|
|
937
|
+
return n.prototype.setPolygonClippersAsync = function(e) {
|
|
938
938
|
return k(this, void 0, void 0, function() {
|
|
939
939
|
var o, t, r, s, p, c, a = this;
|
|
940
|
-
return I(this, function(
|
|
941
|
-
switch (
|
|
940
|
+
return I(this, function(u) {
|
|
941
|
+
switch (u.label) {
|
|
942
942
|
case 0:
|
|
943
|
-
return this._polygonClippers =
|
|
944
|
-
var h = new
|
|
945
|
-
f.forEach(function(
|
|
946
|
-
var C =
|
|
943
|
+
return this._polygonClippers = e, o = this.uniforms, o.polygonClippers.value = e.map(function(v) {
|
|
944
|
+
var h = new l.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(B) {
|
|
946
|
+
var C = B[0], S = B[1];
|
|
947
947
|
g = Math.min(g, C), d = Math.max(d, C), x = Math.min(x, S), P = Math.max(P, S);
|
|
948
948
|
});
|
|
949
|
-
var E = new
|
|
949
|
+
var E = new l.Vector2(g, x), w = d - g >= P - x ? d - g : P - x;
|
|
950
950
|
return {
|
|
951
951
|
polygonTransformInverse: h,
|
|
952
952
|
polygonHeight: m,
|
|
@@ -954,7 +954,7 @@ var Q = `
|
|
|
954
954
|
polygonScale: w,
|
|
955
955
|
cutOutSide: y
|
|
956
956
|
};
|
|
957
|
-
}), t =
|
|
957
|
+
}), t = e.map(function(v) {
|
|
958
958
|
return {
|
|
959
959
|
polygon: v.polygon,
|
|
960
960
|
width: a.polygonGenerater.canvas.width,
|
|
@@ -966,37 +966,37 @@ var Q = `
|
|
|
966
966
|
height: this.polygonGenerater.canvas.height
|
|
967
967
|
})];
|
|
968
968
|
case 1:
|
|
969
|
-
return r =
|
|
969
|
+
return r = u.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 l.CanvasTexture(s), c.minFilter = l.NearestFilter, c.magFilter = l.NearestFilter, this.uniforms.polygonTexture.value = c, this.needsUpdate = !0), [
|
|
970
970
|
2
|
|
971
971
|
/*return*/
|
|
972
972
|
];
|
|
973
973
|
}
|
|
974
974
|
});
|
|
975
975
|
});
|
|
976
|
-
}, Object.defineProperty(
|
|
976
|
+
}, Object.defineProperty(n.prototype, "polygonClippers", {
|
|
977
977
|
get: function() {
|
|
978
978
|
return this._polygonClippers;
|
|
979
979
|
},
|
|
980
|
-
set: function(
|
|
981
|
-
this._polygonClippers =
|
|
980
|
+
set: function(e) {
|
|
981
|
+
this._polygonClippers = e;
|
|
982
982
|
},
|
|
983
983
|
enumerable: !1,
|
|
984
984
|
configurable: !0
|
|
985
|
-
}), Object.defineProperty(
|
|
985
|
+
}), Object.defineProperty(n.prototype, "radio", {
|
|
986
986
|
get: function() {
|
|
987
987
|
return this._radio;
|
|
988
988
|
},
|
|
989
|
-
set: function(
|
|
990
|
-
this._radio =
|
|
989
|
+
set: function(e) {
|
|
990
|
+
this._radio = e, this.polygonGenerater.setSize(e);
|
|
991
991
|
},
|
|
992
992
|
enumerable: !1,
|
|
993
993
|
configurable: !0
|
|
994
|
-
}),
|
|
994
|
+
}), n.prototype.dispose = function() {
|
|
995
995
|
this.workerPool.dispose();
|
|
996
|
-
},
|
|
996
|
+
}, n.prototype.onBeforeCompile = function(e, o) {
|
|
997
997
|
var t = String(this.polygonClippers.length);
|
|
998
|
-
|
|
999
|
-
},
|
|
998
|
+
e.vertexShader = e.vertexShader.replace(/NUM_POLYGON_CLIPPER/g, t), e.fragmentShader = e.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g, t);
|
|
999
|
+
}, n;
|
|
1000
1000
|
})(_)
|
|
1001
1001
|
), X = `
|
|
1002
1002
|
#if NUM_SHINE_OBJECTS > 0
|
|
@@ -1007,7 +1007,7 @@ var Q = `
|
|
|
1007
1007
|
};
|
|
1008
1008
|
uniform SHINE_OBJECT shineBoxes[NUM_SHINE_OBJECTS];
|
|
1009
1009
|
#endif
|
|
1010
|
-
`,
|
|
1010
|
+
`, ee = `
|
|
1011
1011
|
#if NUM_SHINE_OBJECTS > 0
|
|
1012
1012
|
#pragma unroll_loop_start
|
|
1013
1013
|
for ( int i = 0; i < NUM_SHINE_OBJECTS; i ++ ) {
|
|
@@ -1023,27 +1023,27 @@ var Q = `
|
|
|
1023
1023
|
}
|
|
1024
1024
|
#pragma unroll_loop_end
|
|
1025
1025
|
#endif
|
|
1026
|
-
`,
|
|
1026
|
+
`, ne = "", le = (
|
|
1027
1027
|
/** @class */
|
|
1028
1028
|
(function(i) {
|
|
1029
|
-
|
|
1030
|
-
function
|
|
1031
|
-
var
|
|
1029
|
+
F(n, i);
|
|
1030
|
+
function n() {
|
|
1031
|
+
var e = i.call(this, {
|
|
1032
1032
|
type: ["basic", "phong", "none"],
|
|
1033
1033
|
fragment: {
|
|
1034
1034
|
mainBefore: X,
|
|
1035
|
-
mainStart:
|
|
1036
|
-
mainEnd:
|
|
1035
|
+
mainStart: ne,
|
|
1036
|
+
mainEnd: ee
|
|
1037
1037
|
},
|
|
1038
1038
|
uniforms: {
|
|
1039
|
-
shineProgress: new
|
|
1040
|
-
shineBoxes: new
|
|
1039
|
+
shineProgress: new l.Uniform(0),
|
|
1040
|
+
shineBoxes: new l.Uniform([])
|
|
1041
1041
|
},
|
|
1042
1042
|
defines: {
|
|
1043
1043
|
NUM_SHINE_OBJECTS: 0
|
|
1044
1044
|
}
|
|
1045
1045
|
}) || this;
|
|
1046
|
-
return Object.defineProperties(
|
|
1046
|
+
return Object.defineProperties(e, {
|
|
1047
1047
|
shineBoxes: {
|
|
1048
1048
|
get: function() {
|
|
1049
1049
|
return this.uniforms.shineBoxes.value;
|
|
@@ -1053,20 +1053,20 @@ var Q = `
|
|
|
1053
1053
|
t > 0 && (this.defines.NUM_SHINE_OBJECTS = t, this.uniforms.shineBoxes.value = o);
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
|
-
}),
|
|
1056
|
+
}), e.shineBoxes = [], e;
|
|
1057
1057
|
}
|
|
1058
|
-
return
|
|
1058
|
+
return n.prototype.onBeforeCompile = function(e, o) {
|
|
1059
1059
|
var t = String(this.shineBoxes.length);
|
|
1060
|
-
|
|
1061
|
-
},
|
|
1060
|
+
e.vertexShader = e.vertexShader.replace(/NUM_SHINE_OBJECTS/g, t), e.fragmentShader = e.fragmentShader.replace(/NUM_SHINE_OBJECTS/g, t);
|
|
1061
|
+
}, n;
|
|
1062
1062
|
})(_)
|
|
1063
1063
|
);
|
|
1064
1064
|
export {
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1065
|
+
te as EvenessPlaneShader,
|
|
1066
|
+
ae as PointCloudExpandShader,
|
|
1067
|
+
se as PolygonCuterShader,
|
|
1068
1068
|
Z as PolygonGenerater,
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1069
|
+
le as ShineModelShader,
|
|
1070
|
+
re as SweepModelShader,
|
|
1071
|
+
ie as computeAlignmentMatrix
|
|
1072
1072
|
};
|