File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default class SoundWaveDisplay extends CanvasDisplay {
1919 height : DEFAULT_CANVAS_HEIGHT / 2 ,
2020 lineWidth : 1.0 ,
2121 wavelength : 0 ,
22+ smoothingTimeConstant : 0 ,
2223 fill : false ,
2324 taper : false ,
2425 x : 0 ,
@@ -46,6 +47,14 @@ export default class SoundWaveDisplay extends CanvasDisplay {
4647 step : 0.01 ,
4748 withRange : true ,
4849 } ,
50+ smoothingTimeConstant : {
51+ label : 'Smoothing' ,
52+ type : 'number' ,
53+ min : 0 ,
54+ max : 0.99 ,
55+ step : 0.01 ,
56+ withRange : true ,
57+ } ,
4958 fill : {
5059 label : 'Fill' ,
5160 type : 'toggle' ,
@@ -114,6 +123,7 @@ export default class SoundWaveDisplay extends CanvasDisplay {
114123
115124 if ( changed ) {
116125 this . wave . update ( properties ) ;
126+ this . parser . update ( properties ) ;
117127 }
118128
119129 return changed ;
@@ -132,7 +142,7 @@ export default class SoundWaveDisplay extends CanvasDisplay {
132142 wavelength > 0 ? ~ ~ ( width / ( wavelength * WAVELENGTH_MAX * width ) ) : width ,
133143 ) ;
134144
135- wave . render ( points , wavelength > 0.25 ) ;
145+ wave . render ( points , wavelength > 0.02 ) ;
136146
137147 const origin = {
138148 x : width / 2 ,
You can’t perform that action at this time.
0 commit comments