Skip to content

Commit

Permalink
Merge pull request #143 from rdeits/cleanup-animations
Browse files Browse the repository at this point in the history
Remove some deprecated functions
  • Loading branch information
rdeits authored Feb 12, 2020
2 parents 0629bd9 + e5ed4d2 commit 44e9240
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

2 comments on commit 44e9240

@rdeits
Copy link
Owner Author

@rdeits rdeits commented on 44e9240 Feb 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

  • Removes dependency on WebIO
    • MeshCat is now built directly on Mux.jl, HTTP.jl, and WebSockets.jl, rather than using WebIO for its communication layer. This should improve performance and stability.
    • Compatibility with other WebIO tools is maintained via Requires.jl
  • Adds support for Jupyterlab, ElectronDisplay, and VSCode, in addition to existing Jupyter, Juno, and Blink support.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/9673

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.0 -m "<description of version>" 44e9240519770b5724124369b1fab515e9b594b0
git push origin v0.10.0

Please sign in to comment.