From 75898a874971a1f3e0de0fff8038383e033bcba2 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Thu, 9 May 2024 22:07:12 -0400 Subject: [PATCH] fix(lib): fourmolu --mode inplace src --- src/Text/GLTF/Loader/Internal/Adapter.hs | 9 +++++---- src/Text/GLTF/Loader/Internal/BufferAccessor.hs | 9 ++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Text/GLTF/Loader/Internal/Adapter.hs b/src/Text/GLTF/Loader/Internal/Adapter.hs index 46aa895..75df8f2 100644 --- a/src/Text/GLTF/Loader/Internal/Adapter.hs +++ b/src/Text/GLTF/Loader/Internal/Adapter.hs @@ -33,8 +33,8 @@ import Text.GLTF.Loader.Internal.BufferAccessor import Text.GLTF.Loader.Internal.MonadAdapter import qualified Codec.GlTF as GlTF -import qualified Codec.GlTF.Asset as Asset import qualified Codec.GlTF.Animation as Animation +import qualified Codec.GlTF.Asset as Asset import qualified Codec.GlTF.Image as Image import qualified Codec.GlTF.Material as Material import qualified Codec.GlTF.Mesh as Mesh @@ -126,9 +126,9 @@ adaptAnimationChannel adaptAnimationChannel samplers Animation.AnimationChannel{..} = do gltf <- getGltf buffers <- getBuffers - let Animation.AnimationSampler{ input, interpolation, output } = + let Animation.AnimationSampler{input, interpolation, output} = samplers ! Animation.unAnimationSamplerIx sampler - Animation.AnimationChannelTarget{ node, path } = target + Animation.AnimationChannelTarget{node, path} = target outputs = case path of Animation.ROTATION -> Rotation $ animationSamplerRotationOutputs gltf buffers output Animation.SCALE -> Scale $ animationSamplerScaleOutputs gltf buffers output @@ -143,7 +143,8 @@ adaptAnimationChannel samplers Animation.AnimationChannel{..} = do channelSamplerOutputs = outputs } -adaptInterpolation :: Animation.AnimationSamplerInterpolation -> ChannelSamplerInterpolation +adaptInterpolation + :: Animation.AnimationSamplerInterpolation -> ChannelSamplerInterpolation adaptInterpolation Animation.CUBICSPLINE = CubicSpline adaptInterpolation Animation.LINEAR = Linear adaptInterpolation Animation.STEP = Step diff --git a/src/Text/GLTF/Loader/Internal/BufferAccessor.hs b/src/Text/GLTF/Loader/Internal/BufferAccessor.hs index 12687e1..2ff1cb9 100644 --- a/src/Text/GLTF/Loader/Internal/BufferAccessor.hs +++ b/src/Text/GLTF/Loader/Internal/BufferAccessor.hs @@ -96,7 +96,8 @@ loadImages GlTF{images = images} basePath = do animationSamplerInputs :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector Float animationSamplerInputs = readBufferWithGet (getScalar getFloat) -animationSamplerRotationOutputs :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector (Quaternion Float) +animationSamplerRotationOutputs + :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector (Quaternion Float) animationSamplerRotationOutputs gltf buffers' accessorId = fromMaybe (error "Invalid animation sampler output component type.") $ do buffer@BufferAccessor{componentType = componentType} <- @@ -106,10 +107,12 @@ animationSamplerRotationOutputs gltf buffers' accessorId = FLOAT -> Just . readFromBuffer (Proxy @(Quaternion Float)) (getQuaternion getFloat) $ buffer _ -> Nothing -animationSamplerScaleOutputs :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector (V3 Float) +animationSamplerScaleOutputs + :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector (V3 Float) animationSamplerScaleOutputs = readBufferWithGet (getVec3 getFloat) -animationSamplerTranslationOutputs :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector (V3 Float) +animationSamplerTranslationOutputs + :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector (V3 Float) animationSamplerTranslationOutputs = readBufferWithGet (getVec3 getFloat) animationSamplerWeightsOutputs :: GlTF -> Vector GltfBuffer -> AccessorIx -> Vector Float