diff --git a/Project.toml b/Project.toml index adae2e217b5..637d10a569f 100644 --- a/Project.toml +++ b/Project.toml @@ -24,7 +24,7 @@ FileIO = "1.1" GeometryBasics = "0.2.3" Hyperscript = "0.0.3" ImageTransformations = "0.7, 0.8" -JSServe = "0.6" +JSServe = "0.6.6" MakieGallery = "0.2.1" MeshIO = "0.4" Observables = "0.3" diff --git a/src/WGLMakie.jl b/src/WGLMakie.jl index 095e345831b..6c8a9e714d2 100644 --- a/src/WGLMakie.jl +++ b/src/WGLMakie.jl @@ -170,10 +170,11 @@ function add_scene!(three, scene::Scene) } function render_all(){ render_scene($(js_scene)); - // Schedule the next frame. - requestAnimationFrame(render_all); } - requestAnimationFrame(render_all); + // render first frame + render_all(); + // Render only when something updates! + on_update_observables_callbacks.push(render_all); """) end