diff --git a/demo.ipynb b/demo.ipynb index 80f506a..083c931 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -17,6 +17,7 @@ "source": [ "# Activate the MeshCat package, and import some other \n", "# useful functions\n", + "using Compat\n", "using MeshCat\n", "using CoordinateTransformations\n", "import GeometryTypes: HyperRectangle, Vec, Point, HomogenousMesh, SignedDistanceField\n", @@ -335,7 +336,11 @@ "# just simple boxes. Let's load a 3D mesh and visualize it:\n", "using MeshIO\n", "using FileIO\n", - "cat_mesh = load(joinpath(Pkg.dir(\"GeometryTypes\"), \"test\", \"data\", \"cat.obj\"))\n", + "if VERSION < v\"0.7-\"\n", + " cat_mesh = load(joinpath(Pkg.dir(\"GeometryTypes\"), \"test\", \"data\", \"cat.obj\"))\n", + "else\n", + " cat_mesh = load(joinpath(dirname(pathof(GeometryTypes)), \"..\", \"test\", \"data\", \"cat.obj\"))\n", + "end\n", "setobject!(vis, cat_mesh)\n", "settransform!(vis, LinearMap(AngleAxis(pi/2, 1, 0, 0)))" ] @@ -399,7 +404,7 @@ "outputs": [], "source": [ "delete!(vis)\n", - "pointcloud = PointCloud([[x, 0 + 0.01 * randn(), 0.5] for x in linspace(-1, 1, 1000)])\n", + "pointcloud = PointCloud([[x, 0 + 0.01 * randn(), 0.5] for x in Compat.range(-1, stop=1, length=1000)])\n", "setobject!(vis[:pointcloud], pointcloud)" ] }, @@ -472,7 +477,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 0.6.3", + "display_name": "Julia 0.6.4", "language": "julia", "name": "julia-0.6" }, @@ -480,7 +485,7 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "0.6.3" + "version": "0.6.4" } }, "nbformat": 4, diff --git a/src/MeshCat.jl b/src/MeshCat.jl index c826f6a..5c16500 100644 --- a/src/MeshCat.jl +++ b/src/MeshCat.jl @@ -7,7 +7,7 @@ import Mux import AssetRegistry using GeometryTypes, CoordinateTransformations using Rotations: rotation_between, Rotation -using Colors: Color, Colorant, RGB, RGBA, alpha +using Colors: Color, Colorant, RGB, RGBA, alpha, hex using StaticArrays: StaticVector, SVector, SDiagonal using GeometryTypes: raw using Parameters: @with_kw