@volter/editor-threejs 0.5.67 → 0.5.69
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/NOTICE +3 -3
- package/contributions/animation-mixers.service.ts +1 -1
- package/contributions/animation-timeline.utility.tsx +1 -1
- package/dist-node/serving.mjs +10 -10
- package/package.json +4 -4
- package/serving/animation-live-module.ts +6 -6
- package/serving/animation-stamp.ts +5 -5
- package/serving/index.ts +1 -1
- package/src/adapter/hierarchy-marks.ts +5 -5
- package/src/adapter/ingest/scene-capture.ts +7 -7
- package/src/adapter/ingest/structural-ids.ts +1 -1
- package/src/adapter/ingest/visible-capture-window.ts +3 -3
- package/src/asset-loaders.ts +1 -1
- package/src/ecs/object-marks.ts +4 -4
- package/src/ecs/user-data.ts +3 -3
- package/src/kit/asset-compare.ts +2 -2
- package/src/kit/asset-preview-command.ts +2 -2
- package/src/kit/asset-preview.ts +1 -1
- package/src/kit/authoring/component-instance-root.ts +2 -2
- package/src/kit/authoring/object3d-document-session.ts +1 -1
- package/src/kit/authoring/three-projection-core.ts +1 -1
- package/src/kit/authoring/viewport-pick-context.ts +1 -1
- package/src/kit/authoring/viewport-raycast.ts +1 -1
- package/src/kit/components/CameraInfo.tsx +1 -1
- package/src/kit/components/InspectorObjectPreview.tsx +1 -1
- package/src/kit/components/Object3DDocumentToolbar.tsx +10 -10
- package/src/kit/components/StageHost.tsx +14 -14
- package/src/kit/components/StatsOverlay.tsx +4 -4
- package/src/kit/components/ViewportFurniture.tsx +22 -22
- package/src/kit/components/ViewportOverlay.tsx +4 -4
- package/src/kit/components/ViewportShadingMenu.tsx +9 -9
- package/src/kit/components/ViewportViewMenu.tsx +1 -1
- package/src/kit/components/stage-presence-markers.ts +2 -2
- package/src/kit/components/standard-viewport-dressing.ts +18 -18
- package/src/kit/editor-shell-store.ts +1 -1
- package/src/kit/editor-viewport.ts +17 -17
- package/src/kit/live-module-source.ts +1 -1
- package/src/kit/projection/three.ts +3 -3
- package/src/kit/three-viewport/selection-outline.ts +9 -9
- package/src/kit/three-viewport/skeleton-helper.ts +1 -1
- package/src/kit/three-viewport/studio-environment.ts +1 -1
- package/src/kit/viewport-hotkeys.ts +2 -2
- package/src/viewport/content-bounds.ts +1 -1
|
@@ -61,7 +61,7 @@ export type ThreeNode = ProjectedNode<THREE.Object3D>;
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Reflection stats for one walk. Surfaced by the adapters' `refresh()` for
|
|
64
|
-
* proof/telemetry (the ingest console line, the `
|
|
64
|
+
* proof/telemetry (the ingest console line, the `__volterIngest.reflected` hook) —
|
|
65
65
|
* deliberately a fresh measurement each walk rather than a mount-time snapshot,
|
|
66
66
|
* because a running world keeps streaming objects in.
|
|
67
67
|
*/
|
|
@@ -76,7 +76,7 @@ export interface ThreeWalkStats {
|
|
|
76
76
|
* object drawing N units — so `count`/`meshes` (and the hierarchy rows built
|
|
77
77
|
* from the same nodes) report 1 where a reader sees N, with no error
|
|
78
78
|
* anywhere, because both numbers are individually correct. These two fields
|
|
79
|
-
* are the only place the shortfall is expressible;
|
|
79
|
+
* are the only place the shortfall is expressible; a probe's
|
|
80
80
|
* instanced-content check reads exactly this pair
|
|
81
81
|
* (`packages/editor/src/doctor/detection-gaps.ts`).
|
|
82
82
|
*/
|
|
@@ -254,7 +254,7 @@ export function threeEntityId(worldId: string, oid: string): string {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
* The LIVE OID scheme. A node stamped by the served TSX's `
|
|
257
|
+
* The LIVE OID scheme. A node stamped by the served TSX's `__volterOid` transform
|
|
258
258
|
* keeps `r3f:<worldId>:<oid>`, so selection survives Edit→Play; anything a
|
|
259
259
|
* source location cannot claim gets a session-stable `live:<worldId>:<n>`.
|
|
260
260
|
*/
|
|
@@ -73,7 +73,7 @@ export function createThreeSelectionOutline(
|
|
|
73
73
|
// A CRISP LINE NEEDS ITS COLOUR UNSCALED. postprocessing's composite multiplies the edge colour
|
|
74
74
|
// by the edge value and uses that value again as alpha, so a partial edge darkens (Blender's
|
|
75
75
|
// orange read brown) and a strength above one pushes the colour past itself (it read white).
|
|
76
|
-
// Under `
|
|
76
|
+
// Under `volterCrisp` the colour is divided back out of the edge value, leaving only the alpha
|
|
77
77
|
// to follow the edge; the editor's own halo keeps the library's composite. And the library
|
|
78
78
|
// draws an edge only OUTSIDE the silhouette (it scales the edge by the mask, which is zero on
|
|
79
79
|
// the selection); Blender's detect marks the pixels on both sides of it, so a crisp line keeps
|
|
@@ -84,15 +84,15 @@ export function createThreeSelectionOutline(
|
|
|
84
84
|
if (shader.includes(stock) && shader.includes(outsideOnly)) {
|
|
85
85
|
(effect as unknown as { setFragmentShader(source: string): void }).setFragmentShader(
|
|
86
86
|
shader
|
|
87
|
-
.replace('uniform float edgeStrength;', 'uniform float edgeStrength;uniform float
|
|
88
|
-
.replace(outsideOnly, 'edge*=(edgeStrength*(
|
|
87
|
+
.replace('uniform float edgeStrength;', 'uniform float edgeStrength;uniform float volterCrisp;')
|
|
88
|
+
.replace(outsideOnly, 'edge*=(edgeStrength*(volterCrisp>0.5?1.0:mask.x)*pulse);')
|
|
89
89
|
.replace(
|
|
90
90
|
stock,
|
|
91
|
-
`${stock}if(
|
|
91
|
+
`${stock}if(volterCrisp>0.5){float volterSum=edge.x+edge.y;if(volterSum>0.0)color/=volterSum;edge=min(edge,vec2(1.0));}`,
|
|
92
92
|
),
|
|
93
93
|
);
|
|
94
94
|
// Any `{ value }` is a uniform to three; no runtime three import in this module.
|
|
95
|
-
effect.uniforms.set('
|
|
95
|
+
effect.uniforms.set('volterCrisp', { value: 0 } as THREE.Uniform<number>);
|
|
96
96
|
}
|
|
97
97
|
// THE EDITOR'S OWN OVERLAYS DO NOT HIDE THE SELECTION. The effect measures what stands in
|
|
98
98
|
// front of the selected object with a depth pass under an override material, which writes
|
|
@@ -199,14 +199,14 @@ type OutlineColors = {
|
|
|
199
199
|
* step where its are smoothed. Visibility is the stock material's: the least visible of the
|
|
200
200
|
* pixels looked at.
|
|
201
201
|
*/
|
|
202
|
-
const BLENDER_OUTLINE_DETECT = /* glsl */ `uniform lowp sampler2D inputBuffer;uniform vec2 texelSize;uniform float
|
|
202
|
+
const BLENDER_OUTLINE_DETECT = /* glsl */ `uniform lowp sampler2D inputBuffer;uniform vec2 texelSize;uniform float volterReach;
|
|
203
203
|
varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;
|
|
204
204
|
void main(){
|
|
205
205
|
vec2 uv=(vUv0+vUv1)*0.5;
|
|
206
206
|
vec2 c=texture2D(inputBuffer,uv).rg;
|
|
207
207
|
float edge=0.0;float visibility=1.0;
|
|
208
208
|
for(int i=1;i<=2;i++){
|
|
209
|
-
if(float(i)>
|
|
209
|
+
if(float(i)>volterReach||edge>0.0)break;
|
|
210
210
|
vec2 o=texelSize*float(i);
|
|
211
211
|
vec2 s0=texture2D(inputBuffer,uv+vec2(o.x,0.0)).rg;vec2 s1=texture2D(inputBuffer,uv-vec2(o.x,0.0)).rg;
|
|
212
212
|
vec2 s2=texture2D(inputBuffer,uv+vec2(0.0,o.y)).rg;vec2 s3=texture2D(inputBuffer,uv-vec2(0.0,o.y)).rg;
|
|
@@ -256,9 +256,9 @@ function paintOutline(effect: OutlineEffect): void {
|
|
|
256
256
|
}
|
|
257
257
|
// Half the width on each side of the silhouette's edge: Blender's 4 device px is its
|
|
258
258
|
// `do_thick_outlines` reach of 2.
|
|
259
|
-
detect.uniforms['
|
|
259
|
+
detect.uniforms['volterReach'] = { value: Math.max(1, Math.round(width / 2)) } as THREE.IUniform<number>;
|
|
260
260
|
effect.edgeStrength = crisp ? 8 : 5;
|
|
261
|
-
const crispUniform = effect.uniforms.get('
|
|
261
|
+
const crispUniform = effect.uniforms.get('volterCrisp');
|
|
262
262
|
if (crispUniform) crispUniform.value = crisp ? 1 : 0;
|
|
263
263
|
effect.xRay = form?.hidden ?? true;
|
|
264
264
|
}
|
|
@@ -9,7 +9,7 @@ const SKELETON_CHILD_COLOR = new THREE.Color(0xffb000);
|
|
|
9
9
|
export function styleEditorSkeletonHelper(helper: THREE.SkeletonHelper): void {
|
|
10
10
|
const colors = helper.geometry.getAttribute('color');
|
|
11
11
|
// SkeletonHelper emits two vertices per bone link. Three's stock pure
|
|
12
|
-
// blue/green endpoints disappear against
|
|
12
|
+
// blue/green endpoints disappear against volter's dark viewport, especially
|
|
13
13
|
// in captures. Keep the native helper geometry, but use editor-contrast
|
|
14
14
|
// colors so the inspection affordance is actually visible.
|
|
15
15
|
for (let i = 0; i < colors.count; i += 2) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The LOOK LANES' neutral studio IBL — `scene.environment` for every surface
|
|
3
3
|
* that photographs an asset instead of displaying it: the Asset Lab capture
|
|
4
|
-
* path (`asset-preview.ts`: the model-file lane, `
|
|
4
|
+
* path (`asset-preview.ts`: the model-file lane, the editor's `screenshot <module>` command
|
|
5
5
|
* through `project.bake.preview`, labeled shot sets, source-review sheets,
|
|
6
6
|
* splats) and the asset-browser thumbnails (`model-thumbnail.ts`).
|
|
7
7
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* stage binds these while it is mounted (`components/stage-keyboard.tsx`). They
|
|
5
5
|
* reach the keyboard through the host door (`host.keyboard`): the viewport says
|
|
6
6
|
* what each action does, and the active KEYMAP decides which keys land on it —
|
|
7
|
-
* W/E/R under `
|
|
7
|
+
* W/E/R under `volter`, G/R/S under `blender`.
|
|
8
8
|
*/
|
|
9
9
|
import { editorHost } from '@volter/editor-sdk/host';
|
|
10
10
|
import { getActiveScope, installHotkeys, setActiveScope } from '@volter/editor-sdk/kit/hotkeys';
|
|
@@ -91,7 +91,7 @@ export function registerViewportHotkeys(
|
|
|
91
91
|
if (isVertexSnapKey(e) && !e.metaKey && !e.ctrlKey && !e.repeat) {
|
|
92
92
|
// THE STAGE'S OWN SCOPE, which is what keeps this from being a second
|
|
93
93
|
// keyboard owner: it fires only while the viewport holds the editor's
|
|
94
|
-
// scope, the same fact the frame publishes as `
|
|
94
|
+
// scope, the same fact the frame publishes as `volter.stage.focused`.
|
|
95
95
|
if (getActiveScope() !== 'viewport') return;
|
|
96
96
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
|
|
97
97
|
store.setVertexSnapActive(true);
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
*
|
|
36
36
|
* Editor furniture is deliberately still measured. `isEditorOwnedObject`
|
|
37
37
|
* matches `userData.engineInternal`, and the splat bounds proxy
|
|
38
|
-
* (`@volter/editor-threejs-runtime/asset-loaders`, `
|
|
38
|
+
* (`@volter/editor-threejs-runtime/asset-loaders`, `__volter_splat_bounds`) is engine-internal
|
|
39
39
|
* geometry that exists PRECISELY so generic focus/selection bounds can frame a
|
|
40
40
|
* Gaussian splat — a splat renders no `BufferGeometry` of its own. Excluding
|
|
41
41
|
* editor-owned nodes here would silently un-frame every splat. Consumers that
|