wavefront 0.7.0.3 → 0.7.1
raw patch · 3 files changed
+13/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- src/Codec/Wavefront/Token.hs +7/−4
- wavefront.cabal +1/−1
CHANGELOG.md view
@@ -1,3 +1,8 @@+### 0.7.1++- Allow missing group names.+- Spaced object and material names are now supported.+ #### 0.7.0.2 - Added support for `vector-0.12.0.0`.
src/Codec/Wavefront/Token.hs view
@@ -21,7 +21,7 @@ import Data.Attoparsec.Text as AP import Data.Char ( isSpace ) import Data.Maybe ( catMaybes )-import Data.Text ( Text, unpack )+import Data.Text ( Text, unpack, strip ) import qualified Data.Text as T ( empty ) import Numeric.Natural ( Natural ) import Prelude hiding ( lines )@@ -166,13 +166,13 @@ -- Groups ------------------------------------------------------------------------------------------ groups :: Parser [Text]-groups = skipSpace *> string "g " *> skipHSpace *> name `sepBy1` skipHSpace <* eol+groups = skipSpace *> string "g " *> skipHSpace *> name `sepBy` skipHSpace <* eol ---------------------------------------------------------------------------------------------------- -- Objects ----------------------------------------------------------------------------------------- object :: Parser Text-object = skipSpace *> string "o " *> skipHSpace *> name <* eol+object = skipSpace *> string "o " *> skipHSpace *> spacedName <* eol ---------------------------------------------------------------------------------------------------- -- Material libraries ------------------------------------------------------------------------------@@ -184,7 +184,7 @@ -- Using materials --------------------------------------------------------------------------------- usemtl :: Parser Text-usemtl = skipSpace *> string "usemtl " *> skipHSpace *> name <* skipHSpace <* eol+usemtl = skipSpace *> string "usemtl " *> skipHSpace *> spacedName <* eol ---------------------------------------------------------------------------------------------------- -- Smoothing groups --------------------------------------------------------------------------------@@ -216,6 +216,9 @@ -- Parse a name (any character but space). name :: Parser Text name = takeWhile1 $ not . isSpace++spacedName :: Parser Text+spacedName = strip <$> AP.takeWhile (flip notElem ("\n\r" :: String)) skipHSpace :: Parser () skipHSpace = () <$ AP.takeWhile isHorizontalSpace
wavefront.cabal view
@@ -1,5 +1,5 @@ name: wavefront-version: 0.7.0.3+version: 0.7.1 synopsis: Wavefront OBJ loader description: A Wavefront OBJ loader. Currently supports polygonal information. More could be added if needed (like curves and surface) if people contribute. Feel free