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

Use Makie.jl instead of AbstractPlotting.jl #55

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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CUDA = "1, 2.0, 3.0"
Distributions = "0.23, 0.24, 0.25"
FileIO = "1.4"
Flux = "0.10, 0.11, 0.12"
GeometryBasics = "0.2, 0.3, 0.4"
GeometryBasics = "0.4"
MeshIO = "0.4"
Meshing = "0.5"
NearestNeighbors = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/Flux3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ using .Dataset
export CustomDataset, ModelNet10, ModelNet40

# visualization
@init @require AbstractPlotting = "537997a7-5e4e-5d89-9595-2241ea00577e" include(
"visualize.jl",
@init @require Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" include(
"visualize.jl"
)

# models
Expand Down
8 changes: 4 additions & 4 deletions src/visualize.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AbstractPlotting
import Makie
import GeometryBasics
export visualize

Expand All @@ -22,7 +22,7 @@ function visualize(p::PointCloud, index::Number = 1; kwargs...)
get!(kwargs, :color, :lightgreen)
get!(kwargs, :markersize, npoints(p) / 5000)

AbstractPlotting.meshscatter(points[1, :], points[2, :], points[3, :]; kwargs...)
Makie.meshscatter(points[1, :], points[2, :], points[3, :]; kwargs...)
end

"""
Expand All @@ -38,7 +38,7 @@ function visualize(m::GeometryBasics.Mesh; kwargs...) where {T,R}
kwargs = convert(Dict{Symbol,Any}, kwargs)
get!(kwargs, :color, :orange)

AbstractPlotting.mesh(GeometryBasics.normal_mesh(m); kwargs...)
Makie.mesh(GeometryBasics.normal_mesh(m); kwargs...)
end

visualize(m::TriMesh, index::Int = 1; kwargs...) = visualize(GBMesh(m, index); kwargs...)
Expand Down Expand Up @@ -68,7 +68,7 @@ function visualize(
v, f = method(cpu(v[index]), Float32(thresh), algo)

m = GBMesh(v, f)
AbstractPlotting.mesh(GeometryBasics.normal_mesh(m); kwargs...)
Makie.mesh(GeometryBasics.normal_mesh(m); kwargs...)
end

visualize(v::Dataset.AbstractDataPoint; kwargs...) = visualize(v.data; kwargs...)
Expand Down