Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Makie 0.21 #37

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"

[extensions]
MakieVizExt = "Makie"
MakieExt = "Makie"

[compat]
BlockArrays = "0.16"
Colors = "0.12"
GeometryBasics = "0.4.2"
InfiniteArrays = "0.12, 0.13"
LazySets = "1.54, 2"
Makie = "0.17, 0.18, 0.19, 0.20"
Makie = "0.17, 0.18, 0.19, 0.20, 0.21"
Polyhedra = "0.7"
julia = "1.7"

Expand Down
7 changes: 5 additions & 2 deletions ext/MakieVizExt.jl → ext/MakieExt.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
module MakieVizExt
module MakieExt
using TrajectoryGamesBase: TrajectoryGamesBase
using Makie: Makie, @recipe
using Colors: @colorant_str
using GeometryBasics: GeometryBasics

Makie.plottype(::TrajectoryGamesBase.PolygonEnvironment) = Makie.Poly

function Makie.convert_arguments(::Type{<:Makie.Poly}, environment)
function Makie.convert_arguments(
::Type{<:Makie.Poly},
environment::TrajectoryGamesBase.PolygonEnvironment,
)
geometry = GeometryBasics.Polygon(GeometryBasics.Point{2}.(environment.set.vertices))
(geometry,)
end
Expand Down
2 changes: 1 addition & 1 deletion src/TrajectoryGamesBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export to_blockvector,
unflatten_trajectory

if !isdefined(Base, :get_extension)
include("../ext/MakieVizExt.jl")
include("../ext/MakieExt.jl")
end

end