From 5abe028aed72c1a48ee2dd42b739717cf9afd4b1 Mon Sep 17 00:00:00 2001 From: Elham Aryanpur Date: Sun, 18 Feb 2024 16:16:02 +0300 Subject: [PATCH] chore: the signal methods are now optional --- src/header.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/header.rs b/src/header.rs index a86a033..a3ee0d3 100644 --- a/src/header.rs +++ b/src/header.rs @@ -480,7 +480,8 @@ pub trait Signal: Any { _events: &crate::Event<()>, _input: &crate::InputHelper, _camera: &mut crate::Camera, - ); + ) { + } /// ran before the frame is rendered fn frame( @@ -492,8 +493,10 @@ pub trait Signal: Any { _input: &crate::InputHelper, _encoder: &mut crate::CommandEncoder, _view: &crate::TextureView, - ); + ) { + } } +// The engine needs to know the functions of Signal to do things internally, so we use downcast and not the std::any::Any downcast!(dyn Signal); /// Defines how the rotation axis is