Skip to content

.add( controller ) #4

Description

@mrdoob

I was wondering if it would be possible to allow this approach:

gui.add( new ControllerVector2D( vector ) );

Maybe with a patch like this?

this.add = function() {
var object = arguments[ 0 ];
if ( object instanceof Controller ) {
controllers.add( object );
return;
}
// rest of the code that figures if object is a number, string, etc
}

This would allow people to create their own custom controllers without having to mess up with the GUI internal code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions