fix(simulation): align LCC layers in PlayCanvas world

This commit is contained in:
DCCONSTRUCTIONS
2026-08-26 14:20:40 +03:00
parent 906a6ce37b
commit 424374263e
6 changed files with 545 additions and 60 deletions
+23 -1
View File
@@ -93,6 +93,7 @@ class _ReadyProvider:
self.deleted: list[str] = []
self.upload_calls = 0
self.submit_calls = 0
self.submitted_document: dict[str, object] | None = None
def capabilities(self) -> dict[str, object]:
return {"outputs": ["preview.sog", "streamed-sog"]}
@@ -118,8 +119,9 @@ class _ReadyProvider:
members=members,
)
def submit_build(self, _document: dict[str, object]) -> dict[str, object]:
def submit_build(self, document: dict[str, object]) -> dict[str, object]:
self.submit_calls += 1
self.submitted_document = document
return {
"schema_version": "gaussian-pipeline.job/v1",
"job_id": "gsp-20260826000000-deadbeef",
@@ -195,8 +197,28 @@ def test_service_materializes_world_manifest_and_deletes_both_copies(tmp_path: P
assert ready["status"] == "ready"
assert ready["world_manifest"]["visual"]["preview_sog_url"].endswith("/preview.sog")
assert ready["world_manifest"]["collision"]["available"] is False
assert ready["world_manifest"]["transforms"]["world_from_visual"] == [
1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1,
]
assert ready["world_manifest"]["transforms"]["world_from_collision"] == [
1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,
]
assert provider.upload_calls == 1
assert provider.submit_calls == 1
assert provider.submitted_document is not None
assert provider.submitted_document["outputs"] == {
"preview_sog": True,
"streamed_sog": True,
"collision": True,
}
assert provider.submitted_document["collision_profile"] == {
"scene_type": "interior",
"seed_position": [0, 1, 0],
"capsule_height": 1.6,
"capsule_radius": 0.2,
"voxel_size": 0.05,
"mesh_shape": "smooth",
}
service.delete(project["project_id"])
assert provider.deleted == ["gsp-20260826000000-deadbeef"]