@volter/editor-threejs 0.5.202 → 0.5.203
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/contributions/animation-mixers.service.ts +2 -2
- package/contributions/animation-timeline.utility.tsx +3 -3
- package/package.json +3 -3
- package/serving/animation-stamp.ts +1 -1
- package/serving/index.ts +1 -1
- package/serving/model-import-conversion.ts +1 -1
- package/src/adapter/ingest/scene-capture.ts +2 -2
- package/src/adapter/object3d-authoring-subject.ts +1 -1
- package/src/adapter/renderer-config.ts +3 -3
- package/src/adapter/three-contract.ts +3 -3
- package/src/kit/animation/three-clips-subject.ts +1 -1
- package/src/kit/asset-compare.ts +2 -2
- package/src/kit/asset-preview-command.ts +4 -4
- package/src/kit/asset-preview.ts +6 -6
- package/src/kit/authoring/object3d-document-session-registry.ts +4 -4
- package/src/kit/authoring/object3d-document-session.ts +9 -9
- package/src/kit/authoring/shell-viewport-policy.ts +5 -5
- package/src/kit/authoring/source-object3d-authoring-adapter.ts +1 -1
- package/src/kit/authoring/three-projection-core.ts +2 -2
- package/src/kit/authoring/viewport-pick-context.ts +1 -1
- package/src/kit/authoring/world-hidden-viewport.ts +2 -2
- package/src/kit/components/CameraInfo.tsx +2 -2
- package/src/kit/components/Object3DDocumentToolbar.tsx +8 -8
- package/src/kit/components/Object3DDocumentViewport.tsx +2 -2
- package/src/kit/components/StageHost.tsx +28 -28
- package/src/kit/components/StatsOverlay.tsx +3 -3
- package/src/kit/components/ViewportFurniture.tsx +5 -5
- package/src/kit/components/ViewportOverlay.tsx +11 -11
- package/src/kit/components/ViewportShadingMenu.tsx +1 -1
- package/src/kit/components/ViewportViewMenu.tsx +3 -3
- package/src/kit/components/asset-viewers/EntityModelDocument.tsx +2 -2
- package/src/kit/components/asset-viewers/EnvironmentAssetDocument.tsx +5 -5
- package/src/kit/components/asset-viewers/LiveModuleDocument.tsx +6 -6
- package/src/kit/components/asset-viewers/LutAssetDocument.tsx +6 -6
- package/src/kit/components/asset-viewers/ModelAssetDocument.tsx +1 -1
- package/src/kit/components/asset-viewers/Object3DPreview.tsx +4 -4
- package/src/kit/components/asset-viewers/QuarksAssetDocument.tsx +3 -3
- package/src/kit/components/asset-viewers/ShaderAssetDocument.tsx +7 -7
- package/src/kit/components/asset-viewers/three-asset-viewers.tsx +2 -2
- package/src/kit/components/object3d-contribution-surfaces.tsx +1 -1
- package/src/kit/components/stage-overlay-set.tsx +5 -5
- package/src/kit/components/stage-presence-markers.ts +6 -6
- package/src/kit/components/stage-transform-chrome.ts +2 -2
- package/src/kit/components/stage-transform-tools.tsx +6 -6
- package/src/kit/components/standard-viewport-dressing.ts +5 -5
- package/src/kit/components/world-root-binding.ts +1 -1
- package/src/kit/editor-shell-store.ts +8 -8
- package/src/kit/editor-viewport.ts +14 -14
- package/src/kit/entity-object.ts +1 -1
- package/src/kit/hierarchy-mark-reader.ts +2 -2
- package/src/kit/live-module-source.ts +3 -3
- package/src/kit/model-thumbnail.ts +2 -2
- package/src/kit/play-camera-flight.ts +2 -2
- package/src/kit/projection/three.ts +3 -3
- package/src/kit/scene-document-viewport.ts +3 -3
- package/src/kit/spatial-handle-visuals.ts +1 -1
- package/src/kit/stories/three-story-model.ts +2 -2
- package/src/kit/three-canvas-render.ts +3 -3
- package/src/kit/three-hierarchy-row-media.ts +2 -2
- package/src/kit/three-inspection-media.ts +4 -4
- package/src/kit/three-integration.ts +6 -6
- package/src/kit/three-state.ts +3 -3
- package/src/kit/viewport-actions.ts +5 -5
- package/src/kit/viewport-authoring-policy.ts +4 -4
- package/src/kit/viewport-commands.ts +9 -9
- package/src/kit/viewport-hotkeys.ts +4 -4
- package/src/kit/viewport-status-facet.ts +4 -4
- package/src/object3d-contributions.ts +5 -5
- package/src/viewport/environment.ts +1 -1
- package/src/viewport-api.ts +2 -2
- package/src/viewport-door.ts +3 -3
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
spaceVar,
|
|
27
27
|
Tooltip,
|
|
28
28
|
themeVars,
|
|
29
|
-
} from '@volter/
|
|
29
|
+
} from '@volter/sdk/widgets';
|
|
30
30
|
import { Fragment, type PointerEvent as ReactPointerEvent, useCallback, useEffect, useState, useSyncExternalStore } from 'react';
|
|
31
31
|
import * as THREE from 'three';
|
|
32
32
|
import { axisViewName } from '../asset-workflow/model-inspection';
|
|
33
33
|
import type { Object3DDocumentSession } from '../authoring/object3d-document-session';
|
|
34
|
-
import type { ShellStore } from '@volter/
|
|
34
|
+
import type { ShellStore } from '@volter/sdk/kit/shell-store';
|
|
35
35
|
import {
|
|
36
36
|
COMPASS_CENTER_RIGHT_PX,
|
|
37
37
|
COMPASS_CLUSTER_TOP_PX,
|
|
@@ -44,15 +44,15 @@ import {
|
|
|
44
44
|
subscribeViewportPresentation,
|
|
45
45
|
viewPresentation,
|
|
46
46
|
viewportPresentationVersion,
|
|
47
|
-
} from '@volter/
|
|
47
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
48
48
|
import { ViewportViewMenu } from './ViewportViewMenu';
|
|
49
49
|
import {
|
|
50
50
|
lookDeclaresViewportColors,
|
|
51
51
|
lookPaintsLightViewport,
|
|
52
52
|
subscribeNativeSelectionTheme,
|
|
53
53
|
useViewportChrome,
|
|
54
|
-
} from '@volter/
|
|
55
|
-
import type { ThreeViewportProjection } from '@volter/
|
|
54
|
+
} from '@volter/sdk/kit/native-selection-style';
|
|
55
|
+
import type { ThreeViewportProjection } from '@volter/sdk/kit/three-viewport-presentation';
|
|
56
56
|
|
|
57
57
|
/** The cluster sits 8px under the compass — one number, owned by the
|
|
58
58
|
* compass's own box (`editor-viewport.ts`, measured against Blender's
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { faBorderAll, faLightbulb } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { EditorIcon, FloatingToolbar, IconButton, Tooltip } from '@volter/
|
|
3
|
-
import type { AuthoringAdapter } from '@volter/
|
|
2
|
+
import { EditorIcon, FloatingToolbar, IconButton, Tooltip } from '@volter/sdk/widgets';
|
|
3
|
+
import type { AuthoringAdapter } from '@volter/project/adapter';
|
|
4
4
|
import { memo, useEffect, useId, useMemo, useReducer, useState, useSyncExternalStore } from 'react';
|
|
5
|
-
import { activeAuthoringVersion, subscribeActiveAuthoring } from '@volter/
|
|
5
|
+
import { activeAuthoringVersion, subscribeActiveAuthoring } from '@volter/sdk/kit/authoring/active-adapter';
|
|
6
6
|
import {
|
|
7
7
|
object3DDocumentSession,
|
|
8
8
|
object3DDocumentSessionsVersion,
|
|
9
9
|
subscribeObject3DDocumentSessions,
|
|
10
10
|
} from '../authoring/object3d-document-session-registry';
|
|
11
|
-
import { resolvePanelAuthoring } from '@volter/
|
|
11
|
+
import { resolvePanelAuthoring } from '@volter/sdk/kit/authoring/panel-authoring';
|
|
12
12
|
import type { EditorShellStore } from '../editor-shell-store';
|
|
13
|
-
import { activeLightCount } from '@volter/
|
|
14
|
-
import { CORE_WORKSPACE_UTILITIES } from '@volter/
|
|
13
|
+
import { activeLightCount } from '@volter/sdk/kit/light-explorer-model';
|
|
14
|
+
import { CORE_WORKSPACE_UTILITIES } from '@volter/sdk/kit/workspace-core-utilities';
|
|
15
15
|
import {
|
|
16
16
|
subscribeWorkspaceDocuments,
|
|
17
17
|
workspaceDocumentRegistryVersion,
|
|
18
|
-
} from '@volter/
|
|
19
|
-
import { showWorkspaceUtility } from '@volter/
|
|
20
|
-
import { ViewportOverlaysMenu } from '@volter/
|
|
18
|
+
} from '@volter/sdk/kit/workspace-document-registry';
|
|
19
|
+
import { showWorkspaceUtility } from '@volter/sdk/kit/workspace-host-commands';
|
|
20
|
+
import { ViewportOverlaysMenu } from '@volter/sdk/kit/components/ViewportOverlaysMenu';
|
|
21
21
|
import {
|
|
22
22
|
setViewGridVisible,
|
|
23
23
|
subscribeViewportPresentation,
|
|
24
24
|
viewGridVisible,
|
|
25
25
|
viewportPresentationVersion,
|
|
26
|
-
} from '@volter/
|
|
26
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
27
27
|
import { ViewportShadingMenu } from './ViewportShadingMenu';
|
|
28
28
|
import type { ViewportShadingMode } from '@volter/editor-threejs/render/viewport-shading';
|
|
29
29
|
import { ViewportViewMenu } from './ViewportViewMenu';
|
|
30
|
-
import { useViewportChrome, useViewportWords } from '@volter/
|
|
30
|
+
import { useViewportChrome, useViewportWords } from '@volter/sdk/kit/native-selection-style';
|
|
31
31
|
import { createPortal } from 'react-dom';
|
|
32
32
|
import { stageViewName } from './stage-view-name';
|
|
33
33
|
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
MenuSeparator,
|
|
9
9
|
Tooltip,
|
|
10
10
|
themeVars,
|
|
11
|
-
} from '@volter/
|
|
11
|
+
} from '@volter/sdk/widgets';
|
|
12
12
|
import type { ViewportShadingMode } from '@volter/editor-threejs/render/viewport-shading';
|
|
13
13
|
import { type ReactNode, useMemo, useRef, useState } from 'react';
|
|
14
14
|
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
Stack,
|
|
9
9
|
Text,
|
|
10
10
|
Tooltip,
|
|
11
|
-
} from '@volter/
|
|
11
|
+
} from '@volter/sdk/widgets';
|
|
12
12
|
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
13
|
-
import type { ShellStore } from '@volter/
|
|
13
|
+
import type { ShellStore } from '@volter/sdk/kit/shell-store';
|
|
14
14
|
import {
|
|
15
15
|
setThreeViewportProjection,
|
|
16
16
|
subscribeThreeViewportPresentation,
|
|
17
17
|
threeViewportPresentation,
|
|
18
|
-
} from '@volter/
|
|
18
|
+
} from '@volter/sdk/kit/three-viewport-presentation';
|
|
19
19
|
import {
|
|
20
20
|
object3DDocumentSession,
|
|
21
21
|
object3DDocumentSessionsVersion,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { threeStateOf } from '../../three-state';
|
|
2
|
-
import { themeVars } from '@volter/
|
|
2
|
+
import { themeVars } from '@volter/sdk/widgets';
|
|
3
3
|
import { liveMixerFor } from '@volter/editor-threejs/animation/live-mixers';
|
|
4
4
|
import { useCallback, useSyncExternalStore } from 'react';
|
|
5
5
|
import type * as THREE from 'three';
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createAssetPreviewSnapshot,
|
|
9
9
|
disposeAssetPreviewSnapshot,
|
|
10
10
|
} from '../../asset-preview';
|
|
11
|
-
import { useEditorStore } from '@volter/
|
|
11
|
+
import { useEditorStore } from '@volter/sdk/kit/editor-runtime';
|
|
12
12
|
import { Object3DDocumentViewport } from '../StageHost';
|
|
13
13
|
|
|
14
14
|
function entityClips(source: THREE.Object3D): THREE.AnimationClip[] {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { faCloudSun, faSliders } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { NumberInput, themeVars } from '@volter/
|
|
2
|
+
import { NumberInput, themeVars } from '@volter/sdk/widgets';
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
6
6
|
import { EXRLoader } from 'three/addons/loaders/EXRLoader.js';
|
|
7
7
|
import { HDRLoader } from 'three/addons/loaders/HDRLoader.js';
|
|
8
|
-
import type { InspectionSection } from '@volter/
|
|
9
|
-
import { CONTRIBUTED_SECTION_ORDER, PROPERTIES_SECTION_ORDER } from '@volter/
|
|
10
|
-
import { AssetEditorShell } from '@volter/
|
|
11
|
-
import { subscribeProjectAsset } from '@volter/
|
|
8
|
+
import type { InspectionSection } from '@volter/sdk/kit/inspection-model';
|
|
9
|
+
import { CONTRIBUTED_SECTION_ORDER, PROPERTIES_SECTION_ORDER } from '@volter/sdk/kit/inspection-model';
|
|
10
|
+
import { AssetEditorShell } from '@volter/sdk/kit/components/AssetEditorShell';
|
|
11
|
+
import { subscribeProjectAsset } from '@volter/sdk/kit/components/asset-editor-persistence';
|
|
12
12
|
|
|
13
13
|
interface EnvironmentImage {
|
|
14
14
|
readonly texture: THREE.DataTexture;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* `Object3DDocumentViewport` re-runs its whole lifetime effect — renderer,
|
|
17
17
|
* scene, camera, adapter — whenever the `build` callback's IDENTITY changes.
|
|
18
18
|
* That is how the parametric Builder documents rebuild
|
|
19
|
-
* (`catalog/project-source/
|
|
19
|
+
* (`catalog/project-source/editor/tools/builder-document.tsx`: a param edit makes
|
|
20
20
|
* a new `build`, the viewport tears down and stands back up), and it is
|
|
21
21
|
* exactly why those documents snap the camera back to `cameraDirection` on
|
|
22
22
|
* every slider nudge. A modeling loop cannot do that: the whole point is to
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
* live view when the module compiles.
|
|
52
52
|
*/
|
|
53
53
|
|
|
54
|
-
import { beginLiveModuleRevision } from '@volter/
|
|
55
|
-
import { themeVars } from '@volter/
|
|
54
|
+
import { beginLiveModuleRevision } from '@volter/sdk/session/project-module-url';
|
|
55
|
+
import { themeVars } from '@volter/sdk/widgets';
|
|
56
56
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
57
57
|
import * as THREE from 'three';
|
|
58
58
|
import { disposeProjectAssetModel } from '../../asset-preview';
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
object3DDocumentSession,
|
|
61
61
|
registerObject3DDocumentPreparation,
|
|
62
62
|
} from '../../authoring/object3d-document-session-registry';
|
|
63
|
-
import { editorConsole } from '@volter/
|
|
63
|
+
import { editorConsole } from '@volter/sdk/kit/editor-console';
|
|
64
64
|
import {
|
|
65
65
|
buildLiveModuleObject3D,
|
|
66
66
|
LiveModuleError,
|
|
@@ -71,8 +71,8 @@ import {
|
|
|
71
71
|
projectModuleChangeMatches,
|
|
72
72
|
projectModuleTransformError,
|
|
73
73
|
subscribeProjectModuleChange,
|
|
74
|
-
} from '@volter/
|
|
75
|
-
import { notifyWorkspaceDocumentSelectionChanged } from '@volter/
|
|
74
|
+
} from '@volter/sdk/kit/project-module-changes';
|
|
75
|
+
import { notifyWorkspaceDocumentSelectionChanged } from '@volter/sdk/kit/workspace-document-registry';
|
|
76
76
|
import { Object3DDocumentViewport } from '../Object3DDocumentViewport';
|
|
77
77
|
import { STANDARD_COMPONENT_CAMERA_DIRECTION } from '../standard-viewport-dressing';
|
|
78
78
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { faCircleHalfStroke, faSliders } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { Checkbox, NumberInput, themeVars } from '@volter/
|
|
2
|
+
import { Checkbox, NumberInput, themeVars } from '@volter/sdk/widgets';
|
|
3
3
|
import { EffectComposer, EffectPass, LUT3DEffect, RenderPass } from 'postprocessing';
|
|
4
4
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { LUTCubeLoader } from 'three/addons/loaders/LUTCubeLoader.js';
|
|
7
|
-
import { readProjectTextFile } from '@volter/
|
|
8
|
-
import type { InspectionSection } from '@volter/
|
|
9
|
-
import { CONTRIBUTED_SECTION_ORDER, PROPERTIES_SECTION_ORDER } from '@volter/
|
|
10
|
-
import { AssetEditorShell } from '@volter/
|
|
11
|
-
import { subscribeProjectAsset } from '@volter/
|
|
7
|
+
import { readProjectTextFile } from '@volter/sdk/kit/editor-api';
|
|
8
|
+
import type { InspectionSection } from '@volter/sdk/kit/inspection-model';
|
|
9
|
+
import { CONTRIBUTED_SECTION_ORDER, PROPERTIES_SECTION_ORDER } from '@volter/sdk/kit/inspection-model';
|
|
10
|
+
import { AssetEditorShell } from '@volter/sdk/kit/components/AssetEditorShell';
|
|
11
|
+
import { subscribeProjectAsset } from '@volter/sdk/kit/components/asset-editor-persistence';
|
|
12
12
|
|
|
13
13
|
interface CubeLut {
|
|
14
14
|
readonly title: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToolObject3DPreviewContext, ToolObject3DPreviewExtension } from '../../../object3d-contributions';
|
|
2
|
-
import { themeVars } from '@volter/
|
|
2
|
+
import { themeVars } from '@volter/sdk/widgets';
|
|
3
3
|
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
type NativeObjectPreviewSource,
|
|
13
13
|
type OwnedObjectPreviewSnapshot,
|
|
14
14
|
} from '../../asset-preview';
|
|
15
|
-
import { registerPreviewResource } from '@volter/
|
|
16
|
-
import { registerDesignTimeSurface } from '@volter/
|
|
15
|
+
import { registerPreviewResource } from '@volter/sdk/kit/asset-workflow/preview-resource-lifetime';
|
|
16
|
+
import { registerDesignTimeSurface } from '@volter/sdk/kit/coverage/design-time-surfaces';
|
|
17
17
|
import {
|
|
18
18
|
isEditorPresentationActive,
|
|
19
19
|
subscribeEditorPresentationActivity,
|
|
20
|
-
} from '@volter/
|
|
20
|
+
} from '@volter/sdk/kit/editor-presentation-activity';
|
|
21
21
|
import {
|
|
22
22
|
createModelPreviewSource,
|
|
23
23
|
loadModelThumbnailObject,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ToolObject3DDocumentAuthoringFactory } from '../../../object3d-contributions';
|
|
2
|
-
import { themeVars } from '@volter/
|
|
2
|
+
import { themeVars } from '@volter/sdk/widgets';
|
|
3
3
|
import type {
|
|
4
4
|
AuthoringAdapter,
|
|
5
5
|
InspectorProvider,
|
|
6
6
|
PropertyDescriptor,
|
|
7
|
-
} from '@volter/
|
|
7
|
+
} from '@volter/project/adapter';
|
|
8
8
|
import { resolveUrl } from '@volter/editor-threejs/loader';
|
|
9
9
|
import {
|
|
10
10
|
ColorGeneratorFromJSON,
|
|
@@ -16,7 +16,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
16
16
|
import type * as THREE from 'three';
|
|
17
17
|
import { type ParticleSystem, QuarksLoader } from 'three.quarks';
|
|
18
18
|
import { quarksParticleSystems } from '../../authoring/quarks-particle-systems';
|
|
19
|
-
import { projectOutputPath } from '@volter/
|
|
19
|
+
import { projectOutputPath } from '@volter/sdk/kit/project-provenance';
|
|
20
20
|
import { Object3DDocumentViewport } from '../StageHost';
|
|
21
21
|
import { threeObject } from '../../../adapter/three-contract';
|
|
22
22
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { faCode, faSliders, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { Checkbox, ColorInput, NumberInput, Select, themeVars } from '@volter/
|
|
2
|
+
import { Checkbox, ColorInput, NumberInput, Select, themeVars } from '@volter/sdk/widgets';
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
import { readProjectTextFile } from '@volter/
|
|
6
|
-
import type { InspectionSection } from '@volter/
|
|
7
|
-
import { CONTRIBUTED_SECTION_ORDER, PROPERTIES_SECTION_ORDER } from '@volter/
|
|
8
|
-
import { AssetEditorShell } from '@volter/
|
|
9
|
-
import { subscribeProjectAsset } from '@volter/
|
|
5
|
+
import { readProjectTextFile } from '@volter/sdk/kit/editor-api';
|
|
6
|
+
import type { InspectionSection } from '@volter/sdk/kit/inspection-model';
|
|
7
|
+
import { CONTRIBUTED_SECTION_ORDER, PROPERTIES_SECTION_ORDER } from '@volter/sdk/kit/inspection-model';
|
|
8
|
+
import { AssetEditorShell } from '@volter/sdk/kit/components/AssetEditorShell';
|
|
9
|
+
import { subscribeProjectAsset } from '@volter/sdk/kit/components/asset-editor-persistence';
|
|
10
10
|
import {
|
|
11
11
|
FALLBACK_FRAGMENT_SHADER,
|
|
12
12
|
FALLBACK_VERTEX_SHADER,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
type ShaderUniformDescriptor,
|
|
19
19
|
shaderCompanionPath,
|
|
20
20
|
shaderStageFromPath,
|
|
21
|
-
} from '@volter/
|
|
21
|
+
} from '@volter/sdk/kit/components/asset-viewers/shader-source';
|
|
22
22
|
|
|
23
23
|
type PreviewGeometry = 'sphere' | 'box' | 'plane';
|
|
24
24
|
type UniformPreviewValue = number | boolean | string | number[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THE THREE.JS ASSET LAB VIEWERS, registered by route
|
|
3
|
-
* (`@volter/
|
|
3
|
+
* (`@volter/sdk/kit/asset-viewers`): a glTF model, an environment map, a
|
|
4
4
|
* LUT, a shader, a live modeling module and a live entity's model. Each loads on
|
|
5
5
|
* first use, so a document that never opens one never pays for three.js.
|
|
6
6
|
*/
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
type JsonContentViewer,
|
|
11
11
|
registerAssetViewer,
|
|
12
12
|
registerJsonContentViewer,
|
|
13
|
-
} from '@volter/
|
|
13
|
+
} from '@volter/sdk/kit/asset-viewers';
|
|
14
14
|
import { type ComponentType, lazy } from 'react';
|
|
15
15
|
|
|
16
16
|
const viewers: Readonly<Record<AssetViewerRoute, ComponentType<AssetViewerProps>>> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { announceDocumentStage } from '@volter/
|
|
1
|
+
import { announceDocumentStage } from '@volter/sdk/kit/document-viewports';
|
|
2
2
|
import { lazy, Suspense, useEffect } from 'react';
|
|
3
3
|
import type { ToolObject3DAuthoringProps, ToolObject3DPreviewProps } from '../../object3d-contributions';
|
|
4
4
|
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
* hints and statistics. Package documents supply their own chrome. */
|
|
3
3
|
|
|
4
4
|
import { useSyncExternalStore } from 'react';
|
|
5
|
-
import { activeAuthoringVersion, subscribeActiveAuthoring } from '@volter/
|
|
5
|
+
import { activeAuthoringVersion, subscribeActiveAuthoring } from '@volter/sdk/kit/authoring/active-adapter';
|
|
6
6
|
import {
|
|
7
7
|
object3DDocumentSessionsVersion,
|
|
8
8
|
subscribeObject3DDocumentSessions,
|
|
9
9
|
} from '../authoring/object3d-document-session-registry';
|
|
10
10
|
import type { EditorShellStore } from '../editor-shell-store';
|
|
11
11
|
import type { EditorViewport } from '../editor-viewport';
|
|
12
|
-
import { documentStageContext, type StageChrome, threeSelectionToolsApply } from '@volter/
|
|
12
|
+
import { documentStageContext, type StageChrome, threeSelectionToolsApply } from '@volter/sdk/kit/stage-context';
|
|
13
13
|
import {
|
|
14
14
|
subscribeWorkspaceDocuments,
|
|
15
15
|
workspaceDocumentRegistryVersion,
|
|
16
|
-
} from '@volter/
|
|
16
|
+
} from '@volter/sdk/kit/workspace-document-registry';
|
|
17
17
|
import {
|
|
18
18
|
subscribeViewportPresentation,
|
|
19
19
|
viewPresentation,
|
|
20
20
|
viewportPresentationVersion,
|
|
21
|
-
} from '@volter/
|
|
21
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
22
22
|
import { CameraInfo } from './CameraInfo';
|
|
23
23
|
import { StatsOverlay } from './StatsOverlay';
|
|
24
|
-
import { TransientHintOverlay } from '@volter/
|
|
24
|
+
import { TransientHintOverlay } from '@volter/sdk/kit/components/TransientHint';
|
|
25
25
|
import { ViewportOverlay } from './ViewportOverlay';
|
|
26
26
|
|
|
27
27
|
/** What the HOST hands over about the stage itself — its own store, the
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
* CONDITION on writing, not a second writer of that field.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import type { CollaborationParticipant } from '@volter/
|
|
25
|
-
import { EDITOR_THEME_CLASS, graphiteDarkEditorTheme } from '@volter/
|
|
24
|
+
import type { CollaborationParticipant } from '@volter/sdk/session/collaboration-types';
|
|
25
|
+
import { EDITOR_THEME_CLASS, graphiteDarkEditorTheme } from '@volter/sdk/widgets';
|
|
26
26
|
import { contentWorldBounds } from '@volter/editor-threejs/viewport/content-bounds';
|
|
27
27
|
import * as THREE from 'three';
|
|
28
|
-
import { collaborationSnapshot } from '@volter/
|
|
29
|
-
import { reportCollaborationPresence } from '@volter/
|
|
30
|
-
import { EDITOR_PARTICIPANT_ID } from '@volter/
|
|
28
|
+
import { collaborationSnapshot } from '@volter/sdk/kit/collaboration-client';
|
|
29
|
+
import { reportCollaborationPresence } from '@volter/sdk/kit/collaboration-presence';
|
|
30
|
+
import { EDITOR_PARTICIPANT_ID } from '@volter/sdk/kit/editor-presence';
|
|
31
31
|
import type { EditorShellStore } from '../editor-shell-store';
|
|
32
32
|
import type { EditorViewport } from '../editor-viewport';
|
|
33
|
-
import { activeWorkspaceDocumentId } from '@volter/
|
|
33
|
+
import { activeWorkspaceDocumentId } from '@volter/sdk/kit/workspace-document-registry';
|
|
34
34
|
|
|
35
35
|
interface RemoteCameraMarker {
|
|
36
36
|
camera: THREE.PerspectiveCamera;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What a three stage adds to its document's viewport
|
|
3
|
-
* (`@volter/
|
|
3
|
+
* (`@volter/sdk/kit/document-viewports`): the transform-tool driver, read
|
|
4
4
|
* synchronously, and the shelf strip and header wells behind `lazy()`, so a
|
|
5
5
|
* bounded host that mounts a stage never loads the editor's toolbar.
|
|
6
6
|
*/
|
|
7
7
|
import { lazy } from 'react';
|
|
8
|
-
import { documentStageContext, type StageTransformDriver, stageTransformDriver } from '@volter/
|
|
8
|
+
import { documentStageContext, type StageTransformDriver, stageTransformDriver } from '@volter/sdk/kit/stage-context';
|
|
9
9
|
import { threeStoreForHost } from '../three-state';
|
|
10
10
|
|
|
11
11
|
/** What the host's transform tools drive on this document's stage. */
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A THREE STAGE'S TRANSFORM TOOLS, as the stage contributes them to its
|
|
3
|
-
* document's chrome (`@volter/
|
|
3
|
+
* document's chrome (`@volter/sdk/kit/document-viewports`): what the
|
|
4
4
|
* host's transform tools drive on it (`stage-context.ts`'s one answer), the tool
|
|
5
5
|
* strip on its shelf and the gizmo's header wells. Every tool writes THIS
|
|
6
6
|
* stage's own store (`stage-store-registry.ts`); the world root's stage runs on
|
|
7
7
|
* the session store, so the Scene document is unchanged either way.
|
|
8
8
|
*/
|
|
9
|
-
import { stageTransformDoor } from '@volter/
|
|
10
|
-
import { type ViewportInteraction, viewPresentation } from '@volter/
|
|
9
|
+
import { stageTransformDoor } from '@volter/sdk/contributions';
|
|
10
|
+
import { type ViewportInteraction, viewPresentation } from '@volter/sdk/kit/viewport-presentation';
|
|
11
11
|
import { useEffect, useSyncExternalStore } from 'react';
|
|
12
|
-
import { useEditorStore } from '@volter/
|
|
12
|
+
import { useEditorStore } from '@volter/sdk/kit/editor-runtime';
|
|
13
13
|
import type { EditorShellStore } from '../editor-shell-store';
|
|
14
14
|
import { threeStageTransformDriver } from './stage-transform-chrome';
|
|
15
|
-
import { stageStore, stageStoresVersion, subscribeStageStores } from '@volter/
|
|
15
|
+
import { stageStore, stageStoresVersion, subscribeStageStores } from '@volter/sdk/kit/stage-store-registry';
|
|
16
16
|
import { threeStateOf } from '../three-state';
|
|
17
|
-
import { ToolStrip, TransformHeaderControls } from '@volter/
|
|
17
|
+
import { ToolStrip, TransformHeaderControls } from '@volter/sdk/kit/components/Toolbar';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* THE VIEWS WHOSE SHELF HAS ALREADY OPENED, per store — keyed by the VIEW as well, because
|
|
@@ -31,21 +31,21 @@
|
|
|
31
31
|
* where the rest of the dressing is plain scene-graph work.
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
import { invalidateStages } from '@volter/
|
|
34
|
+
import { invalidateStages } from '@volter/sdk/kit/stage-invalidation';
|
|
35
35
|
import { contentWorldBounds } from '@volter/editor-threejs/viewport/content-bounds';
|
|
36
36
|
import { EDITOR_LAYER } from '@volter/editor-threejs/viewport/editor-layers';
|
|
37
37
|
import { loadEnvironmentImage, type StandardEnvironment } from '@volter/editor-threejs/viewport/environment';
|
|
38
38
|
import { setUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
39
39
|
import * as THREE from 'three';
|
|
40
|
-
import { environmentImage } from '@volter/
|
|
41
|
-
import { editorConsole } from '@volter/
|
|
40
|
+
import { environmentImage } from '@volter/sdk/kit/environment-images';
|
|
41
|
+
import { editorConsole } from '@volter/sdk/kit/editor-console';
|
|
42
42
|
import {
|
|
43
43
|
studioPreset,
|
|
44
44
|
type StudioLight,
|
|
45
45
|
type SceneTakeover,
|
|
46
46
|
type StudioPreset,
|
|
47
47
|
type ViewportPresentation,
|
|
48
|
-
} from '@volter/
|
|
48
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Front-right three-quarter view for project-owned R3F components. Their
|
|
@@ -374,7 +374,7 @@ export function applyStandardViewportDressing(
|
|
|
374
374
|
|
|
375
375
|
/**
|
|
376
376
|
* THE STAGE'S LIGHTING, FROM ITS PRESENTATION — the Three half of
|
|
377
|
-
* `@volter/
|
|
377
|
+
* `@volter/sdk/kit/viewport-presentation`. A 3D document stage owns one rig; it draws
|
|
378
378
|
* the view's `studio` lighting (a preset's lights, world-fixed or camera-locked, and its
|
|
379
379
|
* ambient), sets the renderer's tone mapper and exposure, and answers the image-based light's
|
|
380
380
|
* strength. It replaces the lights that were fixed in code: the dressing's key and the
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import type { ComponentType, RefObject } from 'react';
|
|
14
14
|
import type * as THREE from 'three';
|
|
15
15
|
import type { EditorShellStore } from '../editor-shell-store';
|
|
16
|
-
import type { EditorStats } from '@volter/
|
|
16
|
+
import type { EditorStats } from '@volter/sdk/kit/editor-runtime';
|
|
17
17
|
import type { EditorViewport } from '../editor-viewport';
|
|
18
18
|
import type { ViewportPresentation, ViewportRoot } from '../../viewport-api';
|
|
19
19
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* adapter's private business (`authoring-inversion-guard.test.ts` is the tripwire).
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { ViewportTab } from '@volter/
|
|
11
|
+
import type { ViewportTab } from '@volter/sdk';
|
|
12
12
|
import { viewportCaptureOutputPass } from '@volter/editor-threejs/capture/output-pass';
|
|
13
13
|
import { isEditorOwnedObject } from '@volter/editor-threejs/viewport/editor-layers';
|
|
14
14
|
import type { WorldRendererConfig } from '@volter/editor-threejs/adapter/renderer-config';
|
|
@@ -18,8 +18,8 @@ import * as THREE from 'three';
|
|
|
18
18
|
import type { BatchedRenderer } from 'three.quarks';
|
|
19
19
|
import { findEntityLod } from './entity-lod';
|
|
20
20
|
import { entityIdOf } from './entity-object';
|
|
21
|
-
import { ShellStore } from '@volter/
|
|
22
|
-
export type { NotifyScope, PlayEditRegime } from '@volter/
|
|
21
|
+
import { ShellStore } from '@volter/sdk/kit/shell-store';
|
|
22
|
+
export type { NotifyScope, PlayEditRegime } from '@volter/sdk/kit/shell-store';
|
|
23
23
|
import { withSceneFogNeutralized } from './scene-view-fog';
|
|
24
24
|
|
|
25
25
|
/** The store's persistence collaborator — installed by the shell, never
|
|
@@ -47,7 +47,7 @@ export interface EditorStatePersistence {
|
|
|
47
47
|
* Which member a STAGE is born with is its presentation's (`interaction.bootTool`,
|
|
48
48
|
* `kit/viewport-presentation`); arming one is always a click in the shelf.
|
|
49
49
|
*/
|
|
50
|
-
export type { GizmoAnchor, PivotMode, TransformMode, TransformSpace } from '@volter/
|
|
50
|
+
export type { GizmoAnchor, PivotMode, TransformMode, TransformSpace } from '@volter/sdk/kit/shell-store';
|
|
51
51
|
|
|
52
52
|
export type ShadingMode = ViewportShadingMode;
|
|
53
53
|
|
|
@@ -91,13 +91,13 @@ const OBJECT_MAP_MEMBERSHIP_HISTORY = 256;
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
/** The two viewport tabs, Edit · Play. Defined ONCE, in the SDK's shared
|
|
94
|
-
* vocabulary (`@volter/
|
|
94
|
+
* vocabulary (`@volter/sdk`), because the control API speaks it too;
|
|
95
95
|
* re-exported here so editor modules keep one import site. */
|
|
96
96
|
export type { ViewportTab };
|
|
97
97
|
|
|
98
|
-
export type { HelperVisibility } from '@volter/
|
|
98
|
+
export type { HelperVisibility } from '@volter/sdk/kit/shell-store';
|
|
99
99
|
|
|
100
|
-
export type { ViewportAction } from '@volter/
|
|
100
|
+
export type { ViewportAction } from '@volter/sdk/kit/shell-store';
|
|
101
101
|
|
|
102
102
|
export class EditorShellStore {
|
|
103
103
|
/** Made by `threeStateOf`, once per shell store. */
|
|
@@ -570,7 +570,7 @@ export class EditorShellStore {
|
|
|
570
570
|
if (!this._renderer || !this._scene || !this._camera) return null;
|
|
571
571
|
// A number is a SQUARE of that size — the default shape; `{width, height}`
|
|
572
572
|
// renders the buffer and the camera at that aspect so a shaped look needs
|
|
573
|
-
// no crop (`@volter/
|
|
573
|
+
// no crop (`@volter/sdk`'s `CaptureDimensions`).
|
|
574
574
|
const width = typeof size === 'number' ? size : size.width;
|
|
575
575
|
const height = typeof size === 'number' ? size : size.height;
|
|
576
576
|
// The same floor `authoring/object3d-document-session.ts`'s `captureImage`
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { SparkRenderer } from '@sparkjsdev/spark';
|
|
2
|
-
import { invalidateStages } from '@volter/
|
|
2
|
+
import { invalidateStages } from '@volter/sdk/kit/stage-invalidation';
|
|
3
3
|
import { StagePresentationRig } from './components/standard-viewport-dressing';
|
|
4
4
|
import {
|
|
5
5
|
bindViewPresentation,
|
|
6
6
|
subscribeViewportPresentation,
|
|
7
7
|
type ViewportOverlays,
|
|
8
8
|
viewPresentation,
|
|
9
|
-
} from '@volter/
|
|
10
|
-
import { themeVars, zIndex } from '@volter/
|
|
11
|
-
import type { AssetDropContext, AuthoringAdapter } from '@volter/
|
|
9
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
10
|
+
import { themeVars, zIndex } from '@volter/sdk/widgets';
|
|
11
|
+
import type { AssetDropContext, AuthoringAdapter } from '@volter/project/adapter';
|
|
12
12
|
import {
|
|
13
13
|
EDITOR_CAMERA_FAR,
|
|
14
14
|
EDITOR_CAMERA_NEAR,
|
|
@@ -45,14 +45,14 @@ import {
|
|
|
45
45
|
endAuthoringTransformEdit,
|
|
46
46
|
setAuthoringSelection,
|
|
47
47
|
spatialHandlesForAdapter,
|
|
48
|
-
} from '@volter/
|
|
49
|
-
import { beginLiveGesture, endLiveGesture } from '@volter/
|
|
50
|
-
import { drillIntoSelectionScope, pickAcrossScopeExit } from '@volter/
|
|
48
|
+
} from '@volter/sdk/kit/authoring/consumer-actions';
|
|
49
|
+
import { beginLiveGesture, endLiveGesture } from '@volter/sdk/kit/live-gesture-lock';
|
|
50
|
+
import { drillIntoSelectionScope, pickAcrossScopeExit } from '@volter/sdk/kit/authoring/selection-scope';
|
|
51
51
|
import { setViewportPickContext } from './authoring/viewport-pick-context';
|
|
52
|
-
import { isRootHidden } from '@volter/
|
|
52
|
+
import { isRootHidden } from '@volter/sdk/kit/authoring/world-session-state';
|
|
53
53
|
import type { CameraViewMode } from './camera-authoring';
|
|
54
54
|
import { type ConstraintControl, ConstraintHelper } from './constraint-helper';
|
|
55
|
-
import { editorConsole } from '@volter/
|
|
55
|
+
import { editorConsole } from '@volter/sdk/kit/editor-console';
|
|
56
56
|
import type { EditorShellStore } from './editor-shell-store';
|
|
57
57
|
import { findEntityLod } from './entity-lod';
|
|
58
58
|
import { entityIdOf, entityObject3D } from './entity-object';
|
|
@@ -69,8 +69,8 @@ import {
|
|
|
69
69
|
nativeViewportSelectionBox,
|
|
70
70
|
nativeViewportWire,
|
|
71
71
|
subscribeNativeSelectionTheme,
|
|
72
|
-
} from '@volter/
|
|
73
|
-
import { presentationRegionBasis } from '@volter/
|
|
72
|
+
} from '@volter/sdk/kit/native-selection-style';
|
|
73
|
+
import { presentationRegionBasis } from '@volter/sdk/kit/presentation-surface';
|
|
74
74
|
import { ReflectionProbeHelper } from './reflection-probe-helper';
|
|
75
75
|
import { frameableContentBounds, seededViewShowsWorld, viewFromGameCamera } from './scene-framing';
|
|
76
76
|
import {
|
|
@@ -86,9 +86,9 @@ import { perspectiveDistanceToFitBox } from './three-viewport/camera-fit';
|
|
|
86
86
|
import { SelectionBrackets } from './three-viewport/selection-brackets';
|
|
87
87
|
import { collectThreeSelectionOutlineTargets } from './three-viewport/selection-outline';
|
|
88
88
|
import { toneMappedSourceColor } from './three-viewport/source-color';
|
|
89
|
-
import type { ThreeViewportProjection } from '@volter/
|
|
90
|
-
import { showTransientHint } from '@volter/
|
|
91
|
-
import { activeKeymapNavigation, subscribeEditorKeymap } from '@volter/
|
|
89
|
+
import type { ThreeViewportProjection } from '@volter/sdk/kit/three-viewport-presentation';
|
|
90
|
+
import { showTransientHint } from '@volter/sdk/kit/transient-hint';
|
|
91
|
+
import { activeKeymapNavigation, subscribeEditorKeymap } from '@volter/sdk/kit/keymap-presets';
|
|
92
92
|
import { TriggerVolumeHelper } from './trigger-volume-helper';
|
|
93
93
|
import { viewportAuthoringPolicy } from './viewport-authoring-policy';
|
|
94
94
|
import { ensureThreeIntegration } from './three-integration';
|
package/src/kit/entity-object.ts
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* disagrees with the walk is the "one id, three answers" defect.
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
-
import type { AuthoringAdapter } from '@volter/
|
|
41
|
+
import type { AuthoringAdapter } from '@volter/project/adapter';
|
|
42
42
|
import { getUserData, setUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
43
43
|
import type * as THREE from 'three';
|
|
44
44
|
import { threeObject } from '../adapter/three-contract';
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* non-three surface pays nothing and renders byte-identically.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import type { HierarchyProvider } from '@volter/
|
|
16
|
+
import type { HierarchyProvider } from '@volter/project/adapter';
|
|
17
17
|
import { componentRootName, isBuiltInternal } from '@volter/editor-threejs/adapter/hierarchy-marks';
|
|
18
18
|
import { getUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
19
19
|
import { isComponentInstanceRoot } from './authoring/component-instance-root';
|
|
20
|
-
import { NO_MARKS, type NodeMarkReader, type NodeMarks } from '@volter/
|
|
20
|
+
import { NO_MARKS, type NodeMarkReader, type NodeMarks } from '@volter/sdk/kit/hierarchy-component-marks';
|
|
21
21
|
import { threeObject } from '../adapter/three-contract';
|
|
22
22
|
|
|
23
23
|
/** Project-local R3F source already carries its component ownership on the
|