Added by-name instantiation. Diffs= 6488a1822 Added by-name instantiation. (#6102) Co-authored-by: DragoČ™ Tiselice <dragos@rive.app>
diff --git a/.rive_head b/.rive_head index 9efff06..20a4fcf 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -7bc216b036bff5ec296f5dc14787b4779c18c871 +6488a182262d4a9307567c58b9f20712668d462f
diff --git a/vello/src/main.rs b/vello/src/main.rs index 9bb6c32..4067004 100644 --- a/vello/src/main.rs +++ b/vello/src/main.rs
@@ -1,6 +1,6 @@ use std::{fs, time::Instant}; -use rive_rs::{Artboard, File, Instantiate, Viewport}; +use rive_rs::{Artboard, File, Handle, Instantiate, Viewport}; use vello::{ kurbo::{Affine, Rect, Vec2}, peniko::{Color, Fill}, @@ -89,9 +89,9 @@ WindowEvent::DroppedFile(path) => { scene = Some({ let file = File::new(&fs::read(path).unwrap()).unwrap(); - let artboard = Artboard::instantiate(&file, None).unwrap(); + let artboard = Artboard::instantiate(&file, Handle::Default).unwrap(); - Box::<dyn rive_rs::Scene>::instantiate(&artboard, None).unwrap() + Box::<dyn rive_rs::Scene>::instantiate(&artboard, Handle::Default).unwrap() }); } _ => {}