fix animation

This commit is contained in:
Adam
2025-07-16 18:36:22 -07:00
parent 04ff7b75e5
commit c2815ea0e3
30 changed files with 258 additions and 386 deletions
+2 -8
View File
@@ -130,18 +130,12 @@ impl EditorHandle {
let f = std::rc::Rc::new(RefCell::new(None));
let g = f.clone();
*g.borrow_mut() = Some(Closure::new(move |_timestamp| {
*g.borrow_mut() = Some(Closure::new(move |timestamp| {
wasm_bindgen_futures::spawn_local(poll_node_graph_evaluation());
if !EDITOR_HAS_CRASHED.load(Ordering::SeqCst) {
editor_and_handle(|editor, handle| {
for message in editor.handle_message(InputPreprocessorMessage::CurrentTime {
timestamp: js_sys::Date::now() as u64,
}) {
handle.send_frontend_message_to_js(message);
}
for message in editor.handle_message(AnimationMessage::IncrementFrameCounter) {
for message in editor.handle_message(InputPreprocessorMessage::CurrentTime { timestamp }) {
handle.send_frontend_message_to_js(message);
}