@@ -3,6 +3,9 @@ use egui_demo_lib::is_mobile;
3
3
#[ cfg( feature = "glow" ) ]
4
4
use eframe:: glow;
5
5
6
+ #[ cfg( target_arch = "wasm32" ) ]
7
+ use core:: any:: Any ;
8
+
6
9
#[ derive( Default ) ]
7
10
#[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
8
11
struct EasyMarkApp {
@@ -13,6 +16,11 @@ impl eframe::App for EasyMarkApp {
13
16
fn update ( & mut self , ctx : & egui:: Context , _frame : & mut eframe:: Frame ) {
14
17
self . editor . panels ( ctx) ;
15
18
}
19
+
20
+ #[ cfg( target_arch = "wasm32" ) ]
21
+ fn as_any_mut ( & mut self ) -> & mut dyn Any {
22
+ & mut * self
23
+ }
16
24
}
17
25
18
26
// ----------------------------------------------------------------------------
@@ -27,6 +35,11 @@ impl eframe::App for DemoApp {
27
35
fn update ( & mut self , ctx : & egui:: Context , _frame : & mut eframe:: Frame ) {
28
36
self . demo_windows . ui ( ctx) ;
29
37
}
38
+
39
+ #[ cfg( target_arch = "wasm32" ) ]
40
+ fn as_any_mut ( & mut self ) -> & mut dyn Any {
41
+ & mut * self
42
+ }
30
43
}
31
44
32
45
// ----------------------------------------------------------------------------
@@ -46,6 +59,11 @@ impl eframe::App for FractalClockApp {
46
59
. ui ( ui, Some ( crate :: seconds_since_midnight ( ) ) ) ;
47
60
} ) ;
48
61
}
62
+
63
+ #[ cfg( target_arch = "wasm32" ) ]
64
+ fn as_any_mut ( & mut self ) -> & mut dyn Any {
65
+ & mut * self
66
+ }
49
67
}
50
68
51
69
// ----------------------------------------------------------------------------
@@ -70,6 +88,11 @@ impl eframe::App for ColorTestApp {
70
88
} ) ;
71
89
} ) ;
72
90
}
91
+
92
+ #[ cfg( target_arch = "wasm32" ) ]
93
+ fn as_any_mut ( & mut self ) -> & mut dyn Any {
94
+ & mut * self
95
+ }
73
96
}
74
97
75
98
// ----------------------------------------------------------------------------
@@ -225,6 +248,11 @@ impl eframe::App for WrapApp {
225
248
custom3d. on_exit ( gl) ;
226
249
}
227
250
}
251
+
252
+ #[ cfg( target_arch = "wasm32" ) ]
253
+ fn as_any_mut ( & mut self ) -> & mut dyn Any {
254
+ & mut * self
255
+ }
228
256
}
229
257
230
258
impl WrapApp {
0 commit comments