You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.js to give all patterns some new addParameter function
PatternBase will also need access to the dat.gui instance which is created in LoadPatterns.js. This may be best to refactor. Maybe the gui instance should be created in index.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.
The text was updated successfully, but these errors were encountered:
In the original entwined you can add this line of code that will expose a parameter to the GUI:
That creates a slider you can change at runtime. And then you can get its value with:
It would be nice to do something similar here. It should be pretty easy using dat.gui. You would need to:
PatternBase.js
to give all patterns some newaddParameter
functionPatternBase
will 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:The
addParameter
function should just create a slider to start out with.getValue(paramName)
function that patterns can use.The text was updated successfully, but these errors were encountered: