@@ -106,7 +106,7 @@ impl Moire {
108impl Render for Moire {
108impl Render for Moire {
109− fn render<'bump>(&self, cx: &mut RenderContext<'bump>) -> Node<'bump> {
109+ fn render<'a>(&self, cx: &mut RenderContext<'a>) -> Node<'a> {
110 use dodrio::builder::*;
110 use dodrio::builder::*;
112 let elapsed = web_sys::window()
112 let elapsed = web_sys::window()
@@ -150,7 +150,7 @@ impl Render for Moire {
150/// Rendering helper methods.
150/// Rendering helper methods.
151impl Moire {
151impl Moire {
152 /// Generate the main Moire element's inline CSS styles.
152 /// Generate the main Moire element's inline CSS styles.
153− fn moire_style<'bump>(&self, cx: &mut RenderContext<'bump>, elapsed: f64) -> &'bump str {
153+ fn moire_style<'a>(&self, cx: &mut RenderContext<'a>, elapsed: f64) -> &'a str {
154 let elapsed = elapsed / 3.0;
154 let elapsed = elapsed / 3.0;
155 let color = colors::get_interpolated_color(|(_, bg)| bg, elapsed % 1.0);
155 let color = colors::get_interpolated_color(|(_, bg)| bg, elapsed % 1.0);
156 let style = bumpalo::format!(
156 let style = bumpalo::format!(
@@ -164,7 +164,7 @@ impl Moire {
166 /// Generate the orbiting circle objects.
166 /// Generate the orbiting circle objects.
167− fn orbiting_objects<'bump>(&self, cx: &mut RenderContext<'bump>, elapsed: f64) -> Node<'bump> {
167+ fn orbiting_objects<'a>(&self, cx: &mut RenderContext<'a>, elapsed: f64) -> Node<'a> {
168 const D: f64 = 200.0;
168 const D: f64 = 200.0;
169 let x = elapsed.sin() * D;
169 let x = elapsed.sin() * D;
170 let y = elapsed.cos() * D;
170 let y = elapsed.cos() * D;
@@ -173,24 +173,20 @@ impl Moire {
174 /// Generate the lemniscate circle objects that interact with the orbiting
174 /// Generate the lemniscate circle objects that interact with the orbiting
175 /// circle objects to form Moire patterns.
175 /// circle objects to form Moire patterns.
176− fn lemniscate_objects<'bump>(
176+ fn lemniscate_objects<'a>(&self, cx: &mut RenderContext<'a>, elapsed: f64) -> Node<'a> {
178− cx: &mut RenderContext<'bump>,
181 const A: f64 = 150.0;
177 const A: f64 = 150.0;
182 let x = elapsed.sin() * A;
178 let x = elapsed.sin() * A;
183 let y = elapsed.sin() * elapsed.cos() * A;
179 let y = elapsed.sin() * elapsed.cos() * A;
184 self.moving_object(cx, elapsed, x, y)
180 self.moving_object(cx, elapsed, x, y)
187− fn moving_object<'a, 'bump>(
183+ fn moving_object<'a>(
188− &'a self,
184+ &self,
189− cx: &mut RenderContext<'bump>,
185+ cx: &mut RenderContext<'a>,
190 elapsed: f64,
186 elapsed: f64,
193− ) -> Node<'bump> {
189+ ) -> Node<'a> {
194 use dodrio::builder::*;
190 use dodrio::builder::*;
196 .attr("class", "object")
192 .attr("class", "object")
@@ -200,17 +196,12 @@ impl Moire {
202 /// Generate inline CSS styles for a moving object.
198 /// Generate inline CSS styles for a moving object.
203− fn moving_object_style<'bump>(
199+ fn moving_object_style<'a>(&self, cx: &mut RenderContext<'a>, x: f64, y: f64) -> &'a str {
205− cx: &mut RenderContext<'bump>,
209 bumpalo::format!(in cx.bump, "left: {}px; top: {}px;", x, y).into_bump_str()
200 bumpalo::format!(in cx.bump, "left: {}px; top: {}px;", x, y).into_bump_str()
212 /// Recursively generate `self.count` concentric circles.
203 /// Recursively generate `self.count` concentric circles.
213− fn circle<'bump>(&self, cx: &mut RenderContext<'bump>, elapsed: f64, n: u32) -> Node<'bump> {
204+ fn circle<'a>(&self, cx: &mut RenderContext<'a>, elapsed: f64, n: u32) -> Node<'a> {
214 use dodrio::builder::*;
205 use dodrio::builder::*;
216 let r = n * 16;
207 let r = n * 16;
@@ -231,13 +222,13 @@ impl Moire {
233 /// Generate inline CSS styles for a circle.
224 /// Generate inline CSS styles for a circle.
234− fn circle_style<'bump>(
225+ fn circle_style<'a>(
236− cx: &mut RenderContext<'bump>,
227+ cx: &mut RenderContext<'a>,
237 elapsed: f64,
228 elapsed: f64,
240− ) -> &'bump str {
231+ ) -> &'a str {
241 let (border, alpha) = self.circle_color(elapsed, n);
232 let (border, alpha) = self.circle_color(elapsed, n);
242 let margin = r / 2 + 3;
233 let margin = r / 2 + 3;
243 let style = bumpalo::format!(
234 let style = bumpalo::format!(