Skip to content

Commit 5e75abf

Browse files
authored
Merge pull request #709 from Abhijay007/Abhijay007-enhancement/oop
(Chore) : Fixed merge conficts Envelope uses ES6 class
2 parents cc73d1d + 452a529 commit 5e75abf

File tree

3 files changed

+807
-790
lines changed

3 files changed

+807
-790
lines changed

src/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ p5.Distortion = Distortion;
129129
import Gain from './gain';
130130
p5.Gain = Gain;
131131

132+
import Envelope from './envelope';
133+
p5.Envelope = Envelope;
134+
135+
import Env from './deprecations/Env';
136+
p5.Env = Env;
137+
132138
import AudioVoice from './audioVoice';
133139
p5.AudioVoice = AudioVoice;
134140

src/deprecations/Env.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Envelope from '../envelope';
2+
3+
class Env extends Envelope {
4+
constructor(t1, l1, t2, l2, t3, l3) {
5+
console.warn(
6+
'WARNING: p5.Env is now deprecated and may be removed in future versions. ' +
7+
'Please use the new p5.Envelope instead.'
8+
);
9+
super(t1, l1, t2, l2, t3, l3);
10+
}
11+
}
12+
13+
export default Env;

0 commit comments

Comments
 (0)