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

Setting a custom line width is no longer working #246

Open
ferrolho opened this issue May 23, 2023 · 2 comments
Open

Setting a custom line width is no longer working #246

ferrolho opened this issue May 23, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ferrolho
Copy link
Collaborator

ferrolho commented May 23, 2023

While sanitising the list of open issues, I noticed that setting a custom line width is no longer working.

Here is a simple snippet for displaying a line through a set of random points:

using Colors
using MeshCat

vis = Visualizer()
open(vis)

points = [rand(3) for _ = 1:100]
pointcloud = PointCloud(points)

material = LineBasicMaterial(color=colorant"yellow", linewidth=8)
setobject!(vis, Object(pointcloud, material, "Line"))

which results in the following:

image

Notice how the width of the rendered line is 1 despite setting linewidth=8.

julia> versioninfo()
Julia Version 1.9.0
Commit 8e630552924 (2023-05-07 11:25 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores
@ferrolho ferrolho added the bug Something isn't working label May 23, 2023
@ferrolho
Copy link
Collaborator Author

Hmm, apparently this is not going to be fixed for GL — see https://bugs.chromium.org/p/chromium/issues/detail?id=675308.

But there is an example with another way of achieving line thickness: https://threejs.org/examples/#webgl_lines_fat

@ferrolho
Copy link
Collaborator Author

I've included and exported Line2, LineMaterial, and LineGeometry in ferrolho/meshcat@8fdb46b, but I am not sure if that is the proper way to do it. And to be honest, I have no idea what to do next on the MeshCat.jl end... For example, I suppose we need to define a Julia struct for LineGeometry in src/geometry.jl, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant