mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 08:28:11 +08:00
fix animation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user