feat(web): studio worlds, camera-view/offscreen environment parity, material and undo coverage
Environment lighting: - ship all eight desktop studiolights/world datasets (WBENV1 float32) and a shared loader used by both the main viewport and the offscreen worker - add the N-panel "studio 环境" selector - rotate the world background together with the environment (backgroundRotation/backgroundIntensity), so camera view and offscreen renders match the desktop Mapping-node behaviour Verification (Chromium, OPFS, NOT_CLAIMED): - environment lighting + 8 world pixel identity - camera-view rotation correspondence (camera matrices, 207 samples) - offscreen vs on-screen background parity after hiding geometry (1305 samples) - metals case extended with material-field OPFS roundtrip - material Principled edits and rename undo/redo - eight studio worlds: pairwise frame differences + luminance rank correlation - undo history depth capped at 64 steps and undo across OPFS save/reopen Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
24
web/tests/fixtures/collada/expected.json
vendored
Normal file
24
web/tests/fixtures/collada/expected.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"triangle_minimal": {
|
||||
"objects": 1,
|
||||
"triangles": 1
|
||||
},
|
||||
"nested_hierarchy": {
|
||||
"objects": 2,
|
||||
"triangles": 3
|
||||
},
|
||||
"two_materials": {
|
||||
"objects": 2,
|
||||
"triangles": 2,
|
||||
"materials": 2
|
||||
},
|
||||
"millimeter_yup": {
|
||||
"objects": 1,
|
||||
"triangles": 12,
|
||||
"size_m": [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
}
|
||||
}
|
||||
43
web/tests/fixtures/collada/millimeter_yup.dae
vendored
Normal file
43
web/tests/fixtures/collada/millimeter_yup.dae
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||
<asset>
|
||||
<contributor><author>WebBlender fixtures</author></contributor>
|
||||
<created>2026-11-21T00:00:00Z</created>
|
||||
<modified>2026-11-21T00:00:00Z</modified>
|
||||
<unit meter="0.001" name="millimeter"/>
|
||||
<up_axis>Y_UP</up_axis>
|
||||
</asset>
|
||||
<library_geometries>
|
||||
<geometry id="Cube" name="Cube">
|
||||
<mesh>
|
||||
<source id="Cube-positions">
|
||||
<float_array id="Cube-positions-array" count="24">0 0 0 1000 0 0 1000 1000 0 0 1000 0 0 0 1000 1000 0 1000 1000 1000 1000 0 1000 1000</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Cube-positions-array" count="8" stride="3">
|
||||
<param name="X" type="float"/><param name="Y" type="float"/><param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Cube-vertices">
|
||||
<input semantic="POSITION" source="#Cube-positions"/>
|
||||
</vertices>
|
||||
<triangles count="12">
|
||||
<input semantic="VERTEX" source="#Cube-vertices" offset="0"/>
|
||||
<p>0 1 2 0 2 3 4 6 5 4 7 6 0 4 5 0 5 1 1 5 6 1 6 2 2 6 7 2 7 3 3 7 4 3 4 0</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_effects>
|
||||
</library_effects>
|
||||
<library_materials>
|
||||
</library_materials>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="Scene" name="Scene">
|
||||
<node id="Root" name="Root">
|
||||
<instance_geometry url="#Cube"></instance_geometry>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene><instance_visual_scene url="#Scene"/></scene>
|
||||
</COLLADA>
|
||||
68
web/tests/fixtures/collada/nested_hierarchy.dae
vendored
Normal file
68
web/tests/fixtures/collada/nested_hierarchy.dae
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||
<asset>
|
||||
<contributor><author>WebBlender fixtures</author></contributor>
|
||||
<created>2026-11-21T00:00:00Z</created>
|
||||
<modified>2026-11-21T00:00:00Z</modified>
|
||||
<unit meter="1" name="meter"/>
|
||||
<up_axis>Z_UP</up_axis>
|
||||
</asset>
|
||||
<library_geometries>
|
||||
<geometry id="Marker" name="Marker">
|
||||
<mesh>
|
||||
<source id="Marker-positions">
|
||||
<float_array id="Marker-positions-array" count="9">0 0 0 0.5 0 0 0 0.5 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Marker-positions-array" count="3" stride="3">
|
||||
<param name="X" type="float"/><param name="Y" type="float"/><param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Marker-vertices">
|
||||
<input semantic="POSITION" source="#Marker-positions"/>
|
||||
</vertices>
|
||||
<triangles count="1">
|
||||
<input semantic="VERTEX" source="#Marker-vertices" offset="0"/>
|
||||
<p>0 1 2</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<geometry id="Panel" name="Panel">
|
||||
<mesh>
|
||||
<source id="Panel-positions">
|
||||
<float_array id="Panel-positions-array" count="12">0 0 0 1 0 0 1 1 0 0 1 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Panel-positions-array" count="4" stride="3">
|
||||
<param name="X" type="float"/><param name="Y" type="float"/><param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Panel-vertices">
|
||||
<input semantic="POSITION" source="#Panel-positions"/>
|
||||
</vertices>
|
||||
<triangles count="2">
|
||||
<input semantic="VERTEX" source="#Panel-vertices" offset="0"/>
|
||||
<p>0 1 2 0 2 3</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_effects>
|
||||
</library_effects>
|
||||
<library_materials>
|
||||
</library_materials>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="Scene" name="Scene">
|
||||
<node id="Root" name="Root">
|
||||
<translate sid="location">0 0 2</translate>
|
||||
<instance_geometry url="#Marker"></instance_geometry>
|
||||
<node id="Child" name="Child">
|
||||
<rotate sid="rotationZ">0 0 1 90</rotate>
|
||||
<scale sid="scale">2 2 2</scale>
|
||||
<instance_geometry url="#Panel"></instance_geometry>
|
||||
</node>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene><instance_visual_scene url="#Scene"/></scene>
|
||||
</COLLADA>
|
||||
43
web/tests/fixtures/collada/triangle_minimal.dae
vendored
Normal file
43
web/tests/fixtures/collada/triangle_minimal.dae
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||
<asset>
|
||||
<contributor><author>WebBlender fixtures</author></contributor>
|
||||
<created>2026-11-21T00:00:00Z</created>
|
||||
<modified>2026-11-21T00:00:00Z</modified>
|
||||
<unit meter="1" name="meter"/>
|
||||
<up_axis>Z_UP</up_axis>
|
||||
</asset>
|
||||
<library_geometries>
|
||||
<geometry id="MinimalTriangle" name="MinimalTriangle">
|
||||
<mesh>
|
||||
<source id="MinimalTriangle-positions">
|
||||
<float_array id="MinimalTriangle-positions-array" count="9">0 0 0 1 0 0 0 2 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#MinimalTriangle-positions-array" count="3" stride="3">
|
||||
<param name="X" type="float"/><param name="Y" type="float"/><param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="MinimalTriangle-vertices">
|
||||
<input semantic="POSITION" source="#MinimalTriangle-positions"/>
|
||||
</vertices>
|
||||
<triangles count="1">
|
||||
<input semantic="VERTEX" source="#MinimalTriangle-vertices" offset="0"/>
|
||||
<p>0 1 2</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_effects>
|
||||
</library_effects>
|
||||
<library_materials>
|
||||
</library_materials>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="Scene" name="Scene">
|
||||
<node id="Root" name="Root">
|
||||
<instance_geometry url="#MinimalTriangle"></instance_geometry>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene><instance_visual_scene url="#Scene"/></scene>
|
||||
</COLLADA>
|
||||
87
web/tests/fixtures/collada/two_materials.dae
vendored
Normal file
87
web/tests/fixtures/collada/two_materials.dae
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||
<asset>
|
||||
<contributor><author>WebBlender fixtures</author></contributor>
|
||||
<created>2026-11-21T00:00:00Z</created>
|
||||
<modified>2026-11-21T00:00:00Z</modified>
|
||||
<unit meter="1" name="meter"/>
|
||||
<up_axis>Z_UP</up_axis>
|
||||
</asset>
|
||||
<library_geometries>
|
||||
<geometry id="Left" name="Left">
|
||||
<mesh>
|
||||
<source id="Left-positions">
|
||||
<float_array id="Left-positions-array" count="9">-1 0 0 0 0 0 0 1 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Left-positions-array" count="3" stride="3">
|
||||
<param name="X" type="float"/><param name="Y" type="float"/><param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Left-vertices">
|
||||
<input semantic="POSITION" source="#Left-positions"/>
|
||||
</vertices>
|
||||
<triangles count="1">
|
||||
<input semantic="VERTEX" source="#Left-vertices" offset="0"/>
|
||||
<p>0 1 2</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<geometry id="Right" name="Right">
|
||||
<mesh>
|
||||
<source id="Right-positions">
|
||||
<float_array id="Right-positions-array" count="9">0 0 0 1 0 0 0 1 0</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#Right-positions-array" count="3" stride="3">
|
||||
<param name="X" type="float"/><param name="Y" type="float"/><param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="Right-vertices">
|
||||
<input semantic="POSITION" source="#Right-positions"/>
|
||||
</vertices>
|
||||
<triangles count="1">
|
||||
<input semantic="VERTEX" source="#Right-vertices" offset="0"/>
|
||||
<p>0 1 2</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_effects>
|
||||
<effect id="FxRed">
|
||||
<profile_COMMON>
|
||||
<technique sid="common">
|
||||
<lambert><diffuse><color>1 0 0 1</color></diffuse></lambert>
|
||||
</technique>
|
||||
</profile_COMMON>
|
||||
</effect>
|
||||
<effect id="FxGreen">
|
||||
<profile_COMMON>
|
||||
<technique sid="common">
|
||||
<lambert><diffuse><color>0 1 0 1</color></diffuse></lambert>
|
||||
</technique>
|
||||
</profile_COMMON>
|
||||
</effect>
|
||||
</library_effects>
|
||||
<library_materials>
|
||||
<material id="Red" name="Red">
|
||||
<instance_effect url="#FxRed"/>
|
||||
</material>
|
||||
<material id="Green" name="Green">
|
||||
<instance_effect url="#FxGreen"/>
|
||||
</material>
|
||||
</library_materials>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="Scene" name="Scene">
|
||||
<node id="Root" name="Root">
|
||||
<instance_geometry url="#Left"><bind_material><technique_common>
|
||||
<instance_material symbol="MatRed" target="#Red"/>
|
||||
</technique_common></bind_material></instance_geometry>
|
||||
<instance_geometry url="#Right"><bind_material><technique_common>
|
||||
<instance_material symbol="MatGreen" target="#Green"/>
|
||||
</technique_common></bind_material></instance_geometry>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene><instance_visual_scene url="#Scene"/></scene>
|
||||
</COLLADA>
|
||||
BIN
web/tests/fixtures/collada/yt2-imported.blend
vendored
Normal file
BIN
web/tests/fixtures/collada/yt2-imported.blend
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user