@volter/editor-threejs 0.5.201 → 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The animation stamp's status facet (`@volter/
|
|
2
|
+
* The animation stamp's status facet (`@volter/sdk/services`, a `workspace.service`
|
|
3
3
|
* contribution): the editor's `status` command reports the mixers the running world's own code made, with the
|
|
4
4
|
* clips it has played through each and the objects each animates, so "the timeline found
|
|
5
5
|
* nothing" is answerable from the session.
|
|
6
6
|
*/
|
|
7
|
-
import { editorHost } from '@volter/
|
|
7
|
+
import { editorHost } from '@volter/sdk/host';
|
|
8
8
|
import { liveMixers } from '../src/animation/live-mixers';
|
|
9
9
|
|
|
10
10
|
export const point = 'workspace.service';
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* this is where a person scrubs and plays them in Edit, as Unity's Animation window does beside
|
|
6
6
|
* its Scene view. While Play drives time the strip goes read-only and says why.
|
|
7
7
|
*/
|
|
8
|
-
import { editorHost } from '@volter/
|
|
9
|
-
import { TransportStrip } from '@volter/
|
|
10
|
-
import { Text } from '@volter/
|
|
8
|
+
import { editorHost } from '@volter/sdk/host';
|
|
9
|
+
import { TransportStrip } from '@volter/sdk/kit/transport-strip';
|
|
10
|
+
import { Text } from '@volter/sdk/widgets';
|
|
11
11
|
import { useCallback, useSyncExternalStore } from 'react';
|
|
12
12
|
|
|
13
13
|
export const point = 'workspace.utility';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/editor-threejs",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.203",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -135,12 +135,12 @@
|
|
|
135
135
|
"serving": "./dist-node/serving.mjs"
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@volter/
|
|
138
|
+
"@volter/project": "0.5.203",
|
|
139
139
|
"@sparkjsdev/spark": "^2.1.0",
|
|
140
140
|
"three.quarks": "^0.16.0",
|
|
141
141
|
"zod": "^4.3.6",
|
|
142
142
|
"typescript": "5.9.3",
|
|
143
|
-
"@volter/
|
|
143
|
+
"@volter/sdk": "0.5.203",
|
|
144
144
|
"postprocessing": "6.38.3",
|
|
145
145
|
"quarks.core": "0.16.0",
|
|
146
146
|
"@fortawesome/free-solid-svg-icons": "^7.2.0"
|
|
@@ -14,7 +14,7 @@ import ts from 'typescript';
|
|
|
14
14
|
import type { Plugin } from 'vite';
|
|
15
15
|
import { ANIMATION_LIVE_MODULE_ID, animationLiveModuleSource } from './animation-live-module';
|
|
16
16
|
|
|
17
|
-
/** The kit services this plugin reads (`@volter/
|
|
17
|
+
/** The kit services this plugin reads (`@volter/sdk/session/project-serving`), by shape. */
|
|
18
18
|
export interface AnimationServingServices {
|
|
19
19
|
readonly projectRoots: () => ReadonlySet<string>;
|
|
20
20
|
readonly currentProjectRoot: () => string | undefined;
|
package/serving/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* formats to runtime GLB for the asset library's imports.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ProjectServingServices } from '@volter/
|
|
7
|
+
import type { ProjectServingServices } from '@volter/sdk/session/project-serving';
|
|
8
8
|
import { animationStampPlugin } from './animation-stamp';
|
|
9
9
|
import { threeModelConverter } from './model-import-conversion';
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ import { PLYLoader } from 'three/addons/loaders/PLYLoader.js';
|
|
|
14
14
|
import { STLLoader } from 'three/addons/loaders/STLLoader.js';
|
|
15
15
|
import { TDSLoader } from 'three/addons/loaders/TDSLoader.js';
|
|
16
16
|
import { mergeVertices } from 'three/addons/utils/BufferGeometryUtils.js';
|
|
17
|
-
import type { ModelConverter, ModelImportSettings } from '@volter/
|
|
17
|
+
import type { ModelConverter, ModelImportSettings } from '@volter/sdk/session/project-serving';
|
|
18
18
|
|
|
19
19
|
/** three.js's conversion of the source formats its loaders read, as the asset library's
|
|
20
20
|
* model converter (`ProjectServingServices.registerModelConverter`). */
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* (`docs/f13-bloom-composer-proof/record-fixed.mjs`).
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
|
-
import type { WorldAdoptionEvent } from '@volter/
|
|
56
|
+
import type { WorldAdoptionEvent } from '@volter/sdk/kit/world-adoption-event';
|
|
57
57
|
import type * as THREE from 'three';
|
|
58
58
|
import {
|
|
59
59
|
type CaptureWaitOptions,
|
|
@@ -135,7 +135,7 @@ export interface SceneCaptureOptions {
|
|
|
135
135
|
* render-to-texture warm-up that happens to draw first is adopted as the game
|
|
136
136
|
* forever, and the real world that renders one frame later reaches no reader
|
|
137
137
|
* at all. This is that reader. It never changes which world is adopted — it
|
|
138
|
-
* makes the ambiguity a recorded fact (`packages/
|
|
138
|
+
* makes the ambiguity a recorded fact (`packages/sdk/src/kit/world-adoption.ts`
|
|
139
139
|
* publishes it to the editor's `status` command).
|
|
140
140
|
*
|
|
141
141
|
* Post-processing games legitimately render several (scene, camera) pairs per
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* owning TS/TSX or ecosystem artifact.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import type { PropertyDescriptor } from '@volter/
|
|
16
|
+
import type { PropertyDescriptor } from '@volter/project/adapter/authoring';
|
|
17
17
|
import type * as THREE from 'three';
|
|
18
18
|
import { deleteUserData, getUserData, setUserData } from '../ecs/user-data';
|
|
19
19
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `applyWorldRendererConfig` — the three.js half of the renderer-config seam.
|
|
3
3
|
*
|
|
4
|
-
* The SHAPE is the project contract's (`@volter/
|
|
4
|
+
* The SHAPE is the project contract's (`@volter/project/adapter/renderer-config`,
|
|
5
5
|
* whose header states the rule and the three load-bearing properties); this
|
|
6
6
|
* file is what writes it onto a live `WebGLRenderer` and hands back the
|
|
7
7
|
* restore. A mounted three root declares it (`MountedThreeRoot.rendererConfig`)
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
WorldRendererConfig,
|
|
14
14
|
WorldShadowMapType,
|
|
15
15
|
WorldToneMapping,
|
|
16
|
-
} from '@volter/
|
|
16
|
+
} from '@volter/project/adapter/renderer-config';
|
|
17
17
|
import type * as THREE from 'three';
|
|
18
18
|
|
|
19
19
|
export type {
|
|
@@ -21,7 +21,7 @@ export type {
|
|
|
21
21
|
WorldRendererConfig,
|
|
22
22
|
WorldShadowMapType,
|
|
23
23
|
WorldToneMapping,
|
|
24
|
-
} from '@volter/
|
|
24
|
+
} from '@volter/project/adapter/renderer-config';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Apply `config` to `renderer`, returning the restore function that puts back what was there.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The Three-typed half of the adapter contract. `@volter/
|
|
2
|
+
* The Three-typed half of the adapter contract. `@volter/project`
|
|
3
3
|
* states the `three` surface with its medium objects opaque (a scene, a
|
|
4
4
|
* camera, a renderer, a hierarchy's scene objects, navigation's debug mesh);
|
|
5
5
|
* this module names them as three.js objects for the editor side that renders
|
|
@@ -15,8 +15,8 @@ import type {
|
|
|
15
15
|
NavigationAdapter,
|
|
16
16
|
PhysicsAdapter,
|
|
17
17
|
ThreeHostContext,
|
|
18
|
-
} from '@volter/
|
|
19
|
-
import type { NavBakeParams } from '@volter/
|
|
18
|
+
} from '@volter/project/adapter';
|
|
19
|
+
import type { NavBakeParams } from '@volter/project/adapter/system-adapter';
|
|
20
20
|
import type * as THREE from 'three';
|
|
21
21
|
|
|
22
22
|
/** Shared GLTF/texture cache a `three` host hands its roots. */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
import { liveMixerFor, subscribeLiveMixers } from '@volter/editor-threejs/animation/live-mixers';
|
|
29
29
|
import * as THREE from 'three';
|
|
30
|
-
import type { StageTransport } from '@volter/
|
|
30
|
+
import type { StageTransport } from '@volter/sdk/kit/animation/stage-transport';
|
|
31
31
|
|
|
32
32
|
/** The display rate a three clip is shown at. Three clips carry a duration in
|
|
33
33
|
* SECONDS and no rate of their own, so the transport needs one to convert a
|
package/src/kit/asset-compare.ts
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
normalizedPlacement,
|
|
33
33
|
overlayRgba,
|
|
34
34
|
silhouetteMaskFromRgba,
|
|
35
|
-
} from '@volter/
|
|
35
|
+
} from '@volter/sdk/kit/asset-compare-core';
|
|
36
36
|
import {
|
|
37
37
|
checkedDimension,
|
|
38
38
|
createAssetPreviewSnapshot,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
readModelForward,
|
|
46
46
|
} from './asset-preview';
|
|
47
47
|
|
|
48
|
-
export type { AssetCompareView } from '@volter/
|
|
48
|
+
export type { AssetCompareView } from '@volter/sdk/kit/asset-compare-core';
|
|
49
49
|
// The forward detection moved to `asset-preview.ts` (the shot sets need it
|
|
50
50
|
// too); re-exported here so compare-mode consumers keep their import path.
|
|
51
51
|
export { readModelForward } from './asset-preview';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* against a reference GLB and the live scene stage. Registered with the
|
|
5
5
|
* viewport's relay verbs (`viewport-commands.ts`).
|
|
6
6
|
*/
|
|
7
|
-
import type { EditorCommandMessage, EditorCommandResult } from '@volter/
|
|
8
|
-
import { parseForwardVector } from '@volter/
|
|
7
|
+
import type { EditorCommandMessage, EditorCommandResult } from '@volter/sdk/commands';
|
|
8
|
+
import { parseForwardVector } from '@volter/sdk/kit/asset-compare-core';
|
|
9
9
|
import { captureEntityComparePreview, captureModelComparePreview } from './asset-compare';
|
|
10
10
|
import {
|
|
11
11
|
type AssetPreviewBackground,
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
captureSourceReviewShotSetModelPreview,
|
|
21
21
|
parseShotSetDefinition,
|
|
22
22
|
} from './asset-preview';
|
|
23
|
-
import { activeDocumentAuthoring } from '@volter/
|
|
24
|
-
import { parseCameraChoice, parsePoseChoice } from '@volter/
|
|
23
|
+
import { activeDocumentAuthoring } from '@volter/sdk/kit/authoring/shell-document-ops';
|
|
24
|
+
import { parseCameraChoice, parsePoseChoice } from '@volter/sdk/kit/capture-camera-pose';
|
|
25
25
|
import type { EditorShellStore } from './editor-shell-store';
|
|
26
26
|
import { entityObject3D } from './entity-object';
|
|
27
27
|
|
package/src/kit/asset-preview.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
ShotSetPoseStep,
|
|
11
11
|
ShotSetPoseTranslation,
|
|
12
12
|
ShotSetShot,
|
|
13
|
-
} from '@volter/
|
|
13
|
+
} from '@volter/sdk';
|
|
14
14
|
import { EDITOR_LAYER, isEditorOwnedObject } from '@volter/editor-threejs/viewport/editor-layers';
|
|
15
15
|
import { markHostRenderer } from '@volter/editor-threejs/viewport/renderer-ownership';
|
|
16
16
|
import { isBuiltInternal } from '@volter/editor-threejs/adapter/hierarchy-marks';
|
|
@@ -18,7 +18,7 @@ import { loadSplat } from '@volter/editor-threejs/asset-loaders';
|
|
|
18
18
|
import { hasUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
19
19
|
import { gltfLoader } from '@volter/editor-threejs/loader';
|
|
20
20
|
import * as THREE from 'three';
|
|
21
|
-
import { forwardYawRadians, parseForwardVector } from '@volter/
|
|
21
|
+
import { forwardYawRadians, parseForwardVector } from '@volter/sdk/kit/asset-compare-core';
|
|
22
22
|
import {
|
|
23
23
|
ASSET_PREVIEW_PADDING,
|
|
24
24
|
boneZoomCenter,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
turntableViewBasis,
|
|
40
40
|
unionOrthographicFrames,
|
|
41
41
|
} from './asset-preview-framing';
|
|
42
|
-
import { drawBitmapLabel, measureBitmapLabel } from '@volter/
|
|
42
|
+
import { drawBitmapLabel, measureBitmapLabel } from '@volter/sdk/kit/bitmap-label';
|
|
43
43
|
import {
|
|
44
44
|
applyStudioEnvironment,
|
|
45
45
|
disposeStudioEnvironment,
|
|
@@ -124,8 +124,8 @@ export interface AssetPreviewFraming {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* The shot-set contract is declared ONCE, in `@volter/
|
|
128
|
-
* (`packages/
|
|
127
|
+
* The shot-set contract is declared ONCE, in `@volter/sdk`
|
|
128
|
+
* (`packages/sdk/src/types.ts`), because it crosses the editor relay:
|
|
129
129
|
* a capability tool authors a set, the CLI carries it over, and THIS module is
|
|
130
130
|
* the generic capture engine that renders it. Importing rather than
|
|
131
131
|
* re-declaring is what makes `parseShotSetDefinition`'s return annotation
|
|
@@ -142,7 +142,7 @@ export type {
|
|
|
142
142
|
ShotSetPoseStep,
|
|
143
143
|
ShotSetPoseTranslation,
|
|
144
144
|
ShotSetShot,
|
|
145
|
-
} from '@volter/
|
|
145
|
+
} from '@volter/sdk';
|
|
146
146
|
|
|
147
147
|
/** Definitions cross the editor relay as untyped JSON from project-registered
|
|
148
148
|
* tools; capped so one capture stays within the relay's request budget. */
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* diagnostic-rendering graph during a plain Scene boot. The class remains the
|
|
8
8
|
* native session type; this module owns only its live identities.
|
|
9
9
|
*/
|
|
10
|
-
import { startingPresentation, viewGridVisible, viewPresentationBinding } from '@volter/
|
|
10
|
+
import { startingPresentation, viewGridVisible, viewPresentationBinding } from '@volter/sdk/kit/viewport-presentation';
|
|
11
11
|
import {
|
|
12
12
|
type DocumentViewport,
|
|
13
13
|
registerDocumentViewport,
|
|
14
|
-
} from '@volter/
|
|
14
|
+
} from '@volter/sdk/kit/document-viewports';
|
|
15
15
|
import { lazy } from 'react';
|
|
16
16
|
import type { Object3DDocumentSession } from './object3d-document-session';
|
|
17
|
-
import { registerDocumentStageSession } from '@volter/
|
|
17
|
+
import { registerDocumentStageSession } from '@volter/sdk/kit/document-stage-sessions';
|
|
18
18
|
|
|
19
19
|
// The document header's shading, helpers and capture menus. Behind `lazy()`, so
|
|
20
20
|
// this registry stays the light read it is for every other caller.
|
|
@@ -66,7 +66,7 @@ export function registerObject3DDocumentSession(
|
|
|
66
66
|
const xyz = ([x, y, z]: readonly [number, number, number]) => ({ x, y, z });
|
|
67
67
|
|
|
68
68
|
/** An Object3D document's own viewport: its session's camera, view mode, grid,
|
|
69
|
-
* framing, selection and photograph (`@volter/
|
|
69
|
+
* framing, selection and photograph (`@volter/sdk/kit/document-viewports`). */
|
|
70
70
|
function object3DDocumentViewport(session: Object3DDocumentSession): DocumentViewport {
|
|
71
71
|
type Preset = Parameters<Object3DDocumentSession['setViewPreset']>[0];
|
|
72
72
|
type Mode = Parameters<Object3DDocumentSession['setMode']>[0];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createPerformanceProfiler } from '@volter/
|
|
2
|
-
import { resetViewPresentation, setViewPresentation, type ViewportXray } from '@volter/
|
|
3
|
-
import { invalidateStages } from '@volter/
|
|
4
|
-
import type { AuthoringAdapter } from '@volter/
|
|
1
|
+
import { createPerformanceProfiler } from '@volter/sdk/kit/performance-profiler';
|
|
2
|
+
import { resetViewPresentation, setViewPresentation, type ViewportXray } from '@volter/sdk/kit/viewport-presentation';
|
|
3
|
+
import { invalidateStages } from '@volter/sdk/kit/stage-invalidation';
|
|
4
|
+
import type { AuthoringAdapter } from '@volter/project/adapter';
|
|
5
5
|
import { viewportCaptureOutputPass } from '@volter/editor-threejs/capture/output-pass';
|
|
6
6
|
import { resolveSceneLinearSize } from '@volter/editor-threejs/capture/linear-resolve';
|
|
7
7
|
import { contentWorldBounds } from '@volter/editor-threejs/viewport/content-bounds';
|
|
@@ -17,10 +17,10 @@ import { DepthDrawMaterials } from '../../render/depth-draw-materials';
|
|
|
17
17
|
import type { DocumentDisplayTransform } from '../../render/document-display-transform';
|
|
18
18
|
import { threeObject } from '../../adapter/three-contract';
|
|
19
19
|
import { axisViewName, cameraPresetDirection, type ModelCameraPreset } from '../asset-workflow/model-inspection';
|
|
20
|
-
import { activeKeymapNavigation } from '@volter/
|
|
21
|
-
import { editorConsole } from '@volter/
|
|
20
|
+
import { activeKeymapNavigation } from '@volter/sdk/kit/keymap-presets';
|
|
21
|
+
import { editorConsole } from '@volter/sdk/kit/editor-console';
|
|
22
22
|
import { type EditorViewport } from '../editor-viewport';
|
|
23
|
-
import { nativeSelectionColors, subscribeNativeSelectionTheme } from '@volter/
|
|
23
|
+
import { nativeSelectionColors, subscribeNativeSelectionTheme } from '@volter/sdk/kit/native-selection-style';
|
|
24
24
|
import { BoneSelectionHighlight } from '../three-viewport/bone-selection-highlight';
|
|
25
25
|
import { perspectiveDistanceToFitBox } from '../three-viewport/camera-fit';
|
|
26
26
|
import {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from '../three-viewport/selection-outline';
|
|
32
32
|
import { styleEditorSkeletonHelper } from '../three-viewport/skeleton-helper';
|
|
33
33
|
import { isEditorViewportShadingTarget } from '../viewport-shading-boundary';
|
|
34
|
-
import { setAuthoringSelection } from '@volter/
|
|
34
|
+
import { setAuthoringSelection } from '@volter/sdk/kit/authoring/consumer-actions';
|
|
35
35
|
import type { ToolCameraView, ToolCameraViewSource } from '../../object3d-contributions';
|
|
36
36
|
|
|
37
37
|
export type Object3DDocumentViewMode = ViewportShadingMode | 'uv' | 'vertex-colors';
|
|
@@ -1959,7 +1959,7 @@ export {
|
|
|
1959
1959
|
/**
|
|
1960
1960
|
* OBJECT ORIGINS: a dot at the origin of each selected object, drawn over everything at a fixed
|
|
1961
1961
|
* pixel size — Blender's "Origins" overlay (`overlays.selection.origins` in
|
|
1962
|
-
* `@volter/
|
|
1962
|
+
* `@volter/sdk/kit/viewport-presentation`). Blender draws it one pixel wider than its
|
|
1963
1963
|
* Object Origin Size (default 6; `overlay_instance.cc`: `obcenter_dia + 1`) with a one-pixel
|
|
1964
1964
|
* dark rim, and in the active object's
|
|
1965
1965
|
* colour for the active object; the kit's rule for the active colour stands in for that: a lone
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import type { ViewportAuthoringPolicy } from '../viewport-authoring-policy';
|
|
17
|
-
import { getActiveAuthoring } from '@volter/
|
|
18
|
-
import { CompositeAuthoringAdapter } from '@volter/
|
|
19
|
-
import { pickTopmost } from '@volter/
|
|
20
|
-
import { resolvePanelAuthoring } from '@volter/
|
|
21
|
-
import { isViewportToolContextVisible, resolveViewportToolContext } from '@volter/
|
|
17
|
+
import { getActiveAuthoring } from '@volter/sdk/kit/authoring/active-adapter';
|
|
18
|
+
import { CompositeAuthoringAdapter } from '@volter/sdk/kit/authoring/composite-authoring-adapter';
|
|
19
|
+
import { pickTopmost } from '@volter/sdk/kit/authoring/layered-pick';
|
|
20
|
+
import { resolvePanelAuthoring } from '@volter/sdk/kit/authoring/panel-authoring';
|
|
21
|
+
import { isViewportToolContextVisible, resolveViewportToolContext } from '@volter/sdk/kit/authoring/viewport-tool-context';
|
|
22
22
|
import {
|
|
23
23
|
applyRootHiddenVisibility,
|
|
24
24
|
isThreejsSurfaceVisible,
|
|
@@ -21,7 +21,7 @@ import type {
|
|
|
21
21
|
SelectionProvider,
|
|
22
22
|
Transform,
|
|
23
23
|
TransformProvider,
|
|
24
|
-
} from '@volter/
|
|
24
|
+
} from '@volter/project/adapter';
|
|
25
25
|
import { isEditorOwnedObject } from '@volter/editor-threejs/viewport/editor-layers';
|
|
26
26
|
import { object3DAuthoringSubjectOf } from '@volter/editor-threejs/adapter/object3d-authoring-subject';
|
|
27
27
|
import { getUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
* would be inventing a third, not extracting a shared one.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
import type { EditorNode, Transform } from '@volter/
|
|
30
|
+
import type { EditorNode, Transform } from '@volter/project/adapter';
|
|
31
31
|
import { isEditorOwnedObject } from '@volter/editor-threejs/viewport/editor-layers';
|
|
32
32
|
import { object3DAuthoringSubjectOf } from '@volter/editor-threejs/adapter/object3d-authoring-subject';
|
|
33
33
|
import { getUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
34
34
|
import type * as THREE from 'three';
|
|
35
|
-
import type { ShellStore } from '@volter/
|
|
35
|
+
import type { ShellStore } from '@volter/sdk/kit/shell-store';
|
|
36
36
|
import { nativeKindOf, type ThreeProjector } from '../projection/three';
|
|
37
37
|
import { localTransformOf } from './live-object-transform';
|
|
38
38
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* degrade, never a throw.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { setViewportEditorControls, type ViewportEditorControls } from '@volter/
|
|
14
|
+
import { setViewportEditorControls, type ViewportEditorControls } from '@volter/sdk/kit/viewport-editor-controls';
|
|
15
15
|
import type * as THREE from 'three';
|
|
16
16
|
|
|
17
17
|
export interface ViewportPickContext {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
import { getUserData } from '@volter/editor-threejs/ecs/user-data';
|
|
33
33
|
import * as THREE from 'three';
|
|
34
|
-
import { isRootHidden } from '@volter/
|
|
35
|
-
import { isThreejsSurfaceVisible, resolveThreeViewportRootId } from '@volter/
|
|
34
|
+
import { isRootHidden } from '@volter/sdk/kit/authoring/world-session-state';
|
|
35
|
+
import { isThreejsSurfaceVisible, resolveThreeViewportRootId } from '@volter/sdk/kit/authoring/three-root';
|
|
36
36
|
|
|
37
37
|
export { isThreejsSurfaceVisible, resolveThreeViewportRootId };
|
|
38
38
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EditorSurface, Inline, Text } from '@volter/
|
|
1
|
+
import { EditorSurface, Inline, Text } from '@volter/sdk/widgets';
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { useEditorStats } from '@volter/
|
|
3
|
+
import { useEditorStats } from '@volter/sdk/kit/editor-runtime';
|
|
4
4
|
|
|
5
5
|
function fmt(n: number): string {
|
|
6
6
|
return n.toFixed(2);
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Text,
|
|
24
24
|
TextInput,
|
|
25
25
|
Tooltip,
|
|
26
|
-
} from '@volter/
|
|
26
|
+
} from '@volter/sdk/widgets';
|
|
27
27
|
import { useRef, useState, useSyncExternalStore } from 'react';
|
|
28
28
|
import { captureModelAssetPreview, captureObjectAssetPreview } from '../asset-preview';
|
|
29
29
|
import {
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
contributedChromeVersion,
|
|
41
41
|
contributedHeaderItems,
|
|
42
42
|
subscribeContributedChrome,
|
|
43
|
-
} from '@volter/
|
|
44
|
-
import type { HelperVisibility } from '@volter/
|
|
45
|
-
import { object3DDocumentWritePolicy } from '@volter/
|
|
46
|
-
import { stageStore, stageStoresVersion, subscribeStageStores } from '@volter/
|
|
43
|
+
} from '@volter/sdk/kit/chrome-registry';
|
|
44
|
+
import type { HelperVisibility } from '@volter/sdk/kit/shell-store';
|
|
45
|
+
import { object3DDocumentWritePolicy } from '@volter/sdk/kit/object3d-document-write-policy';
|
|
46
|
+
import { stageStore, stageStoresVersion, subscribeStageStores } from '@volter/sdk/kit/stage-store-registry';
|
|
47
47
|
import { viewportStageHelperKinds } from '../../viewport-door';
|
|
48
48
|
import {
|
|
49
49
|
type PresentationLayer,
|
|
@@ -60,8 +60,8 @@ import {
|
|
|
60
60
|
subscribeViewportPresentation,
|
|
61
61
|
viewPresentation,
|
|
62
62
|
viewportPresentationVersion,
|
|
63
|
-
} from '@volter/
|
|
64
|
-
import { ViewportOverlaysGlyph, ViewportOverlaysMenu } from '@volter/
|
|
63
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
64
|
+
import { ViewportOverlaysGlyph, ViewportOverlaysMenu } from '@volter/sdk/kit/components/ViewportOverlaysMenu';
|
|
65
65
|
import {
|
|
66
66
|
type ViewportDisplayModeChoice,
|
|
67
67
|
ViewportDisplayModeMenu,
|
|
@@ -329,7 +329,7 @@ export function Object3DDocumentToolbar({
|
|
|
329
329
|
</IconButton>
|
|
330
330
|
</Tooltip>
|
|
331
331
|
) : null}
|
|
332
|
-
{/* A package's own controls on this document (`@volter/
|
|
332
|
+
{/* A package's own controls on this document (`@volter/sdk/chrome`,
|
|
333
333
|
`placement: 'object3d-document'`): handed the document's id; the
|
|
334
334
|
contribution resolves its subject through its own integration. */}
|
|
335
335
|
{contributedHeaderItems('object3d-document').map(({ id, Component }) => (
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { lazy, Suspense, useEffect } from 'react';
|
|
13
|
-
import { announceDocumentStage } from '@volter/
|
|
13
|
+
import { announceDocumentStage } from '@volter/sdk/kit/document-viewports';
|
|
14
14
|
import type { Object3DDocumentViewportProps } from './StageHost';
|
|
15
|
-
import { OBJECT3D_SURFACE_BUILDING, ViewportSurfaceStatus } from '@volter/
|
|
15
|
+
import { OBJECT3D_SURFACE_BUILDING, ViewportSurfaceStatus } from '@volter/sdk/kit/viewport-surface-status';
|
|
16
16
|
|
|
17
17
|
const LazyObject3DDocumentViewport = lazy(async () => {
|
|
18
18
|
const module = await import('./StageHost');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { optionalThreeStateOf, threeStateOf } from '../three-state';
|
|
2
|
-
import { ShellStore } from '@volter/
|
|
2
|
+
import { ShellStore } from '@volter/sdk/kit/shell-store';
|
|
3
3
|
import type { ToolObject3DAuthoringProps, ToolObject3DDocumentAuthoring, ToolObject3DPreviewSource, ToolViewportDressing } from '../../object3d-contributions';
|
|
4
|
-
import { invalidateStages, stageGeneration } from '@volter/
|
|
5
|
-
import type { StageTransportSnapshot } from '@volter/
|
|
6
|
-
import { EditorIcon, editorIcons, IconButton, themeVars } from '@volter/
|
|
7
|
-
import type { AuthoringAdapter } from '@volter/
|
|
4
|
+
import { invalidateStages, stageGeneration } from '@volter/sdk/kit/stage-invalidation';
|
|
5
|
+
import type { StageTransportSnapshot } from '@volter/sdk/host';
|
|
6
|
+
import { EditorIcon, editorIcons, IconButton, themeVars } from '@volter/sdk/widgets';
|
|
7
|
+
import type { AuthoringAdapter } from '@volter/project/adapter';
|
|
8
8
|
import { contentWorldBounds } from '@volter/editor-threejs/viewport/content-bounds';
|
|
9
9
|
import { isInEditorOwnedSubtree } from '@volter/editor-threejs/viewport/editor-layers';
|
|
10
10
|
import { createStandardEnvironment } from '@volter/editor-threejs/viewport/environment';
|
|
@@ -25,9 +25,9 @@ import {
|
|
|
25
25
|
} from 'react';
|
|
26
26
|
import * as THREE from 'three';
|
|
27
27
|
import { DocumentScene } from '../../render/document-scene';
|
|
28
|
-
import { registerStageTransport, StageTransport } from '@volter/
|
|
28
|
+
import { registerStageTransport, StageTransport } from '@volter/sdk/kit/animation/stage-transport';
|
|
29
29
|
import { scanClipSubjects } from '../animation/three-clips-subject';
|
|
30
|
-
import { liveGestureActive, whenLiveGestureIdle } from '@volter/
|
|
30
|
+
import { liveGestureActive, whenLiveGestureIdle } from '@volter/sdk/kit/live-gesture-lock';
|
|
31
31
|
import {
|
|
32
32
|
type Object3DDocumentPresentationState,
|
|
33
33
|
Object3DDocumentSession,
|
|
@@ -37,39 +37,39 @@ import {
|
|
|
37
37
|
} from '../authoring/object3d-document-session-registry';
|
|
38
38
|
import { Object3DGestureController } from '../authoring/object3d-gesture-controller';
|
|
39
39
|
import { SourceObject3DAuthoringAdapter } from '../authoring/source-object3d-authoring-adapter';
|
|
40
|
-
import { registerDesignTimeSurface } from '@volter/
|
|
41
|
-
import { DocumentRendererSession } from '@volter/
|
|
42
|
-
import { useOptionalEditorStats, useOptionalEditorStore } from '@volter/
|
|
40
|
+
import { registerDesignTimeSurface } from '@volter/sdk/kit/coverage/design-time-surfaces';
|
|
41
|
+
import { DocumentRendererSession } from '@volter/sdk/kit/document-renderer-session';
|
|
42
|
+
import { useOptionalEditorStats, useOptionalEditorStore } from '@volter/sdk/kit/editor-runtime';
|
|
43
43
|
import type { EditorShellStore } from '../editor-shell-store';
|
|
44
44
|
import { EditorViewport } from '../editor-viewport';
|
|
45
45
|
import {
|
|
46
46
|
lookDeclaresViewportColors,
|
|
47
47
|
nativeViewportLook,
|
|
48
48
|
subscribeNativeSelectionTheme,
|
|
49
|
-
} from '@volter/
|
|
49
|
+
} from '@volter/sdk/kit/native-selection-style';
|
|
50
50
|
import {
|
|
51
51
|
type Object3DDocumentPersistenceSession,
|
|
52
52
|
object3DDocumentWritePolicy,
|
|
53
|
-
} from '@volter/
|
|
54
|
-
import { registerPerformanceSource } from '@volter/
|
|
53
|
+
} from '@volter/sdk/kit/object3d-document-write-policy';
|
|
54
|
+
import { registerPerformanceSource } from '@volter/sdk/kit/performance-sources';
|
|
55
55
|
import {
|
|
56
56
|
assetSubjectApplies,
|
|
57
57
|
documentStageContext,
|
|
58
58
|
focusedStageStore,
|
|
59
59
|
identityRowApplies,
|
|
60
60
|
studioStageApplies,
|
|
61
|
-
} from '@volter/
|
|
62
|
-
import { registerStageStore } from '@volter/
|
|
63
|
-
import { announceDocumentStage, registerDocumentViewport } from '@volter/
|
|
61
|
+
} from '@volter/sdk/kit/stage-context';
|
|
62
|
+
import { registerStageStore } from '@volter/sdk/kit/stage-store-registry';
|
|
63
|
+
import { announceDocumentStage, registerDocumentViewport } from '@volter/sdk/kit/document-viewports';
|
|
64
64
|
import { sceneDocumentViewport } from '../scene-document-viewport';
|
|
65
65
|
import { threeStageTransformChrome } from './stage-transform-chrome';
|
|
66
|
-
import { RetainedDocumentStates } from '@volter/
|
|
66
|
+
import { RetainedDocumentStates } from '@volter/sdk/kit/retained-document-states';
|
|
67
67
|
import { perspectiveDistanceToFitBox } from '../three-viewport/camera-fit';
|
|
68
68
|
import {
|
|
69
69
|
acquireInteractiveViewportRenderer,
|
|
70
70
|
type InteractiveViewportRendererLease,
|
|
71
71
|
} from '../three-viewport/interactive-renderer';
|
|
72
|
-
import type { ThreeViewportProjection } from '@volter/
|
|
72
|
+
import type { ThreeViewportProjection } from '@volter/sdk/kit/three-viewport-presentation';
|
|
73
73
|
import {
|
|
74
74
|
activeViewportBreakdownDocumentId,
|
|
75
75
|
markViewportConstructReady,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
markViewportReactActive,
|
|
80
80
|
markViewportSegment,
|
|
81
81
|
recordViewportFirstFrame,
|
|
82
|
-
} from '@volter/
|
|
82
|
+
} from '@volter/sdk/kit/viewport-activation-timings';
|
|
83
83
|
import { bindViewportRig, runViewportFrame } from '../../viewport-door';
|
|
84
84
|
import type { StageFrameCost } from '../../viewport-api';
|
|
85
85
|
import {
|
|
@@ -87,11 +87,11 @@ import {
|
|
|
87
87
|
openWorkspaceDocuments,
|
|
88
88
|
registerWorkspaceDocumentSelection,
|
|
89
89
|
subscribeWorkspaceDocuments,
|
|
90
|
-
} from '@volter/
|
|
91
|
-
import { AssetEditorShell } from '@volter/
|
|
90
|
+
} from '@volter/sdk/kit/workspace-document-registry';
|
|
91
|
+
import { AssetEditorShell } from '@volter/sdk/kit/components/AssetEditorShell';
|
|
92
92
|
import { StageOverlays } from './StageOverlays';
|
|
93
93
|
import type { WorldRootStageBinding } from './world-root-binding';
|
|
94
|
-
import { TransportStrip } from '@volter/
|
|
94
|
+
import { TransportStrip } from '@volter/sdk/kit/transport-strip';
|
|
95
95
|
|
|
96
96
|
// The stage's own keyboard actions, behind the same lazy boundary as the
|
|
97
97
|
// overlays and for the same reason — a bounded host pays for neither
|
|
@@ -108,8 +108,8 @@ import {
|
|
|
108
108
|
watchPaletteBackdrop,
|
|
109
109
|
} from './standard-viewport-dressing';
|
|
110
110
|
import { ViewportFurniture } from './ViewportFurniture';
|
|
111
|
-
import { OBJECT3D_SURFACE_BUILDING, ViewportSurfaceStatus } from '@volter/
|
|
112
|
-
import { workspaceHistoryService } from '@volter/
|
|
111
|
+
import { OBJECT3D_SURFACE_BUILDING, ViewportSurfaceStatus } from '@volter/sdk/kit/viewport-surface-status';
|
|
112
|
+
import { workspaceHistoryService } from '@volter/sdk/kit/components/workspace-history';
|
|
113
113
|
import {
|
|
114
114
|
bindViewPresentation,
|
|
115
115
|
DOCUMENT_STUDIO_PRESET,
|
|
@@ -123,8 +123,8 @@ import {
|
|
|
123
123
|
viewPresentation,
|
|
124
124
|
viewPresentationSnapshot,
|
|
125
125
|
type ViewportDrawMode,
|
|
126
|
-
} from '@volter/
|
|
127
|
-
import { subscribeEnvironmentImages } from '@volter/
|
|
126
|
+
} from '@volter/sdk/kit/viewport-presentation';
|
|
127
|
+
import { subscribeEnvironmentImages } from '@volter/sdk/kit/environment-images';
|
|
128
128
|
import { StagePresentationRig } from './standard-viewport-dressing';
|
|
129
129
|
import { threeStoreForHost } from '../three-state';
|
|
130
130
|
import { threeObject } from '../../adapter/three-contract';
|
|
@@ -230,7 +230,7 @@ export interface Object3DDocumentViewportProps
|
|
|
230
230
|
readonly sourcePath?: string;
|
|
231
231
|
/** See {@link Object3DDocumentContent}. Default `{ kind: 'build' }`. */
|
|
232
232
|
readonly content?: Object3DDocumentContent;
|
|
233
|
-
/** See `@volter/
|
|
233
|
+
/** See `@volter/sdk`'s `ToolObject3DAuthoringProps.audit`. */
|
|
234
234
|
readonly audit?: boolean;
|
|
235
235
|
/** Reuse the canonical Asset Lab viewport with NONE of the document chrome —
|
|
236
236
|
* no toolbar, no animation widget, no workspace-document registration —
|
|
@@ -293,7 +293,7 @@ export interface Object3DDocumentViewportProps
|
|
|
293
293
|
/** Multiplies the opening fit distance; `1` fills the view. */
|
|
294
294
|
readonly openingFit?: number;
|
|
295
295
|
/** The kind of stage this view is, for its starting presentation
|
|
296
|
-
* (`@volter/
|
|
296
|
+
* (`@volter/sdk/kit/viewport-presentation`): the document's own kind (`'model'`).
|
|
297
297
|
* Without it the kind is read off the document id's prefix. */
|
|
298
298
|
readonly stageKind?: string;
|
|
299
299
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { themeVars } from '@volter/
|
|
1
|
+
import { themeVars } from '@volter/sdk/widgets';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { useEditorStats } from '@volter/
|
|
4
|
-
import { latestTabCensus } from '@volter/
|
|
3
|
+
import { useEditorStats } from '@volter/sdk/kit/editor-runtime';
|
|
4
|
+
import { latestTabCensus } from '@volter/sdk/kit/tab-census';
|
|
5
5
|
|
|
6
6
|
export function StatsOverlay() {
|
|
7
7
|
const stats = useEditorStats();
|