Skip to content

Commit c211789

Browse files
committed
[Chores] formatted files
1 parent db3eb84 commit c211789

6 files changed

Lines changed: 11 additions & 13 deletions

File tree

Sources/DemoGame/DemoHUD.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@
413413
}
414414
.buttonStyle(.bordered)
415415
.disabled(!state.showStats)
416-
417416
}
418417
.padding(8)
419418
.background(.regularMaterial, in: RoundedRectangle(cornerRadius: Constants.panelCornerRadius))

Sources/DemoGame/DemoState.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,5 @@
251251
onSSAOChanged?(false, ssaoRadius, ssaoBias, ssaoIntensity)
252252
}
253253
}
254-
255254
}
256255
#endif

Sources/UntoldEngine/Renderer/RenderPasses.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ public enum RenderPasses {
350350

351351
let cameraPosition: simd_float3
352352
if let cam = CameraSystem.shared.activeCamera,
353-
let camComp = scene.get(component: CameraComponent.self, for: cam) {
353+
let camComp = scene.get(component: CameraComponent.self, for: cam)
354+
{
354355
cameraPosition = SceneRootTransform.shared.effectiveCameraPosition(camComp.localPosition)
355356
} else {
356357
cameraPosition = .zero

Tests/UntoldEngineRenderTests/StreamLodBatchTests.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ final class StreamLodBatchLODAwareStreamingTests: BaseRenderSetup {
555555
}
556556

557557
// MARK: - Gate-external buffer precomputation tests
558+
558559
// Validates the pattern used in loadMeshAsync: Metal buffer copies are built
559560
// BEFORE the world mutation gate, then only pointer assignments happen inside.
560561

@@ -585,7 +586,7 @@ final class StreamLodBatchLODAwareStreamingTests: BaseRenderSetup {
585586
"Entity should have non-empty mesh array after pre-gate assignment")
586587
}
587588

588-
func testPrecomputedMeshesAreIndependentFromSource() throws {
589+
func testPrecomputedMeshesAreIndependentFromSource() {
589590
// Verifies that pre-building outside the gate doesn't create aliasing —
590591
// mutations to the source should not affect the prebuilt copy.
591592
let sourceMeshes = BasicPrimitives.createSphere()
@@ -741,7 +742,7 @@ final class StreamLodBatchCoalescingTests: XCTestCase {
741742
for newLOD in 1 ... 3 {
742743
SystemEventBus.shared.queueLODChange(
743744
EntityLODChangedEvent(entityId: 42, previousLODIndex: newLOD - 1,
744-
newLODIndex: newLOD, meshAssetID: "mesh_LOD\(newLOD)")
745+
newLODIndex: newLOD, meshAssetID: "mesh_LOD\(newLOD)")
745746
)
746747
}
747748
SystemEventBus.shared.flushEvents()
@@ -760,8 +761,8 @@ final class StreamLodBatchCoalescingTests: XCTestCase {
760761
XCTAssertNoThrow(
761762
SystemEventBus.shared.queueLODChange(
762763
EntityLODChangedEvent(entityId: invalidEntityId,
763-
previousLODIndex: 0, newLODIndex: 1,
764-
meshAssetID: "ghost_LOD1")
764+
previousLODIndex: 0, newLODIndex: 1,
765+
meshAssetID: "ghost_LOD1")
765766
)
766767
)
767768
XCTAssertNoThrow(SystemEventBus.shared.flushEvents())
@@ -793,7 +794,7 @@ final class StreamLodBatchCoalescingTests: XCTestCase {
793794
for id in EntityID(1) ... EntityID(5) {
794795
SystemEventBus.shared.queueLODChange(
795796
EntityLODChangedEvent(entityId: id, previousLODIndex: 0,
796-
newLODIndex: 1, meshAssetID: "mesh\(id)_LOD1")
797+
newLODIndex: 1, meshAssetID: "mesh\(id)_LOD1")
797798
)
798799
}
799800
SystemEventBus.shared.flushEvents()

Tests/UntoldEngineTests/GatePrebuildTests.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import XCTest
1919

2020
@MainActor
2121
final class GatePrebuildTests: XCTestCase {
22-
2322
// MARK: - prebuildNodeMeshes edge cases
2423

2524
func testPrebuildEmptyNodesReturnsEmptyDict() {
@@ -71,15 +70,15 @@ final class GatePrebuildTests: XCTestCase {
7170
// The nil case falls back to makeMeshes() — this test verifies the lookup
7271
// semantics are correct.
7372
let emptyMap: [UInt32: [Mesh]] = [:]
74-
let lookup = emptyMap[42] // any nodeID not in the map
73+
let lookup = emptyMap[42] // any nodeID not in the map
7574
XCTAssertNil(lookup,
7675
"Missing nodeID in prebuilt map must return nil to trigger makeMeshes() fallback")
7776
}
7877

7978
func testPrebuiltMapLookupWithPresentKeyReturnsMeshes() {
8079
// Simulate a pre-built map entry — verifies the lookup returns the stored
8180
// value when the nodeID is present (i.e., the gate-external path is taken).
82-
let fakeMeshes: [Mesh] = [] // empty but non-nil — signals "pre-built, skip makeMeshes"
81+
let fakeMeshes: [Mesh] = [] // empty but non-nil — signals "pre-built, skip makeMeshes"
8382
let map: [UInt32: [Mesh]] = [99: fakeMeshes]
8483
let lookup = map[99]
8584
XCTAssertNotNil(lookup,

Tests/UntoldEngineTests/ShadowDistanceCullingTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import XCTest
1616
/// All tests exercise shadowEntityBeyondMaxDistance() directly — no Metal or scene state required.
1717
@MainActor
1818
final class ShadowDistanceCullingTests: XCTestCase {
19-
2019
// MARK: - Basic inclusion / exclusion
2120

2221
func testEntityWithinMaxDistanceIsIncluded() {
@@ -76,7 +75,7 @@ final class ShadowDistanceCullingTests: XCTestCase {
7675
func testLargeEntityStraddlingCameraIsAlwaysIncluded() {
7776
// Camera is inside the AABB → closest point is the camera itself → distance = 0
7877
let worldMin = simd_float3(-10, -10, -10)
79-
let worldMax = simd_float3(100, 10, 10) // center ~45m away
78+
let worldMax = simd_float3(100, 10, 10) // center ~45m away
8079
XCTAssertFalse(shadowEntityBeyondMaxDistance(
8180
worldMin: worldMin, worldMax: worldMax,
8281
cameraPosition: .zero, maxDistance: 40.0

0 commit comments

Comments
 (0)