-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In the original entwined you can add this line of code that will expose a parameter to the GUI:
final BasicParameter speedParam = new BasicParameter("Speed", defaultValue, min, max);
That creates a slider you can change at runtime. And then you can get its value with:
speedParam.getValue()
It would be nice to do something similar here. It should be pretty easy using dat.gui. You would need to:
- Update
PatternBase.jsto give all patterns some newaddParameterfunction PatternBasewill also need access to the dat.gui instance which is created inLoadPatterns.js. This may be best to refactor. Maybe the gui instance should be created inindex.js, and then passed to the patterns in this line:
/// You would change this to (cubes, model, gui)
patternInstance = new patternModule.default(cubes, model);
The addParameter function should just create a slider to start out with.
- There should also be a
getValue(paramName)function that patterns can use.
Metadata
Metadata
Assignees
Labels
No labels