@@ -1,24 +1,23 @@
1−use std::cell::RefCell;
2−use std::rc::Rc;
3−
41use dodrio::bumpalo::{self, Bump};
52use dodrio::{Node, Render, Vdom};
3+use std::cell::RefCell;
4+use std::rc::Rc;
65use wasm_bindgen::prelude::*;
76use wasm_bindgen::JsCast;
87use web_sys::Window;
98
10−// Triangle container defining target size
9+// Triangle container defining target size.
1110struct Container {
1211 size: f64,
1312}
1413
1514impl Container {
16− // Construct a new container
15+ // Construct a new container.
1716 pub fn new() -> Container {
1817 Container { size: 25.0 }
1918 }
2019
21− // Generate the container style to fluctuate triangle width
20+ // Generate the container style to fluctuate triangle width.
2221 fn container_transform<'a, 'bump>(&'a self, bump: &'bump Bump, elapsed: f64) -> &'bump str
2322 where
2423 'a: 'bump,
@@ -33,7 +32,7 @@ impl Container {
3332 transform.into_bump_str()
3433 }
3534
36− // Generate the dot's position on the grid
35+ // Generate the dot's position on the grid.
3736 fn dot_style<'a, 'bump>(&'a self, bump: &'bump Bump, x: f64, y: f64) -> &'bump str
3837 where
3938 'a: 'bump,
@@ -55,7 +54,7 @@ impl Container {
5554 styles.into_bump_str()
5655 }
5756
58− // Create a dot node
57+ // Create a dot node.
5958 fn dot<'a, 'bump>(&'a self, bump: &'bump Bump, x: f64, y: f64, content: u32) -> Node<'bump>
6059 where
6160 'a: 'bump,