Skip to content

Commit

Permalink
remove some long-deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Feb 11, 2020
1 parent d5d75bf commit e5ed4d2
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 38 deletions.
1 change: 0 additions & 1 deletion src/MeshCat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export AbstractVisualizer,

export Object,
HyperEllipsoid,
HyperCylinder,
PointCloud,
Cone,
Triad,
Expand Down
17 changes: 0 additions & 17 deletions src/atframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,3 @@ function atframe(f, animation::Animation, frame::Integer)
Cassette.overdub(AnimationCtx(metadata=(animation, frame)), f)
return animation
end

function atframe(f::Function, anim::Animation, path::Path, frame::Integer)
error("""
atframe(f::Function, anim::Animation, path::Path, frame::Integer) is no longer supported.
Please see the updated animation example notebook.
""")
end

function atframe(f::Function, anim::Animation, vis::Visualizer, frame::Integer)
Base.depwarn("""
atframe(f::Function, anim::Animation, vis::Visualizer, frame::Integer) is deprecated.
Please use atframe(g, anim, frame) instead, where g is similar to f but takes
no arguments and should call methods on vis.
See also the updated animation example notebook.
""", :atframe)
atframe(() -> f(vis), anim, frame)
end
2 changes: 0 additions & 2 deletions src/geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ end
GeometryTypes.origin(geometry::HyperEllipsoid{N, T}) where {N, T} = geometry.center
radii(geometry::HyperEllipsoid{N, T}) where {N, T} = geometry.radii

@deprecate HyperCylinder(length::T, radius) where {T} Cylinder{3, T}(Point(0., 0., 0.), Point(0, 0, length), radius)

struct PointCloud{T, Point <: StaticVector{3, T}, C <: Colorant} <: AbstractGeometry{3, T}
position::Vector{Point}
color::Vector{C}
Expand Down
19 changes: 1 addition & 18 deletions test/visualizer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,24 +230,7 @@ end
settransform!(arrow_vis_2, Point(0, 1, 0), Point(1, 1, 1))
end

@testset "Animation (old style)" begin
anim = Animation()
atframe(anim, vis[:shapes], 0) do frame_vis
settransform!(frame_vis[:box], Translation(0., 0, 0))
end
atframe(anim, vis[:shapes], 30) do frame_vis
settransform!(frame_vis[:box], Translation(2., 0, 0) LinearMap(RotZ/2)))
end
atframe(anim, vis, 0) do framevis
setprop!(framevis["/Cameras/default/rotated/<object>"], "zoom", 1)
end
atframe(anim, vis, 30) do framevis
setprop!(framevis["/Cameras/default/rotated/<object>"], "zoom", 0.5)
end
setanimation!(vis, anim)
end

@testset "Animation (new style)" begin
@testset "Animation" begin
anim1 = Animation()
atframe(anim1, 0) do
settransform!(vis[:shapes][:box], Translation(0., 0, 0))
Expand Down

0 comments on commit e5ed4d2

Please sign in to comment.