Added conditional configurations for WASM target for gradients & storage buffers, since storage buffers are not supported on wgpu WASM target at the moment.

This commit is contained in:
bungoboingo 2022-11-10 14:43:38 -08:00
parent 23299a555f
commit 365f37a3ae
5 changed files with 27 additions and 3 deletions

View file

@ -76,6 +76,7 @@ impl Transform {
fn transform_style(&self, style: triangle::Style) -> triangle::Style {
match style {
triangle::Style::Solid(color) => triangle::Style::Solid(color),
#[cfg(not(target_arch = "wasm32"))]
triangle::Style::Gradient(gradient) => {
triangle::Style::Gradient(self.transform_gradient(gradient))
}