endset_three_editor 0.2.1 → 0.2.3
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/three-editor.es.js
CHANGED
|
@@ -1097,7 +1097,20 @@ const w = {
|
|
|
1097
1097
|
};
|
|
1098
1098
|
let ht = !1, Ae = !1, be = null, bt = null, it = null, we = [];
|
|
1099
1099
|
function Ns(r, e = "edit", t) {
|
|
1100
|
-
w.container = r, w.mode = e, ks(), js(),
|
|
1100
|
+
if (w.container = r, w.mode = e, ks(), js(), Hs(), t) {
|
|
1101
|
+
ei(t.scene, e);
|
|
1102
|
+
const s = t.camera;
|
|
1103
|
+
w.camera.position.set(
|
|
1104
|
+
s.position.x,
|
|
1105
|
+
s.position.y,
|
|
1106
|
+
s.position.z
|
|
1107
|
+
), w.camera.rotation.set(
|
|
1108
|
+
s.rotation._x,
|
|
1109
|
+
s.rotation._y,
|
|
1110
|
+
s.rotation._z
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
zs(), Us(), Qs(), mn(), e === "edit" && r.addEventListener("click", Ys), window.addEventListener("resize", Xs), t || Gs(), e === "edit" && Fs();
|
|
1101
1114
|
}
|
|
1102
1115
|
function ks() {
|
|
1103
1116
|
const r = new F.WebGLRenderer({ antialias: !0, alpha: !0 });
|
|
@@ -1225,14 +1238,18 @@ function Yo() {
|
|
|
1225
1238
|
return w.renderer;
|
|
1226
1239
|
}
|
|
1227
1240
|
function Bo() {
|
|
1241
|
+
var n, i;
|
|
1228
1242
|
const r = w.scene;
|
|
1229
1243
|
if (!r) return "{}";
|
|
1230
1244
|
let e = r;
|
|
1231
1245
|
e = r.clone(), e.children = e.children.filter(
|
|
1232
|
-
(
|
|
1246
|
+
(o) => o.userData.type !== "initFloor"
|
|
1233
1247
|
);
|
|
1234
|
-
const t = e.toJSON()
|
|
1235
|
-
|
|
1248
|
+
const t = e.toJSON(), s = {
|
|
1249
|
+
position: (n = w.camera) == null ? void 0 : n.position,
|
|
1250
|
+
rotation: (i = w.camera) == null ? void 0 : i.rotation
|
|
1251
|
+
};
|
|
1252
|
+
return JSON.stringify({ scene: t, camera: s });
|
|
1236
1253
|
}
|
|
1237
1254
|
function ei(r, e = "edit") {
|
|
1238
1255
|
var i;
|