Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dat.GUI don't show options with function variables #340

Open
@anzakhar

Description

I'm trying to create an options menu to select the value of a function variable with dat.GUI.

In the 0.7.8 version of dat.GUI this code works - menu items after the 'func' label are displayed enter image description here

but in the newest version (0.7.9) it does not work - menu items after the 'func' label are not displayed enter image description here

Why is that?

function func1() {
 alert('function1');
}
function func2() {
 alert('function2');
}
function init() {
 // setup the control gui
 const controls = new function () {
 this.func = func1;
 };
 const gui = new dat.GUI();
 gui.add(controls, 'func', {
 function1: func1, 
 function2: func2
 })
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /