@mavonengine/editor 0.0.7 → 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.
Files changed (35) hide show
  1. package/dist/Editor/UI/ActivityBar.d.ts +1 -1
  2. package/dist/Editor/UI/Assets/AssetStats.d.ts +3 -3
  3. package/dist/Editor/UI/Assets/Assets.d.ts +1 -1
  4. package/dist/Editor/UI/Assets/AudioPlayer.d.ts +1 -1
  5. package/dist/Editor/UI/Assets/ModelViewer.d.ts +3 -3
  6. package/dist/Editor/UI/Assets/ParticleViewer.d.ts +3 -3
  7. package/dist/Editor/UI/Assets/TextureViewer.d.ts +5 -4
  8. package/dist/Editor/UI/CanvasPanel.d.ts +1 -1
  9. package/dist/Editor/UI/CanvasToolbar.d.ts +1 -1
  10. package/dist/Editor/UI/Controllers/ControllerDebug.d.ts +1 -0
  11. package/dist/Editor/UI/Controllers/GamepadDiagram.d.ts +5 -0
  12. package/dist/Editor/UI/Controllers/useGamepads.d.ts +6 -0
  13. package/dist/Editor/UI/DockArea.d.ts +17 -0
  14. package/dist/Editor/UI/Editor.d.ts +1 -1
  15. package/dist/Editor/UI/PanelHeader.d.ts +1 -1
  16. package/dist/Editor/UI/PropertiesPanel.d.ts +1 -1
  17. package/dist/Editor/UI/SceneExplorer.d.ts +1 -1
  18. package/dist/Editor/UI/ScenePanel.d.ts +1 -0
  19. package/dist/Editor/UI/ShadeModeButtons.d.ts +1 -1
  20. package/dist/Editor/UI/StatusBar.d.ts +1 -1
  21. package/dist/Editor/UI/TabBar.d.ts +1 -1
  22. package/dist/Editor/UI/Window.d.ts +1 -1
  23. package/dist/Editor/builtinPrefabs.d.ts +4 -0
  24. package/dist/Editor/demoScene.d.ts +7 -0
  25. package/dist/Editor/panels.d.ts +22 -0
  26. package/dist/Editor/recordPrefabUsage.d.ts +7 -0
  27. package/dist/Editor.css +2 -1
  28. package/dist/Editor.d.ts +29 -5
  29. package/dist/Editor.mjs +1654 -9
  30. package/dist/global-l94NfB94.mjs +22 -0
  31. package/dist/mount-CnirMLg0.mjs +35603 -0
  32. package/dist/panels-BqmX3eap.mjs +45 -0
  33. package/package.json +20 -20
  34. package/dist/Editor-BZKTiLdQ.mjs +0 -1329
  35. package/dist/mount-DicE86w2.mjs +0 -40697
@@ -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.7",
3
+ "version": "0.0.9",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -16,18 +16,18 @@
16
16
  "vite",
17
17
  "tweakpane"
18
18
  ],
19
- "files": [
20
- "dist"
21
- ],
22
- "main": "./dist/Editor.mjs",
23
- "types": "./dist/Editor.d.ts",
24
19
  "exports": {
25
20
  ".": {
26
- "import": "./dist/Editor.mjs",
27
- "types": "./dist/Editor.d.ts"
21
+ "types": "./dist/Editor.d.ts",
22
+ "import": "./dist/Editor.mjs"
28
23
  },
29
24
  "./dist/Editor.css": "./dist/Editor.css"
30
25
  },
26
+ "main": "./dist/Editor.mjs",
27
+ "types": "./dist/Editor.d.ts",
28
+ "files": [
29
+ "dist"
30
+ ],
31
31
  "scripts": {
32
32
  "build": "vite build && tsc -p tsconfig.build.json",
33
33
  "lint": "eslint .",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@mavonengine/core": "*",
42
- "three": "^0.176.0"
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.21.0",
54
55
  "@mavonengine/core": "*",
55
- "@dimforge/rapier3d-compat": "0.18.2",
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": "^0.176.0",
61
- "@vitejs/plugin-react": "^5.1.2",
62
- "@vitest/coverage-v8": "^3.2.4",
63
- "@vitest/ui": "^3.2.4",
64
- "jsdom": "^28.1.0",
65
- "three": "^0.176.0",
66
- "typescript": "5.9.2",
67
- "vite": "^6.3.5",
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",
68
64
  "glob": "^10.5.0",
69
- "vite-plugin-glsl": "^1.4.1",
70
- "vitest": "^3.2.4"
65
+ "jsdom": "^28.1.0",
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
  }