Skip to content

Commit 7b24c41

Browse files
authored
replacement es5 functions to es6 classes feat p5.Oscillator (#533)
* replacement es5 functions to es6 classes feat p5.Oscillator * corrected SigChain def from class to function and removed unwanted consoles
1 parent a683eb1 commit 7b24c41

File tree

2 files changed

+462
-456
lines changed

2 files changed

+462
-456
lines changed

src/app.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ import FFT from './fft';
2828
p5.FFT = FFT;
2929

3030
import './signal';
31-
import './oscillator';
31+
32+
import Oscillator, { SinOsc, TriOsc, SawOsc, SqrOsc } from './oscillator';
33+
p5.Oscillator = Oscillator;
34+
p5.SinOsc = SinOsc;
35+
p5.TriOsc = TriOsc;
36+
p5.SawOsc = SawOsc;
37+
p5.SqrOsc = SqrOsc;
38+
3239
import './envelope';
3340

3441

@@ -95,8 +102,6 @@ import peakDetect from './peakDetect';
95102
p5.peakDetect = peakDetect;
96103

97104

98-
99-
100105
import SoundRecorder from './soundRecorder';
101106
p5.SoundRecorder = SoundRecorder;
102107

0 commit comments

Comments
 (0)