gl-draw 0.15.0-beta.9 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,47 +1,47 @@
1
- var At = Object.defineProperty, St = Object.defineProperties;
2
- var Ct = Object.getOwnPropertyDescriptors;
3
- var tt = Object.getOwnPropertySymbols;
4
- var zt = Object.prototype.hasOwnProperty, It = Object.prototype.propertyIsEnumerable;
5
- var it = Math.pow, et = (r, t, e) => t in r ? At(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, W = (r, t) => {
1
+ var jt = Object.defineProperty, At = Object.defineProperties;
2
+ var St = Object.getOwnPropertyDescriptors;
3
+ var J = Object.getOwnPropertySymbols;
4
+ var Ct = Object.prototype.hasOwnProperty, zt = Object.prototype.propertyIsEnumerable;
5
+ var et = Math.pow, tt = (a, t, e) => t in a ? jt(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, W = (a, t) => {
6
6
  for (var e in t || (t = {}))
7
- zt.call(t, e) && et(r, e, t[e]);
8
- if (tt)
9
- for (var e of tt(t))
10
- It.call(t, e) && et(r, e, t[e]);
11
- return r;
12
- }, $ = (r, t) => St(r, Ct(t));
13
- var st = (r, t, e) => new Promise((i, s) => {
14
- var a = (l) => {
7
+ Ct.call(t, e) && tt(a, e, t[e]);
8
+ if (J)
9
+ for (var e of J(t))
10
+ zt.call(t, e) && tt(a, e, t[e]);
11
+ return a;
12
+ }, Z = (a, t) => At(a, St(t));
13
+ var it = (a, t, e) => new Promise((i, s) => {
14
+ var r = (o) => {
15
15
  try {
16
- n(e.next(l));
16
+ n(e.next(o));
17
17
  } catch (c) {
18
18
  s(c);
19
19
  }
20
- }, o = (l) => {
20
+ }, l = (o) => {
21
21
  try {
22
- n(e.throw(l));
22
+ n(e.throw(o));
23
23
  } catch (c) {
24
24
  s(c);
25
25
  }
26
- }, n = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, o);
27
- n((e = e.apply(r, t)).next());
26
+ }, n = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(r, l);
27
+ n((e = e.apply(a, t)).next());
28
28
  });
29
- import { BufferGeometry as H, Float32BufferAttribute as G, PointsMaterial as Tt, Points as K, Mesh as Mt, Group as Dt, Sprite as nt, Box3 as wt, Vector3 as C, InstancedMesh as rt, Quaternion as _t, Object3D as R, Material as at, Texture as ot, VideoTexture as Bt, Vector4 as O, Matrix4 as Lt, Line3 as Wt, Sphere as Ot, InstancedInterleavedBuffer as Vt, InterleavedBufferAttribute as lt, MathUtils as kt, ShaderMaterial as Ut, UniformsLib as Et, Color as ct, Vector2 as k, REVISION as Rt } from "three";
30
- import { CSS2DObject as Gt } from "three/examples/jsm/renderers/CSS2DRenderer";
31
- import { CSS3DObject as Ft, CSS3DSprite as Zt } from "three/examples/jsm/renderers/CSS3DRenderer";
32
- import { geoBounds as Pt, geoContains as $t, geoDistance as Nt, geoInterpolate as qt } from "d3-geo";
29
+ import { BufferGeometry as Y, Float32BufferAttribute as G, PointsMaterial as It, Points as Q, Mesh as Mt, Group as Bt, Sprite as st, Box3 as xt, Vector3 as C, InstancedMesh as nt, Quaternion as Lt, Object3D as R, Material as rt, Texture as at, VideoTexture as Dt, Vector4 as O, Matrix4 as Tt, Line3 as _t, Sphere as Wt, InstancedInterleavedBuffer as Ot, InterleavedBufferAttribute as ot, MathUtils as Vt, ShaderMaterial as kt, UniformsLib as Ut, Color as lt, Vector2 as k, REVISION as Et } from "three";
30
+ import { CSS2DObject as Rt } from "three/examples/jsm/renderers/CSS2DRenderer";
31
+ import { CSS3DObject as Gt, CSS3DSprite as Ft } from "three/examples/jsm/renderers/CSS3DRenderer";
32
+ import { geoBounds as wt, geoContains as Nt, geoDistance as Zt, geoInterpolate as $t } from "d3-geo";
33
33
  import "d3-geo-projection";
34
- import { p as ut, a as Qt } from "./parseVector.module.js";
34
+ import { p as ct, a as qt } from "./parseVector.module.js";
35
35
  import { LineSegmentsGeometry as Kt } from "three/examples/jsm/lines/LineSegmentsGeometry";
36
- import { merge as J, mean as Xt, extent as ht } from "d3-array";
37
- import Yt, { flatten as jt } from "earcut";
38
- import Ht from "@turf/boolean-clockwise";
39
- import Jt from "delaunator";
40
- import te from "@turf/boolean-point-in-polygon";
41
- import { geoVoronoi as ee } from "d3-geo-voronoi";
42
- import { scaleLinear as ft } from "d3-scale";
43
- const ie = (r, t = 1) => {
44
- const e = new H();
36
+ import { merge as H, mean as Qt, extent as ut } from "d3-array";
37
+ import Xt, { flatten as Pt } from "earcut";
38
+ import Yt from "@turf/boolean-clockwise";
39
+ import Ht from "delaunator";
40
+ import Jt from "@turf/boolean-point-in-polygon";
41
+ import { geoVoronoi as te } from "d3-geo-voronoi";
42
+ import { scaleLinear as ht } from "d3-scale";
43
+ const ee = (a, t = 1) => {
44
+ const e = new Y();
45
45
  e.setAttribute(
46
46
  "position",
47
47
  new G(new Array(t * 3).fill(0), 3)
@@ -49,7 +49,7 @@ const ie = (r, t = 1) => {
49
49
  "scaleAtt",
50
50
  new G(new Array(t).fill(1), 1)
51
51
  );
52
- const i = r.material, s = new Tt({
52
+ const i = a.material, s = new It({
53
53
  size: 10,
54
54
  map: i.map,
55
55
  alphaMap: i.alphaMap,
@@ -62,17 +62,17 @@ const ie = (r, t = 1) => {
62
62
  alphaTest: i.alphaTest,
63
63
  sizeAttenuation: !1
64
64
  });
65
- return s.onBeforeCompile = (a) => {
66
- a.vertexShader = `
65
+ return s.onBeforeCompile = (r) => {
66
+ r.vertexShader = `
67
67
  attribute float scaleAtt;
68
- ${a.vertexShader.replace(
68
+ ${r.vertexShader.replace(
69
69
  "gl_PointSize = size;",
70
70
  "gl_PointSize = size * scaleAtt;"
71
71
  )}
72
72
  `;
73
- }, new K(e, s);
73
+ }, new Q(e, s);
74
74
  };
75
- class X {
75
+ class ft {
76
76
  constructor() {
77
77
  this.objectType = "BaseObject", this.userData = {}, this.prefab = !1, this.isInstantiate = !1, this.isBloom = !1, this.materialList = {}, this.useMaterialType = "origin", this.onPointerIndex = [], this.disposeTrack = !0, this.disposeMaterialIfNotUsed = !0;
78
78
  }
@@ -132,22 +132,22 @@ class X {
132
132
  return this.object3d = new Mt(...t), this;
133
133
  }
134
134
  createGroup() {
135
- return this.object3d = new Dt(), this;
135
+ return this.object3d = new Bt(), this;
136
136
  }
137
137
  createPoints(...t) {
138
- return this.object3d = new K(...t), this;
138
+ return this.object3d = new Q(...t), this;
139
139
  }
140
140
  createCSS2DObject(t) {
141
- return this.object3d = new Gt(t), this;
141
+ return this.object3d = new Rt(t), this;
142
142
  }
143
143
  createCSS3DObject(t) {
144
- return this.object3d = new Ft(t), this;
144
+ return this.object3d = new Gt(t), this;
145
145
  }
146
146
  createCSS3DSprite(t) {
147
- return this.object3d = new Zt(t), this;
147
+ return this.object3d = new Ft(t), this;
148
148
  }
149
149
  createSprite(t) {
150
- return this.object3d = new nt(t), this;
150
+ return this.object3d = new st(t), this;
151
151
  }
152
152
  attach(...t) {
153
153
  return [...t].forEach((e) => {
@@ -155,7 +155,7 @@ class X {
155
155
  }), this;
156
156
  }
157
157
  getSize() {
158
- const t = new wt().setFromObject(this.object3d);
158
+ const t = new xt().setFromObject(this.object3d);
159
159
  return {
160
160
  min: t.min,
161
161
  max: t.max,
@@ -172,39 +172,35 @@ class X {
172
172
  return this.instantiate();
173
173
  }
174
174
  instantiate(t, e) {
175
- return st(this, null, function* () {
176
- var d;
177
- const i = t && t.length > 0, s = (d = e == null ? void 0 : e.recursive) != null ? d : !0, { objectType: a, objectOptions: o } = this, [, n] = a.split("#");
178
- let l = e == null ? void 0 : e.create;
179
- l === void 0 && (l = (u) => {
175
+ return it(this, null, function* () {
176
+ var p;
177
+ const i = t && t.length > 0, s = (p = e == null ? void 0 : e.recursive) != null ? p : !0, { objectType: r, objectOptions: l } = this, [, n] = r.split("#");
178
+ let o = e == null ? void 0 : e.create;
179
+ o === void 0 && (o = (u) => {
180
180
  if (this.object3d) {
181
181
  if (i) {
182
182
  const m = t.length;
183
- if (this.object3d instanceof nt)
184
- u.object3d = ie(this.object3d, m);
183
+ if (this.object3d instanceof st)
184
+ u.object3d = ee(this.object3d, m);
185
185
  else {
186
- const f = this.object3d;
187
- u.object3d = new rt(
188
- f.geometry,
189
- f.material,
190
- m
191
- ), u.setMaterialList("instantiate", "clone"), u.useMaterial("instantiate");
186
+ const f = this.object3d, d = this.cloneMaterial();
187
+ u.object3d = new nt(f.geometry, d, m);
192
188
  }
193
189
  const h = new R();
194
- t.forEach((f, p) => {
195
- const g = ut(f.position), w = ut(f.scale || [1, 1, 1]);
196
- h.position.copy(g), h.scale.copy(w), h.updateMatrix(), u.setInstancedMatrix(p, h.matrix.clone());
190
+ t.forEach((f, d) => {
191
+ const g = ct(f.position), w = ct(f.scale || [1, 1, 1]);
192
+ h.position.copy(g), h.scale.copy(w), h.updateMatrix(), u.setInstancedMatrix(d, h.matrix.clone());
197
193
  });
198
194
  } else
199
- u.object3d = this.object3d.clone(!1), u.setMaterialList("instantiate", "clone"), u.useMaterial("instantiate");
195
+ u.object3d = this.object3d.clone(!1), u.object3d.material && (u.object3d.material = this.cloneMaterial());
200
196
  u.object3d.userData.prefab && delete u.object3d.userData.prefab;
201
197
  }
202
198
  });
203
- const c = yield this.lead.draw(n, $(W({}, o || {}), {
204
- create: l,
199
+ const c = yield this.lead.draw(n, Z(W({}, l || {}), {
200
+ create: o,
205
201
  prefab: !1,
206
- key: (e == null ? void 0 : e.key) || (o == null ? void 0 : o.key),
207
- target: (e == null ? void 0 : e.target) || (o == null ? void 0 : o.target)
202
+ key: (e == null ? void 0 : e.key) || (l == null ? void 0 : l.key),
203
+ target: (e == null ? void 0 : e.target) || (l == null ? void 0 : l.target)
208
204
  }));
209
205
  return this.isBloom && c.enableBloom(), s && (yield Promise.all(
210
206
  this.children.map(
@@ -216,11 +212,11 @@ class X {
216
212
  });
217
213
  }
218
214
  setInstancedMatrix(t, e) {
219
- if (this.object3d instanceof rt || this.object3d.isInstantiate)
215
+ if (this.object3d instanceof nt || this.object3d.isInstantiate)
220
216
  this.object3d.setMatrixAt(t, e);
221
- else if (this.object3d instanceof K || this.object3d.type === "Points") {
222
- const s = this.object3d.geometry, a = s.attributes.position.array, o = s.attributes.scaleAtt.array, n = new C(), l = new C(), c = new _t(), d = t * 3, u = t * 1;
223
- e.decompose(n, c, l), a[d] = n.x, a[d + 1] = n.y, a[d + 2] = n.z, o[u] = Math.max(l.x, l.y, l.z), s.attributes.position.needsUpdate = !0, s.attributes.scaleAtt.needsUpdate = !0;
217
+ else if (this.object3d instanceof Q || this.object3d.type === "Points") {
218
+ const s = this.object3d.geometry, r = s.attributes.position.array, l = s.attributes.scaleAtt.array, n = new C(), o = new C(), c = new Lt(), p = t * 3, u = t * 1;
219
+ e.decompose(n, c, o), r[p] = n.x, r[p + 1] = n.y, r[p + 2] = n.z, l[u] = Math.max(o.x, o.y, o.z), s.attributes.position.needsUpdate = !0, s.attributes.scaleAtt.needsUpdate = !0;
224
220
  }
225
221
  }
226
222
  erase() {
@@ -235,8 +231,8 @@ class X {
235
231
  return e.map((i) => {
236
232
  const s = i.userData;
237
233
  i.userData = {};
238
- const a = i.clone();
239
- return i.userData = s, a;
234
+ const r = i.clone();
235
+ return i.userData = s, r;
240
236
  });
241
237
  {
242
238
  const i = e.userData;
@@ -249,19 +245,30 @@ class X {
249
245
  const s = this.object3d;
250
246
  if (!s || !s.material)
251
247
  return;
252
- if (this.materialList.origin || (this.materialList.origin = s.material), this.materialList[t])
253
- if (i) {
254
- const o = this.materialList[t], n = new dt();
255
- n.track(o), n.dispose();
256
- } else
257
- return this.materialList[t];
258
- const a = e === "clone" ? this.cloneMaterial() : e;
259
- return this.materialList[t] = a, a;
248
+ if (this.materialList.origin || (this.materialList.origin = s.material), this.materialList[t] && !i)
249
+ return this.materialList[t];
250
+ const r = e === "clone" ? this.cloneMaterial() : Array.isArray(e) ? e.slice() : e;
251
+ return this.materialList[t] = r, r;
260
252
  }
261
253
  useMaterial(t) {
262
254
  const e = this.object3d;
263
255
  !e || !e.material || this.useMaterialType === t || !this.materialList[t] || (this.useMaterialType = t, e.material = this.materialList[t]);
264
256
  }
257
+ useMListById(t, e) {
258
+ if (!this.mList)
259
+ return;
260
+ const i = this.mList.get(t);
261
+ if (!i)
262
+ return;
263
+ const s = this.object3d;
264
+ Array.isArray(s.material) && e !== void 0 ? s.material[e] = i : s.material = i;
265
+ }
266
+ useMListByName(t, e) {
267
+ if (!this.mList)
268
+ return;
269
+ const i = this.mList.getKeyByName(t);
270
+ i && this.useMListById(i, e);
271
+ }
265
272
  setTop(t) {
266
273
  this.object3d && (this.object3d.renderOrder = t);
267
274
  }
@@ -281,13 +288,17 @@ class X {
281
288
  var t;
282
289
  if (this.onPointerIndex.forEach((e) => {
283
290
  this.lead.removePick(e);
284
- }), this.mList.rmBaseObjectMap(this, void 0, this.disposeMaterialIfNotUsed), (t = this.pencil.composerController) == null || t.bloomSelection.delete(this), this.lead && (this.lead.objects.delete(this.key), this.object3d && this.lead.objMap.delete(this.object3d)), this.disposeTrack) {
285
- const e = new dt();
286
- e.disposeMaterial = !1, e.track(this), e.dispose();
291
+ }), this.pencil.options.mList && this.mList.rmBaseObjectMap(
292
+ this,
293
+ void 0,
294
+ this.disposeMaterialIfNotUsed
295
+ ), (t = this.pencil.composerController) == null || t.bloomSelection.delete(this), this.lead && (this.lead.objects.delete(this.key), this.object3d && this.lead.objMap.delete(this.object3d)), this.disposeTrack) {
296
+ const e = new ie();
297
+ e.disposeMaterial = !this.pencil.options.mList, e.track(this), e.dispose();
287
298
  }
288
299
  }
289
300
  }
290
- class dt {
301
+ class ie {
291
302
  constructor() {
292
303
  this.resources = /* @__PURE__ */ new Set(), this.disposeMaterial = !0, this.disposeVideo = !0;
293
304
  }
@@ -296,32 +307,31 @@ class dt {
296
307
  return t;
297
308
  if (Array.isArray(t))
298
309
  return t.forEach((e) => this.track(e)), t;
299
- if (!this.disposeMaterial && t instanceof at)
310
+ if (!this.disposeMaterial && t instanceof rt)
300
311
  return t;
301
- if (t instanceof X ? (t.disposeTrack && t.object3d ? this.track(t.object3d) : this.resources.add(t), Object.values(t.materialList).map((e) => this.track(e))) : (t instanceof R || Reflect.has(t, "dispose")) && this.resources.add(t), t instanceof X)
312
+ if (t instanceof ft ? (t.disposeTrack && t.object3d ? this.track(t.object3d) : this.resources.add(t), Object.values(t.materialList).map((e) => this.track(e))) : (t instanceof R || Reflect.has(t, "dispose")) && this.resources.add(t), t instanceof ft)
302
313
  t.children.forEach((e) => {
303
314
  e.disposeTrack = !1;
304
315
  }), this.track(t.children);
305
316
  else if (t instanceof R) {
306
317
  const e = t;
307
318
  this.track(e.geometry), this.track(e.material), this.track(e.children);
308
- } else if (t instanceof at) {
319
+ } else if (t instanceof rt) {
309
320
  for (const i of Object.values(t))
310
- i instanceof ot && this.track(i);
321
+ i instanceof at && this.track(i);
311
322
  const e = t;
312
323
  if (e.uniforms) {
313
324
  for (const i of Object.values(e.uniforms))
314
325
  if (i) {
315
326
  const s = i.value;
316
- (s instanceof ot || Array.isArray(s)) && this.track(s);
327
+ (s instanceof at || Array.isArray(s)) && this.track(s);
317
328
  }
318
329
  }
319
- } else this.disposeVideo && t instanceof Bt && t.source.data && this.resources.add(t.source.data);
330
+ } else this.disposeVideo && t instanceof Dt && t.source.data && this.resources.add(t.source.data);
320
331
  return t;
321
332
  }
322
333
  dispose() {
323
334
  const t = [];
324
- console.log("this.resources", this.resources);
325
335
  for (const e of this.resources)
326
336
  e instanceof R ? t.push(e) : e instanceof HTMLVideoElement && e.pause(), Reflect.has(e, "dispose") && e.dispose();
327
337
  t.forEach((e) => {
@@ -329,26 +339,21 @@ class dt {
329
339
  }), t.length = 0, this.resources.clear();
330
340
  }
331
341
  }
332
- class ze extends X {
333
- create() {
334
- this.createGroup();
335
- }
336
- }
337
- const N = new O(), pt = new C(), mt = new C(), b = new O(), y = new O(), T = new O(), q = new C(), Q = new Lt(), x = new Wt(), vt = new C(), U = new wt(), E = new Ot(), D = new O();
338
- let _, L;
339
- function gt(r, t, e) {
340
- return D.set(0, 0, -t, 1).applyMatrix4(r.projectionMatrix), D.multiplyScalar(1 / D.w), D.x = L / e.width, D.y = L / e.height, D.applyMatrix4(r.projectionMatrixInverse), D.multiplyScalar(1 / D.w), Math.abs(Math.max(D.x, D.y));
342
+ const $ = new O(), dt = new C(), pt = new C(), b = new O(), y = new O(), B = new O(), q = new C(), K = new Tt(), M = new _t(), mt = new C(), U = new xt(), E = new Wt(), L = new O();
343
+ let D, _;
344
+ function vt(a, t, e) {
345
+ return L.set(0, 0, -t, 1).applyMatrix4(a.projectionMatrix), L.multiplyScalar(1 / L.w), L.x = _ / e.width, L.y = _ / e.height, L.applyMatrix4(a.projectionMatrixInverse), L.multiplyScalar(1 / L.w), Math.abs(Math.max(L.x, L.y));
341
346
  }
342
- function se(r, t) {
343
- const e = r.matrixWorld, i = r.geometry, s = i.attributes.instanceStart, a = i.attributes.instanceEnd, o = Math.min(i.instanceCount, s.count);
344
- for (let n = 0, l = o; n < l; n++) {
345
- x.start.fromBufferAttribute(s, n), x.end.fromBufferAttribute(a, n), x.applyMatrix4(e);
346
- const c = new C(), d = new C();
347
- _.distanceSqToSegment(x.start, x.end, d, c), d.distanceTo(c) < L * 0.5 && t.push({
348
- point: d,
347
+ function se(a, t) {
348
+ const e = a.matrixWorld, i = a.geometry, s = i.attributes.instanceStart, r = i.attributes.instanceEnd, l = Math.min(i.instanceCount, s.count);
349
+ for (let n = 0, o = l; n < o; n++) {
350
+ M.start.fromBufferAttribute(s, n), M.end.fromBufferAttribute(r, n), M.applyMatrix4(e);
351
+ const c = new C(), p = new C();
352
+ D.distanceSqToSegment(M.start, M.end, p, c), p.distanceTo(c) < _ * 0.5 && t.push({
353
+ point: p,
349
354
  pointOnLine: c,
350
- distance: _.origin.distanceTo(d),
351
- object: r,
355
+ distance: D.origin.distanceTo(p),
356
+ object: a,
352
357
  face: null,
353
358
  faceIndex: n,
354
359
  uv: null,
@@ -356,11 +361,11 @@ function se(r, t) {
356
361
  });
357
362
  }
358
363
  }
359
- function ne(r, t, e) {
360
- const i = t.projectionMatrix, a = r.material.resolution, o = r.matrixWorld, n = r.geometry, l = n.attributes.instanceStart, c = n.attributes.instanceEnd, d = Math.min(n.instanceCount, l.count), u = -t.near;
361
- _.at(1, T), T.w = 1, T.applyMatrix4(t.matrixWorldInverse), T.applyMatrix4(i), T.multiplyScalar(1 / T.w), T.x *= a.x / 2, T.y *= a.y / 2, T.z = 0, q.copy(T), Q.multiplyMatrices(t.matrixWorldInverse, o);
362
- for (let m = 0, h = d; m < h; m++) {
363
- if (b.fromBufferAttribute(l, m), y.fromBufferAttribute(c, m), b.w = 1, y.w = 1, b.applyMatrix4(Q), y.applyMatrix4(Q), b.z > u && y.z > u)
364
+ function ne(a, t, e) {
365
+ const i = t.projectionMatrix, r = a.material.resolution, l = a.matrixWorld, n = a.geometry, o = n.attributes.instanceStart, c = n.attributes.instanceEnd, p = Math.min(n.instanceCount, o.count), u = -t.near;
366
+ D.at(1, B), B.w = 1, B.applyMatrix4(t.matrixWorldInverse), B.applyMatrix4(i), B.multiplyScalar(1 / B.w), B.x *= r.x / 2, B.y *= r.y / 2, B.z = 0, q.copy(B), K.multiplyMatrices(t.matrixWorldInverse, l);
367
+ for (let m = 0, h = p; m < h; m++) {
368
+ if (b.fromBufferAttribute(o, m), y.fromBufferAttribute(c, m), b.w = 1, y.w = 1, b.applyMatrix4(K), y.applyMatrix4(K), b.z > u && y.z > u)
364
369
  continue;
365
370
  if (b.z > u) {
366
371
  const I = b.z - y.z, P = (b.z - u) / I;
@@ -369,18 +374,18 @@ function ne(r, t, e) {
369
374
  const I = y.z - b.z, P = (y.z - u) / I;
370
375
  y.lerp(b, P);
371
376
  }
372
- b.applyMatrix4(i), y.applyMatrix4(i), b.multiplyScalar(1 / b.w), y.multiplyScalar(1 / y.w), b.x *= a.x / 2, b.y *= a.y / 2, y.x *= a.x / 2, y.y *= a.y / 2, x.start.copy(b), x.start.z = 0, x.end.copy(y), x.end.z = 0;
373
- const p = x.closestPointToPointParameter(q, !0);
374
- x.at(p, vt);
375
- const g = kt.lerp(b.z, y.z, p), w = g >= -1 && g <= 1, z = q.distanceTo(vt) < L * 0.5;
377
+ b.applyMatrix4(i), y.applyMatrix4(i), b.multiplyScalar(1 / b.w), y.multiplyScalar(1 / y.w), b.x *= r.x / 2, b.y *= r.y / 2, y.x *= r.x / 2, y.y *= r.y / 2, M.start.copy(b), M.start.z = 0, M.end.copy(y), M.end.z = 0;
378
+ const d = M.closestPointToPointParameter(q, !0);
379
+ M.at(d, mt);
380
+ const g = Vt.lerp(b.z, y.z, d), w = g >= -1 && g <= 1, z = q.distanceTo(mt) < _ * 0.5;
376
381
  if (w && z) {
377
- x.start.fromBufferAttribute(l, m), x.end.fromBufferAttribute(c, m), x.start.applyMatrix4(o), x.end.applyMatrix4(o);
382
+ M.start.fromBufferAttribute(o, m), M.end.fromBufferAttribute(c, m), M.start.applyMatrix4(l), M.end.applyMatrix4(l);
378
383
  const I = new C(), P = new C();
379
- _.distanceSqToSegment(x.start, x.end, P, I), e.push({
384
+ D.distanceSqToSegment(M.start, M.end, P, I), e.push({
380
385
  point: P,
381
386
  pointOnLine: I,
382
- distance: _.origin.distanceTo(P),
383
- object: r,
387
+ distance: D.origin.distanceTo(P),
388
+ object: a,
384
389
  face: null,
385
390
  faceIndex: m,
386
391
  uv: null,
@@ -389,26 +394,26 @@ function ne(r, t, e) {
389
394
  }
390
395
  }
391
396
  }
392
- class Ie extends Mt {
397
+ class ze extends Mt {
393
398
  constructor(t = new Kt(), e) {
394
399
  super(t, e), this.isLineSegments2 = !0, this.type = "LineSegments2";
395
400
  }
396
401
  // for backwards-compatibility, but could be a method of LineSegmentsGeometry...
397
402
  computeLineDistances() {
398
403
  const t = this.geometry, e = t.attributes.instanceStart, i = t.attributes.instanceEnd, s = new Float32Array(2 * e.count);
399
- for (let o = 0, n = 0, l = e.count; o < l; o++, n += 2)
400
- pt.fromBufferAttribute(e, o), mt.fromBufferAttribute(i, o), s[n] = n === 0 ? 0 : s[n - 1], s[n + 1] = s[n] + pt.distanceTo(mt);
401
- const a = new Vt(
404
+ for (let l = 0, n = 0, o = e.count; l < o; l++, n += 2)
405
+ dt.fromBufferAttribute(e, l), pt.fromBufferAttribute(i, l), s[n] = n === 0 ? 0 : s[n - 1], s[n + 1] = s[n] + dt.distanceTo(pt);
406
+ const r = new Ot(
402
407
  s,
403
408
  2,
404
409
  1
405
410
  );
406
411
  return t.setAttribute(
407
412
  "instanceDistanceStart",
408
- new lt(a, 1, 0)
413
+ new ot(r, 1, 0)
409
414
  ), t.setAttribute(
410
415
  "instanceDistanceEnd",
411
- new lt(a, 1, 1)
416
+ new ot(r, 1, 1)
412
417
  ), this;
413
418
  }
414
419
  raycast(t, e) {
@@ -416,49 +421,49 @@ class Ie extends Mt {
416
421
  s === null && !i && console.error(
417
422
  'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'
418
423
  );
419
- const a = t.params.Line2 !== void 0 && t.params.Line2.threshold || 0;
420
- _ = t.ray;
421
- const o = this.matrixWorld, n = this.geometry, l = this.material;
422
- L = l.linewidth + a, n.boundingSphere === null && n.computeBoundingSphere(), E.copy(n.boundingSphere).applyMatrix4(o);
424
+ const r = t.params.Line2 !== void 0 && t.params.Line2.threshold || 0;
425
+ D = t.ray;
426
+ const l = this.matrixWorld, n = this.geometry, o = this.material;
427
+ _ = o.linewidth + r, n.boundingSphere === null && n.computeBoundingSphere(), E.copy(n.boundingSphere).applyMatrix4(l);
423
428
  let c;
424
429
  if (i)
425
- c = L * 0.5;
430
+ c = _ * 0.5;
426
431
  else {
427
432
  const u = Math.max(
428
433
  s.near,
429
- E.distanceToPoint(_.origin)
434
+ E.distanceToPoint(D.origin)
430
435
  );
431
- c = gt(
436
+ c = vt(
432
437
  s,
433
438
  u,
434
- l.resolution
439
+ o.resolution
435
440
  );
436
441
  }
437
- if (E.radius += c, _.intersectsSphere(E) === !1)
442
+ if (E.radius += c, D.intersectsSphere(E) === !1)
438
443
  return;
439
- n.boundingBox === null && n.computeBoundingBox(), U.copy(n.boundingBox).applyMatrix4(o);
440
- let d;
444
+ n.boundingBox === null && n.computeBoundingBox(), U.copy(n.boundingBox).applyMatrix4(l);
445
+ let p;
441
446
  if (i)
442
- d = L * 0.5;
447
+ p = _ * 0.5;
443
448
  else {
444
449
  const u = Math.max(
445
450
  s.near,
446
- U.distanceToPoint(_.origin)
451
+ U.distanceToPoint(D.origin)
447
452
  );
448
- d = gt(
453
+ p = vt(
449
454
  s,
450
455
  u,
451
- l.resolution
456
+ o.resolution
452
457
  );
453
458
  }
454
- U.expandByScalar(d), _.intersectsBox(U) !== !1 && (i ? se(this, e) : ne(this, s, e));
459
+ U.expandByScalar(p), D.intersectsBox(U) !== !1 && (i ? se(this, e) : ne(this, s, e));
455
460
  }
456
461
  onBeforeRender(t) {
457
462
  const e = this.material.uniforms;
458
- e && e.resolution && (t.getViewport(N), this.material.uniforms.resolution.value.set(N.z, N.w));
463
+ e && e.resolution && (t.getViewport($), this.material.uniforms.resolution.value.set($.z, $.w));
459
464
  }
460
465
  }
461
- const bt = ["encodings_fragment", "colorspace_fragment"], re = (
466
+ const gt = ["encodings_fragment", "colorspace_fragment"], re = (
462
467
  /* glsl */
463
468
  `
464
469
  #include <common>
@@ -606,20 +611,20 @@ const bt = ["encodings_fragment", "colorspace_fragment"], re = (
606
611
 
607
612
  #include <fog_fragment>
608
613
  #include <tonemapping_fragment>
609
- #include <${+Rt < 154 ? bt[0] : bt[1]}>
614
+ #include <${+Et < 154 ? gt[0] : gt[1]}>
610
615
  }
611
616
  `
612
617
  );
613
- class Te extends Ut {
618
+ class Ie extends kt {
614
619
  constructor(t) {
615
620
  super({
616
- uniforms: $(W({}, Et.fog), {
621
+ uniforms: Z(W({}, Ut.fog), {
617
622
  lineWidth: { value: 1 },
618
623
  map: { value: null },
619
624
  useMap: { value: 0 },
620
625
  alphaMap: { value: null },
621
626
  useAlphaMap: { value: 0 },
622
- color: { value: new ct(16777215) },
627
+ color: { value: new lt(16777215) },
623
628
  opacity: { value: 1 },
624
629
  resolution: { value: new k(1, 1) },
625
630
  sizeAttenuation: { value: 1 },
@@ -639,7 +644,7 @@ class Te extends Ut {
639
644
  speed: { value: 0.3 },
640
645
  lightWidth: { value: 0.1 },
641
646
  uCenter: { value: new k(0, 0) },
642
- lightColor: { value: new ct(16777215) }
647
+ lightColor: { value: new lt(16777215) }
643
648
  }),
644
649
  vertexShader: re,
645
650
  fragmentShader: ae
@@ -866,90 +871,90 @@ class Te extends Ut {
866
871
  return super.copy(t), this.lineWidth = t.lineWidth, this.map = t.map, this.useMap = t.useMap, this.alphaMap = t.alphaMap, this.useAlphaMap = t.useAlphaMap, this.color.copy(t.color), this.opacity = t.opacity, this.resolution.copy(t.resolution), this.sizeAttenuation = t.sizeAttenuation, this.dashArray = t.dashArray, this.dashOffset = t.dashOffset, this.dashRatio = t.dashRatio, this.useDash = t.useDash, this.visibility = t.visibility, this.alphaTest = t.alphaTest, this.repeat.copy(t.repeat), this;
867
872
  }
868
873
  }
869
- function oe(r, t) {
870
- return r.map((e) => {
874
+ function oe(a, t) {
875
+ return a.map((e) => {
871
876
  const i = [];
872
877
  let s;
873
- return e.forEach((a) => {
878
+ return e.forEach((r) => {
874
879
  if (s) {
875
- const o = Nt(a, s) * 180 / Math.PI;
876
- if (o > t) {
877
- const n = qt(s, a), l = 1 / Math.ceil(o / t);
878
- let c = l;
880
+ const l = Zt(r, s) * 180 / Math.PI;
881
+ if (l > t) {
882
+ const n = $t(s, r), o = 1 / Math.ceil(l / t);
883
+ let c = o;
879
884
  for (; c < 1; )
880
- i.push(n(c)), c += l;
885
+ i.push(n(c)), c += o;
881
886
  }
882
887
  }
883
- i.push(s = a);
888
+ i.push(s = r);
884
889
  }), i;
885
890
  });
886
891
  }
887
- function le(r, { minLng: t, maxLng: e, minLat: i, maxLat: s } = {}) {
888
- const a = Math.round(it(360 / r, 2) / Math.PI), o = (1 + Math.sqrt(5)) / 2, n = (h) => h / o * 360 % 360 - 180, l = (h) => Math.acos(2 * h / a - 1) / Math.PI * 180 - 90, c = (h) => a * (Math.cos((h + 90) * Math.PI / 180) + 1) / 2, d = [
892
+ function le(a, { minLng: t, maxLng: e, minLat: i, maxLat: s } = {}) {
893
+ const r = Math.round(et(360 / a, 2) / Math.PI), l = (1 + Math.sqrt(5)) / 2, n = (h) => h / l * 360 % 360 - 180, o = (h) => Math.acos(2 * h / r - 1) / Math.PI * 180 - 90, c = (h) => r * (Math.cos((h + 90) * Math.PI / 180) + 1) / 2, p = [
889
894
  s !== void 0 ? Math.ceil(c(s)) : 0,
890
- i !== void 0 ? Math.floor(c(i)) : a - 1
895
+ i !== void 0 ? Math.floor(c(i)) : r - 1
891
896
  ], u = t === void 0 && e === void 0 ? () => !0 : t === void 0 ? (h) => h <= e : e === void 0 ? (h) => h >= t : e >= t ? (h) => h >= t && h <= e : (h) => h >= t || h <= e, m = [];
892
- for (let h = d[0]; h <= d[1]; h++) {
897
+ for (let h = p[0]; h <= p[1]; h++) {
893
898
  const f = n(h);
894
- u(f) && m.push([f, l(h)]);
899
+ u(f) && m.push([f, o(h)]);
895
900
  }
896
901
  return m;
897
902
  }
898
- function Y(r, t, e = !1) {
899
- return e ? $t(t, r) : te(r, t);
903
+ function X(a, t, e = !1) {
904
+ return e ? Nt(t, a) : Jt(a, t);
900
905
  }
901
- function ce(r, t) {
902
- const e = { type: "Polygon", coordinates: r }, [[i, s], [a, o]] = Pt(e);
903
- if (Math.min(Math.abs(a - i), Math.abs(o - s)) < t)
906
+ function ce(a, t) {
907
+ const e = { type: "Polygon", coordinates: a }, [[i, s], [r, l]] = wt(e);
908
+ if (Math.min(Math.abs(r - i), Math.abs(l - s)) < t)
904
909
  return [];
905
- const n = i > a || o >= 89 || s <= -89;
910
+ const n = i > r || l >= 89 || s <= -89;
906
911
  return le(t, {
907
912
  minLng: i,
908
- maxLng: a,
913
+ maxLng: r,
909
914
  minLat: s,
910
- maxLat: o
915
+ maxLat: l
911
916
  }).filter(
912
- (l) => Y(l, e, n)
917
+ (o) => X(o, e, n)
913
918
  );
914
919
  }
915
- function ue(r, { resolution: t = 1 / 0, bbox: e, projection: i } = {}) {
916
- const s = oe(r, t), a = J(s), o = ce(r, t), n = [...a, ...o], l = { type: "Polygon", coordinates: r }, [[c, d], [u, m]] = Pt(l), h = c > u || // crosses antimeridian
920
+ function ue(a, { resolution: t = 1 / 0, bbox: e, projection: i } = {}) {
921
+ const s = oe(a, t), r = H(s), l = ce(a, t), n = [...r, ...l], o = { type: "Polygon", coordinates: a }, [[c, p], [u, m]] = wt(o), h = c > u || // crosses antimeridian
917
922
  m >= 89 || // crosses north pole
918
- d <= -89;
923
+ p <= -89;
919
924
  let f = [];
920
925
  if (h) {
921
- const v = ee(n).triangles(), M = new Map(
922
- n.map(([j, A], B) => [`${j}-${A}`, B])
926
+ const v = te(n).triangles(), x = new Map(
927
+ n.map(([j, A], T) => [`${j}-${A}`, T])
923
928
  );
924
929
  v.features.forEach((j) => {
925
- const A = j.geometry.coordinates[0].slice(0, 3).reverse(), B = [];
926
- if (A.forEach(([S, Z]) => {
927
- const V = `${S}-${Z}`;
928
- M.has(V) && B.push(M.get(V));
929
- }), B.length === 3) {
930
- if (B.some((S) => S < a.length)) {
930
+ const A = j.geometry.coordinates[0].slice(0, 3).reverse(), T = [];
931
+ if (A.forEach(([S, N]) => {
932
+ const V = `${S}-${N}`;
933
+ x.has(V) && T.push(x.get(V));
934
+ }), T.length === 3) {
935
+ if (T.some((S) => S < r.length)) {
931
936
  const S = j.properties.circumcenter;
932
- if (!Y(
937
+ if (!X(
933
938
  S,
934
- l,
939
+ o,
935
940
  h
936
941
  ))
937
942
  return;
938
943
  }
939
- f.push(...B);
944
+ f.push(...T);
940
945
  }
941
946
  });
942
- } else if (o.length) {
943
- const v = Jt.from(n);
944
- for (let M = 0, j = v.triangles.length; M < j; M += 3) {
945
- const A = [2, 1, 0].map((S) => v.triangles[M + S]), B = A.map((S) => n[S]);
946
- if (A.some((S) => S < a.length)) {
947
+ } else if (l.length) {
948
+ const v = Ht.from(n);
949
+ for (let x = 0, j = v.triangles.length; x < j; x += 3) {
950
+ const A = [2, 1, 0].map((S) => v.triangles[x + S]), T = A.map((S) => n[S]);
951
+ if (A.some((S) => S < r.length)) {
947
952
  const S = [0, 1].map(
948
- (Z) => Xt(B, (V) => V[Z])
953
+ (N) => Qt(T, (V) => V[N])
949
954
  );
950
- if (!Y(
955
+ if (!X(
951
956
  S,
952
- l,
957
+ o,
953
958
  h
954
959
  ))
955
960
  continue;
@@ -957,127 +962,127 @@ function ue(r, { resolution: t = 1 / 0, bbox: e, projection: i } = {}) {
957
962
  f.push(...A);
958
963
  }
959
964
  } else {
960
- const { vertices: v, holes: M = [] } = jt(s);
961
- f = Yt(v, M, 2);
965
+ const { vertices: v, holes: x = [] } = Pt(s);
966
+ f = Xt(v, x, 2);
962
967
  }
963
- let p = e ? [e[0], e[2]] : ht(n, (v) => v[0]), g = e ? [e[1], e[3]] : ht(n, (v) => v[1]);
968
+ let d = e ? [e[0], e[2]] : ut(n, (v) => v[0]), g = e ? [e[1], e[3]] : ut(n, (v) => v[1]);
964
969
  if (i) {
965
- const [v, M] = i([p[0], g[0]]), [j, A] = i([p[1], g[1]]);
966
- p = [v, j], g = [-M, -A];
970
+ const [v, x] = i([d[0], g[0]]), [j, A] = i([d[1], g[1]]);
971
+ d = [v, j], g = [-x, -A];
967
972
  }
968
- const w = ft(p, [0, 1]), z = ft(g, [0, 1]), I = n.map(([v, M]) => {
973
+ const w = ht(d, [0, 1]), z = ht(g, [0, 1]), I = n.map(([v, x]) => {
969
974
  if (i) {
970
- const [j, A] = i([v, M]);
975
+ const [j, A] = i([v, x]);
971
976
  return [w(j), z(-A)];
972
977
  } else
973
- return [w(v), z(M)];
978
+ return [w(v), z(x)];
974
979
  });
975
980
  return { contour: s, triangles: { points: n, indices: f, uvs: I } };
976
981
  }
977
- const yt = new H().setAttribute ? "setAttribute" : "addAttribute";
978
- function F(r, t, e, i) {
979
- const s = r.map(
980
- (a) => a.map(([o, n]) => {
982
+ const bt = new Y().setAttribute ? "setAttribute" : "addAttribute";
983
+ function F(a, t, e, i) {
984
+ const s = a.map(
985
+ (r) => r.map(([l, n]) => {
981
986
  if (i) {
982
- const [l, c] = i([o, n]);
983
- return [l, -c, t];
987
+ const [o, c] = i([l, n]);
988
+ return [o, -c, t];
984
989
  }
985
- return e ? Qt(o, n, t) : [o, n, t];
990
+ return e ? qt(l, n, t) : [l, n, t];
986
991
  })
987
992
  );
988
- return jt(s);
993
+ return Pt(s);
989
994
  }
990
- function he(r, t, e, i, s) {
991
- const { vertices: a, holes: o } = F(
992
- r,
995
+ function he(a, t, e, i, s) {
996
+ const { vertices: r, holes: l } = F(
997
+ a,
993
998
  t,
994
999
  i,
995
1000
  s
996
1001
  ), { vertices: n } = F(
997
- r,
1002
+ a,
998
1003
  e,
999
1004
  i,
1000
1005
  s
1001
- ), l = J([n, a]), c = Math.round(n.length / 3), d = new Set(o);
1006
+ ), o = H([n, r]), c = Math.round(n.length / 3), p = new Set(l);
1002
1007
  let u = 0;
1003
1008
  const m = [];
1004
1009
  for (let f = 0; f < c; f++) {
1005
- let p = f + 1;
1006
- if (p === c)
1007
- p = u;
1008
- else if (d.has(p)) {
1009
- const g = p;
1010
- p = u, u = g;
1010
+ let d = f + 1;
1011
+ if (d === c)
1012
+ d = u;
1013
+ else if (p.has(d)) {
1014
+ const g = d;
1015
+ d = u, u = g;
1011
1016
  }
1012
- m.push(f, f + c, p + c), m.push(p + c, p, f);
1017
+ m.push(f, f + c, d + c), m.push(d + c, d, f);
1013
1018
  }
1014
1019
  const h = [];
1015
1020
  for (let f = 1; f >= 0; f--)
1016
- for (let p = 0; p < c; p += 1) h.push(p / (c - 1), f);
1017
- return { indices: m, vertices: l, uvs: h, topVerts: n };
1021
+ for (let d = 0; d < c; d += 1) h.push(d / (c - 1), f);
1022
+ return { indices: m, vertices: o, uvs: h, topVerts: n };
1018
1023
  }
1019
- function xt(r, t, e, i, s, a) {
1024
+ function yt(a, t, e, i, s, r) {
1020
1025
  return {
1021
- indices: i ? r.indices : r.indices.slice().reverse(),
1026
+ indices: i ? a.indices : a.indices.slice().reverse(),
1022
1027
  vertices: F(
1023
- [r.points],
1028
+ [a.points],
1024
1029
  t,
1025
1030
  s,
1026
- a
1031
+ r
1027
1032
  ).vertices,
1028
1033
  uvs: e
1029
1034
  };
1030
1035
  }
1031
1036
  const fe = ({
1032
- polygonGeoJson: r,
1037
+ polygonGeoJson: a,
1033
1038
  startHeight: t,
1034
1039
  endHeight: e,
1035
1040
  curvatureResolution: i = 1,
1036
1041
  cartesian: s = !0,
1037
- hasSide: a = !0,
1038
- hasBottom: o = !1,
1042
+ hasSide: r = !0,
1043
+ hasBottom: l = !1,
1039
1044
  hasTop: n = !1,
1040
- projection: l,
1045
+ projection: o,
1041
1046
  bbox: c
1042
1047
  }) => {
1043
- r.forEach((w) => {
1044
- Ht(w) || w.reverse();
1048
+ a.forEach((w) => {
1049
+ Yt(w) || w.reverse();
1045
1050
  });
1046
- const { contour: d, triangles: u } = ue(r, {
1051
+ const { contour: p, triangles: u } = ue(a, {
1047
1052
  resolution: i,
1048
1053
  bbox: c,
1049
- projection: l
1054
+ projection: o
1050
1055
  });
1051
1056
  let m = {}, h;
1052
- a && (m = he(
1053
- d,
1057
+ r && (m = he(
1058
+ p,
1054
1059
  t != null ? t : e,
1055
1060
  e != null ? e : t,
1056
1061
  s,
1057
- l
1062
+ o
1058
1063
  ), h = m.topVerts);
1059
1064
  let f = [];
1060
- (o || n) && (f = J(u.uvs));
1061
- let p = {};
1062
- o && (p = xt(
1065
+ (l || n) && (f = H(u.uvs));
1066
+ let d = {};
1067
+ l && (d = yt(
1063
1068
  u,
1064
1069
  t,
1065
1070
  f,
1066
1071
  !1,
1067
1072
  s,
1068
- l
1073
+ o
1069
1074
  ));
1070
1075
  let g = {};
1071
- return n && (g = xt(
1076
+ return n && (g = yt(
1072
1077
  u,
1073
1078
  e,
1074
1079
  f,
1075
1080
  !0,
1076
1081
  s,
1077
- l
1078
- )), { contour: d, triangles: u, sideTorso: m, bottomCap: p, topCap: g, topVerts: h };
1082
+ o
1083
+ )), { contour: p, triangles: u, sideTorso: m, bottomCap: d, topCap: g, topVerts: h };
1079
1084
  };
1080
- class De extends H {
1085
+ class Be extends Y {
1081
1086
  constructor(t, e = {}) {
1082
1087
  super(), this.type = "PolygonBufferGeometry", this.parameters = W({
1083
1088
  polygonGeoJson: t,
@@ -1094,34 +1099,33 @@ class De extends H {
1094
1099
  const {
1095
1100
  endHeight: i,
1096
1101
  hasTop: s,
1097
- topFirst: a,
1098
- hasBottom: o,
1102
+ topFirst: r,
1103
+ hasBottom: l,
1099
1104
  hasSide: n,
1100
- cartesian: l,
1105
+ cartesian: o,
1101
1106
  userDataRsoOffset: c,
1102
- projection: d
1103
- } = this.parameters, { contour: u, sideTorso: m, topVerts: h, bottomCap: f, topCap: p } = fe(W({}, this.parameters));
1107
+ projection: p
1108
+ } = this.parameters, { contour: u, sideTorso: m, topVerts: h, bottomCap: f, topCap: d } = fe(W({}, this.parameters));
1104
1109
  let g = [], w = [], z = [], I = 0;
1105
1110
  const P = (v) => {
1106
- const M = Math.round(g.length / 3), j = z.length;
1111
+ const x = Math.round(g.length / 3), j = z.length;
1107
1112
  g = g.concat(v.vertices), w = w.concat(v.uvs), z = z.concat(
1108
- M ? v.indices.map((A) => A + M) : v.indices
1113
+ x ? v.indices.map((A) => A + x) : v.indices
1109
1114
  ), this.addGroup(j, z.length - j, I++);
1110
1115
  };
1111
- s && a && P(p), n && (P(m), this.userData.topVerts = c ? F(
1116
+ s && r && P(d), n && (P(m), this.userData.topVerts = c ? F(
1112
1117
  u,
1113
1118
  i + c,
1114
- l,
1115
- d
1116
- ).vertices : h), o && P(f), s && !a && P(p), this.setIndex(z), this[yt]("position", new G(g, 3)), this[yt]("uv", new G(w, 2)), this.computeVertexNormals();
1119
+ o,
1120
+ p
1121
+ ).vertices : h), l && P(f), s && !r && P(d), this.setIndex(z), this[bt]("position", new G(g, 3)), this[bt]("uv", new G(w, 2)), this.computeVertexNormals();
1117
1122
  }
1118
1123
  }
1119
1124
  export {
1120
- X as B,
1121
- ze as G,
1122
- Ie as L,
1123
- Te as M,
1124
- De as P,
1125
- dt as R,
1125
+ ft as B,
1126
+ ze as L,
1127
+ Ie as M,
1128
+ Be as P,
1129
+ ie as R,
1126
1130
  fe as g
1127
1131
  };