@volter/editor-game 0.5.65 → 0.5.66

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 (141) hide show
  1. package/contributions/generation.service.ts +2 -2
  2. package/contributions/generations.status.tsx +1 -1
  3. package/contributions/godot.palette.json +99 -0
  4. package/contributions/godot.style.ts +62 -0
  5. package/contributions/godot.view.ts +69 -0
  6. package/contributions/ingest.service.ts +3 -3
  7. package/contributions/play.command.ts +1 -1
  8. package/contributions/react/react-inspector.service.ts +2 -2
  9. package/contributions/scene-document.service.ts +3 -3
  10. package/contributions/three/component-verbs.command.ts +3 -3
  11. package/contributions/unity.palette.json +102 -0
  12. package/contributions/unity.style.ts +62 -0
  13. package/contributions/unity.view.ts +76 -0
  14. package/contributions/unreal.palette.json +105 -0
  15. package/contributions/unreal.style.ts +58 -0
  16. package/contributions/unreal.view.ts +88 -0
  17. package/dist-node/serving.mjs +16 -0
  18. package/package.json +21 -14
  19. package/serving/index.ts +27 -0
  20. package/src/asset-budget/asset-budget-model.ts +3 -3
  21. package/src/asset-budget/optimize-apply.ts +7 -7
  22. package/src/bridge/dispatch.ts +2 -2
  23. package/src/bridge/screenshot.ts +3 -3
  24. package/src/coverage/live-authoring-surface.ts +1 -1
  25. package/src/coverage/live-project-verbs.ts +1 -1
  26. package/src/coverage/native-system-coverage.ts +1 -1
  27. package/src/coverage/session-coverage.ts +2 -2
  28. package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +10 -50
  29. package/src/game-document/GameCaptureFrameButton.tsx +1 -1
  30. package/src/game-document/GamePanel.tsx +4 -4
  31. package/src/generation/GenerationActivity.tsx +3 -5
  32. package/src/generation/generation-documents.tsx +3 -3
  33. package/src/generation/generation-jobs.ts +1 -1
  34. package/src/generation/generation-presentation.ts +1 -1
  35. package/src/host/adapter-reach.ts +1 -1
  36. package/src/host/adapter-runtime-bindings.ts +1 -1
  37. package/src/host/api/configurations.ts +2 -2
  38. package/src/host/authoring/babylon-authoring-adapter.ts +2 -2
  39. package/src/host/authoring/contract-hierarchy-authoring.ts +1 -1
  40. package/src/host/authoring/contract-scenes-stories.ts +1 -1
  41. package/src/host/authoring/creation-site-related.ts +2 -2
  42. package/src/host/authoring/ephemeral-persistence.ts +1 -1
  43. package/src/host/authoring/gesture-persist.ts +1 -1
  44. package/src/host/authoring/ingest-source-persistence.ts +4 -4
  45. package/src/host/authoring/mount-isolated-pixi-screen.ts +1 -1
  46. package/src/host/authoring/pixi-authoring-adapter.ts +2 -2
  47. package/src/host/authoring/pixi-live-write-target.ts +3 -3
  48. package/src/host/authoring/pixi-still-presentation.ts +1 -1
  49. package/src/host/authoring/pixi-structure-history.ts +1 -1
  50. package/src/host/authoring/source-persistence-backend.ts +3 -3
  51. package/src/host/authoring/struct-write-pipe.ts +2 -2
  52. package/src/host/browser-transpile.ts +1 -1
  53. package/src/host/canvas-entry-runtime.ts +1 -1
  54. package/src/host/components/HeaderTelemetry.tsx +5 -12
  55. package/src/host/components/PixiIsolationSceneContent.tsx +8 -7
  56. package/src/host/components/ThreeIsolationSceneContent.tsx +2 -2
  57. package/src/host/components/scene-document.tsx +15 -47
  58. package/src/host/components/world-root-stage-binding.tsx +6 -15
  59. package/src/host/components/world-root-stage.ts +60 -14
  60. package/src/host/coverage/capability-coverage.ts +13 -1
  61. package/src/host/coverage/game-contract-seam-evidence.ts +1 -1
  62. package/src/host/coverage/project-verb-coverage.ts +2 -17
  63. package/src/host/coverage/system-adapter-coverage.ts +1 -1
  64. package/src/host/design-system-stories/fixtures/editor-runtime.tsx +9 -1
  65. package/src/host/document-preview-three.ts +1 -1
  66. package/src/host/game-module-access.ts +1 -1
  67. package/src/host/game-realm-page.ts +15 -7
  68. package/src/host/game-realm-reclaim.ts +1 -1
  69. package/src/host/gated-globals.ts +4 -4
  70. package/src/host/history/json-history-resource.ts +2 -2
  71. package/src/host/instance-extract-actions.ts +1 -1
  72. package/src/host/instance-fork-actions.ts +1 -1
  73. package/src/host/projection/dom.ts +2 -2
  74. package/src/host/projection/pixi.ts +1 -1
  75. package/src/host/r3f-entry-runtime.ts +1 -1
  76. package/src/host/react-mount-runtime.ts +1 -1
  77. package/src/host/realm-services.ts +1 -1
  78. package/src/host/roots/module-root.ts +1 -1
  79. package/src/host/scene-view-drawability.ts +2 -2
  80. package/src/host/server-log-bridge.ts +1 -1
  81. package/src/host/three-ingest-runtime.ts +1 -1
  82. package/src/host/use-active-performance-source.ts +1 -1
  83. package/src/ingest/active-ingest.ts +1 -1
  84. package/src/ingest/authoring/ingest-root-adapter.ts +5 -5
  85. package/src/ingest/capture-wait-report.ts +1 -1
  86. package/src/ingest/deferred-ingest-play.ts +5 -4
  87. package/src/ingest/ingest-boot-viewport.ts +4 -6
  88. package/src/ingest/ingest-canvas-scene-document.tsx +9 -8
  89. package/src/ingest/ingest-canvas-scene.ts +2 -5
  90. package/src/ingest/ingest-play-control.ts +3 -3
  91. package/src/ingest/ingest-render-debug.ts +1 -1
  92. package/src/ingest/ingest-siblings.ts +3 -3
  93. package/src/ingest/module-mode.ts +4 -5
  94. package/src/ingest/mount-canvas-ingest-root.ts +6 -6
  95. package/src/ingest/mount-coverage.ts +2 -2
  96. package/src/ingest/mount-dom-ingest-root.ts +5 -5
  97. package/src/ingest/mount-ingest-root.ts +7 -7
  98. package/src/ingest/mount-three-ingest-root.ts +4 -4
  99. package/src/ingest/unmount-ingest-root.ts +2 -2
  100. package/src/play/play-mode.ts +30 -16
  101. package/src/play/play-recording.ts +1 -1
  102. package/src/profiler/PerformancePanel.tsx +1 -1
  103. package/src/react/design-time-react-mount.ts +17 -23
  104. package/src/react/dom-authoring-adapter.ts +2 -2
  105. package/src/react/react-inspector-section.tsx +8 -8
  106. package/src/react/react-world-authoring-adapter.ts +20 -132
  107. package/src/react/story-documents/story-documents.tsx +9 -13
  108. package/src/react/ui-board-document.tsx +3 -4
  109. package/src/react/ui-component-board.ts +3 -3
  110. package/src/three/authoring/camera-runtime-inspector-section.tsx +1 -1
  111. package/src/three/authoring/constraint-inspector-section.tsx +3 -3
  112. package/src/three/authoring/model-asset-inspector-section.tsx +7 -11
  113. package/src/three/authoring/oid-source-persistence.ts +6 -6
  114. package/src/three/authoring/r3f-design-session.ts +21 -7
  115. package/src/three/authoring/r3f-source-authoring-adapter.ts +17 -17
  116. package/src/three/authoring/reflection-probe-inspector-section.tsx +3 -3
  117. package/src/three/authoring/spatial-joint-handles.ts +1 -1
  118. package/src/three/authoring/spatial-lod-handles.ts +1 -1
  119. package/src/three/authoring/spatial-particle-handles.ts +1 -1
  120. package/src/three/authoring/three-authoring-adapter.ts +4 -4
  121. package/src/three/component-verbs/extract-menu.ts +1 -1
  122. package/src/three/component-verbs/fork-menu.ts +1 -1
  123. package/src/three/component-verbs/internals-menu.ts +1 -1
  124. package/src/three/drei-asset-caches.ts +13 -0
  125. package/src/three/story-documents/three-story-documents.tsx +11 -21
  126. package/src/three/three-board/ThreeBoardDocument.tsx +12 -13
  127. package/src/three/three-board/board-scene.ts +1 -1
  128. package/src/three/three-board/three-component-board.ts +3 -3
  129. package/contributions/react/pasteboard.action.ts +0 -41
  130. package/contributions/xstate-behavior.action.ts +0 -42
  131. package/contributions/xstate-behavior.document.tsx +0 -73
  132. package/contributions/xstate-behavior.inspector.tsx +0 -28
  133. package/contributions/xstate-behavior.menu.ts +0 -23
  134. package/src/react/pasteboard-materialize.ts +0 -154
  135. package/src/xstate/XStateBehaviorSection.tsx +0 -130
  136. package/src/xstate/XStateMachineInspector.tsx +0 -566
  137. package/src/xstate/character-animation-machine.fixture.ts +0 -74
  138. package/src/xstate/live-behaviors.ts +0 -106
  139. package/src/xstate/use-live-actor-state.ts +0 -44
  140. package/src/xstate/xstate-graph.ts +0 -235
  141. package/src/xstate/xstate-layout.ts +0 -76
@@ -31,8 +31,8 @@
31
31
  */
32
32
 
33
33
  import { registerDocumentOpener } from '@volter/editor-core/document-open-registry';
34
- import { CONTRIBUTED_WORKSPACE_UTILITIES } from '@volter/editor-core/workspace-core-utilities';
35
- import { registerWorkspaceUtility } from '@volter/editor-core/workspace-utility-registry';
34
+ import { CONTRIBUTED_WORKSPACE_UTILITIES } from '@volter/editor-sdk/kit/workspace-core-utilities';
35
+ import { registerWorkspaceUtility } from '@volter/editor-sdk/kit/workspace-utility-registry';
36
36
  import { GenerationActivity } from '../src/generation/GenerationActivity';
37
37
  import {
38
38
  openGenerationCreateDocument,
@@ -9,7 +9,7 @@
9
9
  * concern).
10
10
  */
11
11
 
12
- import { CONTRIBUTED_WORKSPACE_UTILITIES } from '@volter/editor-core/workspace-core-utilities';
12
+ import { CONTRIBUTED_WORKSPACE_UTILITIES } from '@volter/editor-sdk/kit/workspace-core-utilities';
13
13
  import { editorHost } from '@volter/editor-sdk/host';
14
14
  import { Button } from '@volter/editor-sdk/widgets';
15
15
  import { useSyncExternalStore } from 'react';
@@ -0,0 +1,99 @@
1
+ {
2
+ "schemaVersion": 3,
3
+ "name": "Godot",
4
+ "theme": {
5
+ "id": "godot",
6
+ "color": {
7
+ "surface": {
8
+ "shell": "#1d2229",
9
+ "panel": "#21262e",
10
+ "chrome": "#252b34",
11
+ "raised": "#363d4a",
12
+ "inset": "#1d2229",
13
+ "overlay": "rgba(33,38,46,0.96)"
14
+ },
15
+ "boundary": {
16
+ "default": "#363d4a",
17
+ "strong": "#4a5263",
18
+ "area": "#1d2229",
19
+ "indent": "#4a5263",
20
+ "divider": "#2c323c"
21
+ },
22
+ "content": {
23
+ "primary": "#e0e0e0",
24
+ "muted": "#c0c3c8",
25
+ "dim": "#8a8e96",
26
+ "onAccent": "#ffffff",
27
+ "menu": "#e0e0e0",
28
+ "status": "#9a9ea6",
29
+ "placeholder": "#6a6d73",
30
+ "active": "#70bafa",
31
+ "selected": "#70bafa",
32
+ "onBright": {
33
+ "primary": "#1d2229",
34
+ "muted": "rgba(29,34,41,0.82)",
35
+ "dim": "rgba(29,34,41,0.7)"
36
+ }
37
+ },
38
+ "accent": {
39
+ "default": "#70bafa",
40
+ "muted": "#374f66"
41
+ },
42
+ "widget": {
43
+ "regular": "#363d4a",
44
+ "menu": "#21262e",
45
+ "field": "#1d2229",
46
+ "emboss": "rgba(0,0,0,0.12)"
47
+ },
48
+ "viewport": {
49
+ "background": "#4d4d4d",
50
+ "grid": "#6e6964",
51
+ "axisX": "#f53352",
52
+ "axisY": "#87d603",
53
+ "axisZ": "#298cf5",
54
+ "selection": "#ff8000",
55
+ "active": "#ff8000"
56
+ },
57
+ "gizmo": {
58
+ "x": "#f53352",
59
+ "y": "#87d603",
60
+ "z": "#298cf5"
61
+ },
62
+ "region": {
63
+ "outliner": "#21262e",
64
+ "properties": "#21262e"
65
+ },
66
+ "category": {
67
+ "object": "#fc7f7f",
68
+ "modifier": "#8da5f3",
69
+ "material": "#ff5d5d",
70
+ "data": "#8eef97",
71
+ "scene": "#e0e0e0",
72
+ "collection": "#e0e0e0",
73
+ "tool": "#e0e0e0",
74
+ "operator": "#8eef97"
75
+ },
76
+ "semantic": {
77
+ "danger": "#ff786b",
78
+ "dangerMuted": "rgba(255,120,107,0.28)",
79
+ "dangerFaint": "rgba(255,120,107,0.12)",
80
+ "warning": "#ffdd65",
81
+ "warningMuted": "rgba(255,221,101,0.28)",
82
+ "success": "#45ff8b",
83
+ "successMuted": "rgba(69,255,139,0.28)",
84
+ "dynamic": "#ffdd65",
85
+ "dynamicMuted": "rgba(255,221,101,0.18)",
86
+ "instance": "#70bafa"
87
+ },
88
+ "neutralOverlay": {
89
+ "hover": "rgba(255,255,255,0.07)",
90
+ "active": "rgba(255,255,255,0.13)"
91
+ },
92
+ "scrim": "rgba(0,0,0,0.6)"
93
+ },
94
+ "typography": {
95
+ "sans": "'Noto Sans', 'Inter', system-ui, sans-serif",
96
+ "mono": "'JetBrains Mono', 'Hack', Menlo, monospace"
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * THE GODOT LOOK — Godot 4.4's default editor theme and its 3D viewport's
3
+ * colours, made only of values (`docs/VIEWPORT-STAGE.md`, the Godot column).
4
+ *
5
+ * The viewport group transcribes Godot's axis colours (`theme_modern.cpp`): X (0.96, 0.20,
6
+ * 0.32), Y (0.53, 0.84, 0.01) and Z (0.16, 0.55, 0.96), named by the world's axes; and the selection
7
+ * box (1.0, 0.5, 0). The fill is Godot's `default_clear_color` (0.3, 0.3, 0.3),
8
+ * what shows with the preview environment off. The grid's minor and major
9
+ * levels are the primary/secondary grid colours at alpha 0.5, fitted against
10
+ * `engine-reference/godot/tuto_3d3.png` over the preview sky's ground: a line
11
+ * there peaks near (95, 91, 87) over a (62, 51, 40) floor.
12
+ * Light, sky and overlays are the VIEW's presentation, not this look's.
13
+ */
14
+ import type { StyleContribution } from '@volter/editor-sdk/looks';
15
+ import palette from './godot.palette.json';
16
+
17
+ export const point = 'workspace.style';
18
+ export const style: StyleContribution = {
19
+ id: 'godot',
20
+ title: 'Godot',
21
+ paletteId: 'godot',
22
+ materialId: 'godot',
23
+ material: {
24
+ id: 'godot',
25
+ title: 'Godot',
26
+ description: 'Flat blue-grey panels, three-pixel corners, a soft shadow under popups.',
27
+ shape: { small: '3px', medium: '3px', large: '4px', full: '9999px' },
28
+ elevation: {
29
+ small: 'none',
30
+ medium: '0 3px 10px rgba(0,0,0,0.45)',
31
+ large: '0 6px 18px rgba(0,0,0,0.5)',
32
+ },
33
+ stage: {
34
+ // Godot's `manipulator_gizmo_size` is 80, but its unit is not ours: the stage's px per
35
+ // gizmo unit is fitted, not transcribed. At 128 the rotation rings measure ~80 px in
36
+ // radius on a 1x capture, against ~85 px in `engine-reference/godot/tuto_3d5.png`.
37
+ gizmoSize: 128,
38
+ // The move arrows reach 1.6 ring radii with a head about half again three's
39
+ // (`tuto_3d5.png`: a 142 px tip against a 90 px ring, a 25 px head).
40
+ gizmoArrowLength: 1.6,
41
+ gizmoArrowHead: 1.5,
42
+ // Its rotation rings are about twice three's thickness (`tuto_3d5.png`).
43
+ gizmoRingWidth: 2,
44
+ // `manipulator_gizmo_opacity` 0.9; the highlight is the axis colour at a quarter of its
45
+ // saturation and full value (`node_3d_editor_plugin.cpp`).
46
+ gizmoOpacity: 0.9,
47
+ gizmoHighlightSaturation: 0.25,
48
+ gizmoHighlightValue: 1,
49
+ // Godot's grid lines are hairlines at both levels.
50
+ gridLineWidth: 1,
51
+ gridMajorWidth: 1,
52
+ gridMajorContrast: 1.3,
53
+ // Godot's selection is the whole AABB. Its edge is one solid pixel at 1x
54
+ // (`tuto_3d5.png`); our screen-space line needs 2 to cover one captured pixel.
55
+ selectionBox: 'edges',
56
+ // Godot's box turns with the object: its AABB in the object's own frame.
57
+ selectionBoxFrame: 'object',
58
+ selectionBoxWidth: 2,
59
+ },
60
+ },
61
+ palette,
62
+ };
@@ -0,0 +1,69 @@
1
+ /**
2
+ * GODOT'S DEFAULT 3D VIEWPORT: its preview sun and procedural sky (the kit's sky, which is
3
+ * Godot's own `ProceduralSkyMaterial` default) under its Filmic curve, the sky as backdrop, an
4
+ * 8-cell grid, all three axis lines with Y vertical, the full selection box, and its Select
5
+ * gizmo's arrows and rings without the extra handles. Judged against `tuto_3d3.png`/`tuto_3d5.png`.
6
+ * A named view (`@volter/editor-sdk/kit/viewport-presentation` `ViewPreset`): what the view does
7
+ * and how it is lit, never its look — pair it with the Godot style for the whole target.
8
+ */
9
+ import type { ViewPreset } from '@volter/editor-sdk/kit/viewport-presentation';
10
+
11
+ export const point = 'workspace.view';
12
+ export const view: ViewPreset = {
13
+ id: 'godot',
14
+ title: 'Godot',
15
+ layer: {
16
+ all: {
17
+ lighting: {
18
+ source: 'preview',
19
+ preview: {
20
+ sun: {
21
+ enabled: true,
22
+ color: '#ffffff',
23
+ energy: 1,
24
+ altitude: 60,
25
+ azimuth: 150,
26
+ shadowDistance: 100,
27
+ },
28
+ environment: {
29
+ enabled: true,
30
+ energy: 1,
31
+ rotation: 0,
32
+ },
33
+ },
34
+ tone: {
35
+ mapper: 'filmic',
36
+ exposure: 1,
37
+ },
38
+ },
39
+ backdrop: {
40
+ source: 'environment',
41
+ opacity: 1,
42
+ blur: 0,
43
+ },
44
+ },
45
+ overlays: {
46
+ grid: {
47
+ visible: true,
48
+ majorEvery: 8,
49
+ },
50
+ selection: {
51
+ outline: false,
52
+ wire: false,
53
+ box: true,
54
+ },
55
+ axes: {
56
+ x: true,
57
+ y: true,
58
+ z: true,
59
+ },
60
+ },
61
+ interaction: {
62
+ transformHandles: {
63
+ scale: false,
64
+ viewRotate: false,
65
+ freeMove: false,
66
+ },
67
+ },
68
+ },
69
+ };
@@ -40,10 +40,10 @@
40
40
  * `mount-ingest-root.ts` binds itself on — read at launch time rather than
41
41
  * captured, so neither ordering can leave the launch holding `null`.
42
42
  */
43
- import { editorConsole } from '@volter/editor-core/editor-console';
43
+ import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
44
44
  import { importIngestAdapterModule, ingestAdapterModulePath } from '../src/host/ingest/registry';
45
45
  import { registerAdapterDefinitionSource } from '@volter/editor-core/project-adapter';
46
- import { shellStoreForHost } from '@volter/editor-core/shell-store-door';
46
+ import { threeStoreForHost } from '@volter/editor-core/shell-store-door';
47
47
  import { editorHost } from '@volter/editor-sdk/host';
48
48
  import { autoLaunchIngest } from '../src/ingest/mount-ingest-root';
49
49
 
@@ -60,7 +60,7 @@ export function start(): () => void {
60
60
  importModule: async (rootId) => await importIngestAdapterModule(rootId),
61
61
  });
62
62
  const stopReady = editorHost().project.onReady(async () => {
63
- const store = shellStoreForHost();
63
+ const store = threeStoreForHost();
64
64
  if (!store) {
65
65
  // The store arrives with `AppRoot`, long before any boot chain reaches
66
66
  // ready, so this cannot happen quietly — say so rather than skipping an
@@ -31,7 +31,7 @@
31
31
  import { getActiveSystems } from '@volter/editor-core/authoring/active-systems';
32
32
  import { setGameplayExportActive } from '@volter/editor-core/gameplay-export-state';
33
33
  import { stopGameplayRecording } from '../src/host/gameplay-recording';
34
- import { liveInstanceContainer } from '@volter/editor-core/live-session-registry';
34
+ import { liveInstanceContainer } from '@volter/editor-sdk/kit/live-session-registry';
35
35
  import type { CommandContribution } from '@volter/editor-sdk/commands';
36
36
  import { editorHost } from '@volter/editor-sdk/host';
37
37
  import type { OfflineAudioRenderer } from '@volter/editor-project/adapter';
@@ -64,9 +64,9 @@
64
64
  * structural write pipe (`authoring/r3f-source-authoring-adapter.ts`,
65
65
  * `@vgai/canvas/pixi-source-write-target.ts`); the breakpoint state
66
66
  * (`components/BoardRulers.tsx`); `authoring/react-story-board.ts`, the
67
- * board's geometry, which four host surfaces read
67
+ * board's geometry, which three host surfaces read
68
68
  * (`components/RootSelectionOverlay.tsx:98`,
69
- * `components/ReactCanvasControls.tsx:15`, `pasteboard-materialize.ts:20`,
69
+ * `components/ReactCanvasControls.tsx:15`,
70
70
  * `canvas-board/CanvasBoardDocument.tsx:57`) because they draw chrome OVER
71
71
  * the board. Each is its own unit with its own seam; none of them is in the
72
72
  * host's EAGER closure, which is what these cuts buy.
@@ -10,16 +10,16 @@
10
10
  * (`@volter/editor-core/shell-store-door`'s `onShellStore`, as Play's
11
11
  * autoplay entry does) and unbinds the previous store's binding first.
12
12
  */
13
- import { onShellStore } from '@volter/editor-core/shell-store-door';
13
+ import { onThreeStore } from '@volter/editor-core/shell-store-door';
14
14
  import { unregisterAvailableWorkspaceDocument } from '@volter/editor-core/workspace-available-documents';
15
- import { SCENE_DOCUMENT_ID } from '@volter/editor-core/workspace-document-ids';
15
+ import { SCENE_DOCUMENT_ID } from '@volter/editor-sdk/kit/workspace-document-ids';
16
16
  import { bindSceneDocument } from '../src/host/components/scene-document';
17
17
 
18
18
  export const point = 'workspace.service';
19
19
 
20
20
  export function start(): () => void {
21
21
  let unbind: (() => void) | null = null;
22
- const stopStore = onShellStore((store) => {
22
+ const stopStore = onThreeStore((store) => {
23
23
  unbind?.();
24
24
  unbind = bindSceneDocument(store);
25
25
  });
@@ -28,7 +28,7 @@ import { getActiveAuthoring } from '@volter/editor-core/authoring/active-adapter
28
28
  import type { EditorShellStore } from '@volter/editor-core/editor-shell-store';
29
29
  import { canExtractNode, isExtractedHint } from '../../src/host/instance-extract-actions';
30
30
  import { canForkInstance, isForkedHint } from '../../src/host/instance-fork-actions';
31
- import { shellStoreForHost } from '@volter/editor-core/shell-store-door';
31
+ import { threeStoreForHost } from '@volter/editor-core/shell-store-door';
32
32
  import type { CommandContribution } from '@volter/editor-sdk/commands';
33
33
  import { instanceExtractSourceFor } from '../../src/three/component-verbs/extract-menu';
34
34
  import { instanceForkSourceFor } from '../../src/three/component-verbs/fork-menu';
@@ -51,7 +51,7 @@ export const commands: CommandContribution['commands'] = {
51
51
  derivedRefresh: 'always',
52
52
  handle: async (cmd) => {
53
53
  try {
54
- const store = shellStoreForHost();
54
+ const store = threeStoreForHost();
55
55
  if (!store) return NO_STORE;
56
56
  const id = subjectId(cmd, store);
57
57
  if (!id) return { ok: false, error: 'extract-component needs an id or a selected row.' };
@@ -82,7 +82,7 @@ export const commands: CommandContribution['commands'] = {
82
82
  derivedRefresh: 'always',
83
83
  handle: async (cmd) => {
84
84
  try {
85
- const store = shellStoreForHost();
85
+ const store = threeStoreForHost();
86
86
  if (!store) return NO_STORE;
87
87
  const id = subjectId(cmd, store);
88
88
  if (!id) return { ok: false, error: 'fork-component needs an id or a selected row.' };
@@ -0,0 +1,102 @@
1
+ {
2
+ "schemaVersion": 3,
3
+ "name": "Unity",
4
+ "theme": {
5
+ "id": "unity",
6
+ "color": {
7
+ "surface": {
8
+ "shell": "#191919",
9
+ "panel": "#383838",
10
+ "chrome": "#282828",
11
+ "raised": "#585858",
12
+ "inset": "#2a2a2a",
13
+ "overlay": "rgba(40,40,40,0.96)"
14
+ },
15
+ "boundary": {
16
+ "default": "#232323",
17
+ "strong": "#191919",
18
+ "area": "#191919",
19
+ "indent": "#4a4a4a",
20
+ "divider": "#2f2f2f"
21
+ },
22
+ "content": {
23
+ "primary": "#d2d2d2",
24
+ "muted": "#c4c4c4",
25
+ "dim": "#8f8f8f",
26
+ "onAccent": "#ffffff",
27
+ "menu": "#d2d2d2",
28
+ "status": "#a0a0a0",
29
+ "placeholder": "#6f6f6f",
30
+ "active": "#7bbcff",
31
+ "selected": "#ffffff",
32
+ "onBright": {
33
+ "primary": "#191919",
34
+ "muted": "rgba(25,25,25,0.82)",
35
+ "dim": "rgba(25,25,25,0.7)"
36
+ }
37
+ },
38
+ "accent": {
39
+ "default": "#3a79bb",
40
+ "muted": "#2c5d87"
41
+ },
42
+ "widget": {
43
+ "regular": "#585858",
44
+ "menu": "#383838",
45
+ "field": "#2a2a2a",
46
+ "emboss": "rgba(0,0,0,0.2)"
47
+ },
48
+ "viewport": {
49
+ "background": "#474747",
50
+ "grid": "#76726f",
51
+ "axisX": "#db3e1d",
52
+ "axisY": "#9af348",
53
+ "axisZ": "#3a7af8",
54
+ "selection": "#ff6600",
55
+ "wire": "#5e779b",
56
+ "active": "#ff6600"
57
+ },
58
+ "gizmo": {
59
+ "x": "#db3e1d",
60
+ "y": "#9af348",
61
+ "z": "#3a7af8",
62
+ "hover": "#c9c890",
63
+ "drag": "#f6f232"
64
+ },
65
+ "region": {
66
+ "outliner": "#383838",
67
+ "properties": "#383838"
68
+ },
69
+ "category": {
70
+ "object": "#8fb8f0",
71
+ "modifier": "#8fb8f0",
72
+ "material": "#e0a060",
73
+ "data": "#9fd88c",
74
+ "scene": "#d2d2d2",
75
+ "collection": "#d2d2d2",
76
+ "tool": "#d2d2d2",
77
+ "operator": "#9fd88c"
78
+ },
79
+ "semantic": {
80
+ "danger": "#ff6b5b",
81
+ "dangerMuted": "rgba(255,120,107,0.28)",
82
+ "dangerFaint": "rgba(255,120,107,0.12)",
83
+ "warning": "#ffc107",
84
+ "warningMuted": "rgba(255,221,101,0.28)",
85
+ "success": "#7cc576",
86
+ "successMuted": "rgba(69,255,139,0.28)",
87
+ "dynamic": "#ffdd65",
88
+ "dynamicMuted": "rgba(255,221,101,0.18)",
89
+ "instance": "#7bbcff"
90
+ },
91
+ "neutralOverlay": {
92
+ "hover": "rgba(255,255,255,0.07)",
93
+ "active": "rgba(255,255,255,0.13)"
94
+ },
95
+ "scrim": "rgba(0,0,0,0.6)"
96
+ },
97
+ "typography": {
98
+ "sans": "'Inter', 'Segoe UI', system-ui, sans-serif",
99
+ "mono": "'Roboto Mono', Menlo, monospace"
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * THE UNITY LOOK — Unity 6's dark editor skin and its Scene view's colours,
3
+ * made only of values (`docs/VIEWPORT-STAGE.md`, the Unity column).
4
+ *
5
+ * The viewport group transcribes UnityCsReference: the fill is the Scene
6
+ * view's flat colour with the skybox off (0.278, 0.278, 0.278); selection is
7
+ * `Handles.selectedColor`'s outline `#ff6600`. The grid (0.5, 0.5, 0.5, 0.4)
8
+ * is fitted against `engine-reference/unity/NewEmptyScene_01.png`: its lines
9
+ * sit about 10 levels over the skybox ground (104, 97, 92). The axis colours, named by the world's axes, are
10
+ * `Handles.xAxisColor`, `yAxisColor` and `zAxisColor`; Unity's floor draws no axis
11
+ * lines, which is its view's presentation (`overlays.axes` all off), not this look's.
12
+ * Light, skybox and overlays are the VIEW's presentation, not this look's.
13
+ */
14
+ import type { StyleContribution } from '@volter/editor-sdk/looks';
15
+ import palette from './unity.palette.json';
16
+
17
+ export const point = 'workspace.style';
18
+ export const style: StyleContribution = {
19
+ id: 'unity',
20
+ title: 'Unity',
21
+ paletteId: 'unity',
22
+ materialId: 'unity',
23
+ material: {
24
+ id: 'unity',
25
+ title: 'Unity',
26
+ description: 'Flat grey panels, three-pixel control corners, a shadow under popups.',
27
+ shape: { small: '3px', medium: '3px', large: '4px', full: '9999px' },
28
+ elevation: {
29
+ small: 'none',
30
+ medium: '0 2px 8px rgba(0,0,0,0.5)',
31
+ large: '0 6px 18px rgba(0,0,0,0.55)',
32
+ },
33
+ stage: {
34
+ // `HandleUtility.GetHandleSize` keeps a handle a constant size on screen; the stage's
35
+ // px per gizmo unit is fitted, not transcribed: at 128 the move arrows reach ~95 px on
36
+ // a 1x capture, as in `engine-reference/unity/PrimitiveCube.png`.
37
+ gizmoSize: 128,
38
+ // Unity's scene gizmo: cones round a grey cube (`Editor-SceneGizmo.png`).
39
+ navigationGizmo: 'cones',
40
+ // Unity's move arrow is a thin shaft ending at the rotate ring, with a long cone head
41
+ // (`TransformGizmo35.png`, `game-objects-transform-modes.png`).
42
+ gizmoArrowLength: 1.1,
43
+ gizmoArrowHead: 1.2,
44
+ // The axis colours' alpha (`Handles.cs`); hover and drag are fixed colours (the palette).
45
+ gizmoOpacity: 0.93,
46
+ // `SceneViewGrid`: one-pixel lines at both levels, the ten-cell level a little stronger.
47
+ gridLineWidth: 1,
48
+ gridMajorWidth: 1,
49
+ gridMajorContrast: 1.25,
50
+ // Unity's selection outline is a hard orange line about two pixels wide at 1x, around
51
+ // the whole silhouette, occluded parts included (`game-objects-transform-modes.png`,
52
+ // `SceneVisExVisible.png`, where it crosses the rock in front of the structure); at 3
53
+ // device px the crisp line measures one full and one partial pixel on a 1x capture, as there.
54
+ outlineStyle: 'crisp',
55
+ outlineWidth: 3,
56
+ outlineHidden: true,
57
+ // The Selection Wire's alpha: `(94, 119, 155, 64)` (the palette holds its colour).
58
+ wireOpacity: 0.25,
59
+ },
60
+ },
61
+ palette,
62
+ };
@@ -0,0 +1,76 @@
1
+ /**
2
+ * UNITY'S DEFAULT SCENE VIEW: its procedural sky with a narrow horizon band (colours fitted to
3
+ * `NewEmptyScene_01.png`, not transcribed), the grid, no axis lines, the outline alone, the Move
4
+ * tool without a free-move centre.
5
+ * A named view (`@volter/editor-sdk/kit/viewport-presentation` `ViewPreset`): what the view does
6
+ * and how it is lit, never its look — pair it with the Unity style for the whole target.
7
+ */
8
+ import type { ViewPreset } from '@volter/editor-sdk/kit/viewport-presentation';
9
+
10
+ export const point = 'workspace.view';
11
+ export const view: ViewPreset = {
12
+ id: 'unity',
13
+ title: 'Unity',
14
+ layer: {
15
+ all: {
16
+ lighting: {
17
+ source: 'preview',
18
+ preview: {
19
+ sun: {
20
+ enabled: true,
21
+ color: '#fff4d6',
22
+ energy: 1,
23
+ altitude: 50,
24
+ azimuth: 150,
25
+ shadowDistance: 100,
26
+ },
27
+ environment: {
28
+ enabled: true,
29
+ sky: {
30
+ top: '#4a84c2',
31
+ horizon: '#f0ffff',
32
+ ground: '#68615c',
33
+ topCurve: 0.04,
34
+ groundCurve: 0.003,
35
+ },
36
+ energy: 1,
37
+ rotation: 0,
38
+ },
39
+ },
40
+ tone: {
41
+ mapper: 'none',
42
+ exposure: 1,
43
+ },
44
+ },
45
+ backdrop: {
46
+ source: 'environment',
47
+ opacity: 1,
48
+ blur: 0,
49
+ },
50
+ },
51
+ overlays: {
52
+ grid: {
53
+ visible: true,
54
+ majorEvery: 10,
55
+ },
56
+ selection: {
57
+ outline: true,
58
+ wire: false,
59
+ box: false,
60
+ },
61
+ axes: {
62
+ x: false,
63
+ y: false,
64
+ z: false,
65
+ },
66
+ },
67
+ interaction: {
68
+ bootTool: 'move',
69
+ transformHandles: {
70
+ scale: false,
71
+ viewRotate: false,
72
+ freeMove: false,
73
+ },
74
+ },
75
+ },
76
+ };