gl-draw 0.16.0-beta.2 → 0.16.0-beta.21
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/dist/WebGPULineSegments2.js +4 -4
- package/dist/WebGPULineSegments2.module.js +273 -263
- package/dist/core/BaseObject/index.d.ts +6 -2
- package/dist/core/Lead/Lead.d.ts +8 -8
- package/dist/index.js +2 -2
- package/dist/index.module.js +427 -422
- package/dist/objects/extrudePolygon/ExtrudeGeometry.d.ts +1 -22
- package/dist/objects/index.js +1 -1
- package/dist/objects/index.module.js +58 -58
- package/dist/objects/node/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/index.module.js +21 -21
- package/package.json +8 -8
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
var Ct = Object.defineProperty, Pt = Object.defineProperties;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
2
|
+
var Bt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var V = Object.getOwnPropertySymbols;
|
|
4
4
|
var et = Object.prototype.hasOwnProperty, it = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var st = Math.pow, tt = (n, t, e) => t in n ? Ct(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, E = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
et.call(t, e) && tt(
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
it.call(t, e) && tt(
|
|
11
|
-
return
|
|
12
|
-
}, $ = (
|
|
13
|
-
var
|
|
7
|
+
et.call(t, e) && tt(n, e, t[e]);
|
|
8
|
+
if (V)
|
|
9
|
+
for (var e of V(t))
|
|
10
|
+
it.call(t, e) && tt(n, e, t[e]);
|
|
11
|
+
return n;
|
|
12
|
+
}, $ = (n, t) => Pt(n, Bt(t));
|
|
13
|
+
var nt = (n, t) => {
|
|
14
14
|
var e = {};
|
|
15
|
-
for (var i in
|
|
16
|
-
et.call(
|
|
17
|
-
if (
|
|
18
|
-
for (var i of
|
|
19
|
-
t.indexOf(i) < 0 && it.call(
|
|
15
|
+
for (var i in n)
|
|
16
|
+
et.call(n, i) && t.indexOf(i) < 0 && (e[i] = n[i]);
|
|
17
|
+
if (n != null && V)
|
|
18
|
+
for (var i of V(n))
|
|
19
|
+
t.indexOf(i) < 0 && it.call(n, i) && (e[i] = n[i]);
|
|
20
20
|
return e;
|
|
21
21
|
};
|
|
22
|
-
var rt = (
|
|
22
|
+
var rt = (n, t, e) => new Promise((i, s) => {
|
|
23
23
|
var a = (o) => {
|
|
24
24
|
try {
|
|
25
25
|
r(e.next(o));
|
|
26
26
|
} catch (c) {
|
|
27
|
-
|
|
27
|
+
s(c);
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, l = (o) => {
|
|
30
30
|
try {
|
|
31
31
|
r(e.throw(o));
|
|
32
32
|
} catch (c) {
|
|
33
|
-
|
|
33
|
+
s(c);
|
|
34
34
|
}
|
|
35
|
-
}, r = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(a,
|
|
36
|
-
r((e = e.apply(
|
|
35
|
+
}, r = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(a, l);
|
|
36
|
+
r((e = e.apply(n, t)).next());
|
|
37
37
|
});
|
|
38
|
-
import { Material as at, Object3D as N, Texture as ot, BufferGeometry as Z, Float32BufferAttribute as R, PointsMaterial as
|
|
39
|
-
import { CSS2DObject as
|
|
38
|
+
import { Material as at, Object3D as N, Texture as ot, BufferGeometry as Z, Float32BufferAttribute as R, PointsMaterial as It, Points as J, InstancedMesh as xt, Vector3 as B, Quaternion as Dt, Group as Tt, Mesh as wt, Sprite as ct, Box3 as St, ShaderMaterial as zt, Vector2 as q, Color as lt, Vector4 as L, Matrix4 as _t, Line3 as Ot, Sphere as Et, InstancedInterleavedBuffer as Lt, InterleavedBufferAttribute as ut, MathUtils as kt } from "three";
|
|
39
|
+
import { CSS2DObject as Vt } from "three/examples/jsm/renderers/CSS2DRenderer";
|
|
40
40
|
import { CSS3DObject as Wt, CSS3DSprite as Ut } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
41
41
|
import { geoBounds as jt, geoContains as Nt, geoDistance as Rt, geoInterpolate as Gt } from "d3-geo";
|
|
42
42
|
import "d3-geo-projection";
|
|
@@ -49,7 +49,7 @@ import Xt from "@turf/boolean-point-in-polygon";
|
|
|
49
49
|
import { geoVoronoi as Yt } from "d3-geo-voronoi";
|
|
50
50
|
import { scaleLinear as ht } from "d3-scale";
|
|
51
51
|
import { LineSegmentsGeometry as Zt } from "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
52
|
-
const Jt = 0,
|
|
52
|
+
const Jt = 0, De = 1, Ht = 2, Te = !1;
|
|
53
53
|
class te {
|
|
54
54
|
constructor() {
|
|
55
55
|
this.resources = /* @__PURE__ */ new Set(), this.disposeMaterial = !0, this.disposeVideo = !0;
|
|
@@ -75,8 +75,8 @@ class te {
|
|
|
75
75
|
if (e.uniforms) {
|
|
76
76
|
for (const i of Object.values(e.uniforms))
|
|
77
77
|
if (i) {
|
|
78
|
-
const
|
|
79
|
-
(
|
|
78
|
+
const s = i.value;
|
|
79
|
+
(s instanceof ot || Array.isArray(s)) && this.track(s);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
} else this.disposeVideo && t.isVideoTexture && t.source.data && this.resources.add(t.source.data);
|
|
@@ -91,7 +91,7 @@ class te {
|
|
|
91
91
|
}), t.length = 0, this.resources.clear();
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
const ee = (
|
|
94
|
+
const ee = (n, t = 1) => {
|
|
95
95
|
const e = new Z();
|
|
96
96
|
e.setAttribute(
|
|
97
97
|
"position",
|
|
@@ -100,7 +100,7 @@ const ee = (s, t = 1) => {
|
|
|
100
100
|
"scaleAtt",
|
|
101
101
|
new R(new Array(t).fill(1), 1)
|
|
102
102
|
);
|
|
103
|
-
const i =
|
|
103
|
+
const i = n.material, s = new It({
|
|
104
104
|
size: 10,
|
|
105
105
|
map: i.map,
|
|
106
106
|
alphaMap: i.alphaMap,
|
|
@@ -113,7 +113,7 @@ const ee = (s, t = 1) => {
|
|
|
113
113
|
alphaTest: i.alphaTest,
|
|
114
114
|
sizeAttenuation: !1
|
|
115
115
|
});
|
|
116
|
-
return
|
|
116
|
+
return s.onBeforeCompile = (a) => {
|
|
117
117
|
a.vertexShader = `
|
|
118
118
|
attribute float scaleAtt;
|
|
119
119
|
${a.vertexShader.replace(
|
|
@@ -121,22 +121,22 @@ const ee = (s, t = 1) => {
|
|
|
121
121
|
"gl_PointSize = size * scaleAtt;"
|
|
122
122
|
)}
|
|
123
123
|
`;
|
|
124
|
-
}, new J(e,
|
|
125
|
-
}, ie = (
|
|
124
|
+
}, new J(e, s);
|
|
125
|
+
}, ie = (n, t) => {
|
|
126
126
|
const e = new N();
|
|
127
|
-
t.forEach((i,
|
|
128
|
-
const a = ft(i.position),
|
|
129
|
-
e.position.copy(a), e.scale.copy(
|
|
127
|
+
t.forEach((i, s) => {
|
|
128
|
+
const a = ft(i.position), l = ft(i.scale || [1, 1, 1]);
|
|
129
|
+
e.position.copy(a), e.scale.copy(l), e.updateMatrix();
|
|
130
130
|
const r = e.matrix.clone();
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
else if (
|
|
134
|
-
const c =
|
|
135
|
-
r.decompose(h,
|
|
131
|
+
if (n instanceof xt || n.isInstantiate)
|
|
132
|
+
n.setMatrixAt(s, r);
|
|
133
|
+
else if (n instanceof J || n.type === "Points") {
|
|
134
|
+
const c = n.geometry, f = c.attributes.position.array, d = c.attributes.scaleAtt.array, h = new B(), u = new B(), m = new Dt(), p = s * 3, v = s * 1;
|
|
135
|
+
r.decompose(h, m, u), f[p] = h.x, f[p + 1] = h.y, f[p + 2] = h.z, d[v] = Math.max(u.x, u.y, u.z), c.attributes.position.needsUpdate = !0, c.attributes.scaleAtt.needsUpdate = !0;
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
-
class
|
|
139
|
+
class se {
|
|
140
140
|
constructor() {
|
|
141
141
|
this.onPointerIndex = [];
|
|
142
142
|
}
|
|
@@ -165,7 +165,7 @@ class ne {
|
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
class
|
|
168
|
+
class ne extends se {
|
|
169
169
|
constructor() {
|
|
170
170
|
super(...arguments), this.userData = {}, this.materialList = {}, this.useMaterialType = "origin", this.disposeMaterialIfNotUsed = !0;
|
|
171
171
|
}
|
|
@@ -176,16 +176,16 @@ class se extends ne {
|
|
|
176
176
|
const e = t.material;
|
|
177
177
|
if (Array.isArray(e))
|
|
178
178
|
return e.map((i) => {
|
|
179
|
-
const
|
|
179
|
+
const s = i.userData;
|
|
180
180
|
i.userData = {};
|
|
181
181
|
const a = i.clone();
|
|
182
|
-
return i.userData =
|
|
182
|
+
return i.userData = s, a;
|
|
183
183
|
});
|
|
184
184
|
{
|
|
185
185
|
const i = e.userData;
|
|
186
186
|
e.userData = {};
|
|
187
|
-
const
|
|
188
|
-
return e.userData = i,
|
|
187
|
+
const s = e.clone();
|
|
188
|
+
return e.userData = i, s;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
setMaterialList(t, e) {
|
|
@@ -193,8 +193,8 @@ class se extends ne {
|
|
|
193
193
|
if (!i || !i.material)
|
|
194
194
|
return;
|
|
195
195
|
this.materialList.origin || (this.materialList.origin = i.material);
|
|
196
|
-
const
|
|
197
|
-
return this.materialList[t] =
|
|
196
|
+
const s = e === "clone" ? this.cloneMaterial() : Array.isArray(e) ? e.slice() : e;
|
|
197
|
+
return this.materialList[t] = s, s;
|
|
198
198
|
}
|
|
199
199
|
useMaterial(t) {
|
|
200
200
|
const e = this.object3d;
|
|
@@ -206,8 +206,8 @@ class se extends ne {
|
|
|
206
206
|
const i = this.mList.get(t);
|
|
207
207
|
if (!i)
|
|
208
208
|
return;
|
|
209
|
-
const
|
|
210
|
-
Array.isArray(
|
|
209
|
+
const s = this.object3d;
|
|
210
|
+
Array.isArray(s.material) && e !== void 0 ? s.material[e] = i : s.material = i;
|
|
211
211
|
}
|
|
212
212
|
useMListByName(t, e) {
|
|
213
213
|
if (!this.mList)
|
|
@@ -223,9 +223,15 @@ class se extends ne {
|
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
class pt extends
|
|
226
|
+
class pt extends ne {
|
|
227
227
|
constructor() {
|
|
228
|
-
super(...arguments), this.objectType = "BaseObject", this.userData = {}, this.
|
|
228
|
+
super(...arguments), this._key = "", this.objectType = "BaseObject", this.userData = {}, this.isPrefab = !1, this.isInstantiate = !1, this.isBloom = !1, this.isBaseObject = !0, this.disposeTrack = !0;
|
|
229
|
+
}
|
|
230
|
+
get key() {
|
|
231
|
+
return this._key;
|
|
232
|
+
}
|
|
233
|
+
set key(t) {
|
|
234
|
+
this.lead && this.lead.updateBaseObjectKey(this, t);
|
|
229
235
|
}
|
|
230
236
|
get parent() {
|
|
231
237
|
const t = this.object3d.parent;
|
|
@@ -284,7 +290,7 @@ class pt extends se {
|
|
|
284
290
|
resize(t, e) {
|
|
285
291
|
}
|
|
286
292
|
show() {
|
|
287
|
-
return this.object3d.visible = !0, this.object3d.layers.set(Jt), this;
|
|
293
|
+
return this.object3d.visible = !0, this.object3d.layers.set(Jt), this.isBloom && this.enableBloom(), this;
|
|
288
294
|
}
|
|
289
295
|
hide() {
|
|
290
296
|
return this.object3d.visible = !1, this.object3d.layers.set(Ht), this;
|
|
@@ -299,7 +305,7 @@ class pt extends se {
|
|
|
299
305
|
return this.object3d = new J(...t), this;
|
|
300
306
|
}
|
|
301
307
|
createCSS2DObject(t) {
|
|
302
|
-
return this.object3d = new
|
|
308
|
+
return this.object3d = new Vt(t), this;
|
|
303
309
|
}
|
|
304
310
|
createCSS3DObject(t) {
|
|
305
311
|
return this.object3d = new Wt(t), this;
|
|
@@ -320,8 +326,8 @@ class pt extends se {
|
|
|
320
326
|
return {
|
|
321
327
|
min: t.min,
|
|
322
328
|
max: t.max,
|
|
323
|
-
size: t.getSize(new
|
|
324
|
-
center: t.getCenter(new
|
|
329
|
+
size: t.getSize(new B()),
|
|
330
|
+
center: t.getCenter(new B())
|
|
325
331
|
};
|
|
326
332
|
}
|
|
327
333
|
setTop(t) {
|
|
@@ -334,40 +340,44 @@ class pt extends se {
|
|
|
334
340
|
}
|
|
335
341
|
instantiate(t) {
|
|
336
342
|
return rt(this, null, function* () {
|
|
337
|
-
var
|
|
338
|
-
const e = (
|
|
339
|
-
let
|
|
340
|
-
|
|
341
|
-
|
|
343
|
+
var o, c;
|
|
344
|
+
const e = (o = t == null ? void 0 : t.recursive) != null ? o : !0, i = (c = t == null ? void 0 : t.cloneMaterial) != null ? c : !1, { objectType: s, objectOptions: a } = this;
|
|
345
|
+
let l = t == null ? void 0 : t.create, r;
|
|
346
|
+
return this.objectType === "BaseObject" ? r = this.lead.createBaseObject(this.object3d.clone(!1), {
|
|
347
|
+
target: (t == null ? void 0 : t.target) || this.parent
|
|
348
|
+
}) : (l === void 0 && (l = (f) => {
|
|
349
|
+
var d;
|
|
342
350
|
if (this.object3d) {
|
|
343
|
-
if ((
|
|
344
|
-
const
|
|
351
|
+
if ((d = t == null ? void 0 : t.instancedAttr) != null && d.length) {
|
|
352
|
+
const h = t.instancedAttr.length;
|
|
345
353
|
if (this.object3d instanceof ct)
|
|
346
|
-
f.object3d = ee(this.object3d,
|
|
354
|
+
f.object3d = ee(this.object3d, h);
|
|
347
355
|
else {
|
|
348
|
-
const
|
|
349
|
-
f.object3d = new xt(
|
|
356
|
+
const u = this.object3d, m = i ? this.cloneMaterial() : u.material;
|
|
357
|
+
f.object3d = new xt(
|
|
358
|
+
u.geometry,
|
|
359
|
+
m,
|
|
360
|
+
h
|
|
361
|
+
);
|
|
350
362
|
}
|
|
351
363
|
ie(f.object3d, t == null ? void 0 : t.instancedAttr);
|
|
352
364
|
} else
|
|
353
365
|
f.object3d = this.object3d.clone(!1), i && f.object3d.material && (f.object3d.material = this.cloneMaterial());
|
|
354
366
|
f.object3d.userData.prefab && delete f.object3d.userData.prefab;
|
|
355
367
|
}
|
|
356
|
-
})
|
|
357
|
-
|
|
358
|
-
create: r,
|
|
368
|
+
}), r = yield this.lead.draw(s, $(E({}, a || {}), {
|
|
369
|
+
create: l,
|
|
359
370
|
prefab: !1,
|
|
360
371
|
key: (t == null ? void 0 : t.key) || (a == null ? void 0 : a.key),
|
|
361
|
-
target: (t == null ? void 0 : t.target) ||
|
|
362
|
-
}))
|
|
363
|
-
return this.isBloom && o.enableBloom(), e && (yield Promise.all(
|
|
372
|
+
target: (t == null ? void 0 : t.target) || this.parent
|
|
373
|
+
}))), this.isBloom && r.enableBloom(), e && (yield Promise.all(
|
|
364
374
|
this.children.map(
|
|
365
375
|
(f) => f.instantiate({
|
|
366
376
|
cloneMaterial: i,
|
|
367
|
-
target:
|
|
377
|
+
target: r
|
|
368
378
|
})
|
|
369
379
|
)
|
|
370
|
-
)),
|
|
380
|
+
)), r.isInstantiate = !0, r;
|
|
371
381
|
});
|
|
372
382
|
}
|
|
373
383
|
erase() {
|
|
@@ -391,220 +401,220 @@ class pt extends se {
|
|
|
391
401
|
}
|
|
392
402
|
}
|
|
393
403
|
}
|
|
394
|
-
function re(
|
|
395
|
-
return
|
|
404
|
+
function re(n, t) {
|
|
405
|
+
return n.map((e) => {
|
|
396
406
|
const i = [];
|
|
397
|
-
let
|
|
407
|
+
let s;
|
|
398
408
|
return e.forEach((a) => {
|
|
399
|
-
if (
|
|
400
|
-
const
|
|
401
|
-
if (
|
|
402
|
-
const r = Gt(
|
|
409
|
+
if (s) {
|
|
410
|
+
const l = Rt(a, s) * 180 / Math.PI;
|
|
411
|
+
if (l > t) {
|
|
412
|
+
const r = Gt(s, a), o = 1 / Math.ceil(l / t);
|
|
403
413
|
let c = o;
|
|
404
414
|
for (; c < 1; )
|
|
405
415
|
i.push(r(c)), c += o;
|
|
406
416
|
}
|
|
407
417
|
}
|
|
408
|
-
i.push(
|
|
418
|
+
i.push(s = a);
|
|
409
419
|
}), i;
|
|
410
420
|
});
|
|
411
421
|
}
|
|
412
|
-
function ae(
|
|
413
|
-
const a = Math.round(
|
|
414
|
-
|
|
422
|
+
function ae(n, { minLng: t, maxLng: e, minLat: i, maxLat: s } = {}) {
|
|
423
|
+
const a = Math.round(st(360 / n, 2) / Math.PI), l = (1 + Math.sqrt(5)) / 2, r = (u) => u / l * 360 % 360 - 180, o = (u) => Math.acos(2 * u / a - 1) / Math.PI * 180 - 90, c = (u) => a * (Math.cos((u + 90) * Math.PI / 180) + 1) / 2, f = [
|
|
424
|
+
s !== void 0 ? Math.ceil(c(s)) : 0,
|
|
415
425
|
i !== void 0 ? Math.floor(c(i)) : a - 1
|
|
416
|
-
],
|
|
417
|
-
for (let
|
|
418
|
-
const
|
|
419
|
-
|
|
426
|
+
], d = t === void 0 && e === void 0 ? () => !0 : t === void 0 ? (u) => u <= e : e === void 0 ? (u) => u >= t : e >= t ? (u) => u >= t && u <= e : (u) => u >= t || u <= e, h = [];
|
|
427
|
+
for (let u = f[0]; u <= f[1]; u++) {
|
|
428
|
+
const m = r(u);
|
|
429
|
+
d(m) && h.push([m, o(u)]);
|
|
420
430
|
}
|
|
421
431
|
return h;
|
|
422
432
|
}
|
|
423
|
-
function Y(
|
|
424
|
-
return e ? Nt(t,
|
|
433
|
+
function Y(n, t, e = !1) {
|
|
434
|
+
return e ? Nt(t, n) : Xt(n, t);
|
|
425
435
|
}
|
|
426
|
-
function oe(
|
|
427
|
-
const e = { type: "Polygon", coordinates:
|
|
428
|
-
if (Math.min(Math.abs(a - i), Math.abs(
|
|
436
|
+
function oe(n, t) {
|
|
437
|
+
const e = { type: "Polygon", coordinates: n }, [[i, s], [a, l]] = jt(e);
|
|
438
|
+
if (Math.min(Math.abs(a - i), Math.abs(l - s)) < t)
|
|
429
439
|
return [];
|
|
430
|
-
const r = i > a ||
|
|
440
|
+
const r = i > a || l >= 89 || s <= -89;
|
|
431
441
|
return ae(t, {
|
|
432
442
|
minLng: i,
|
|
433
443
|
maxLng: a,
|
|
434
|
-
minLat:
|
|
435
|
-
maxLat:
|
|
444
|
+
minLat: s,
|
|
445
|
+
maxLat: l
|
|
436
446
|
}).filter(
|
|
437
447
|
(o) => Y(o, e, r)
|
|
438
448
|
);
|
|
439
449
|
}
|
|
440
|
-
function ce(
|
|
441
|
-
const
|
|
450
|
+
function ce(n, { resolution: t = 1 / 0, bbox: e, projection: i } = {}) {
|
|
451
|
+
const s = re(n, t), a = H(s), l = oe(n, t), r = [...a, ...l], o = { type: "Polygon", coordinates: n }, [[c, f], [d, h]] = jt(o), u = c > d || // crosses antimeridian
|
|
442
452
|
h >= 89 || // crosses north pole
|
|
443
|
-
|
|
444
|
-
let
|
|
445
|
-
if (
|
|
446
|
-
const
|
|
453
|
+
f <= -89;
|
|
454
|
+
let m = [];
|
|
455
|
+
if (u) {
|
|
456
|
+
const b = Yt(r).triangles(), x = new Map(
|
|
447
457
|
r.map(([A, C], _) => [`${A}-${C}`, _])
|
|
448
458
|
);
|
|
449
|
-
|
|
459
|
+
b.features.forEach((A) => {
|
|
450
460
|
const C = A.geometry.coordinates[0].slice(0, 3).reverse(), _ = [];
|
|
451
461
|
if (C.forEach(([P, F]) => {
|
|
452
|
-
const
|
|
453
|
-
x.has(
|
|
462
|
+
const k = `${P}-${F}`;
|
|
463
|
+
x.has(k) && _.push(x.get(k));
|
|
454
464
|
}), _.length === 3) {
|
|
455
465
|
if (_.some((P) => P < a.length)) {
|
|
456
466
|
const P = A.properties.circumcenter;
|
|
457
467
|
if (!Y(
|
|
458
468
|
P,
|
|
459
469
|
o,
|
|
460
|
-
|
|
470
|
+
u
|
|
461
471
|
))
|
|
462
472
|
return;
|
|
463
473
|
}
|
|
464
|
-
|
|
474
|
+
m.push(..._);
|
|
465
475
|
}
|
|
466
476
|
});
|
|
467
|
-
} else if (
|
|
468
|
-
const
|
|
469
|
-
for (let x = 0, A =
|
|
470
|
-
const C = [2, 1, 0].map((P) =>
|
|
477
|
+
} else if (l.length) {
|
|
478
|
+
const b = Qt.from(r);
|
|
479
|
+
for (let x = 0, A = b.triangles.length; x < A; x += 3) {
|
|
480
|
+
const C = [2, 1, 0].map((P) => b.triangles[x + P]), _ = C.map((P) => r[P]);
|
|
471
481
|
if (C.some((P) => P < a.length)) {
|
|
472
482
|
const P = [0, 1].map(
|
|
473
|
-
(F) => $t(_, (
|
|
483
|
+
(F) => $t(_, (k) => k[F])
|
|
474
484
|
);
|
|
475
485
|
if (!Y(
|
|
476
486
|
P,
|
|
477
487
|
o,
|
|
478
|
-
|
|
488
|
+
u
|
|
479
489
|
))
|
|
480
490
|
continue;
|
|
481
491
|
}
|
|
482
|
-
|
|
492
|
+
m.push(...C);
|
|
483
493
|
}
|
|
484
494
|
} else {
|
|
485
|
-
const { vertices:
|
|
486
|
-
|
|
495
|
+
const { vertices: b, holes: x = [] } = At(s);
|
|
496
|
+
m = qt(b, x, 2);
|
|
487
497
|
}
|
|
488
|
-
let
|
|
498
|
+
let p = e ? [e[0], e[2]] : dt(r, (b) => b[0]), v = e ? [e[1], e[3]] : dt(r, (b) => b[1]);
|
|
489
499
|
if (i) {
|
|
490
|
-
const [
|
|
491
|
-
|
|
500
|
+
const [b, x] = i([p[0], v[0]]), [A, C] = i([p[1], v[1]]);
|
|
501
|
+
p = [b, A], v = [-x, -C];
|
|
492
502
|
}
|
|
493
|
-
const w = ht(
|
|
503
|
+
const w = ht(p, [0, 1]), S = ht(v, [0, 1]), I = r.map(([b, x]) => {
|
|
494
504
|
if (i) {
|
|
495
|
-
const [A, C] = i([
|
|
505
|
+
const [A, C] = i([b, x]);
|
|
496
506
|
return [w(A), S(-C)];
|
|
497
507
|
} else
|
|
498
|
-
return [w(
|
|
508
|
+
return [w(b), S(x)];
|
|
499
509
|
});
|
|
500
|
-
return { contour:
|
|
510
|
+
return { contour: s, triangles: { points: r, indices: m, uvs: I } };
|
|
501
511
|
}
|
|
502
512
|
const mt = new Z().setAttribute ? "setAttribute" : "addAttribute";
|
|
503
|
-
function G(
|
|
504
|
-
const
|
|
505
|
-
(a) => a.map(([
|
|
513
|
+
function G(n, t, e, i) {
|
|
514
|
+
const s = n.map(
|
|
515
|
+
(a) => a.map(([l, r]) => {
|
|
506
516
|
if (i) {
|
|
507
|
-
const [o, c] = i([
|
|
517
|
+
const [o, c] = i([l, r]);
|
|
508
518
|
return [o, -c, t];
|
|
509
519
|
}
|
|
510
|
-
return e ? Ft(
|
|
520
|
+
return e ? Ft(l, r, t) : [l, r, t];
|
|
511
521
|
})
|
|
512
522
|
);
|
|
513
|
-
return At(
|
|
523
|
+
return At(s);
|
|
514
524
|
}
|
|
515
|
-
function le(
|
|
516
|
-
const { vertices: a, holes:
|
|
517
|
-
|
|
525
|
+
function le(n, t, e, i, s) {
|
|
526
|
+
const { vertices: a, holes: l } = G(
|
|
527
|
+
n,
|
|
518
528
|
t,
|
|
519
529
|
i,
|
|
520
|
-
|
|
530
|
+
s
|
|
521
531
|
), { vertices: r } = G(
|
|
522
|
-
|
|
532
|
+
n,
|
|
523
533
|
e,
|
|
524
534
|
i,
|
|
525
|
-
|
|
526
|
-
), o = H([r, a]), c = Math.round(r.length / 3),
|
|
527
|
-
let
|
|
535
|
+
s
|
|
536
|
+
), o = H([r, a]), c = Math.round(r.length / 3), f = new Set(l);
|
|
537
|
+
let d = 0;
|
|
528
538
|
const h = [];
|
|
529
|
-
for (let
|
|
530
|
-
let
|
|
531
|
-
if (
|
|
532
|
-
|
|
533
|
-
else if (
|
|
534
|
-
const v =
|
|
535
|
-
|
|
539
|
+
for (let m = 0; m < c; m++) {
|
|
540
|
+
let p = m + 1;
|
|
541
|
+
if (p === c)
|
|
542
|
+
p = d;
|
|
543
|
+
else if (f.has(p)) {
|
|
544
|
+
const v = p;
|
|
545
|
+
p = d, d = v;
|
|
536
546
|
}
|
|
537
|
-
h.push(
|
|
547
|
+
h.push(m, m + c, p + c), h.push(p + c, p, m);
|
|
538
548
|
}
|
|
539
|
-
const
|
|
540
|
-
for (let
|
|
541
|
-
for (let
|
|
542
|
-
return { indices: h, vertices: o, uvs:
|
|
549
|
+
const u = [];
|
|
550
|
+
for (let m = 1; m >= 0; m--)
|
|
551
|
+
for (let p = 0; p < c; p += 1) u.push(p / (c - 1), m);
|
|
552
|
+
return { indices: h, vertices: o, uvs: u, topVerts: r };
|
|
543
553
|
}
|
|
544
|
-
function vt(
|
|
554
|
+
function vt(n, t, e, i, s, a) {
|
|
545
555
|
return {
|
|
546
|
-
indices: i ?
|
|
556
|
+
indices: i ? n.indices : n.indices.slice().reverse(),
|
|
547
557
|
vertices: G(
|
|
548
|
-
[
|
|
558
|
+
[n.points],
|
|
549
559
|
t,
|
|
550
|
-
|
|
560
|
+
s,
|
|
551
561
|
a
|
|
552
562
|
).vertices,
|
|
553
563
|
uvs: e
|
|
554
564
|
};
|
|
555
565
|
}
|
|
556
566
|
const ue = ({
|
|
557
|
-
polygonGeoJson:
|
|
567
|
+
polygonGeoJson: n,
|
|
558
568
|
startHeight: t,
|
|
559
569
|
endHeight: e,
|
|
560
570
|
curvatureResolution: i = 1,
|
|
561
|
-
cartesian:
|
|
571
|
+
cartesian: s = !0,
|
|
562
572
|
hasSide: a = !0,
|
|
563
|
-
hasBottom:
|
|
573
|
+
hasBottom: l = !1,
|
|
564
574
|
hasTop: r = !1,
|
|
565
575
|
projection: o,
|
|
566
576
|
bbox: c
|
|
567
577
|
}) => {
|
|
568
|
-
|
|
578
|
+
n.forEach((w) => {
|
|
569
579
|
Kt(w) || w.reverse();
|
|
570
580
|
});
|
|
571
|
-
const { contour:
|
|
581
|
+
const { contour: f, triangles: d } = ce(n, {
|
|
572
582
|
resolution: i,
|
|
573
583
|
bbox: c,
|
|
574
584
|
projection: o
|
|
575
585
|
});
|
|
576
|
-
let h = {},
|
|
586
|
+
let h = {}, u;
|
|
577
587
|
a && (h = le(
|
|
578
|
-
|
|
588
|
+
f,
|
|
579
589
|
t != null ? t : e,
|
|
580
590
|
e != null ? e : t,
|
|
581
|
-
|
|
591
|
+
s,
|
|
582
592
|
o
|
|
583
|
-
),
|
|
584
|
-
let
|
|
585
|
-
(
|
|
586
|
-
let
|
|
587
|
-
|
|
588
|
-
|
|
593
|
+
), u = h.topVerts);
|
|
594
|
+
let m = [];
|
|
595
|
+
(l || r) && (m = H(d.uvs));
|
|
596
|
+
let p = {};
|
|
597
|
+
l && (p = vt(
|
|
598
|
+
d,
|
|
589
599
|
t,
|
|
590
|
-
|
|
600
|
+
m,
|
|
591
601
|
!1,
|
|
592
|
-
|
|
602
|
+
s,
|
|
593
603
|
o
|
|
594
604
|
));
|
|
595
605
|
let v = {};
|
|
596
606
|
return r && (v = vt(
|
|
597
|
-
|
|
607
|
+
d,
|
|
598
608
|
e,
|
|
599
|
-
|
|
609
|
+
m,
|
|
600
610
|
!0,
|
|
601
|
-
|
|
611
|
+
s,
|
|
602
612
|
o
|
|
603
|
-
)), { contour:
|
|
613
|
+
)), { contour: f, triangles: d, sideTorso: h, bottomCap: p, topCap: v, topVerts: u };
|
|
604
614
|
};
|
|
605
615
|
class ze extends Z {
|
|
606
616
|
constructor(t, e = {}) {
|
|
607
|
-
super(), this.type = "PolygonBufferGeometry", this.parameters =
|
|
617
|
+
super(), this.type = "PolygonBufferGeometry", this.parameters = E({
|
|
608
618
|
polygonGeoJson: t,
|
|
609
619
|
startHeight: 0,
|
|
610
620
|
endHeight: 1,
|
|
@@ -618,27 +628,27 @@ class ze extends Z {
|
|
|
618
628
|
}, e);
|
|
619
629
|
const {
|
|
620
630
|
endHeight: i,
|
|
621
|
-
hasTop:
|
|
631
|
+
hasTop: s,
|
|
622
632
|
topFirst: a,
|
|
623
|
-
hasBottom:
|
|
633
|
+
hasBottom: l,
|
|
624
634
|
hasSide: r,
|
|
625
635
|
cartesian: o,
|
|
626
636
|
userDataRsoOffset: c,
|
|
627
|
-
projection:
|
|
628
|
-
} = this.parameters, { contour:
|
|
629
|
-
let v = [], w = [], S = [],
|
|
630
|
-
const j = (
|
|
637
|
+
projection: f
|
|
638
|
+
} = this.parameters, { contour: d, sideTorso: h, topVerts: u, bottomCap: m, topCap: p } = ue(E({}, this.parameters));
|
|
639
|
+
let v = [], w = [], S = [], I = 0;
|
|
640
|
+
const j = (b) => {
|
|
631
641
|
const x = Math.round(v.length / 3), A = S.length;
|
|
632
|
-
v = v.concat(
|
|
633
|
-
x ?
|
|
634
|
-
), this.addGroup(A, S.length - A,
|
|
642
|
+
v = v.concat(b.vertices), w = w.concat(b.uvs), S = S.concat(
|
|
643
|
+
x ? b.indices.map((C) => C + x) : b.indices
|
|
644
|
+
), this.addGroup(A, S.length - A, I++);
|
|
635
645
|
};
|
|
636
|
-
|
|
637
|
-
|
|
646
|
+
s && a && j(p), r && (j(h), this.userData.topVerts = c ? G(
|
|
647
|
+
d,
|
|
638
648
|
i + c,
|
|
639
649
|
o,
|
|
640
|
-
|
|
641
|
-
).vertices :
|
|
650
|
+
f
|
|
651
|
+
).vertices : u), l && j(m), s && !a && j(p), this.setIndex(S), this[mt]("position", new R(v, 3)), this[mt]("uv", new R(w, 2)), this.computeVertexNormals();
|
|
642
652
|
}
|
|
643
653
|
}
|
|
644
654
|
const fe = `
|
|
@@ -783,20 +793,20 @@ class _e extends zt {
|
|
|
783
793
|
const S = t, {
|
|
784
794
|
lineWidth: e = 1,
|
|
785
795
|
color: i = "#ffffff",
|
|
786
|
-
opacity:
|
|
796
|
+
opacity: s = 1,
|
|
787
797
|
map: a = null,
|
|
788
|
-
dashOffset:
|
|
798
|
+
dashOffset: l = 0,
|
|
789
799
|
dashArray: r = 0,
|
|
790
800
|
dashRatio: o = 0,
|
|
791
801
|
sizeAttenuation: c = !0,
|
|
792
|
-
offsetLoop:
|
|
793
|
-
offset:
|
|
802
|
+
offsetLoop: f = !0,
|
|
803
|
+
offset: d = new q(0, 0),
|
|
794
804
|
scaleDown: h = 0,
|
|
795
|
-
alphaMap:
|
|
796
|
-
alphaTest:
|
|
797
|
-
repeat:
|
|
805
|
+
alphaMap: u = void 0,
|
|
806
|
+
alphaTest: m = 0,
|
|
807
|
+
repeat: p = new q(1, 1),
|
|
798
808
|
resolution: v = new q(1, 1)
|
|
799
|
-
} = S, w =
|
|
809
|
+
} = S, w = nt(S, [
|
|
800
810
|
"lineWidth",
|
|
801
811
|
"color",
|
|
802
812
|
"opacity",
|
|
@@ -813,26 +823,26 @@ class _e extends zt {
|
|
|
813
823
|
"repeat",
|
|
814
824
|
"resolution"
|
|
815
825
|
]);
|
|
816
|
-
super($(
|
|
826
|
+
super($(E({}, w), {
|
|
817
827
|
uniforms: {
|
|
818
828
|
lineWidth: { value: e },
|
|
819
829
|
color: { value: new lt(i) },
|
|
820
|
-
opacity: { value:
|
|
830
|
+
opacity: { value: s },
|
|
821
831
|
map: { value: a },
|
|
822
832
|
useMap: { value: a ? 1 : 0 },
|
|
823
833
|
resolution: { value: v },
|
|
824
834
|
sizeAttenuation: { value: c ? 1 : 0 },
|
|
825
|
-
offset: { value:
|
|
826
|
-
offsetLoop: { value:
|
|
835
|
+
offset: { value: d },
|
|
836
|
+
offsetLoop: { value: f ? 1 : 0 },
|
|
827
837
|
dashArray: { value: r },
|
|
828
|
-
dashOffset: { value:
|
|
838
|
+
dashOffset: { value: l },
|
|
829
839
|
dashRatio: { value: o },
|
|
830
840
|
useDash: { value: r > 0 ? 1 : 0 },
|
|
831
841
|
scaleDown: { value: h / 10 },
|
|
832
|
-
alphaTest: { value:
|
|
833
|
-
alphaMap: { value:
|
|
834
|
-
useAlphaMap: { value:
|
|
835
|
-
repeat: { value:
|
|
842
|
+
alphaTest: { value: m },
|
|
843
|
+
alphaMap: { value: u },
|
|
844
|
+
useAlphaMap: { value: u ? 1 : 0 },
|
|
845
|
+
repeat: { value: p }
|
|
836
846
|
},
|
|
837
847
|
vertexShader: de,
|
|
838
848
|
fragmentShader: fe
|
|
@@ -886,21 +896,21 @@ class _e extends zt {
|
|
|
886
896
|
this.uniforms.sizeAttenuation.value = t ? 1 : 0;
|
|
887
897
|
}
|
|
888
898
|
}
|
|
889
|
-
const K = new
|
|
890
|
-
let z,
|
|
891
|
-
function Mt(
|
|
892
|
-
return T.set(0, 0, -t, 1).applyMatrix4(
|
|
899
|
+
const K = new L(), bt = new B(), yt = new B(), y = new L(), g = new L(), D = new L(), Q = new B(), X = new _t(), M = new Ot(), gt = new B(), W = new St(), U = new Et(), T = new L();
|
|
900
|
+
let z, O;
|
|
901
|
+
function Mt(n, t, e) {
|
|
902
|
+
return T.set(0, 0, -t, 1).applyMatrix4(n.projectionMatrix), T.multiplyScalar(1 / T.w), T.x = O / e.width, T.y = O / e.height, T.applyMatrix4(n.projectionMatrixInverse), T.multiplyScalar(1 / T.w), Math.abs(Math.max(T.x, T.y));
|
|
893
903
|
}
|
|
894
|
-
function he(
|
|
895
|
-
const e =
|
|
896
|
-
for (let r = 0, o =
|
|
897
|
-
M.start.fromBufferAttribute(
|
|
898
|
-
const c = new
|
|
899
|
-
z.distanceSqToSegment(M.start, M.end,
|
|
900
|
-
point:
|
|
904
|
+
function he(n, t) {
|
|
905
|
+
const e = n.matrixWorld, i = n.geometry, s = i.attributes.instanceStart, a = i.attributes.instanceEnd, l = Math.min(i.instanceCount, s.count);
|
|
906
|
+
for (let r = 0, o = l; r < o; r++) {
|
|
907
|
+
M.start.fromBufferAttribute(s, r), M.end.fromBufferAttribute(a, r), M.applyMatrix4(e);
|
|
908
|
+
const c = new B(), f = new B();
|
|
909
|
+
z.distanceSqToSegment(M.start, M.end, f, c), f.distanceTo(c) < O * 0.5 && t.push({
|
|
910
|
+
point: f,
|
|
901
911
|
pointOnLine: c,
|
|
902
|
-
distance: z.origin.distanceTo(
|
|
903
|
-
object:
|
|
912
|
+
distance: z.origin.distanceTo(f),
|
|
913
|
+
object: n,
|
|
904
914
|
face: null,
|
|
905
915
|
faceIndex: r,
|
|
906
916
|
uv: null,
|
|
@@ -908,31 +918,31 @@ function he(s, t) {
|
|
|
908
918
|
});
|
|
909
919
|
}
|
|
910
920
|
}
|
|
911
|
-
function pe(
|
|
912
|
-
const i = t.projectionMatrix, a =
|
|
913
|
-
z.at(1,
|
|
914
|
-
for (let h = 0,
|
|
915
|
-
if (
|
|
921
|
+
function pe(n, t, e) {
|
|
922
|
+
const i = t.projectionMatrix, a = n.material.resolution, l = n.matrixWorld, r = n.geometry, o = r.attributes.instanceStart, c = r.attributes.instanceEnd, f = Math.min(r.instanceCount, o.count), d = -t.near;
|
|
923
|
+
z.at(1, D), D.w = 1, D.applyMatrix4(t.matrixWorldInverse), D.applyMatrix4(i), D.multiplyScalar(1 / D.w), D.x *= a.x / 2, D.y *= a.y / 2, D.z = 0, Q.copy(D), X.multiplyMatrices(t.matrixWorldInverse, l);
|
|
924
|
+
for (let h = 0, u = f; h < u; h++) {
|
|
925
|
+
if (y.fromBufferAttribute(o, h), g.fromBufferAttribute(c, h), y.w = 1, g.w = 1, y.applyMatrix4(X), g.applyMatrix4(X), y.z > d && g.z > d)
|
|
916
926
|
continue;
|
|
917
|
-
if (
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
} else if (
|
|
921
|
-
const
|
|
922
|
-
|
|
927
|
+
if (y.z > d) {
|
|
928
|
+
const I = y.z - g.z, j = (y.z - d) / I;
|
|
929
|
+
y.lerp(g, j);
|
|
930
|
+
} else if (g.z > d) {
|
|
931
|
+
const I = g.z - y.z, j = (g.z - d) / I;
|
|
932
|
+
g.lerp(y, j);
|
|
923
933
|
}
|
|
924
|
-
|
|
925
|
-
const
|
|
926
|
-
M.at(
|
|
927
|
-
const v =
|
|
934
|
+
y.applyMatrix4(i), g.applyMatrix4(i), y.multiplyScalar(1 / y.w), g.multiplyScalar(1 / g.w), y.x *= a.x / 2, y.y *= a.y / 2, g.x *= a.x / 2, g.y *= a.y / 2, M.start.copy(y), M.start.z = 0, M.end.copy(g), M.end.z = 0;
|
|
935
|
+
const p = M.closestPointToPointParameter(Q, !0);
|
|
936
|
+
M.at(p, gt);
|
|
937
|
+
const v = kt.lerp(y.z, g.z, p), w = v >= -1 && v <= 1, S = Q.distanceTo(gt) < O * 0.5;
|
|
928
938
|
if (w && S) {
|
|
929
|
-
M.start.fromBufferAttribute(o, h), M.end.fromBufferAttribute(c, h), M.start.applyMatrix4(
|
|
930
|
-
const
|
|
931
|
-
z.distanceSqToSegment(M.start, M.end, j,
|
|
939
|
+
M.start.fromBufferAttribute(o, h), M.end.fromBufferAttribute(c, h), M.start.applyMatrix4(l), M.end.applyMatrix4(l);
|
|
940
|
+
const I = new B(), j = new B();
|
|
941
|
+
z.distanceSqToSegment(M.start, M.end, j, I), e.push({
|
|
932
942
|
point: j,
|
|
933
|
-
pointOnLine:
|
|
943
|
+
pointOnLine: I,
|
|
934
944
|
distance: z.origin.distanceTo(j),
|
|
935
|
-
object:
|
|
945
|
+
object: n,
|
|
936
946
|
face: null,
|
|
937
947
|
faceIndex: h,
|
|
938
948
|
uv: null,
|
|
@@ -941,17 +951,17 @@ function pe(s, t, e) {
|
|
|
941
951
|
}
|
|
942
952
|
}
|
|
943
953
|
}
|
|
944
|
-
class
|
|
954
|
+
class Oe extends wt {
|
|
945
955
|
constructor(t = new Zt(), e) {
|
|
946
956
|
super(t, e), this.isLineSegments2 = !0, this.type = "LineSegments2";
|
|
947
957
|
}
|
|
948
958
|
// for backwards-compatibility, but could be a method of LineSegmentsGeometry...
|
|
949
959
|
computeLineDistances() {
|
|
950
|
-
const t = this.geometry, e = t.attributes.instanceStart, i = t.attributes.instanceEnd,
|
|
951
|
-
for (let
|
|
952
|
-
|
|
953
|
-
const a = new
|
|
954
|
-
|
|
960
|
+
const t = this.geometry, e = t.attributes.instanceStart, i = t.attributes.instanceEnd, s = new Float32Array(2 * e.count);
|
|
961
|
+
for (let l = 0, r = 0, o = e.count; l < o; l++, r += 2)
|
|
962
|
+
bt.fromBufferAttribute(e, l), yt.fromBufferAttribute(i, l), s[r] = r === 0 ? 0 : s[r - 1], s[r + 1] = s[r] + bt.distanceTo(yt);
|
|
963
|
+
const a = new Lt(
|
|
964
|
+
s,
|
|
955
965
|
2,
|
|
956
966
|
1
|
|
957
967
|
);
|
|
@@ -964,46 +974,46 @@ class Ee extends wt {
|
|
|
964
974
|
), this;
|
|
965
975
|
}
|
|
966
976
|
raycast(t, e) {
|
|
967
|
-
const i = this.material.worldUnits,
|
|
968
|
-
|
|
977
|
+
const i = this.material.worldUnits, s = t.camera;
|
|
978
|
+
s === null && !i && console.error(
|
|
969
979
|
'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'
|
|
970
980
|
);
|
|
971
981
|
const a = t.params.Line2 !== void 0 && t.params.Line2.threshold || 0;
|
|
972
982
|
z = t.ray;
|
|
973
|
-
const
|
|
974
|
-
|
|
983
|
+
const l = this.matrixWorld, r = this.geometry, o = this.material;
|
|
984
|
+
O = o.linewidth + a, r.boundingSphere === null && r.computeBoundingSphere(), U.copy(r.boundingSphere).applyMatrix4(l);
|
|
975
985
|
let c;
|
|
976
986
|
if (i)
|
|
977
|
-
c =
|
|
987
|
+
c = O * 0.5;
|
|
978
988
|
else {
|
|
979
|
-
const
|
|
980
|
-
|
|
989
|
+
const d = Math.max(
|
|
990
|
+
s.near,
|
|
981
991
|
U.distanceToPoint(z.origin)
|
|
982
992
|
);
|
|
983
993
|
c = Mt(
|
|
984
|
-
|
|
985
|
-
|
|
994
|
+
s,
|
|
995
|
+
d,
|
|
986
996
|
o.resolution
|
|
987
997
|
);
|
|
988
998
|
}
|
|
989
999
|
if (U.radius += c, z.intersectsSphere(U) === !1)
|
|
990
1000
|
return;
|
|
991
|
-
r.boundingBox === null && r.computeBoundingBox(), W.copy(r.boundingBox).applyMatrix4(
|
|
992
|
-
let
|
|
1001
|
+
r.boundingBox === null && r.computeBoundingBox(), W.copy(r.boundingBox).applyMatrix4(l);
|
|
1002
|
+
let f;
|
|
993
1003
|
if (i)
|
|
994
|
-
|
|
1004
|
+
f = O * 0.5;
|
|
995
1005
|
else {
|
|
996
|
-
const
|
|
997
|
-
|
|
1006
|
+
const d = Math.max(
|
|
1007
|
+
s.near,
|
|
998
1008
|
W.distanceToPoint(z.origin)
|
|
999
1009
|
);
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1010
|
+
f = Mt(
|
|
1011
|
+
s,
|
|
1012
|
+
d,
|
|
1003
1013
|
o.resolution
|
|
1004
1014
|
);
|
|
1005
1015
|
}
|
|
1006
|
-
W.expandByScalar(
|
|
1016
|
+
W.expandByScalar(f), z.intersectsBox(W) !== !1 && (i ? he(this, e) : pe(this, s, e));
|
|
1007
1017
|
}
|
|
1008
1018
|
onBeforeRender(t) {
|
|
1009
1019
|
const e = this.material.uniforms;
|
|
@@ -1011,9 +1021,9 @@ class Ee extends wt {
|
|
|
1011
1021
|
}
|
|
1012
1022
|
}
|
|
1013
1023
|
export {
|
|
1014
|
-
|
|
1024
|
+
De as B,
|
|
1015
1025
|
Te as I,
|
|
1016
|
-
|
|
1026
|
+
Oe as L,
|
|
1017
1027
|
_e as M,
|
|
1018
1028
|
ze as P,
|
|
1019
1029
|
te as R,
|