gl-draw 0.15.0-beta.3 → 0.15.0-beta.30
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/constants.d.ts +1 -0
- package/dist/core/BaseObject/PointerEvent.d.ts +13 -0
- package/dist/core/BaseObject/UseMaterial.d.ts +23 -0
- package/dist/core/{BaseObject.d.ts → BaseObject/index.d.ts} +24 -29
- package/dist/core/Composer.d.ts +5 -5
- package/dist/core/Lead/Lead.d.ts +17 -10
- package/dist/core/Lead/Pick.d.ts +2 -1
- package/dist/core/MList/MList.d.ts +11 -5
- package/dist/core/Pencil.d.ts +12 -10
- package/dist/core/Renderer.d.ts +0 -1
- package/dist/core/ResourceTracker.d.ts +4 -6
- package/dist/index.js +23 -23
- package/dist/index.module.js +1702 -1562
- package/dist/index.module2.js +641 -787
- package/dist/index2.js +130 -140
- package/dist/objects/conicPolygon/geometry/index.d.ts +4 -4
- package/dist/objects/extrudePolygon/ExtrudeGeometry.d.ts +1 -1
- package/dist/objects/extrudePolygon/createGeometry.d.ts +9 -13
- package/dist/objects/index.js +1 -1
- package/dist/objects/index.module.js +811 -783
- package/dist/objects/line/createGeometry.d.ts +2 -2
- package/dist/objects/line/index.d.ts +4 -4
- package/dist/objects/line/meshLine/MeshLineGeometry.d.ts +16 -35
- package/dist/objects/line/meshLine/MeshLineMaterial.d.ts +59 -40
- package/dist/objects/line/meshLine/fragment.d.ts +1 -0
- package/dist/objects/line/meshLine/utils.d.ts +4 -0
- package/dist/objects/line/meshLine/vertex.d.ts +1 -0
- package/dist/objects/line2/WebGPULineSegments2.d.ts +1 -1
- package/dist/objects/line2/createGeometry.d.ts +1 -1
- package/dist/objects/pie/index.d.ts +9 -13
- package/dist/plugins/Worker/createGeometry.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/index.module.js +36 -36
- package/dist/utils/Sprite2Points.d.ts +1 -1
- package/dist/utils/setInstancedAttr.d.ts +6 -0
- package/package.json +1 -1
- package/dist/objects/scene/index.d.ts +0 -11
|
@@ -1,360 +1,365 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
for (var s in
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var s of
|
|
19
|
-
|
|
20
|
-
return
|
|
1
|
+
var Ze = Object.defineProperty, Je = Object.defineProperties;
|
|
2
|
+
var Qe = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var he = Object.getOwnPropertySymbols;
|
|
4
|
+
var Be = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ze = (l, e, t) => e in l ? Ze(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, C = (l, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
Be.call(e, t) && ze(l, t, e[t]);
|
|
8
|
+
if (he)
|
|
9
|
+
for (var t of he(e))
|
|
10
|
+
Oe.call(e, t) && ze(l, t, e[t]);
|
|
11
|
+
return l;
|
|
12
|
+
}, ue = (l, e) => Je(l, Qe(e));
|
|
13
|
+
var ye = (l, e) => {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var s in l)
|
|
16
|
+
Be.call(l, s) && e.indexOf(s) < 0 && (t[s] = l[s]);
|
|
17
|
+
if (l != null && he)
|
|
18
|
+
for (var s of he(l))
|
|
19
|
+
e.indexOf(s) < 0 && Oe.call(l, s) && (t[s] = l[s]);
|
|
20
|
+
return t;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var oe = (l, e, t) => new Promise((s, n) => {
|
|
23
|
+
var i = (r) => {
|
|
24
24
|
try {
|
|
25
|
-
|
|
26
|
-
} catch (
|
|
27
|
-
|
|
25
|
+
m(t.next(r));
|
|
26
|
+
} catch (g) {
|
|
27
|
+
n(g);
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, c = (r) => {
|
|
30
30
|
try {
|
|
31
|
-
|
|
32
|
-
} catch (
|
|
33
|
-
|
|
31
|
+
m(t.throw(r));
|
|
32
|
+
} catch (g) {
|
|
33
|
+
n(g);
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
35
|
+
}, m = (r) => r.done ? s(r.value) : Promise.resolve(r.value).then(i, c);
|
|
36
|
+
m((t = t.apply(l, e)).next());
|
|
37
37
|
});
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { BufferGeometry as
|
|
41
|
-
import * as
|
|
42
|
-
import { RectAreaLightUniformsLib as
|
|
43
|
-
import { mergeAttributes as
|
|
44
|
-
import { LineSegments2 as
|
|
45
|
-
import { LineSegmentsGeometry as
|
|
46
|
-
import { LineSegmentsGeometry as
|
|
47
|
-
import { LineMaterial as
|
|
48
|
-
import { LineMaterial as
|
|
49
|
-
import { g as
|
|
50
|
-
import { Brush as
|
|
51
|
-
class
|
|
52
|
-
constructor(
|
|
53
|
-
super(), this.objectType = "BaseObject#Node", this.onNodePointerIndex = [], this.options =
|
|
38
|
+
import { a as q, L as Ke, M as et, P as tt } from "../index.module2.js";
|
|
39
|
+
import { g as ls } from "../index.module2.js";
|
|
40
|
+
import { BufferGeometry as fe, Float32BufferAttribute as xe, Vector3 as R, ShapeUtils as de, Shape as we, Vector2 as G, ArcCurve as st, CatmullRomCurve3 as nt, CubicBezierCurve as ot, CubicBezierCurve3 as it, EllipseCurve as rt, LineCurve as at, LineCurve3 as ct, QuadraticBezierCurve as lt, QuadraticBezierCurve3 as ht, SplineCurve as ut, MeshBasicMaterial as dt, Mesh as ft, AmbientLight as mt, DirectionalLight as pt, PointLight as gt, SpotLight as yt, HemisphereLight as bt, RectAreaLight as xt, LineSegments as wt, Color as ke, Matrix4 as vt, BufferAttribute as $, Box3 as St, PlaneGeometry as At, CanvasTexture as Mt } from "three";
|
|
41
|
+
import * as te from "@tweenjs/tween.js";
|
|
42
|
+
import { RectAreaLightUniformsLib as Lt } from "three/examples/jsm/lights/RectAreaLightUniformsLib";
|
|
43
|
+
import { mergeAttributes as Ue, mergeGroups as Tt } from "three/examples/jsm/utils/BufferGeometryUtils";
|
|
44
|
+
import { LineSegments2 as Et } from "three/examples/jsm/lines/LineSegments2";
|
|
45
|
+
import { LineSegmentsGeometry as _t } from "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
46
|
+
import { LineSegmentsGeometry as us } from "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
47
|
+
import { LineMaterial as Gt } from "three/examples/jsm/lines/LineMaterial";
|
|
48
|
+
import { LineMaterial as fs } from "three/examples/jsm/lines/LineMaterial";
|
|
49
|
+
import { g as Pt, c as Ct } from "../uvGenerator.module.js";
|
|
50
|
+
import { Brush as Re, Evaluator as jt, INTERSECTION as It } from "three-bvh-csg";
|
|
51
|
+
class Jt extends q {
|
|
52
|
+
constructor(e) {
|
|
53
|
+
super(), this.objectType = "BaseObject#Node", this.onNodePointerIndex = [], this.options = C({
|
|
54
54
|
type: "2d"
|
|
55
|
-
},
|
|
55
|
+
}, e);
|
|
56
56
|
}
|
|
57
57
|
create() {
|
|
58
|
-
const { position:
|
|
59
|
-
this.element = s,
|
|
58
|
+
const { position: e, children: t } = this.options, s = document.createElement("div");
|
|
59
|
+
this.element = s, t && s.appendChild(t), this.options.type === "3d" ? this.createCSS3DObject(s) : this.options.type === "3dSprite" ? this.createCSS3DSprite(s) : this.createCSS2DObject(s), e && this.object3d.position.copy(e);
|
|
60
60
|
}
|
|
61
|
-
setChildren(
|
|
62
|
-
this.options.children =
|
|
61
|
+
setChildren(e) {
|
|
62
|
+
this.options.children = e, this.element.innerHTML = "", this.element.appendChild(e);
|
|
63
63
|
}
|
|
64
64
|
showAndEnsureVisible() {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
const e = this.options.children;
|
|
66
|
+
e && (e.style.visibility = "hidden", this.show(), setTimeout(() => {
|
|
67
|
+
e.style.visibility = "", this.ensureVisible();
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
70
|
moveElementToViewport() {
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
|
|
71
|
+
const e = this.options.children;
|
|
72
|
+
if (!e) return;
|
|
73
|
+
const t = e.getBoundingClientRect(), s = window.innerWidth, n = window.innerHeight;
|
|
74
|
+
let i = 0, c = 0;
|
|
75
|
+
t.left < 0 ? i = -t.left : t.right > s && (i = s - t.right), t.top < 0 ? c = -t.top : t.bottom > n && (c = n - t.bottom), t.left + i < 0 && (i = -t.left), t.top + c < 0 && (c = -t.top), (i !== 0 || c !== 0) && (e.style.transform = `translate(${i}px, ${c}px)`);
|
|
76
76
|
}
|
|
77
77
|
ensureVisible() {
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
s.forEach((
|
|
83
|
-
|
|
78
|
+
const e = this.options.children;
|
|
79
|
+
if (!e) return;
|
|
80
|
+
e.style.transform && (e.style.transform = "");
|
|
81
|
+
const t = new IntersectionObserver((s) => {
|
|
82
|
+
s.forEach((n) => {
|
|
83
|
+
n.isIntersecting && (this.moveElementToViewport(), t.disconnect());
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
|
-
|
|
86
|
+
t.observe(e);
|
|
87
87
|
}
|
|
88
|
-
onPointerEvent(
|
|
89
|
-
const s = this.lead.handlePickNode([this],
|
|
88
|
+
onPointerEvent(e, t) {
|
|
89
|
+
const s = this.lead.handlePickNode([this], e, t);
|
|
90
90
|
this.onNodePointerIndex.push(s);
|
|
91
91
|
}
|
|
92
92
|
dispose() {
|
|
93
|
-
this.onNodePointerIndex.forEach((
|
|
94
|
-
this.lead.removePickNode(
|
|
93
|
+
this.onNodePointerIndex.forEach((e) => {
|
|
94
|
+
this.lead.removePickNode(e);
|
|
95
95
|
}), super.dispose();
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
98
|
+
class Qt extends q {
|
|
99
|
+
create() {
|
|
100
|
+
this.createGroup();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const zt = {
|
|
104
|
+
ArcCurve: st,
|
|
105
|
+
CatmullRomCurve3: nt,
|
|
106
|
+
CubicBezierCurve: ot,
|
|
107
|
+
CubicBezierCurve3: it,
|
|
108
|
+
EllipseCurve: rt,
|
|
109
|
+
LineCurve: at,
|
|
110
|
+
LineCurve3: ct,
|
|
111
|
+
QuadraticBezierCurve: lt,
|
|
112
|
+
QuadraticBezierCurve3: ht,
|
|
113
|
+
SplineCurve: ut
|
|
109
114
|
};
|
|
110
|
-
class
|
|
115
|
+
class Q extends fe {
|
|
111
116
|
/**
|
|
112
117
|
* Constructs a new extrude geometry.
|
|
113
118
|
*
|
|
114
119
|
* @param {Shape|Array<Shape>} [shapes] - A shape or an array of shapes.
|
|
115
120
|
* @param {ExtrudeGeometry~Options} [options] - The extrude settings.
|
|
116
121
|
*/
|
|
117
|
-
constructor(
|
|
118
|
-
new
|
|
119
|
-
new
|
|
120
|
-
new
|
|
121
|
-
new
|
|
122
|
-
]),
|
|
122
|
+
constructor(e = new we([
|
|
123
|
+
new G(0.5, 0.5),
|
|
124
|
+
new G(-0.5, 0.5),
|
|
125
|
+
new G(-0.5, -0.5),
|
|
126
|
+
new G(0.5, -0.5)
|
|
127
|
+
]), t = {}) {
|
|
123
128
|
super(), this.type = "ExtrudeGeometry", this.parameters = {
|
|
124
|
-
shapes:
|
|
125
|
-
options:
|
|
126
|
-
},
|
|
127
|
-
const s = this,
|
|
128
|
-
for (let
|
|
129
|
-
const
|
|
130
|
-
|
|
129
|
+
shapes: e,
|
|
130
|
+
options: t
|
|
131
|
+
}, e = Array.isArray(e) ? e : [e];
|
|
132
|
+
const s = this, n = [], i = [];
|
|
133
|
+
for (let m = 0, r = e.length; m < r; m++) {
|
|
134
|
+
const g = e[m];
|
|
135
|
+
c(g);
|
|
131
136
|
}
|
|
132
|
-
this.setAttribute("position", new
|
|
133
|
-
function
|
|
134
|
-
var
|
|
135
|
-
const
|
|
136
|
-
let
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
let B =
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
137
|
+
this.setAttribute("position", new xe(n, 3)), this.setAttribute("uv", new xe(i, 2)), this.computeVertexNormals();
|
|
138
|
+
function c(m) {
|
|
139
|
+
var Te, Ee, _e;
|
|
140
|
+
const r = [], g = t.curveSegments !== void 0 ? t.curveSegments : 12, o = t.steps !== void 0 ? t.steps : 1, a = t.depth !== void 0 ? t.depth : 1;
|
|
141
|
+
let b = t.bevelEnabled !== void 0 ? t.bevelEnabled : !0, u = t.bevelThickness !== void 0 ? t.bevelThickness : 0.2, x = t.bevelSize !== void 0 ? t.bevelSize : u - 0.1, L = t.bevelOffset !== void 0 ? t.bevelOffset : 0, M = t.bevelSegments !== void 0 ? t.bevelSegments : 3;
|
|
142
|
+
const A = t.extrudePath, P = t.UVGenerator !== void 0 ? t.UVGenerator : Bt, v = (Te = t.hasTop) != null ? Te : !0, O = (Ee = t.hasBottom) != null ? Ee : !0, me = (_e = t.hasSide) != null ? _e : !0;
|
|
143
|
+
let X, K = !1, Y, se, ne, H;
|
|
144
|
+
A && (X = A.getSpacedPoints(o), K = !0, b = !1, Y = A.computeFrenetFrames(o, !1), se = new R(), ne = new R(), H = new R()), b || (M = 0, u = 0, x = 0, L = 0);
|
|
145
|
+
const ve = m.extractPoints(g);
|
|
146
|
+
let B = ve.shape;
|
|
147
|
+
const j = ve.holes;
|
|
148
|
+
if (!de.isClockWise(B)) {
|
|
144
149
|
B = B.reverse();
|
|
145
|
-
for (let
|
|
146
|
-
const
|
|
147
|
-
|
|
150
|
+
for (let h = 0, d = j.length; h < d; h++) {
|
|
151
|
+
const f = j[h];
|
|
152
|
+
de.isClockWise(f) && (j[h] = f.reverse());
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
|
-
function
|
|
151
|
-
const
|
|
152
|
-
let
|
|
153
|
-
for (let
|
|
154
|
-
const
|
|
155
|
-
Math.abs(
|
|
156
|
-
Math.abs(
|
|
157
|
-
Math.abs(
|
|
158
|
-
Math.abs(
|
|
159
|
-
),
|
|
160
|
-
if (
|
|
161
|
-
|
|
155
|
+
function Se(h) {
|
|
156
|
+
const f = 10000000000000001e-36;
|
|
157
|
+
let y = h[0];
|
|
158
|
+
for (let p = 1; p <= h.length; p++) {
|
|
159
|
+
const S = p % h.length, w = h[S], T = w.x - y.x, E = w.y - y.y, _ = T * T + E * E, I = Math.max(
|
|
160
|
+
Math.abs(w.x),
|
|
161
|
+
Math.abs(w.y),
|
|
162
|
+
Math.abs(y.x),
|
|
163
|
+
Math.abs(y.y)
|
|
164
|
+
), J = f * I * I;
|
|
165
|
+
if (_ <= J) {
|
|
166
|
+
h.splice(S, 1), p--;
|
|
162
167
|
continue;
|
|
163
168
|
}
|
|
164
|
-
|
|
169
|
+
y = w;
|
|
165
170
|
}
|
|
166
171
|
}
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
for (let
|
|
170
|
-
const d =
|
|
172
|
+
Se(B), j.forEach(Se);
|
|
173
|
+
const pe = j.length, U = B;
|
|
174
|
+
for (let h = 0; h < pe; h++) {
|
|
175
|
+
const d = j[h];
|
|
171
176
|
B = B.concat(d);
|
|
172
177
|
}
|
|
173
|
-
function
|
|
174
|
-
return d || console.error("THREE.ExtrudeGeometry: vec does not exist"),
|
|
178
|
+
function ee(h, d, f) {
|
|
179
|
+
return d || console.error("THREE.ExtrudeGeometry: vec does not exist"), h.clone().addScaledVector(d, f);
|
|
175
180
|
}
|
|
176
|
-
const
|
|
177
|
-
function
|
|
178
|
-
let
|
|
179
|
-
const
|
|
180
|
-
if (Math.abs(
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
),
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
return new
|
|
188
|
-
|
|
181
|
+
const V = B.length;
|
|
182
|
+
function Ae(h, d, f) {
|
|
183
|
+
let y, p, S;
|
|
184
|
+
const w = h.x - d.x, T = h.y - d.y, E = f.x - h.x, _ = f.y - h.y, I = w * w + T * T, J = w * _ - T * E;
|
|
185
|
+
if (Math.abs(J) > Number.EPSILON) {
|
|
186
|
+
const z = Math.sqrt(I), Ge = Math.sqrt(
|
|
187
|
+
E * E + _ * _
|
|
188
|
+
), Pe = d.x - T / z, Ce = d.y + w / z, Xe = f.x - _ / Ge, Ye = f.y + E / Ge, je = ((Xe - Pe) * _ - (Ye - Ce) * E) / (w * _ - T * E);
|
|
189
|
+
y = Pe + w * je - h.x, p = Ce + T * je - h.y;
|
|
190
|
+
const Ie = y * y + p * p;
|
|
191
|
+
if (Ie <= 2)
|
|
192
|
+
return new G(y, p);
|
|
193
|
+
S = Math.sqrt(Ie / 2);
|
|
189
194
|
} else {
|
|
190
|
-
let
|
|
191
|
-
|
|
195
|
+
let z = !1;
|
|
196
|
+
w > Number.EPSILON ? E > Number.EPSILON && (z = !0) : w < -Number.EPSILON ? E < -Number.EPSILON && (z = !0) : Math.sign(T) === Math.sign(_) && (z = !0), z ? (y = -T, p = w, S = Math.sqrt(I)) : (y = w, p = T, S = Math.sqrt(I / 2));
|
|
192
197
|
}
|
|
193
|
-
return new
|
|
198
|
+
return new G(y / S, p / S);
|
|
194
199
|
}
|
|
195
|
-
const
|
|
196
|
-
for (let
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
let
|
|
200
|
-
for (let
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
for (let
|
|
204
|
-
|
|
205
|
-
|
|
200
|
+
const re = [];
|
|
201
|
+
for (let h = 0, d = U.length, f = d - 1, y = h + 1; h < d; h++, f++, y++)
|
|
202
|
+
f === d && (f = 0), y === d && (y = 0), re[h] = Ae(U[h], U[f], U[y]);
|
|
203
|
+
const ge = [];
|
|
204
|
+
let F, ae = re.concat();
|
|
205
|
+
for (let h = 0, d = pe; h < d; h++) {
|
|
206
|
+
const f = j[h];
|
|
207
|
+
F = [];
|
|
208
|
+
for (let y = 0, p = f.length, S = p - 1, w = y + 1; y < p; y++, S++, w++)
|
|
209
|
+
S === p && (S = 0), w === p && (w = 0), F[y] = Ae(f[y], f[S], f[w]);
|
|
210
|
+
ge.push(F), ae = ae.concat(F);
|
|
206
211
|
}
|
|
207
|
-
let
|
|
208
|
-
if (
|
|
209
|
-
|
|
212
|
+
let Z;
|
|
213
|
+
if (M === 0)
|
|
214
|
+
Z = de.triangulateShape(U, j);
|
|
210
215
|
else {
|
|
211
|
-
const
|
|
212
|
-
for (let
|
|
213
|
-
const
|
|
214
|
-
for (let
|
|
215
|
-
const
|
|
216
|
-
|
|
216
|
+
const h = [], d = [];
|
|
217
|
+
for (let f = 0; f < M; f++) {
|
|
218
|
+
const y = f / M, p = u * Math.cos(y * Math.PI / 2), S = x * Math.sin(y * Math.PI / 2) + L;
|
|
219
|
+
for (let w = 0, T = U.length; w < T; w++) {
|
|
220
|
+
const E = ee(U[w], re[w], S);
|
|
221
|
+
N(E.x, E.y, -p), y === 0 && h.push(E);
|
|
217
222
|
}
|
|
218
|
-
for (let
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
for (let
|
|
223
|
-
const
|
|
224
|
-
|
|
223
|
+
for (let w = 0, T = pe; w < T; w++) {
|
|
224
|
+
const E = j[w];
|
|
225
|
+
F = ge[w];
|
|
226
|
+
const _ = [];
|
|
227
|
+
for (let I = 0, J = E.length; I < J; I++) {
|
|
228
|
+
const z = ee(E[I], F[I], S);
|
|
229
|
+
N(z.x, z.y, -p), y === 0 && _.push(z);
|
|
225
230
|
}
|
|
226
|
-
|
|
231
|
+
y === 0 && d.push(_);
|
|
227
232
|
}
|
|
228
233
|
}
|
|
229
|
-
|
|
230
|
-
|
|
234
|
+
Z = de.triangulateShape(
|
|
235
|
+
h,
|
|
231
236
|
d
|
|
232
237
|
);
|
|
233
238
|
}
|
|
234
|
-
const
|
|
235
|
-
for (let
|
|
236
|
-
const d =
|
|
237
|
-
K ? (
|
|
239
|
+
const ce = Z.length, Me = x + L;
|
|
240
|
+
for (let h = 0; h < V; h++) {
|
|
241
|
+
const d = b ? ee(B[h], ae[h], Me) : B[h];
|
|
242
|
+
K ? (ne.copy(Y.normals[0]).multiplyScalar(d.x), se.copy(Y.binormals[0]).multiplyScalar(d.y), H.copy(X[0]).add(ne).add(se), N(H.x, H.y, H.z)) : N(d.x, d.y, 0);
|
|
238
243
|
}
|
|
239
|
-
for (let
|
|
240
|
-
for (let d = 0; d <
|
|
241
|
-
const
|
|
242
|
-
K ? (
|
|
244
|
+
for (let h = 1; h <= o; h++)
|
|
245
|
+
for (let d = 0; d < V; d++) {
|
|
246
|
+
const f = b ? ee(B[d], ae[d], Me) : B[d];
|
|
247
|
+
K ? (ne.copy(Y.normals[h]).multiplyScalar(f.x), se.copy(Y.binormals[h]).multiplyScalar(f.y), H.copy(X[h]).add(ne).add(se), N(H.x, H.y, H.z)) : N(f.x, f.y, a / o * h);
|
|
243
248
|
}
|
|
244
|
-
for (let
|
|
245
|
-
const d =
|
|
246
|
-
for (let
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
+
for (let h = M - 1; h >= 0; h--) {
|
|
250
|
+
const d = h / M, f = u * Math.cos(d * Math.PI / 2), y = x * Math.sin(d * Math.PI / 2) + L;
|
|
251
|
+
for (let p = 0, S = U.length; p < S; p++) {
|
|
252
|
+
const w = ee(U[p], re[p], y);
|
|
253
|
+
N(w.x, w.y, a + f);
|
|
249
254
|
}
|
|
250
|
-
for (let
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
for (let
|
|
254
|
-
const
|
|
255
|
-
K ?
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
) :
|
|
255
|
+
for (let p = 0, S = j.length; p < S; p++) {
|
|
256
|
+
const w = j[p];
|
|
257
|
+
F = ge[p];
|
|
258
|
+
for (let T = 0, E = w.length; T < E; T++) {
|
|
259
|
+
const _ = ee(w[T], F[T], y);
|
|
260
|
+
K ? N(
|
|
261
|
+
_.x,
|
|
262
|
+
_.y + X[o - 1].y,
|
|
263
|
+
X[o - 1].x + f
|
|
264
|
+
) : N(_.x, _.y, a + f);
|
|
260
265
|
}
|
|
261
266
|
}
|
|
262
267
|
}
|
|
263
|
-
|
|
264
|
-
function
|
|
265
|
-
const
|
|
266
|
-
if (
|
|
267
|
-
let d = 0,
|
|
268
|
-
if (
|
|
269
|
-
for (let
|
|
270
|
-
const
|
|
271
|
-
|
|
268
|
+
Fe(), me && $e();
|
|
269
|
+
function Fe() {
|
|
270
|
+
const h = n.length / 3;
|
|
271
|
+
if (b) {
|
|
272
|
+
let d = 0, f = V * d;
|
|
273
|
+
if (O)
|
|
274
|
+
for (let y = 0; y < ce; y++) {
|
|
275
|
+
const p = Z[y];
|
|
276
|
+
le(p[2] + f, p[1] + f, p[0] + f);
|
|
272
277
|
}
|
|
273
|
-
if (d = o +
|
|
274
|
-
for (let
|
|
275
|
-
const
|
|
276
|
-
|
|
278
|
+
if (d = o + M * 2, f = V * d, v)
|
|
279
|
+
for (let y = 0; y < ce; y++) {
|
|
280
|
+
const p = Z[y];
|
|
281
|
+
le(p[0] + f, p[1] + f, p[2] + f);
|
|
277
282
|
}
|
|
278
283
|
} else {
|
|
279
|
-
if (
|
|
280
|
-
for (let d = 0; d <
|
|
281
|
-
const
|
|
282
|
-
|
|
284
|
+
if (O)
|
|
285
|
+
for (let d = 0; d < ce; d++) {
|
|
286
|
+
const f = Z[d];
|
|
287
|
+
le(f[2], f[1], f[0]);
|
|
283
288
|
}
|
|
284
289
|
if (v)
|
|
285
|
-
for (let d = 0; d <
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
for (let d = 0; d < ce; d++) {
|
|
291
|
+
const f = Z[d];
|
|
292
|
+
le(
|
|
293
|
+
f[0] + V * o,
|
|
294
|
+
f[1] + V * o,
|
|
295
|
+
f[2] + V * o
|
|
291
296
|
);
|
|
292
297
|
}
|
|
293
298
|
}
|
|
294
|
-
s.addGroup(
|
|
299
|
+
s.addGroup(h, n.length / 3 - h, 0);
|
|
295
300
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
301
|
+
function $e() {
|
|
302
|
+
const h = n.length / 3;
|
|
298
303
|
let d = 0;
|
|
299
|
-
|
|
300
|
-
for (let
|
|
301
|
-
const
|
|
302
|
-
|
|
304
|
+
Le(U, d), d += U.length;
|
|
305
|
+
for (let f = 0, y = j.length; f < y; f++) {
|
|
306
|
+
const p = j[f];
|
|
307
|
+
Le(p, d), d += p.length;
|
|
303
308
|
}
|
|
304
|
-
s.addGroup(
|
|
309
|
+
s.addGroup(h, n.length / 3 - h, 1);
|
|
305
310
|
}
|
|
306
|
-
function
|
|
307
|
-
let
|
|
308
|
-
for (; --
|
|
309
|
-
const
|
|
310
|
-
let
|
|
311
|
-
|
|
312
|
-
for (let
|
|
313
|
-
const
|
|
314
|
-
|
|
311
|
+
function Le(h, d) {
|
|
312
|
+
let f = h.length;
|
|
313
|
+
for (; --f >= 0; ) {
|
|
314
|
+
const y = f;
|
|
315
|
+
let p = f - 1;
|
|
316
|
+
p < 0 && (p = h.length - 1);
|
|
317
|
+
for (let S = 0, w = o + M * 2; S < w; S++) {
|
|
318
|
+
const T = V * S, E = V * (S + 1), _ = d + y + T, I = d + p + T, J = d + p + E, z = d + y + E;
|
|
319
|
+
qe(_, I, J, z);
|
|
315
320
|
}
|
|
316
321
|
}
|
|
317
322
|
}
|
|
318
|
-
function
|
|
319
|
-
|
|
323
|
+
function N(h, d, f) {
|
|
324
|
+
r.push(h), r.push(d), r.push(f);
|
|
320
325
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
const
|
|
326
|
+
function le(h, d, f) {
|
|
327
|
+
W(h), W(d), W(f);
|
|
328
|
+
const y = n.length / 3, p = P.generateTopUV(
|
|
324
329
|
s,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
n,
|
|
331
|
+
y - 3,
|
|
332
|
+
y - 2,
|
|
333
|
+
y - 1
|
|
329
334
|
);
|
|
330
|
-
k(
|
|
335
|
+
k(p[0]), k(p[1]), k(p[2]);
|
|
331
336
|
}
|
|
332
|
-
function
|
|
333
|
-
|
|
334
|
-
const
|
|
337
|
+
function qe(h, d, f, y) {
|
|
338
|
+
W(h), W(d), W(y), W(d), W(f), W(y);
|
|
339
|
+
const p = n.length / 3, S = P.generateSideWallUV(
|
|
335
340
|
s,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
+
n,
|
|
342
|
+
p - 6,
|
|
343
|
+
p - 3,
|
|
344
|
+
p - 2,
|
|
345
|
+
p - 1
|
|
341
346
|
);
|
|
342
|
-
k(
|
|
347
|
+
k(S[0]), k(S[1]), k(S[3]), k(S[1]), k(S[2]), k(S[3]);
|
|
343
348
|
}
|
|
344
|
-
function
|
|
345
|
-
|
|
349
|
+
function W(h) {
|
|
350
|
+
n.push(r[h * 3 + 0]), n.push(r[h * 3 + 1]), n.push(r[h * 3 + 2]);
|
|
346
351
|
}
|
|
347
|
-
function k(
|
|
348
|
-
|
|
352
|
+
function k(h) {
|
|
353
|
+
i.push(h.x), i.push(h.y);
|
|
349
354
|
}
|
|
350
355
|
}
|
|
351
356
|
}
|
|
352
|
-
copy(
|
|
353
|
-
return super.copy(
|
|
357
|
+
copy(e) {
|
|
358
|
+
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
354
359
|
}
|
|
355
360
|
toJSON() {
|
|
356
|
-
const
|
|
357
|
-
return
|
|
361
|
+
const e = super.toJSON(), t = this.parameters.shapes, s = this.parameters.options;
|
|
362
|
+
return Ot(t, s, e);
|
|
358
363
|
}
|
|
359
364
|
/**
|
|
360
365
|
* Factory method for creating an instance of this class from the given
|
|
@@ -364,751 +369,774 @@ class Y extends ot {
|
|
|
364
369
|
* @param {Array<Shape>} shapes - An array of shapes.
|
|
365
370
|
* @return {ExtrudeGeometry} A new instance.
|
|
366
371
|
*/
|
|
367
|
-
static fromJSON(
|
|
372
|
+
static fromJSON(e, t) {
|
|
368
373
|
const s = [];
|
|
369
|
-
for (let
|
|
370
|
-
const
|
|
371
|
-
s.push(
|
|
374
|
+
for (let i = 0, c = e.shapes.length; i < c; i++) {
|
|
375
|
+
const m = t[e.shapes[i]];
|
|
376
|
+
s.push(m);
|
|
372
377
|
}
|
|
373
|
-
const
|
|
374
|
-
return
|
|
375
|
-
|
|
376
|
-
)), new
|
|
378
|
+
const n = e.options.extrudePath;
|
|
379
|
+
return n !== void 0 && (e.options.extrudePath = new zt[`${n.type}`]().fromJSON(
|
|
380
|
+
n
|
|
381
|
+
)), new Q(s, e.options);
|
|
377
382
|
}
|
|
378
383
|
}
|
|
379
|
-
const
|
|
380
|
-
generateTopUV: function(
|
|
381
|
-
const
|
|
384
|
+
const Bt = {
|
|
385
|
+
generateTopUV: function(l, e, t, s, n) {
|
|
386
|
+
const i = e[t * 3], c = e[t * 3 + 1], m = e[s * 3], r = e[s * 3 + 1], g = e[n * 3], o = e[n * 3 + 1];
|
|
382
387
|
return [
|
|
383
|
-
new
|
|
384
|
-
new
|
|
385
|
-
new
|
|
388
|
+
new G(i, c),
|
|
389
|
+
new G(m, r),
|
|
390
|
+
new G(g, o)
|
|
386
391
|
];
|
|
387
392
|
},
|
|
388
|
-
generateSideWallUV: function(
|
|
389
|
-
const
|
|
390
|
-
return Math.abs(
|
|
391
|
-
new
|
|
392
|
-
new
|
|
393
|
-
new
|
|
394
|
-
new
|
|
393
|
+
generateSideWallUV: function(l, e, t, s, n, i) {
|
|
394
|
+
const c = e[t * 3], m = e[t * 3 + 1], r = e[t * 3 + 2], g = e[s * 3], o = e[s * 3 + 1], a = e[s * 3 + 2], b = e[n * 3], u = e[n * 3 + 1], x = e[n * 3 + 2], L = e[i * 3], M = e[i * 3 + 1], A = e[i * 3 + 2];
|
|
395
|
+
return Math.abs(m - o) < Math.abs(c - g) ? [
|
|
396
|
+
new G(c, 1 - r),
|
|
397
|
+
new G(g, 1 - a),
|
|
398
|
+
new G(b, 1 - x),
|
|
399
|
+
new G(L, 1 - A)
|
|
395
400
|
] : [
|
|
396
|
-
new
|
|
397
|
-
new
|
|
398
|
-
new
|
|
399
|
-
new
|
|
401
|
+
new G(m, 1 - r),
|
|
402
|
+
new G(o, 1 - a),
|
|
403
|
+
new G(u, 1 - x),
|
|
404
|
+
new G(M, 1 - A)
|
|
400
405
|
];
|
|
401
406
|
}
|
|
402
407
|
};
|
|
403
|
-
function
|
|
404
|
-
if (
|
|
405
|
-
for (let s = 0,
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
+
function Ot(l, e, t) {
|
|
409
|
+
if (t.shapes = [], Array.isArray(l))
|
|
410
|
+
for (let s = 0, n = l.length; s < n; s++) {
|
|
411
|
+
const i = l[s];
|
|
412
|
+
t.shapes.push(i.uuid);
|
|
408
413
|
}
|
|
409
414
|
else
|
|
410
|
-
|
|
411
|
-
return
|
|
415
|
+
t.shapes.push(l.uuid);
|
|
416
|
+
return t.options = Object.assign({}, e), e.extrudePath !== void 0 && (t.options.extrudePath = e.extrudePath.toJSON()), t;
|
|
412
417
|
}
|
|
413
|
-
class
|
|
414
|
-
constructor(
|
|
415
|
-
super(), this.options =
|
|
418
|
+
class Kt extends q {
|
|
419
|
+
constructor(e) {
|
|
420
|
+
super(), this.options = C({
|
|
416
421
|
maxDepth: 10,
|
|
417
422
|
percentDepth: !1,
|
|
418
423
|
innerRadius: 25,
|
|
419
424
|
outRadius: 42,
|
|
420
425
|
activeIndex: -1
|
|
421
|
-
},
|
|
426
|
+
}, e);
|
|
422
427
|
}
|
|
423
428
|
create() {
|
|
424
|
-
return
|
|
429
|
+
return oe(this, null, function* () {
|
|
425
430
|
this.createGroup();
|
|
426
|
-
const { data:
|
|
427
|
-
let
|
|
428
|
-
|
|
431
|
+
const { data: e, maxDepth: t, colors: s, material: n, percentDepth: i, activeIndex: c } = this.options, m = Math.max(...e), r = e.reduce((o, a) => o + a, 0);
|
|
432
|
+
let g = Math.PI / 2;
|
|
433
|
+
e.forEach((o, a) => {
|
|
429
434
|
if (o === 0) return;
|
|
430
|
-
const
|
|
431
|
-
color:
|
|
435
|
+
const b = Math.PI * 2 * (o / r), u = s[a], x = i ? t * (o / m) : t, L = this.createGeometry(x, b), M = n ? n.clone() : new dt({
|
|
436
|
+
color: u
|
|
432
437
|
});
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
}),
|
|
438
|
+
n && M.color.set(u);
|
|
439
|
+
const A = new ft(L, M);
|
|
440
|
+
A.userData.depth = x, A.userData.index = a, A.rotateZ(g), g += b, this.add(A);
|
|
441
|
+
}), c !== -1 && this.setActive(c);
|
|
437
442
|
});
|
|
438
443
|
}
|
|
439
|
-
createGeometry(
|
|
440
|
-
const { outRadius: s, innerRadius:
|
|
441
|
-
return
|
|
444
|
+
createGeometry(e, t) {
|
|
445
|
+
const { outRadius: s, innerRadius: n } = this.options, i = new we();
|
|
446
|
+
return i.moveTo(s, 0), i.lineTo(n, 0), i.absarc(0, 0, n, 0, t, !1), i.absarc(0, 0, s, t, 0, !0), new Q(i, {
|
|
442
447
|
curveSegments: 48,
|
|
443
|
-
depth:
|
|
448
|
+
depth: e,
|
|
444
449
|
bevelEnabled: !1
|
|
445
450
|
});
|
|
446
451
|
}
|
|
447
|
-
handlePick(
|
|
448
|
-
const { object: s } = this.pencil.pick(
|
|
449
|
-
return this.setActive(
|
|
452
|
+
handlePick(e, t = 1.3) {
|
|
453
|
+
const { object: s } = this.pencil.pick(e, this.object3d.children) || {}, n = s ? this.object3d.children.findIndex((i) => i === s) : this.options.activeIndex;
|
|
454
|
+
return this.setActive(n, t);
|
|
450
455
|
}
|
|
451
|
-
setActive(
|
|
452
|
-
const s = this.object3d.children[
|
|
453
|
-
if (this.object3d.children.forEach((
|
|
454
|
-
if (!(s && s ===
|
|
455
|
-
if (
|
|
456
|
-
|
|
457
|
-
const
|
|
458
|
-
|
|
456
|
+
setActive(e, t = 1.3) {
|
|
457
|
+
const s = this.object3d.children[e];
|
|
458
|
+
if (this.object3d.children.forEach((n) => {
|
|
459
|
+
if (!(s && s === n) && n.scale.z !== 1) {
|
|
460
|
+
if (n.userData.levTween) return;
|
|
461
|
+
n.userData.enTween && (n.userData.enTween.stop(), n.userData.enTween = null);
|
|
462
|
+
const i = new te.Tween(n.scale).to({ z: 1 }, 100);
|
|
463
|
+
n.userData.levTween = i, i.start();
|
|
459
464
|
}
|
|
460
465
|
}), s) {
|
|
461
466
|
if (s.userData.enTween)
|
|
462
467
|
return;
|
|
463
468
|
s.userData.levTween && (s.userData.levTween.stop(), s.userData.levTween = null);
|
|
464
|
-
const
|
|
465
|
-
return s.userData.enTween =
|
|
469
|
+
const n = new te.Tween(s.scale).to({ z: t }, 100);
|
|
470
|
+
return s.userData.enTween = n, n.start(), s.userData.index;
|
|
466
471
|
}
|
|
467
472
|
return -1;
|
|
468
473
|
}
|
|
469
474
|
render() {
|
|
470
|
-
this.object3d.scale.z = 0, new
|
|
475
|
+
this.object3d.scale.z = 0, new te.Tween(this.object3d.scale).to({ z: 1 }, 1e3).easing(te.Easing.Sinusoidal.InOut).start();
|
|
471
476
|
}
|
|
472
477
|
}
|
|
473
|
-
class
|
|
474
|
-
constructor(
|
|
475
|
-
super(), this.rectAreaLightUniformsLibInit = !1, this.options =
|
|
478
|
+
class es extends q {
|
|
479
|
+
constructor(e) {
|
|
480
|
+
super(), this.rectAreaLightUniformsLibInit = !1, this.options = e;
|
|
476
481
|
}
|
|
477
482
|
create() {
|
|
478
|
-
var
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
481
|
-
const v = new
|
|
483
|
+
var t, s, n, i, c, m, r, g, o, a, b, u, x, L, M, A, P;
|
|
484
|
+
const e = this.options;
|
|
485
|
+
if (e.type === "AmbientLight") {
|
|
486
|
+
const v = new mt(e.color);
|
|
482
487
|
v.name = "环境光", this.object3d = v;
|
|
483
|
-
} else if (
|
|
484
|
-
const v = new
|
|
488
|
+
} else if (e.type === "DirectionalLight") {
|
|
489
|
+
const v = new pt(e.color, e.intensity);
|
|
485
490
|
v.name = "平行光", v.target.position.set(0, 0, 0), this.object3d = v, v.target.name = "平行光目标", v.shadow.camera.name = "平行光阴影相机", v.shadow.camera.userData.directionalLightShadow = !0, this.directionalLight = v;
|
|
486
|
-
} else if (
|
|
487
|
-
const v = new
|
|
488
|
-
(
|
|
489
|
-
(s =
|
|
490
|
-
(
|
|
491
|
-
(
|
|
491
|
+
} else if (e.type === "PointLight") {
|
|
492
|
+
const v = new gt(
|
|
493
|
+
(t = e.color) != null ? t : 16777215,
|
|
494
|
+
(s = e.intensity) != null ? s : 1,
|
|
495
|
+
(n = e.distance) != null ? n : 0,
|
|
496
|
+
(i = e.decay) != null ? i : 2
|
|
492
497
|
);
|
|
493
498
|
v.name = "点光源", this.object3d = v, this.pointLight = v;
|
|
494
|
-
} else if (
|
|
495
|
-
const v = new
|
|
496
|
-
(
|
|
497
|
-
(
|
|
498
|
-
(
|
|
499
|
-
(
|
|
500
|
-
(o =
|
|
501
|
-
(
|
|
499
|
+
} else if (e.type === "SpotLight") {
|
|
500
|
+
const v = new yt(
|
|
501
|
+
(c = e.color) != null ? c : 16777215,
|
|
502
|
+
(m = e.intensity) != null ? m : 1,
|
|
503
|
+
(r = e.distance) != null ? r : 0,
|
|
504
|
+
(g = e.angle) != null ? g : Math.PI / 3,
|
|
505
|
+
(o = e.penumbra) != null ? o : 1,
|
|
506
|
+
(a = e.decay) != null ? a : 2
|
|
502
507
|
);
|
|
503
508
|
v.name = "聚光灯", this.object3d = v, this.spotLight = v, v.target.name = "聚光灯目标";
|
|
504
|
-
} else if (
|
|
505
|
-
const v = new
|
|
506
|
-
(
|
|
507
|
-
(
|
|
508
|
-
(
|
|
509
|
+
} else if (e.type === "HemisphereLight") {
|
|
510
|
+
const v = new bt(
|
|
511
|
+
(b = e.color) != null ? b : 16777215,
|
|
512
|
+
(u = e.groundColor) != null ? u : 16777215,
|
|
513
|
+
(x = e.intensity) != null ? x : 1
|
|
509
514
|
);
|
|
510
515
|
v.name = "半球光", this.object3d = v, this.hemisphereLight = v;
|
|
511
|
-
} else if (
|
|
512
|
-
this.rectAreaLightUniformsLibInit || (
|
|
513
|
-
const v = new
|
|
514
|
-
(
|
|
515
|
-
(
|
|
516
|
-
(
|
|
517
|
-
(
|
|
516
|
+
} else if (e.type === "RectAreaLight") {
|
|
517
|
+
this.rectAreaLightUniformsLibInit || (Lt.init(), this.rectAreaLightUniformsLibInit = !0);
|
|
518
|
+
const v = new xt(
|
|
519
|
+
(L = e.color) != null ? L : 16777215,
|
|
520
|
+
(M = e.intensity) != null ? M : 1,
|
|
521
|
+
(A = e.width) != null ? A : 10,
|
|
522
|
+
(P = e.height) != null ? P : 10
|
|
518
523
|
);
|
|
519
524
|
v.name = "矩形区域光", this.object3d = v, this.rectAreaLight = v;
|
|
520
525
|
}
|
|
521
526
|
}
|
|
522
527
|
render() {
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
const
|
|
528
|
+
const e = this.object3d;
|
|
529
|
+
e.target && this.pencil.scene.add(e.target);
|
|
530
|
+
const t = this.pencil.cameraTarget;
|
|
526
531
|
if (this.spotLight || this.directionalLight) {
|
|
527
532
|
const s = this.spotLight || this.directionalLight;
|
|
528
|
-
s.position.copy(
|
|
529
|
-
} else this.pointLight && this.pointLight.position.copy(
|
|
533
|
+
s.position.copy(t), s.target.position.copy(t);
|
|
534
|
+
} else this.pointLight && this.pointLight.position.copy(t);
|
|
530
535
|
}
|
|
531
536
|
dispose() {
|
|
532
|
-
const
|
|
533
|
-
|
|
537
|
+
const e = this.object3d;
|
|
538
|
+
e.target && this.pencil.scene.remove(e.target), super.dispose();
|
|
534
539
|
}
|
|
535
540
|
}
|
|
536
|
-
function
|
|
537
|
-
const
|
|
538
|
-
Object.keys(
|
|
539
|
-
),
|
|
540
|
-
let
|
|
541
|
-
for (let o = 0; o <
|
|
542
|
-
const
|
|
543
|
-
let
|
|
544
|
-
if (
|
|
541
|
+
function D(l, e = 0) {
|
|
542
|
+
const t = l[0].index !== null, s = new Set(Object.keys(l[0].attributes)), n = new Set(
|
|
543
|
+
Object.keys(l[0].morphAttributes)
|
|
544
|
+
), i = {}, c = {}, m = l[0].morphTargetsRelative, r = new fe();
|
|
545
|
+
let g = 0;
|
|
546
|
+
for (let o = 0; o < l.length; ++o) {
|
|
547
|
+
const a = l[o];
|
|
548
|
+
let b = 0;
|
|
549
|
+
if (t !== (a.index !== null))
|
|
545
550
|
return console.error(
|
|
546
551
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."
|
|
547
552
|
), null;
|
|
548
|
-
for (const
|
|
549
|
-
if (!s.has(
|
|
553
|
+
for (const u in a.attributes) {
|
|
554
|
+
if (!s.has(u))
|
|
550
555
|
return console.error(
|
|
551
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + '. All geometries must have compatible attributes; make sure "' +
|
|
556
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + '. All geometries must have compatible attributes; make sure "' + u + '" attribute exists among all geometries, or in none of them.'
|
|
552
557
|
), null;
|
|
553
|
-
|
|
558
|
+
i[u] === void 0 && (i[u] = []), i[u].push(a.attributes[u]), b++;
|
|
554
559
|
}
|
|
555
|
-
if (
|
|
560
|
+
if (b !== s.size)
|
|
556
561
|
return console.error(
|
|
557
562
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". Make sure all geometries have the same number of attributes."
|
|
558
563
|
), null;
|
|
559
|
-
if (
|
|
564
|
+
if (m !== a.morphTargetsRelative)
|
|
560
565
|
return console.error(
|
|
561
566
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". .morphTargetsRelative must be consistent throughout all geometries."
|
|
562
567
|
), null;
|
|
563
|
-
for (const
|
|
564
|
-
if (!
|
|
568
|
+
for (const u in a.morphAttributes) {
|
|
569
|
+
if (!n.has(u))
|
|
565
570
|
return console.error(
|
|
566
571
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". .morphAttributes must be consistent throughout all geometries."
|
|
567
572
|
), null;
|
|
568
|
-
|
|
573
|
+
c[u] === void 0 && (c[u] = []), c[u].push(a.morphAttributes[u]);
|
|
569
574
|
}
|
|
570
|
-
if (
|
|
571
|
-
let
|
|
572
|
-
if (
|
|
573
|
-
|
|
574
|
-
else if (
|
|
575
|
-
|
|
575
|
+
if (e) {
|
|
576
|
+
let u;
|
|
577
|
+
if (t)
|
|
578
|
+
u = a.index.count;
|
|
579
|
+
else if (a.attributes.position !== void 0)
|
|
580
|
+
u = a.attributes.position.count;
|
|
576
581
|
else
|
|
577
582
|
return console.error(
|
|
578
583
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". The geometry must have either an index or a position attribute"
|
|
579
584
|
), null;
|
|
580
|
-
if (
|
|
581
|
-
|
|
582
|
-
else if (
|
|
583
|
-
for (let
|
|
584
|
-
let
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
Math.min(
|
|
588
|
-
|
|
585
|
+
if (e === 1)
|
|
586
|
+
r.addGroup(g, u, o);
|
|
587
|
+
else if (e === 2 && a.groups.length > 0)
|
|
588
|
+
for (let x of a.groups) {
|
|
589
|
+
let L = x.materialIndex;
|
|
590
|
+
r.addGroup(
|
|
591
|
+
g + x.start,
|
|
592
|
+
Math.min(x.count, u),
|
|
593
|
+
L
|
|
589
594
|
);
|
|
590
595
|
}
|
|
591
|
-
|
|
596
|
+
g += u;
|
|
592
597
|
}
|
|
593
598
|
}
|
|
594
|
-
if (
|
|
599
|
+
if (t) {
|
|
595
600
|
let o = 0;
|
|
596
|
-
const
|
|
597
|
-
for (let
|
|
598
|
-
const
|
|
599
|
-
for (let
|
|
600
|
-
|
|
601
|
-
o +=
|
|
601
|
+
const a = [];
|
|
602
|
+
for (let b = 0; b < l.length; ++b) {
|
|
603
|
+
const u = l[b].index;
|
|
604
|
+
for (let x = 0; x < u.count; ++x)
|
|
605
|
+
a.push(u.getX(x) + o);
|
|
606
|
+
o += l[b].attributes.position.count;
|
|
602
607
|
}
|
|
603
|
-
|
|
608
|
+
r.setIndex(a);
|
|
604
609
|
}
|
|
605
|
-
for (const o in
|
|
606
|
-
const
|
|
607
|
-
if (!
|
|
610
|
+
for (const o in i) {
|
|
611
|
+
const a = Ue(i[o]);
|
|
612
|
+
if (!a)
|
|
608
613
|
return console.error(
|
|
609
614
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " attribute."
|
|
610
615
|
), null;
|
|
611
|
-
|
|
616
|
+
r.setAttribute(o, a);
|
|
612
617
|
}
|
|
613
|
-
for (const o in
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
|
|
617
|
-
for (let
|
|
618
|
-
const
|
|
619
|
-
for (let
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
if (!
|
|
618
|
+
for (const o in c) {
|
|
619
|
+
const a = c[o][0].length;
|
|
620
|
+
if (a === 0) break;
|
|
621
|
+
r.morphAttributes = r.morphAttributes || {}, r.morphAttributes[o] = [];
|
|
622
|
+
for (let b = 0; b < a; ++b) {
|
|
623
|
+
const u = [];
|
|
624
|
+
for (let L = 0; L < c[o].length; ++L)
|
|
625
|
+
u.push(c[o][L][b]);
|
|
626
|
+
const x = Ue(u);
|
|
627
|
+
if (!x)
|
|
623
628
|
return console.error(
|
|
624
629
|
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " morphAttribute."
|
|
625
630
|
), null;
|
|
626
|
-
|
|
631
|
+
r.morphAttributes[o].push(x);
|
|
627
632
|
}
|
|
628
633
|
}
|
|
629
|
-
return
|
|
634
|
+
return e === 2 ? Tt(r) : r;
|
|
630
635
|
}
|
|
631
|
-
const
|
|
632
|
-
const { points:
|
|
633
|
-
return new
|
|
636
|
+
const De = (l) => {
|
|
637
|
+
const { points: e } = l, t = e.reduce((n, i, c) => (c < e.length - 1 && n.push(i, e[c + 1]), n), []);
|
|
638
|
+
return new fe().setFromPoints(t);
|
|
634
639
|
};
|
|
635
|
-
let
|
|
636
|
-
constructor(
|
|
637
|
-
super(), this.options =
|
|
640
|
+
let ts = class extends q {
|
|
641
|
+
constructor(e = {}) {
|
|
642
|
+
super(), this.options = C({}, e);
|
|
638
643
|
}
|
|
639
644
|
get material() {
|
|
640
|
-
var
|
|
641
|
-
return (
|
|
645
|
+
var e;
|
|
646
|
+
return (e = this.object3d) == null ? void 0 : e.material;
|
|
642
647
|
}
|
|
643
648
|
create() {
|
|
644
|
-
return
|
|
649
|
+
return oe(this, null, function* () {
|
|
645
650
|
const {
|
|
646
|
-
points:
|
|
647
|
-
pointsArr:
|
|
651
|
+
points: e,
|
|
652
|
+
pointsArr: t,
|
|
648
653
|
geometry: s,
|
|
649
|
-
geometryArr:
|
|
650
|
-
material:
|
|
651
|
-
useGroups:
|
|
652
|
-
setPointWidth:
|
|
653
|
-
lineWidthArr:
|
|
654
|
-
materialParameters:
|
|
654
|
+
geometryArr: n,
|
|
655
|
+
material: i,
|
|
656
|
+
useGroups: c,
|
|
657
|
+
setPointWidth: m,
|
|
658
|
+
lineWidthArr: r,
|
|
659
|
+
materialParameters: g,
|
|
655
660
|
instanceCount: o
|
|
656
661
|
} = this.options;
|
|
657
|
-
let
|
|
658
|
-
!
|
|
659
|
-
points:
|
|
660
|
-
}) : !
|
|
661
|
-
|
|
662
|
-
points:
|
|
662
|
+
let a = i, b = s;
|
|
663
|
+
!a && g && (a = this.getMaterial(g)), !b && e ? b = De({
|
|
664
|
+
points: e
|
|
665
|
+
}) : !b && t ? b = D(
|
|
666
|
+
t.map((x) => De({
|
|
667
|
+
points: x
|
|
663
668
|
})),
|
|
664
|
-
|
|
665
|
-
) : !
|
|
666
|
-
const
|
|
667
|
-
new
|
|
669
|
+
c != null ? c : 0
|
|
670
|
+
) : !b && n && n.length > 1 ? b = D(n, c != null ? c : 0) : !b && n && n.length === 1 && ([b] = n);
|
|
671
|
+
const u = new _t().fromLineSegments(
|
|
672
|
+
new wt(b)
|
|
668
673
|
);
|
|
669
674
|
if (this.pencil.options.WebGPUTHREE) {
|
|
670
|
-
o && (
|
|
671
|
-
const
|
|
672
|
-
|
|
675
|
+
o && (u.instanceCount = o);
|
|
676
|
+
const x = new Ke(u, a);
|
|
677
|
+
x.computeLineDistances(), this.object3d = x;
|
|
673
678
|
} else {
|
|
674
|
-
const
|
|
675
|
-
|
|
679
|
+
const x = new Et(u, a);
|
|
680
|
+
x.computeLineDistances(), this.object3d = x;
|
|
676
681
|
}
|
|
677
682
|
});
|
|
678
683
|
}
|
|
679
|
-
getMaterial(
|
|
680
|
-
return new
|
|
681
|
-
color: new
|
|
682
|
-
},
|
|
684
|
+
getMaterial(e) {
|
|
685
|
+
return new Gt(C({
|
|
686
|
+
color: new ke("#ffffff")
|
|
687
|
+
}, e));
|
|
683
688
|
}
|
|
684
689
|
};
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
e.set(a, s);
|
|
698
|
-
else
|
|
699
|
-
for (n = 0; n < a.length; n++) e[n + s] = a[n];
|
|
700
|
-
return e;
|
|
701
|
-
}
|
|
702
|
-
function Be(a) {
|
|
703
|
-
return a instanceof Float32Array ? a : a instanceof ot ? a.getAttribute("position").array : a.map((t) => {
|
|
704
|
-
const e = Array.isArray(t);
|
|
705
|
-
return t instanceof F ? [t.x, t.y, t.z] : t instanceof P ? [t.x, t.y, 0] : e && t.length === 3 ? [t[0], t[1], t[2]] : e && t.length === 2 ? [t[0], t[1], 0] : t;
|
|
706
|
-
}).flat();
|
|
707
|
-
}
|
|
708
|
-
class Ve extends ot {
|
|
709
|
-
constructor() {
|
|
710
|
-
super(), this.type = "MeshLine", this.isMeshLine = !0, this.positions = [], this.previous = [], this.next = [], this.side = [], this.width = [], this.indices_array = [], this.uvs = [], this.counters = [], this.widthCallback = null, this._points = [], this.matrixWorld = new we(), Object.defineProperties(this, {
|
|
711
|
-
points: {
|
|
712
|
-
enumerable: !0,
|
|
713
|
-
get() {
|
|
714
|
-
return this._points;
|
|
715
|
-
},
|
|
716
|
-
set(t) {
|
|
717
|
-
this.setPoints(t, this.widthCallback);
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
});
|
|
690
|
+
const ie = (l, e, t, s, n) => {
|
|
691
|
+
l[e + 0] = t, l[e + 1] = s, l[e + 2] = n, l[e + 3] = t, l[e + 4] = s, l[e + 5] = n;
|
|
692
|
+
}, He = (l, e, t, s) => {
|
|
693
|
+
l[e + 0] = t, l[e + 1] = s;
|
|
694
|
+
}, Ve = (l, e, t, s, n) => {
|
|
695
|
+
l[e + 0] = t, l[e + 1] = s, l[e + 2] = n;
|
|
696
|
+
}, Ut = (l, e, t, s, n, i) => {
|
|
697
|
+
l[e + 0] = t, l[e + 1] = s, l[e + 2] = n, l[e + 3] = i;
|
|
698
|
+
};
|
|
699
|
+
class Rt extends fe {
|
|
700
|
+
constructor(e = [], t = "none", s) {
|
|
701
|
+
super(), this.type = "MeshLineGeometry", this.pointCount = 0, this._points = [], this.shape = "none", this.shapeFunction = (n) => 1, this.matrixWorld = new vt(), this.shape = t, s && (this.shapeFunction = s), e.length > 0 && this.setPoints(e);
|
|
721
702
|
}
|
|
722
|
-
|
|
723
|
-
|
|
703
|
+
convertToVector3Array(e) {
|
|
704
|
+
return e.map((t) => {
|
|
705
|
+
var s;
|
|
706
|
+
if (t instanceof G)
|
|
707
|
+
return new R(t.x, t.y, 0);
|
|
708
|
+
if (t instanceof R)
|
|
709
|
+
return t;
|
|
710
|
+
if (Array.isArray(t) && t.length >= 2)
|
|
711
|
+
return new R(t[0], t[1], (s = t[2]) != null ? s : 0);
|
|
712
|
+
}).filter(Boolean);
|
|
724
713
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
714
|
+
setMatrixWorld(e) {
|
|
715
|
+
this.matrixWorld = e;
|
|
716
|
+
}
|
|
717
|
+
setPoints(e, t) {
|
|
718
|
+
!e || e.length === 0 || (this._points = this.convertToVector3Array(e), this.pointCount = this._points.length, t && (this.shapeFunction = t, this.shape = "custom"), this.initializeGeometry(), this.updateGeometry());
|
|
719
|
+
}
|
|
720
|
+
initializeGeometry() {
|
|
721
|
+
const e = [];
|
|
722
|
+
let t = 0;
|
|
723
|
+
const s = [], n = [];
|
|
724
|
+
let i = 0;
|
|
725
|
+
const c = [];
|
|
726
|
+
let m = 0;
|
|
727
|
+
const r = [];
|
|
728
|
+
let g = 0;
|
|
729
|
+
this.shape === "taper" && (this.shapeFunction = (o) => 1 * Math.pow(4 * o * (1 - o), 1));
|
|
730
|
+
for (let o = 0; o < this.pointCount; o++) {
|
|
731
|
+
const a = o / this._points.length;
|
|
732
|
+
e[t + 0] = a, e[t + 1] = a, t += 2, He(s, i, 1, -1);
|
|
733
|
+
const b = this.shape === "none" ? 1 : this.shapeFunction(o / (this.pointCount - 1));
|
|
734
|
+
if (He(n, i, b, b), i += 2, Ut(
|
|
735
|
+
c,
|
|
736
|
+
m,
|
|
737
|
+
o / (this.pointCount - 1),
|
|
738
|
+
0,
|
|
739
|
+
o / (this.pointCount - 1),
|
|
740
|
+
1
|
|
741
|
+
), m += 4, o < this.pointCount - 1) {
|
|
742
|
+
const u = o * 2;
|
|
743
|
+
Ve(r, g, u + 0, u + 1, u + 2), Ve(r, g + 3, u + 2, u + 1, u + 3), g += 6;
|
|
735
744
|
}
|
|
736
|
-
|
|
745
|
+
}
|
|
746
|
+
this.setAttribute(
|
|
747
|
+
"position",
|
|
748
|
+
new $(new Float32Array(this.pointCount * 6), 3)
|
|
749
|
+
), this.setAttribute(
|
|
750
|
+
"previous",
|
|
751
|
+
new $(new Float32Array(this.pointCount * 6), 3)
|
|
752
|
+
), this.setAttribute(
|
|
753
|
+
"next",
|
|
754
|
+
new $(new Float32Array(this.pointCount * 6), 3)
|
|
755
|
+
), this.setAttribute(
|
|
756
|
+
"counters",
|
|
757
|
+
new $(new Float32Array(e), 1)
|
|
758
|
+
), this.setAttribute("side", new $(new Float32Array(s), 1)), this.setAttribute(
|
|
759
|
+
"width",
|
|
760
|
+
new $(new Float32Array(n), 1)
|
|
761
|
+
), this.setAttribute("uv", new $(new Float32Array(c), 2)), this.setIndex(new $(new Uint16Array(r), 1));
|
|
737
762
|
}
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
763
|
+
updateGeometry() {
|
|
764
|
+
if (!this._points[0]) return;
|
|
765
|
+
const e = [], t = [], s = [];
|
|
766
|
+
let n = 0, i = 0, c = 0;
|
|
767
|
+
ie(
|
|
768
|
+
t,
|
|
769
|
+
i,
|
|
770
|
+
this._points[0].x,
|
|
771
|
+
this._points[0].y,
|
|
772
|
+
this._points[0].z
|
|
773
|
+
), i += 6;
|
|
774
|
+
for (let o = 0; o < this.pointCount; o++) {
|
|
775
|
+
const a = this._points[o];
|
|
776
|
+
ie(e, n, a.x, a.y, a.z), n += 6, o < this.pointCount - 1 && (ie(t, i, a.x, a.y, a.z), i += 6), o > 0 && o + 1 <= this.pointCount && (ie(s, c, a.x, a.y, a.z), c += 6);
|
|
777
|
+
}
|
|
778
|
+
ie(
|
|
779
|
+
s,
|
|
780
|
+
c,
|
|
781
|
+
this._points[this.pointCount - 1].x,
|
|
782
|
+
this._points[this.pointCount - 1].y,
|
|
783
|
+
this._points[this.pointCount - 1].z
|
|
784
|
+
);
|
|
785
|
+
const m = this.getAttribute("position"), r = this.getAttribute("previous"), g = this.getAttribute("next");
|
|
786
|
+
m.set(e), r.set(t), g.set(s), m.needsUpdate = !0, r.needsUpdate = !0, g.needsUpdate = !0, this.computeBoundingSphere(), this.computeBoundingBox();
|
|
741
787
|
}
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
return [this.positions[e], this.positions[e + 1], this.positions[e + 2]];
|
|
788
|
+
get points() {
|
|
789
|
+
return this._points;
|
|
745
790
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}
|
|
757
|
-
i > 0 && (s = this.copyV3(i), this.next.push(s[0], s[1], s[2]), this.next.push(s[0], s[1], s[2]));
|
|
791
|
+
set points(e) {
|
|
792
|
+
this.setPoints(e);
|
|
793
|
+
}
|
|
794
|
+
updatePoints(e, t) {
|
|
795
|
+
const s = this.convertToVector3Array(e);
|
|
796
|
+
if (s.length !== this.pointCount) {
|
|
797
|
+
console.warn(
|
|
798
|
+
"MeshLineGeometry: Cannot update points with different length. Use setPoints() instead."
|
|
799
|
+
);
|
|
800
|
+
return;
|
|
758
801
|
}
|
|
759
|
-
this.
|
|
760
|
-
position: new q(new Float32Array(this.positions), 3),
|
|
761
|
-
previous: new q(new Float32Array(this.previous), 3),
|
|
762
|
-
next: new q(new Float32Array(this.next), 3),
|
|
763
|
-
side: new q(new Float32Array(this.side), 1),
|
|
764
|
-
width: new q(new Float32Array(this.width), 1),
|
|
765
|
-
uv: new q(new Float32Array(this.uvs), 2),
|
|
766
|
-
index: new q(new Uint16Array(this.indices_array), 1),
|
|
767
|
-
counters: new q(new Float32Array(this.counters), 1)
|
|
768
|
-
} : (this._attributes.position.copyArray(new Float32Array(this.positions)), this._attributes.position.needsUpdate = !0, this._attributes.previous.copyArray(new Float32Array(this.previous)), this._attributes.previous.needsUpdate = !0, this._attributes.next.copyArray(new Float32Array(this.next)), this._attributes.next.needsUpdate = !0, this._attributes.side.copyArray(new Float32Array(this.side)), this._attributes.side.needsUpdate = !0, this._attributes.width.copyArray(new Float32Array(this.width)), this._attributes.width.needsUpdate = !0, this._attributes.uv.copyArray(new Float32Array(this.uvs)), this._attributes.uv.needsUpdate = !0, this._attributes.index.copyArray(new Uint16Array(this.indices_array)), this._attributes.index.needsUpdate = !0), this.setAttribute("position", this._attributes.position), this.setAttribute("previous", this._attributes.previous), this.setAttribute("next", this._attributes.next), this.setAttribute("side", this._attributes.side), this.setAttribute("width", this._attributes.width), this.setAttribute("uv", this._attributes.uv), this.setAttribute("counters", this._attributes.counters), this.setAttribute("position", this._attributes.position), this.setAttribute("previous", this._attributes.previous), this.setAttribute("next", this._attributes.next), this.setAttribute("side", this._attributes.side), this.setAttribute("width", this._attributes.width), this.setAttribute("uv", this._attributes.uv), this.setAttribute("counters", this._attributes.counters), this.setIndex(this._attributes.index), this.computeBoundingSphere(), this.computeBoundingBox();
|
|
802
|
+
this._points = s, t && (this.shapeFunction = t, this.shape = "custom", this.initializeGeometry()), this.updateGeometry();
|
|
769
803
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
* @param position
|
|
773
|
-
*/
|
|
774
|
-
advance({ x: t, y: e, z: s }) {
|
|
775
|
-
const i = this._attributes.position.array, n = this._attributes.previous.array, r = this._attributes.next.array, l = i.length;
|
|
776
|
-
yt(i, 0, n, 0, l), yt(i, 6, i, 0, l - 6), i[l - 6] = t, i[l - 5] = e, i[l - 4] = s, i[l - 3] = t, i[l - 2] = e, i[l - 1] = s, yt(i, 6, r, 0, l - 6), r[l - 6] = t, r[l - 5] = e, r[l - 4] = s, r[l - 3] = t, r[l - 2] = e, r[l - 1] = s, this._attributes.position.needsUpdate = !0, this._attributes.previous.needsUpdate = !0, this._attributes.next.needsUpdate = !0;
|
|
804
|
+
setShape(e, t) {
|
|
805
|
+
this.shape = e, t && (this.shapeFunction = t), this._points.length > 0 && (this.initializeGeometry(), this.updateGeometry());
|
|
777
806
|
}
|
|
778
807
|
}
|
|
779
|
-
const
|
|
780
|
-
const { setPointWidth:
|
|
781
|
-
return s.setPoints(
|
|
808
|
+
const be = (l) => {
|
|
809
|
+
const { setPointWidth: e, nodes: t } = l, s = new Rt();
|
|
810
|
+
return s.setPoints(t, e), s;
|
|
782
811
|
};
|
|
783
|
-
class
|
|
784
|
-
constructor(
|
|
785
|
-
super(), this.options =
|
|
812
|
+
class ns extends q {
|
|
813
|
+
constructor(e = {}) {
|
|
814
|
+
super(), this.options = C({}, e);
|
|
786
815
|
}
|
|
787
816
|
get material() {
|
|
788
|
-
var
|
|
789
|
-
return (
|
|
817
|
+
var e;
|
|
818
|
+
return (e = this.object3d) == null ? void 0 : e.material;
|
|
790
819
|
}
|
|
791
820
|
create() {
|
|
792
|
-
return
|
|
821
|
+
return oe(this, null, function* () {
|
|
793
822
|
const {
|
|
794
|
-
nodes:
|
|
795
|
-
nodesArr:
|
|
823
|
+
nodes: e,
|
|
824
|
+
nodesArr: t,
|
|
796
825
|
geometry: s,
|
|
797
|
-
geometryArr:
|
|
798
|
-
material:
|
|
799
|
-
useGroups:
|
|
800
|
-
setPointWidth:
|
|
801
|
-
lineWidthArr:
|
|
802
|
-
materialParameters:
|
|
826
|
+
geometryArr: n,
|
|
827
|
+
material: i,
|
|
828
|
+
useGroups: c,
|
|
829
|
+
setPointWidth: m,
|
|
830
|
+
lineWidthArr: r,
|
|
831
|
+
materialParameters: g
|
|
803
832
|
} = this.options;
|
|
804
|
-
let o =
|
|
805
|
-
!o &&
|
|
806
|
-
nodes:
|
|
807
|
-
setPointWidth:
|
|
808
|
-
}) : !
|
|
809
|
-
|
|
810
|
-
let
|
|
811
|
-
return !
|
|
812
|
-
var
|
|
813
|
-
return (
|
|
814
|
-
}),
|
|
815
|
-
nodes:
|
|
816
|
-
setPointWidth:
|
|
833
|
+
let o = i, a = s;
|
|
834
|
+
!o && g && (o = this.getMaterial(g)), !a && e ? a = be({
|
|
835
|
+
nodes: e,
|
|
836
|
+
setPointWidth: m
|
|
837
|
+
}) : !a && t ? a = D(
|
|
838
|
+
t.map((b, u) => {
|
|
839
|
+
let x = m;
|
|
840
|
+
return !x && r && (x = () => {
|
|
841
|
+
var L;
|
|
842
|
+
return (L = r[u]) != null ? L : r[0];
|
|
843
|
+
}), be({
|
|
844
|
+
nodes: b,
|
|
845
|
+
setPointWidth: x
|
|
817
846
|
});
|
|
818
847
|
}),
|
|
819
|
-
|
|
820
|
-
) : !
|
|
848
|
+
c != null ? c : 0
|
|
849
|
+
) : !a && n && n.length > 1 ? a = D(n, c != null ? c : 0) : !a && n && n.length === 1 && ([a] = n), this.createMesh(a, o);
|
|
821
850
|
});
|
|
822
851
|
}
|
|
823
|
-
setGeometry(
|
|
824
|
-
const s =
|
|
825
|
-
nodes:
|
|
826
|
-
setPointWidth:
|
|
827
|
-
}),
|
|
828
|
-
|
|
852
|
+
setGeometry(e, t) {
|
|
853
|
+
const s = be({
|
|
854
|
+
nodes: e,
|
|
855
|
+
setPointWidth: t
|
|
856
|
+
}), n = this.object3d, i = n.geometry;
|
|
857
|
+
n.geometry = s, i.dispose();
|
|
829
858
|
}
|
|
830
|
-
getMaterial(
|
|
831
|
-
const { width:
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}, t));
|
|
859
|
+
getMaterial(e) {
|
|
860
|
+
const { width: t, height: s } = this.pencil.getSize(), n = new et(C({
|
|
861
|
+
color: new ke("#ffffff")
|
|
862
|
+
}, e));
|
|
863
|
+
return n.uniforms.resolution.value.set(t, s), n;
|
|
836
864
|
}
|
|
837
|
-
addGeometries(
|
|
838
|
-
const
|
|
839
|
-
|
|
865
|
+
addGeometries(e) {
|
|
866
|
+
const t = this.object3d, s = D([t.geometry, ...e]);
|
|
867
|
+
t.geometry = s;
|
|
840
868
|
}
|
|
841
|
-
resize(
|
|
842
|
-
var s,
|
|
843
|
-
(
|
|
869
|
+
resize(e, t) {
|
|
870
|
+
var s, n;
|
|
871
|
+
(n = (s = this.material) == null ? void 0 : s.uniforms) == null || n.resolution.value.set(e, t);
|
|
844
872
|
}
|
|
845
|
-
useMaterial(
|
|
846
|
-
super.useMaterial(
|
|
847
|
-
const { width:
|
|
848
|
-
this.resize(
|
|
873
|
+
useMaterial(e) {
|
|
874
|
+
super.useMaterial(e);
|
|
875
|
+
const { width: t, height: s } = this.pencil.getSize();
|
|
876
|
+
this.resize(t, s);
|
|
849
877
|
}
|
|
850
878
|
animate({
|
|
851
|
-
duration:
|
|
852
|
-
delay:
|
|
879
|
+
duration: e = 1e3,
|
|
880
|
+
delay: t = 0,
|
|
853
881
|
repeat: s = 0,
|
|
854
|
-
lineLoop:
|
|
855
|
-
onRepeat:
|
|
856
|
-
onUpdate:
|
|
857
|
-
onComplete:
|
|
858
|
-
startShow:
|
|
882
|
+
lineLoop: n,
|
|
883
|
+
onRepeat: i,
|
|
884
|
+
onUpdate: c,
|
|
885
|
+
onComplete: m,
|
|
886
|
+
startShow: r
|
|
859
887
|
} = {}) {
|
|
860
|
-
const { offset:
|
|
888
|
+
const { offset: g, offsetLoop: o } = this.material.uniforms;
|
|
861
889
|
if (this.material.userData.tween)
|
|
862
890
|
return;
|
|
863
|
-
const
|
|
864
|
-
|
|
865
|
-
let
|
|
866
|
-
const
|
|
867
|
-
|
|
891
|
+
const a = n != null ? n : !0;
|
|
892
|
+
g.value.x = 1, o.value = a && r ? 1 : 0;
|
|
893
|
+
let b = 0;
|
|
894
|
+
const u = new te.Tween(g.value).to({ x: -1 }, e).delay(t).repeat(s).onUpdate(({ x }) => {
|
|
895
|
+
a && x <= 0 && o.value === 0 && (o.value = 1), c && c(x);
|
|
868
896
|
}).onRepeat(() => {
|
|
869
|
-
|
|
897
|
+
b += 1, i && i(b);
|
|
870
898
|
}).onComplete(() => {
|
|
871
|
-
|
|
899
|
+
m && m();
|
|
872
900
|
}).start();
|
|
873
|
-
this.material.userData.tween =
|
|
901
|
+
this.material.userData.tween = u;
|
|
874
902
|
}
|
|
875
903
|
render() {
|
|
876
|
-
const { width:
|
|
877
|
-
this.resize(
|
|
904
|
+
const { width: e, height: t } = this.pencil.getSize();
|
|
905
|
+
this.resize(e, t);
|
|
878
906
|
}
|
|
879
907
|
dispose() {
|
|
880
|
-
this.material.userData.tween && (this.material.userData.tween.stop(),
|
|
908
|
+
this.material.userData.tween && (this.material.userData.tween.stop(), te.remove(this.material.userData.tween)), super.dispose();
|
|
881
909
|
}
|
|
882
910
|
}
|
|
883
|
-
const
|
|
884
|
-
const
|
|
885
|
-
let
|
|
886
|
-
return typeof
|
|
887
|
-
startHeight:
|
|
888
|
-
endHeight:
|
|
911
|
+
const Ne = (l) => {
|
|
912
|
+
const m = l, { coordinate: e, startHeight: t, height: s } = m, n = ye(m, ["coordinate", "startHeight", "height"]);
|
|
913
|
+
let i = t || 0;
|
|
914
|
+
return typeof t != "undefined" && typeof s != "undefined" && (i = t + s), new tt([e], ue(C({}, n), {
|
|
915
|
+
startHeight: t,
|
|
916
|
+
endHeight: i
|
|
889
917
|
}));
|
|
890
918
|
};
|
|
891
|
-
class
|
|
892
|
-
constructor(
|
|
893
|
-
super(), this.options =
|
|
919
|
+
class os extends q {
|
|
920
|
+
constructor(e) {
|
|
921
|
+
super(), this.options = C({}, e);
|
|
894
922
|
}
|
|
895
923
|
create() {
|
|
896
|
-
const
|
|
897
|
-
geometry:
|
|
898
|
-
coordinateArr:
|
|
924
|
+
const r = this.options, {
|
|
925
|
+
geometry: e,
|
|
926
|
+
coordinateArr: t,
|
|
899
927
|
coordinate: s,
|
|
900
|
-
material:
|
|
901
|
-
useGroups:
|
|
902
|
-
} =
|
|
928
|
+
material: n,
|
|
929
|
+
useGroups: i
|
|
930
|
+
} = r, c = ye(r, [
|
|
903
931
|
"geometry",
|
|
904
932
|
"coordinateArr",
|
|
905
933
|
"coordinate",
|
|
906
934
|
"material",
|
|
907
935
|
"useGroups"
|
|
908
936
|
]);
|
|
909
|
-
let
|
|
910
|
-
if (!
|
|
911
|
-
|
|
937
|
+
let m = e;
|
|
938
|
+
if (!m && s)
|
|
939
|
+
m = Ne(C({
|
|
912
940
|
coordinate: s
|
|
913
|
-
},
|
|
914
|
-
else if (!
|
|
915
|
-
const
|
|
916
|
-
(o) =>
|
|
941
|
+
}, c));
|
|
942
|
+
else if (!m && t) {
|
|
943
|
+
const g = t.map(
|
|
944
|
+
(o) => Ne(C({
|
|
917
945
|
coordinate: o
|
|
918
|
-
},
|
|
946
|
+
}, c))
|
|
919
947
|
);
|
|
920
|
-
|
|
948
|
+
m = D(g, i != null ? i : 0);
|
|
921
949
|
}
|
|
922
|
-
this.createMesh(
|
|
950
|
+
this.createMesh(m, n);
|
|
923
951
|
}
|
|
924
952
|
}
|
|
925
|
-
class
|
|
926
|
-
constructor(
|
|
927
|
-
super(
|
|
928
|
-
const s = new
|
|
929
|
-
new
|
|
953
|
+
class Dt extends Q {
|
|
954
|
+
constructor(e, t) {
|
|
955
|
+
super(e, t);
|
|
956
|
+
const s = new Re(
|
|
957
|
+
new Q(e, ue(C({}, t), {
|
|
930
958
|
hasTop: !0,
|
|
931
959
|
hasSide: !0,
|
|
932
960
|
hasBottom: !1
|
|
933
961
|
}))
|
|
934
962
|
);
|
|
935
963
|
s.updateMatrixWorld();
|
|
936
|
-
const
|
|
937
|
-
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
|
|
964
|
+
const n = new St().setFromObject(s), i = new R();
|
|
965
|
+
n.getSize(i);
|
|
966
|
+
const c = new R(
|
|
967
|
+
n.min.x + i.x / 2,
|
|
968
|
+
n.min.y + i.y / 2,
|
|
941
969
|
0
|
|
942
970
|
);
|
|
943
|
-
let
|
|
944
|
-
if (
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
950
|
-
|
|
971
|
+
let m = t.topSegments, r = t.box3;
|
|
972
|
+
if (r) {
|
|
973
|
+
r = r.union(n);
|
|
974
|
+
const A = new R();
|
|
975
|
+
r.getSize(A);
|
|
976
|
+
const P = Math.max(
|
|
977
|
+
i.x / A.x,
|
|
978
|
+
i.y / A.y
|
|
951
979
|
);
|
|
952
|
-
|
|
980
|
+
m = Math.ceil(t.topSegments * P);
|
|
953
981
|
}
|
|
954
|
-
if (
|
|
982
|
+
if (m < 4)
|
|
955
983
|
return this;
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
), o = new
|
|
962
|
-
o.position.set(
|
|
963
|
-
const
|
|
964
|
-
|
|
984
|
+
const g = new At(
|
|
985
|
+
i.x,
|
|
986
|
+
i.y,
|
|
987
|
+
m,
|
|
988
|
+
m
|
|
989
|
+
), o = new Re(g);
|
|
990
|
+
o.position.set(c.x, c.y, c.z), o.updateMatrixWorld();
|
|
991
|
+
const b = new jt().evaluate(o, s, It), u = b.geometry.getAttribute("position"), x = new xe(
|
|
992
|
+
u.count * 2,
|
|
965
993
|
2
|
|
966
994
|
);
|
|
967
|
-
for (let
|
|
968
|
-
const
|
|
969
|
-
|
|
995
|
+
for (let A = 0; A < u.count; A++) {
|
|
996
|
+
const P = u.getZ(A);
|
|
997
|
+
u.setZ(A, t.depth + P);
|
|
970
998
|
}
|
|
971
|
-
if (
|
|
972
|
-
const
|
|
973
|
-
for (let
|
|
974
|
-
const
|
|
975
|
-
|
|
999
|
+
if (r) {
|
|
1000
|
+
const A = r.min, P = r.max, v = new R().subVectors(P, A);
|
|
1001
|
+
for (let O = 0; O < u.count; O++) {
|
|
1002
|
+
const me = u.getX(O), X = u.getY(O), K = (me - A.x) / v.x, Y = (X - A.y) / v.y;
|
|
1003
|
+
x.setXY(O, K, Y);
|
|
976
1004
|
}
|
|
977
|
-
|
|
1005
|
+
b.geometry.setAttribute("uv", x);
|
|
978
1006
|
}
|
|
979
|
-
|
|
980
|
-
const
|
|
1007
|
+
u.needsUpdate = !0;
|
|
1008
|
+
const L = new Q(e, ue(C({}, t), {
|
|
981
1009
|
hasTop: !1
|
|
982
|
-
})),
|
|
983
|
-
this.copy(
|
|
1010
|
+
})), M = D([b.geometry, L], 2);
|
|
1011
|
+
this.copy(M.toNonIndexed());
|
|
984
1012
|
}
|
|
985
1013
|
}
|
|
986
|
-
const
|
|
1014
|
+
const We = (l) => {
|
|
987
1015
|
const {
|
|
988
|
-
split:
|
|
989
|
-
depth:
|
|
1016
|
+
split: e,
|
|
1017
|
+
depth: t,
|
|
990
1018
|
points: s,
|
|
991
|
-
box3:
|
|
992
|
-
hasTop:
|
|
993
|
-
hasBottom:
|
|
994
|
-
hasSide:
|
|
995
|
-
sideRepeat:
|
|
996
|
-
topSegments:
|
|
997
|
-
} =
|
|
998
|
-
depth:
|
|
1019
|
+
box3: n,
|
|
1020
|
+
hasTop: i,
|
|
1021
|
+
hasBottom: c,
|
|
1022
|
+
hasSide: m,
|
|
1023
|
+
sideRepeat: r,
|
|
1024
|
+
topSegments: g
|
|
1025
|
+
} = l, o = g ? Dt : Q, a = new o(new we(s), {
|
|
1026
|
+
depth: t,
|
|
999
1027
|
bevelEnabled: !1,
|
|
1000
|
-
box3:
|
|
1001
|
-
UVGenerator:
|
|
1002
|
-
split:
|
|
1003
|
-
box3:
|
|
1004
|
-
sideRepeat:
|
|
1028
|
+
box3: n,
|
|
1029
|
+
UVGenerator: Pt({
|
|
1030
|
+
split: e,
|
|
1031
|
+
box3: n,
|
|
1032
|
+
sideRepeat: r
|
|
1005
1033
|
}),
|
|
1006
|
-
hasTop:
|
|
1007
|
-
hasBottom:
|
|
1008
|
-
hasSide:
|
|
1009
|
-
topSegments:
|
|
1034
|
+
hasTop: i,
|
|
1035
|
+
hasBottom: c,
|
|
1036
|
+
hasSide: m,
|
|
1037
|
+
topSegments: g
|
|
1010
1038
|
});
|
|
1011
|
-
return
|
|
1039
|
+
return Ct(), a;
|
|
1012
1040
|
};
|
|
1013
|
-
class
|
|
1014
|
-
constructor(
|
|
1015
|
-
super(), this.options =
|
|
1041
|
+
class is extends q {
|
|
1042
|
+
constructor(e) {
|
|
1043
|
+
super(), this.options = C({
|
|
1016
1044
|
depth: 1
|
|
1017
|
-
},
|
|
1045
|
+
}, e);
|
|
1018
1046
|
}
|
|
1019
1047
|
create() {
|
|
1020
|
-
return
|
|
1048
|
+
return oe(this, null, function* () {
|
|
1021
1049
|
const {
|
|
1022
|
-
points:
|
|
1023
|
-
pointsArr:
|
|
1050
|
+
points: e,
|
|
1051
|
+
pointsArr: t,
|
|
1024
1052
|
useGroups: s,
|
|
1025
|
-
depth:
|
|
1026
|
-
geometry:
|
|
1027
|
-
geometryArr:
|
|
1028
|
-
material:
|
|
1029
|
-
box3:
|
|
1030
|
-
split:
|
|
1053
|
+
depth: n,
|
|
1054
|
+
geometry: i,
|
|
1055
|
+
geometryArr: c,
|
|
1056
|
+
material: m,
|
|
1057
|
+
box3: r,
|
|
1058
|
+
split: g,
|
|
1031
1059
|
hasTop: o,
|
|
1032
|
-
hasBottom:
|
|
1033
|
-
hasSide:
|
|
1034
|
-
} = this.options,
|
|
1035
|
-
let
|
|
1036
|
-
|
|
1037
|
-
points:
|
|
1038
|
-
depth:
|
|
1039
|
-
box3:
|
|
1040
|
-
split:
|
|
1060
|
+
hasBottom: a,
|
|
1061
|
+
hasSide: b
|
|
1062
|
+
} = this.options, u = Array.isArray(n) ? n : [n], x = Array.isArray(r) ? r : [r], L = m;
|
|
1063
|
+
let M = i;
|
|
1064
|
+
L || console.log("material is null"), !M && e ? M = We({
|
|
1065
|
+
points: e,
|
|
1066
|
+
depth: u[0],
|
|
1067
|
+
box3: x[0],
|
|
1068
|
+
split: g,
|
|
1041
1069
|
hasTop: o,
|
|
1042
|
-
hasBottom:
|
|
1043
|
-
hasSide:
|
|
1044
|
-
}) : !
|
|
1045
|
-
|
|
1046
|
-
(
|
|
1047
|
-
var v,
|
|
1048
|
-
return
|
|
1049
|
-
points:
|
|
1050
|
-
depth: (v =
|
|
1051
|
-
box3: (
|
|
1052
|
-
split:
|
|
1070
|
+
hasBottom: a,
|
|
1071
|
+
hasSide: b
|
|
1072
|
+
}) : !M && t ? M = D(
|
|
1073
|
+
t.map(
|
|
1074
|
+
(A, P) => {
|
|
1075
|
+
var v, O;
|
|
1076
|
+
return We({
|
|
1077
|
+
points: A,
|
|
1078
|
+
depth: (v = u[P]) != null ? v : u[0],
|
|
1079
|
+
box3: (O = x[P]) != null ? O : x[0],
|
|
1080
|
+
split: g,
|
|
1053
1081
|
hasTop: o,
|
|
1054
|
-
hasBottom:
|
|
1055
|
-
hasSide:
|
|
1082
|
+
hasBottom: a,
|
|
1083
|
+
hasSide: b
|
|
1056
1084
|
});
|
|
1057
1085
|
}
|
|
1058
1086
|
),
|
|
1059
1087
|
s != null ? s : 0
|
|
1060
|
-
) : !
|
|
1088
|
+
) : !M && c && c.length > 1 ? M = D(c, s != null ? s : 0) : !M && c && c.length === 1 && ([M] = c), this.createMesh(M, L);
|
|
1061
1089
|
});
|
|
1062
1090
|
}
|
|
1063
|
-
addGeometries(
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1091
|
+
addGeometries(e) {
|
|
1092
|
+
const t = this.object3d, s = D([t.geometry, ...e]);
|
|
1093
|
+
t.geometry = s;
|
|
1066
1094
|
}
|
|
1067
|
-
setTextureAnisotropic(
|
|
1068
|
-
|
|
1095
|
+
setTextureAnisotropic(e, t) {
|
|
1096
|
+
e.anisotropy = t || this.pencil.renderer.capabilities.getMaxAnisotropy();
|
|
1069
1097
|
}
|
|
1070
1098
|
}
|
|
1071
|
-
const
|
|
1099
|
+
const rs = (l) => {
|
|
1072
1100
|
const {
|
|
1073
|
-
topColor:
|
|
1074
|
-
sideColor:
|
|
1101
|
+
topColor: e,
|
|
1102
|
+
sideColor: t,
|
|
1075
1103
|
sideMap: s,
|
|
1076
|
-
createCanvasObjectURL:
|
|
1077
|
-
split:
|
|
1078
|
-
maxAnisotropy:
|
|
1079
|
-
} =
|
|
1080
|
-
return new Promise((
|
|
1081
|
-
const
|
|
1104
|
+
createCanvasObjectURL: n,
|
|
1105
|
+
split: i,
|
|
1106
|
+
maxAnisotropy: c
|
|
1107
|
+
} = l;
|
|
1108
|
+
return new Promise((m) => {
|
|
1109
|
+
const r = s ? document.createElement("img") : {
|
|
1082
1110
|
src: "",
|
|
1083
1111
|
onload: () => {
|
|
1084
1112
|
},
|
|
1085
1113
|
width: 128,
|
|
1086
1114
|
height: 128
|
|
1087
1115
|
};
|
|
1088
|
-
|
|
1089
|
-
const
|
|
1090
|
-
o.height =
|
|
1091
|
-
console.log(URL.createObjectURL(
|
|
1116
|
+
r.onload = () => {
|
|
1117
|
+
const g = i, o = document.createElement("canvas"), a = o.getContext("2d");
|
|
1118
|
+
o.height = r.height / (1 - g), o.width = r.width, g && e && (a.fillStyle = e, a.fillRect(0, 0, r.width, o.height * g)), s && r instanceof HTMLImageElement ? a.drawImage(r, 0, o.height * g, r.width, r.height) : t && (a.fillStyle = t, a.fillRect(0, o.height * g, r.width, r.height)), n && o.toBlob((u) => {
|
|
1119
|
+
console.log(URL.createObjectURL(u));
|
|
1092
1120
|
});
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
}, s ?
|
|
1121
|
+
const b = new Mt(o);
|
|
1122
|
+
m(b);
|
|
1123
|
+
}, s ? r.src = s : r instanceof HTMLImageElement || r.onload();
|
|
1096
1124
|
});
|
|
1097
1125
|
};
|
|
1098
1126
|
export {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1127
|
+
os as ConicPolygon,
|
|
1128
|
+
is as ExtrudePolygon,
|
|
1129
|
+
Qt as Group,
|
|
1130
|
+
es as Light,
|
|
1131
|
+
ns as Line,
|
|
1132
|
+
ts as Line2,
|
|
1133
|
+
fs as Line2Material,
|
|
1134
|
+
us as LineSegmentsGeometry,
|
|
1135
|
+
Rt as MeshLineGeometry,
|
|
1136
|
+
et as MeshLineMaterial,
|
|
1137
|
+
Jt as Node,
|
|
1138
|
+
Kt as Pie,
|
|
1139
|
+
tt as getConicPolygonGeometry,
|
|
1140
|
+
ls as getConicPolygonGeometryMetas,
|
|
1141
|
+
rs as getSplitTexture
|
|
1114
1142
|
};
|