Drop-in three.js replacement for Rust and WebAssembly (wgpu) — THREE.* API, scene graph, PBR, post-fx, mesh BVH, CSG, headless render, and native media codecs
usecrate::math::Color;/// Area light shaped like a rectangle. Matches three.js's API surface.
/// The renderer does not implement the full LTC-based rect-area shading yet;
/// it's treated as a soft directional approximation until the BRDF lands.
#[derive(Debug, Clone, Copy)]pubstructRectAreaLight{pubcolor: Color,
pubintensity:f32,
pubwidth:f32,
pubheight:f32,
}implDefault forRectAreaLight{fndefault()->Self{Self::new(Color::WHITE,1.0,10.0,10.0)}}implRectAreaLight{pubconstfnnew(color: Color, intensity:f32, width:f32, height:f32)->Self{Self{
color,
intensity,
width,
height,}}}