Skip to content

Commit

Permalink
Replace 'Fresheyeball/sprite' with NeoSprite
Browse files Browse the repository at this point in the history
Removes what should be the final Elm 0.18 dependency.
Moving on to Elm 0.19 (#1) is now assumed to be possible.
  • Loading branch information
jordgubben committed Dec 7, 2018
1 parent 8eeca10 commit 6d1cd7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
27 changes: 11 additions & 16 deletions examples/FloatingIslandsTiles.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ Tile source:
-}

import Array
import Html exposing (Html)
import Html.Attributes exposing (style)
import Sprite
import NeoSprite exposing (Sprite, Sheet)
import Grid


Expand All @@ -27,12 +26,12 @@ main =


type alias Tile =
Sprite.Sprite {}
NeoSprite.Sprite


renderTile : a -> Tile -> Html msg
renderTile _ tile =
Html.span [ style <| Sprite.sprite tile ] []
NeoSprite.toHtml tile



Expand Down Expand Up @@ -152,18 +151,14 @@ turfEdgeBottomLeftRight =
-}
staticTile : ( Int, Int ) -> Tile
staticTile tileLoc =
{ baseTile
| frame = 0
, dope = Array.fromList [ tileLoc ]
}
NeoSprite.fromSheet sheet tileLoc


baseTile : Tile
baseTile =
{ sheet = "FloatingIslandsTiles.png"
, rows = 8
, columns = 23
, size = ( 368, 128 )
, frame = 0
, dope = Array.empty
sheet : Sheet
sheet =
{ imageUrl = "FloatingIslandsTiles.png"
, imageWidth = 368
, imageHeight = 128
, spriteWidth = 368 // 23
, spriteHeight = 128 // 8
}
1 change: 0 additions & 1 deletion examples/elm-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
],
"exposed-modules": [],
"dependencies": {
"Fresheyeball/sprite": "1.0.1 <= v < 2.0.0",
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/svg": "2.0.0 <= v < 3.0.0"
Expand Down

0 comments on commit 6d1cd7c

Please sign in to comment.