@volter/editor-threejs 0.5.194 → 0.5.196
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/package.json +3 -3
- package/src/capture/scene.ts +7 -3
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.196",
|
|
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/editor-project": "0.5.
|
|
138
|
+
"@volter/editor-project": "0.5.196",
|
|
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/editor-sdk": "0.5.
|
|
143
|
+
"@volter/editor-sdk": "0.5.196",
|
|
144
144
|
"postprocessing": "6.38.3",
|
|
145
145
|
"quarks.core": "0.16.0",
|
|
146
146
|
"@fortawesome/free-solid-svg-icons": "^7.2.0"
|
package/src/capture/scene.ts
CHANGED
|
@@ -58,7 +58,10 @@ function capture(
|
|
|
58
58
|
throw new Error('Scene capture requires finite positive dimensions');
|
|
59
59
|
const width = Math.min(2048, Math.round(options.width));
|
|
60
60
|
const height = Math.min(2048, Math.round(options.height));
|
|
61
|
-
|
|
61
|
+
// Render Result/EXR captures need the same scene-linear antialiasing as PNG
|
|
62
|
+
// captures. Resolving only the display path left Blender renders with one
|
|
63
|
+
// raster sample per pixel, particularly visible on textured roof tiles.
|
|
64
|
+
const scale = 2;
|
|
62
65
|
const renderWidth = width * scale;
|
|
63
66
|
const renderHeight = height * scale;
|
|
64
67
|
const lease = acquireInspectorPreviewRenderer();
|
|
@@ -97,8 +100,9 @@ function capture(
|
|
|
97
100
|
if (resolved.texture.type !== THREE.HalfFloatType || resolved.width !== renderWidth || resolved.height !== renderHeight)
|
|
98
101
|
throw new Error('Scene capture effect must return a same-size half-float target');
|
|
99
102
|
if (linear) {
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
displayInput=resolveSceneLinearSize(renderer,resolved,width,height);
|
|
104
|
+
const pixels = new Uint16Array(width * height * 4);
|
|
105
|
+
renderer.readRenderTargetPixels(displayInput, 0, 0, width, height, pixels);
|
|
102
106
|
completed = true;
|
|
103
107
|
return { pixels, width, height };
|
|
104
108
|
}
|