clumsy-graphics
Version:
a tool for rapidly developing animations where frames are described using svg elements à la react 🙃
38 lines (37 loc) • 1.68 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.animationModuleBundlerEventHandlerSaga = void 0;
const storeEffects_1 = require("../helpers/storeEffects");
function* animationModuleBundlerEventHandlerSaga(api) {
const { animationModuleBundlerEventChannel } = api;
while (true) {
const someAnimationModuleBundlerEvent = yield* (0, storeEffects_1.takeEvent)(animationModuleBundlerEventChannel);
switch (someAnimationModuleBundlerEvent.eventType) {
case 'animationModuleBundler_initialBuildSucceeded':
yield* (0, storeEffects_1.put)({
type: someAnimationModuleBundlerEvent.eventType,
actionPayload: {
...someAnimationModuleBundlerEvent.eventPayload,
},
});
break;
case 'animationModuleBundler_rebuildSucceeded':
yield* (0, storeEffects_1.put)({
type: someAnimationModuleBundlerEvent.eventType,
actionPayload: {
...someAnimationModuleBundlerEvent.eventPayload,
},
});
break;
case 'animationModuleBundler_rebuildFailed':
yield* (0, storeEffects_1.put)({
type: someAnimationModuleBundlerEvent.eventType,
actionPayload: {
...someAnimationModuleBundlerEvent.eventPayload,
},
});
break;
}
}
}
exports.animationModuleBundlerEventHandlerSaga = animationModuleBundlerEventHandlerSaga;