@mavonengine/editor 0.0.8 → 0.0.9
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/Editor/UI/ActivityBar.d.ts +1 -1
- package/dist/Editor/UI/Assets/AssetStats.d.ts +3 -3
- package/dist/Editor/UI/Assets/Assets.d.ts +1 -1
- package/dist/Editor/UI/Assets/AudioPlayer.d.ts +1 -1
- package/dist/Editor/UI/Assets/ModelViewer.d.ts +3 -3
- package/dist/Editor/UI/Assets/ParticleViewer.d.ts +3 -3
- package/dist/Editor/UI/Assets/TextureViewer.d.ts +3 -3
- package/dist/Editor/UI/CanvasPanel.d.ts +1 -1
- package/dist/Editor/UI/CanvasToolbar.d.ts +1 -1
- package/dist/Editor/UI/Controllers/ControllerDebug.d.ts +1 -0
- package/dist/Editor/UI/Controllers/GamepadDiagram.d.ts +5 -0
- package/dist/Editor/UI/Controllers/useGamepads.d.ts +6 -0
- package/dist/Editor/UI/DockArea.d.ts +17 -0
- package/dist/Editor/UI/Editor.d.ts +1 -1
- package/dist/Editor/UI/PanelHeader.d.ts +1 -1
- package/dist/Editor/UI/PropertiesPanel.d.ts +1 -1
- package/dist/Editor/UI/SceneExplorer.d.ts +1 -1
- package/dist/Editor/UI/ScenePanel.d.ts +1 -0
- package/dist/Editor/UI/ShadeModeButtons.d.ts +1 -1
- package/dist/Editor/UI/StatusBar.d.ts +1 -1
- package/dist/Editor/UI/TabBar.d.ts +1 -1
- package/dist/Editor/UI/Window.d.ts +1 -1
- package/dist/Editor/builtinPrefabs.d.ts +4 -0
- package/dist/Editor/demoScene.d.ts +7 -0
- package/dist/Editor/panels.d.ts +22 -0
- package/dist/Editor/recordPrefabUsage.d.ts +7 -0
- package/dist/Editor.css +2 -1
- package/dist/Editor.d.ts +26 -2
- package/dist/Editor.mjs +1654 -9
- package/dist/global-l94NfB94.mjs +22 -0
- package/dist/mount-CnirMLg0.mjs +35603 -0
- package/dist/panels-BqmX3eap.mjs +45 -0
- package/package.json +12 -12
- package/dist/Editor-CUEoQ8jG.mjs +0 -1352
- package/dist/mount-Da8g-2BI.mjs +0 -40805
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Mesh as e, MeshBasicMaterial as t } from "three";
|
|
2
|
+
// src/Editor/applyShadeMode.ts
|
|
3
|
+
function n(n, r, i, a, o) {
|
|
4
|
+
n.traverse((n) => {
|
|
5
|
+
if (n instanceof e) {
|
|
6
|
+
if (r === "solid") {
|
|
7
|
+
a.get(n.uuid)?.dispose(), a.delete(n.uuid);
|
|
8
|
+
let e = i.get(n.uuid);
|
|
9
|
+
e && (n.material = e, i.delete(n.uuid));
|
|
10
|
+
} else {
|
|
11
|
+
i.has(n.uuid) || i.set(n.uuid, n.material), a.get(n.uuid)?.dispose(), o.has(n.uuid) || o.set(n.uuid, Math.random() * 16777215);
|
|
12
|
+
let e = o.get(n.uuid), s = new t(r === "wireframe" ? {
|
|
13
|
+
wireframe: !0,
|
|
14
|
+
color: e
|
|
15
|
+
} : { color: e });
|
|
16
|
+
a.set(n.uuid, s), n.material = s;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
// src/Editor/panels.ts
|
|
22
|
+
var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = [];
|
|
23
|
+
function o() {
|
|
24
|
+
a = [...r.values()], i.forEach((e) => e());
|
|
25
|
+
}
|
|
26
|
+
function s(e) {
|
|
27
|
+
if (!e.component && !e.mount) throw Error(`Editor panel ${e.id} needs a component or a mount function`);
|
|
28
|
+
let t = e;
|
|
29
|
+
return r.set(t.id, t), o(), () => {
|
|
30
|
+
r.get(t.id) === t && c(t.id);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function c(e) {
|
|
34
|
+
r.delete(e) && o();
|
|
35
|
+
}
|
|
36
|
+
function l() {
|
|
37
|
+
return a;
|
|
38
|
+
}
|
|
39
|
+
function u(e) {
|
|
40
|
+
return i.add(e), () => i.delete(e);
|
|
41
|
+
}
|
|
42
|
+
function d(e, t) {
|
|
43
|
+
return e.filter((e) => e.location === t).sort((e, t) => (e.order ?? 0) - (t.order ?? 0));
|
|
44
|
+
}
|
|
45
|
+
export { c as a, u as i, d as n, n as o, s as r, l as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mavonengine/editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@mavonengine/core": "*",
|
|
42
|
-
"three": "
|
|
42
|
+
"three": "0.184.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@tweakpane/core": "^2.0.5",
|
|
@@ -51,22 +51,22 @@
|
|
|
51
51
|
"wavesurfer.js": "^7.12.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@dimforge/rapier3d-compat": "0.
|
|
54
|
+
"@dimforge/rapier3d-compat": "0.21.0",
|
|
55
55
|
"@mavonengine/core": "*",
|
|
56
56
|
"@testing-library/jest-dom": "^6.9.1",
|
|
57
57
|
"@testing-library/react": "^16.3.2",
|
|
58
58
|
"@types/react": "^19.2.10",
|
|
59
59
|
"@types/react-dom": "^19.2.3",
|
|
60
|
-
"@types/three": "
|
|
61
|
-
"@vitejs/plugin-react": "^
|
|
62
|
-
"@vitest/coverage-v8": "^
|
|
63
|
-
"@vitest/ui": "^
|
|
60
|
+
"@types/three": "0.184.1",
|
|
61
|
+
"@vitejs/plugin-react": "^6.2.1",
|
|
62
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
63
|
+
"@vitest/ui": "^5.1.0",
|
|
64
64
|
"glob": "^10.5.0",
|
|
65
65
|
"jsdom": "^28.1.0",
|
|
66
|
-
"three": "
|
|
67
|
-
"typescript": "
|
|
68
|
-
"vite": "^
|
|
69
|
-
"vite-plugin-glsl": "^1.
|
|
70
|
-
"vitest": "^
|
|
66
|
+
"three": "0.184.0",
|
|
67
|
+
"typescript": "7.0.2",
|
|
68
|
+
"vite": "^8.3.5",
|
|
69
|
+
"vite-plugin-glsl": "^1.6.2",
|
|
70
|
+
"vitest": "^5.1.0"
|
|
71
71
|
}
|
|
72
72
|
}
|