Skip to content

Commit 10b291c

Browse files
committed
Cleanup.
1 parent d581a40 commit 10b291c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

wasm-splats/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
//! Library containing high-performance functions for the Gaussian Splats rendering process within CesiumJS.
2+
13
pub mod models;
24
pub mod radix;
35
pub mod texture_gen;
46

7+
use crate::models::TextureData;
58
use js_sys::{Float32Array, Uint32Array, Uint8Array};
69
use wasm_bindgen::prelude::*;
7-
use crate::models::TextureData;
810

911
/// Generate a splat texture from the given attributes.
1012
///
@@ -21,7 +23,7 @@ pub fn generate_splat_texture(
2123
}
2224

2325
/// Sorts the Gaussian Splats by depth using a radix sort.
24-
///
26+
///
2527
/// Wraps the [`radix::radix_sort_gaussians_indexes`] function for access from JavaScript.
2628
#[wasm_bindgen]
2729
pub fn radix_sort_gaussians_indexes(

wasm-splats/src/radix.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Radix sort implementation for sorting Gaussian Splats.
2+
13
use js_sys::{Float32Array, Uint32Array};
24
use wasm_bindgen::prelude::*;
35

wasm-splats/src/texture_gen.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
//! Generates textures for use within the Gaussian Splat shaders in CesiumJS.
2+
3+
use crate::models::TextureData;
14
use js_sys::{Float32Array, Uint8Array};
25
use wasm_bindgen::prelude::*;
3-
use crate::models::TextureData;
46

57
/// Converts a 32-bit float to a 16-bit integer.
68
fn float_to_half(f: f32) -> i16 {

wasm-splats/tests/web.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ fn test_radix_sort_gaussians_indexes() {
4040
let count = test_data.get_count();
4141
let sorted_idx = test_data.get_sorted_idx();
4242

43-
let result =
44-
radix_sort_gaussians_indexes(&positions, &model_view, count).unwrap();
43+
let result = radix_sort_gaussians_indexes(&positions, &model_view, count).unwrap();
4544

4645
check_uint32array(&result, sorted_idx.as_ref()).unwrap();
4746
}

0 commit comments

Comments
 (0)