Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions crates/processing_render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,7 @@ pub fn surface_create(

/// Create a WebGPU surface from a canvas element ID
#[cfg(target_arch = "wasm32")]
pub fn surface_create_from_canvas(
canvas_id: &str,
width: u32,
height: u32,
) -> Result<Entity> {
pub fn surface_create_from_canvas(canvas_id: &str, width: u32, height: u32) -> Result<Entity> {
use wasm_bindgen::JsCast;
use web_sys::HtmlCanvasElement;

Expand Down Expand Up @@ -630,6 +626,7 @@ pub fn image_create(
app_mut(|app| Ok(image::create(app.world_mut(), size, data, texture_format)))
}

#[cfg(not(target_arch = "wasm32"))]
pub fn image_load(path: &str) -> Result<Entity> {
let path = PathBuf::from(path);
app_mut(|app| image::load(app.world_mut(), path))
Expand Down