[SOLVED] SliderInput not working correctly

UserInterface.prototype.addAlgorithmSettings = function () {
    const { Panel, SliderInput } = pcui;

    const panel = new Panel({
        flex: true,
        collapsible: true,
        headerText: 'Algorithm Settings'
    });

    const minDistInput = new SliderInput();

    const maxDistInput = new SliderInput();

    const branchLengthInput = new SliderInput();

    panel.content.dom.appendChild(minDistInput.dom);
    panel.content.dom.appendChild(maxDistInput.dom);
    panel.content.dom.appendChild(branchLengthInput.dom);

    this.panel.content.dom.appendChild(panel.dom);
};

I use this code to add SliderInputs to Scene but they are not working correctly It snaps to 0 and 1

I use this to make bundle and now its working

you likely need to set the precision:

1 Like

Default precision on a SliderInput is 2 decimal places. Check out a ‘default’ SliderInput here: