# WGLMakie slider issue

**URL:** https://discourse.julialang.org/t/wglmakie-slider-issue/85689
**Category:** General Usage
**Tags:** visualization
**Created:** [August 12, 2022, 10:46pm UTC](https://discourse.julialang.org/t/wglmakie-slider-issue/85689 "2022-08-12T22:46:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AlexisRenchon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexisrenchon/32/13328_2.png) [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)
#### Post date: [August 12, 2022, 10:46pm UTC](https://discourse.julialang.org/t/wglmakie-slider-issue/85689/1 "2022-08-12T22:46:52Z")

</div>

I have 2 scripts that can be reproduced here:

> **[www.cupoftea.earth/functions/FLUXNET/Globe at master ·...](https://github.com/CUPofTEAproject/www.cupoftea.earth/tree/master/functions/FLUXNET/Globe)**
>
> master/functions/FLUXNET/Globe

they are the same script, but one in GLMakie, one in WGLMakie

The GLMakie script works as intended, but the WGLMakie slider is not responsive. I don’t know why, because if I run the lines inside the `on` `do`, they work.

Thank you for your help!

---

<div class="post-metadata">

### Author: ![AlexisRenchon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexisrenchon/32/13328_2.png) [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)
#### Post date: [August 14, 2022, 8:31pm UTC](https://discourse.julialang.org/t/wglmakie-slider-issue/85689/4 "2022-08-14T20:31:40Z")

</div>

Update:

I wrote 2 additional MWE scripts in the repo linked above, with sliders in GLMakie and WGLMakie, in 2D Axis.

They both work fine.

I cleaned the 3D LScene script, to make it clearly similar to the MWE. The issue seems to be due to 3D issues in WGLMakie / JSServe that seem to be currently being worked on. I get the following error message:

An exception was thrown in JS: RangeError: offset is out of bounds  
Additional message: Error during running onjs callback  
Callback:  
([name, array, length]) =\> {  
// TODO, why are these called with the initial values!?  
if (length \> 0) {  
const new\_values = deserialize\_three(JSServe.deserialize\_js(array));  
const buffer = mesh.geometry.attributes[name];  
let buffers;  
let first\_buffer;  
let real\_length;  
let is\_instance = false;  
// First, we need to figure out if this is an instance / geometry buffer  
if (name in instance\_buffers) {  
buffers = instance\_buffers;  
first\_buffer = first\_instance\_buffer;  
real\_length = real\_instance\_length;  
is\_instance = true;  
} else {  
buffers = geometry\_buffers;  
first\_buffer = first\_geometry\_buffer;  
real\_length = real\_geometry\_length;  
}  
if (length \<= real\_length[0]) {  
// this is simple - we can just update the values  
buffer.set(new\_values);  
buffer.needsUpdate = true;  
if (is\_instance) {  
mesh.geometry.instanceCount = length;  
}  
} else {  
// resizing is a bit more complex  
// first we directly overwrite the array - this  
// won’t have any effect, but like this we can collect the  
// newly sized arrays untill all of them have the same length  
buffer.to\_update = new\_values;  
if (  
Object.values(buffers).every(  
(x) =\>  
x.to\_update &&
