diff --git a/Chess/Common/Manipulation/SceneManipulator.swift b/Chess/Common/Manipulation/SceneManipulator.swift index 689a431..4544b42 100644 --- a/Chess/Common/Manipulation/SceneManipulator.swift +++ b/Chess/Common/Manipulation/SceneManipulator.swift @@ -20,7 +20,7 @@ class SceneManipulator { guard let node = findPiece(scene: scene, piece: piece) else { fatalError("Could not find piece") } - let current = node.transform.value.translation + let current = node.transform.translation var translation = PNAnimatedFloat3.defaultTranslation translation = PNKeyframeAnimation(keyFrames: [simd_float3(current.x, 0, current.z), simd_float3(current.x, 0.3, current.z)], @@ -35,7 +35,7 @@ class SceneManipulator { guard let node = findPiece(scene: scene, piece: piece) else { fatalError("Could not find piece") } - let current = node.transform.value.translation + let current = node.transform.translation var translation = PNAnimatedFloat3.defaultTranslation translation = PNKeyframeAnimation(keyFrames: [simd_float3(current.x, current.y, current.z), simd_float3(current.x, 0, current.z)], @@ -62,7 +62,7 @@ class SceneManipulator { private func move(piece: PNAnimatedNode, from: Field?, to: Field?, delay: PNTimeInterval) { assert(from != nil || to != nil, "Either 'from' or 'to' must be non-nil") var translation = PNAnimatedFloat3.defaultTranslation - let currentTranslation = piece.transform.value.translation + let currentTranslation = piece.transform.translation if let from = from, let to = to { translation = PNKeyframeAnimation(keyFrames: [simd_float3(Float(from.row), currentTranslation.y, Float(from.column)), simd_float3(Float(from.row), 1.5, Float(from.column)), diff --git a/Chess/macOS/Interaction/MouseInteractionHandler.swift b/Chess/macOS/Interaction/MouseInteractionHandler.swift index 11ca3f9..f3a2c09 100644 --- a/Chess/macOS/Interaction/MouseInteractionHandler.swift +++ b/Chess/macOS/Interaction/MouseInteractionHandler.swift @@ -35,9 +35,9 @@ class MouseInteractionHandler { } return $0.parent?.parent?.parent?.parent }).sorted(by: { first, second in - guard let firstBB = first.data.worldBoundingBox.value, - let secondBB = second.data.worldBoundingBox.value, - let cameraBB = camera.worldBoundingBox.value else { + guard let firstBB = first.data.worldBoundingBox, + let secondBB = second.data.worldBoundingBox, + let cameraBB = camera.worldBoundingBox else { return false } let cameraCenter = bInteractor.center(bbInteractor.bound(cameraBB)) diff --git a/Library b/Library index a685045..5ad6c7d 160000 --- a/Library +++ b/Library @@ -1 +1 @@ -Subproject commit a685045bff16754fdc169eb4b359402fa5807274 +Subproject commit 5ad6c7d3d00a0891864c579eed0789d7280534fd