Curve attribute range


For curve attributes in scripts, is it possible to set the range of the y-axis?

By default the y-axis ranges from -5 to 5, but can be expanded or zoomed in as much as needed, and there is no limit to what values a point can take. However, is it possible to make it behave similarly to the opacity input of the default particle system, where it has a fixed range from 0 to 1?

Looks like you can have min/max properties on the attributes

var TestCurve = pc.createScript('testCurve');
TestCurve.attributes.add('c', {type: 'curve', min: 0, max: 1});
TestCurve.attributes.add('cs', {type: 'curve', curves: ['X', 'Y', 'Z'], min: -1, max: 1});
1 Like

Sweet! thx!!