Skip to content

Commit a6d4dbb

Browse files
committed
cleanup
1 parent e9bf46e commit a6d4dbb

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

core/src/TeaCup/Animation.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,37 +41,26 @@ function tick() {
4141
}
4242
}
4343

44-
let rafSubId = 0;
45-
4644
class RafSub<M> extends Sub<M> {
4745
readonly mapper: (t: number) => M;
4846

49-
private readonly uuid: string;
50-
5147
constructor(mapper: (t: number) => M) {
5248
super();
5349
this.mapper = mapper;
54-
this.uuid = "rafsub-" + rafSubId;
55-
rafSubId++;
5650
}
5751

5852
protected onInit() {
59-
console.log("RafSub", this.uuid ,"onInit()");
6053
super.onInit();
6154
subs.push(this);
62-
console.log("RafSub", this.uuid ,"onInit()", subs.length);
6355
tick();
6456
}
6557

6658
protected onRelease() {
67-
console.log("RafSub", this.uuid ,"onRelease()");
6859
super.onRelease();
6960
subs = subs.filter((s) => s !== this);
70-
console.log("RafSub", this.uuid ,"onRelease()", subs.length);
7161
}
7262

7363
trigger(t: number) {
74-
console.log("RafSub", this.uuid ,"trigger(", t, ")");
7564
this.dispatch(this.mapper(t));
7665
}
7766
}

0 commit comments

Comments
 (0)