SimonDanisch / Bonito.jl

Serving JS to the browser
MIT License
204 stars 29 forks source link

WGLMakie has no output in `examples/wglmakie.jl` #204

Closed kongdd closed 8 months ago

kongdd commented 8 months ago
using Bonito, WGLMakie
using GeometryBasics
using FileIO
using Bonito: @js_str, onjs, App, Slider
using Bonito.DOM
Bonito.browser_display()

set_theme!(size=(1200, 800))

hbox(args...) = DOM.div(args...)
vbox(args...) = DOM.div(args...)

app = App() do
  return hbox(
    vbox(
      scatter(1:4, color=1:4),
      scatter(1:4, color=rand(RGBAf, 4)),
      scatter(1:4, color=rand(RGBf, 4)),
      scatter(1:4, color=:red),
      scatter(1:4)
    ),
    vbox(
      scatter(1:4, marker='☼'),
      scatter(1:4, marker=['☼', '◒', '◑', '◐']),
      scatter(1:4, marker=rand(RGBf, 10, 10), markersize=20),
      scatter(1:4, markersize=20),
      scatter(1:4, markersize=20, markerspace=:pixel),
      scatter(1:4, markersize=LinRange(20, 60, 4), markerspace=:pixel),
      scatter(1:4, marker='▲', markersize=0.3, markerspace=:data, rotations=LinRange(0, pi, 4)),
    )
  )
end

image

SimonDanisch commented 8 months ago

That likely doesn't work, since the rename to bonito is pretty fresh, and not yet tagged: https://github.com/JuliaRegistries/General/pull/97247 There's no way around having a period where the repository is already renamed but the package isn't tagged yet and therefore e.g. WGLMakie can't be updated yet.

kongdd commented 8 months ago

After upgrade WGLMakie to v0.9.3 and Makie to v0.20.3, there still no any output in the above example.