Skip to content

Commit d961adc

Browse files
Merge pull request #582 from endurance21/deprecation
added deprecation handling for p5.Signal
2 parents 55be96b + 8855f0b commit d961adc

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,7 @@ p5.OnsetDetect = OnsetDetect;
140140

141141
import PolySynth from './polysynth';
142142
p5.PolySynth = PolySynth;
143+
144+
// Following are the deprecated classes
145+
import Signal from './deprecations/Signal';
146+
p5.Signal = Signal;

src/deprecations/Signal.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Signal {
2+
constructor() {
3+
console.warn('p5.Signal is deprecated , Use Tone.js Signal instead ');
4+
}
5+
}
6+
7+
export default Signal;

0 commit comments

Comments
 (0)