fix: delegateExcitable 的 this 指向问题

This commit is contained in:
AncTe committed 2026-11-25 17:31:18 +08:00
1 parent ba90ce6dac
commit b99ea470f9
1 file changed
+5 -2
+5 -2
View File
@@ -823,11 +823,14 @@ export class MotaRenderer
const info: DelegatedExcitable = {
id: index,
obj: fn,
excited: typeof fn === 'function' ? fn : fn.excited,
excited:
typeof fn === 'function'
? (t: number) => fn(t)
: (t: number) => fn.excited(t),
startTime: this.excitation.payload(),
time: time ?? 0,
forever: time === void 0,
end
end: () => end?.()
};
this.excitables.set(index, info);
this.excitablesMap.set(fn, info);