@kolkrabbi/design-editor 0.24.0 → 0.27.0
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/README.md +2 -2
- package/dist/BindDot-CMUtpJPX.js +84 -0
- package/dist/BufferGeometryUtils-Cc8LNd5v.js +150 -0
- package/dist/ColorModesWindow-CWhL6nfm.js +1493 -0
- package/dist/GLTFLoader-BFir8PCc.js +1361 -0
- package/dist/OBJLoader-BgqC_-Jn.js +287 -0
- package/dist/{OrbitControls-Cql8Rn2i.js → OrbitControls-DVpLgmKv.js} +2755 -2202
- package/dist/STLLoader-C6DGLf6r.js +83 -0
- package/dist/Timeline-BObvcdXF.js +3014 -0
- package/dist/TreePicker-nMf17QGH.js +68 -0
- package/dist/core-EWu8GfXL.js +17504 -0
- package/dist/core.js +5 -3
- package/dist/design-editor.css +1 -1
- package/dist/design-editor.js +2114 -916
- package/dist/effects-DZEmfY7a.js +444 -0
- package/dist/effects.js +1 -1
- package/dist/generators-D1tFSZgG.js +2961 -0
- package/dist/generators.js +1 -1
- package/dist/{host-qtFVROOD.js → host-CRsCCafL.js} +429 -370
- package/dist/{host-be1CWhN1.js → host-ZLJKCZ54.js} +137 -136
- package/dist/motion-C_u7tsis.js +2295 -0
- package/dist/motion.js +1 -1
- package/dist/previewScale-BMkeLc6w.js +26 -0
- package/dist/{rolls-Bg1XHuvJ.js → rolls-BGtqxVYq.js} +2621 -1522
- package/dist/{src-B5fQgAVE.js → src-BpTckTDZ.js} +1 -1
- package/dist/{useLayerEdit-ieOjHx6x.js → useLayerEdit-BFcZhiNX.js} +20992 -12580
- package/package.json +9 -7
- package/dist/RuleRow-DIbuUt37.js +0 -650
- package/dist/TreePicker-DLmMl0aU.js +0 -68
- package/dist/core-CNI8b_83.js +0 -12314
- package/dist/effectCategories-0PnGZvjd.js +0 -4210
- package/dist/effects-BujxwoNY.js +0 -469
- package/dist/generators-SpRHQDMq.js +0 -2517
- package/dist/labels-B5qkocWy.js +0 -2007
- package/dist/motion-Bn3FVkCS.js +0 -2260
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Ht as e, T as t, Tt as n, Y as r, f as i, p as a, v as o, w as s } from "./OrbitControls-DVpLgmKv.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/three@0.185.1/node_modules/three/examples/jsm/loaders/STLLoader.js
|
|
3
|
+
var c = class extends r {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
super(e);
|
|
6
|
+
}
|
|
7
|
+
load(e, t, n, r) {
|
|
8
|
+
let i = this, a = new s(this.manager);
|
|
9
|
+
a.setPath(this.path), a.setResponseType("arraybuffer"), a.setRequestHeader(this.requestHeader), a.setWithCredentials(this.withCredentials), a.load(e, function(n) {
|
|
10
|
+
try {
|
|
11
|
+
t(i.parse(n));
|
|
12
|
+
} catch (t) {
|
|
13
|
+
r ? r(t) : console.error(t), i.manager.itemError(e);
|
|
14
|
+
}
|
|
15
|
+
}, n, r);
|
|
16
|
+
}
|
|
17
|
+
parse(r) {
|
|
18
|
+
function s(e) {
|
|
19
|
+
let t = new DataView(e);
|
|
20
|
+
if (84 + t.getUint32(80, !0) * 50 === t.byteLength) return !0;
|
|
21
|
+
let n = [
|
|
22
|
+
115,
|
|
23
|
+
111,
|
|
24
|
+
108,
|
|
25
|
+
105,
|
|
26
|
+
100
|
|
27
|
+
];
|
|
28
|
+
for (let e = 0; e < 5; e++) if (c(n, t, e)) return !1;
|
|
29
|
+
return !0;
|
|
30
|
+
}
|
|
31
|
+
function c(e, t, n) {
|
|
32
|
+
for (let r = 0, i = e.length; r < i; r++) if (e[r] !== t.getUint8(n + r)) return !1;
|
|
33
|
+
return !0;
|
|
34
|
+
}
|
|
35
|
+
function l(e) {
|
|
36
|
+
let t = new DataView(e), r = t.getUint32(80, !0), s, c, l, u = !1, d, f, p, m, h;
|
|
37
|
+
for (let e = 0; e < 70; e++) t.getUint32(e, !1) == 1129270351 && t.getUint8(e + 4) == 82 && t.getUint8(e + 5) == 61 && (u = !0, d = new Float32Array(r * 3 * 3), f = t.getUint8(e + 6) / 255, p = t.getUint8(e + 7) / 255, m = t.getUint8(e + 8) / 255, h = t.getUint8(e + 9) / 255);
|
|
38
|
+
let g = new a(), _ = new Float32Array(r * 3 * 3), v = new Float32Array(r * 3 * 3), y = new o();
|
|
39
|
+
for (let e = 0; e < r; e++) {
|
|
40
|
+
let r = 84 + e * 50, i = t.getFloat32(r, !0), a = t.getFloat32(r + 4, !0), o = t.getFloat32(r + 8, !0);
|
|
41
|
+
if (u) {
|
|
42
|
+
let e = t.getUint16(r + 48, !0);
|
|
43
|
+
e & 32768 ? (s = f, c = p, l = m) : (s = (e & 31) / 31, c = (e >> 5 & 31) / 31, l = (e >> 10 & 31) / 31);
|
|
44
|
+
}
|
|
45
|
+
for (let f = 1; f <= 3; f++) {
|
|
46
|
+
let p = r + f * 12, m = e * 3 * 3 + (f - 1) * 3;
|
|
47
|
+
_[m] = t.getFloat32(p, !0), _[m + 1] = t.getFloat32(p + 4, !0), _[m + 2] = t.getFloat32(p + 8, !0), v[m] = i, v[m + 1] = a, v[m + 2] = o, u && (y.setRGB(s, c, l, n), d[m] = y.r, d[m + 1] = y.g, d[m + 2] = y.b);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return g.setAttribute("position", new i(_, 3)), g.setAttribute("normal", new i(v, 3)), u && (g.setAttribute("color", new i(d, 3)), g.hasColors = !0, g.alpha = h), g;
|
|
51
|
+
}
|
|
52
|
+
function u(n) {
|
|
53
|
+
let r = new a(), i = /solid([\s\S]*?)endsolid/g, o = /facet([\s\S]*?)endfacet/g, s = /solid\s(.+)/, c = 0, l = /* @__PURE__ */ RegExp("vertex[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)", "g"), u = /* @__PURE__ */ RegExp("normal[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)", "g"), d = [], f = [], p = [], m = new e(), h, g = 0, _ = 0, v = 0;
|
|
54
|
+
for (; (h = i.exec(n)) !== null;) {
|
|
55
|
+
_ = v;
|
|
56
|
+
let e = h[0], t = (h = s.exec(e)) === null ? "" : h[1];
|
|
57
|
+
for (p.push(t); (h = o.exec(e)) !== null;) {
|
|
58
|
+
let e = 0, t = 0, n = h[0];
|
|
59
|
+
for (; (h = u.exec(n)) !== null;) m.x = parseFloat(h[1]), m.y = parseFloat(h[2]), m.z = parseFloat(h[3]), t++;
|
|
60
|
+
for (; (h = l.exec(n)) !== null;) d.push(parseFloat(h[1]), parseFloat(h[2]), parseFloat(h[3])), f.push(m.x, m.y, m.z), e++, v++;
|
|
61
|
+
t !== 1 && console.error("THREE.STLLoader: Something isn't right with the normal of face number " + c), e !== 3 && console.error("THREE.STLLoader: Something isn't right with the vertices of face number " + c), c++;
|
|
62
|
+
}
|
|
63
|
+
let n = _, i = v - _;
|
|
64
|
+
r.userData.groupNames = p, r.addGroup(n, i, g), g++;
|
|
65
|
+
}
|
|
66
|
+
return r.setAttribute("position", new t(d, 3)), r.setAttribute("normal", new t(f, 3)), r;
|
|
67
|
+
}
|
|
68
|
+
function d(e) {
|
|
69
|
+
return typeof e == "string" ? e : new TextDecoder().decode(e);
|
|
70
|
+
}
|
|
71
|
+
function f(e) {
|
|
72
|
+
if (typeof e == "string") {
|
|
73
|
+
let t = new Uint8Array(e.length);
|
|
74
|
+
for (let n = 0; n < e.length; n++) t[n] = e.charCodeAt(n) & 255;
|
|
75
|
+
return t.buffer || t;
|
|
76
|
+
} else return e;
|
|
77
|
+
}
|
|
78
|
+
let p = f(r);
|
|
79
|
+
return s(p) ? l(p) : u(d(r));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { c as STLLoader };
|