Allow for assigning attach items orientations

This commit is contained in:
2024-09-30 16:09:56 +01:00
parent fd8adcea92
commit d8d3a01f06
10 changed files with 143 additions and 69 deletions
+3 -1
View File
@@ -41,8 +41,9 @@ data ItemStructuralFunction
deriving (Eq, Ord, Show, Read)
type PartiallyComposedItem lt = (Item, ItemStructuralFunction, LinkTest lt)
type ComposedItem = (Item, ItemStructuralFunction)
data ItemAttachment = IAttach
data ItemLink = ILink
{ _iatType :: ComposeLinkType
, _iatOrient :: Item -> Item -> Maybe (Point3, Quaternion Float)
}
@@ -58,6 +59,7 @@ data LinkUpdate lt = LUpdate
, _luChildUpdate :: PartiallyComposedItem lt -> PartiallyComposedItem lt
}
makeLenses ''ItemLink
makeLenses ''LinkTest
makeLenses ''LinkUpdate
deriveJSON defaultOptions ''ComposeLinkType