Open nandin-borjigin opened 2 years ago
regl is an awesome library to use! I really like it!
regl
For my use case, I need to do some asynchronous staff in the command body function and wait for that asynchronous operation outside of the command.
regl(config)(async () => something()); // need to wait for something to finish
For now I'm utilizing p-defer, but I think if REGL.DrawCommand could forward the return value of its body, it would help a lot.
p-defer
REGL.DrawCommand
body
// for now const deferred = defer(); regl(config)(async () => { await something(); deferred.resolve(); }) await deferred.promise;
// desired await regl(config)(() => something());
regl
is an awesome library to use! I really like it!For my use case, I need to do some asynchronous staff in the command body function and wait for that asynchronous operation outside of the command.
For now I'm utilizing
p-defer
, but I think ifREGL.DrawCommand
could forward the return value of itsbody
, it would help a lot.